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