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