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