1 2004-10-14 Kenichi Handa <handa@m17n.org>
3 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
5 2004-10-13 Kenichi Handa <handa@m17n.org>
7 * m17n-X.c (device_open): Be sure to register at least one font
10 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
11 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
13 2004-10-12 Kenichi Handa <handa@m17n.org>
15 * draw.c (alloc_gstring): Fix previous change.
17 * font-ft.c (ft_list_generic): Fix for the case of not
20 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
22 * font.c (mfont_list): If no font is found, return NULL.
23 (load_font_encoding_table): Put entries of nil registry first.
24 (find_encoding): Adjust for the above change.
26 2004-10-11 Kenichi Handa <handa@m17n.org>
28 * m17n-gui.h (mfont_list): Adjust prototype.
30 * m17n-X.c (xfont_list): New arg maxnum.
32 * font.h (struct MFontDriver): Change prototype of <list>.
34 * font-ft.c (fc_generic_family_list): Delete it.
35 (Mserif, Msans_serif, Mmonospace): Delete them.
36 (M_generic_family_info): New variable.
37 (enum GenericFamilyType): New enum.
38 (struct GenericFamilyInfo): New struct.
39 (generic_family_table): New variable.
40 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
42 (add_font_info): Get style here.
43 (ft_list_family): Don't initialize fc_config here. Don't list
45 (ft_list_generic): New function.
46 (ft_select): Pay attention to generic familes here.
47 (ft_open): Fix calculation of ascent and descent.
48 (ft_list): Pay attention to generic families.
49 (mfont__ft_init): Initialize M_generic_family_info,
50 generic_family_table, and fc_config..
51 (mfont__ft_fini): Finalize generic_family_table.
53 * draw.c (compose_glyph_string): Use more constant font for
54 glyphs. Adjust for the member change in MGlyph.
55 (layout_glyph_string): Adjust for the member change in MGlyph.
56 (alloc_gstring): Intilize scracth_glyph to avoid
57 compose_glyph_string on it.
58 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
59 (mdraw_coordinates_position): Fix previous change.
61 * internal-gui.h (glyph_category): New enum.
62 (MGlyph): Change type of <category> to enum glyph_category.
64 * face.c (mface__realize): Delete args langauge and charset.
65 (mface__for_chars): Fix for the case that glyphs have different
67 (mface__update_frame_face): Adjust for mface__realize change.
69 * face.h (mface__realize): Adjust prototype.
71 2004-10-05 Kenichi Handa <handa@m17n.org>
73 * language.c (mlang__init): Add Akan.
75 2004-10-04 Kenichi Handa <handa@m17n.org>
77 * font-ft.c (add_font_info): Add instead of push the element.
78 (ft_list_family): For generic fonts, try all
79 substituted. families.
81 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
82 (run_rule): Don't update cluster range here.
83 (run_command): Update cluster range on appending a glyph.
84 (run_otf): Update cluster range for glyphs generated by OTF.
86 2004-10-02 Kenichi Handa <handa@m17n.org>
88 * m17n-X.c (device_open): Handle Mfont key in PLIST.
90 2004-09-30 Kenichi Handa <handa@m17n.org>
92 * font-ft.c (ft_select): Ignore family on calling mfont__score.
94 2004-09-30 Kenichi Handa <handa@m17n.org>
96 * font.h: Include <fontconfig/fontconfig.h>.
97 (MFTInfo): New member langset.
98 (mfont__encoding_list): Extern it.
100 * font.c (mfont__encoding_list): New function.
101 (mdebug_dump_font_list): New function.
103 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
104 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
106 (ft_family_list): New variable.
107 (set_font_info): New arg basep. Callers changed.
108 (fc_list): Check the return value of FcPatternGetString.
109 (add_font_info): New arg plist. Callers changed. Update
111 (ft_list_family): New function (merged fc_list and ft_list_all).
112 (ft_select): Use ft_list_family.
113 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
115 (mfont__ft_init): Initialize above new variables.
116 (mfont__ft_fini): Free ft_family_list.
117 (STRDUP_LOWER): New macro.
118 (set_font_info): Use STRDUP_LOWER.
119 (ft_list_family): Avoid duplicate addition of font path. Use
121 (fc_decode_prop): Fix typo.
123 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
124 (xfont_registry_list): Change argument disp_info to frame.
126 (xfont_list_all): New function.
127 (xfont_list): If FONT is not NULL, check all fonts.
129 2004-09-28 Kenichi Handa <handa@m17n.org>
131 * m17n-X.c (MXFont, MXFontList): New types.
132 (MDisplayInfo): Delete members font_registry_list,
133 iso8859_1_family_list, iso10646_1_family_list, new members
134 font_list, base_font_list.
135 (free_display_info): Adusted for the change of MDisplayInfo.
136 (xfont_driver): Initialize with xfont_list.
137 (font_compare): New function.
138 (build_font_list): Deleted.
139 (xfont_registry_list): New function.
140 (xfont_select): Use xfont_registry_list.
141 (xfont_list): New function.
142 (device_open): Adusted for the change of MDisplayInfo.
144 * font-ft.c (add_font_info): New arg languages. Callers changed.
145 (fc_list): Get languages from fonts..
146 (ft_list_all): Renamed from ft_list. Callers changed.
147 (ft_list): New function.
148 (mfont__ft_driver): Initalize with ft_list.
150 * font.c (mfont_list): New function.
152 * font.h (struct MFontDriver): New member `list'.
153 (MFTInfo): New member languages.
155 * m17n-gui.h (mfont_list): Extern it.
157 2004-09-27 Kenichi Handa <handa@m17n.org>
159 * internal-gui.h (struct MGlyphString): Delete members mt,
160 sub_width, sub_lbrearing, sub_rbearing, and region.
162 * draw.c (MSubTextExtents): New type.
163 (layout_glyphs): New arg extents. Set its members.
164 (layout_glyph_string): Adjusted for the above change.
165 (alloc_gstring): Don't set gstring->mt.
166 (truncate_gstring): Call line_break function with mt instead of
169 2004-09-22 Kenichi Handa <handa@m17n.org>
171 * mtext.c (count_utf_16_chars): Count each code of invalid
174 2004-09-19 Kenichi Handa <handa@m17n.org>
176 * mtext.c (default_utf_16, default_utf_32): Rename them to
177 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
180 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
183 2004-09-13 Kenichi Handa <handa@m17n.org>
185 * draw.c (Mlatin): Don't declare it here.
186 (visual_order): Fix reordering of combining characters.
187 (compose_glyph_string): Fix detection of script.
188 (layout_glyphs): Don't fix reordering of combining characters
190 (layout_glyph_string): Pay attention to
191 control->disable_overlapping_adjustment.
192 (truncate_gstring): Include at least on character in a line.
193 (get_gstring): Always scan one full line.
194 (mdraw__init): Don't initialize Mlatin here.
195 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
196 have a font, use ascent/descent of an ASCII font. Allow
197 ink_array_return and logical_array_return to be NULL.
198 (mdraw_coordinates_position): Fix iteration.
200 * font-ft.c (MFTtoProp): Member completely changed.
201 (ft_to_prop): Adjusted for the above change.
202 (ft_to_prop_size): Likewise.
203 (set_font_info): Adjusted for the change of MFTtoProp.
204 (fc_generic_family_list): New variable.
205 (fc_list): Add special handling of generic font names.
206 (mfont__ft_init): Adjusted for the change of MFTtoProp.
207 Initialize fc_generic_family_list.
208 (mfont__ft_fini): Don't free ft_to_prop. Free
209 fc_generic_family_list.
210 (FC_vs_M17N_font_prop): New type.
211 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
212 (fc_decode_prop, fc_encode_prop): New functions.
213 (mfont__ft_parse_name): Use fc_decode_prop.
214 (mfont__ft_unparse_name): Use fc_encode_prop.
216 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
217 (MWDevice): Add member realized_font_list.
218 (free_display_info): Don't free disp_info->realized_font_list.
219 (free_device): Free device->realized_fontset_list.
220 (xft_find_metric): Use gstring->frame instead of rfont->frame.
221 (device_open): Don't initialize disp_info->realized_font_list.
222 (device_open): Initialize device->realized_font_list and set it to
223 frame->realized_font_list.
225 * fontset.c (try_font_group): New function.
226 (mfont__lookup_fontset): Use try_font_group.
228 * font.c (common_weight): Change the order of "regular".
230 * face.c (Mlatin): Don't make it static.
231 (mface__realize): Be sure to set work_gstring.frame.
232 (mface__for_chars): Likewise.
234 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
237 * internal-gui.h (Mlatin): Extern it.
239 * m17n-gui.h (MDrawControl): New member
240 disable_overlapping_adjustment.
242 2004-09-06 Kenichi Handa <handa@m17n.org>
244 * font-flt.c (run_otf): Fix typo ('}'->']').
246 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
247 (COMBINING_PRECOMPUTED_P): New macros.
249 * draw.c (layout_glyphs): Handle precomputed combining code.
251 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
252 precomupted combining code.
254 2004-09-03 Kenichi Handa <handa@m17n.org>
256 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
259 2004-08-27 Kenichi Handa <handa@m17n.org>
261 * face.c (mface_put_prop): If the new value is the same as the
262 current one, don't increment frame->tick.
264 2004-08-25 Kenichi Handa <handa@m17n.org>
266 * fontset.c (mfontset): Initialize font_spec_list member.
267 (mfontset_copy): Load fontset if necessary.
269 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
270 'metrics' to for C++.
272 * draw.c (mdraw_glyph_info): Adjusted for the member name change
275 2004-08-16 Kenichi Handa <handa@m17n.org>
277 * Version 1.1.0 released.
279 2004-08-13 Kenichi Handa <handa@m17n.org>
281 * language.c (mlang__init): Add Dhivehi.
283 * m17n-gui.c (Mx, Mfreetype): Delete it.
284 (m17n_init_win): Don't initialize Mx and Mfreetype here.
286 * m17n-gui.h (Mfreetype, Mxft): Extern them.
287 (mfont_resize_ratio): Extern it.
288 (MDrawGlyphInfo): New member logical_width;
289 (MDrawGlyph): New type.
290 (mdraw_glyph_list): Prototype adjusted.
292 * m17n-X.c (xfont_open): Set type and fontp members.
293 (xft_open): Likewise.
295 * internal-gui.h (Mx, Mfreetype): Delete extern.
297 * font.h (struct MRealizedFont): New member type and fontp.
299 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
300 (Mx, Mfreetype): Declare here.
301 (Mxft): New variable.
302 (mfont_resize_ratio): New function.
304 * font-ft.c (ft_open): Set type and fontp members.
306 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
309 2004-08-11 Kenichi Handa <handa@m17n.org>
311 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
314 2004-08-06 Kenichi Handa <handa@m17n.org>
316 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
319 * font-flt.c (run_otf): Print debugging information if necessary.
321 2004-08-05 Kenichi Handa <handa@m17n.org>
323 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
324 positioning_type 5 and 6. Switch simplified.
326 2004-08-04 Kenichi Handa <handa@m17n.org>
328 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
330 2004-08-02 Kenichi Handa <handa@m17n.org>
332 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
333 set val to 1 even if it is greater than 1.
335 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
337 2004-07-29 Kenichi Handa <handa@m17n.org>
339 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
340 debugging information.
342 * internal.h (MDEBUG_PRINT5): New macro.
344 * draw.c (layout_glyphs): Don't combine a zero width glyph with
345 the previous one if the zero width glyph has left or right
348 2004-07-26 Kenichi Handa <handa@m17n.org>
350 * m17n-X.c (xft_render): Pay attention to members left_padding and
351 right_padding of MGlyph.
353 * draw.c (visual_order): Allocate one more elements for arrays as
354 a workaround of fribidi bug.
355 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
356 instead of MGlyph->bidi_sensitive.
357 (layout_glyph_string): Pay attentinon to
358 control->orientation_reversed when padding at the head or tail.
359 Fix adjustment of space glyph width.
360 (get_gstring): If cursor_width or cursor_bidi is changed, don't
363 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
364 instead of MGlyph->bidi_sensitive.
366 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
368 2004-07-26 Kenichi Handa <handa@m17n.org>
370 * draw.c (visual_order): Don't treat combined glyphs specially.
371 (layout_glyphs): Don't get metrics glyphs that are already ready.
372 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
373 width with the previous one.
374 (draw_background): Fix bar cursor position on a r2l glyph.
376 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
377 (run_rule): Fix place of updating cluster_begin_pos and
378 cluster_end_pos here.
379 (run_otf): Don't set left_padding.
381 * font-ft.c (adjust_anchor): Type of argument `code' changed.
383 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
384 Fix handling of GPOS.
385 (mfont__ft_drive_gpos): Delete this function.
387 * font.h (mfont__ft_drive_otf): Renamed back from
388 mfont__ft_drive_gsub.
389 (mfont__ft_drive_gpos): Delete extern.
391 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
392 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
394 2004-07-23 Kenichi Handa <handa@m17n.org>
396 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
399 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
401 2004-07-22 Kenichi Handa <handa@m17n.org>
403 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
405 2004-07-20 Kenichi Handa <handa@m17n.org>
407 * draw.c (render_glyphs): Fix checking of g->code validity.
409 * face.c (mface__realize): Set g.type.
411 2004-07-18 Kenichi Handa <handa@m17n.org>
413 * Makefile.am: Prepend ${top_srcdir} to all *.la in
416 * m17n-gui.c (mframe): Print error message give by dlopen to
419 2004-07-16 Kenichi Handa <handa@m17n.org>
421 * draw.c (compose_glyph_string): Improve the way of deciding a
422 script. For a character that doesn't have script property, use
423 the last non-latin script.
425 * font-ft.c (fc_list): Cancel previous change.
426 (mfont__ft_init): Add more entries in ft_to_prop_name.
428 2004-07-15 Kenichi Handa <handa@m17n.org>
430 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
431 previous or next character glyphs.
433 2004-07-14 Kenichi Handa <handa@m17n.org>
435 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
438 * fontset.c (mfont__lookup_fontset): If glyph type is
439 GLYPH_SPACE, get codes for SPACE.
441 * internal-gui.h (Mfont): Delete extern.
443 * m17n-gui.h (Mfont): Delete duplicated extern.
445 2004-07-13 Kenichi Handa <handa@m17n.org>
447 * font-ft.c (DEVICE_DELTA): New macro.
448 (adjust_anchor): New function.
449 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
451 (mfont__ft_drive_gpos): New function.
453 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
454 (FontLayoutContext): Delete member `rfont'.
455 (run_otf): Set g->otf_cmd. Call
456 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
457 only whne HAVE_OTF is defined.
459 * fontset.c: Include "config.h".
461 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
462 (MGlyph): New member otf_cmd.
464 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
465 (mfont__ft_drive_gpos): Extern it.
467 * face.c: Include "config.h".
469 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
471 * input-gui.c: Include "config.h".
473 * plist.c: Include "config.h".
475 2004-07-06 Kenichi Handa <handa@m17n.org>
477 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
478 internal-gui.h: Cancel previous changes.
480 * m17n-gd.h: Delete it.
482 * Makefile.am (libm17n_core_la_LIBADD): New variable.
483 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
484 @XML2_LD_FLAGS@ to above.
485 (libm17n_la_LIBADD): Add -ldl.
486 (libm17n_la_LDFLAGS): Add -export-dynamic.
487 (X_LD_FLAGS): Fix the order of linking.
488 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
489 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
490 (libm17n_X_la_LDFLAGS): Add -module.
491 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
492 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
493 (libm17n_gd_la_LDFLAGS): Add -module.
494 (include_HEADERS): Delete m17n-gd.h.
496 2004-06-30 Kenichi Handa <handa@m17n.org>
498 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
499 (MDeviceLibraryInterface): Delete it.
500 (register_device_library): Delete it.
501 (m17n__device_library_list): Renamed from device_library_list.
503 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
504 (m17n_init_win): Adjust prototype.
506 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
507 (m17n_init_gd): New function.
509 * m17n-gd.h: New file.
511 * m17n-X.h: Include <m17n-gui.h>.
512 (m17n_init_X): Extern it.
513 (M17N_INIT): Redefine it.
515 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
516 (m17n_init_X): New function.
518 * internal-gui.h (m17n__device_library_list): Extern it.
519 (struct MDeviceDriver): New members initialized, init, and fini.
521 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
523 (libm17n_X_la_LIBADD): Delete aboves.
524 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
525 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
526 (libm17n_gd_la_LDFLAGS): Delete it.
527 (include_HEADERS): Add m17n-gd.h.
529 2004-06-25 Kenichi Handa <handa@m17n.org>
531 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
532 (libm17n_gd_la_LDFLAGS): Cancel previous change.
534 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
536 * font-ft.c (fc_list): If FcFontList finds no font, try
539 * draw.c (compose_glyph_string): Terminate the last loop after
540 doing default combining if necessary.
542 2004-06-24 Kenichi Handa <handa@m17n.org>
544 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
546 * character.c (mchar_define_property): Add const to an arg.
548 * charset.c (mchar_define_charset): Add const to an arg.
550 * coding.c (MCodingSystem): Add const to an arg or decoder.
551 (finish_decoding): Add const to an arg.
552 (decode_coding_charset, decode_coding_utf_8)
553 (decode_coding_utf_16, decode_coding_utf_32)
554 (decode_coding_iso_2022, decode_coding_sjis)
555 (mconv_define_coding): Likewise.
557 * m17n-X.c (xft_find_metric): Delete unused variable.
559 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
562 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
565 * mtext.c (count_utf_8_chars, count_utf_16_chars)
566 (mtext__from_data, mtext_from_data): Add `const' to an arg.
568 * mtext.h (mtext__from_data): Ajust prototype.
570 2004-06-23 Kenichi Handa <handa@m17n.org>
572 * draw.c (compose_glyph_string): Always get glyph codes by
574 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
575 (mdraw_glyph_list): New function.
577 * font-flt.c (mfont__flt_run): Be sure to call
578 rfont->driver->encode_char.
580 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
581 (ft_encode_char): Delete arg C.
582 (ft_render): Don't call FT_Get_Char_Index.
584 * font.c (mfont__encodable_p): Delete it.
585 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
587 * font.h (struct MFontDriver): Delete arg C of encode_char.
588 (mfont__encodable_p): Delete extern.
590 * m17n-X.c (xfont_encode_char): Delete arg C.
591 (xft_find_metric): Don't cal FT_Get_Char_Index.
592 (xft_render): Likewise.
594 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
596 (mdraw_glyph_list): Extern it.
598 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
600 2004-06-22 Kenichi Handa <handa@m17n.org>
602 * m17n-gui.h (mfontset_lookup): Extern it.
604 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
606 * fontset.c (realize_fontset_elements)
607 (free_realized_fontset_elements, update_fontset_elements): New
609 (mfont__realize_fontset): Call realize_fontset_elements.
610 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
611 (mfont__lookup_fontset): If a fontset was modified, update
612 the realized fontset.
613 (mfontset_modify_entry): Increment fontset->tick.
614 (mfontset_lookup): New function.
616 2004-06-21 Kenichi Handa <handa@m17n.org>
618 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
620 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
621 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
622 length of source text 0.
624 2004-06-21 Kenichi Handa <handa@m17n.org>
626 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
627 (compare): Pay attention to format other than utf-8.
628 (copy): Delete this function.
629 (count_by_utf_8, count_by_utf_16, insert): New functions.
630 (count_utf_16_chars): Fix handling of a surrogate pair.
631 (find_char_forward, find_char_backward): Likewise.
632 (mtext__from_data): Delete unnecessary check. Fix number of
634 (mtext_from_data): Don't count items.
635 (mtext_ref_char): Optimize the code.
636 (mtext_set_char): Pay attention to format other than utf-8.
637 (mtext_cat_char): Likewise.
638 (mtext_dup): Don't call copy, instead do allocation here.
639 (mtext_cat): Call insert instead of copy.
640 (mtext_ncat): Likewise.
641 (mtext_cpy): Delete character at first and call insert instead of
643 (mtext_ncpy): Likewise.
644 (mtext_copy): Likewise.
645 (mtext_duplicate): Call insert instead of copy.
646 (mtext_del): Pay attention to format other than utf-8.
647 (mtext_ins): Simply call insert.
648 (mtext_ins_char): Pay attention to format other than utf-8.
649 (mtext_tok): Call insert instead of copy.
650 (mtext_text): Call UNIT_BYTES.
652 * textprop.c (mtext__adjust_plist_for_change): New function.
654 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
655 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
656 (CHAR_UNITS_AT): Fix typo.
657 (CHAR_UNITS_BY_HEAD): Fix typo.
658 (STRING_CHAR_AND_UNITS): Fix typo.
660 * internal.h (MTEXT_READ_ONLY_P): New macro.
662 * mtext.h (mtext__replace): Delete the extern.
663 (mtext__adjust_foramt): Adjust prototype.
665 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
666 if possible. Otherwise make a copy of mmt.
668 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
671 2004-06-18 Kenichi Handa <handa@m17n.org>
673 * character.h (CHAR_STRING_UTF16): Fix syntax.
675 2004-06-16 Kenichi Handa <handa@m17n.org>
677 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
678 (libm17n_X_la_LIBADD): Delete it.
679 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
681 * m17n-X.c (device_open): Add parens in `if' condition.
683 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
684 (DEC_POSITION): Likewise.
685 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
687 2004-06-15 Kenichi Handa <handa@m17n.org>
689 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
692 * draw.c (compose_glyph_string): If langauge is specified, call
693 mface__for_chars even if a text is all latin. Fix condition for
694 setting non_ascii_found.
696 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
698 * m17n.h (minput_char_to_key): Delete extern.
700 * m17n-gui.h (minput_event_to_key): Cancel previous change.
702 * m17n-gui.c (null_device_open): Set several members of frame.
704 2004-06-14 Kenichi Handa <handa@m17n.org>
706 * m17n-gui.h (minput_event_to_key): Delete extern.
708 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
710 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
712 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
714 2004-06-08 Kenichi Handa <handa@m17n.org>
716 * character.c (mchar_put_prop): Don't increment the ref-count of
719 2004-06-04 Kenichi Handa <handa@m17n.org>
721 * m17n-core.c (mdebug__register_object): New function.
722 (mdebug__unregister_object): Likewise.
724 * internal.h (mdebug__register_object, mdebug__unregister_object):
726 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
729 * charset.c (mcharset__load_from_database): Don't call
730 mconv__register_charset_coding here.
732 * coding.c (find_coding): Get a real name from an element of
733 coding_definition_list.
734 (mconv__register_charset_coding): Set the real name at the top of
736 (mcoding__load_from_database): Likewise.
737 (mconv_list_codings): Adjusted for the above change.
739 2004-06-03 Kenichi Handa <handa@m17n.org>
741 * coding.c (find_coding): Find by canonicalized name. Don't have
742 to modify the element of coding_definition_list by
744 (mconv__define_coding_from_charset): Delete it.
745 (mconv__register_charset_coding): Canonicalize sym.
746 (mcoding__load_from_database): Register plist modified by
749 * coding.h (mconv__define_coding_from_charset): Don't extern it.
751 * font-ft.c (ft_open): Fix setting of rfont->descent.
753 2004-06-02 Kenichi Handa <handa@m17n.org>
755 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
756 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
757 (xlfd_unparse_name): Renamed from xfont_build_name.
758 (mfont__init): Initialized Mfontconfig.
759 (mfont__free_realized): Unconditionally unref rfont->info.
760 (mfont__select): Free `this' if it's not best.
761 (mfont__open): Don't check frame->realized_font_list.
762 (mfont__parse_name_into_font): New function.
763 (Mfontconfig): New variable.
764 (mfont_from_name): Call mfont_parse_name.
765 (mfont_name): Call mfont_unparse_name.
766 (mdebug_dump_font): Likewise.
768 * font.h (struct MFontDriver): Delete members parse_name and
770 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
771 (mfont__parse_name_into_font): Extern it.
773 * font-ft.c: Include "symbol.h".
774 (close_ft): Unconditionally free filename and charmap_list of
776 (ft_open): Duplicate base->filename. Increment ref-count of
777 ft_info->charmap_list. Free ft_info->charmap_list and
778 ft_info->filename on error.
779 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
781 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
783 (enum xlfd_field_idx): Moved to font.c.
784 (split_font_name, build_font_name): Likewise.
785 (build_font_list): Call mfont__parse_name_info_font.
786 (xfont_open): Call mfont__unparse_name. Free name.
787 (xfont_parse_name, xfont_build_name): Moved to font.c
788 (xft_select): Prototype deleted.
789 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
790 Call mfont_pase_name.
792 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
793 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
796 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
799 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
801 2004-06-01 Kenichi Handa <handa@m17n.org>
803 * fontset.c (mfontset_modify_entry): Pay attention to the case
804 that fontset->font_spec_list is NULL.
806 2004-05-31 Kenichi Handa <handa@m17n.org>
808 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
810 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
812 * font.c (mfont__select): Print score the a font for debugging.
814 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
816 * coding.c (reset_coding_sjis): Check kanji and kana instead of
817 kanji_sym and kana_sym.
819 2004-05-28 Kenichi Handa <handa@m17n.org>
821 * Makefile.am (VINFO): New variable.
822 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
823 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
825 2004-05-27 Kenichi Handa <handa@m17n.org>
827 The following chanages are to make device dependent functions
828 accessible only from MDeviceDriver structure, and to add GD and
829 null device drivers. Font drivers get also device dependent.
831 * m17n.c (m17n_init): Increament shell_initialized.
832 (m17n_fini): Decremented shell_initialized.
834 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
836 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
837 (Mwidget, Mcolormap, Mx): Extern them.
839 * m17n-gui.c: Include <dlfcn.h> and "config.h".
840 (free_frame): Call frame->driver->close instead of
842 (DLOPEN_SHLIB_EXT): New macro.
843 (MDeviceLibraryInterface): New type.
844 (device_library_list): New variable.
845 (register_device_library): New function.
846 (null_device): New variable.
847 (null_device_close, null_device_get_prop)
848 (null_device_realize_face, null_device_free_realized_face): New
850 (null_driver): New variable.
851 (null_device_init, null_device_fini, null_device_open): New
853 (null_interface): New variable.
854 (Mfreetype, Mdevice): Declare them.
855 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
856 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
857 Mwin__Close_Device. Register drivers for Mx and Mgd.
858 (m17n_fini_win): Decremented win_initialized. Call "fini"
859 function of all opened devices. Don't call mwin__fini.
860 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
862 (mframe): Handle Mdevice key of PLIST.
863 (mframe_get_prop): Call frame->device->get_prop instead of
864 mwin__device_get_prop.
866 * m17n-gd.c: New file.
868 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
869 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
871 * m17n-core.c (m17n_init_core): Increate core_initialized.
872 (m17n_fini_core): Decremented core_initialized.
874 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
875 (Mcolormap): Don't extern them here.
877 * m17n-X.c (FRAME_DEVICE): New macro.
878 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
879 (free_display_info): Use MPLIST_DO.
880 (free_device): Free rface->info.
881 (xft_close): Delete it.
882 (device_init): Renamed from mwin__init.
883 (device_fini): Renamed from mwin__fini.
884 (device_open): Renamed from mwin__open_device.
885 (x_driver): New variable.
886 (MXFontInfo): Delete member frame, add member display.
887 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
888 Don't declare them here.
890 * internal-gui.h (MDeviceType): New enum.
891 (MWDefice): Delete it.
892 (struct MFrame): Change type of device to void *. New members
893 device_type, driver, font_driver_list.
894 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
895 (MDeviceDriver): New type.
896 (Mx, Mgd, Mfreetype): Extern them.
897 (mwin__XXX): Delete all of them.
899 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
901 (win_destroy_ic): Likewise.
902 (adjust_window_and_draw): Likewise.
903 (win_callback): Likewise.
904 (Mxim): Declare it here.
905 (minput_event_to_key): Call M_CHECK_READABLE.
907 * fontset.c (mfont__lookup_fontset): Delete local variable
910 * font.h (struct MFontDriver): Delete member close, add members
911 parse_name and build_name.
912 (mfont__driver_list): Delete extern.
913 (mfont__close): Delete extern.
915 * font.c (mfont__init): Don't set mfont__driver_list.
916 (mfont__fini): Don't unref mfont__driver_list.
917 (mfont__select): Try font drivers in frame->font_driver_list. Set
918 driver member of a realized font.
919 (mfont__close): Delete it.
920 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
921 functions of the default frame.
923 * font-ft.c (close_ft): Check ft_info->ft_face and work
925 (add_font_info): Allocate ft_info by M17N_OBJECT.
926 (ft_close): Delete it.
927 (mfont__ft_driver): Don't set ft_close.
928 (ft_select): Increment ref-count of best_font.
929 (ft_open): Decremented ref-count of base. On error, call
930 FT_Done_Face and free ft_info.
931 (ft_find_metric): Always use XXX_MONO in load_flags.
932 (ft_render): Fix setting of width. Call
933 frame->driver->draw_points instead of mwin__draw_points.
934 (ft_to_prop): Don't set mfont__driver_list.
935 (mfont__ft_fini): Just unref ft_info.
937 * face.c (mface__init): Exchange foreground and background of
938 mface__default. Call mface_put_prop to set hline of
940 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
941 (mface__free_realized): Don't call mwin__free_realized_face.
943 * draw.c (Mdepth): Don't declare it here.
944 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
945 (render_glyphs, render_glyph_string): Likewise.
946 (mdraw__init): Don't set Mdepth.
947 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
949 (mdraw_text_per_char_extents): Return 0 on success and -1 on
951 (mdraw_text_items): Check FRAME is writable.
952 (mdraw_per_char_extents): Implement body.
954 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
956 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
957 (GUI_SOURCES): Delete it.
958 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
959 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
960 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
961 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
962 (linkgui_LDADD): Set to libm17n-gui.la
963 (linkgui_LDFLAGS): New target.
964 (SRC): Include ${libm17n_gui_la_SOURCES} and
965 ${libm17n_gd_la_SOURCES}.
967 2004-05-24 Kenichi Handa <handa@m17n.org>
969 * draw.c (draw_background): Don't draw background even if
970 rface->face.property[MFACE_BACKGROUND] is not Mnil.
972 2004-05-22 Kenichi Handa <handa@m17n.org>
974 * m17n-X.c (xft_open_font): Fix anti_alias setting.
976 2004-05-20 Kenichi Handa <handa@m17n.org>
978 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
980 * m17n-gui.c: Include "plist.h".
981 (mframe): If PLIST is NULL, initialize it to emply plist.
983 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
984 (xft_driver): New variable.
985 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
986 (xft_find_metric, xft_render): New function.
987 (mwin__init): Adjusted for the new mfont__driver_list.
988 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
989 generated face to PARAM.
990 (mwin__realize_face): Fix setting of box colors. Don't call hook
992 (mwin__draw_hline): New function.
993 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
994 (mwin__xft_render): Delete these function.
996 * internal-gui.h (struct MFrame): New member tick.
997 (struct MGlyphString): New member tick.
998 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
999 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
1000 (mwin__xft_render): Delete extern.
1002 * fontset.c (mfont__lookup_fontset): Make the code simpler.
1003 (mfontset): Always increment the reference count of returned
1006 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
1007 (MFTInfo): Moved to font.h.
1008 (ft_iso8859_1_font_list): Delete this variable.
1009 (set_font_info): Don't set font->property[MFONT_TYPE].
1010 (set_font_info): Don't udpate ft_iso8859_1_font_list.
1011 (add_font_info): Change type to void.
1012 (fc_list): Change anme from xft_list. Caller changed. Include
1013 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1014 (mfont__ft_driver): Change name from ft_driver. Caller changed.
1015 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1016 (close_ft): Don't call mwin__xft_close. Unref
1017 ft_info->extra_info.
1018 (ft_open): Don't setup ft_info->fontname. Don't call
1020 (ft_find_metric): Don't call mwin__xft_get_metric.
1021 (ft_encode_char): Call rfont->driver->open instead of ft_open.
1022 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
1023 (mfont__ft_init): Adjusted for new mfont__driver_list.
1024 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1026 * font.c (mfont__driver_list): Make it MPlist.
1027 (mfont__init): Adjust initialization of mfont__driver_list.
1028 (mfont__fini): Free mfont__driver_list.
1029 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1030 (mfont__select): Adjusted for the new mfont__driver_list.
1032 * font.h (enum MFontProperty): Delete MFONT_TYPE.
1033 (mfont__drirver_list): Adjust prototype.
1034 (MFTInfo): Move to here from fron.c. Deleve member fontname.
1036 * face.h (struct MFace): Delete member realized_face_list, add
1038 (struct MRealizedFace): Delete member need_update
1039 andnofont_rface, add member non_ascii_list.
1040 (mface__update_frame_face): Extern it.
1042 * face.c (hline_prop_list, box_prop_list, noop_hook): New
1044 (get_hline_create, get_box_create): New functions.
1045 (find_realized_face): Cancel previous change. Arg RFONT deleted.
1047 (free_face): Cancep previous change. Free face->frame_list.
1048 (serialize_hline): Do nothing if hline->width is zero.
1049 (serialize_box): Do nothing if box->width is zero.
1050 (mface__init): Setup all properties of mface__default.
1051 (mface__fini): Free hline_prop_list and box_prop_list.
1052 (mface__realize): Cancel previous change. Update
1053 face->frame_list. Setup rface->non_ascii_list.
1054 (mface__for_chars): Update rface->non_ascii_list.
1055 (mface__free_realized): Free rface->non_ascii_list.
1056 (mface__update_frame_face): New function.
1057 (mface): Initialize face->frame_list.
1058 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
1060 (mface_merge): Likewise.
1061 (mface_put_prop): If key is Mhline or Mbox, get value by
1062 get_hline_create or get_box_create respectively.
1063 (mface_put_prop): Update frame->tick and call
1064 mface__update_frame_face if necessary.
1065 (mface_update): Do nothing if func is noop_hook.
1067 * draw.c (render_glyphs): If a font is not found, use
1068 mwin__draw_empty_boxes.
1069 (alloc_gstring): Initialize gstring->tick.
1070 (get_gstring): Check gstring->tick.
1072 2004-05-17 Kenichi Handa <handa@m17n.org>
1074 * face.c (find_realized_face): Return value changed. If RFONT is
1075 NULL, avoid unnecessary checking.
1076 (free_face): Free face->realized_face_list.
1077 (mface__realize): Adjusted for the change of find_realized_face.
1078 If it returns a realized face that needs update, free it and
1079 realize a new one. Push a new realized face to
1080 frame->realized_face_list instead of appending.
1081 (mface__for_chars): Adjusted for the change of find_realized_face.
1082 Short cut if the required font is in rface->ascii_rface.
1083 (mface_put_prop): Free old value if necessary. Set need_update
1084 member of realized faces to 1.
1086 * face.h (struct MFace): Delete member tick, add member
1088 (struct MRealizedFace): Delete member tick, add member
1091 2004-05-13 Kenichi Handa <handa@m17n.org>
1093 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1095 2004-05-12 Kenichi Handa <handa@m17n.org>
1097 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1099 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1100 parse it XftNameParse.
1102 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1103 (all_fonts_scaned): New variable.
1104 (set_font_info): FAMILY may be Mnil.
1105 (add_font_info): Argument changed.
1106 (xft_list): Call add_font_info in it.
1107 (ft_list): Likewise.
1108 (ft_select): Make it work in the case family is Mnil.
1109 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1110 (mfont__ft_fini): Set all_fonts_scaned to 0.
1112 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1113 that is failed to open.
1115 2004-05-10 Kenichi Handa <handa@m17n.org>
1117 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1118 device's depth is 1 (i.e. monochrome).
1120 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1121 to work around the problem of libtool.
1123 * font-ft.c: Include <freetype/ftbdf.h>.
1124 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1126 (mfont__ft_init): Initialize them.
1127 (ft_iso8859_1_font_list): New variable.
1128 (set_font_info): Detect a font containing iso8859-1 glyphs and
1129 register it in ft_iso8859_1_font_list. If the font is not
1130 scalable, assume it as BDF or PCF font and setup SIZE and RESY
1131 properties of the font from its properties.
1132 (add_font_list): If the font is not scalable, check if it is BDF
1133 or PCF font. If not, ignore it.
1134 (ft_select): If FAMILY is Mnil, return NULL only if the requested
1135 registry is not iso8859-1.
1136 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1137 ft_iso8859_1_font_list.
1138 (ft_find_metric): If the font is not scalable, assume it as BDF
1139 or PCF, and get a metric from its properties.
1140 (mfont__ft_fini): Free ft_iso8859_1_font_list.
1142 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
1144 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1145 (libm17n_la_LDFLAGS): Delete it.
1146 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1147 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1149 2004-05-06 Kenichi Handa <handa@m17n.org>
1151 * draw.c (compose_glyph_string): Fix previous change.
1153 2004-04-30 Kenichi Handa <handa@m17n.org>
1155 * font-ft.c (ft_list): Delete unused variable `result'.
1156 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1158 2004-04-27 Kenichi Handa <handa@m17n.org>
1160 * m17n-X.c: Include config.h
1161 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1162 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1163 (MWDevice) [HAVE_XFT2]: New member xft_draw.
1164 (FRAME_CMAP, FRAME_VISUAL): New macros.
1165 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1166 (xfont_driver): Make it static.
1167 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1168 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1169 info->xft_color_back.
1170 (MXftFontInfo) [HAVE_XFT2]: New type.
1171 (mwin__xft_close) [HAVE_XFT2]: New function.
1172 (mwin__xft_open) [HAVE_XFT2]: New function.
1173 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1174 (mwin__xft_render) [HAVE_XFT2]: New function.
1176 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1177 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1178 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1181 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1183 * font-ft.c: Don't include FT_FREETYPE_H here.
1184 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1185 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1186 (MFTInfo): New member charmap_index.
1187 (MFTInfo) [HAVE_XFT2]: New member xft_info.
1188 (check_otf_filename): Renamed from check_filename. Return value
1190 (ft_set_property): This function deleted.
1191 (set_font_info): New function.
1192 (add_font_list): Argument changed. Add multiple fonts.
1193 (xft_list) [HAVE_XFT2]: New function.
1194 (ft_list) [not HAVE_XFT2]: New function.
1195 (ft_select): Add code for Xft.
1196 (close_ft): Likewise.
1197 (ft_open): Likewise.
1198 (ft_find_metric): Likewise.
1199 (ft_encode_char): Likewise.
1200 (ft_render): Likewise.
1202 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1204 2004-04-26 Kenichi Handa <handa@m17n.org>
1206 * textprop.c (mtext_attach_property): Declare the return type as
1209 2004-04-21 Kenichi Handa <handa@m17n.org>
1211 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1213 2004-04-09 Kenichi Handa <handa@m17n.org>
1215 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1217 (load_command): Setup above members.
1219 2004-04-05 Kenichi Handa <handa@m17n.org>
1221 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1223 2004-03-30 Kenichi Handa <handa@m17n.org>
1225 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1228 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1229 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1231 2004-03-29 Kenichi Handa <handa@m17n.org>
1233 * Version 1.0 Patch Level 2 released.
1235 2004-03-29 Kenichi Handa <handa@m17n.org>
1237 * charset.c (make_charset): Set charset->fully_loaded and
1238 charset->simple correctly. Don't try to get charset->min_char and
1239 charset->max_char for a charset of method subset and superset.
1240 Don't load a mapping file here.
1241 (mcharset__init): Set unified_max.
1242 (mcharset__load_from_database): Free a working plist.
1244 * coding.c (mcoding__fini): Free all malloced data.
1246 * input-gui.c (win_create_ic): Set control.as_image for preediting
1249 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1250 `count') to initialize the array.
1252 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1255 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1257 (mwin__create_window): Fix bug of setting a background pixel of a
1259 (mwin__adjust_window): Clear the window before drawing.
1261 * m17n-core.c (mdebug__report_object): Free array->objectes if
1263 (m17n_init_core): Don't set report_header_printed to 0 here.
1264 Fix debugging information.
1265 (m17n_fini_core): Set report_header_printed to 0 here.
1267 * m17n-core.h (mplist_deserialize): Extern it.
1269 * m17n-gui.c (m17n_fini_win): Fix debugging information.
1271 * m17n.c (m17n_fini): Fix debugging information.
1273 * mtext.c (mtext__adjust_foramt): New function.
1275 * mtext.h (mtext__adjust_foramt): Extern it.
1277 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1279 * plist.h (mplist__deserialize): Don't extern it.
1281 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
1282 elements of symbol_table to NULL. Report about created and freed
1283 symbols if MDEBUG_FINI is set.
1285 2004-03-22 Kenichi Handa <handa@m17n.org>
1287 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1289 * m17n.c (m17n_init): Fix the way of checking merror_code.
1291 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1293 2004-03-22 Kenichi Handa <handa@m17n.org>
1295 * fontset.c (realize_font_group): Adjust the font size by
1296 mfont__resize before selecting a font.
1298 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1300 2004-03-19 Kenichi Handa <handa@m17n.org>
1302 * Version 1.0 Patch Level 1 released.
1304 2004-03-19 Kenichi Handa <handa@m17n.org>
1306 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1308 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1310 2004-03-19 Kenichi Handa <handa@m17n.org>
1312 Re-apply the changes forgotten in the released version.
1314 * charset.c (mcharset__load_from_database): Call
1315 mchar_define_charset.
1317 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1318 (mconv_encode_range): Put Mcoding text property.
1320 2004-03-18 Kenichi Handa <handa@m17n.org>
1322 * draw.c (Mdepth): New variable.
1323 (visual_order): Delete unused local var `pos'.
1324 (compose_glyph_string): Fix for the case that gstring->glyphs is
1325 realloced. Stop generating glyphs at TO. Fix handling of
1327 (layout_glyphs): Get metrics of all glyphs in advance. Set
1328 lbearing and rbearing of base of composition glyph correctly.
1329 Handle left-overhang glyphs correctly.
1330 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
1332 (dump_combining_code): Change the defualt off_x character to ".".
1333 (mdraw__init): Initialize Mdepth.
1335 * face.c (work_gstring): New variable
1336 (mface__init): Initialize work_gstring.
1337 (mface__fini): Free work_gstring.glyphs.
1338 (mface__realize): Don't handle videomode property here. Adjusted
1339 for the change of mfont__get_metric.
1340 (mface__for_chars): Adjusted for the change of mfont__get_metric.
1342 * face.h (enum face_gc): Moved to m17n-X.c.
1344 * font.h (struct MFontDriver): Arguments of find_metric changed.
1345 (mfont__select): Prototype adjusted.
1346 (mfont__get_metric): Likewise.
1347 (mfont__ft_drive_otf): Likewise.
1348 (mfont__flt_run): Likewise.
1350 * font.c (mfont__select): New argument layouter. If layouter is
1351 different in the registered font, make a new copy of realized
1353 (mfont__get_metric): Argument changed. Get metrics of multiple
1355 (mfont_find): Call mfont__select with layouter as Mnil.
1357 * font-flt.c (FontLayoutContext): New member rfont.
1358 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1359 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
1361 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
1363 (NUM_POINTS): New macro.
1364 (MPointTable): New type.
1365 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1366 (mfont__ft_drive_otf): New argument rfont.
1368 * fontset.c (realize_font_group): Adjusted for the changed of
1370 (check_fontset_element): This function deleted.
1372 * input-gui.c (adjust_window_and_draw): Locate a preedit window
1373 off the parent window if the preedit text is zero length.
1375 * internal-gui.h (struct MFrame): New members foreground,
1376 background, videomode, font.
1377 (struct MGlyphString): New member anti_alias.
1378 (MDrawPoint): New type.
1379 (mwin__draw_bitmap): Prototype deleted.
1380 (mwin__draw_points): Prototype added.
1382 * m17n-gui.h (MDrawControl): New member anti_alias.
1384 * m17n-gui.c (free_frame): Free frame->font.
1385 (mframe): Set the fontset of frame->face to the default fontset.
1387 * m17n-X.c (RGB_GC): New type.
1388 (enum gc_index): Renamed from enum face_gc. Member names changed.
1390 (struct MWDevice): Members foreground and background deleted. New
1391 member scratch_gc, gc_list.
1392 (DEFAULT_FONT, FALLBACK_FONT): New macros.
1393 (free_device): Free GCs in device->gc_list.
1394 (get_rgb_gc): New function.
1395 (get_gc): Renamed and argument changed from get_color.
1396 (get_gc_for_anti_alias): New function.
1397 (xfont_find_metric): Arguments changed. Get metrics of multiple
1399 (set_region): Argument changed. Caller changed.
1400 (xfont_render): Allways set a font in gc.
1401 (x_error_handler, x_io_error_handler): Define only if
1402 X_SET_ERROR_HANDLER is defined.
1403 (mwin__open_device): Create device->scratch_gc. Set members
1404 foreground, background, and videomode of frame. Call
1405 XSetErrorHandler and XSetIOErrorHandler only if
1406 X_SET_ERROR_HANDLER is defined.
1407 (struct gc_list): Deleted.
1408 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1409 (mwin__realize_face): Adjusted for the change of the format of
1410 rface->info and the charge of set_region.
1411 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1412 (mwin__draw_box): Likewise.
1413 (mwin__draw_bitmap): This function deleted.
1414 (mwin__draw_points): New function.
1415 (mwin__verify_region): Adjusted for the change of the format of
1416 rface->info and the charge of set_region.
1417 (mwin__create_window): Inherit backgound pixel from parent.
1418 (mwin__dump_gc): Adjusted for the change of the format of
1421 2004-03-16 Kenichi Handa <handa@m17n.org>
1423 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1425 * input.c (M_key_alias): New variable.
1426 (handle_key): Try M_key_alias property of a key too.
1427 (minput__init): Initialize M_key_alias. Give that property to
1428 symbols in one_char_symbol. Fix bug of initializing
1431 * draw.c (compose_glyph_string): Don't handle
1432 ignore_formatting_char here. Include formatting characters in the
1433 range processed by a FTL.
1434 (layout_glyph_string): Handle ignore_formatting_char here.
1436 2004-03-12 Kenichi Handa <handa@m17n.org>
1438 * input-gui.c (win_create_ic): Enable bidi in status control.
1440 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1442 2004-03-09 Kenichi Handa <handa@m17n.org>
1444 * input.c (load_input_method): If title is not specified, use the
1445 input method name as title.
1447 * m17n-X.c (get_color): Make it static.
1448 (xim_create_ic, xim_destroy_ic, x_error_handler)
1449 (x_io_error_handler): Likewise.
1451 2004-03-01 Kenichi Handa <handa@m17n.org>
1453 * Version 1.0 released.
1456 Copyright (C) 2003, 2004
1457 National Institute of Advanced Industrial Science and Technology (AIST)
1458 Registration Number H15PRO112
1460 This file is part of the m17n library.
1462 The m17n library is free software; you can redistribute it and/or
1463 modify it under the terms of the GNU Lesser General Public License
1464 as published by the Free Software Foundation; either version 2.1 of
1465 the License, or (at your option) any later version.
1467 The m17n library is distributed in the hope that it will be useful,
1468 but WITHOUT ANY WARRANTY; without even the implied warranty of
1469 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1470 Lesser General Public License for more details.
1472 You should have received a copy of the GNU Lesser General Public
1473 License along with the m17n library; if not, write to the Free
1474 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA