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