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