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