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