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