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