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