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