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