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