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