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