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