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