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