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