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