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