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