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