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