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