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