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