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