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