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