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