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