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