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