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