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