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