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