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