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