d7a5383575c32d89c5d3269030615923f14fefd2
[m17n/m17n-lib.git] / src / ChangeLog
1 2007-01-12  Kenichi Handa  <handa@m17n.org>
2
3         * input.c (handle_key): Handle a branch action of the initial
4         state correctly.
5
6 2007-01-10  Kenichi Handa  <handa@m17n.org>
7
8         * m17n-gd.c (gd_render): Delete superfluous line.
9
10 2006-12-26  Kenichi Handa  <handa@m17n.org>
11
12         * m17n.h (minput_callback): Extern it.
13
14         * input.h (minput__callback): Delte extern.
15
16         * input.c (get_surrounding_text): Adjusted for the change of
17         minput__callback to minput_callback.
18         (delete_surrounding_text): Likewise.
19         (minput_create_ic): Likewise.
20         (minput_destroy_ic): Likewise.
21         (minput_filter): Likewise.
22         (minput_set_spot): Likewise.
23         (minput_toggle): Likewise.
24         (minput_reset_ic): Likewise.
25
26         (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
27         and ic->candidate_to to 0.
28         (minput_callback): Renamed from minput__callback.
29
30         * input-gui.c (win_callback): Adjusted for the change of
31         minput__callback to minput_callback.
32
33 2006-12-15  Kenichi Handa  <handa@m17n.org>
34
35         * font-ft.c (ft_add_font): Fix typo.
36
37 2006-12-06  Kenichi Handa  <handa@m17n.org>
38
39         * Version 1.3.4 released.
40
41 2006-11-16  Kenichi Handa  <handa@m17n.org>
42
43         * input.c (parse_action_list): Allow (undo 0).
44         (adjust_markers): New function.
45         (preedit_insert, preedit_delete): Call adjust_markers.
46         (preedit_replace): New function.
47         (update_candidate): Call preedit_replace instead of preedit_insert
48         and preedit_delete.
49         (filter): When ic_info->commit_key_head is nonzero, shift input
50         event keys even if there's no committed text.
51
52 2006-11-10  Kenichi Handa  <handa@m17n.org>
53
54         * input.h (MInputContextInfo): New member commit_key_head.
55
56         * input.c (preedit_commit): Update ic_info->commit_key_head.
57         (take_action_list): Reset ic_info->commit_key_head on Mundo.
58         (filter): When committed, shift keys by ic_info->commit_key_head.
59
60 2006-10-30  Kenichi Handa  <handa@m17n.org>
61
62         * input.c (preedit_delete): Fix typo.
63         (take_action_list): Print more debugging information.  Allow
64         variable in arg of 'select' and `pushback'.
65
66         * database.c (gen_database_name): Don't put extra space.
67         (load_database): Print debugging information.
68         (register_databases_in_files): New arg headlen.  Callers changed.
69         (mdatabase__load_for_keys): Shorten debugging information.
70         (mdatabase_load): Don't print debugging information here.
71
72 2006-10-27  Kenichi Handa  <handa@m17n.org>
73
74         * input.c (marker_code): New arg surrounding.  Callers changed.
75         (surrounding_pos): Check if name[0] == '@'.
76         (integer_value): Fix for the change semantics of `@-N' and `@+N'.
77         (take_action_list): Likewise.
78         (get_preceding_char): If POS is zero, always call
79         get_surrounding_text.
80
81 2006-10-19  Kenichi Handa  <handa@m17n.org>
82
83         * input.c (load_variables): Fix setting of `global'.
84
85 2006-10-16  Kenichi Handa  <handa@m17n.org>
86
87         * draw.c (draw_background): Be sure to set *to_x.
88         (render_glyph_string): If from == to, just return.
89
90 2006-10-18  Kenichi Handa  <handa@m17n.org>
91
92         * database.c (get_dir_info): Return NULL if the directory name is
93         too long.
94         (register_databases_in_files): Call register_database with
95         MDB_STATUS_AUTO.
96         (mdatabase__update): Fix logic.  Call register_database with
97         MDB_STATUS_AUTO.
98         (mdatabase_define): Call register_database with
99         MDB_STATUS_EXPLICIT.
100
101         * input.c (delete_surrounding_text): Be sure to set members
102         preceding_text and following_text to NULL.
103         (shift_state): Save variable values in ic_info->vars_saved.
104         (preedit_commit): Don't print debug information here.  Don't
105         change ic_info->keys here.
106         (get_candidate_list): Don't ref plist.
107         (take_action_list): Don't unref return value of
108         get_candidate_list.  For undo, reset ic->produced and recover
109         ic_info->vars.  Be sure to set ic->candidate_list to NULL after
110         unref it.
111         (init_ic_info): Set ic_info->vars_saved.
112         (fini_ic_info): Unref ic_info->vars_saved.
113         (re_init_ic): Be sure to set ic->candidate_list to NULL after
114         unref it.
115         (filter): Be sure to set members preceding_text and following_text
116         to NULL.  Print debug information about produced text.  Delete
117         processed keys from ic_info->keys.
118
119         * input.h (MInputContextInfo): New member vars_saved.
120
121 2006-10-16  Kenichi Handa  <handa@m17n.org>
122
123         * database.c (mdatabase__update): Fix the way to get db_info.
124
125 2006-10-02  Kenichi Handa  <handa@m17n.org>
126
127         * font.h (struct MFont): New member `multiple_sizes'.  Bit-size of
128         `size' changed to 24.
129
130         * font.c (xlfd_unparse_name): Adjusted for the change of
131         MFont->size.
132         (font_score): Likewise.
133         (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
134
135         * m17n-X.c (MFontX, _MFontX): Deleted.
136         (SET_SIZE, HAVE_SIZE): Deleted.
137         (free_display_info): Adjusted for the change of
138         disp_info->font_list format.
139         (xfont_registry_list): Likewise.
140         (xfont_open): Likewise.
141         (xfont_list): Likewise.
142         (xfont_encode_char): Ignore size to find a realized font.
143         (MRealizedFontXft): Change the order of members to make it
144         compatible with MRealizedFontFT.
145
146 2006-09-27  Kenichi Handa  <handa@m17n.org>
147
148         * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
149         (mfont_close): Add comments.
150
151         * mtext-lbrk.c (mtext_line_break): Add comment.
152
153 2006-09-26  Kenichi Handa  <handa@m17n.org>
154
155         * input.c (minput_get_description): Handle description about
156         inclusion-only input methods.
157
158 2006-09-21  Kenichi Handa  <handa@m17n.org>
159
160         * input.c (M_gettext): New variable.
161         (fully_initialize): Initialize M_gettext.
162         (check_description): New function.
163         (load_commands): Call check_description.
164         (config_all_commands): Be sure to unref pl.
165         (load_variables): Call check_description.
166         (config_all_variables): Be sure to unref pl.
167         (load_im_info): Call check_description.
168
169         * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
170
171         * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
172         and bind_textdomain_codeset.
173
174         * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
175
176 2006-09-15  Kenichi Handa  <handa@m17n.org>
177
178         * input.c (reload_im_info): Update custom and global info.
179         (init_ic_info): Fix previous change.
180
181 2006-09-14  Kenichi Handa  <handa@m17n.org>
182
183         * database.c: Include <libgen.h>.
184         (mdatabase__lock): Make a directory if necessary.
185
186         * input.c (resolve_command): Adjusted for the format change of
187         configured_cmds member.
188         (load_commands, load_variables): Fix for errornous data handling.
189         (config_command, config_variable): New function.
190         (config_all_commands, config_all_variables): Renamed from
191         config_commands and config_variables.  Utilize the above function.
192         (check_variable_value): Argument changed.  Callers changed.
193         (load_im_info): Call config_all_commands and config_all_variables.
194         (init_ic_info): Adjusted for the format change of configured_vars
195         member.
196         (minput__init): Initialize Mcustomized, Mconfigured, and
197         Minherited.
198         (Mcustomized, Mconfigured, Minherited): New variables.
199         (minput_get_command): Be sure to return NULL if an input method
200         use no local command.
201         (minput_get_variable): Be sure to return NULL if an input method
202         use no local variable.
203         (minput_config_command, minput_config_variable)
204         (minput_save_config): Adjusted for the format change of
205         configured_cmds and configured_vars members.
206         
207         * plist.c (write_element): Delete superfluous ':'.
208
209 2006-09-13  Kenichi Handa  <handa@m17n.org>
210
211         * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
212         (minput_config_file): Extern it.
213
214         * draw.c (Minherited): Declaration moved to input.c.
215         (mdraw__init): Don't initialize Minherited here.
216
217         * database.c (mdatabase__unlock): Be sure to unlink uniq file.
218
219 2006-09-07  Kenichi Handa  <handa@m17n.org>
220
221         * textprop.c (mtext_serialize): Call mplist__serialize with the
222         arg pretty 0.
223
224         * plist.h (mplist__serialize): Prototype adjusted.
225         (mplist__assq): Extern it.
226
227         * plist.c: Include <ctype.h>
228         (PUTC, PUTS): New macros.
229         (write_symbol): New function.
230         (write_element): New arg indent.
231         (dump_string, dump_plist_element): Delete them.
232         (mplist__from_string): New arg pretty.
233         (mplist__assq): New function.
234         (mdebug_dump_plist): Use write_element.
235
236         * mtext.c (mtext_cat_char): Allocate more memory.
237         (mdebug_dump_mtext): Don't escal a newline character.
238
239         * m17n.h (minput_get_command, minput_get_variable)
240         (minput_config_command, minput_config_variable)
241         (minput_save_config): Extern them.
242
243         * m17n-core.c: Include <string.h>.
244         (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
245         use the stream stdout instead of a file of that name.
246
247         * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
248         modifiers.
249
250         * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
251         (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
252         (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
253         (MDEBUG_DUMP): Flush the stream.
254
255         * input.h (struct _MInputMethodInfo): Delete member im.  New
256         members mdb, language, name, extra, cmds, configured_cmds,
257         bc_cmds, vars, configured_vars, bc_vars, description, and tick.
258         (MInputContextInfo): New member tick.
259
260         * input.c: Big change to improve user-side input method
261         customization.  Here, list just public API changes.
262         (minput_get_commands, minput_get_variables)
263         (minput_assign_command_keys, minput_set_variable): Label them
264         obsolete.
265         (minput_get_command, minput_get_variable)
266         (minput_config_command, minput_config_variable)
267         (minput_save_config): New functions.
268         
269         * database.h (PATH_MAX): Define it if not yet defined.
270         (PATH_SEPARATOR): Likewise.
271         (enum MDatabaseStatus): New enum.
272         (struct MDatabaseInfo): Moved from database.c.  New members status,
273         time, lock_file, and uniq_file.
274         (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
275         (mdatabase__unlock): Extern them.
276
277         * database.c: Include <time.h>.
278         (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
279         (GEN_PATH): Args changed.  Callers changed.
280         (struct MDatabaseInfo): Moved to database.h.
281         (struct MDatabase, mdb_list): Deleted.
282         (mdatabase__list): New var.
283         (get_database_filename): Deleted.  Callers changed to use
284         get_database_file.
285         (find_file, get_database_file): New files.
286         (get_dir_info): Initialize new members of MDatabaseInfo.
287         (find_database): Arg chagnded.  Callers changed.
288         (free_db_info, register_database, register_databases_in_files):
289         New functions.
290         (update_database_list): Deleted.
291         (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
292         (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
293         (mdatabase__update): New function.
294         (mdatabase__check): Return value changed.
295         (mdatabase__file, mdatabase__lock, mdatabase__save)
296         (mdatabase__unlock): New functions.
297
298 2006-08-30  TAKAHASHI Naoto  <ntakahas@m17n.org>
299
300         * input.c (get_surrounding_text): Return -2 when surrounding text
301         is unavailable.
302         (get_following_char): Likewise.
303         (get_preceding_char): Likewise.
304         (minput__callback): Return 0 if there is a callback function,
305         otherwise -1.
306
307 2006-08-17  Kenichi Handa  <handa@m17n.org>
308
309         * input.c (reset_ic): Use shift_state to setup the current state.
310
311 2006-08-02  Theppitak Karoonboonyanan  <thep@linux.thai.net>  (tiny change)
312
313         * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
314         (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
315         (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
316
317 2006-08-02  Kenichi Handa  <handa@m17n.org>
318
319         * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
320
321         * mtext.c (mdebug_dump_mtext): If not fullp, dump just text. 
322
323         * font-ft.c (ft_encapsulate): Add code for debugging.
324         (mfont__ft_drive_otf): Be sure to encode character before getting
325         metrics.
326
327 2006-07-21  Kenichi Handa  <handa@m17n.org>
328
329         * draw.c (mdraw_text_extents): Fix previous typo.
330
331 2006-07-19  Kenichi Handa  <handa@m17n.org>
332
333         * draw.c (gstring_width): New arg lbearing.
334         (render_glyph_string): Adjusted for the change of gstring_width.
335         (mdraw_text_extents): Fix lbearing of ink and line metrics.
336
337         * m17n-core.h (Mlanguage): Extern it.
338
339         * m17n.h (Mlanguage): Extern deleted. 
340
341         * mtext.c (mtext__init): Initialize Mlanguage.
342         (Mlanguage): Declaration moved from locale.c
343
344         * locale.c (mlocale__init): Don't initialize Mlanguage here.
345         (Mlanguage): Declaration moved to mtext.c.
346
347         * language.c (mlang__init): Don't initialize Mlanguage here.
348
349         * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
350
351 2006-07-14  Kenichi Handa  <handa@m17n.org>
352
353         * font-ft.c: Use FT_BDF_H macro.  Include fontconfig/fcfreetype.h.
354         (MRealizedFontFT): New member face_encapsulated.
355         (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
356         (ft_gen_font): New function.
357         (ft_add_font): Use ft_gen_font.
358         (ft_list_script): Store lists in ft_script_list.
359         (ft_check_otf): New arg ft_face.  Caller changed.
360         (ft_check_language): Likewise.
361         (ft_check_script): Likewise.
362         (ft_encapsulate, ft_close): New functions.
363         (mfont__ft_driver): Initialize members encapsulate and close.
364         (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
365
366         * font.h (struct MRealizedFont): New member encapsulating.
367         (struct MFontDriver): New members encapsulate and close.
368
369         * font.c (mfont__match_p): If FONT is realized, check capability
370         by font drivers's check_capability method.
371         (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
372         functions.
373
374         * m17n-X.c (xfont_list_family_names): Delete unused var.  Fix
375         declarations of foundry and fam local vars.
376         (xft_driver): Make it static.
377
378         * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
379         (mfont_close): Extern them.
380
381         * m17n-gd.c (device_open): Don't specify foundry and family of the
382         default face.
383
384 2006-07-11  Kenichi Handa  <handa@m17n.org>
385
386         * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
387
388 2006-07-13  Kenichi Handa  <handa@m17n.org>
389
390         * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
391         created.
392         (ft_check_script): Delete unused var.
393         (ft_list_capability): Likewise.
394
395         * font.c (mfont__get_capability): Setup cap->otf.
396         (Motf): Make it global.
397         (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
398
399         * font.h (MFontCapability): New member otf.
400
401         * language.c (mlang__fini): Delete unused vars.
402
403         * m17n-gui.h (Motf): Extern it.
404
405         * database.c (update_database_list): Delete unused vars.
406
407 2006-07-07  Kenichi Handa  <handa@m17n.org>
408
409         * font-ft.c (DEVICE_DELTA): Fix typo.
410
411 2006-07-06  Kenichi Handa  <handa@m17n.org>
412
413         * fontset.c (mfont__lookup_fontset): Don't ignore family and
414         foundry of face.
415
416 2006-07-05  TAKAHASHI Naoto  <ntakahas@m17n.org>
417
418         * database.c: Update comments.
419
420 2006-07-05  Kenichi Handa  <handa@m17n.org>
421
422         * database.c (PATH_MAX): Define it if not yet defined.
423         (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
424         macros.
425         (get_database_filename): Use GEN_PATH.
426         (get_dir_info): Don't include the last '/' in directory name.
427         (register_database): New function.
428         (update_database_list): Use register_database.  Search all
429         directories in mdatabase__dir_list for wildcard databases.
430         (mdatabase__init): Check "~/.m17n.d".
431
432 2006-07-03  Kenichi Handa  <handa@m17n.org>
433
434         * input-gui.c (win_callback): If is ic->candidate_show zero, don't
435         push reverse property.
436
437         * plist.c (dump_plist_element): Fix previous change.
438
439 2006-06-28  Kenichi Handa  <handa@m17n.org>
440
441         * font.c (xlfd_unparse_name): Suppress the heading '-' if not
442         necessary.
443
444         * draw.c (MbidiNSM): New variable.
445         (visual_order) [! HAVE_FRIBIDI]: Clear levels at first.  Pay
446         attention to bidi type NSM.
447         (mdraw__init): Initialize MbibiNSM.
448
449         * language.c (mscript__char_list): Fix finding a char-list element.
450
451         * plist.c (dump_string): Return number of printed characters.
452         (dump_plist_element): Print elements more compactly.
453
454 2006-06-23  Kenichi Handa  <handa@m17n.org>
455
456         * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
457         (include_HEADERS): Likewise.
458
459 2006-06-23  TAKAHASHI Naoto  <ntakahas@m17n.org>
460
461         * language.c: Update documentation.
462
463 2006-06-23  Kenichi Handa  <handa@m17n.org>
464
465         * font-ft.c (struct MFontFT): Delete member lang.
466         (free_ft_info): Don't unref member lang.  Destroy members langset
467         and charset.
468         (fc_parse_pattern): Last argument changed to MFontFT *.  Callers
469         changed.  Set members langset and charset.
470         (fc_init_font_list, fc_list_pattern, fc_build_charset): New
471         functions.
472         (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
473         functions.
474         (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
475         (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
476         (ft_list_language) [HAVE_FONTCONFIG]: Check representative
477         characters at first.  If it fails, try listing by language names.
478         (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
479         (ft_check_language): Renamed from ft_check_lang.  Adjusted for the
480         change of MFontCapability.
481         (ft_list_capability): Likewise.  Try listing by languages, then by
482         scripts.  Check OTF at last.
483         (ft_check_script): New function.
484         (ft_select): Adjusted for the check of MFontCapability.
485         (ft_list_family_names): New function.
486         (ft_check_capability): If cap->script is not Mnil, call
487         ft_check_script.
488         (mfont__ft_driver): Initialize with ft_list_family_names.
489
490         * font.h (struct MFontDriver): New member list_fmaily_names.
491         (struct): Change member "MSymbol *lang" to "MSymbol language".
492
493         * font.c: Include "language.h".
494         (Motf): New variable.
495         (otf_script_list, load_otf_script_list): Delete it.
496         (find_script_from_otf_tag): Delete it.
497         (merge_capability): New function.
498         (mfont__init): Init Motf.
499         (mfont__fini): Don't unref otf_script_list.
500         (free_font_capability): Check cap->script_tag to determine if
501         OTF-related capability is set.
502         (mfont__get_capability): Call mscript__from_otf_tag.  Adjusted for
503         the change of type MFontCapability.
504         (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
505         and Motf properties.
506         (mfont_list): Call merge_capability for LANGUAGE arg.
507         (mfont_list_family_names): New function.
508
509         * input-gui.c: Typo in comments fixed.
510
511         * input.c: Typo in comments fixed.
512
513         * language.h (mlanguage__list): Delete it.
514         (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
515         functions.
516
517         * language.c: Include "mtext.h".
518         (M_script_lang_list): Delete it.
519         (language_list, script_list): New variables.
520         (load_lang_script_list, init_language_list, init_script_list): New
521         functions.
522         (mlang__init): Don't load language database here.
523         (mlang__fini): Unref language_list and script_list if not NULL.
524         (mlanguage__list): Delete it.
525         (mlanguage__info, mscript__info, mscript__char_list)
526         (mscript__otf_tag, mscript__from_otf_tag): New functions.
527         (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
528         (mscript_list, mscript_language_list): New functions.
529
530         * m17n-gui.h (mfont_list_family_names): Extern it.
531
532         * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
533         (mlanguage_text, mscript_list, mscript_language_list): Extern
534         them.
535
536 2006-06-21  Kenichi Handa  <handa@m17n.org>
537
538         * m17n-X.c (xfont_driver): Initialize with
539         xfont_list_family_names.
540         (xfont_list_family_names): New function.
541         (xft_driver): Initialize with NULL for list_family_names member.
542         (device_init): Set list_family_names member of xft_driver to that
543         of mfont__ft_driver.
544
545 2006-06-06  Kenichi Handa  <handa@m17n.org>
546
547         * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
548
549 2006-03-24  Kenichi Handa  <handa@m17n.org>
550
551         * font-ft.c (ft_open): Improve debug message.
552
553         * fontset.c (mfontset__get_font): Fix for the case that no font in
554         per_script list is available.
555
556 2006-02-06  Kenichi Handa  <handa@m17n.org>
557
558         * Version 1.3.3 released.
559
560 2006-02-22  Kenichi Handa  <handa@m17n.org>
561
562         * textprop.c: Fix some typos in documentation.
563
564         * plist.c: Fix some typos in documentation.
565
566         * m17n-core.h: Fix some typos in documentation.
567         (M17NLIB_PATCH_LEVEL): Updated to 3.
568         (M17NLIB_VERSION_NAME): Updated to "1.3.3".
569
570         * symbol.c: Fix some typos in documentation.
571
572         * mtext.c: Fix some typos in documentation.
573
574         * input.c: Fix several typos in documentation.
575
576 2006-02-06  Kenichi Handa  <handa@m17n.org>
577
578         * Version 1.3.2 released.
579
580 2006-02-03  Kenichi Handa  <handa@m17n.org>
581
582         * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
583         (M17NLIB_VERSION_NAME): Updated to "1.3.2".
584
585         * font.c (xlfd_parse_name): Fix handling of the name "nil".
586
587         * draw.c (layout_glyphs): Fix handling left_padding of
588         composition's base.
589
590         * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
591
592 2006-02-02  Kenichi Handa  <handa@m17n.org>
593
594         * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
595         if WITH_GUI is true.
596
597 2006-01-25  Kenichi Handa  <handa@m17n.org>
598
599         * input.c (resolve_expression): If the value of PLIST is a plist,
600         but the first element is not symbol, return 0.
601
602 2006-01-17  Kenichi Handa  <handa@m17n.org>
603
604         * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
605         HAVE_GD is 2 or the greater.
606
607 2006-01-16  Kenichi Handa  <handa@m17n.org>
608
609         * Version 1.3.1 released.
610
611 2006-01-16  Kenichi Handa  <handa@m17n.org>
612
613         * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
614         simulating anti-aliasing.
615
616         * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
617         (M17NLIB_VERSION_NAME): Updated to "1.3.1".
618
619 2006-01-12  Kenichi Handa  <handa@m17n.org>
620
621         * input.c (get_surrounding_text): Always pop ic->plist.
622         (reset_ic): Don't reset ic->plist.
623
624 2006-01-10  Kenichi Handa  <handa@m17n.org>
625
626         * input.c (preedit_commit): For debugging, print only commiting
627         charactes.  Don't set ic->candidate_show to 0.
628         (handle_key): Don't run branch-actions just by shifting to the
629         current state.
630         (reset_ic): Reset state_key_head and key_head of ic_info to 0.
631         Reset vars and plist.
632
633 2006-01-07  Kenichi Handa  <handa@m17n.org>
634
635         * input.c (load_branch): Confirm that maps is not NULL.
636
637 2006-01-05  Kenichi Handa  <handa@m17n.org>
638
639         * input-gui.c (win_filter): Try to convert arg to key only when
640         arg is not NULL.
641
642         * plist.c (read_integer_element): If '#' and '-' are followed by
643         non-integer-constituent, read them as a part of a symbol.
644         (read_symbol_element): New arg C.
645         (read_element): Adjust args to read_symbol_element.
646
647         * input.c (load_macros): On overwriting a macro, free the old
648         definition.
649         (minput__init): Store Mmap in load_im_info_keys.
650         (minput_get_title_icon): If the input method has no title, be sure
651         to return NULL.
652         (minput_get_description): If the input method has no description,
653         be sure to return NULL.
654         (minput_get_variables): Fix documentation.
655         (handle_key): Pay attention to the case that key is Mnil.
656         (filter): Likewise.  Fix handling of such symbol as S-A.
657
658 2005-12-22  Kenichi Handa  <handa@m17n.org>
659
660         * Version 1.3.0 released.
661
662 2005-12-22  Kenichi Handa  <handa@m17n.org>
663
664         * font-ft.c (ft_list): If the specified font has no property,
665         return all fonts.
666
667 2005-12-20  Kenichi Handa  <handa@m17n.org>
668
669         * character.c (mchar_get_prop): Check char_prop_list.
670         (mchar_put_prop, mchar_get_prop_table): Likewise.
671
672 2005-12-18  Kenichi Handa  <handa@m17n.org>
673
674         * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
675         file name sans language.
676
677 2005-12-16  TAKAHASHI Naoto  <ntakahas@m17n.org>
678
679         * input.c: Fix typo in comments.
680
681 2005-12-14  Kenichi Handa  <handa@m17n.org>
682
683         * input.c (minput_get_title_icon): Check the default icon for the
684         input method.
685
686 2005-12-13  Kenichi Handa  <handa@m17n.org>
687
688         * input.c (Mless_equal, Mgreater_equal): New variables.
689         (parse_expression, resolve_expression, parse_action_list)
690         (take_action_list): Handle the aboves.
691         (filter): Treat key S-X as X.
692         (minput__init): Initialize Mless_equal and Mgreater_equal.
693         (minput_get_title_icon): New function.
694
695         * m17n.h (minput_get_title_icon): Extern it.
696
697         * database.c (get_database_filename): Return a filename instead of
698         file pointer.
699         (load_database): Adjusted for the above change.
700         (mdatabase__load_for_keys): Likewise.
701         (mdatabase__find_file): New function.
702
703         * database.h (mdatabase__find_file): Extern it.
704
705         * font.h (mfont__resize): Delete extern.
706
707         * font.c (mfont__list): Check resize ratio.
708         (mfont__resize): Delete it.
709         (mfont_resize_ratio): Include the code of mfont__resize.
710
711         * font-ft.c (ft_open): Check resize ratio.
712
713         * m17n-X.c (xfont_open): Check resize ratio.
714         (xft_open): Likewise.
715
716 2005-12-07  Kenichi Handa  <handa@m17n.org>
717
718         * input.c (take_action_list): If take_action_list return -1,
719         return -1.
720         (handle_key): Likewise.
721
722         * face.c (mface__for_chars): When font is specified and layouter
723         is found for it, if the layouter doesn't support one of a
724         character, use a face sans layouter for it.
725
726 2005-12-06  Kenichi Handa  <handa@m17n.org>
727
728         * fontset.c (mfont__lookup_fontset): If only a fallback font is
729         found, don't use it for more than one character.
730
731 2005-12-05  Kenichi Handa  <handa@m17n.org>
732
733         * face.c (mface__realize): Set rfont->layouter to Mnil.
734         (mface__for_chars): Fix handling of layouter.
735
736         * character.h (mchar__define_prop): Extern it.
737
738         * database.c (update_database_list): Call mchar__define_prop if
739         necessary.
740
741         * character.c (mchar__init): Don't call mchar_define_property.
742         Instead just initialize property keys.
743         (mchar__fini): Free char_prop_list only if it's not NULL.
744         (mchar__define_prop): New function.
745         (mchar_define_property): Call mchar__define_prop.
746
747         * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
748         mplist__fini.
749
750 2005-12-02  Kenichi Handa  <handa@m17n.org>
751
752         * language.c (mlang__init): Handle extra chars.
753
754         * m17n-gui.h (mfont_check): Adjust prototype.
755
756         * m17n-X.c (xfont_driver): Specify xfont_check_capability.
757         (xfont_check_capability): New function.
758         (xft_driver): Specify xft_check_capability.
759         (xft_check_capability): New function.
760
761         * font-ft.c (M0_3): Delete it.
762         (M0): New variable.
763         (ft_get_charmaps): Refer to M0.
764         (fc_parse_pattern): Fix previous change.
765         (ft_list_language): Check also extra chars.
766         (ft_check_otf): Define it even if HAVE_OTF is undef.
767         (ft_check_lang): Check the result of FcLangSetHasLang against
768         FcLangDifferentLang.  Check also extra chars.
769         (ft_list_capability): Delete ifdef HAVE_OTF.
770         (ft_select): Likewise.
771         (ft_open): Improve debug information.
772         (ft_check_capability): New function.
773         (mfont__ft_driver): Specify ft_check_capability.
774         (mfont__ft_init): Initialize M0.
775
776         * fontset.c (get_font_from_group): New function.
777         (mfontset__get_font): New function.
778
779         * fontset.h (mfontset__get_font): Extern it.
780
781         * font.c (OTF_tag): Define it if HAVE_OTF is undef.
782         (mfont__fini): Delete ifdef HAVE_OTF.
783         (free_font_capability): Likewise.
784         (mfont__get_capability): Likewise.
785         (mfont__check_capability): New function.
786         (mfont_check): Change the order of arguments.  Use
787         mfontset__get_font.
788
789         * font.h (struct MFontDriver): New member check_capability.
790         (MFontCapability): Delete ifdef HAVE_OTF.
791         (mfont__check_capability): Extern it.
792
793         * face.c (mface__realize): Fix handling of FONT arg.
794         (mface__for_chars): Fix handling of explicitly specified font.
795
796 2005-11-25  Kenichi Handa  <handa@m17n.org>
797
798         * font-flt.c (run_command): Print debug info for
799         left/rigth_padding
800
801         * draw.c (layout_glyphs): Fix handling of left/right_padding.
802
803         * face.c (mface__for_chars): Check rfont before accessing the
804         members.
805
806 2005-11-21  Kenichi Handa  <handa@m17n.org>
807
808         * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
809         WITH_GUI.
810
811         * fontset.c (fontset_table): New variable.
812         (free_fontset): Call M17N_OBJECT_UNREGISTER.
813         (mfont__fontset_init): Add fontset_table as an object array.
814         (mfont__realize_fontset): Ref FONTSET.
815         (mfont__free_realized_fontset): Unref REALIZED->fontset.
816         (mfontset): Call M17N_OBJECT_REGISTER.
817         (mfontset_copy): Likewise.
818
819         * input.c (handle_key): For debugging, print information about
820         alias key.
821         (filter): Add an alias for Meta and Alt modifiers.
822         (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
823         variables.
824         (minput__init): Initialize them.
825         (parse_expression): New function.
826         (resolve_expression): New function.
827         (parse_action_list): Handle expressions by parse_expression.
828         (take_action_list): Handle expressions by resolve_expression.
829         (parse_nested_list_value): Fix previous change.
830         (resolve_command): Fix handling of the return value of
831         get_nested_list.
832
833 2005-11-18  Kenichi Handa  <handa@m17n.org>
834
835         * font-ft.c (ft_check_otf, otf_script_list): Define only when
836         HAVE_OTF is defined.
837         (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
838         defined.
839         (ft_select): Likewise.
840
841         * font.c (mfont_list): Fix for the case that FONT is NULL.
842         (OTF_tag): Delete it.
843         (load_otf_script_list): Define only when HAVE_OTF is defined.
844         (mfont__fini): Unref otf_script_list only when HAVE_OTF is
845         defined.
846
847         * draw.c (truncate_gstring): Be sure to truncate at
848         glapheme-cluster boundary.
849
850 2005-11-11  Kenichi Handa  <handa@m17n.org>
851
852         * input.c (delete_surrounding_text): Clear cache if necessary.
853
854 2005-11-09  Kenichi Handa  <handa@m17n.org>
855
856         * draw.c (compose_glyph_string): Update prev->rface->rfont if the
857         glyph prev is also supported by the current flt.
858
859 2005-11-08  Kenichi Handa  <handa@m17n.org>
860
861         * m17n-X.c (xft_render): Cancel previous change.
862
863 2005-11-07  Kenichi Handa  <handa@m17n.org>
864
865         * input.c: Include <stdlib.h>.
866         (get_surrounding_text, delete_surrounding_text)
867         (get_preceding_char, get_following_char): New functions.
868         (integer_value): New arg surrounding.  If it is nonzero, try to
869         get a surrounding character.  Callers changed.
870         (take_action_list): Check `value' before setting an element.
871         (destroy_ic): Unref ic_info->preceding_text and
872         ic_info->following_text.
873         (minput__init): Initialize Minput_get_surrounding_text and
874         Minput_delete_surrounding_text.
875         (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
876         variables.
877         (filter): Unref ic_info->preceding_text and
878         ic_info->following_text.
879
880         * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
881         Extern them.
882
883         * input.h (MInputContextInfo): New members preceding_text and
884         following_text.
885
886 2005-11-04  Kenichi Handa  <handa@m17n.org>
887
888         * input.c (parse_nested_list_value): Fix handling of the global
889         definition.
890         (get_nested_list): Get global definitions by load_partial_im_info.
891         (preedit_commit): Set ic->candidates_changed to bitwise or of enum
892         MInputCandidatesChanged.
893         (take_action_list): Likewise.
894         (reset_ic): Likewise.
895         (create_ic): Don't pay special attention to
896         Mcandidates_group_size.
897         (load_partial_im_info): Call mdatabase_find with correct 4th arg.
898         (minput_set_variable): Get a definition of varible by
899         mplist_find_by_value, not mplist_get.
900
901         * m17n.h (enum MInputCandidatesChanged): New enum.
902
903 2005-11-01  Kenichi Handa  <handa@m17n.org>
904
905         * m17n-X.c (xft_render): Check xft_draw's drawable before changing
906         it.
907         (mwin__destroy_window): If xft_draw's drawable is win, change it
908         to device->drawable before destroying win.
909
910 2005-10-31  Kenichi Handa  <handa@m17n.org>
911
912         * input.c (load_im_info): Fix adding of state.
913
914         * m17n-core.c (m17n_fini_core): Fix reporting of module
915         finalization.
916
917         * m17n.c (m17n_fini): Fix reporting of module finalization.
918
919         * m17n-gui.c (m17n_init_win): Fix reporting of module
920         finalization.
921
922 2005-10-29  Kenichi Handa  <handa@m17n.org>
923
924         * input.c (get_candidate_list): Fix the timing of referring plist.
925
926 2005-10-28  Kenichi Handa  <handa@m17n.org>
927
928         * input.c (load_branch): Ignore an undefined map name.
929         (load_im_info): Set im_info->title from `name' only if it's not
930         Mnil.
931         (shift_state): Always update ic->status.
932         (adjust_candidates): Renamed from adjust_candidate_command.
933         Argument changed.  Caller changed.
934         (get_candidate_list, regularize_action): New functions.
935         (take_action_list): Use them.  On handling Munhandle, don't set
936         ic_info->used to 0.
937         (handle_key): If KEY is not handled by MAP, and MAP has
938         branch_actions, perform them.
939
940         * database.c (mdatabase__fini): Free dir_info->filename;
941
942 2005-10-20  Kenichi Handa  <handa@m17n.org>
943
944         * input.c (marker_code): Accept '@@'.
945         (integer_value): Handle '@@'.
946         (parse_action_list): Accept a symbol argument.
947         (take_action_list): Resolve the symbol argument.  Handle the
948         integer argument.
949
950 2005-10-18  Kenichi Handa  <handa@m17n.org>
951
952         * input.c: Include "charset.h".
953         (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
954         variables.
955         (MIMState): New member (M17NObject control).
956         (lookup_nested_list, set_nested_list, parse_nested_list_value)
957         (get_nested_list, resolve_variable): New functions.
958         (integer_value): New arg (MPlist **value).  Set it to the plist
959         element containing the value.
960         (resolve_command): New function.
961         (load_translation): New arg (MPlist *map_actions).
962         (load_branch): New args language and name.  If `keylist' is a
963         symbol, resolved that as a command name.
964         (free_map): New arg top.  Free map->map_actions only if top is
965         nonzero.
966         (free_state): New function.
967         (load_state): New arg name.
968         (im_info_list): New variable.
969         (free_im_info, get_im_info_by_tags): New functions.
970         (load_im_info): Arg key changed to plist.  Handle `include'.
971         Return (MInputMethodInfo *).
972         (preedit_commit): Ref ic->candidate_list.
973         (get_select_charset, adjust_candidate_command): New functions.
974         (take_action_list): Handle `include'.  Adjust candidate action
975         properly.  Handle control variables `candidates-charset' and
976         `candidates-group-size'.
977         (open_im): Use get_im_info.
978         (create_ic): Get global variables.
979         (load_partial_im_info): New function.
980         (get_im_info): New function.
981         (check_command_keyseq, check_command_list, check_variable_list):
982         New functions.
983         (minput__init): Don't handle M_database_hook and Mdetail_text.
984         Initialize M_candidates, Mcandidates_group_size,
985         Mcandidates_charset.
986         (parse_variable_list, get_variable_list, parse_command_list)
987         (get_command_list): Delete them.
988         (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
989         (minput__fini): Simply unref command_list and variable_list.
990         (minput_get_description): Adjusted for the new form of description.
991         (minput_get_commands): Use get_nested_list.
992         (minput_assign_command_keys): Likewise.
993         (minput_get_variables, minput_set_variable): Likewise.
994
995         * input.h (MInputMethodInfo): New members im and maps.
996
997         * database.h (M_database_hook): Delete extern.
998         (MDatabaseHookFunc): Delete extern.
999         (mdatabase__check): Extern it.
1000
1001         * database.c: Include <glob.h>.
1002         (MAX_TIME): New macro.
1003         (Masterisk): New variable.
1004         (get_database_stream): Argument changed to (MDatabaseInfo *).
1005         Callers changed.
1006         (get_dir_info): Renamed from duplicate_dirname.  Callers changed.
1007         (find_database): New function.
1008         (update_database_list): New function.
1009         (mdatabase__init): Initialize Masterisk.  Setup mdb_list by
1010         calling update_database_list.
1011         (mdatabase__check): New function.
1012         (mdatabase_find): Use update_database and find_database.  Don't
1013         handle MDatabaseHookFunc.
1014         (mdatabase_list): Call update_database at first.
1015         (mdatabase_define): Adjusted for the change of mdb->extra_info.
1016         (MDatabaseList): New type.
1017
1018         * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1019
1020         * m17n.h (Mdetail_text): Delete extern.
1021
1022         * m17n-core.h (mplist_conc): Delete extern.
1023
1024         * plist.c (mplist__conc): Renamed from mplist_conc.  Don't ref
1025         tail.
1026         (mplist_conc): Renamed to mplist__conc.
1027         (mplist__pop_unref): New function.
1028
1029 2005-10-14  Kenichi Handa  <handa@m17n.org>
1030
1031         * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1032         newline.
1033         (read_element): If keys is an empty plist, return any element
1034         found first.
1035         (dump_plist_element): Check if plist is nested.
1036         (mplist_conc): Always ref tail.
1037         (mplist_set): If key is a managing key, ref val in advance.
1038
1039         * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1040         (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1041         (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1042         macros.
1043
1044         * fontset.c (free_fontset): Unref fontset_list if necessary.
1045         (mfont__fontset_fini): Don't free fontset_list.  Unref
1046         default_fontset.
1047         (mfont__realize_fontset): Initialize request.
1048         (mfontset): Ref default_fontset or fontset only if necessary.
1049         (mfontset_copy): Don't ref copy.
1050
1051         * draw.c (render_glyphs): Check gend->type before checking
1052         gend->to.
1053
1054         * font-ft.c (mfont__ft_fini): Unref ft_default_list.  Set all
1055         unrefed plists to NULL.
1056
1057 2005-10-04  Kenichi Handa  <handa@m17n.org>
1058
1059         * textprop.c (mtext_serialize): Be sure to make mt
1060         MTEXT_FORMAT_UTF_8 and NULL terminated.
1061
1062         * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1063
1064         * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1065
1066 2005-10-03  Kenichi Handa  <handa@m17n.org>
1067
1068         * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1069         is not at the beginning of line.
1070
1071 2005-09-22  Kenichi Handa  <handa@m17n.org>
1072
1073         * input.c: Include <sys/stat.h> and <unistd.h>.
1074         (Minclude, Mcommit, Munhandle): New variables.
1075         (minput__init): Initialize them.  Push only Mstate to
1076         load_im_info_keys.   Add aliases C-lowercase for C-uppercase.
1077         (parse_action_list): Allow integer arg for undo.  Handle Mcommit
1078         and Munhandle.
1079         (load_input_method): Handle "include" directive.  If no states are
1080         loaded, return -1.
1081         (shift_state): If state_name is Mt, shift back to the previous
1082         state.  Call preedit_commit to commit preedit text.
1083         (preedit_commit): New function.
1084         (take_action_list): Improve debug printing.  Handle commit and
1085         unhandle commands.
1086         (handle_key): Check the return value of take_action_list.  Don't
1087         take branch_actions just after changing to the root map.
1088         (reset_ic): Reset all ic_info members.
1089         (filter): When a key is not handled, just move ic_info->keys
1090         instead fo calling reset_ic.
1091         (load_im_info): If key is not Mstate, push Mmap to
1092         load_im_info_keys.
1093         (MDatabaseStatList): New type.
1094         (imdir_stat_list): New variable.
1095         (input_method_hook): Don't cancel the hook.  Check the
1096         modification time of directories.
1097         (minput__fini): Free imdir_stat_list;
1098
1099         * input.h (MInputContextInfo): New member prev_state.
1100
1101         * m17n-core.h (mplist_conc): Extern it.
1102
1103         * plist.c (mplist_conc): New function.
1104
1105         * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1106
1107         * font.h (MRealizedFont): New member average_width.
1108
1109         * font-ft.c (ft_open): Set rface->average_width.
1110
1111         * font.c (xlfd_unparse_name): Print '*' before registry name.
1112
1113         * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1114         (xfont_open): Set rfont->average_width.
1115         (xft_open): Likewise.
1116         (device_open): Initialize disp_info->AVERAGE_WIDTH.
1117
1118         * internal-gui.h (struct MFrame): New member average_width.
1119
1120         * m17n-gui.c (mframe): Fix setting of frame->rfont.
1121         (mframe_get_prop): Return the average_width of a font.
1122
1123         * face.c (mface__realize): Set rface->average_width.
1124         (mface__update_frame_face): Set frame->average_width.
1125
1126         * face.h (MRealizedFace): New member average_width.
1127
1128 2005-09-19  Kenichi Handa  <handa@m17n.org>
1129
1130         * font.c (xlfd_unparse_name): New arg full_xlfd.
1131         (mfont__encode_char): Use shortcut only for X core fonts.
1132         (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1133         (mfont_put_prop): Handle `language' property.
1134         (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1135         Print file can capability info too.
1136
1137         * m17n-core.c (mdebug__output): New variable.
1138         (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1139         (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1140         (m17n_fini_core): Close mdebug__output if it's not stderr.
1141
1142         * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1143         (xfont_open): Handle baseline_offset.
1144         (xfont_find_metric): Likewise.
1145         (xfont_render): Likewise.
1146         (xft_open): Likewise.
1147         (xft_render): Likewise.
1148
1149         * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1150         (mdebug__output): Extern it.
1151         (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1152         (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1153         (MDEBUG_DUMP): New macro.
1154         (MDEBUG_PRINT_TIME): Print to medebug__output.
1155
1156         * font.h (MRealizedFont): New member baseline_offset.
1157
1158         * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1159         characters.
1160         (fc_weight_table): Add FC_WEIGHT_REGULAR.
1161         (ft_list_family): Check alias.
1162         (ft_list_language): If language is "en", don't try to the second
1163         step.
1164         (ft_default_list): New variable.
1165         (ft_list_default): New function.
1166         (ft_select): If family is not specified, try only the default
1167         fonts.  Treat the weights normal and medium same.
1168         (ft_open): Fix debug message.  If registry is not specified, try
1169         unicode-bmp.  Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1170         (ft_find_metric): Likewise.
1171         (ft_render): Likewise.
1172         (ft_list): Fix debug message.  Accept the registring iso8859-1.
1173         If family is not specified, try only the default fonts.
1174
1175         * face.c (mface__realize): Fix logic of opening a font.
1176
1177 2005-09-16  Kenichi Handa  <handa@m17n.org>
1178
1179         * face.c (mface__realize): 
1180
1181         * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1182         Extern them.
1183
1184         * input.c (shift_state): Fix the condition of taking init actions.
1185         (take_action_list): Fix handling of pushback action.
1186         (handle_key): Don't change key while checking its alias.
1187         (minput__init): Initialize new variables.
1188         (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1189         variables.
1190
1191 2005-09-12  Kenichi Handa  <handa@m17n.org>
1192
1193         * mtext.c (mtext__uppercase): Add proper open/close parens.
1194         (mtext_titlecase): Add proper casting.
1195
1196         * input.c (parse_action_list): Handle the case that the arg is a
1197         key sequence (MText or MPlist).
1198         (take_action_list): Likewise.
1199         (shift_state): Shorter debug message.
1200         (handle_key): Terminate a debug message by "\n".
1201         (reset_ic): Don't take initial actions here.
1202         (minput_open_im): Print a debug message.
1203         (minput_close_im): Likewise.
1204         (minput_create_ic): Likewise.
1205         (minput_destroy_ic): Likewise.
1206
1207 2005-09-09  TAKAHASHI Naoto  <ntakahas@m17n.org>
1208
1209         * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1210         Change API.
1211
1212 2005-09-07  TAKAHASHI Naoto  <ntakahas@m17n.org>
1213         * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1214         mchar__init ().
1215
1216         * character.c: Add Japanese documentation for
1217         mchar_get_prop_table ().
1218
1219 2005-09-06  TAKAHASHI Naoto  <ntakahas@m17n.org>
1220
1221         * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1222         (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1223         (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1224         New variables.
1225         (init_case_conversion): New function.
1226         (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1227         (uppercase_precheck, lowercase_precheck, final_sigma)
1228         (after_soft_dotted, more_above, before_dot, after_i)
1229         (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1230
1231 2005-09-05  TAKAHASHI Naoto  <ntakahas@m17n.org>
1232
1233         * plist.c (read_mtext_element): Fix previous change.
1234
1235 2005-09-05  Kenichi Handa  <handa@m17n.org>
1236
1237         * plist.c (read_mtext_element): Handle \uXXXX notation.
1238
1239         * internal.h (MTABLE_MALLOC): Don't use a local variable.
1240         (MTABLE_ALLOCA): Change the name of local variable.
1241
1242         * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1243         HAVE_FREETYPE are defined.
1244
1245         * m17n-X.c: Check HAVE_X11.
1246
1247         * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1248         directory listing libraries.
1249         (noinst_PROGRAMS): Define it only in maintainer mode.
1250
1251 2005-09-02  Kenichi Handa  <handa@m17n.org>
1252
1253         * m17n-gui.h (mdraw_line_break_option): Extern it.
1254
1255         * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1256         end of the first glyph.
1257         (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1258         them.
1259         (mdraw_line_break_option): New variable.
1260         (mdraw_default_line_break): Use mtext_line_break.
1261
1262         * mtext.h (wordseg_func_table): Don't extern it.
1263         (mtext__wseg_fini): Extern it.
1264
1265         * mtext.c: Don't include word-thai.h.
1266         (wordseg_func_table): Delete this variable.
1267         (mtext__init): Don't initialize above.  Don't call
1268         mtext__word_thai_init.
1269         (mtext__fini): Don't free wordseg_func_table.  Call
1270         mtext__wseg_fini instead fo mtext__word_thai_fini.
1271         (MTextWordsegFunc): Don't typedef it.
1272         (mtext__word_segment): Moved to mtext-wseg.c.
1273
1274         * m17n-core.h (enum MTextLineBreakOption): New enum.
1275         (mtext_line_break): Extern it.
1276
1277         * mtext-wseg.c: New file.
1278
1279         * mtext-lbrk.c: New file.
1280
1281         * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1282         add mtext-lbrk.c and mtext-wseg.c.
1283
1284         * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1285         the case that head is NULL.
1286
1287 2005-09-01  Kenichi Handa  <handa@m17n.org>
1288
1289         * word-thai.c (wordseg_propertize): If the property value is nil,
1290         don't make the property no-merge.
1291         (thai_wordseg): Don't require *from and *to are set a priori.  Pay
1292         attention to the case that they are NULL.
1293         (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1294         with two spaces.
1295
1296         * character.c (mchar_get_prop_table): New function.
1297
1298         * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1299
1300         * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1301         (mchar_get_prop_table): Extern it.
1302
1303         * textprop.c (prepare_to_modify): New arg deleting.  Callers changed.
1304         (mtext__adjust_plist_for_change): Argument changed.  Callers changed.
1305
1306         * internal.h (enum MTextCoverage): New enum.
1307         (MText): New member coverage.
1308
1309         * mtext.c (FORMAT_COVERAGE): New macro.
1310         (insert): Copy mt2->coverage.
1311         (mtext__from_data): Initialize mt->coverage.
1312         (mtext__adjust_format): Update mt->coverage.
1313         (mtext): Initialize mt->coverage.
1314         (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1315         Update mt->coverage if necessary.
1316         (mtext_duplicate): Copy mt->coverage.
1317         (mtext_insert, mtext_replace): New functions.
1318         (mtext_dup): Use mtext_duplicate.
1319         (mtext__word_segment): Don't set *from and *to if a word
1320         segmentation funcion is not found.
1321         (mtext_ins_char): Fix typo.
1322
1323 2005-08-25  Kenichi Handa  <handa@m17n.org>
1324
1325         * font.h (MFont): New member for_full_width.
1326
1327         * font.c (compare_font_score): Prefer a font of not
1328         for_full_width.
1329
1330         * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1331         registry charset of a font is one of CJK charsets.
1332
1333         * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1334         supports some of CJK.
1335
1336 2005-08-24  Kenichi Handa  <handa@m17n.org>
1337
1338         * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1339
1340         * m17n-gui.c (null_device_open): Check Mresolution param and set
1341         frame->dpi.
1342
1343         * m17n-gd.c (device_open): Check Mresolution param and set
1344         frame->dpi.
1345
1346         * m17n-X.c (MWDevice): New member resy.
1347         (xfont_open): Set ascent, descent, and max_advance members of
1348         rfont.
1349         (xft_open): Likewise.
1350         (device_open): Compare also screen_num to find a device.  Set
1351         device->resy and frame->dpi.
1352
1353         * internal-gui.h (MFrame): New member dpi.
1354
1355         * font.h (MRealizedFont): New member max_advance.
1356
1357         * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1358         (mfont__init): Don't initialize Mascent, Mdescent.
1359         (Mascent, Mdescent): Delete these variables.
1360         (mfont_get_prop): Fix previous change.  Check Mfont_ascent and
1361         Mfont_descent instead of Mascent and Mdescent.
1362         (mfont_put_prop): Allow negative size.
1363         (mfont_find): Handle the case of spec->size < 0.  Fix previous
1364         change.
1365         (mfont_list): Handle the case of spec->size < 0.
1366         (mfont_check): Likewise.
1367
1368         * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1369         (fc_get_pattern): Handle the case of font->size < 0.
1370         (ft_open): Set ascent, descent, and max_advance members of rfont.
1371         (ft_find_metric): Improve rounding.
1372         (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1373         FC_SIZE.
1374
1375         * face.c (mface__realize): Handle the case of font->size < 0.
1376
1377 2005-08-22  Kenichi Handa  <handa@m17n.org>
1378
1379         * coding.c (MConverterStatus): Change the member buf to union.
1380         (mconv_buffer_converter): Add const to the arg buf.
1381         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1382         (mconv_decode): Adjusted for the change of MConverterStatus.
1383         (mconv_encode_range): Likewise.
1384
1385         * m17n.h (mconv_buffer_converter): Prototype adjusted.
1386         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1387
1388 2005-08-20  Kenichi Handa  <handa@m17n.org>
1389
1390         * m17n-gui.h (mfont_from_name): Prototype adjusted.
1391         (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1392
1393         * m17n-X.c (xfont_open): Set members ascent, descent, and
1394         max_advance of rfont.
1395         (xft_open): Likewise.
1396
1397         * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1398         of rfont.
1399         (mfont__ft_parse_name): Add const to the arg name.
1400
1401         * font.c (xlfd_parse_name): Add const to the arg name.  Call
1402         mfont__set_property instead of mfont_set_spec.  Set font->spacing.
1403         (xlfd_unparse_name): Handle spacing.
1404         (mfont__init): Initialize new variables.
1405         (mfont__id): Handle spacing.
1406         (mfont__merge): Likewise.
1407         (mfont__set_spec): This function deleted.
1408         (mfont__parse_name_into_font): Add const to the arg name.  Fix the
1409         condition of calling mfont__ft_parse_name.
1410         (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1411         (mfont_get_prop): Handle properties spacing, ascent, descent,
1412         and max-advance.
1413         (mfont_find): Return a realized font.
1414         (mfont_from_name): Add const to the arg name.
1415
1416         * font.h (enum MFontProperty): New member MFONT_SPACING.
1417         (enum MFontSpacing): New enum.
1418         (MFont): New members spacing and max_advance.
1419         (mfont__ft_parse_name): Prototype adjusted.
1420         (mfont__set_spec): Extern deleted.
1421         (mfont__parse_name_into_font): Prototype adjusted.
1422
1423 2005-08-19  Kenichi Handa  <handa@m17n.org>
1424
1425         * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1426
1427         * font.c (mfont_list): If FONT is null, use a temporary font.
1428         (mfont_parse_name): Add const to the arg name.
1429
1430 2005-08-18  Kenichi Handa  <handa@m17n.org>
1431
1432         * word-thai.c: Surround code by #ifdef and #endif to escape from
1433         doxygen.
1434
1435         * font-ft.c: Mostly re-written.
1436
1437         * font-flt.c (FontLayoutCmdOTF): This type deleted.
1438         (FontLayoutCmd): Type of the member otf changed..
1439         (load_otf_command): Adjusted for the format change of otf command.
1440         (load_command): Likewise.
1441         (free_flt_command): Unref cmd->body.otf.
1442         (run_otf): Ajusted for the type change of otf_cmd.
1443         (run_command): Ajusted for the type change of otf_cmd.  On
1444         debugging, print ctx->combining_code.
1445         (mfont__flt_run): Initialize ctx's members code_offset,
1446         combining_code, and left_padding to 0.
1447
1448         * face.h (struct MRealizedFace): New member font.
1449         (mface__realize): Prototype adjusted.
1450
1451         * face.c (find_realized_face): New arg font.
1452         (find_realized_face): Adjusted for the change of MFont.
1453         (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1454         (mface__fini): Don't call mdebug__report_object.
1455         (mface__realize): New arg font.
1456         (mface__for_chars): Adjusted for the change of mfont__encode_char.
1457         Optimize the latin case.
1458         (mface__free_realized): Free rface->font.
1459         (mface__update_frame_face): Adjusted for the change of mface__realize.
1460         (mface_equal): New function.
1461
1462         * draw.c (Mcommon): New variable.
1463         (visual_order): Args to mfont__encode_char changed.
1464         (compose_glyph_string): Handle Mfont text property.
1465         (layout_glyphs): Adjusted for the change of MFont.
1466         (mdraw__init): Initialize Mcommon.
1467         (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1468
1469         * font.h (enum MFontType): Members completely changed.
1470         (enum MFontProperty): Move MFONT_SIZE to the tail.
1471         (enum MFontSource): New enum.
1472         (struct MFont): New members type, source, sizes, file, capability,
1473         and encoding.
1474         (struct MRealizedFont): Type of member font changed. Members
1475         score, status, and encoding deleted.
1476         (MFontScore): New type.
1477         (MFontList): Member changed.
1478         (struct MFontDriver): New member has_char.  Types of members
1479         changed.
1480         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1481         (Mapple_roman): Extern them.
1482         (OTF_Tag): Typedefed if not HAVE_OTF.
1483         (enum MFontOpenTypeTable): New enum.
1484         (MFontCapability): New type.
1485         (mfont__ft_drive_otf): Prototype adjusted.
1486         (mfont__score): Extern deleted.
1487         (mfont__merge): Extern it.
1488         (mfont__has_char): Extern it.
1489         (mfont__encode_char): Prototype adjusted.
1490         (mfont__open): Extern it.
1491         (mfont__set_spec): Prototype adjusted.
1492         (mfont__get_capability): Extern it.
1493
1494         * font.c: Include "fontset.h".
1495         (M_font_capability, M_font_list, M_font_list_len): New variables.
1496         (font_score_priority): Change order of initial elements.
1497         (font_score_shift_bits): Fix array size.
1498         (common_weight): Add "thin", "semibold", and "heavy".
1499         (common_stretch): Add "ultracondensed", "extracondensed",
1500         "extraexpanded", and "utltraexpand".
1501         (font_weight_regular, font_weight_normal, font_weight_medium): New
1502         variables.
1503         (gen_font_name): This function deleted.
1504         (find_encoding): Set font->encoding.
1505         (OTF_tag): New function.
1506         (otf_script_list): New variable.
1507         (load_otf_script_list): New function.
1508         (find_script_from_otf_tag): New function.
1509         (xlfd_parse_name): Set font->type and font->source.
1510         (mfont__free_realized): Free chains rfonts.
1511         (font_score): Renamed from mfont__score.
1512         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1513         (Mapple_roman): New variables.
1514         (mfont__init): Initilize new variables.  Initalize
1515         default_encoding.encoding_name and
1516         default_encoding.encoding_charset to Municode_full and
1517         mcharset__unicode.  Use SAFE* macros for allocating filepath
1518         buffer.
1519         (mfont__fini): Free otf_script_list.
1520         (mfont__id): New function.
1521         (mfont__match_p): Check also capability member of MFont.
1522         (mfont__merge): New funciton.
1523         (mfont__set_spec_from_face): Set type and source members.
1524         (mfont__set_spec_from_plist): Set capability and type members.
1525         (mfont__select): Argument changed.
1526         (mfont__available): New function.
1527         (compare_font_score): New function.
1528         (mfont__list): New function.
1529         (mfont__open): Return a realized font.
1530         (mfont__resize): Adjusted for the change of MFont.
1531         (mfont__has_char): New function.
1532         (mfont__encode_char): Argument changed.
1533         (mfont__set_spec): Argument changed.
1534         (free_font_capability): New function.
1535         (mfont__get_capability): New function.
1536         (MFontfile): New variable.
1537         (mfont_get_prop): Adjusted for the change of MFont.
1538         (mfont_put_prop): Likewise.
1539         (mfont_set_selection_priority): Fix the way of setting
1540         font_score_priority[].
1541         (mfont_find): Use mfont__list instead of mfont__select.
1542         (mfont_resize_ratio): Adjusted for the change of MFont.
1543         (mfont_list): Use mfont__list.
1544         (mfont_check): New function.
1545         (font_score): Make it static.
1546
1547         * fontset.h (mfont__realize_fontset): Prototype adjusted.
1548         (mfont__lookup_fontset): Likewise.
1549
1550         * fontset.c (struct MFontset): Delete member font_spec_list.
1551         (struct MRealizedFontset): Type of member spec changed.  New
1552         member request.
1553         (load_font_group): Arg spec_list deleted.
1554         (load_fontset_contents): Adjusted for the change of fontset_def.
1555         (free_fontset): Fix the way of freeing fontset elements.
1556         (realize_fontset_elements): Argument changed.
1557         (get_per_script): New function.
1558         (free_realized_fontset_elements): Fix the way of feeing rfontset
1559         elements.
1560         (update_fontset_elements): Fix args to realize_fontset_elements.
1561         (mfont__realize_fontset): New arg spec.
1562         (try_font_list): New function.
1563         (try_font_group): New arg request.  Use try_font_list.
1564         (mfont__lookup_fontset): New arg ignore_fallback.  Fix arg to
1565         try_font_group.
1566         (mfontset): Adjusted for the change of MFontset.
1567         (mfontset_copy): Likewise.  Don't share plists.
1568         (mfontset_modify_entry): Adjusted for the change of MFontset.
1569         (mfontset_lookup): Call get_per_script.
1570         (mdebug_dump_fontset): Print also the address of fonts.
1571
1572         * input.c (shift_state): Don't reset ic_info->vars.
1573         (take_action_list): Call MDEBUG_PRINT fore calling
1574         take_action_list.
1575
1576         * internal-gui.h (MFontDriver): Don't typedef it here.
1577
1578         * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1579         (MXFont): This type deleted.
1580         (MFontX): New type.
1581         (struct _MFontX): New struct.
1582         (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1583         (MDisplayInfo): Member base_font_list deleted.
1584         (DEFAULT_FONT): Definition changed.
1585         (FALLBACK_FONT): This maclr deleted.
1586         (free_display_info): Adjusted for the change of MDisplayInfo.
1587         (free_device): Argument to mfont__free_realized changed.
1588         (xfont_driver): Adjusted for the change of MFontDriver.
1589         (xfont_registry_list): Use MFontX instead of MXFont.
1590         (MRealizedFontX): Renamed from MXFontInfo.
1591         (xfont_select): Return the font found first.
1592         (close_xfont): Change MXFontInfo to MRealizedFontX.
1593         (xfont_open): Return the realized font.
1594         (xfont_find_metric): Get xfont from rfont->fontp.
1595         (xfont_has_char): New function.
1596         (xfont_encode_char): Adjusted for the argument change.
1597         (xfont_render): Get xfont from rfont->fontp.
1598         (xfont_list): Adjusted for the argument change.
1599         (MRealizedFontXft): Renamed from MXftFontInfo.
1600         (xft_driver): Ajusted for the change of MFontDriver.
1601         (close_xft): Change MXtfFontInfo to MRealizedFontXft
1602         (xft_open_font): Argument changed.
1603         (xft_open): Argument changed.  Return the realized font.
1604         (xft_find_metric): Get xft_font from rfont->fontp.
1605         (xft_has_char, xft_encode_char): New functions.
1606         (xft_render): Change MXftFontInfo to MRealizedFontXft.  Open a
1607         font if not yet opened.
1608         (device_open): Don't set frame->font.
1609
1610         * m17n-gd.c (gd_font_driver): Adjusted for the change of
1611         MFontDriver.
1612         (gd_font_open): New function.
1613         (gd_render): Don't use the local variable ft_info.
1614         (device_init): Adjusted for the change of gd_font_driver.
1615
1616         * textprop.c (mtext__prop_init): Initialize text_property_table.
1617         Call M17N_OBJECT_ADD_ARRAY.
1618         (mtext__prop_fini): Don't call mdebug__report_object.
1619
1620         * plist.c (mplist__init): Initialize plist_table.
1621         (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1622         (mplist__fini): Don't call mdebug__report_object.
1623
1624         * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1625         (mtext__fini): Don't call mdebug__report_object.
1626         (MTEXT_FORMAT_UTF_16): Correct type.
1627         (mtext_data): New function.
1628         (mtext_text): Fix calculation of limit and args to
1629         find_char_backward.
1630
1631         * language.c: Include "plist.h".
1632         (M_script_lang_list): New variable.
1633         (mlang__init): Read languages and their information from m17n
1634         database.
1635         (mlanguage__list): New function.
1636         (Miso639_1, Miso639_2): New variables.
1637
1638         * language.h (mlanguage__list): Extern it.
1639
1640         * database.c (get_database_stream): Use SAFE_* macros for
1641         allocating and freeing path.
1642         (mdatabase__init): Likewise.
1643
1644         * symbol.c (msymbol__fini): Don't free symbols here.
1645         (msymbol__free_table): New function.
1646         (msymbol_is_managing_key): New function.
1647
1648         * symbol.h (msymbol__free_table): Extern it.
1649         (msymbol__list): Extern it.
1650
1651         * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1652         New macros.
1653         (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1654         (struct _M17NObjectArray): New member name and next.
1655         (mdebug__add_object_array): Extern it.
1656         (M17N_OBJECT_ADD_ARRAY): New macro.
1657         (mdebug__report_object): Don't extern it.
1658
1659         * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1660
1661         * m17n-gui.c (free_frame): Don't free frame->font.
1662         (null_device_fini): Fix code for freeing
1663         null_device.realized_font_list.
1664         (m17n_fini_win): Free interface.
1665         (mframe): Cast the return value of dlsym.  Set frame->font here.
1666         (mframe_get_prop): Check frame->rface->rfont before accessing the
1667         member font.
1668
1669         * m17n-gui.h (Mfontfile): Extern it.
1670         (mfont_check): Extern it.
1671         (mface_equal): Extern it.
1672
1673         * m17n-core.c: Include "symbol.h".
1674         (report_header_printed): This variable deleted.
1675         (object_array_root): New variable.
1676         (report_object_array): New function.
1677         (mdebug__report_object): This function deleted.
1678         (mdebug__add_object_array): New function.
1679         (m17n_init_core): Call mchartable_init () before mtext_init ().
1680         (m17n_fini_core): Call report_object_array (if necessary) and
1681         msymbol__free_atable at the end.
1682
1683         * m17n-core.h (msymbol_is_managing_key): Extern it.
1684         (mtext_data): Extern it.
1685         (MTEXT_FORMAT_UTF_16): Correct type.
1686         (M17NLIB_MINOR_VERSION): Changed to 3.
1687         (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1688         
1689         * chartab.c (mchartable__init): Initalize chartable_table.count.
1690         (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1691         mdebug__report_object.
1692
1693 2005-05-26  Kenichi Handa  <handa@m17n.org>
1694
1695         * m17n.h (Miso639_1, Miso639_2): Extern them.
1696
1697         * symbol.h (msymbol__list): Extern it.
1698
1699         * symbol.c (msymbol__list): New function.
1700
1701 2005-05-19  Kenichi Handa  <handa@m17n.org>
1702
1703         * input-gui.c (minput__win_init): Don't change the value of
1704         minput_driver.
1705
1706 2005-05-16  Kenichi Handa  <handa@m17n.org>
1707
1708         * m17n-core.c (m17n_object): Be sure to initialize all members.
1709
1710         * font-ft.c (fc_decode_prop): Fix args to msymbol.
1711
1712 2005-05-09  Kenichi Handa  <handa@m17n.org>
1713
1714         * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1715
1716 2005-04-27  Kenichi Handa  <handa@m17n.org>
1717
1718         * language.c (mlang__init): Add "an" (Aragonese).
1719
1720         * word-thai.c: Add support for libthai.
1721         (mtext__word_thai_init): Initialize wordseg library conditionaly.
1722         (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1723
1724         * mtext.c: Include "word-thai.h" conditionaly.
1725         (mtext__init): Call mtext__word_thai_init conditionaly.
1726         (mtext__fini): Call mtext__word_thai_fini conditionaly.
1727
1728         * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1729         not WORDCUT_LD_FLAGS.
1730
1731 2005-04-19  Kenichi Handa  <handa@m17n.org>
1732
1733         * word-thai.c (wordseg_propertize): Always unref the attached
1734         property.
1735         (thai_wordseg): Don't unref the property.
1736
1737 2005-04-18  Kenichi Handa  <handa@m17n.org>
1738
1739         * word-thai.c: Include stdlib.h.
1740         (wordseg_propertize): Add dummy function for the case that wordcut
1741         library doesn't exist.
1742         (wordseg_propertize): Fix for old wordcut library.
1743
1744 2005-04-16  Kenichi Handa  <handa@m17n.org>
1745
1746         * word-thai.c: Include <stdio.h>.
1747
1748 2005-04-15  Kenichi Handa  <handa@m17n.org>
1749
1750         * draw.c: Include mtext.h.
1751         (linebreak_table, M_break_at_space, M_break_at_word)
1752         (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1753         (compose_glyph_string): Check POS before getting Mface text
1754         property.
1755         (truncate_gstring): Give correct TO arg to line_break function.
1756         (GET_LB_TYPE): New macro.
1757         (find_break_backward, find_break_forward): New functions.
1758         (mdraw__init): Initialize the above new variables.
1759         (mdraw__fini): Free linebreak_table.
1760         (mdraw_default_line_break): Use find_break_backward and
1761         find_break_forward.
1762
1763         * word-thai.c: New file.
1764
1765         * word-thai.h: New file.
1766
1767         * mtext.c: Include word-thai.h.
1768         (wordseg_func_table): New variable.
1769         (mtext__init): Initialize wordseg_func_table and call
1770         mtext__word_thai_init.
1771         (mtext__fini): Call mtext__word_thai_fini, free
1772         wordseg_func_table.
1773         (MTextWordsegFunc): New type.
1774         (mtext__word_segment): New function.
1775
1776         * mtext.h (wordseg_func_table): Extern it.
1777         (mtext__word_segment): Extern it.
1778
1779         * m17n.c (m17n_init): Fix typo (== -> =).
1780
1781         * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1782         (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1783
1784         * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1785         (MTEXTPROP_VAL): New macros.
1786
1787         * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1788
1789 2005-04-07  Kenichi Handa  <handa@m17n.org>
1790
1791         * database.c (load_chartable): Fix pursing of symbol name.
1792
1793 2005-03-24  Kenichi Handa  <handa@m17n.org>
1794
1795         * m17n.c (m17n_init): Fix typo (== -> =).
1796
1797 2005-03-11  Kenichi Handa  <handa@m17n.org>
1798
1799         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1800
1801         * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1802
1803         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1804         first.
1805
1806 2005-03-09  handa  <handa@m17n.org>
1807
1808         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1809         calling m17n_init ().
1810
1811         * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1812         calling m17n_init_core ().
1813
1814 2005-02-28  Kenichi Handa  <handa@m17n.org>
1815
1816         * font-flt.c (mfont__flt_run): Add resulting code sequence in
1817         debug info.
1818
1819 2005-02-17  Kenichi Handa  <handa@m17n.org>
1820
1821         * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1822         (M_description, M_command, M_variable): New variables.
1823         (load_im_info_keys): New variables.
1824         (load_im_info, check_command_keyseq, get_description_advance)
1825         (parse_command_list, get_command_list, parse_variable_list)
1826         (get_variable_list, input_method_hook): New functions.
1827         (command_list, variable_list): New variables.
1828         (minput__init): Put input_method_hook to Minput_method.
1829         Initialize M_description, M_command, M_variable, Mdetail_text,
1830         load_im_info_keys, command_list, variable_list.
1831         (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1832         (Mdetail_text): New variable.
1833         (minput_get_description, minput_get_commands)
1834         (minput_assign_command_keys, minput_get_variables)
1835         (minput_set_variable): New functions.
1836
1837         * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1838         (minput_assign_command_keys, minput_get_variables)
1839         (minput_set_variable): Extern them.
1840
1841         * plist.c (UNGETC): Just decrement st->p.
1842         (read_mtext_element): New arg skip.
1843         (read_integer_element): Likewise.
1844         (read_symbol_element): Likewise.
1845         (read_element): New arg KEYS.
1846         (mplist__from_plist): Don't increment ref-count of NULL object.
1847         (mplist__from_file): New arg KEYS.
1848         (mplist_put): Don't increment ref-count of NULL object.
1849         (mplist_add): Likewise.
1850         (mplist_push): Likewise.
1851         (mplist_set): Likewise.  Call M17N_OBJECT_UNREF unconditionally.
1852
1853         * plist.h (mplist__from_file): Prototype adjusted.
1854
1855         * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1856         (get_database_stream): New function.
1857         (load_database): Use get_database_stream.
1858         (M_database_hook): New variable
1859         (mdatabase__init): Initialize M_database_hook.
1860         (mdatabase__load_for_keys): New function.
1861         (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1862         function.
1863         (mdatabase_define): Free mdb->extra_info if necessary.
1864
1865         * database.h (mdatabase__dir_list, M_database_hook)
1866         (mdatabase__load_for_keys): Extern them.
1867         (MDatabaseHookFunc): New type.
1868
1869         * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1870
1871 2004-12-27  Kenichi Handa  <handa@m17n.org>
1872
1873         * Version 1.2.0 released.
1874
1875 2004-12-27  Kenichi Handa  <handa@m17n.org>
1876
1877         * input.c (minput_filter): Don't reset ic->xxx_changed.
1878
1879         * mtext.c (mtext_from_data): Fix documentation.
1880
1881 2004-12-25  Kenichi Handa  <handa@m17n.org>
1882
1883         * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1884         (M17NLIB_VERSION_NAME): Update to "1.2.".
1885
1886 2004-12-24  Kenichi Handa  <handa@m17n.org>
1887
1888         * input.c (reset_ic): Set key_unhandled to 0.
1889
1890 2004-12-21  Kenichi Handa  <handa@m17n.org>
1891
1892         * m17n-gui.h (mfont_from_spec): Delete extern.
1893
1894         * input-gui.c (win_callback): Handle Minput_reset.
1895         (minput__win_init): Register reset_ic as a callback for
1896         Minput_reset.
1897
1898         * input.c (reset_ic): New arg IGNORE which is ignored.  Caller
1899         changed.  At first, shift to the initial state.
1900         (minput__init): Initialize Minput_reset.  Register reset_ic as a
1901         callback for Minput_reset.
1902         (Minput_reset): New variable.
1903         (minput_filter): Always set ic->xxx_changed to 0.
1904         (minput_reset_ic): New function.
1905         (integer_value): Fix typo ('>' -> '<') and calculation of length
1906         of preedit text.
1907
1908         * m17n-core.c (merror_code): Change type to `int'.
1909
1910         * m17n-misc.h (merror_code): Adjust type.
1911
1912         * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1913
1914         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1915         (mtext_change_prop): Delete extern.
1916
1917         * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1918         to `int'.  Move the documents to m17n-core.h.
1919
1920 2004-12-13  Kenichi Handa  <handa@m17n.org>
1921
1922         * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1923         (MTextProperty): Document it.
1924
1925 2004-12-09  Kenichi Handa  <handa@m17n.org>
1926
1927         * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1928
1929 2004-12-03  Kenichi Handa  <handa@m17n.org>
1930
1931         * internal.h (m17n__core_initialized, m17n__shell_initialized,
1932         m17n__gui_initialized): New externs.
1933
1934         * m17n-core.h (enum M17NStatus): New enum.
1935         (m17n_status): Extern it.
1936
1937         * m17n-core.c (core_initialized): Delete this variable.
1938         (m17n__core_initialized, m17n__shell_initialized,
1939         m17n__gui_initialized): New variables.
1940         (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1941         instead of core_initialized.
1942         (m17n_status): New function.
1943
1944         * m17n.c (shell_initialized): Delete this variable.
1945         (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1946         shell_initialized.
1947
1948         * m17n-gui.h (m17n_init_win): Adjust the prototype.
1949
1950         * m17n-gui.c (win_initialized): Delete this variable.
1951         (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1952         instead of gui_initialized.
1953
1954 2004-11-19  Kenichi Handa  <handa@m17n.org>
1955
1956         * input.c (reset_ic): Check if ic_info->state is NULL.
1957         (filter): If ic_info->state is NULL, return 0.
1958         (load_input_method): Don't unref `maps' it it's not created.
1959
1960 2004-11-15  Kenichi Handa  <handa@m17n.org>
1961
1962         * input.c (find_candidates_group): If INDEX is -1, find the last
1963         candidate group.
1964         (take_action_list): If the previous of the first candidate is
1965         requested, select the last candidate.
1966
1967 2004-11-08  Kenichi Handa  <handa@m17n.org>
1968
1969         * m17n-X.c (device_open): Try at most 32 fonts to find a
1970         non-autoscaled font.
1971
1972         * font.c (xlfd_parse_name): Fix previous change.
1973
1974 2004-11-05  Kenichi Handa  <handa@m17n.org>
1975
1976         * font.c: (commont_style): Include dummy elements "slanted" and
1977         "rslanted" to prefer "o" to "r" if "i" is requested.
1978
1979         * font-ft.c (ft_to_prop): Fix "oblique" entry.
1980
1981 2004-10-29  Kenichi Handa  <handa@m17n.org>
1982
1983         * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1984
1985         * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1986         New members smallest and larger.
1987         (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1988         (xfont_registry_list): Likewise.
1989         (xfont_select): Likewise.
1990         
1991
1992 2004-10-28  Kenichi Handa  <handa@m17n.org>
1993
1994         * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1995         font name comparison.
1996         (xfont_select): Fix logic for selecting a larger size font.
1997
1998 2004-10-25  Kenichi Handa  <handa@m17n.org>
1999
2000         * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2001         ">" actions.
2002
2003 2004-10-22  Kenichi Handa  <handa@m17n.org>
2004
2005         * input.c (update_candidate): Renamed from udpate_candidate.
2006         (take_action_list): Show more debugging info on arithmetic commands.
2007
2008         * m17n-X.c (device_open): Fix previous change.
2009
2010         * draw.c (compose_glyph_string): Don't get face property at the
2011         end of M-text.
2012
2013 2004-10-21  Kenichi Handa  <handa@m17n.org>
2014
2015         * draw.c (compose_glyph_string): Fix for the case of category
2016         being Mnil.
2017
2018 2004-10-19  Kenichi Handa  <handa@m17n.org>
2019
2020         * input.c (mdebug_mask): New variable.
2021         (shift_state): Print debug information.
2022         (take_action_list): Likewise.
2023         (handle_key): Likewise.
2024
2025 2004-10-14  Kenichi Handa  <handa@m17n.org>
2026
2027         * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2028
2029 2004-10-13  Kenichi Handa  <handa@m17n.org>
2030
2031         * m17n-X.c (device_open): Be sure to register at least one font
2032         driver.
2033
2034         * font-ft.c: Include <freetype/ftbdf.h> conditionally.  Check
2035         HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2036
2037 2004-10-12  Kenichi Handa  <handa@m17n.org>
2038
2039         * draw.c (alloc_gstring): Fix previous change.
2040
2041         * font-ft.c (ft_list_generic): Fix for the case of not
2042         HAVE_FONTCONFIG.
2043
2044         * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2045
2046         * font.c (mfont_list): If no font is found, return NULL.
2047         (load_font_encoding_table): Put entries of nil registry first.
2048         (find_encoding): Adjust for the above change.
2049
2050 2004-10-11  Kenichi Handa  <handa@m17n.org>
2051
2052         * m17n-gui.h (mfont_list): Adjust prototype.
2053
2054         * m17n-X.c (xfont_list): New arg maxnum.
2055
2056         * font.h (struct MFontDriver): Change prototype of <list>.
2057
2058         * font-ft.c (fc_generic_family_list): Delete it.
2059         (Mserif, Msans_serif, Mmonospace): Delete them.
2060         (M_generic_family_info): New variable.
2061         (enum GenericFamilyType): New enum.
2062         (struct GenericFamilyInfo): New struct.
2063         (generic_family_table): New variable.
2064         (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2065         iso8859-1.
2066         (add_font_info): Get style here.
2067         (ft_list_family): Don't initialize fc_config here.  Don't list
2068         generic families.
2069         (ft_list_generic): New function.
2070         (ft_select): Pay attention to generic familes here.
2071         (ft_open): Fix calculation of ascent and descent.
2072         (ft_list): Pay attention to generic families.
2073         (mfont__ft_init): Initialize M_generic_family_info,
2074         generic_family_table, and fc_config..
2075         (mfont__ft_fini): Finalize generic_family_table.
2076
2077         * draw.c (compose_glyph_string): Use more constant font for
2078         glyphs.  Adjust for the member change in MGlyph.
2079         (layout_glyph_string): Adjust for the member change in MGlyph.
2080         (alloc_gstring): Intilize scracth_glyph to avoid
2081         compose_glyph_string on it.
2082         (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2083         (mdraw_coordinates_position): Fix previous change.
2084
2085         * internal-gui.h (glyph_category): New enum.
2086         (MGlyph): Change type of <category> to enum glyph_category.
2087
2088         * face.c (mface__realize): Delete args langauge and charset.
2089         (mface__for_chars): Fix for the case that glyphs have different
2090         rfaces.
2091         (mface__update_frame_face): Adjust for mface__realize change.
2092
2093         * face.h (mface__realize): Adjust prototype.
2094
2095 2004-10-05  Kenichi Handa  <handa@m17n.org>
2096
2097         * language.c (mlang__init): Add Akan.
2098
2099 2004-10-04  Kenichi Handa  <handa@m17n.org>
2100
2101         * font-ft.c (add_font_info): Add instead of push the element.
2102         (ft_list_family): For generic fonts, try all
2103         substituted. families.
2104
2105         * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2106         (run_rule): Don't update cluster range here.
2107         (run_command): Update cluster range on appending a glyph.
2108         (run_otf): Update cluster range for glyphs generated by OTF.
2109
2110 2004-10-02  Kenichi Handa  <handa@m17n.org>
2111
2112         * m17n-X.c (device_open): Handle Mfont key in PLIST.
2113
2114 2004-09-30  Kenichi Handa  <handa@m17n.org>
2115
2116         * font-ft.c (ft_select): Ignore family on calling mfont__score.
2117
2118 2004-09-30  Kenichi Handa  <handa@m17n.org>
2119
2120         * font.h: Include <fontconfig/fontconfig.h>.
2121         (MFTInfo): New member langset.
2122         (mfont__encoding_list): Extern it.
2123
2124         * font.c (mfont__encoding_list): New function.
2125         (mdebug_dump_font_list): New function.
2126
2127         * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2128         (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2129         variables.
2130         (ft_family_list): New variable.
2131         (set_font_info): New arg basep.  Callers changed.
2132         (fc_list): Check the return value of FcPatternGetString.
2133         (add_font_info): New arg plist.  Callers changed. Update
2134         ft_family_list.
2135         (ft_list_family): New function (merged fc_list and ft_list_all).
2136         (ft_select): Use ft_list_family.
2137         (ft_list): Likewise.  If FONT is not NULL, check all fonts.  Fix
2138         typo (== -> !=).
2139         (mfont__ft_init): Initialize above new variables.
2140         (mfont__ft_fini): Free ft_family_list.
2141         (STRDUP_LOWER): New macro.
2142         (set_font_info): Use STRDUP_LOWER.
2143         (ft_list_family): Avoid duplicate addition of font path.  Use
2144         STRDUP_LOWER.
2145         (fc_decode_prop): Fix typo.
2146
2147         * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2148         (xfont_registry_list): Change argument disp_info to frame.
2149         Callers changed.
2150         (xfont_list_all): New function.
2151         (xfont_list): If FONT is not NULL, check all fonts.
2152
2153 2004-09-28  Kenichi Handa  <handa@m17n.org>
2154
2155         * m17n-X.c (MXFont, MXFontList): New types.
2156         (MDisplayInfo): Delete members font_registry_list,
2157         iso8859_1_family_list, iso10646_1_family_list, new members
2158         font_list, base_font_list.
2159         (free_display_info): Adusted for the change of MDisplayInfo.
2160         (xfont_driver): Initialize with xfont_list.
2161         (font_compare): New function.
2162         (build_font_list): Deleted.
2163         (xfont_registry_list): New function.
2164         (xfont_select): Use xfont_registry_list.
2165         (xfont_list): New function.
2166         (device_open): Adusted for the change of MDisplayInfo.
2167
2168         * font-ft.c (add_font_info): New arg languages.  Callers changed.
2169         (fc_list): Get languages from fonts..
2170         (ft_list_all): Renamed from ft_list.  Callers changed.
2171         (ft_list): New function.
2172         (mfont__ft_driver): Initalize with ft_list.
2173
2174         * font.c (mfont_list): New function.
2175
2176         * font.h (struct MFontDriver): New member `list'.
2177         (MFTInfo): New member languages.
2178
2179         * m17n-gui.h (mfont_list): Extern it.
2180
2181 2004-09-27  Kenichi Handa  <handa@m17n.org>
2182
2183         * internal-gui.h (struct MGlyphString): Delete members mt,
2184         sub_width, sub_lbrearing, sub_rbearing, and region.
2185
2186         * draw.c (MSubTextExtents): New type.
2187         (layout_glyphs): New arg extents.  Set its members.
2188         (layout_glyph_string): Adjusted for the above change.
2189         (alloc_gstring): Don't set gstring->mt.
2190         (truncate_gstring): Call line_break function with mt instead of
2191         gstring->mt.
2192
2193 2004-09-22  Kenichi Handa  <handa@m17n.org>
2194
2195         * mtext.c (count_utf_16_chars): Count each code of invalid
2196         surrogates as one.
2197
2198 2004-09-19  Kenichi Handa  <handa@m17n.org>
2199
2200         * mtext.c (default_utf_16, default_utf_32): Rename them to
2201         MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively.  Caller
2202         changed.
2203
2204         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2205         them.
2206
2207 2004-09-13  Kenichi Handa  <handa@m17n.org>
2208
2209         * draw.c (Mlatin): Don't declare it here.
2210         (visual_order): Fix reordering of combining characters.
2211         (compose_glyph_string): Fix detection of script.
2212         (layout_glyphs): Don't fix reordering of combining characters
2213         here.
2214         (layout_glyph_string): Pay attention to
2215         control->disable_overlapping_adjustment.
2216         (truncate_gstring): Include at least on character in a line.
2217         (get_gstring): Always scan one full line.
2218         (mdraw__init): Don't initialize Mlatin here.
2219         (mdraw_text_per_char_extents): Fix iteration.  If a glyph doesn't
2220         have a font, use ascent/descent of an ASCII font.  Allow
2221         ink_array_return and logical_array_return to be NULL.
2222         (mdraw_coordinates_position): Fix iteration.
2223
2224         * font-ft.c (MFTtoProp): Member completely changed.
2225         (ft_to_prop): Adjusted for the above change.
2226         (ft_to_prop_size): Likewise.
2227         (set_font_info): Adjusted for the change of MFTtoProp.
2228         (fc_generic_family_list): New variable.
2229         (fc_list): Add special handling of generic font names.
2230         (mfont__ft_init): Adjusted for the change of MFTtoProp.
2231         Initialize fc_generic_family_list.
2232         (mfont__ft_fini): Don't free ft_to_prop.  Free
2233         fc_generic_family_list.
2234         (FC_vs_M17N_font_prop): New type.
2235         (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2236         (fc_decode_prop, fc_encode_prop): New functions.
2237         (mfont__ft_parse_name): Use fc_decode_prop.
2238         (mfont__ft_unparse_name): Use fc_encode_prop.
2239
2240         * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2241         (MWDevice): Add member realized_font_list.
2242         (free_display_info): Don't free disp_info->realized_font_list.
2243         (free_device): Free device->realized_fontset_list.
2244         (xft_find_metric): Use gstring->frame instead of rfont->frame.
2245         (device_open): Don't initialize disp_info->realized_font_list.
2246         (device_open): Initialize device->realized_font_list and set it to
2247         frame->realized_font_list.
2248
2249         * fontset.c (try_font_group): New function.
2250         (mfont__lookup_fontset): Use try_font_group.
2251
2252         * font.c (common_weight): Change the order of "regular".
2253
2254         * face.c (Mlatin): Don't make it static.
2255         (mface__realize): Be sure to set work_gstring.frame.
2256         (mface__for_chars): Likewise.
2257
2258         * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2259         MTEXT_FORMAT_UTF_8.
2260
2261         * internal-gui.h (Mlatin): Extern it.
2262
2263         * m17n-gui.h (MDrawControl): New member
2264         disable_overlapping_adjustment.
2265
2266 2004-09-06  Kenichi Handa  <handa@m17n.org>
2267
2268         * font-flt.c (run_otf): Fix typo ('}'->']').
2269
2270         * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2271         (COMBINING_PRECOMPUTED_P): New macros.
2272
2273         * draw.c (layout_glyphs): Handle precomputed combining code.
2274
2275         * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2276         precomupted combining code.
2277
2278 2004-09-03  Kenichi Handa  <handa@m17n.org>
2279
2280         * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2281         otf_gstring.glyphs.
2282
2283 2004-08-27  Kenichi Handa  <handa@m17n.org>
2284
2285         * face.c (mface_put_prop): If the new value is the same as the
2286         current one, don't increment frame->tick.
2287
2288 2004-08-25  Kenichi Handa  <handa@m17n.org>
2289
2290         * fontset.c (mfontset): Initialize font_spec_list member.
2291         (mfontset_copy): Load fontset if necessary.
2292
2293         * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2294         'metrics' to for C++.
2295
2296         * draw.c (mdraw_glyph_info): Adjusted for the member name change
2297         (this -> metics).
2298
2299 2004-08-16  Kenichi Handa  <handa@m17n.org>
2300
2301         * Version 1.1.0 released.
2302
2303 2004-08-13  Kenichi Handa  <handa@m17n.org>
2304
2305         * language.c (mlang__init): Add Dhivehi.
2306
2307         * m17n-gui.c (Mx, Mfreetype): Delete it.
2308         (m17n_init_win): Don't initialize Mx and Mfreetype here.
2309
2310         * m17n-gui.h (Mfreetype, Mxft): Extern them.
2311         (mfont_resize_ratio): Extern it.
2312         (MDrawGlyphInfo): New member logical_width;
2313         (MDrawGlyph): New type.
2314         (mdraw_glyph_list): Prototype adjusted.
2315
2316         * m17n-X.c (xfont_open): Set type and fontp members.
2317         (xft_open): Likewise.
2318
2319         * internal-gui.h (Mx, Mfreetype): Delete extern.
2320
2321         * font.h (struct MRealizedFont): New member type and fontp.
2322
2323         * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2324         (Mx, Mfreetype): Declare here.
2325         (Mxft): New variable.
2326         (mfont_resize_ratio): New function.
2327
2328         * font-ft.c (ft_open): Set type and fontp members.
2329
2330         * draw.c (mdraw_glyph_list): Argument type changed.  Don't set
2331         glyph_code member.
2332
2333 2004-08-11  Kenichi Handa  <handa@m17n.org>
2334
2335         * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2336         FT_LOAD_DEFAULT.
2337
2338 2004-08-06  Kenichi Handa  <handa@m17n.org>
2339
2340         * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2341         feature to apply.
2342
2343         * font-flt.c (run_otf): Print debugging information if necessary.
2344
2345 2004-08-05  Kenichi Handa  <handa@m17n.org>
2346
2347         * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff.  Support
2348         positioning_type 5 and 6.  Switch simplified.
2349
2350 2004-08-04  Kenichi Handa  <handa@m17n.org>
2351
2352         * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2353
2354 2004-08-02  Kenichi Handa  <handa@m17n.org>
2355
2356         * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2357         set val to 1 even if it is greater than 1.
2358
2359         * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2360
2361 2004-07-29  Kenichi Handa  <handa@m17n.org>
2362
2363         * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2364         debugging information.
2365
2366         * internal.h (MDEBUG_PRINT5): New macro.
2367
2368         * draw.c (layout_glyphs): Don't combine a zero width glyph with
2369         the previous one if the zero width glyph has left or right
2370         padding.
2371
2372 2004-07-26  Kenichi Handa  <handa@m17n.org>
2373
2374         * m17n-X.c (xft_render): Pay attention to members left_padding and
2375         right_padding of MGlyph.
2376
2377         * draw.c (visual_order): Allocate one more elements for arrays as
2378         a workaround of fribidi bug.
2379         (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2380         instead of MGlyph->bidi_sensitive.
2381         (layout_glyph_string): Pay attentinon to
2382         control->orientation_reversed when padding at the head or tail.
2383         Fix adjustment of space glyph width.
2384         (get_gstring): If cursor_width or cursor_bidi is changed, don't
2385         use a cache.
2386
2387         * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2388         instead of MGlyph->bidi_sensitive.
2389
2390         * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2391
2392 2004-07-26  Kenichi Handa  <handa@m17n.org>
2393
2394         * draw.c (visual_order): Don't treat combined glyphs specially.
2395         (layout_glyphs): Don't get metrics glyphs that are already ready.
2396         Pay attention to MGlyph->bidi_sensitive.  Combine a glyph of zero
2397         width with the previous one. 
2398         (draw_background): Fix bar cursor position on a r2l glyph.
2399
2400         * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2401         (run_rule): Fix place of updating cluster_begin_pos and
2402         cluster_end_pos here.
2403         (run_otf): Don't set left_padding.
2404
2405         * font-ft.c (adjust_anchor): Type of argument `code' changed.
2406         Caller changed.
2407         (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2408         Fix handling of GPOS.
2409         (mfont__ft_drive_gpos): Delete this function.
2410
2411         * font.h (mfont__ft_drive_otf): Renamed back from
2412         mfont__ft_drive_gsub.
2413         (mfont__ft_drive_gpos): Delete extern.
2414
2415         * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2416         (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2417
2418 2004-07-23  Kenichi Handa  <handa@m17n.org>
2419
2420         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2421         the same bidi level.
2422
2423         * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2424
2425 2004-07-22  Kenichi Handa  <handa@m17n.org>
2426
2427         * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2428
2429 2004-07-20  Kenichi Handa  <handa@m17n.org>
2430
2431         * draw.c (render_glyphs): Fix checking of g->code validity.
2432
2433         * face.c (mface__realize): Set g.type.
2434
2435 2004-07-18  Kenichi Handa  <handa@m17n.org>
2436
2437         * Makefile.am: Prepend ${top_srcdir} to all *.la in
2438         *_LIBADD/*_LDADD.
2439
2440         * m17n-gui.c (mframe): Print error message give by dlopen to
2441         stderr.
2442
2443 2004-07-16  Kenichi Handa  <handa@m17n.org>
2444
2445         * draw.c (compose_glyph_string): Improve the way of deciding a
2446         script.  For a character that doesn't have script property, use
2447         the last non-latin script.
2448
2449         * font-ft.c (fc_list): Cancel previous change.
2450         (mfont__ft_init): Add more entries in ft_to_prop_name.
2451
2452 2004-07-15  Kenichi Handa  <handa@m17n.org>
2453
2454         * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2455         previous or next character glyphs.
2456
2457 2004-07-14  Kenichi Handa  <handa@m17n.org>
2458
2459         * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2460         of type GLYPH_SPACE.
2461
2462         * fontset.c (mfont__lookup_fontset): If glyph type is
2463         GLYPH_SPACE, get codes for SPACE.
2464
2465         * internal-gui.h (Mfont): Delete extern.
2466
2467         * m17n-gui.h (Mfont): Delete duplicated extern.
2468
2469 2004-07-13  Kenichi Handa  <handa@m17n.org>
2470
2471         * font-ft.c (DEVICE_DELTA): New macro.
2472         (adjust_anchor): New function.
2473         (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf.  Drive
2474         only GSUB.
2475         (mfont__ft_drive_gpos): New function.
2476
2477         * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2478         (FontLayoutContext): Delete member `rfont'.
2479         (run_otf): Set g->otf_cmd.  Call 
2480         (mfont__flt_run): Don't set ctx.rfont.  Call mfont__ft_decode_otf
2481         only whne HAVE_OTF is defined.
2482
2483         * fontset.c: Include "config.h".
2484
2485         * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2486         (MGlyph): New member otf_cmd.
2487
2488         * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2489         (mfont__ft_drive_gpos): Extern it.
2490
2491         * face.c: Include "config.h".
2492
2493         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2494
2495         * input-gui.c: Include "config.h".
2496
2497         * plist.c: Include "config.h".
2498
2499 2004-07-06  Kenichi Handa  <handa@m17n.org>
2500
2501         * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2502         internal-gui.h: Cancel previous changes.
2503
2504         * m17n-gd.h: Delete it.
2505
2506         * Makefile.am (libm17n_core_la_LIBADD): New variable.
2507         (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2508         @XML2_LD_FLAGS@ to above.
2509         (libm17n_la_LIBADD): Add -ldl.
2510         (libm17n_la_LDFLAGS): Add -export-dynamic.
2511         (X_LD_FLAGS): Fix the order of linking.
2512         (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2513         (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2514         (libm17n_X_la_LDFLAGS): Add -module.
2515         (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2516         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2517         (libm17n_gd_la_LDFLAGS): Add -module.
2518         (include_HEADERS): Delete m17n-gd.h.
2519
2520 2004-06-30  Kenichi Handa  <handa@m17n.org>
2521
2522         * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2523         (MDeviceLibraryInterface): Delete it.
2524         (register_device_library): Delete it.
2525         (m17n__device_library_list): Renamed from device_library_list.
2526
2527         * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2528         (m17n_init_win): Adjust prototype.
2529
2530         * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2531         (m17n_init_gd): New function. 
2532
2533         * m17n-gd.h: New file.
2534
2535         * m17n-X.h: Include <m17n-gui.h>.
2536         (m17n_init_X): Extern it.
2537         (M17N_INIT): Redefine it.
2538
2539         * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2540         (m17n_init_X): New function.
2541
2542         * internal-gui.h (m17n__device_library_list): Extern it.
2543         (struct MDeviceDriver): New members initialized, init, and fini.
2544
2545         * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2546         @XFT2_LD_FLAGS@.
2547         (libm17n_X_la_LIBADD): Delete aboves.
2548         (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2549         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2550         (libm17n_gd_la_LDFLAGS): Delete it.
2551         (include_HEADERS): Add m17n-gd.h.
2552
2553 2004-06-25  Kenichi Handa  <handa@m17n.org>
2554
2555         * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2556         (libm17n_gd_la_LDFLAGS): Cancel previous change.
2557
2558         * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2559
2560         * font-ft.c (fc_list): If FcFontList finds no font, try
2561         FcFontMatch.
2562
2563         * draw.c (compose_glyph_string): Terminate the last loop after
2564         doing default combining if necessary.
2565
2566 2004-06-24  Kenichi Handa  <handa@m17n.org>
2567
2568         * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2569
2570         * character.c (mchar_define_property): Add const to an arg.
2571
2572         * charset.c (mchar_define_charset): Add const to an arg.
2573
2574         * coding.c (MCodingSystem): Add const to an arg or decoder.
2575         (finish_decoding): Add const to an arg.
2576         (decode_coding_charset, decode_coding_utf_8)
2577         (decode_coding_utf_16, decode_coding_utf_32)
2578         (decode_coding_iso_2022, decode_coding_sjis)
2579         (mconv_define_coding): Likewise.
2580
2581         * m17n-X.c (xft_find_metric): Delete unused variable.
2582
2583         * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2584         prototypes.
2585
2586         * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2587         prototypes.
2588
2589         * mtext.c (count_utf_8_chars, count_utf_16_chars)
2590         (mtext__from_data, mtext_from_data): Add `const' to an arg.
2591
2592         * mtext.h (mtext__from_data): Ajust prototype.
2593
2594 2004-06-23  Kenichi Handa  <handa@m17n.org>
2595
2596         * draw.c (compose_glyph_string): Always get glyph codes by
2597         mface__for_char.
2598         (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2599         (mdraw_glyph_list): New function.
2600
2601         * font-flt.c (mfont__flt_run): Be sure to call
2602         rfont->driver->encode_char.
2603
2604         * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2605         (ft_encode_char): Delete arg C.
2606         (ft_render): Don't call FT_Get_Char_Index.
2607
2608         * font.c (mfont__encodable_p): Delete it.
2609         (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2610
2611         * font.h (struct MFontDriver): Delete arg C of encode_char.
2612         (mfont__encodable_p): Delete extern.
2613
2614         * m17n-X.c (xfont_encode_char): Delete arg C.
2615         (xft_find_metric): Don't cal FT_Get_Char_Index.
2616         (xft_render): Likewise.
2617
2618         * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2619         logical_width.
2620         (mdraw_glyph_list): Extern it.
2621
2622         * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2623
2624 2004-06-22  Kenichi Handa  <handa@m17n.org>
2625
2626         * m17n-gui.h (mfontset_lookup): Extern it.
2627
2628         * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2629
2630         * fontset.c (realize_fontset_elements)
2631         (free_realized_fontset_elements, update_fontset_elements): New
2632         functions.
2633         (mfont__realize_fontset): Call realize_fontset_elements.
2634         (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2635         (mfont__lookup_fontset): If a fontset was modified, update
2636         the realized fontset.
2637         (mfontset_modify_entry): Increment fontset->tick.
2638         (mfontset_lookup): New function.
2639
2640 2004-06-21  Kenichi Handa  <handa@m17n.org>
2641
2642         * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2643
2644         * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2645         (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2646         length of source text 0.
2647
2648 2004-06-21  Kenichi Handa  <handa@m17n.org>
2649
2650         * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2651         (compare): Pay attention to format other than utf-8.
2652         (copy): Delete this function.
2653         (count_by_utf_8, count_by_utf_16, insert): New functions.
2654         (count_utf_16_chars): Fix handling of a surrogate pair.
2655         (find_char_forward, find_char_backward): Likewise.
2656         (mtext__from_data): Delete unnecessary check.  Fix number of
2657         allocated bytes.
2658         (mtext_from_data): Don't count items.
2659         (mtext_ref_char): Optimize the code.
2660         (mtext_set_char): Pay attention to format other than utf-8.
2661         (mtext_cat_char): Likewise.
2662         (mtext_dup): Don't call copy, instead do allocation here.
2663         (mtext_cat): Call insert instead of copy.
2664         (mtext_ncat): Likewise.
2665         (mtext_cpy): Delete character at first and call insert instead of
2666         copy.
2667         (mtext_ncpy): Likewise.
2668         (mtext_copy): Likewise.
2669         (mtext_duplicate): Call insert instead of copy.
2670         (mtext_del): Pay attention to format other than utf-8.
2671         (mtext_ins): Simply call insert.
2672         (mtext_ins_char): Pay attention to format other than utf-8.
2673         (mtext_tok): Call insert instead of copy.
2674         (mtext_text): Call UNIT_BYTES.
2675
2676         * textprop.c (mtext__adjust_plist_for_change): New function.
2677
2678         * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2679         (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2680         (CHAR_UNITS_AT): Fix typo.
2681         (CHAR_UNITS_BY_HEAD): Fix typo.
2682         (STRING_CHAR_AND_UNITS): Fix typo.
2683
2684         * internal.h (MTEXT_READ_ONLY_P): New macro. 
2685
2686         * mtext.h (mtext__replace): Delete the extern.
2687         (mtext__adjust_foramt): Adjust prototype.
2688
2689         * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2690         if possible.  Otherwise make a copy of mmt.
2691
2692         * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2693         utf-8.
2694
2695 2004-06-18  Kenichi Handa  <handa@m17n.org>
2696
2697         * character.h (CHAR_STRING_UTF16): Fix syntax.
2698
2699 2004-06-16  Kenichi Handa  <handa@m17n.org>
2700
2701         * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2702         (libm17n_X_la_LIBADD): Delete it.
2703         (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2704
2705         * m17n-X.c (device_open): Add parens in `if' condition.
2706
2707         * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2708         (DEC_POSITION): Likewise.
2709         (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2710
2711 2004-06-15  Kenichi Handa  <handa@m17n.org>
2712
2713         * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2714         by language.
2715
2716         * draw.c (compose_glyph_string): If langauge is specified, call
2717         mface__for_chars even if a text is all latin.  Fix condition for
2718         setting non_ascii_found.
2719
2720         * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2721
2722         * m17n.h (minput_char_to_key): Delete extern.
2723
2724         * m17n-gui.h (minput_event_to_key): Cancel previous change.
2725
2726         * m17n-gui.c (null_device_open): Set several members of frame.
2727
2728 2004-06-14  Kenichi Handa  <handa@m17n.org>
2729
2730         * m17n-gui.h (minput_event_to_key): Delete extern.
2731
2732         * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2733
2734         * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2735
2736         * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2737
2738 2004-06-08  Kenichi Handa  <handa@m17n.org>
2739
2740         * character.c (mchar_put_prop): Don't increment the ref-count of
2741         record->table.
2742
2743 2004-06-04  Kenichi Handa  <handa@m17n.org>
2744
2745         * m17n-core.c (mdebug__register_object): New function.
2746         (mdebug__unregister_object): Likewise.
2747
2748         * internal.h (mdebug__register_object, mdebug__unregister_object):
2749         Extern them.
2750         (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2751         respectively.
2752
2753         * charset.c (mcharset__load_from_database): Don't call
2754         mconv__register_charset_coding here.
2755
2756         * coding.c (find_coding): Get a real name from an element of
2757         coding_definition_list.
2758         (mconv__register_charset_coding): Set the real name at the top of
2759         param.
2760         (mcoding__load_from_database): Likewise.
2761         (mconv_list_codings): Adjusted for the above change.
2762
2763 2004-06-03  Kenichi Handa  <handa@m17n.org>
2764
2765         * coding.c (find_coding): Find by canonicalized name.  Don't have
2766         to modify the element of coding_definition_list by
2767         mplist__from_plist.
2768         (mconv__define_coding_from_charset): Delete it.
2769         (mconv__register_charset_coding): Canonicalize sym.
2770         (mcoding__load_from_database): Register plist modified by
2771         mplist__from_plist.
2772
2773         * coding.h (mconv__define_coding_from_charset): Don't extern it.
2774
2775         * font-ft.c (ft_open): Fix setting of rfont->descent.
2776
2777 2004-06-02  Kenichi Handa  <handa@m17n.org>
2778
2779         * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2780         (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2781         (xlfd_unparse_name): Renamed from xfont_build_name.
2782         (mfont__init): Initialized Mfontconfig.
2783         (mfont__free_realized): Unconditionally unref rfont->info.
2784         (mfont__select): Free `this' if it's not best.
2785         (mfont__open): Don't check frame->realized_font_list.
2786         (mfont__parse_name_into_font): New function.
2787         (Mfontconfig): New variable.
2788         (mfont_from_name): Call mfont_parse_name.
2789         (mfont_name): Call mfont_unparse_name.
2790         (mdebug_dump_font): Likewise.
2791
2792         * font.h (struct MFontDriver): Delete members parse_name and
2793         build_name.
2794         (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2795         (mfont__parse_name_into_font): Extern it.
2796
2797         * font-ft.c: Include "symbol.h".
2798         (close_ft): Unconditionally free filename and charmap_list of
2799         ft_into.
2800         (ft_open): Duplicate base->filename.  Increment ref-count of
2801         ft_info->charmap_list.  Free ft_info->charmap_list and
2802         ft_info->filename on error.
2803         (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2804
2805         * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2806         xfont_build_name.
2807         (enum xlfd_field_idx): Moved to font.c.
2808         (split_font_name, build_font_name): Likewise.
2809         (build_font_list): Call mfont__parse_name_info_font.
2810         (xfont_open): Call mfont__unparse_name.  Free name.
2811         (xfont_parse_name, xfont_build_name): Moved to font.c
2812         (xft_select): Prototype deleted.
2813         (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2814         Call mfont_pase_name.
2815
2816         * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2817         (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2818         (mframe): Likewise.
2819
2820         * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2821         Extern them.
2822
2823         * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2824
2825 2004-06-01  Kenichi Handa  <handa@m17n.org>
2826
2827         * fontset.c (mfontset_modify_entry): Pay attention to the case
2828         that fontset->font_spec_list is NULL.
2829
2830 2004-05-31  Kenichi Handa  <handa@m17n.org>
2831
2832         * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2833
2834         * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2835
2836         * font.c (mfont__select): Print score the a font for debugging.
2837
2838         * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2839
2840         * coding.c (reset_coding_sjis): Check kanji and kana instead of
2841         kanji_sym and kana_sym.
2842
2843 2004-05-28  Kenichi Handa  <handa@m17n.org>
2844
2845         * Makefile.am (VINFO): New variable.
2846         (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2847         (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2848
2849 2004-05-27  Kenichi Handa  <handa@m17n.org>
2850
2851         The following chanages are to make device dependent functions
2852         accessible only from MDeviceDriver structure, and to add GD and
2853         null device drivers.  Font drivers get also device dependent.
2854
2855         * m17n.c (m17n_init): Increament shell_initialized.
2856         (m17n_fini): Decremented shell_initialized.
2857
2858         * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2859
2860         * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2861         (Mwidget, Mcolormap, Mx): Extern them.
2862
2863         * m17n-gui.c: Include <dlfcn.h> and "config.h".
2864         (free_frame): Call frame->driver->close instead of
2865         mwin__close_device.
2866         (DLOPEN_SHLIB_EXT): New macro.
2867         (MDeviceLibraryInterface): New type.
2868         (device_library_list): New variable.
2869         (register_device_library): New function.
2870         (null_device): New variable.
2871         (null_device_close, null_device_get_prop)
2872         (null_device_realize_face, null_device_free_realized_face): New
2873         function.
2874         (null_driver): New variable.
2875         (null_device_init, null_device_fini, null_device_open): New
2876         functions.
2877         (null_interface): New variable.
2878         (Mfreetype, Mdevice): Declare them.
2879         (m17n_init_win): Increment win_initialized.  Initialize Mx, Mgd,
2880         Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2881         Mwin__Close_Device.  Register drivers for Mx and Mgd.
2882         (m17n_fini_win): Decremented win_initialized.  Call "fini"
2883         function of all opened devices.  Don't call mwin__fini.
2884         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2885         Declare them here.
2886         (mframe): Handle Mdevice key of PLIST.
2887         (mframe_get_prop): Call frame->device->get_prop instead of
2888         mwin__device_get_prop.
2889
2890         * m17n-gd.c: New file.
2891
2892         * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2893         (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2894
2895         * m17n-core.c (m17n_init_core): Increate core_initialized.
2896         (m17n_fini_core): Decremented core_initialized.
2897
2898         * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2899         (Mcolormap): Don't extern them here.
2900
2901         * m17n-X.c (FRAME_DEVICE): New macro.
2902         (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2903         (free_display_info): Use MPLIST_DO.
2904         (free_device): Free rface->info.
2905         (xft_close): Delete it.
2906         (device_init): Renamed from mwin__init.
2907         (device_fini): Renamed from mwin__fini.
2908         (device_open): Renamed from mwin__open_device.
2909         (x_driver): New variable.
2910         (MXFontInfo): Delete member frame, add member display.
2911         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2912         Don't declare them here.
2913
2914         * internal-gui.h (MDeviceType): New enum.
2915         (MWDefice): Delete it.
2916         (struct MFrame): Change type of device to void *.  New members
2917         device_type, driver, font_driver_list.
2918         (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2919         (MDeviceDriver): New type.
2920         (Mx, Mgd, Mfreetype): Extern them.
2921         (mwin__XXX): Delete all of them.
2922
2923         * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2924         mwin__XXX.
2925         (win_destroy_ic): Likewise.
2926         (adjust_window_and_draw): Likewise.
2927         (win_callback): Likewise.
2928         (Mxim): Declare it here.
2929         (minput_event_to_key): Call M_CHECK_READABLE.
2930
2931         * fontset.c (mfont__lookup_fontset): Delete local variable
2932         font_group.
2933
2934         * font.h (struct MFontDriver): Delete member close, add members
2935         parse_name and build_name.
2936         (mfont__driver_list): Delete extern.
2937         (mfont__close): Delete extern.
2938
2939         * font.c (mfont__init): Don't set mfont__driver_list.
2940         (mfont__fini): Don't unref mfont__driver_list.
2941         (mfont__select): Try font drivers in frame->font_driver_list.  Set
2942         driver member of a realized font.
2943         (mfont__close): Delete it.
2944         (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2945         functions of the default frame.
2946
2947         * font-ft.c (close_ft): Check ft_info->ft_face and work
2948         differently.
2949         (add_font_info): Allocate ft_info by M17N_OBJECT.
2950         (ft_close): Delete it.
2951         (mfont__ft_driver): Don't set ft_close.
2952         (ft_select): Increment ref-count of best_font.
2953         (ft_open): Decremented ref-count of base.  On error, call
2954         FT_Done_Face and free ft_info.
2955         (ft_find_metric): Always use XXX_MONO in load_flags.
2956         (ft_render): Fix setting of width.  Call
2957         frame->driver->draw_points instead of mwin__draw_points.
2958         (ft_to_prop): Don't set mfont__driver_list.
2959         (mfont__ft_fini): Just unref ft_info.
2960
2961         * face.c (mface__init): Exchange foreground and background of
2962         mface__default.  Call mface_put_prop to set hline of
2963         mface_underline,
2964         (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2965         (mface__free_realized): Don't call mwin__free_realized_face.
2966
2967         * draw.c (Mdepth): Don't declare it here.
2968         (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2969         (render_glyphs, render_glyph_string): Likewise.
2970         (mdraw__init): Don't set Mdepth.
2971         (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2972         M_CHECK_WRITABLE.
2973         (mdraw_text_per_char_extents): Return 0 on success and -1 on
2974         error.
2975         (mdraw_text_items): Check FRAME is writable.
2976         (mdraw_per_char_extents): Implement body.
2977
2978         * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2979         libm17n-gd.la.
2980         (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2981         (GUI_SOURCES): Delete it.
2982         (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2983         (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2984         (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2985         (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2986         (linkgui_LDADD): Set to libm17n-gui.la
2987         (linkgui_LDFLAGS): New target.
2988         (SRC): Include ${libm17n_gui_la_SOURCES} and
2989         ${libm17n_gd_la_SOURCES}.
2990
2991 2004-05-24  Kenichi Handa  <handa@m17n.org>
2992
2993         * draw.c (draw_background): Don't draw background even if
2994         rface->face.property[MFACE_BACKGROUND] is not Mnil.
2995
2996 2004-05-22  Kenichi Handa  <handa@m17n.org>
2997
2998         * m17n-X.c (xft_open_font): Fix anti_alias setting.
2999
3000 2004-05-20  Kenichi Handa  <handa@m17n.org>
3001
3002         * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3003
3004         * m17n-gui.c: Include "plist.h".
3005         (mframe): If PLIST is NULL, initialize it to emply plist.
3006
3007         * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3008         (xft_driver): New variable.
3009         (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3010         (xft_find_metric, xft_render): New function.
3011         (mwin__init): Adjusted for the new mfont__driver_list.
3012         (mwin__open_device): Assume arg PARAM is not NULL.  Push a newly
3013         generated face to PARAM.
3014         (mwin__realize_face): Fix setting of box colors.  Don't call hook
3015         function here.
3016         (mwin__draw_hline): New function.
3017         (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3018         (mwin__xft_render): Delete these function.
3019
3020         * internal-gui.h (struct MFrame): New member tick.
3021         (struct MGlyphString): New member tick.
3022         (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3023         (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3024         (mwin__xft_render): Delete extern.
3025
3026         * fontset.c (mfont__lookup_fontset): Make the code simpler.
3027         (mfontset): Always increment the reference count of returned
3028         object.
3029
3030         * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3031         (MFTInfo): Moved to font.h.
3032         (ft_iso8859_1_font_list): Delete this variable.
3033         (set_font_info): Don't set font->property[MFONT_TYPE].
3034         (set_font_info): Don't udpate ft_iso8859_1_font_list.
3035         (add_font_info): Change type to void.
3036         (fc_list): Change anme from xft_list.  Caller changed.  Include
3037         FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3038         (mfont__ft_driver): Change name from ft_driver.  Caller changed.
3039         (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3040         (close_ft): Don't call mwin__xft_close.  Unref
3041         ft_info->extra_info.
3042         (ft_open): Don't setup ft_info->fontname.  Don't call
3043         mwin__xft_open.
3044         (ft_find_metric): Don't call mwin__xft_get_metric.
3045         (ft_encode_char): Call rfont->driver->open instead of ft_open.
3046         (ft_render): Don't check HAVE_XFT2.  Don't call mwin__xft_render.
3047         (mfont__ft_init): Adjusted for new mfont__driver_list.
3048         (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3049
3050         * font.c (mfont__driver_list): Make it MPlist.
3051         (mfont__init): Adjust initialization of mfont__driver_list.
3052         (mfont__fini): Free mfont__driver_list.
3053         (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3054         (mfont__select): Adjusted for the new mfont__driver_list.
3055
3056         * font.h (enum MFontProperty): Delete MFONT_TYPE.
3057         (mfont__drirver_list): Adjust prototype.
3058         (MFTInfo): Move to here from fron.c.  Deleve member fontname.
3059
3060         * face.h (struct MFace): Delete member realized_face_list, add
3061         member frame_list.
3062         (struct MRealizedFace): Delete member need_update
3063         andnofont_rface, add member non_ascii_list.
3064         (mface__update_frame_face): Extern it.
3065
3066         * face.c (hline_prop_list, box_prop_list, noop_hook): New
3067         variables.
3068         (get_hline_create, get_box_create): New functions.
3069         (find_realized_face): Cancel previous change.  Arg RFONT deleted.
3070         Use memcmp.
3071         (free_face): Cancep previous change.  Free face->frame_list.
3072         (serialize_hline): Do nothing if hline->width is zero.
3073         (serialize_box): Do nothing if box->width is zero.
3074         (mface__init): Setup all properties of mface__default.
3075         (mface__fini): Free hline_prop_list and box_prop_list.
3076         (mface__realize): Cancel previous change.  Update
3077         face->frame_list.  Setup rface->non_ascii_list.
3078         (mface__for_chars): Update rface->non_ascii_list.
3079         (mface__free_realized): Free rface->non_ascii_list.
3080         (mface__update_frame_face): New function.
3081         (mface): Initialize face->frame_list.
3082         (mface_copy): Likewise.  Just copy MFACE_HLINE and MFACE_BOX
3083         properties.
3084         (mface_merge): Likewise.
3085         (mface_put_prop): If key is Mhline or Mbox, get value by
3086         get_hline_create or get_box_create respectively.
3087         (mface_put_prop): Update frame->tick and call
3088         mface__update_frame_face if necessary.
3089         (mface_update): Do nothing if func is noop_hook.
3090
3091         * draw.c (render_glyphs): If a font is not found, use
3092         mwin__draw_empty_boxes.
3093         (alloc_gstring): Initialize gstring->tick.
3094         (get_gstring): Check gstring->tick.
3095
3096 2004-05-17  Kenichi Handa  <handa@m17n.org>
3097
3098         * face.c (find_realized_face): Return value changed.  If RFONT is
3099         NULL, avoid unnecessary checking.
3100         (free_face): Free face->realized_face_list.
3101         (mface__realize): Adjusted for the change of find_realized_face.
3102         If it returns a realized face that needs update, free it and
3103         realize a new one.  Push a new realized face to
3104         frame->realized_face_list instead of appending.
3105         (mface__for_chars): Adjusted for the change of find_realized_face.
3106         Short cut if the required font is in rface->ascii_rface.
3107         (mface_put_prop): Free old value if necessary.  Set need_update
3108         member of realized faces to 1.
3109
3110         * face.h (struct MFace): Delete member tick, add member
3111         realized_face_list.
3112         (struct MRealizedFace): Delete member tick, add member
3113         need_update.
3114
3115 2004-05-13  Kenichi Handa  <handa@m17n.org>
3116
3117         * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3118
3119 2004-05-12  Kenichi Handa  <handa@m17n.org>
3120
3121         * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3122
3123         * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3124         parse it XftNameParse.
3125
3126         * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3127         (all_fonts_scaned): New variable.
3128         (set_font_info): FAMILY may be Mnil.
3129         (add_font_info): Argument changed.
3130         (xft_list): Call add_font_info in it.
3131         (ft_list): Likewise.
3132         (ft_select): Make it work in the case family is Mnil.
3133         (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3134         (mfont__ft_fini): Set all_fonts_scaned to 0.
3135
3136         * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3137         that is failed to open.
3138
3139 2004-05-10  Kenichi Handa  <handa@m17n.org>
3140
3141         * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3142         device's depth is 1 (i.e. monochrome).
3143
3144         * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3145         to work around the problem of libtool.
3146
3147         * font-ft.c: Include <freetype/ftbdf.h>.
3148         (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3149         variables.
3150         (mfont__ft_init): Initialize them.
3151         (ft_iso8859_1_font_list): New variable.
3152         (set_font_info): Detect a font containing iso8859-1 glyphs and
3153         register it in ft_iso8859_1_font_list.  If the font is not
3154         scalable, assume it as BDF or PCF font and setup SIZE and RESY
3155         properties of the font from its properties.
3156         (add_font_list): If the font is not scalable, check if it is BDF
3157         or PCF font.  If not, ignore it.
3158         (ft_select): If FAMILY is Mnil, return NULL only if the requested
3159         registry is not iso8859-1.
3160         (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3161         ft_iso8859_1_font_list.
3162         (ft_find_metric): If the font is not scalable, assume it as BDF
3163         or PCF, and get a metric from its properties.
3164         (mfont__ft_fini): Free ft_iso8859_1_font_list.
3165
3166 2004-05-07  Kenichi Handa  <handa@redhat.m17n.org>
3167
3168         * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3169         (libm17n_la_LDFLAGS): Delete it.
3170         (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3171         (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3172
3173 2004-05-06  Kenichi Handa  <handa@m17n.org>
3174
3175         * draw.c (compose_glyph_string): Fix previous change.
3176
3177 2004-04-30  Kenichi Handa  <handa@m17n.org>
3178
3179         * font-ft.c (ft_list): Delete unused variable `result'.
3180         (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3181
3182 2004-04-27  Kenichi Handa  <handa@m17n.org>
3183
3184         * m17n-X.c: Include config.h
3185         [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3186         (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3187         (MWDevice) [HAVE_XFT2]: New member xft_draw.
3188         (FRAME_CMAP, FRAME_VISUAL): New macros.
3189         (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3190         (xfont_driver): Make it static.
3191         (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3192         (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3193         info->xft_color_back.
3194         (MXftFontInfo) [HAVE_XFT2]: New type.
3195         (mwin__xft_close) [HAVE_XFT2]: New function.
3196         (mwin__xft_open) [HAVE_XFT2]: New function.
3197         (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3198         (mwin__xft_render) [HAVE_XFT2]: New function.
3199
3200         * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3201         (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3202         (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3203         externs.
3204
3205         * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3206
3207         * font-ft.c: Don't include FT_FREETYPE_H here.
3208         [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3209         (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3210         (MFTInfo): New member charmap_index.
3211         (MFTInfo) [HAVE_XFT2]: New member xft_info.
3212         (check_otf_filename): Renamed from check_filename.  Return value
3213         changed.
3214         (ft_set_property): This function deleted.
3215         (set_font_info): New function.
3216         (add_font_list): Argument changed.  Add multiple fonts.
3217         (xft_list) [HAVE_XFT2]: New function.
3218         (ft_list) [not HAVE_XFT2]: New function.
3219         (ft_select): Add code for Xft.
3220         (close_ft): Likewise.
3221         (ft_open): Likewise.
3222         (ft_find_metric): Likewise.
3223         (ft_encode_char): Likewise.
3224         (ft_render): Likewise.
3225
3226         * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3227
3228 2004-04-26  Kenichi Handa  <handa@m17n.org>
3229
3230         * textprop.c (mtext_attach_property): Declare the return type as
3231         `int'.
3232
3233 2004-04-21  Kenichi Handa  <handa@m17n.org>
3234
3235         * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3236
3237 2004-04-09  Kenichi Handa  <handa@m17n.org>
3238
3239         * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3240         seq_to.
3241         (load_command): Setup above members.
3242
3243 2004-04-05  Kenichi Handa  <handa@m17n.org>
3244
3245         * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3246
3247 2004-03-30  Kenichi Handa  <handa@m17n.org>
3248
3249         * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3250         >= 0x10000.
3251
3252         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3253         (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3254
3255 2004-03-29  Kenichi Handa  <handa@m17n.org>
3256
3257         * Version 1.0 Patch Level 2 released.
3258
3259 2004-03-29  Kenichi Handa  <handa@m17n.org>
3260
3261         * charset.c (make_charset): Set charset->fully_loaded and
3262         charset->simple correctly.  Don't try to get charset->min_char and
3263         charset->max_char for a charset of method subset and superset.
3264         Don't load a mapping file here.
3265         (mcharset__init): Set unified_max.
3266         (mcharset__load_from_database): Free a working plist.
3267
3268         * coding.c (mcoding__fini): Free all malloced data.
3269
3270         * input-gui.c (win_create_ic): Set control.as_image for preediting
3271         to 0.
3272
3273         * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3274         `count') to initialize the array.
3275
3276         * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3277         M17N_OBJECT_UNREF.
3278
3279         * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3280         rectangle.
3281         (mwin__create_window): Fix bug of setting a background pixel of a
3282         new window.
3283         (mwin__adjust_window): Clear the window before drawing.
3284
3285         * m17n-core.c (mdebug__report_object): Free array->objectes if
3286         necessary.
3287         (m17n_init_core): Don't set report_header_printed to 0 here.
3288         Fix debugging information.
3289         (m17n_fini_core): Set report_header_printed to 0 here.
3290
3291         * m17n-core.h (mplist_deserialize): Extern it.
3292
3293         * m17n-gui.c (m17n_fini_win): Fix debugging information.
3294
3295         * m17n.c (m17n_fini): Fix debugging information.
3296
3297         * mtext.c (mtext__adjust_foramt): New function.
3298
3299         * mtext.h (mtext__adjust_foramt): Extern it.
3300
3301         * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3302
3303         * plist.h (mplist__deserialize): Don't extern it.
3304
3305         * symbol.c (msymbol__fini): Set freed_symbols to 0.  Set all
3306         elements of symbol_table to NULL.  Report about created and freed
3307         symbols if MDEBUG_FINI is set.
3308
3309 2004-03-22  Kenichi Handa  <handa@m17n.org>
3310
3311         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3312
3313         * m17n.c (m17n_init): Fix the way of checking merror_code.
3314
3315         * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3316
3317 2004-03-22  Kenichi Handa  <handa@m17n.org>
3318
3319         * fontset.c (realize_font_group): Adjust the font size by
3320         mfont__resize before selecting a font.
3321
3322         * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3323
3324 2004-03-19  Kenichi Handa  <handa@m17n.org>
3325
3326         * Version 1.0 Patch Level 1 released.
3327
3328 2004-03-19  Kenichi Handa  <handa@m17n.org>
3329
3330         * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3331
3332         * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3333
3334 2004-03-19  Kenichi Handa  <handa@m17n.org>
3335
3336         Re-apply the changes forgotten in the released version.
3337
3338         * charset.c (mcharset__load_from_database): Call
3339         mchar_define_charset.
3340
3341         * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3342         (mconv_encode_range): Put Mcoding text property.
3343
3344 2004-03-18  Kenichi Handa  <handa@m17n.org>
3345
3346         * draw.c (Mdepth): New variable.
3347         (visual_order): Delete unused local var `pos'.
3348         (compose_glyph_string): Fix for the case that gstring->glyphs is
3349         realloced.  Stop generating glyphs at TO.  Fix handling of
3350         control charaters.
3351         (layout_glyphs): Get metrics of all glyphs in advance.  Set
3352         lbearing and rbearing of base of composition glyph correctly.
3353         Handle left-overhang glyphs correctly.
3354         (alloc_gstring): New arg frame.  Set gstring->anti_alias.  Caller
3355         changed.
3356         (dump_combining_code): Change the defualt off_x character to ".".
3357         (mdraw__init): Initialize Mdepth.
3358
3359         * face.c (work_gstring): New variable
3360         (mface__init): Initialize work_gstring.
3361         (mface__fini): Free work_gstring.glyphs.
3362         (mface__realize): Don't handle videomode property here.  Adjusted
3363         for the change of mfont__get_metric.
3364         (mface__for_chars): Adjusted for the change of mfont__get_metric.
3365
3366         * face.h (enum face_gc): Moved to m17n-X.c.
3367
3368         * font.h (struct MFontDriver): Arguments of find_metric changed.
3369         (mfont__select): Prototype adjusted.
3370         (mfont__get_metric): Likewise.
3371         (mfont__ft_drive_otf): Likewise.
3372         (mfont__flt_run): Likewise.
3373         
3374         * font.c (mfont__select): New argument layouter.  If layouter is
3375         different in the registered font, make a new copy of realized
3376         font.
3377         (mfont__get_metric): Argument changed.  Get metrics of multiple
3378         glyphs.
3379         (mfont_find): Call mfont__select with layouter as Mnil.
3380
3381         * font-flt.c (FontLayoutContext): New member rfont.
3382         (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3383         (mfont__flt_run): Argument changed.  Initialize ctx.rfont.
3384
3385         * font-ft.c (ft_find_metric): Arguments changed.  Get metrics of
3386         multiple glyphs.
3387         (NUM_POINTS): New macro.
3388         (MPointTable): New type.
3389         (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3390         (mfont__ft_drive_otf): New argument rfont.
3391
3392         * fontset.c (realize_font_group): Adjusted for the changed of
3393         mfont__select.
3394         (check_fontset_element): This function deleted.
3395
3396         * input-gui.c (adjust_window_and_draw): Locate a preedit window
3397         off the parent window if the preedit text is zero length.
3398
3399         * internal-gui.h (struct MFrame): New members foreground,
3400         background, videomode, font.
3401         (struct MGlyphString): New member anti_alias.
3402         (MDrawPoint): New type.
3403         (mwin__draw_bitmap): Prototype deleted.
3404         (mwin__draw_points): Prototype added.
3405
3406         * m17n-gui.h (MDrawControl): New member anti_alias.
3407
3408         * m17n-gui.c (free_frame): Free frame->font.
3409         (mframe): Set the fontset of frame->face to the default fontset.
3410
3411         * m17n-X.c (RGB_GC): New type.
3412         (enum gc_index): Renamed from enum face_gc.  Member names changed.
3413         (GCInfo): New typel
3414         (struct MWDevice): Members foreground and background deleted.  New
3415         member scratch_gc, gc_list.
3416         (DEFAULT_FONT, FALLBACK_FONT): New macros.
3417         (free_device): Free GCs in device->gc_list.
3418         (get_rgb_gc): New function.
3419         (get_gc): Renamed and argument changed from get_color.
3420         (get_gc_for_anti_alias): New function.
3421         (xfont_find_metric): Arguments changed.  Get metrics of multiple
3422         glyphs.
3423         (set_region): Argument changed.  Caller changed.
3424         (xfont_render): Allways set a font in gc.
3425         (x_error_handler, x_io_error_handler): Define only if
3426         X_SET_ERROR_HANDLER is defined.
3427         (mwin__open_device): Create device->scratch_gc.  Set members
3428         foreground, background, and videomode of frame.  Call
3429         XSetErrorHandler and XSetIOErrorHandler only if
3430         X_SET_ERROR_HANDLER is defined.
3431         (struct gc_list): Deleted.
3432         (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3433         (mwin__realize_face): Adjusted for the change of the format of
3434         rface->info and the charge of set_region.
3435         (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3436         (mwin__draw_box): Likewise.
3437         (mwin__draw_bitmap): This function deleted.
3438         (mwin__draw_points): New function.
3439         (mwin__verify_region): Adjusted for the change of the format of
3440         rface->info and the charge of set_region.
3441         (mwin__create_window): Inherit backgound pixel from parent.
3442         (mwin__dump_gc): Adjusted for the change of the format of
3443         rface->info.
3444
3445 2004-03-16  Kenichi Handa  <handa@m17n.org>
3446
3447         * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3448
3449         * input.c (M_key_alias): New variable.
3450         (handle_key): Try M_key_alias property of a key too.
3451         (minput__init): Initialize M_key_alias.  Give that property to
3452         symbols in one_char_symbol.  Fix bug of initializing
3453         one_char_symbol.
3454
3455         * draw.c (compose_glyph_string): Don't handle
3456         ignore_formatting_char here.  Include formatting characters in the
3457         range processed by a FTL.
3458         (layout_glyph_string): Handle ignore_formatting_char here.
3459
3460 2004-03-12  Kenichi Handa  <handa@m17n.org>
3461
3462         * input-gui.c (win_create_ic): Enable bidi in status control.
3463
3464         * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3465
3466 2004-03-09  Kenichi Handa  <handa@m17n.org>
3467
3468         * input.c (load_input_method): If title is not specified, use the
3469         input method name as title.
3470
3471         * m17n-X.c (get_color): Make it static.
3472         (xim_create_ic, xim_destroy_ic, x_error_handler)
3473         (x_io_error_handler): Likewise.
3474
3475 2004-03-01  Kenichi Handa  <handa@m17n.org>
3476
3477         * Version 1.0 released.
3478
3479 \f
3480 Copyright (C) 2003, 2004
3481   National Institute of Advanced Industrial Science and Technology (AIST)
3482   Registration Number H15PRO112
3483
3484 This file is part of the m17n library.
3485
3486 The m17n library is free software; you can redistribute it and/or
3487 modify it under the terms of the GNU Lesser General Public License
3488 as published by the Free Software Foundation; either version 2.1 of
3489 the License, or (at your option) any later version.
3490
3491 The m17n library is distributed in the hope that it will be useful,
3492 but WITHOUT ANY WARRANTY; without even the implied warranty of
3493 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3494 Lesser General Public License for more details.
3495
3496 You should have received a copy of the GNU Lesser General Public
3497 License along with the m17n library; if not, write to the Free
3498 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3499 Boston, MA 02110-1301, USA.