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