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