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