(MXFont, MXFontList): New types.
[m17n/m17n-lib.git] / src / ChangeLog
1 2004-09-27  Kenichi Handa  <handa@m17n.org>
2
3         * internal-gui.h (struct MGlyphString): Delete members mt,
4         sub_width, sub_lbrearing, sub_rbearing, and region.
5
6         * draw.c (MSubTextExtents): New type.
7         (layout_glyphs): New arg extents.  Set its members.
8         (layout_glyph_string): Adjusted for the above change.
9         (alloc_gstring): Don't set gstring->mt.
10         (truncate_gstring): Call line_break function with mt instead of
11         gstring->mt.
12
13 2004-09-22  Kenichi Handa  <handa@m17n.org>
14
15         * mtext.c (count_utf_16_chars): Count each code of invalid
16         surrogates as one.
17
18 2004-09-19  Kenichi Handa  <handa@m17n.org>
19
20         * mtext.c (default_utf_16, default_utf_32): Rename them to
21         MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively.  Caller
22         changed.
23
24         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
25         them.
26
27 2004-09-13  Kenichi Handa  <handa@m17n.org>
28
29         * draw.c (Mlatin): Don't declare it here.
30         (visual_order): Fix reordering of combining characters.
31         (compose_glyph_string): Fix detection of script.
32         (layout_glyphs): Don't fix reordering of combining characters
33         here.
34         (layout_glyph_string): Pay attention to
35         control->disable_overlapping_adjustment.
36         (truncate_gstring): Include at least on character in a line.
37         (get_gstring): Always scan one full line.
38         (mdraw__init): Don't initialize Mlatin here.
39         (mdraw_text_per_char_extents): Fix iteration.  If a glyph doesn't
40         have a font, use ascent/descent of an ASCII font.  Allow
41         ink_array_return and logical_array_return to be NULL.
42         (mdraw_coordinates_position): Fix iteration.
43
44         * font-ft.c (MFTtoProp): Member completely changed.
45         (ft_to_prop): Adjusted for the above change.
46         (ft_to_prop_size): Likewise.
47         (set_font_info): Adjusted for the change of MFTtoProp.
48         (fc_generic_family_list): New variable.
49         (fc_list): Add special handling of generic font names.
50         (mfont__ft_init): Adjusted for the change of MFTtoProp.
51         Initialize fc_generic_family_list.
52         (mfont__ft_fini): Don't free ft_to_prop.  Free
53         fc_generic_family_list.
54         (FC_vs_M17N_font_prop): New type.
55         (fc_weight_table, fc_slant_table, fc_width_table): New variables.
56         (fc_decode_prop, fc_encode_prop): New functions.
57         (mfont__ft_parse_name): Use fc_decode_prop.
58         (mfont__ft_unparse_name): Use fc_encode_prop.
59
60         * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
61         (MWDevice): Add member realized_font_list.
62         (free_display_info): Don't free disp_info->realized_font_list.
63         (free_device): Free device->realized_fontset_list.
64         (xft_find_metric): Use gstring->frame instead of rfont->frame.
65         (device_open): Don't initialize disp_info->realized_font_list.
66         (device_open): Initialize device->realized_font_list and set it to
67         frame->realized_font_list.
68
69         * fontset.c (try_font_group): New function.
70         (mfont__lookup_fontset): Use try_font_group.
71
72         * font.c (common_weight): Change the order of "regular".
73
74         * face.c (Mlatin): Don't make it static.
75         (mface__realize): Be sure to set work_gstring.frame.
76         (mface__for_chars): Likewise.
77
78         * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
79         MTEXT_FORMAT_UTF_8.
80
81         * internal-gui.h (Mlatin): Extern it.
82
83         * m17n-gui.h (MDrawControl): New member
84         disable_overlapping_adjustment.
85
86 2004-09-06  Kenichi Handa  <handa@m17n.org>
87
88         * font-flt.c (run_otf): Fix typo ('}'->']').
89
90         * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
91         (COMBINING_PRECOMPUTED_P): New macros.
92
93         * draw.c (layout_glyphs): Handle precomputed combining code.
94
95         * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
96         precomupted combining code.
97
98 2004-09-03  Kenichi Handa  <handa@m17n.org>
99
100         * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
101         otf_gstring.glyphs.
102
103 2004-08-27  Kenichi Handa  <handa@m17n.org>
104
105         * face.c (mface_put_prop): If the new value is the same as the
106         current one, don't increment frame->tick.
107
108 2004-08-25  Kenichi Handa  <handa@m17n.org>
109
110         * fontset.c (mfontset): Initialize font_spec_list member.
111         (mfontset_copy): Load fontset if necessary.
112
113         * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
114         'metrics' to for C++.
115
116         * draw.c (mdraw_glyph_info): Adjusted for the member name change
117         (this -> metics).
118
119 2004-08-16  Kenichi Handa  <handa@m17n.org>
120
121         * Version 1.1.0 released.
122
123 2004-08-13  Kenichi Handa  <handa@m17n.org>
124
125         * language.c (mlang__init): Add Dhivehi.
126
127         * m17n-gui.c (Mx, Mfreetype): Delete it.
128         (m17n_init_win): Don't initialize Mx and Mfreetype here.
129
130         * m17n-gui.h (Mfreetype, Mxft): Extern them.
131         (mfont_resize_ratio): Extern it.
132         (MDrawGlyphInfo): New member logical_width;
133         (MDrawGlyph): New type.
134         (mdraw_glyph_list): Prototype adjusted.
135
136         * m17n-X.c (xfont_open): Set type and fontp members.
137         (xft_open): Likewise.
138
139         * internal-gui.h (Mx, Mfreetype): Delete extern.
140
141         * font.h (struct MRealizedFont): New member type and fontp.
142
143         * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
144         (Mx, Mfreetype): Declare here.
145         (Mxft): New variable.
146         (mfont_resize_ratio): New function.
147
148         * font-ft.c (ft_open): Set type and fontp members.
149
150         * draw.c (mdraw_glyph_list): Argument type changed.  Don't set
151         glyph_code member.
152
153 2004-08-11  Kenichi Handa  <handa@m17n.org>
154
155         * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
156         FT_LOAD_DEFAULT.
157
158 2004-08-06  Kenichi Handa  <handa@m17n.org>
159
160         * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
161         feature to apply.
162
163         * font-flt.c (run_otf): Print debugging information if necessary.
164
165 2004-08-05  Kenichi Handa  <handa@m17n.org>
166
167         * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff.  Support
168         positioning_type 5 and 6.  Switch simplified.
169
170 2004-08-04  Kenichi Handa  <handa@m17n.org>
171
172         * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
173
174 2004-08-02  Kenichi Handa  <handa@m17n.org>
175
176         * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
177         set val to 1 even if it is greater than 1.
178
179         * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
180
181 2004-07-29  Kenichi Handa  <handa@m17n.org>
182
183         * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
184         debugging information.
185
186         * internal.h (MDEBUG_PRINT5): New macro.
187
188         * draw.c (layout_glyphs): Don't combine a zero width glyph with
189         the previous one if the zero width glyph has left or right
190         padding.
191
192 2004-07-26  Kenichi Handa  <handa@m17n.org>
193
194         * m17n-X.c (xft_render): Pay attention to members left_padding and
195         right_padding of MGlyph.
196
197         * draw.c (visual_order): Allocate one more elements for arrays as
198         a workaround of fribidi bug.
199         (layout_glyphs): Fix previous change. Check MGlyph->combining_code
200         instead of MGlyph->bidi_sensitive.
201         (layout_glyph_string): Pay attentinon to
202         control->orientation_reversed when padding at the head or tail.
203         Fix adjustment of space glyph width.
204         (get_gstring): If cursor_width or cursor_bidi is changed, don't
205         use a cache.
206
207         * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
208         instead of MGlyph->bidi_sensitive.
209
210         * internal-gui.h (MGlyph): Delete member bidi_sensitive.
211
212 2004-07-26  Kenichi Handa  <handa@m17n.org>
213
214         * draw.c (visual_order): Don't treat combined glyphs specially.
215         (layout_glyphs): Don't get metrics glyphs that are already ready.
216         Pay attention to MGlyph->bidi_sensitive.  Combine a glyph of zero
217         width with the previous one. 
218         (draw_background): Fix bar cursor position on a r2l glyph.
219
220         * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
221         (run_rule): Fix place of updating cluster_begin_pos and
222         cluster_end_pos here.
223         (run_otf): Don't set left_padding.
224
225         * font-ft.c (adjust_anchor): Type of argument `code' changed.
226         Caller changed.
227         (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
228         Fix handling of GPOS.
229         (mfont__ft_drive_gpos): Delete this function.
230
231         * font.h (mfont__ft_drive_otf): Renamed back from
232         mfont__ft_drive_gsub.
233         (mfont__ft_drive_gpos): Delete extern.
234
235         * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
236         (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
237
238 2004-07-23  Kenichi Handa  <handa@m17n.org>
239
240         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
241         the same bidi level.
242
243         * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
244
245 2004-07-22  Kenichi Handa  <handa@m17n.org>
246
247         * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
248
249 2004-07-20  Kenichi Handa  <handa@m17n.org>
250
251         * draw.c (render_glyphs): Fix checking of g->code validity.
252
253         * face.c (mface__realize): Set g.type.
254
255 2004-07-18  Kenichi Handa  <handa@m17n.org>
256
257         * Makefile.am: Prepend ${top_srcdir} to all *.la in
258         *_LIBADD/*_LDADD.
259
260         * m17n-gui.c (mframe): Print error message give by dlopen to
261         stderr.
262
263 2004-07-16  Kenichi Handa  <handa@m17n.org>
264
265         * draw.c (compose_glyph_string): Improve the way of deciding a
266         script.  For a character that doesn't have script property, use
267         the last non-latin script.
268
269         * font-ft.c (fc_list): Cancel previous change.
270         (mfont__ft_init): Add more entries in ft_to_prop_name.
271
272 2004-07-15  Kenichi Handa  <handa@m17n.org>
273
274         * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
275         previous or next character glyphs.
276
277 2004-07-14  Kenichi Handa  <handa@m17n.org>
278
279         * draw.c (compose_glyph_string): Be sure to set codes for glyphs
280         of type GLYPH_SPACE.
281
282         * fontset.c (mfont__lookup_fontset): If glyph type is
283         GLYPH_SPACE, get codes for SPACE.
284
285         * internal-gui.h (Mfont): Delete extern.
286
287         * m17n-gui.h (Mfont): Delete duplicated extern.
288
289 2004-07-13  Kenichi Handa  <handa@m17n.org>
290
291         * font-ft.c (DEVICE_DELTA): New macro.
292         (adjust_anchor): New function.
293         (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf.  Drive
294         only GSUB.
295         (mfont__ft_drive_gpos): New function.
296
297         * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
298         (FontLayoutContext): Delete member `rfont'.
299         (run_otf): Set g->otf_cmd.  Call 
300         (mfont__flt_run): Don't set ctx.rfont.  Call mfont__ft_decode_otf
301         only whne HAVE_OTF is defined.
302
303         * fontset.c: Include "config.h".
304
305         * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
306         (MGlyph): New member otf_cmd.
307
308         * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
309         (mfont__ft_drive_gpos): Extern it.
310
311         * face.c: Include "config.h".
312
313         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
314
315         * input-gui.c: Include "config.h".
316
317         * plist.c: Include "config.h".
318
319 2004-07-06  Kenichi Handa  <handa@m17n.org>
320
321         * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
322         internal-gui.h: Cancel previous changes.
323
324         * m17n-gd.h: Delete it.
325
326         * Makefile.am (libm17n_core_la_LIBADD): New variable.
327         (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
328         @XML2_LD_FLAGS@ to above.
329         (libm17n_la_LIBADD): Add -ldl.
330         (libm17n_la_LDFLAGS): Add -export-dynamic.
331         (X_LD_FLAGS): Fix the order of linking.
332         (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
333         (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
334         (libm17n_X_la_LDFLAGS): Add -module.
335         (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
336         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
337         (libm17n_gd_la_LDFLAGS): Add -module.
338         (include_HEADERS): Delete m17n-gd.h.
339
340 2004-06-30  Kenichi Handa  <handa@m17n.org>
341
342         * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
343         (MDeviceLibraryInterface): Delete it.
344         (register_device_library): Delete it.
345         (m17n__device_library_list): Renamed from device_library_list.
346
347         * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
348         (m17n_init_win): Adjust prototype.
349
350         * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
351         (m17n_init_gd): New function. 
352
353         * m17n-gd.h: New file.
354
355         * m17n-X.h: Include <m17n-gui.h>.
356         (m17n_init_X): Extern it.
357         (M17N_INIT): Redefine it.
358
359         * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
360         (m17n_init_X): New function.
361
362         * internal-gui.h (m17n__device_library_list): Extern it.
363         (struct MDeviceDriver): New members initialized, init, and fini.
364
365         * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
366         @XFT2_LD_FLAGS@.
367         (libm17n_X_la_LIBADD): Delete aboves.
368         (libm17n_gd_la_SOURCES): Add m17n-gd.h.
369         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
370         (libm17n_gd_la_LDFLAGS): Delete it.
371         (include_HEADERS): Add m17n-gd.h.
372
373 2004-06-25  Kenichi Handa  <handa@m17n.org>
374
375         * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
376         (libm17n_gd_la_LDFLAGS): Cancel previous change.
377
378         * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
379
380         * font-ft.c (fc_list): If FcFontList finds no font, try
381         FcFontMatch.
382
383         * draw.c (compose_glyph_string): Terminate the last loop after
384         doing default combining if necessary.
385
386 2004-06-24  Kenichi Handa  <handa@m17n.org>
387
388         * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
389
390         * character.c (mchar_define_property): Add const to an arg.
391
392         * charset.c (mchar_define_charset): Add const to an arg.
393
394         * coding.c (MCodingSystem): Add const to an arg or decoder.
395         (finish_decoding): Add const to an arg.
396         (decode_coding_charset, decode_coding_utf_8)
397         (decode_coding_utf_16, decode_coding_utf_32)
398         (decode_coding_iso_2022, decode_coding_sjis)
399         (mconv_define_coding): Likewise.
400
401         * m17n-X.c (xft_find_metric): Delete unused variable.
402
403         * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
404         prototypes.
405
406         * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
407         prototypes.
408
409         * mtext.c (count_utf_8_chars, count_utf_16_chars)
410         (mtext__from_data, mtext_from_data): Add `const' to an arg.
411
412         * mtext.h (mtext__from_data): Ajust prototype.
413
414 2004-06-23  Kenichi Handa  <handa@m17n.org>
415
416         * draw.c (compose_glyph_string): Always get glyph codes by
417         mface__for_char.
418         (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
419         (mdraw_glyph_list): New function.
420
421         * font-flt.c (mfont__flt_run): Be sure to call
422         rfont->driver->encode_char.
423
424         * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
425         (ft_encode_char): Delete arg C.
426         (ft_render): Don't call FT_Get_Char_Index.
427
428         * font.c (mfont__encodable_p): Delete it.
429         (mfont__encode_char): Be sure to call rfont->driver->encode_char.
430
431         * font.h (struct MFontDriver): Delete arg C of encode_char.
432         (mfont__encodable_p): Delete extern.
433
434         * m17n-X.c (xfont_encode_char): Delete arg C.
435         (xft_find_metric): Don't cal FT_Get_Char_Index.
436         (xft_render): Likewise.
437
438         * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
439         logical_width.
440         (mdraw_glyph_list): Extern it.
441
442         * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
443
444 2004-06-22  Kenichi Handa  <handa@m17n.org>
445
446         * m17n-gui.h (mfontset_lookup): Extern it.
447
448         * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
449
450         * fontset.c (realize_fontset_elements)
451         (free_realized_fontset_elements, update_fontset_elements): New
452         functions.
453         (mfont__realize_fontset): Call realize_fontset_elements.
454         (mfont__free_realized_fontset): Call free_realized_fontset_elements.
455         (mfont__lookup_fontset): If a fontset was modified, update
456         the realized fontset.
457         (mfontset_modify_entry): Increment fontset->tick.
458         (mfontset_lookup): New function.
459
460 2004-06-21  Kenichi Handa  <handa@m17n.org>
461
462         * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
463
464         * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
465         (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
466         length of source text 0.
467
468 2004-06-21  Kenichi Handa  <handa@m17n.org>
469
470         * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
471         (compare): Pay attention to format other than utf-8.
472         (copy): Delete this function.
473         (count_by_utf_8, count_by_utf_16, insert): New functions.
474         (count_utf_16_chars): Fix handling of a surrogate pair.
475         (find_char_forward, find_char_backward): Likewise.
476         (mtext__from_data): Delete unnecessary check.  Fix number of
477         allocated bytes.
478         (mtext_from_data): Don't count items.
479         (mtext_ref_char): Optimize the code.
480         (mtext_set_char): Pay attention to format other than utf-8.
481         (mtext_cat_char): Likewise.
482         (mtext_dup): Don't call copy, instead do allocation here.
483         (mtext_cat): Call insert instead of copy.
484         (mtext_ncat): Likewise.
485         (mtext_cpy): Delete character at first and call insert instead of
486         copy.
487         (mtext_ncpy): Likewise.
488         (mtext_copy): Likewise.
489         (mtext_duplicate): Call insert instead of copy.
490         (mtext_del): Pay attention to format other than utf-8.
491         (mtext_ins): Simply call insert.
492         (mtext_ins_char): Pay attention to format other than utf-8.
493         (mtext_tok): Call insert instead of copy.
494         (mtext_text): Call UNIT_BYTES.
495
496         * textprop.c (mtext__adjust_plist_for_change): New function.
497
498         * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
499         (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
500         (CHAR_UNITS_AT): Fix typo.
501         (CHAR_UNITS_BY_HEAD): Fix typo.
502         (STRING_CHAR_AND_UNITS): Fix typo.
503
504         * internal.h (MTEXT_READ_ONLY_P): New macro. 
505
506         * mtext.h (mtext__replace): Delete the extern.
507         (mtext__adjust_foramt): Adjust prototype.
508
509         * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
510         if possible.  Otherwise make a copy of mmt.
511
512         * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
513         utf-8.
514
515 2004-06-18  Kenichi Handa  <handa@m17n.org>
516
517         * character.h (CHAR_STRING_UTF16): Fix syntax.
518
519 2004-06-16  Kenichi Handa  <handa@m17n.org>
520
521         * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
522         (libm17n_X_la_LIBADD): Delete it.
523         (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
524
525         * m17n-X.c (device_open): Add parens in `if' condition.
526
527         * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
528         (DEC_POSITION): Likewise.
529         (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
530
531 2004-06-15  Kenichi Handa  <handa@m17n.org>
532
533         * fontset.c (mfont__lookup_fontset): Fix selection of font groups
534         by language.
535
536         * draw.c (compose_glyph_string): If langauge is specified, call
537         mface__for_chars even if a text is all latin.  Fix condition for
538         setting non_ascii_found.
539
540         * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
541
542         * m17n.h (minput_char_to_key): Delete extern.
543
544         * m17n-gui.h (minput_event_to_key): Cancel previous change.
545
546         * m17n-gui.c (null_device_open): Set several members of frame.
547
548 2004-06-14  Kenichi Handa  <handa@m17n.org>
549
550         * m17n-gui.h (minput_event_to_key): Delete extern.
551
552         * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
553
554         * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
555
556         * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
557
558 2004-06-08  Kenichi Handa  <handa@m17n.org>
559
560         * character.c (mchar_put_prop): Don't increment the ref-count of
561         record->table.
562
563 2004-06-04  Kenichi Handa  <handa@m17n.org>
564
565         * m17n-core.c (mdebug__register_object): New function.
566         (mdebug__unregister_object): Likewise.
567
568         * internal.h (mdebug__register_object, mdebug__unregister_object):
569         Extern them.
570         (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
571         respectively.
572
573         * charset.c (mcharset__load_from_database): Don't call
574         mconv__register_charset_coding here.
575
576         * coding.c (find_coding): Get a real name from an element of
577         coding_definition_list.
578         (mconv__register_charset_coding): Set the real name at the top of
579         param.
580         (mcoding__load_from_database): Likewise.
581         (mconv_list_codings): Adjusted for the above change.
582
583 2004-06-03  Kenichi Handa  <handa@m17n.org>
584
585         * coding.c (find_coding): Find by canonicalized name.  Don't have
586         to modify the element of coding_definition_list by
587         mplist__from_plist.
588         (mconv__define_coding_from_charset): Delete it.
589         (mconv__register_charset_coding): Canonicalize sym.
590         (mcoding__load_from_database): Register plist modified by
591         mplist__from_plist.
592
593         * coding.h (mconv__define_coding_from_charset): Don't extern it.
594
595         * font-ft.c (ft_open): Fix setting of rfont->descent.
596
597 2004-06-02  Kenichi Handa  <handa@m17n.org>
598
599         * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
600         (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
601         (xlfd_unparse_name): Renamed from xfont_build_name.
602         (mfont__init): Initialized Mfontconfig.
603         (mfont__free_realized): Unconditionally unref rfont->info.
604         (mfont__select): Free `this' if it's not best.
605         (mfont__open): Don't check frame->realized_font_list.
606         (mfont__parse_name_into_font): New function.
607         (Mfontconfig): New variable.
608         (mfont_from_name): Call mfont_parse_name.
609         (mfont_name): Call mfont_unparse_name.
610         (mdebug_dump_font): Likewise.
611
612         * font.h (struct MFontDriver): Delete members parse_name and
613         build_name.
614         (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
615         (mfont__parse_name_into_font): Extern it.
616
617         * font-ft.c: Include "symbol.h".
618         (close_ft): Unconditionally free filename and charmap_list of
619         ft_into.
620         (ft_open): Duplicate base->filename.  Increment ref-count of
621         ft_info->charmap_list.  Free ft_info->charmap_list and
622         ft_info->filename on error.
623         (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
624
625         * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
626         xfont_build_name.
627         (enum xlfd_field_idx): Moved to font.c.
628         (split_font_name, build_font_name): Likewise.
629         (build_font_list): Call mfont__parse_name_info_font.
630         (xfont_open): Call mfont__unparse_name.  Free name.
631         (xfont_parse_name, xfont_build_name): Moved to font.c
632         (xft_select): Prototype deleted.
633         (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
634         Call mfont_pase_name.
635
636         * m17n-gui.c (free_frame): Unref frame->font_driver_list.
637         (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
638         (mframe): Likewise.
639
640         * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
641         Extern them.
642
643         * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
644
645 2004-06-01  Kenichi Handa  <handa@m17n.org>
646
647         * fontset.c (mfontset_modify_entry): Pay attention to the case
648         that fontset->font_spec_list is NULL.
649
650 2004-05-31  Kenichi Handa  <handa@m17n.org>
651
652         * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
653
654         * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
655
656         * font.c (mfont__select): Print score the a font for debugging.
657
658         * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
659
660         * coding.c (reset_coding_sjis): Check kanji and kana instead of
661         kanji_sym and kana_sym.
662
663 2004-05-28  Kenichi Handa  <handa@m17n.org>
664
665         * Makefile.am (VINFO): New variable.
666         (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
667         (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
668
669 2004-05-27  Kenichi Handa  <handa@m17n.org>
670
671         The following chanages are to make device dependent functions
672         accessible only from MDeviceDriver structure, and to add GD and
673         null device drivers.  Font drivers get also device dependent.
674
675         * m17n.c (m17n_init): Increament shell_initialized.
676         (m17n_fini): Decremented shell_initialized.
677
678         * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
679
680         * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
681         (Mwidget, Mcolormap, Mx): Extern them.
682
683         * m17n-gui.c: Include <dlfcn.h> and "config.h".
684         (free_frame): Call frame->driver->close instead of
685         mwin__close_device.
686         (DLOPEN_SHLIB_EXT): New macro.
687         (MDeviceLibraryInterface): New type.
688         (device_library_list): New variable.
689         (register_device_library): New function.
690         (null_device): New variable.
691         (null_device_close, null_device_get_prop)
692         (null_device_realize_face, null_device_free_realized_face): New
693         function.
694         (null_driver): New variable.
695         (null_device_init, null_device_fini, null_device_open): New
696         functions.
697         (null_interface): New variable.
698         (Mfreetype, Mdevice): Declare them.
699         (m17n_init_win): Increment win_initialized.  Initialize Mx, Mgd,
700         Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
701         Mwin__Close_Device.  Register drivers for Mx and Mgd.
702         (m17n_fini_win): Decremented win_initialized.  Call "fini"
703         function of all opened devices.  Don't call mwin__fini.
704         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
705         Declare them here.
706         (mframe): Handle Mdevice key of PLIST.
707         (mframe_get_prop): Call frame->device->get_prop instead of
708         mwin__device_get_prop.
709
710         * m17n-gd.c: New file.
711
712         * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
713         (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
714
715         * m17n-core.c (m17n_init_core): Increate core_initialized.
716         (m17n_fini_core): Decremented core_initialized.
717
718         * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
719         (Mcolormap): Don't extern them here.
720
721         * m17n-X.c (FRAME_DEVICE): New macro.
722         (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
723         (free_display_info): Use MPLIST_DO.
724         (free_device): Free rface->info.
725         (xft_close): Delete it.
726         (device_init): Renamed from mwin__init.
727         (device_fini): Renamed from mwin__fini.
728         (device_open): Renamed from mwin__open_device.
729         (x_driver): New variable.
730         (MXFontInfo): Delete member frame, add member display.
731         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
732         Don't declare them here.
733
734         * internal-gui.h (MDeviceType): New enum.
735         (MWDefice): Delete it.
736         (struct MFrame): Change type of device to void *.  New members
737         device_type, driver, font_driver_list.
738         (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
739         (MDeviceDriver): New type.
740         (Mx, Mgd, Mfreetype): Extern them.
741         (mwin__XXX): Delete all of them.
742
743         * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
744         mwin__XXX.
745         (win_destroy_ic): Likewise.
746         (adjust_window_and_draw): Likewise.
747         (win_callback): Likewise.
748         (Mxim): Declare it here.
749         (minput_event_to_key): Call M_CHECK_READABLE.
750
751         * fontset.c (mfont__lookup_fontset): Delete local variable
752         font_group.
753
754         * font.h (struct MFontDriver): Delete member close, add members
755         parse_name and build_name.
756         (mfont__driver_list): Delete extern.
757         (mfont__close): Delete extern.
758
759         * font.c (mfont__init): Don't set mfont__driver_list.
760         (mfont__fini): Don't unref mfont__driver_list.
761         (mfont__select): Try font drivers in frame->font_driver_list.  Set
762         driver member of a realized font.
763         (mfont__close): Delete it.
764         (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
765         functions of the default frame.
766
767         * font-ft.c (close_ft): Check ft_info->ft_face and work
768         differently.
769         (add_font_info): Allocate ft_info by M17N_OBJECT.
770         (ft_close): Delete it.
771         (mfont__ft_driver): Don't set ft_close.
772         (ft_select): Increment ref-count of best_font.
773         (ft_open): Decremented ref-count of base.  On error, call
774         FT_Done_Face and free ft_info.
775         (ft_find_metric): Always use XXX_MONO in load_flags.
776         (ft_render): Fix setting of width.  Call
777         frame->driver->draw_points instead of mwin__draw_points.
778         (ft_to_prop): Don't set mfont__driver_list.
779         (mfont__ft_fini): Just unref ft_info.
780
781         * face.c (mface__init): Exchange foreground and background of
782         mface__default.  Call mface_put_prop to set hline of
783         mface_underline,
784         (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
785         (mface__free_realized): Don't call mwin__free_realized_face.
786
787         * draw.c (Mdepth): Don't declare it here.
788         (draw_background): Call frame->driver->XXX instead of mwin__XXX.
789         (render_glyphs, render_glyph_string): Likewise.
790         (mdraw__init): Don't set Mdepth.
791         (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
792         M_CHECK_WRITABLE.
793         (mdraw_text_per_char_extents): Return 0 on success and -1 on
794         error.
795         (mdraw_text_items): Check FRAME is writable.
796         (mdraw_per_char_extents): Implement body.
797
798         * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
799         libm17n-gd.la.
800         (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
801         (GUI_SOURCES): Delete it.
802         (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
803         (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
804         (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
805         (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
806         (linkgui_LDADD): Set to libm17n-gui.la
807         (linkgui_LDFLAGS): New target.
808         (SRC): Include ${libm17n_gui_la_SOURCES} and
809         ${libm17n_gd_la_SOURCES}.
810
811 2004-05-24  Kenichi Handa  <handa@m17n.org>
812
813         * draw.c (draw_background): Don't draw background even if
814         rface->face.property[MFACE_BACKGROUND] is not Mnil.
815
816 2004-05-22  Kenichi Handa  <handa@m17n.org>
817
818         * m17n-X.c (xft_open_font): Fix anti_alias setting.
819
820 2004-05-20  Kenichi Handa  <handa@m17n.org>
821
822         * m17n-gui.h (MFaceHookFunc): Change this function type to void.
823
824         * m17n-gui.c: Include "plist.h".
825         (mframe): If PLIST is NULL, initialize it to emply plist.
826
827         * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
828         (xft_driver): New variable.
829         (xft_select, close_xft, xft_open_font, xft_open, xft_close)
830         (xft_find_metric, xft_render): New function.
831         (mwin__init): Adjusted for the new mfont__driver_list.
832         (mwin__open_device): Assume arg PARAM is not NULL.  Push a newly
833         generated face to PARAM.
834         (mwin__realize_face): Fix setting of box colors.  Don't call hook
835         function here.
836         (mwin__draw_hline): New function.
837         (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
838         (mwin__xft_render): Delete these function.
839
840         * internal-gui.h (struct MFrame): New member tick.
841         (struct MGlyphString): New member tick.
842         (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
843         (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
844         (mwin__xft_render): Delete extern.
845
846         * fontset.c (mfont__lookup_fontset): Make the code simpler.
847         (mfontset): Always increment the reference count of returned
848         object.
849
850         * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
851         (MFTInfo): Moved to font.h.
852         (ft_iso8859_1_font_list): Delete this variable.
853         (set_font_info): Don't set font->property[MFONT_TYPE].
854         (set_font_info): Don't udpate ft_iso8859_1_font_list.
855         (add_font_info): Change type to void.
856         (fc_list): Change anme from xft_list.  Caller changed.  Include
857         FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
858         (mfont__ft_driver): Change name from ft_driver.  Caller changed.
859         (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
860         (close_ft): Don't call mwin__xft_close.  Unref
861         ft_info->extra_info.
862         (ft_open): Don't setup ft_info->fontname.  Don't call
863         mwin__xft_open.
864         (ft_find_metric): Don't call mwin__xft_get_metric.
865         (ft_encode_char): Call rfont->driver->open instead of ft_open.
866         (ft_render): Don't check HAVE_XFT2.  Don't call mwin__xft_render.
867         (mfont__ft_init): Adjusted for new mfont__driver_list.
868         (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
869
870         * font.c (mfont__driver_list): Make it MPlist.
871         (mfont__init): Adjust initialization of mfont__driver_list.
872         (mfont__fini): Free mfont__driver_list.
873         (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
874         (mfont__select): Adjusted for the new mfont__driver_list.
875
876         * font.h (enum MFontProperty): Delete MFONT_TYPE.
877         (mfont__drirver_list): Adjust prototype.
878         (MFTInfo): Move to here from fron.c.  Deleve member fontname.
879
880         * face.h (struct MFace): Delete member realized_face_list, add
881         member frame_list.
882         (struct MRealizedFace): Delete member need_update
883         andnofont_rface, add member non_ascii_list.
884         (mface__update_frame_face): Extern it.
885
886         * face.c (hline_prop_list, box_prop_list, noop_hook): New
887         variables.
888         (get_hline_create, get_box_create): New functions.
889         (find_realized_face): Cancel previous change.  Arg RFONT deleted.
890         Use memcmp.
891         (free_face): Cancep previous change.  Free face->frame_list.
892         (serialize_hline): Do nothing if hline->width is zero.
893         (serialize_box): Do nothing if box->width is zero.
894         (mface__init): Setup all properties of mface__default.
895         (mface__fini): Free hline_prop_list and box_prop_list.
896         (mface__realize): Cancel previous change.  Update
897         face->frame_list.  Setup rface->non_ascii_list.
898         (mface__for_chars): Update rface->non_ascii_list.
899         (mface__free_realized): Free rface->non_ascii_list.
900         (mface__update_frame_face): New function.
901         (mface): Initialize face->frame_list.
902         (mface_copy): Likewise.  Just copy MFACE_HLINE and MFACE_BOX
903         properties.
904         (mface_merge): Likewise.
905         (mface_put_prop): If key is Mhline or Mbox, get value by
906         get_hline_create or get_box_create respectively.
907         (mface_put_prop): Update frame->tick and call
908         mface__update_frame_face if necessary.
909         (mface_update): Do nothing if func is noop_hook.
910
911         * draw.c (render_glyphs): If a font is not found, use
912         mwin__draw_empty_boxes.
913         (alloc_gstring): Initialize gstring->tick.
914         (get_gstring): Check gstring->tick.
915
916 2004-05-17  Kenichi Handa  <handa@m17n.org>
917
918         * face.c (find_realized_face): Return value changed.  If RFONT is
919         NULL, avoid unnecessary checking.
920         (free_face): Free face->realized_face_list.
921         (mface__realize): Adjusted for the change of find_realized_face.
922         If it returns a realized face that needs update, free it and
923         realize a new one.  Push a new realized face to
924         frame->realized_face_list instead of appending.
925         (mface__for_chars): Adjusted for the change of find_realized_face.
926         Short cut if the required font is in rface->ascii_rface.
927         (mface_put_prop): Free old value if necessary.  Set need_update
928         member of realized faces to 1.
929
930         * face.h (struct MFace): Delete member tick, add member
931         realized_face_list.
932         (struct MRealizedFace): Delete member tick, add member
933         need_update.
934
935 2004-05-13  Kenichi Handa  <handa@m17n.org>
936
937         * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
938
939 2004-05-12  Kenichi Handa  <handa@m17n.org>
940
941         * internal-gui.h (mwin__xft_open): Arguemnt name changed.
942
943         * m17n-X.c (mwin__xft_open): Argument changed to fontname and
944         parse it XftNameParse.
945
946         * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
947         (all_fonts_scaned): New variable.
948         (set_font_info): FAMILY may be Mnil.
949         (add_font_info): Argument changed.
950         (xft_list): Call add_font_info in it.
951         (ft_list): Likewise.
952         (ft_select): Make it work in the case family is Mnil.
953         (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
954         (mfont__ft_fini): Set all_fonts_scaned to 0.
955
956         * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
957         that is failed to open.
958
959 2004-05-10  Kenichi Handa  <handa@m17n.org>
960
961         * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
962         device's depth is 1 (i.e. monochrome).
963
964         * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
965         to work around the problem of libtool.
966
967         * font-ft.c: Include <freetype/ftbdf.h>.
968         (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
969         variables.
970         (mfont__ft_init): Initialize them.
971         (ft_iso8859_1_font_list): New variable.
972         (set_font_info): Detect a font containing iso8859-1 glyphs and
973         register it in ft_iso8859_1_font_list.  If the font is not
974         scalable, assume it as BDF or PCF font and setup SIZE and RESY
975         properties of the font from its properties.
976         (add_font_list): If the font is not scalable, check if it is BDF
977         or PCF font.  If not, ignore it.
978         (ft_select): If FAMILY is Mnil, return NULL only if the requested
979         registry is not iso8859-1.
980         (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
981         ft_iso8859_1_font_list.
982         (ft_find_metric): If the font is not scalable, assume it as BDF
983         or PCF, and get a metric from its properties.
984         (mfont__ft_fini): Free ft_iso8859_1_font_list.
985
986 2004-05-07  Kenichi Handa  <handa@redhat.m17n.org>
987
988         * Makefile.am (libm17n_la_LIBADD): Include -ldl.
989         (libm17n_la_LDFLAGS): Delete it.
990         (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
991         (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
992
993 2004-05-06  Kenichi Handa  <handa@m17n.org>
994
995         * draw.c (compose_glyph_string): Fix previous change.
996
997 2004-04-30  Kenichi Handa  <handa@m17n.org>
998
999         * font-ft.c (ft_list): Delete unused variable `result'.
1000         (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1001
1002 2004-04-27  Kenichi Handa  <handa@m17n.org>
1003
1004         * m17n-X.c: Include config.h
1005         [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1006         (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1007         (MWDevice) [HAVE_XFT2]: New member xft_draw.
1008         (FRAME_CMAP, FRAME_VISUAL): New macros.
1009         (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1010         (xfont_driver): Make it static.
1011         (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1012         (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1013         info->xft_color_back.
1014         (MXftFontInfo) [HAVE_XFT2]: New type.
1015         (mwin__xft_close) [HAVE_XFT2]: New function.
1016         (mwin__xft_open) [HAVE_XFT2]: New function.
1017         (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1018         (mwin__xft_render) [HAVE_XFT2]: New function.
1019
1020         * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1021         (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1022         (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1023         externs.
1024
1025         * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1026
1027         * font-ft.c: Don't include FT_FREETYPE_H here.
1028         [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1029         (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1030         (MFTInfo): New member charmap_index.
1031         (MFTInfo) [HAVE_XFT2]: New member xft_info.
1032         (check_otf_filename): Renamed from check_filename.  Return value
1033         changed.
1034         (ft_set_property): This function deleted.
1035         (set_font_info): New function.
1036         (add_font_list): Argument changed.  Add multiple fonts.
1037         (xft_list) [HAVE_XFT2]: New function.
1038         (ft_list) [not HAVE_XFT2]: New function.
1039         (ft_select): Add code for Xft.
1040         (close_ft): Likewise.
1041         (ft_open): Likewise.
1042         (ft_find_metric): Likewise.
1043         (ft_encode_char): Likewise.
1044         (ft_render): Likewise.
1045
1046         * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1047
1048 2004-04-26  Kenichi Handa  <handa@m17n.org>
1049
1050         * textprop.c (mtext_attach_property): Declare the return type as
1051         `int'.
1052
1053 2004-04-21  Kenichi Handa  <handa@m17n.org>
1054
1055         * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1056
1057 2004-04-09  Kenichi Handa  <handa@m17n.org>
1058
1059         * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1060         seq_to.
1061         (load_command): Setup above members.
1062
1063 2004-04-05  Kenichi Handa  <handa@m17n.org>
1064
1065         * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1066
1067 2004-03-30  Kenichi Handa  <handa@m17n.org>
1068
1069         * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1070         >= 0x10000.
1071
1072         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1073         (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1074
1075 2004-03-29  Kenichi Handa  <handa@m17n.org>
1076
1077         * Version 1.0 Patch Level 2 released.
1078
1079 2004-03-29  Kenichi Handa  <handa@m17n.org>
1080
1081         * charset.c (make_charset): Set charset->fully_loaded and
1082         charset->simple correctly.  Don't try to get charset->min_char and
1083         charset->max_char for a charset of method subset and superset.
1084         Don't load a mapping file here.
1085         (mcharset__init): Set unified_max.
1086         (mcharset__load_from_database): Free a working plist.
1087
1088         * coding.c (mcoding__fini): Free all malloced data.
1089
1090         * input-gui.c (win_create_ic): Set control.as_image for preediting
1091         to 0.
1092
1093         * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1094         `count') to initialize the array.
1095
1096         * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1097         M17N_OBJECT_UNREF.
1098
1099         * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1100         rectangle.
1101         (mwin__create_window): Fix bug of setting a background pixel of a
1102         new window.
1103         (mwin__adjust_window): Clear the window before drawing.
1104
1105         * m17n-core.c (mdebug__report_object): Free array->objectes if
1106         necessary.
1107         (m17n_init_core): Don't set report_header_printed to 0 here.
1108         Fix debugging information.
1109         (m17n_fini_core): Set report_header_printed to 0 here.
1110
1111         * m17n-core.h (mplist_deserialize): Extern it.
1112
1113         * m17n-gui.c (m17n_fini_win): Fix debugging information.
1114
1115         * m17n.c (m17n_fini): Fix debugging information.
1116
1117         * mtext.c (mtext__adjust_foramt): New function.
1118
1119         * mtext.h (mtext__adjust_foramt): Extern it.
1120
1121         * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1122
1123         * plist.h (mplist__deserialize): Don't extern it.
1124
1125         * symbol.c (msymbol__fini): Set freed_symbols to 0.  Set all
1126         elements of symbol_table to NULL.  Report about created and freed
1127         symbols if MDEBUG_FINI is set.
1128
1129 2004-03-22  Kenichi Handa  <handa@m17n.org>
1130
1131         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1132
1133         * m17n.c (m17n_init): Fix the way of checking merror_code.
1134
1135         * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1136
1137 2004-03-22  Kenichi Handa  <handa@m17n.org>
1138
1139         * fontset.c (realize_font_group): Adjust the font size by
1140         mfont__resize before selecting a font.
1141
1142         * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1143
1144 2004-03-19  Kenichi Handa  <handa@m17n.org>
1145
1146         * Version 1.0 Patch Level 1 released.
1147
1148 2004-03-19  Kenichi Handa  <handa@m17n.org>
1149
1150         * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1151
1152         * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1153
1154 2004-03-19  Kenichi Handa  <handa@m17n.org>
1155
1156         Re-apply the changes forgotten in the released version.
1157
1158         * charset.c (mcharset__load_from_database): Call
1159         mchar_define_charset.
1160
1161         * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1162         (mconv_encode_range): Put Mcoding text property.
1163
1164 2004-03-18  Kenichi Handa  <handa@m17n.org>
1165
1166         * draw.c (Mdepth): New variable.
1167         (visual_order): Delete unused local var `pos'.
1168         (compose_glyph_string): Fix for the case that gstring->glyphs is
1169         realloced.  Stop generating glyphs at TO.  Fix handling of
1170         control charaters.
1171         (layout_glyphs): Get metrics of all glyphs in advance.  Set
1172         lbearing and rbearing of base of composition glyph correctly.
1173         Handle left-overhang glyphs correctly.
1174         (alloc_gstring): New arg frame.  Set gstring->anti_alias.  Caller
1175         changed.
1176         (dump_combining_code): Change the defualt off_x character to ".".
1177         (mdraw__init): Initialize Mdepth.
1178
1179         * face.c (work_gstring): New variable
1180         (mface__init): Initialize work_gstring.
1181         (mface__fini): Free work_gstring.glyphs.
1182         (mface__realize): Don't handle videomode property here.  Adjusted
1183         for the change of mfont__get_metric.
1184         (mface__for_chars): Adjusted for the change of mfont__get_metric.
1185
1186         * face.h (enum face_gc): Moved to m17n-X.c.
1187
1188         * font.h (struct MFontDriver): Arguments of find_metric changed.
1189         (mfont__select): Prototype adjusted.
1190         (mfont__get_metric): Likewise.
1191         (mfont__ft_drive_otf): Likewise.
1192         (mfont__flt_run): Likewise.
1193         
1194         * font.c (mfont__select): New argument layouter.  If layouter is
1195         different in the registered font, make a new copy of realized
1196         font.
1197         (mfont__get_metric): Argument changed.  Get metrics of multiple
1198         glyphs.
1199         (mfont_find): Call mfont__select with layouter as Mnil.
1200
1201         * font-flt.c (FontLayoutContext): New member rfont.
1202         (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1203         (mfont__flt_run): Argument changed.  Initialize ctx.rfont.
1204
1205         * font-ft.c (ft_find_metric): Arguments changed.  Get metrics of
1206         multiple glyphs.
1207         (NUM_POINTS): New macro.
1208         (MPointTable): New type.
1209         (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1210         (mfont__ft_drive_otf): New argument rfont.
1211
1212         * fontset.c (realize_font_group): Adjusted for the changed of
1213         mfont__select.
1214         (check_fontset_element): This function deleted.
1215
1216         * input-gui.c (adjust_window_and_draw): Locate a preedit window
1217         off the parent window if the preedit text is zero length.
1218
1219         * internal-gui.h (struct MFrame): New members foreground,
1220         background, videomode, font.
1221         (struct MGlyphString): New member anti_alias.
1222         (MDrawPoint): New type.
1223         (mwin__draw_bitmap): Prototype deleted.
1224         (mwin__draw_points): Prototype added.
1225
1226         * m17n-gui.h (MDrawControl): New member anti_alias.
1227
1228         * m17n-gui.c (free_frame): Free frame->font.
1229         (mframe): Set the fontset of frame->face to the default fontset.
1230
1231         * m17n-X.c (RGB_GC): New type.
1232         (enum gc_index): Renamed from enum face_gc.  Member names changed.
1233         (GCInfo): New typel
1234         (struct MWDevice): Members foreground and background deleted.  New
1235         member scratch_gc, gc_list.
1236         (DEFAULT_FONT, FALLBACK_FONT): New macros.
1237         (free_device): Free GCs in device->gc_list.
1238         (get_rgb_gc): New function.
1239         (get_gc): Renamed and argument changed from get_color.
1240         (get_gc_for_anti_alias): New function.
1241         (xfont_find_metric): Arguments changed.  Get metrics of multiple
1242         glyphs.
1243         (set_region): Argument changed.  Caller changed.
1244         (xfont_render): Allways set a font in gc.
1245         (x_error_handler, x_io_error_handler): Define only if
1246         X_SET_ERROR_HANDLER is defined.
1247         (mwin__open_device): Create device->scratch_gc.  Set members
1248         foreground, background, and videomode of frame.  Call
1249         XSetErrorHandler and XSetIOErrorHandler only if
1250         X_SET_ERROR_HANDLER is defined.
1251         (struct gc_list): Deleted.
1252         (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1253         (mwin__realize_face): Adjusted for the change of the format of
1254         rface->info and the charge of set_region.
1255         (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1256         (mwin__draw_box): Likewise.
1257         (mwin__draw_bitmap): This function deleted.
1258         (mwin__draw_points): New function.
1259         (mwin__verify_region): Adjusted for the change of the format of
1260         rface->info and the charge of set_region.
1261         (mwin__create_window): Inherit backgound pixel from parent.
1262         (mwin__dump_gc): Adjusted for the change of the format of
1263         rface->info.
1264
1265 2004-03-16  Kenichi Handa  <handa@m17n.org>
1266
1267         * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1268
1269         * input.c (M_key_alias): New variable.
1270         (handle_key): Try M_key_alias property of a key too.
1271         (minput__init): Initialize M_key_alias.  Give that property to
1272         symbols in one_char_symbol.  Fix bug of initializing
1273         one_char_symbol.
1274
1275         * draw.c (compose_glyph_string): Don't handle
1276         ignore_formatting_char here.  Include formatting characters in the
1277         range processed by a FTL.
1278         (layout_glyph_string): Handle ignore_formatting_char here.
1279
1280 2004-03-12  Kenichi Handa  <handa@m17n.org>
1281
1282         * input-gui.c (win_create_ic): Enable bidi in status control.
1283
1284         * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1285
1286 2004-03-09  Kenichi Handa  <handa@m17n.org>
1287
1288         * input.c (load_input_method): If title is not specified, use the
1289         input method name as title.
1290
1291         * m17n-X.c (get_color): Make it static.
1292         (xim_create_ic, xim_destroy_ic, x_error_handler)
1293         (x_io_error_handler): Likewise.
1294
1295 2004-03-01  Kenichi Handa  <handa@m17n.org>
1296
1297         * Version 1.0 released.
1298
1299 \f
1300 Copyright (C) 2003, 2004
1301   National Institute of Advanced Industrial Science and Technology (AIST)
1302   Registration Number H15PRO112
1303
1304 This file is part of the m17n library.
1305
1306 The m17n library is free software; you can redistribute it and/or
1307 modify it under the terms of the GNU Lesser General Public License
1308 as published by the Free Software Foundation; either version 2.1 of
1309 the License, or (at your option) any later version.
1310
1311 The m17n library is distributed in the hope that it will be useful,
1312 but WITHOUT ANY WARRANTY; without even the implied warranty of
1313 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1314 Lesser General Public License for more details.
1315
1316 You should have received a copy of the GNU Lesser General Public
1317 License along with the m17n library; if not, write to the Free
1318 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1319 02111-1307, USA.