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