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