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