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