1 2004-10-11 Kenichi Handa <handa@m17n.org>
3 * m17n-gui.h (mfont_list): Adjust prototype.
5 * m17n-X.c (xfont_list): New arg maxnum.
7 * font.h (struct MFontDriver): Change prototype of <list>.
9 * font-ft.c (fc_generic_family_list): Delete it.
10 (Mserif, Msans_serif, Mmonospace): Delete them.
11 (M_generic_family_info): New variable.
12 (enum GenericFamilyType): New enum.
13 (struct GenericFamilyInfo): New struct.
14 (generic_family_table): New variable.
15 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
17 (add_font_info): Get style here.
18 (ft_list_family): Don't initialize fc_config here. Don't list
20 (ft_list_generic): New function.
21 (ft_select): Pay attention to generic familes here.
22 (ft_open): Fix calculation of ascent and descent.
23 (ft_list): Pay attention to generic families.
24 (mfont__ft_init): Initialize M_generic_family_info,
25 generic_family_table, and fc_config..
26 (mfont__ft_fini): Finalize generic_family_table.
28 * draw.c (compose_glyph_string): Use more constant font for
29 glyphs. Adjust for the member change in MGlyph.
30 (layout_glyph_string): Adjust for the member change in MGlyph.
31 (alloc_gstring): Intilize scracth_glyph to avoid
32 compose_glyph_string on it.
33 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
34 (mdraw_coordinates_position): Fix previous change.
36 * internal-gui.h (glyph_category): New enum.
37 (MGlyph): Change type of <category> to enum glyph_category.
39 * face.c (mface__realize): Delete args langauge and charset.
40 (mface__for_chars): Fix for the case that glyphs have different
42 (mface__update_frame_face): Adjust for mface__realize change.
44 * face.h (mface__realize): Adjust prototype.
46 2004-10-05 Kenichi Handa <handa@m17n.org>
48 * language.c (mlang__init): Add Akan.
50 2004-10-04 Kenichi Handa <handa@m17n.org>
52 * font-ft.c (add_font_info): Add instead of push the element.
53 (ft_list_family): For generic fonts, try all
54 substituted. families.
56 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
57 (run_rule): Don't update cluster range here.
58 (run_command): Update cluster range on appending a glyph.
59 (run_otf): Update cluster range for glyphs generated by OTF.
61 2004-10-02 Kenichi Handa <handa@m17n.org>
63 * m17n-X.c (device_open): Handle Mfont key in PLIST.
65 2004-09-30 Kenichi Handa <handa@m17n.org>
67 * font-ft.c (ft_select): Ignore family on calling mfont__score.
69 2004-09-30 Kenichi Handa <handa@m17n.org>
71 * font.h: Include <fontconfig/fontconfig.h>.
72 (MFTInfo): New member langset.
73 (mfont__encoding_list): Extern it.
75 * font.c (mfont__encoding_list): New function.
76 (mdebug_dump_font_list): New function.
78 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
79 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
81 (ft_family_list): New variable.
82 (set_font_info): New arg basep. Callers changed.
83 (fc_list): Check the return value of FcPatternGetString.
84 (add_font_info): New arg plist. Callers changed. Update
86 (ft_list_family): New function (merged fc_list and ft_list_all).
87 (ft_select): Use ft_list_family.
88 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
90 (mfont__ft_init): Initialize above new variables.
91 (mfont__ft_fini): Free ft_family_list.
92 (STRDUP_LOWER): New macro.
93 (set_font_info): Use STRDUP_LOWER.
94 (ft_list_family): Avoid duplicate addition of font path. Use
96 (fc_decode_prop): Fix typo.
98 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
99 (xfont_registry_list): Change argument disp_info to frame.
101 (xfont_list_all): New function.
102 (xfont_list): If FONT is not NULL, check all fonts.
104 2004-09-28 Kenichi Handa <handa@m17n.org>
106 * m17n-X.c (MXFont, MXFontList): New types.
107 (MDisplayInfo): Delete members font_registry_list,
108 iso8859_1_family_list, iso10646_1_family_list, new members
109 font_list, base_font_list.
110 (free_display_info): Adusted for the change of MDisplayInfo.
111 (xfont_driver): Initialize with xfont_list.
112 (font_compare): New function.
113 (build_font_list): Deleted.
114 (xfont_registry_list): New function.
115 (xfont_select): Use xfont_registry_list.
116 (xfont_list): New function.
117 (device_open): Adusted for the change of MDisplayInfo.
119 * font-ft.c (add_font_info): New arg languages. Callers changed.
120 (fc_list): Get languages from fonts..
121 (ft_list_all): Renamed from ft_list. Callers changed.
122 (ft_list): New function.
123 (mfont__ft_driver): Initalize with ft_list.
125 * font.c (mfont_list): New function.
127 * font.h (struct MFontDriver): New member `list'.
128 (MFTInfo): New member languages.
130 * m17n-gui.h (mfont_list): Extern it.
132 2004-09-27 Kenichi Handa <handa@m17n.org>
134 * internal-gui.h (struct MGlyphString): Delete members mt,
135 sub_width, sub_lbrearing, sub_rbearing, and region.
137 * draw.c (MSubTextExtents): New type.
138 (layout_glyphs): New arg extents. Set its members.
139 (layout_glyph_string): Adjusted for the above change.
140 (alloc_gstring): Don't set gstring->mt.
141 (truncate_gstring): Call line_break function with mt instead of
144 2004-09-22 Kenichi Handa <handa@m17n.org>
146 * mtext.c (count_utf_16_chars): Count each code of invalid
149 2004-09-19 Kenichi Handa <handa@m17n.org>
151 * mtext.c (default_utf_16, default_utf_32): Rename them to
152 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
155 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
158 2004-09-13 Kenichi Handa <handa@m17n.org>
160 * draw.c (Mlatin): Don't declare it here.
161 (visual_order): Fix reordering of combining characters.
162 (compose_glyph_string): Fix detection of script.
163 (layout_glyphs): Don't fix reordering of combining characters
165 (layout_glyph_string): Pay attention to
166 control->disable_overlapping_adjustment.
167 (truncate_gstring): Include at least on character in a line.
168 (get_gstring): Always scan one full line.
169 (mdraw__init): Don't initialize Mlatin here.
170 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
171 have a font, use ascent/descent of an ASCII font. Allow
172 ink_array_return and logical_array_return to be NULL.
173 (mdraw_coordinates_position): Fix iteration.
175 * font-ft.c (MFTtoProp): Member completely changed.
176 (ft_to_prop): Adjusted for the above change.
177 (ft_to_prop_size): Likewise.
178 (set_font_info): Adjusted for the change of MFTtoProp.
179 (fc_generic_family_list): New variable.
180 (fc_list): Add special handling of generic font names.
181 (mfont__ft_init): Adjusted for the change of MFTtoProp.
182 Initialize fc_generic_family_list.
183 (mfont__ft_fini): Don't free ft_to_prop. Free
184 fc_generic_family_list.
185 (FC_vs_M17N_font_prop): New type.
186 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
187 (fc_decode_prop, fc_encode_prop): New functions.
188 (mfont__ft_parse_name): Use fc_decode_prop.
189 (mfont__ft_unparse_name): Use fc_encode_prop.
191 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
192 (MWDevice): Add member realized_font_list.
193 (free_display_info): Don't free disp_info->realized_font_list.
194 (free_device): Free device->realized_fontset_list.
195 (xft_find_metric): Use gstring->frame instead of rfont->frame.
196 (device_open): Don't initialize disp_info->realized_font_list.
197 (device_open): Initialize device->realized_font_list and set it to
198 frame->realized_font_list.
200 * fontset.c (try_font_group): New function.
201 (mfont__lookup_fontset): Use try_font_group.
203 * font.c (common_weight): Change the order of "regular".
205 * face.c (Mlatin): Don't make it static.
206 (mface__realize): Be sure to set work_gstring.frame.
207 (mface__for_chars): Likewise.
209 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
212 * internal-gui.h (Mlatin): Extern it.
214 * m17n-gui.h (MDrawControl): New member
215 disable_overlapping_adjustment.
217 2004-09-06 Kenichi Handa <handa@m17n.org>
219 * font-flt.c (run_otf): Fix typo ('}'->']').
221 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
222 (COMBINING_PRECOMPUTED_P): New macros.
224 * draw.c (layout_glyphs): Handle precomputed combining code.
226 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
227 precomupted combining code.
229 2004-09-03 Kenichi Handa <handa@m17n.org>
231 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
234 2004-08-27 Kenichi Handa <handa@m17n.org>
236 * face.c (mface_put_prop): If the new value is the same as the
237 current one, don't increment frame->tick.
239 2004-08-25 Kenichi Handa <handa@m17n.org>
241 * fontset.c (mfontset): Initialize font_spec_list member.
242 (mfontset_copy): Load fontset if necessary.
244 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
245 'metrics' to for C++.
247 * draw.c (mdraw_glyph_info): Adjusted for the member name change
250 2004-08-16 Kenichi Handa <handa@m17n.org>
252 * Version 1.1.0 released.
254 2004-08-13 Kenichi Handa <handa@m17n.org>
256 * language.c (mlang__init): Add Dhivehi.
258 * m17n-gui.c (Mx, Mfreetype): Delete it.
259 (m17n_init_win): Don't initialize Mx and Mfreetype here.
261 * m17n-gui.h (Mfreetype, Mxft): Extern them.
262 (mfont_resize_ratio): Extern it.
263 (MDrawGlyphInfo): New member logical_width;
264 (MDrawGlyph): New type.
265 (mdraw_glyph_list): Prototype adjusted.
267 * m17n-X.c (xfont_open): Set type and fontp members.
268 (xft_open): Likewise.
270 * internal-gui.h (Mx, Mfreetype): Delete extern.
272 * font.h (struct MRealizedFont): New member type and fontp.
274 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
275 (Mx, Mfreetype): Declare here.
276 (Mxft): New variable.
277 (mfont_resize_ratio): New function.
279 * font-ft.c (ft_open): Set type and fontp members.
281 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
284 2004-08-11 Kenichi Handa <handa@m17n.org>
286 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
289 2004-08-06 Kenichi Handa <handa@m17n.org>
291 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
294 * font-flt.c (run_otf): Print debugging information if necessary.
296 2004-08-05 Kenichi Handa <handa@m17n.org>
298 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
299 positioning_type 5 and 6. Switch simplified.
301 2004-08-04 Kenichi Handa <handa@m17n.org>
303 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
305 2004-08-02 Kenichi Handa <handa@m17n.org>
307 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
308 set val to 1 even if it is greater than 1.
310 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
312 2004-07-29 Kenichi Handa <handa@m17n.org>
314 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
315 debugging information.
317 * internal.h (MDEBUG_PRINT5): New macro.
319 * draw.c (layout_glyphs): Don't combine a zero width glyph with
320 the previous one if the zero width glyph has left or right
323 2004-07-26 Kenichi Handa <handa@m17n.org>
325 * m17n-X.c (xft_render): Pay attention to members left_padding and
326 right_padding of MGlyph.
328 * draw.c (visual_order): Allocate one more elements for arrays as
329 a workaround of fribidi bug.
330 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
331 instead of MGlyph->bidi_sensitive.
332 (layout_glyph_string): Pay attentinon to
333 control->orientation_reversed when padding at the head or tail.
334 Fix adjustment of space glyph width.
335 (get_gstring): If cursor_width or cursor_bidi is changed, don't
338 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
339 instead of MGlyph->bidi_sensitive.
341 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
343 2004-07-26 Kenichi Handa <handa@m17n.org>
345 * draw.c (visual_order): Don't treat combined glyphs specially.
346 (layout_glyphs): Don't get metrics glyphs that are already ready.
347 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
348 width with the previous one.
349 (draw_background): Fix bar cursor position on a r2l glyph.
351 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
352 (run_rule): Fix place of updating cluster_begin_pos and
353 cluster_end_pos here.
354 (run_otf): Don't set left_padding.
356 * font-ft.c (adjust_anchor): Type of argument `code' changed.
358 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
359 Fix handling of GPOS.
360 (mfont__ft_drive_gpos): Delete this function.
362 * font.h (mfont__ft_drive_otf): Renamed back from
363 mfont__ft_drive_gsub.
364 (mfont__ft_drive_gpos): Delete extern.
366 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
367 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
369 2004-07-23 Kenichi Handa <handa@m17n.org>
371 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
374 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
376 2004-07-22 Kenichi Handa <handa@m17n.org>
378 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
380 2004-07-20 Kenichi Handa <handa@m17n.org>
382 * draw.c (render_glyphs): Fix checking of g->code validity.
384 * face.c (mface__realize): Set g.type.
386 2004-07-18 Kenichi Handa <handa@m17n.org>
388 * Makefile.am: Prepend ${top_srcdir} to all *.la in
391 * m17n-gui.c (mframe): Print error message give by dlopen to
394 2004-07-16 Kenichi Handa <handa@m17n.org>
396 * draw.c (compose_glyph_string): Improve the way of deciding a
397 script. For a character that doesn't have script property, use
398 the last non-latin script.
400 * font-ft.c (fc_list): Cancel previous change.
401 (mfont__ft_init): Add more entries in ft_to_prop_name.
403 2004-07-15 Kenichi Handa <handa@m17n.org>
405 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
406 previous or next character glyphs.
408 2004-07-14 Kenichi Handa <handa@m17n.org>
410 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
413 * fontset.c (mfont__lookup_fontset): If glyph type is
414 GLYPH_SPACE, get codes for SPACE.
416 * internal-gui.h (Mfont): Delete extern.
418 * m17n-gui.h (Mfont): Delete duplicated extern.
420 2004-07-13 Kenichi Handa <handa@m17n.org>
422 * font-ft.c (DEVICE_DELTA): New macro.
423 (adjust_anchor): New function.
424 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
426 (mfont__ft_drive_gpos): New function.
428 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
429 (FontLayoutContext): Delete member `rfont'.
430 (run_otf): Set g->otf_cmd. Call
431 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
432 only whne HAVE_OTF is defined.
434 * fontset.c: Include "config.h".
436 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
437 (MGlyph): New member otf_cmd.
439 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
440 (mfont__ft_drive_gpos): Extern it.
442 * face.c: Include "config.h".
444 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
446 * input-gui.c: Include "config.h".
448 * plist.c: Include "config.h".
450 2004-07-06 Kenichi Handa <handa@m17n.org>
452 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
453 internal-gui.h: Cancel previous changes.
455 * m17n-gd.h: Delete it.
457 * Makefile.am (libm17n_core_la_LIBADD): New variable.
458 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
459 @XML2_LD_FLAGS@ to above.
460 (libm17n_la_LIBADD): Add -ldl.
461 (libm17n_la_LDFLAGS): Add -export-dynamic.
462 (X_LD_FLAGS): Fix the order of linking.
463 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
464 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
465 (libm17n_X_la_LDFLAGS): Add -module.
466 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
467 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
468 (libm17n_gd_la_LDFLAGS): Add -module.
469 (include_HEADERS): Delete m17n-gd.h.
471 2004-06-30 Kenichi Handa <handa@m17n.org>
473 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
474 (MDeviceLibraryInterface): Delete it.
475 (register_device_library): Delete it.
476 (m17n__device_library_list): Renamed from device_library_list.
478 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
479 (m17n_init_win): Adjust prototype.
481 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
482 (m17n_init_gd): New function.
484 * m17n-gd.h: New file.
486 * m17n-X.h: Include <m17n-gui.h>.
487 (m17n_init_X): Extern it.
488 (M17N_INIT): Redefine it.
490 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
491 (m17n_init_X): New function.
493 * internal-gui.h (m17n__device_library_list): Extern it.
494 (struct MDeviceDriver): New members initialized, init, and fini.
496 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
498 (libm17n_X_la_LIBADD): Delete aboves.
499 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
500 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
501 (libm17n_gd_la_LDFLAGS): Delete it.
502 (include_HEADERS): Add m17n-gd.h.
504 2004-06-25 Kenichi Handa <handa@m17n.org>
506 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
507 (libm17n_gd_la_LDFLAGS): Cancel previous change.
509 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
511 * font-ft.c (fc_list): If FcFontList finds no font, try
514 * draw.c (compose_glyph_string): Terminate the last loop after
515 doing default combining if necessary.
517 2004-06-24 Kenichi Handa <handa@m17n.org>
519 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
521 * character.c (mchar_define_property): Add const to an arg.
523 * charset.c (mchar_define_charset): Add const to an arg.
525 * coding.c (MCodingSystem): Add const to an arg or decoder.
526 (finish_decoding): Add const to an arg.
527 (decode_coding_charset, decode_coding_utf_8)
528 (decode_coding_utf_16, decode_coding_utf_32)
529 (decode_coding_iso_2022, decode_coding_sjis)
530 (mconv_define_coding): Likewise.
532 * m17n-X.c (xft_find_metric): Delete unused variable.
534 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
537 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
540 * mtext.c (count_utf_8_chars, count_utf_16_chars)
541 (mtext__from_data, mtext_from_data): Add `const' to an arg.
543 * mtext.h (mtext__from_data): Ajust prototype.
545 2004-06-23 Kenichi Handa <handa@m17n.org>
547 * draw.c (compose_glyph_string): Always get glyph codes by
549 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
550 (mdraw_glyph_list): New function.
552 * font-flt.c (mfont__flt_run): Be sure to call
553 rfont->driver->encode_char.
555 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
556 (ft_encode_char): Delete arg C.
557 (ft_render): Don't call FT_Get_Char_Index.
559 * font.c (mfont__encodable_p): Delete it.
560 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
562 * font.h (struct MFontDriver): Delete arg C of encode_char.
563 (mfont__encodable_p): Delete extern.
565 * m17n-X.c (xfont_encode_char): Delete arg C.
566 (xft_find_metric): Don't cal FT_Get_Char_Index.
567 (xft_render): Likewise.
569 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
571 (mdraw_glyph_list): Extern it.
573 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
575 2004-06-22 Kenichi Handa <handa@m17n.org>
577 * m17n-gui.h (mfontset_lookup): Extern it.
579 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
581 * fontset.c (realize_fontset_elements)
582 (free_realized_fontset_elements, update_fontset_elements): New
584 (mfont__realize_fontset): Call realize_fontset_elements.
585 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
586 (mfont__lookup_fontset): If a fontset was modified, update
587 the realized fontset.
588 (mfontset_modify_entry): Increment fontset->tick.
589 (mfontset_lookup): New function.
591 2004-06-21 Kenichi Handa <handa@m17n.org>
593 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
595 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
596 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
597 length of source text 0.
599 2004-06-21 Kenichi Handa <handa@m17n.org>
601 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
602 (compare): Pay attention to format other than utf-8.
603 (copy): Delete this function.
604 (count_by_utf_8, count_by_utf_16, insert): New functions.
605 (count_utf_16_chars): Fix handling of a surrogate pair.
606 (find_char_forward, find_char_backward): Likewise.
607 (mtext__from_data): Delete unnecessary check. Fix number of
609 (mtext_from_data): Don't count items.
610 (mtext_ref_char): Optimize the code.
611 (mtext_set_char): Pay attention to format other than utf-8.
612 (mtext_cat_char): Likewise.
613 (mtext_dup): Don't call copy, instead do allocation here.
614 (mtext_cat): Call insert instead of copy.
615 (mtext_ncat): Likewise.
616 (mtext_cpy): Delete character at first and call insert instead of
618 (mtext_ncpy): Likewise.
619 (mtext_copy): Likewise.
620 (mtext_duplicate): Call insert instead of copy.
621 (mtext_del): Pay attention to format other than utf-8.
622 (mtext_ins): Simply call insert.
623 (mtext_ins_char): Pay attention to format other than utf-8.
624 (mtext_tok): Call insert instead of copy.
625 (mtext_text): Call UNIT_BYTES.
627 * textprop.c (mtext__adjust_plist_for_change): New function.
629 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
630 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
631 (CHAR_UNITS_AT): Fix typo.
632 (CHAR_UNITS_BY_HEAD): Fix typo.
633 (STRING_CHAR_AND_UNITS): Fix typo.
635 * internal.h (MTEXT_READ_ONLY_P): New macro.
637 * mtext.h (mtext__replace): Delete the extern.
638 (mtext__adjust_foramt): Adjust prototype.
640 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
641 if possible. Otherwise make a copy of mmt.
643 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
646 2004-06-18 Kenichi Handa <handa@m17n.org>
648 * character.h (CHAR_STRING_UTF16): Fix syntax.
650 2004-06-16 Kenichi Handa <handa@m17n.org>
652 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
653 (libm17n_X_la_LIBADD): Delete it.
654 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
656 * m17n-X.c (device_open): Add parens in `if' condition.
658 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
659 (DEC_POSITION): Likewise.
660 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
662 2004-06-15 Kenichi Handa <handa@m17n.org>
664 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
667 * draw.c (compose_glyph_string): If langauge is specified, call
668 mface__for_chars even if a text is all latin. Fix condition for
669 setting non_ascii_found.
671 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
673 * m17n.h (minput_char_to_key): Delete extern.
675 * m17n-gui.h (minput_event_to_key): Cancel previous change.
677 * m17n-gui.c (null_device_open): Set several members of frame.
679 2004-06-14 Kenichi Handa <handa@m17n.org>
681 * m17n-gui.h (minput_event_to_key): Delete extern.
683 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
685 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
687 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
689 2004-06-08 Kenichi Handa <handa@m17n.org>
691 * character.c (mchar_put_prop): Don't increment the ref-count of
694 2004-06-04 Kenichi Handa <handa@m17n.org>
696 * m17n-core.c (mdebug__register_object): New function.
697 (mdebug__unregister_object): Likewise.
699 * internal.h (mdebug__register_object, mdebug__unregister_object):
701 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
704 * charset.c (mcharset__load_from_database): Don't call
705 mconv__register_charset_coding here.
707 * coding.c (find_coding): Get a real name from an element of
708 coding_definition_list.
709 (mconv__register_charset_coding): Set the real name at the top of
711 (mcoding__load_from_database): Likewise.
712 (mconv_list_codings): Adjusted for the above change.
714 2004-06-03 Kenichi Handa <handa@m17n.org>
716 * coding.c (find_coding): Find by canonicalized name. Don't have
717 to modify the element of coding_definition_list by
719 (mconv__define_coding_from_charset): Delete it.
720 (mconv__register_charset_coding): Canonicalize sym.
721 (mcoding__load_from_database): Register plist modified by
724 * coding.h (mconv__define_coding_from_charset): Don't extern it.
726 * font-ft.c (ft_open): Fix setting of rfont->descent.
728 2004-06-02 Kenichi Handa <handa@m17n.org>
730 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
731 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
732 (xlfd_unparse_name): Renamed from xfont_build_name.
733 (mfont__init): Initialized Mfontconfig.
734 (mfont__free_realized): Unconditionally unref rfont->info.
735 (mfont__select): Free `this' if it's not best.
736 (mfont__open): Don't check frame->realized_font_list.
737 (mfont__parse_name_into_font): New function.
738 (Mfontconfig): New variable.
739 (mfont_from_name): Call mfont_parse_name.
740 (mfont_name): Call mfont_unparse_name.
741 (mdebug_dump_font): Likewise.
743 * font.h (struct MFontDriver): Delete members parse_name and
745 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
746 (mfont__parse_name_into_font): Extern it.
748 * font-ft.c: Include "symbol.h".
749 (close_ft): Unconditionally free filename and charmap_list of
751 (ft_open): Duplicate base->filename. Increment ref-count of
752 ft_info->charmap_list. Free ft_info->charmap_list and
753 ft_info->filename on error.
754 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
756 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
758 (enum xlfd_field_idx): Moved to font.c.
759 (split_font_name, build_font_name): Likewise.
760 (build_font_list): Call mfont__parse_name_info_font.
761 (xfont_open): Call mfont__unparse_name. Free name.
762 (xfont_parse_name, xfont_build_name): Moved to font.c
763 (xft_select): Prototype deleted.
764 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
765 Call mfont_pase_name.
767 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
768 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
771 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
774 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
776 2004-06-01 Kenichi Handa <handa@m17n.org>
778 * fontset.c (mfontset_modify_entry): Pay attention to the case
779 that fontset->font_spec_list is NULL.
781 2004-05-31 Kenichi Handa <handa@m17n.org>
783 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
785 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
787 * font.c (mfont__select): Print score the a font for debugging.
789 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
791 * coding.c (reset_coding_sjis): Check kanji and kana instead of
792 kanji_sym and kana_sym.
794 2004-05-28 Kenichi Handa <handa@m17n.org>
796 * Makefile.am (VINFO): New variable.
797 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
798 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
800 2004-05-27 Kenichi Handa <handa@m17n.org>
802 The following chanages are to make device dependent functions
803 accessible only from MDeviceDriver structure, and to add GD and
804 null device drivers. Font drivers get also device dependent.
806 * m17n.c (m17n_init): Increament shell_initialized.
807 (m17n_fini): Decremented shell_initialized.
809 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
811 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
812 (Mwidget, Mcolormap, Mx): Extern them.
814 * m17n-gui.c: Include <dlfcn.h> and "config.h".
815 (free_frame): Call frame->driver->close instead of
817 (DLOPEN_SHLIB_EXT): New macro.
818 (MDeviceLibraryInterface): New type.
819 (device_library_list): New variable.
820 (register_device_library): New function.
821 (null_device): New variable.
822 (null_device_close, null_device_get_prop)
823 (null_device_realize_face, null_device_free_realized_face): New
825 (null_driver): New variable.
826 (null_device_init, null_device_fini, null_device_open): New
828 (null_interface): New variable.
829 (Mfreetype, Mdevice): Declare them.
830 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
831 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
832 Mwin__Close_Device. Register drivers for Mx and Mgd.
833 (m17n_fini_win): Decremented win_initialized. Call "fini"
834 function of all opened devices. Don't call mwin__fini.
835 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
837 (mframe): Handle Mdevice key of PLIST.
838 (mframe_get_prop): Call frame->device->get_prop instead of
839 mwin__device_get_prop.
841 * m17n-gd.c: New file.
843 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
844 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
846 * m17n-core.c (m17n_init_core): Increate core_initialized.
847 (m17n_fini_core): Decremented core_initialized.
849 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
850 (Mcolormap): Don't extern them here.
852 * m17n-X.c (FRAME_DEVICE): New macro.
853 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
854 (free_display_info): Use MPLIST_DO.
855 (free_device): Free rface->info.
856 (xft_close): Delete it.
857 (device_init): Renamed from mwin__init.
858 (device_fini): Renamed from mwin__fini.
859 (device_open): Renamed from mwin__open_device.
860 (x_driver): New variable.
861 (MXFontInfo): Delete member frame, add member display.
862 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
863 Don't declare them here.
865 * internal-gui.h (MDeviceType): New enum.
866 (MWDefice): Delete it.
867 (struct MFrame): Change type of device to void *. New members
868 device_type, driver, font_driver_list.
869 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
870 (MDeviceDriver): New type.
871 (Mx, Mgd, Mfreetype): Extern them.
872 (mwin__XXX): Delete all of them.
874 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
876 (win_destroy_ic): Likewise.
877 (adjust_window_and_draw): Likewise.
878 (win_callback): Likewise.
879 (Mxim): Declare it here.
880 (minput_event_to_key): Call M_CHECK_READABLE.
882 * fontset.c (mfont__lookup_fontset): Delete local variable
885 * font.h (struct MFontDriver): Delete member close, add members
886 parse_name and build_name.
887 (mfont__driver_list): Delete extern.
888 (mfont__close): Delete extern.
890 * font.c (mfont__init): Don't set mfont__driver_list.
891 (mfont__fini): Don't unref mfont__driver_list.
892 (mfont__select): Try font drivers in frame->font_driver_list. Set
893 driver member of a realized font.
894 (mfont__close): Delete it.
895 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
896 functions of the default frame.
898 * font-ft.c (close_ft): Check ft_info->ft_face and work
900 (add_font_info): Allocate ft_info by M17N_OBJECT.
901 (ft_close): Delete it.
902 (mfont__ft_driver): Don't set ft_close.
903 (ft_select): Increment ref-count of best_font.
904 (ft_open): Decremented ref-count of base. On error, call
905 FT_Done_Face and free ft_info.
906 (ft_find_metric): Always use XXX_MONO in load_flags.
907 (ft_render): Fix setting of width. Call
908 frame->driver->draw_points instead of mwin__draw_points.
909 (ft_to_prop): Don't set mfont__driver_list.
910 (mfont__ft_fini): Just unref ft_info.
912 * face.c (mface__init): Exchange foreground and background of
913 mface__default. Call mface_put_prop to set hline of
915 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
916 (mface__free_realized): Don't call mwin__free_realized_face.
918 * draw.c (Mdepth): Don't declare it here.
919 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
920 (render_glyphs, render_glyph_string): Likewise.
921 (mdraw__init): Don't set Mdepth.
922 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
924 (mdraw_text_per_char_extents): Return 0 on success and -1 on
926 (mdraw_text_items): Check FRAME is writable.
927 (mdraw_per_char_extents): Implement body.
929 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
931 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
932 (GUI_SOURCES): Delete it.
933 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
934 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
935 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
936 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
937 (linkgui_LDADD): Set to libm17n-gui.la
938 (linkgui_LDFLAGS): New target.
939 (SRC): Include ${libm17n_gui_la_SOURCES} and
940 ${libm17n_gd_la_SOURCES}.
942 2004-05-24 Kenichi Handa <handa@m17n.org>
944 * draw.c (draw_background): Don't draw background even if
945 rface->face.property[MFACE_BACKGROUND] is not Mnil.
947 2004-05-22 Kenichi Handa <handa@m17n.org>
949 * m17n-X.c (xft_open_font): Fix anti_alias setting.
951 2004-05-20 Kenichi Handa <handa@m17n.org>
953 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
955 * m17n-gui.c: Include "plist.h".
956 (mframe): If PLIST is NULL, initialize it to emply plist.
958 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
959 (xft_driver): New variable.
960 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
961 (xft_find_metric, xft_render): New function.
962 (mwin__init): Adjusted for the new mfont__driver_list.
963 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
964 generated face to PARAM.
965 (mwin__realize_face): Fix setting of box colors. Don't call hook
967 (mwin__draw_hline): New function.
968 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
969 (mwin__xft_render): Delete these function.
971 * internal-gui.h (struct MFrame): New member tick.
972 (struct MGlyphString): New member tick.
973 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
974 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
975 (mwin__xft_render): Delete extern.
977 * fontset.c (mfont__lookup_fontset): Make the code simpler.
978 (mfontset): Always increment the reference count of returned
981 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
982 (MFTInfo): Moved to font.h.
983 (ft_iso8859_1_font_list): Delete this variable.
984 (set_font_info): Don't set font->property[MFONT_TYPE].
985 (set_font_info): Don't udpate ft_iso8859_1_font_list.
986 (add_font_info): Change type to void.
987 (fc_list): Change anme from xft_list. Caller changed. Include
988 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
989 (mfont__ft_driver): Change name from ft_driver. Caller changed.
990 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
991 (close_ft): Don't call mwin__xft_close. Unref
993 (ft_open): Don't setup ft_info->fontname. Don't call
995 (ft_find_metric): Don't call mwin__xft_get_metric.
996 (ft_encode_char): Call rfont->driver->open instead of ft_open.
997 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
998 (mfont__ft_init): Adjusted for new mfont__driver_list.
999 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1001 * font.c (mfont__driver_list): Make it MPlist.
1002 (mfont__init): Adjust initialization of mfont__driver_list.
1003 (mfont__fini): Free mfont__driver_list.
1004 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1005 (mfont__select): Adjusted for the new mfont__driver_list.
1007 * font.h (enum MFontProperty): Delete MFONT_TYPE.
1008 (mfont__drirver_list): Adjust prototype.
1009 (MFTInfo): Move to here from fron.c. Deleve member fontname.
1011 * face.h (struct MFace): Delete member realized_face_list, add
1013 (struct MRealizedFace): Delete member need_update
1014 andnofont_rface, add member non_ascii_list.
1015 (mface__update_frame_face): Extern it.
1017 * face.c (hline_prop_list, box_prop_list, noop_hook): New
1019 (get_hline_create, get_box_create): New functions.
1020 (find_realized_face): Cancel previous change. Arg RFONT deleted.
1022 (free_face): Cancep previous change. Free face->frame_list.
1023 (serialize_hline): Do nothing if hline->width is zero.
1024 (serialize_box): Do nothing if box->width is zero.
1025 (mface__init): Setup all properties of mface__default.
1026 (mface__fini): Free hline_prop_list and box_prop_list.
1027 (mface__realize): Cancel previous change. Update
1028 face->frame_list. Setup rface->non_ascii_list.
1029 (mface__for_chars): Update rface->non_ascii_list.
1030 (mface__free_realized): Free rface->non_ascii_list.
1031 (mface__update_frame_face): New function.
1032 (mface): Initialize face->frame_list.
1033 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
1035 (mface_merge): Likewise.
1036 (mface_put_prop): If key is Mhline or Mbox, get value by
1037 get_hline_create or get_box_create respectively.
1038 (mface_put_prop): Update frame->tick and call
1039 mface__update_frame_face if necessary.
1040 (mface_update): Do nothing if func is noop_hook.
1042 * draw.c (render_glyphs): If a font is not found, use
1043 mwin__draw_empty_boxes.
1044 (alloc_gstring): Initialize gstring->tick.
1045 (get_gstring): Check gstring->tick.
1047 2004-05-17 Kenichi Handa <handa@m17n.org>
1049 * face.c (find_realized_face): Return value changed. If RFONT is
1050 NULL, avoid unnecessary checking.
1051 (free_face): Free face->realized_face_list.
1052 (mface__realize): Adjusted for the change of find_realized_face.
1053 If it returns a realized face that needs update, free it and
1054 realize a new one. Push a new realized face to
1055 frame->realized_face_list instead of appending.
1056 (mface__for_chars): Adjusted for the change of find_realized_face.
1057 Short cut if the required font is in rface->ascii_rface.
1058 (mface_put_prop): Free old value if necessary. Set need_update
1059 member of realized faces to 1.
1061 * face.h (struct MFace): Delete member tick, add member
1063 (struct MRealizedFace): Delete member tick, add member
1066 2004-05-13 Kenichi Handa <handa@m17n.org>
1068 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1070 2004-05-12 Kenichi Handa <handa@m17n.org>
1072 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1074 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1075 parse it XftNameParse.
1077 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1078 (all_fonts_scaned): New variable.
1079 (set_font_info): FAMILY may be Mnil.
1080 (add_font_info): Argument changed.
1081 (xft_list): Call add_font_info in it.
1082 (ft_list): Likewise.
1083 (ft_select): Make it work in the case family is Mnil.
1084 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1085 (mfont__ft_fini): Set all_fonts_scaned to 0.
1087 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1088 that is failed to open.
1090 2004-05-10 Kenichi Handa <handa@m17n.org>
1092 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1093 device's depth is 1 (i.e. monochrome).
1095 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1096 to work around the problem of libtool.
1098 * font-ft.c: Include <freetype/ftbdf.h>.
1099 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1101 (mfont__ft_init): Initialize them.
1102 (ft_iso8859_1_font_list): New variable.
1103 (set_font_info): Detect a font containing iso8859-1 glyphs and
1104 register it in ft_iso8859_1_font_list. If the font is not
1105 scalable, assume it as BDF or PCF font and setup SIZE and RESY
1106 properties of the font from its properties.
1107 (add_font_list): If the font is not scalable, check if it is BDF
1108 or PCF font. If not, ignore it.
1109 (ft_select): If FAMILY is Mnil, return NULL only if the requested
1110 registry is not iso8859-1.
1111 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1112 ft_iso8859_1_font_list.
1113 (ft_find_metric): If the font is not scalable, assume it as BDF
1114 or PCF, and get a metric from its properties.
1115 (mfont__ft_fini): Free ft_iso8859_1_font_list.
1117 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
1119 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1120 (libm17n_la_LDFLAGS): Delete it.
1121 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1122 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1124 2004-05-06 Kenichi Handa <handa@m17n.org>
1126 * draw.c (compose_glyph_string): Fix previous change.
1128 2004-04-30 Kenichi Handa <handa@m17n.org>
1130 * font-ft.c (ft_list): Delete unused variable `result'.
1131 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1133 2004-04-27 Kenichi Handa <handa@m17n.org>
1135 * m17n-X.c: Include config.h
1136 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1137 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1138 (MWDevice) [HAVE_XFT2]: New member xft_draw.
1139 (FRAME_CMAP, FRAME_VISUAL): New macros.
1140 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1141 (xfont_driver): Make it static.
1142 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1143 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1144 info->xft_color_back.
1145 (MXftFontInfo) [HAVE_XFT2]: New type.
1146 (mwin__xft_close) [HAVE_XFT2]: New function.
1147 (mwin__xft_open) [HAVE_XFT2]: New function.
1148 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1149 (mwin__xft_render) [HAVE_XFT2]: New function.
1151 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1152 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1153 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1156 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1158 * font-ft.c: Don't include FT_FREETYPE_H here.
1159 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1160 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1161 (MFTInfo): New member charmap_index.
1162 (MFTInfo) [HAVE_XFT2]: New member xft_info.
1163 (check_otf_filename): Renamed from check_filename. Return value
1165 (ft_set_property): This function deleted.
1166 (set_font_info): New function.
1167 (add_font_list): Argument changed. Add multiple fonts.
1168 (xft_list) [HAVE_XFT2]: New function.
1169 (ft_list) [not HAVE_XFT2]: New function.
1170 (ft_select): Add code for Xft.
1171 (close_ft): Likewise.
1172 (ft_open): Likewise.
1173 (ft_find_metric): Likewise.
1174 (ft_encode_char): Likewise.
1175 (ft_render): Likewise.
1177 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1179 2004-04-26 Kenichi Handa <handa@m17n.org>
1181 * textprop.c (mtext_attach_property): Declare the return type as
1184 2004-04-21 Kenichi Handa <handa@m17n.org>
1186 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1188 2004-04-09 Kenichi Handa <handa@m17n.org>
1190 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1192 (load_command): Setup above members.
1194 2004-04-05 Kenichi Handa <handa@m17n.org>
1196 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1198 2004-03-30 Kenichi Handa <handa@m17n.org>
1200 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1203 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1204 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1206 2004-03-29 Kenichi Handa <handa@m17n.org>
1208 * Version 1.0 Patch Level 2 released.
1210 2004-03-29 Kenichi Handa <handa@m17n.org>
1212 * charset.c (make_charset): Set charset->fully_loaded and
1213 charset->simple correctly. Don't try to get charset->min_char and
1214 charset->max_char for a charset of method subset and superset.
1215 Don't load a mapping file here.
1216 (mcharset__init): Set unified_max.
1217 (mcharset__load_from_database): Free a working plist.
1219 * coding.c (mcoding__fini): Free all malloced data.
1221 * input-gui.c (win_create_ic): Set control.as_image for preediting
1224 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1225 `count') to initialize the array.
1227 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1230 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1232 (mwin__create_window): Fix bug of setting a background pixel of a
1234 (mwin__adjust_window): Clear the window before drawing.
1236 * m17n-core.c (mdebug__report_object): Free array->objectes if
1238 (m17n_init_core): Don't set report_header_printed to 0 here.
1239 Fix debugging information.
1240 (m17n_fini_core): Set report_header_printed to 0 here.
1242 * m17n-core.h (mplist_deserialize): Extern it.
1244 * m17n-gui.c (m17n_fini_win): Fix debugging information.
1246 * m17n.c (m17n_fini): Fix debugging information.
1248 * mtext.c (mtext__adjust_foramt): New function.
1250 * mtext.h (mtext__adjust_foramt): Extern it.
1252 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1254 * plist.h (mplist__deserialize): Don't extern it.
1256 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
1257 elements of symbol_table to NULL. Report about created and freed
1258 symbols if MDEBUG_FINI is set.
1260 2004-03-22 Kenichi Handa <handa@m17n.org>
1262 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1264 * m17n.c (m17n_init): Fix the way of checking merror_code.
1266 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1268 2004-03-22 Kenichi Handa <handa@m17n.org>
1270 * fontset.c (realize_font_group): Adjust the font size by
1271 mfont__resize before selecting a font.
1273 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1275 2004-03-19 Kenichi Handa <handa@m17n.org>
1277 * Version 1.0 Patch Level 1 released.
1279 2004-03-19 Kenichi Handa <handa@m17n.org>
1281 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1283 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1285 2004-03-19 Kenichi Handa <handa@m17n.org>
1287 Re-apply the changes forgotten in the released version.
1289 * charset.c (mcharset__load_from_database): Call
1290 mchar_define_charset.
1292 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1293 (mconv_encode_range): Put Mcoding text property.
1295 2004-03-18 Kenichi Handa <handa@m17n.org>
1297 * draw.c (Mdepth): New variable.
1298 (visual_order): Delete unused local var `pos'.
1299 (compose_glyph_string): Fix for the case that gstring->glyphs is
1300 realloced. Stop generating glyphs at TO. Fix handling of
1302 (layout_glyphs): Get metrics of all glyphs in advance. Set
1303 lbearing and rbearing of base of composition glyph correctly.
1304 Handle left-overhang glyphs correctly.
1305 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
1307 (dump_combining_code): Change the defualt off_x character to ".".
1308 (mdraw__init): Initialize Mdepth.
1310 * face.c (work_gstring): New variable
1311 (mface__init): Initialize work_gstring.
1312 (mface__fini): Free work_gstring.glyphs.
1313 (mface__realize): Don't handle videomode property here. Adjusted
1314 for the change of mfont__get_metric.
1315 (mface__for_chars): Adjusted for the change of mfont__get_metric.
1317 * face.h (enum face_gc): Moved to m17n-X.c.
1319 * font.h (struct MFontDriver): Arguments of find_metric changed.
1320 (mfont__select): Prototype adjusted.
1321 (mfont__get_metric): Likewise.
1322 (mfont__ft_drive_otf): Likewise.
1323 (mfont__flt_run): Likewise.
1325 * font.c (mfont__select): New argument layouter. If layouter is
1326 different in the registered font, make a new copy of realized
1328 (mfont__get_metric): Argument changed. Get metrics of multiple
1330 (mfont_find): Call mfont__select with layouter as Mnil.
1332 * font-flt.c (FontLayoutContext): New member rfont.
1333 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1334 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
1336 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
1338 (NUM_POINTS): New macro.
1339 (MPointTable): New type.
1340 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1341 (mfont__ft_drive_otf): New argument rfont.
1343 * fontset.c (realize_font_group): Adjusted for the changed of
1345 (check_fontset_element): This function deleted.
1347 * input-gui.c (adjust_window_and_draw): Locate a preedit window
1348 off the parent window if the preedit text is zero length.
1350 * internal-gui.h (struct MFrame): New members foreground,
1351 background, videomode, font.
1352 (struct MGlyphString): New member anti_alias.
1353 (MDrawPoint): New type.
1354 (mwin__draw_bitmap): Prototype deleted.
1355 (mwin__draw_points): Prototype added.
1357 * m17n-gui.h (MDrawControl): New member anti_alias.
1359 * m17n-gui.c (free_frame): Free frame->font.
1360 (mframe): Set the fontset of frame->face to the default fontset.
1362 * m17n-X.c (RGB_GC): New type.
1363 (enum gc_index): Renamed from enum face_gc. Member names changed.
1365 (struct MWDevice): Members foreground and background deleted. New
1366 member scratch_gc, gc_list.
1367 (DEFAULT_FONT, FALLBACK_FONT): New macros.
1368 (free_device): Free GCs in device->gc_list.
1369 (get_rgb_gc): New function.
1370 (get_gc): Renamed and argument changed from get_color.
1371 (get_gc_for_anti_alias): New function.
1372 (xfont_find_metric): Arguments changed. Get metrics of multiple
1374 (set_region): Argument changed. Caller changed.
1375 (xfont_render): Allways set a font in gc.
1376 (x_error_handler, x_io_error_handler): Define only if
1377 X_SET_ERROR_HANDLER is defined.
1378 (mwin__open_device): Create device->scratch_gc. Set members
1379 foreground, background, and videomode of frame. Call
1380 XSetErrorHandler and XSetIOErrorHandler only if
1381 X_SET_ERROR_HANDLER is defined.
1382 (struct gc_list): Deleted.
1383 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1384 (mwin__realize_face): Adjusted for the change of the format of
1385 rface->info and the charge of set_region.
1386 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1387 (mwin__draw_box): Likewise.
1388 (mwin__draw_bitmap): This function deleted.
1389 (mwin__draw_points): New function.
1390 (mwin__verify_region): Adjusted for the change of the format of
1391 rface->info and the charge of set_region.
1392 (mwin__create_window): Inherit backgound pixel from parent.
1393 (mwin__dump_gc): Adjusted for the change of the format of
1396 2004-03-16 Kenichi Handa <handa@m17n.org>
1398 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1400 * input.c (M_key_alias): New variable.
1401 (handle_key): Try M_key_alias property of a key too.
1402 (minput__init): Initialize M_key_alias. Give that property to
1403 symbols in one_char_symbol. Fix bug of initializing
1406 * draw.c (compose_glyph_string): Don't handle
1407 ignore_formatting_char here. Include formatting characters in the
1408 range processed by a FTL.
1409 (layout_glyph_string): Handle ignore_formatting_char here.
1411 2004-03-12 Kenichi Handa <handa@m17n.org>
1413 * input-gui.c (win_create_ic): Enable bidi in status control.
1415 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1417 2004-03-09 Kenichi Handa <handa@m17n.org>
1419 * input.c (load_input_method): If title is not specified, use the
1420 input method name as title.
1422 * m17n-X.c (get_color): Make it static.
1423 (xim_create_ic, xim_destroy_ic, x_error_handler)
1424 (x_io_error_handler): Likewise.
1426 2004-03-01 Kenichi Handa <handa@m17n.org>
1428 * Version 1.0 released.
1431 Copyright (C) 2003, 2004
1432 National Institute of Advanced Industrial Science and Technology (AIST)
1433 Registration Number H15PRO112
1435 This file is part of the m17n library.
1437 The m17n library is free software; you can redistribute it and/or
1438 modify it under the terms of the GNU Lesser General Public License
1439 as published by the Free Software Foundation; either version 2.1 of
1440 the License, or (at your option) any later version.
1442 The m17n library is distributed in the hope that it will be useful,
1443 but WITHOUT ANY WARRANTY; without even the implied warranty of
1444 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1445 Lesser General Public License for more details.
1447 You should have received a copy of the GNU Lesser General Public
1448 License along with the m17n library; if not, write to the Free
1449 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA