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