1 2004-10-12 Kenichi Handa <handa@m17n.org>
3 * font-ft.c (ft_list_generic): Fix for the case of not
6 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
8 * font.c (mfont_list): If no font is found, return NULL.
9 (load_font_encoding_table): Put entries of nil registry first.
10 (find_encoding): Adjust for the above change.
12 2004-10-11 Kenichi Handa <handa@m17n.org>
14 * m17n-gui.h (mfont_list): Adjust prototype.
16 * m17n-X.c (xfont_list): New arg maxnum.
18 * font.h (struct MFontDriver): Change prototype of <list>.
20 * font-ft.c (fc_generic_family_list): Delete it.
21 (Mserif, Msans_serif, Mmonospace): Delete them.
22 (M_generic_family_info): New variable.
23 (enum GenericFamilyType): New enum.
24 (struct GenericFamilyInfo): New struct.
25 (generic_family_table): New variable.
26 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
28 (add_font_info): Get style here.
29 (ft_list_family): Don't initialize fc_config here. Don't list
31 (ft_list_generic): New function.
32 (ft_select): Pay attention to generic familes here.
33 (ft_open): Fix calculation of ascent and descent.
34 (ft_list): Pay attention to generic families.
35 (mfont__ft_init): Initialize M_generic_family_info,
36 generic_family_table, and fc_config..
37 (mfont__ft_fini): Finalize generic_family_table.
39 * draw.c (compose_glyph_string): Use more constant font for
40 glyphs. Adjust for the member change in MGlyph.
41 (layout_glyph_string): Adjust for the member change in MGlyph.
42 (alloc_gstring): Intilize scracth_glyph to avoid
43 compose_glyph_string on it.
44 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
45 (mdraw_coordinates_position): Fix previous change.
47 * internal-gui.h (glyph_category): New enum.
48 (MGlyph): Change type of <category> to enum glyph_category.
50 * face.c (mface__realize): Delete args langauge and charset.
51 (mface__for_chars): Fix for the case that glyphs have different
53 (mface__update_frame_face): Adjust for mface__realize change.
55 * face.h (mface__realize): Adjust prototype.
57 2004-10-05 Kenichi Handa <handa@m17n.org>
59 * language.c (mlang__init): Add Akan.
61 2004-10-04 Kenichi Handa <handa@m17n.org>
63 * font-ft.c (add_font_info): Add instead of push the element.
64 (ft_list_family): For generic fonts, try all
65 substituted. families.
67 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
68 (run_rule): Don't update cluster range here.
69 (run_command): Update cluster range on appending a glyph.
70 (run_otf): Update cluster range for glyphs generated by OTF.
72 2004-10-02 Kenichi Handa <handa@m17n.org>
74 * m17n-X.c (device_open): Handle Mfont key in PLIST.
76 2004-09-30 Kenichi Handa <handa@m17n.org>
78 * font-ft.c (ft_select): Ignore family on calling mfont__score.
80 2004-09-30 Kenichi Handa <handa@m17n.org>
82 * font.h: Include <fontconfig/fontconfig.h>.
83 (MFTInfo): New member langset.
84 (mfont__encoding_list): Extern it.
86 * font.c (mfont__encoding_list): New function.
87 (mdebug_dump_font_list): New function.
89 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
90 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
92 (ft_family_list): New variable.
93 (set_font_info): New arg basep. Callers changed.
94 (fc_list): Check the return value of FcPatternGetString.
95 (add_font_info): New arg plist. Callers changed. Update
97 (ft_list_family): New function (merged fc_list and ft_list_all).
98 (ft_select): Use ft_list_family.
99 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
101 (mfont__ft_init): Initialize above new variables.
102 (mfont__ft_fini): Free ft_family_list.
103 (STRDUP_LOWER): New macro.
104 (set_font_info): Use STRDUP_LOWER.
105 (ft_list_family): Avoid duplicate addition of font path. Use
107 (fc_decode_prop): Fix typo.
109 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
110 (xfont_registry_list): Change argument disp_info to frame.
112 (xfont_list_all): New function.
113 (xfont_list): If FONT is not NULL, check all fonts.
115 2004-09-28 Kenichi Handa <handa@m17n.org>
117 * m17n-X.c (MXFont, MXFontList): New types.
118 (MDisplayInfo): Delete members font_registry_list,
119 iso8859_1_family_list, iso10646_1_family_list, new members
120 font_list, base_font_list.
121 (free_display_info): Adusted for the change of MDisplayInfo.
122 (xfont_driver): Initialize with xfont_list.
123 (font_compare): New function.
124 (build_font_list): Deleted.
125 (xfont_registry_list): New function.
126 (xfont_select): Use xfont_registry_list.
127 (xfont_list): New function.
128 (device_open): Adusted for the change of MDisplayInfo.
130 * font-ft.c (add_font_info): New arg languages. Callers changed.
131 (fc_list): Get languages from fonts..
132 (ft_list_all): Renamed from ft_list. Callers changed.
133 (ft_list): New function.
134 (mfont__ft_driver): Initalize with ft_list.
136 * font.c (mfont_list): New function.
138 * font.h (struct MFontDriver): New member `list'.
139 (MFTInfo): New member languages.
141 * m17n-gui.h (mfont_list): Extern it.
143 2004-09-27 Kenichi Handa <handa@m17n.org>
145 * internal-gui.h (struct MGlyphString): Delete members mt,
146 sub_width, sub_lbrearing, sub_rbearing, and region.
148 * draw.c (MSubTextExtents): New type.
149 (layout_glyphs): New arg extents. Set its members.
150 (layout_glyph_string): Adjusted for the above change.
151 (alloc_gstring): Don't set gstring->mt.
152 (truncate_gstring): Call line_break function with mt instead of
155 2004-09-22 Kenichi Handa <handa@m17n.org>
157 * mtext.c (count_utf_16_chars): Count each code of invalid
160 2004-09-19 Kenichi Handa <handa@m17n.org>
162 * mtext.c (default_utf_16, default_utf_32): Rename them to
163 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
166 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
169 2004-09-13 Kenichi Handa <handa@m17n.org>
171 * draw.c (Mlatin): Don't declare it here.
172 (visual_order): Fix reordering of combining characters.
173 (compose_glyph_string): Fix detection of script.
174 (layout_glyphs): Don't fix reordering of combining characters
176 (layout_glyph_string): Pay attention to
177 control->disable_overlapping_adjustment.
178 (truncate_gstring): Include at least on character in a line.
179 (get_gstring): Always scan one full line.
180 (mdraw__init): Don't initialize Mlatin here.
181 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
182 have a font, use ascent/descent of an ASCII font. Allow
183 ink_array_return and logical_array_return to be NULL.
184 (mdraw_coordinates_position): Fix iteration.
186 * font-ft.c (MFTtoProp): Member completely changed.
187 (ft_to_prop): Adjusted for the above change.
188 (ft_to_prop_size): Likewise.
189 (set_font_info): Adjusted for the change of MFTtoProp.
190 (fc_generic_family_list): New variable.
191 (fc_list): Add special handling of generic font names.
192 (mfont__ft_init): Adjusted for the change of MFTtoProp.
193 Initialize fc_generic_family_list.
194 (mfont__ft_fini): Don't free ft_to_prop. Free
195 fc_generic_family_list.
196 (FC_vs_M17N_font_prop): New type.
197 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
198 (fc_decode_prop, fc_encode_prop): New functions.
199 (mfont__ft_parse_name): Use fc_decode_prop.
200 (mfont__ft_unparse_name): Use fc_encode_prop.
202 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
203 (MWDevice): Add member realized_font_list.
204 (free_display_info): Don't free disp_info->realized_font_list.
205 (free_device): Free device->realized_fontset_list.
206 (xft_find_metric): Use gstring->frame instead of rfont->frame.
207 (device_open): Don't initialize disp_info->realized_font_list.
208 (device_open): Initialize device->realized_font_list and set it to
209 frame->realized_font_list.
211 * fontset.c (try_font_group): New function.
212 (mfont__lookup_fontset): Use try_font_group.
214 * font.c (common_weight): Change the order of "regular".
216 * face.c (Mlatin): Don't make it static.
217 (mface__realize): Be sure to set work_gstring.frame.
218 (mface__for_chars): Likewise.
220 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
223 * internal-gui.h (Mlatin): Extern it.
225 * m17n-gui.h (MDrawControl): New member
226 disable_overlapping_adjustment.
228 2004-09-06 Kenichi Handa <handa@m17n.org>
230 * font-flt.c (run_otf): Fix typo ('}'->']').
232 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
233 (COMBINING_PRECOMPUTED_P): New macros.
235 * draw.c (layout_glyphs): Handle precomputed combining code.
237 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
238 precomupted combining code.
240 2004-09-03 Kenichi Handa <handa@m17n.org>
242 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
245 2004-08-27 Kenichi Handa <handa@m17n.org>
247 * face.c (mface_put_prop): If the new value is the same as the
248 current one, don't increment frame->tick.
250 2004-08-25 Kenichi Handa <handa@m17n.org>
252 * fontset.c (mfontset): Initialize font_spec_list member.
253 (mfontset_copy): Load fontset if necessary.
255 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
256 'metrics' to for C++.
258 * draw.c (mdraw_glyph_info): Adjusted for the member name change
261 2004-08-16 Kenichi Handa <handa@m17n.org>
263 * Version 1.1.0 released.
265 2004-08-13 Kenichi Handa <handa@m17n.org>
267 * language.c (mlang__init): Add Dhivehi.
269 * m17n-gui.c (Mx, Mfreetype): Delete it.
270 (m17n_init_win): Don't initialize Mx and Mfreetype here.
272 * m17n-gui.h (Mfreetype, Mxft): Extern them.
273 (mfont_resize_ratio): Extern it.
274 (MDrawGlyphInfo): New member logical_width;
275 (MDrawGlyph): New type.
276 (mdraw_glyph_list): Prototype adjusted.
278 * m17n-X.c (xfont_open): Set type and fontp members.
279 (xft_open): Likewise.
281 * internal-gui.h (Mx, Mfreetype): Delete extern.
283 * font.h (struct MRealizedFont): New member type and fontp.
285 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
286 (Mx, Mfreetype): Declare here.
287 (Mxft): New variable.
288 (mfont_resize_ratio): New function.
290 * font-ft.c (ft_open): Set type and fontp members.
292 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
295 2004-08-11 Kenichi Handa <handa@m17n.org>
297 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
300 2004-08-06 Kenichi Handa <handa@m17n.org>
302 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
305 * font-flt.c (run_otf): Print debugging information if necessary.
307 2004-08-05 Kenichi Handa <handa@m17n.org>
309 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
310 positioning_type 5 and 6. Switch simplified.
312 2004-08-04 Kenichi Handa <handa@m17n.org>
314 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
316 2004-08-02 Kenichi Handa <handa@m17n.org>
318 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
319 set val to 1 even if it is greater than 1.
321 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
323 2004-07-29 Kenichi Handa <handa@m17n.org>
325 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
326 debugging information.
328 * internal.h (MDEBUG_PRINT5): New macro.
330 * draw.c (layout_glyphs): Don't combine a zero width glyph with
331 the previous one if the zero width glyph has left or right
334 2004-07-26 Kenichi Handa <handa@m17n.org>
336 * m17n-X.c (xft_render): Pay attention to members left_padding and
337 right_padding of MGlyph.
339 * draw.c (visual_order): Allocate one more elements for arrays as
340 a workaround of fribidi bug.
341 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
342 instead of MGlyph->bidi_sensitive.
343 (layout_glyph_string): Pay attentinon to
344 control->orientation_reversed when padding at the head or tail.
345 Fix adjustment of space glyph width.
346 (get_gstring): If cursor_width or cursor_bidi is changed, don't
349 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
350 instead of MGlyph->bidi_sensitive.
352 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
354 2004-07-26 Kenichi Handa <handa@m17n.org>
356 * draw.c (visual_order): Don't treat combined glyphs specially.
357 (layout_glyphs): Don't get metrics glyphs that are already ready.
358 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
359 width with the previous one.
360 (draw_background): Fix bar cursor position on a r2l glyph.
362 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
363 (run_rule): Fix place of updating cluster_begin_pos and
364 cluster_end_pos here.
365 (run_otf): Don't set left_padding.
367 * font-ft.c (adjust_anchor): Type of argument `code' changed.
369 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
370 Fix handling of GPOS.
371 (mfont__ft_drive_gpos): Delete this function.
373 * font.h (mfont__ft_drive_otf): Renamed back from
374 mfont__ft_drive_gsub.
375 (mfont__ft_drive_gpos): Delete extern.
377 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
378 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
380 2004-07-23 Kenichi Handa <handa@m17n.org>
382 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
385 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
387 2004-07-22 Kenichi Handa <handa@m17n.org>
389 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
391 2004-07-20 Kenichi Handa <handa@m17n.org>
393 * draw.c (render_glyphs): Fix checking of g->code validity.
395 * face.c (mface__realize): Set g.type.
397 2004-07-18 Kenichi Handa <handa@m17n.org>
399 * Makefile.am: Prepend ${top_srcdir} to all *.la in
402 * m17n-gui.c (mframe): Print error message give by dlopen to
405 2004-07-16 Kenichi Handa <handa@m17n.org>
407 * draw.c (compose_glyph_string): Improve the way of deciding a
408 script. For a character that doesn't have script property, use
409 the last non-latin script.
411 * font-ft.c (fc_list): Cancel previous change.
412 (mfont__ft_init): Add more entries in ft_to_prop_name.
414 2004-07-15 Kenichi Handa <handa@m17n.org>
416 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
417 previous or next character glyphs.
419 2004-07-14 Kenichi Handa <handa@m17n.org>
421 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
424 * fontset.c (mfont__lookup_fontset): If glyph type is
425 GLYPH_SPACE, get codes for SPACE.
427 * internal-gui.h (Mfont): Delete extern.
429 * m17n-gui.h (Mfont): Delete duplicated extern.
431 2004-07-13 Kenichi Handa <handa@m17n.org>
433 * font-ft.c (DEVICE_DELTA): New macro.
434 (adjust_anchor): New function.
435 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
437 (mfont__ft_drive_gpos): New function.
439 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
440 (FontLayoutContext): Delete member `rfont'.
441 (run_otf): Set g->otf_cmd. Call
442 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
443 only whne HAVE_OTF is defined.
445 * fontset.c: Include "config.h".
447 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
448 (MGlyph): New member otf_cmd.
450 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
451 (mfont__ft_drive_gpos): Extern it.
453 * face.c: Include "config.h".
455 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
457 * input-gui.c: Include "config.h".
459 * plist.c: Include "config.h".
461 2004-07-06 Kenichi Handa <handa@m17n.org>
463 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
464 internal-gui.h: Cancel previous changes.
466 * m17n-gd.h: Delete it.
468 * Makefile.am (libm17n_core_la_LIBADD): New variable.
469 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
470 @XML2_LD_FLAGS@ to above.
471 (libm17n_la_LIBADD): Add -ldl.
472 (libm17n_la_LDFLAGS): Add -export-dynamic.
473 (X_LD_FLAGS): Fix the order of linking.
474 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
475 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
476 (libm17n_X_la_LDFLAGS): Add -module.
477 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
478 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
479 (libm17n_gd_la_LDFLAGS): Add -module.
480 (include_HEADERS): Delete m17n-gd.h.
482 2004-06-30 Kenichi Handa <handa@m17n.org>
484 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
485 (MDeviceLibraryInterface): Delete it.
486 (register_device_library): Delete it.
487 (m17n__device_library_list): Renamed from device_library_list.
489 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
490 (m17n_init_win): Adjust prototype.
492 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
493 (m17n_init_gd): New function.
495 * m17n-gd.h: New file.
497 * m17n-X.h: Include <m17n-gui.h>.
498 (m17n_init_X): Extern it.
499 (M17N_INIT): Redefine it.
501 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
502 (m17n_init_X): New function.
504 * internal-gui.h (m17n__device_library_list): Extern it.
505 (struct MDeviceDriver): New members initialized, init, and fini.
507 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
509 (libm17n_X_la_LIBADD): Delete aboves.
510 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
511 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
512 (libm17n_gd_la_LDFLAGS): Delete it.
513 (include_HEADERS): Add m17n-gd.h.
515 2004-06-25 Kenichi Handa <handa@m17n.org>
517 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
518 (libm17n_gd_la_LDFLAGS): Cancel previous change.
520 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
522 * font-ft.c (fc_list): If FcFontList finds no font, try
525 * draw.c (compose_glyph_string): Terminate the last loop after
526 doing default combining if necessary.
528 2004-06-24 Kenichi Handa <handa@m17n.org>
530 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
532 * character.c (mchar_define_property): Add const to an arg.
534 * charset.c (mchar_define_charset): Add const to an arg.
536 * coding.c (MCodingSystem): Add const to an arg or decoder.
537 (finish_decoding): Add const to an arg.
538 (decode_coding_charset, decode_coding_utf_8)
539 (decode_coding_utf_16, decode_coding_utf_32)
540 (decode_coding_iso_2022, decode_coding_sjis)
541 (mconv_define_coding): Likewise.
543 * m17n-X.c (xft_find_metric): Delete unused variable.
545 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
548 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
551 * mtext.c (count_utf_8_chars, count_utf_16_chars)
552 (mtext__from_data, mtext_from_data): Add `const' to an arg.
554 * mtext.h (mtext__from_data): Ajust prototype.
556 2004-06-23 Kenichi Handa <handa@m17n.org>
558 * draw.c (compose_glyph_string): Always get glyph codes by
560 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
561 (mdraw_glyph_list): New function.
563 * font-flt.c (mfont__flt_run): Be sure to call
564 rfont->driver->encode_char.
566 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
567 (ft_encode_char): Delete arg C.
568 (ft_render): Don't call FT_Get_Char_Index.
570 * font.c (mfont__encodable_p): Delete it.
571 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
573 * font.h (struct MFontDriver): Delete arg C of encode_char.
574 (mfont__encodable_p): Delete extern.
576 * m17n-X.c (xfont_encode_char): Delete arg C.
577 (xft_find_metric): Don't cal FT_Get_Char_Index.
578 (xft_render): Likewise.
580 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
582 (mdraw_glyph_list): Extern it.
584 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
586 2004-06-22 Kenichi Handa <handa@m17n.org>
588 * m17n-gui.h (mfontset_lookup): Extern it.
590 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
592 * fontset.c (realize_fontset_elements)
593 (free_realized_fontset_elements, update_fontset_elements): New
595 (mfont__realize_fontset): Call realize_fontset_elements.
596 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
597 (mfont__lookup_fontset): If a fontset was modified, update
598 the realized fontset.
599 (mfontset_modify_entry): Increment fontset->tick.
600 (mfontset_lookup): New function.
602 2004-06-21 Kenichi Handa <handa@m17n.org>
604 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
606 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
607 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
608 length of source text 0.
610 2004-06-21 Kenichi Handa <handa@m17n.org>
612 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
613 (compare): Pay attention to format other than utf-8.
614 (copy): Delete this function.
615 (count_by_utf_8, count_by_utf_16, insert): New functions.
616 (count_utf_16_chars): Fix handling of a surrogate pair.
617 (find_char_forward, find_char_backward): Likewise.
618 (mtext__from_data): Delete unnecessary check. Fix number of
620 (mtext_from_data): Don't count items.
621 (mtext_ref_char): Optimize the code.
622 (mtext_set_char): Pay attention to format other than utf-8.
623 (mtext_cat_char): Likewise.
624 (mtext_dup): Don't call copy, instead do allocation here.
625 (mtext_cat): Call insert instead of copy.
626 (mtext_ncat): Likewise.
627 (mtext_cpy): Delete character at first and call insert instead of
629 (mtext_ncpy): Likewise.
630 (mtext_copy): Likewise.
631 (mtext_duplicate): Call insert instead of copy.
632 (mtext_del): Pay attention to format other than utf-8.
633 (mtext_ins): Simply call insert.
634 (mtext_ins_char): Pay attention to format other than utf-8.
635 (mtext_tok): Call insert instead of copy.
636 (mtext_text): Call UNIT_BYTES.
638 * textprop.c (mtext__adjust_plist_for_change): New function.
640 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
641 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
642 (CHAR_UNITS_AT): Fix typo.
643 (CHAR_UNITS_BY_HEAD): Fix typo.
644 (STRING_CHAR_AND_UNITS): Fix typo.
646 * internal.h (MTEXT_READ_ONLY_P): New macro.
648 * mtext.h (mtext__replace): Delete the extern.
649 (mtext__adjust_foramt): Adjust prototype.
651 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
652 if possible. Otherwise make a copy of mmt.
654 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
657 2004-06-18 Kenichi Handa <handa@m17n.org>
659 * character.h (CHAR_STRING_UTF16): Fix syntax.
661 2004-06-16 Kenichi Handa <handa@m17n.org>
663 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
664 (libm17n_X_la_LIBADD): Delete it.
665 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
667 * m17n-X.c (device_open): Add parens in `if' condition.
669 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
670 (DEC_POSITION): Likewise.
671 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
673 2004-06-15 Kenichi Handa <handa@m17n.org>
675 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
678 * draw.c (compose_glyph_string): If langauge is specified, call
679 mface__for_chars even if a text is all latin. Fix condition for
680 setting non_ascii_found.
682 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
684 * m17n.h (minput_char_to_key): Delete extern.
686 * m17n-gui.h (minput_event_to_key): Cancel previous change.
688 * m17n-gui.c (null_device_open): Set several members of frame.
690 2004-06-14 Kenichi Handa <handa@m17n.org>
692 * m17n-gui.h (minput_event_to_key): Delete extern.
694 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
696 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
698 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
700 2004-06-08 Kenichi Handa <handa@m17n.org>
702 * character.c (mchar_put_prop): Don't increment the ref-count of
705 2004-06-04 Kenichi Handa <handa@m17n.org>
707 * m17n-core.c (mdebug__register_object): New function.
708 (mdebug__unregister_object): Likewise.
710 * internal.h (mdebug__register_object, mdebug__unregister_object):
712 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
715 * charset.c (mcharset__load_from_database): Don't call
716 mconv__register_charset_coding here.
718 * coding.c (find_coding): Get a real name from an element of
719 coding_definition_list.
720 (mconv__register_charset_coding): Set the real name at the top of
722 (mcoding__load_from_database): Likewise.
723 (mconv_list_codings): Adjusted for the above change.
725 2004-06-03 Kenichi Handa <handa@m17n.org>
727 * coding.c (find_coding): Find by canonicalized name. Don't have
728 to modify the element of coding_definition_list by
730 (mconv__define_coding_from_charset): Delete it.
731 (mconv__register_charset_coding): Canonicalize sym.
732 (mcoding__load_from_database): Register plist modified by
735 * coding.h (mconv__define_coding_from_charset): Don't extern it.
737 * font-ft.c (ft_open): Fix setting of rfont->descent.
739 2004-06-02 Kenichi Handa <handa@m17n.org>
741 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
742 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
743 (xlfd_unparse_name): Renamed from xfont_build_name.
744 (mfont__init): Initialized Mfontconfig.
745 (mfont__free_realized): Unconditionally unref rfont->info.
746 (mfont__select): Free `this' if it's not best.
747 (mfont__open): Don't check frame->realized_font_list.
748 (mfont__parse_name_into_font): New function.
749 (Mfontconfig): New variable.
750 (mfont_from_name): Call mfont_parse_name.
751 (mfont_name): Call mfont_unparse_name.
752 (mdebug_dump_font): Likewise.
754 * font.h (struct MFontDriver): Delete members parse_name and
756 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
757 (mfont__parse_name_into_font): Extern it.
759 * font-ft.c: Include "symbol.h".
760 (close_ft): Unconditionally free filename and charmap_list of
762 (ft_open): Duplicate base->filename. Increment ref-count of
763 ft_info->charmap_list. Free ft_info->charmap_list and
764 ft_info->filename on error.
765 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
767 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
769 (enum xlfd_field_idx): Moved to font.c.
770 (split_font_name, build_font_name): Likewise.
771 (build_font_list): Call mfont__parse_name_info_font.
772 (xfont_open): Call mfont__unparse_name. Free name.
773 (xfont_parse_name, xfont_build_name): Moved to font.c
774 (xft_select): Prototype deleted.
775 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
776 Call mfont_pase_name.
778 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
779 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
782 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
785 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
787 2004-06-01 Kenichi Handa <handa@m17n.org>
789 * fontset.c (mfontset_modify_entry): Pay attention to the case
790 that fontset->font_spec_list is NULL.
792 2004-05-31 Kenichi Handa <handa@m17n.org>
794 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
796 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
798 * font.c (mfont__select): Print score the a font for debugging.
800 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
802 * coding.c (reset_coding_sjis): Check kanji and kana instead of
803 kanji_sym and kana_sym.
805 2004-05-28 Kenichi Handa <handa@m17n.org>
807 * Makefile.am (VINFO): New variable.
808 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
809 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
811 2004-05-27 Kenichi Handa <handa@m17n.org>
813 The following chanages are to make device dependent functions
814 accessible only from MDeviceDriver structure, and to add GD and
815 null device drivers. Font drivers get also device dependent.
817 * m17n.c (m17n_init): Increament shell_initialized.
818 (m17n_fini): Decremented shell_initialized.
820 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
822 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
823 (Mwidget, Mcolormap, Mx): Extern them.
825 * m17n-gui.c: Include <dlfcn.h> and "config.h".
826 (free_frame): Call frame->driver->close instead of
828 (DLOPEN_SHLIB_EXT): New macro.
829 (MDeviceLibraryInterface): New type.
830 (device_library_list): New variable.
831 (register_device_library): New function.
832 (null_device): New variable.
833 (null_device_close, null_device_get_prop)
834 (null_device_realize_face, null_device_free_realized_face): New
836 (null_driver): New variable.
837 (null_device_init, null_device_fini, null_device_open): New
839 (null_interface): New variable.
840 (Mfreetype, Mdevice): Declare them.
841 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
842 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
843 Mwin__Close_Device. Register drivers for Mx and Mgd.
844 (m17n_fini_win): Decremented win_initialized. Call "fini"
845 function of all opened devices. Don't call mwin__fini.
846 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
848 (mframe): Handle Mdevice key of PLIST.
849 (mframe_get_prop): Call frame->device->get_prop instead of
850 mwin__device_get_prop.
852 * m17n-gd.c: New file.
854 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
855 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
857 * m17n-core.c (m17n_init_core): Increate core_initialized.
858 (m17n_fini_core): Decremented core_initialized.
860 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
861 (Mcolormap): Don't extern them here.
863 * m17n-X.c (FRAME_DEVICE): New macro.
864 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
865 (free_display_info): Use MPLIST_DO.
866 (free_device): Free rface->info.
867 (xft_close): Delete it.
868 (device_init): Renamed from mwin__init.
869 (device_fini): Renamed from mwin__fini.
870 (device_open): Renamed from mwin__open_device.
871 (x_driver): New variable.
872 (MXFontInfo): Delete member frame, add member display.
873 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
874 Don't declare them here.
876 * internal-gui.h (MDeviceType): New enum.
877 (MWDefice): Delete it.
878 (struct MFrame): Change type of device to void *. New members
879 device_type, driver, font_driver_list.
880 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
881 (MDeviceDriver): New type.
882 (Mx, Mgd, Mfreetype): Extern them.
883 (mwin__XXX): Delete all of them.
885 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
887 (win_destroy_ic): Likewise.
888 (adjust_window_and_draw): Likewise.
889 (win_callback): Likewise.
890 (Mxim): Declare it here.
891 (minput_event_to_key): Call M_CHECK_READABLE.
893 * fontset.c (mfont__lookup_fontset): Delete local variable
896 * font.h (struct MFontDriver): Delete member close, add members
897 parse_name and build_name.
898 (mfont__driver_list): Delete extern.
899 (mfont__close): Delete extern.
901 * font.c (mfont__init): Don't set mfont__driver_list.
902 (mfont__fini): Don't unref mfont__driver_list.
903 (mfont__select): Try font drivers in frame->font_driver_list. Set
904 driver member of a realized font.
905 (mfont__close): Delete it.
906 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
907 functions of the default frame.
909 * font-ft.c (close_ft): Check ft_info->ft_face and work
911 (add_font_info): Allocate ft_info by M17N_OBJECT.
912 (ft_close): Delete it.
913 (mfont__ft_driver): Don't set ft_close.
914 (ft_select): Increment ref-count of best_font.
915 (ft_open): Decremented ref-count of base. On error, call
916 FT_Done_Face and free ft_info.
917 (ft_find_metric): Always use XXX_MONO in load_flags.
918 (ft_render): Fix setting of width. Call
919 frame->driver->draw_points instead of mwin__draw_points.
920 (ft_to_prop): Don't set mfont__driver_list.
921 (mfont__ft_fini): Just unref ft_info.
923 * face.c (mface__init): Exchange foreground and background of
924 mface__default. Call mface_put_prop to set hline of
926 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
927 (mface__free_realized): Don't call mwin__free_realized_face.
929 * draw.c (Mdepth): Don't declare it here.
930 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
931 (render_glyphs, render_glyph_string): Likewise.
932 (mdraw__init): Don't set Mdepth.
933 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
935 (mdraw_text_per_char_extents): Return 0 on success and -1 on
937 (mdraw_text_items): Check FRAME is writable.
938 (mdraw_per_char_extents): Implement body.
940 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
942 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
943 (GUI_SOURCES): Delete it.
944 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
945 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
946 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
947 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
948 (linkgui_LDADD): Set to libm17n-gui.la
949 (linkgui_LDFLAGS): New target.
950 (SRC): Include ${libm17n_gui_la_SOURCES} and
951 ${libm17n_gd_la_SOURCES}.
953 2004-05-24 Kenichi Handa <handa@m17n.org>
955 * draw.c (draw_background): Don't draw background even if
956 rface->face.property[MFACE_BACKGROUND] is not Mnil.
958 2004-05-22 Kenichi Handa <handa@m17n.org>
960 * m17n-X.c (xft_open_font): Fix anti_alias setting.
962 2004-05-20 Kenichi Handa <handa@m17n.org>
964 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
966 * m17n-gui.c: Include "plist.h".
967 (mframe): If PLIST is NULL, initialize it to emply plist.
969 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
970 (xft_driver): New variable.
971 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
972 (xft_find_metric, xft_render): New function.
973 (mwin__init): Adjusted for the new mfont__driver_list.
974 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
975 generated face to PARAM.
976 (mwin__realize_face): Fix setting of box colors. Don't call hook
978 (mwin__draw_hline): New function.
979 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
980 (mwin__xft_render): Delete these function.
982 * internal-gui.h (struct MFrame): New member tick.
983 (struct MGlyphString): New member tick.
984 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
985 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
986 (mwin__xft_render): Delete extern.
988 * fontset.c (mfont__lookup_fontset): Make the code simpler.
989 (mfontset): Always increment the reference count of returned
992 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
993 (MFTInfo): Moved to font.h.
994 (ft_iso8859_1_font_list): Delete this variable.
995 (set_font_info): Don't set font->property[MFONT_TYPE].
996 (set_font_info): Don't udpate ft_iso8859_1_font_list.
997 (add_font_info): Change type to void.
998 (fc_list): Change anme from xft_list. Caller changed. Include
999 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1000 (mfont__ft_driver): Change name from ft_driver. Caller changed.
1001 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1002 (close_ft): Don't call mwin__xft_close. Unref
1003 ft_info->extra_info.
1004 (ft_open): Don't setup ft_info->fontname. Don't call
1006 (ft_find_metric): Don't call mwin__xft_get_metric.
1007 (ft_encode_char): Call rfont->driver->open instead of ft_open.
1008 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
1009 (mfont__ft_init): Adjusted for new mfont__driver_list.
1010 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1012 * font.c (mfont__driver_list): Make it MPlist.
1013 (mfont__init): Adjust initialization of mfont__driver_list.
1014 (mfont__fini): Free mfont__driver_list.
1015 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1016 (mfont__select): Adjusted for the new mfont__driver_list.
1018 * font.h (enum MFontProperty): Delete MFONT_TYPE.
1019 (mfont__drirver_list): Adjust prototype.
1020 (MFTInfo): Move to here from fron.c. Deleve member fontname.
1022 * face.h (struct MFace): Delete member realized_face_list, add
1024 (struct MRealizedFace): Delete member need_update
1025 andnofont_rface, add member non_ascii_list.
1026 (mface__update_frame_face): Extern it.
1028 * face.c (hline_prop_list, box_prop_list, noop_hook): New
1030 (get_hline_create, get_box_create): New functions.
1031 (find_realized_face): Cancel previous change. Arg RFONT deleted.
1033 (free_face): Cancep previous change. Free face->frame_list.
1034 (serialize_hline): Do nothing if hline->width is zero.
1035 (serialize_box): Do nothing if box->width is zero.
1036 (mface__init): Setup all properties of mface__default.
1037 (mface__fini): Free hline_prop_list and box_prop_list.
1038 (mface__realize): Cancel previous change. Update
1039 face->frame_list. Setup rface->non_ascii_list.
1040 (mface__for_chars): Update rface->non_ascii_list.
1041 (mface__free_realized): Free rface->non_ascii_list.
1042 (mface__update_frame_face): New function.
1043 (mface): Initialize face->frame_list.
1044 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
1046 (mface_merge): Likewise.
1047 (mface_put_prop): If key is Mhline or Mbox, get value by
1048 get_hline_create or get_box_create respectively.
1049 (mface_put_prop): Update frame->tick and call
1050 mface__update_frame_face if necessary.
1051 (mface_update): Do nothing if func is noop_hook.
1053 * draw.c (render_glyphs): If a font is not found, use
1054 mwin__draw_empty_boxes.
1055 (alloc_gstring): Initialize gstring->tick.
1056 (get_gstring): Check gstring->tick.
1058 2004-05-17 Kenichi Handa <handa@m17n.org>
1060 * face.c (find_realized_face): Return value changed. If RFONT is
1061 NULL, avoid unnecessary checking.
1062 (free_face): Free face->realized_face_list.
1063 (mface__realize): Adjusted for the change of find_realized_face.
1064 If it returns a realized face that needs update, free it and
1065 realize a new one. Push a new realized face to
1066 frame->realized_face_list instead of appending.
1067 (mface__for_chars): Adjusted for the change of find_realized_face.
1068 Short cut if the required font is in rface->ascii_rface.
1069 (mface_put_prop): Free old value if necessary. Set need_update
1070 member of realized faces to 1.
1072 * face.h (struct MFace): Delete member tick, add member
1074 (struct MRealizedFace): Delete member tick, add member
1077 2004-05-13 Kenichi Handa <handa@m17n.org>
1079 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1081 2004-05-12 Kenichi Handa <handa@m17n.org>
1083 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1085 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1086 parse it XftNameParse.
1088 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1089 (all_fonts_scaned): New variable.
1090 (set_font_info): FAMILY may be Mnil.
1091 (add_font_info): Argument changed.
1092 (xft_list): Call add_font_info in it.
1093 (ft_list): Likewise.
1094 (ft_select): Make it work in the case family is Mnil.
1095 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1096 (mfont__ft_fini): Set all_fonts_scaned to 0.
1098 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1099 that is failed to open.
1101 2004-05-10 Kenichi Handa <handa@m17n.org>
1103 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1104 device's depth is 1 (i.e. monochrome).
1106 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1107 to work around the problem of libtool.
1109 * font-ft.c: Include <freetype/ftbdf.h>.
1110 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1112 (mfont__ft_init): Initialize them.
1113 (ft_iso8859_1_font_list): New variable.
1114 (set_font_info): Detect a font containing iso8859-1 glyphs and
1115 register it in ft_iso8859_1_font_list. If the font is not
1116 scalable, assume it as BDF or PCF font and setup SIZE and RESY
1117 properties of the font from its properties.
1118 (add_font_list): If the font is not scalable, check if it is BDF
1119 or PCF font. If not, ignore it.
1120 (ft_select): If FAMILY is Mnil, return NULL only if the requested
1121 registry is not iso8859-1.
1122 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1123 ft_iso8859_1_font_list.
1124 (ft_find_metric): If the font is not scalable, assume it as BDF
1125 or PCF, and get a metric from its properties.
1126 (mfont__ft_fini): Free ft_iso8859_1_font_list.
1128 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
1130 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1131 (libm17n_la_LDFLAGS): Delete it.
1132 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1133 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1135 2004-05-06 Kenichi Handa <handa@m17n.org>
1137 * draw.c (compose_glyph_string): Fix previous change.
1139 2004-04-30 Kenichi Handa <handa@m17n.org>
1141 * font-ft.c (ft_list): Delete unused variable `result'.
1142 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1144 2004-04-27 Kenichi Handa <handa@m17n.org>
1146 * m17n-X.c: Include config.h
1147 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1148 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1149 (MWDevice) [HAVE_XFT2]: New member xft_draw.
1150 (FRAME_CMAP, FRAME_VISUAL): New macros.
1151 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1152 (xfont_driver): Make it static.
1153 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1154 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1155 info->xft_color_back.
1156 (MXftFontInfo) [HAVE_XFT2]: New type.
1157 (mwin__xft_close) [HAVE_XFT2]: New function.
1158 (mwin__xft_open) [HAVE_XFT2]: New function.
1159 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1160 (mwin__xft_render) [HAVE_XFT2]: New function.
1162 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1163 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1164 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1167 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1169 * font-ft.c: Don't include FT_FREETYPE_H here.
1170 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1171 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1172 (MFTInfo): New member charmap_index.
1173 (MFTInfo) [HAVE_XFT2]: New member xft_info.
1174 (check_otf_filename): Renamed from check_filename. Return value
1176 (ft_set_property): This function deleted.
1177 (set_font_info): New function.
1178 (add_font_list): Argument changed. Add multiple fonts.
1179 (xft_list) [HAVE_XFT2]: New function.
1180 (ft_list) [not HAVE_XFT2]: New function.
1181 (ft_select): Add code for Xft.
1182 (close_ft): Likewise.
1183 (ft_open): Likewise.
1184 (ft_find_metric): Likewise.
1185 (ft_encode_char): Likewise.
1186 (ft_render): Likewise.
1188 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1190 2004-04-26 Kenichi Handa <handa@m17n.org>
1192 * textprop.c (mtext_attach_property): Declare the return type as
1195 2004-04-21 Kenichi Handa <handa@m17n.org>
1197 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1199 2004-04-09 Kenichi Handa <handa@m17n.org>
1201 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1203 (load_command): Setup above members.
1205 2004-04-05 Kenichi Handa <handa@m17n.org>
1207 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1209 2004-03-30 Kenichi Handa <handa@m17n.org>
1211 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1214 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1215 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1217 2004-03-29 Kenichi Handa <handa@m17n.org>
1219 * Version 1.0 Patch Level 2 released.
1221 2004-03-29 Kenichi Handa <handa@m17n.org>
1223 * charset.c (make_charset): Set charset->fully_loaded and
1224 charset->simple correctly. Don't try to get charset->min_char and
1225 charset->max_char for a charset of method subset and superset.
1226 Don't load a mapping file here.
1227 (mcharset__init): Set unified_max.
1228 (mcharset__load_from_database): Free a working plist.
1230 * coding.c (mcoding__fini): Free all malloced data.
1232 * input-gui.c (win_create_ic): Set control.as_image for preediting
1235 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1236 `count') to initialize the array.
1238 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1241 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1243 (mwin__create_window): Fix bug of setting a background pixel of a
1245 (mwin__adjust_window): Clear the window before drawing.
1247 * m17n-core.c (mdebug__report_object): Free array->objectes if
1249 (m17n_init_core): Don't set report_header_printed to 0 here.
1250 Fix debugging information.
1251 (m17n_fini_core): Set report_header_printed to 0 here.
1253 * m17n-core.h (mplist_deserialize): Extern it.
1255 * m17n-gui.c (m17n_fini_win): Fix debugging information.
1257 * m17n.c (m17n_fini): Fix debugging information.
1259 * mtext.c (mtext__adjust_foramt): New function.
1261 * mtext.h (mtext__adjust_foramt): Extern it.
1263 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1265 * plist.h (mplist__deserialize): Don't extern it.
1267 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
1268 elements of symbol_table to NULL. Report about created and freed
1269 symbols if MDEBUG_FINI is set.
1271 2004-03-22 Kenichi Handa <handa@m17n.org>
1273 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1275 * m17n.c (m17n_init): Fix the way of checking merror_code.
1277 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1279 2004-03-22 Kenichi Handa <handa@m17n.org>
1281 * fontset.c (realize_font_group): Adjust the font size by
1282 mfont__resize before selecting a font.
1284 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1286 2004-03-19 Kenichi Handa <handa@m17n.org>
1288 * Version 1.0 Patch Level 1 released.
1290 2004-03-19 Kenichi Handa <handa@m17n.org>
1292 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1294 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1296 2004-03-19 Kenichi Handa <handa@m17n.org>
1298 Re-apply the changes forgotten in the released version.
1300 * charset.c (mcharset__load_from_database): Call
1301 mchar_define_charset.
1303 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1304 (mconv_encode_range): Put Mcoding text property.
1306 2004-03-18 Kenichi Handa <handa@m17n.org>
1308 * draw.c (Mdepth): New variable.
1309 (visual_order): Delete unused local var `pos'.
1310 (compose_glyph_string): Fix for the case that gstring->glyphs is
1311 realloced. Stop generating glyphs at TO. Fix handling of
1313 (layout_glyphs): Get metrics of all glyphs in advance. Set
1314 lbearing and rbearing of base of composition glyph correctly.
1315 Handle left-overhang glyphs correctly.
1316 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
1318 (dump_combining_code): Change the defualt off_x character to ".".
1319 (mdraw__init): Initialize Mdepth.
1321 * face.c (work_gstring): New variable
1322 (mface__init): Initialize work_gstring.
1323 (mface__fini): Free work_gstring.glyphs.
1324 (mface__realize): Don't handle videomode property here. Adjusted
1325 for the change of mfont__get_metric.
1326 (mface__for_chars): Adjusted for the change of mfont__get_metric.
1328 * face.h (enum face_gc): Moved to m17n-X.c.
1330 * font.h (struct MFontDriver): Arguments of find_metric changed.
1331 (mfont__select): Prototype adjusted.
1332 (mfont__get_metric): Likewise.
1333 (mfont__ft_drive_otf): Likewise.
1334 (mfont__flt_run): Likewise.
1336 * font.c (mfont__select): New argument layouter. If layouter is
1337 different in the registered font, make a new copy of realized
1339 (mfont__get_metric): Argument changed. Get metrics of multiple
1341 (mfont_find): Call mfont__select with layouter as Mnil.
1343 * font-flt.c (FontLayoutContext): New member rfont.
1344 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1345 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
1347 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
1349 (NUM_POINTS): New macro.
1350 (MPointTable): New type.
1351 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1352 (mfont__ft_drive_otf): New argument rfont.
1354 * fontset.c (realize_font_group): Adjusted for the changed of
1356 (check_fontset_element): This function deleted.
1358 * input-gui.c (adjust_window_and_draw): Locate a preedit window
1359 off the parent window if the preedit text is zero length.
1361 * internal-gui.h (struct MFrame): New members foreground,
1362 background, videomode, font.
1363 (struct MGlyphString): New member anti_alias.
1364 (MDrawPoint): New type.
1365 (mwin__draw_bitmap): Prototype deleted.
1366 (mwin__draw_points): Prototype added.
1368 * m17n-gui.h (MDrawControl): New member anti_alias.
1370 * m17n-gui.c (free_frame): Free frame->font.
1371 (mframe): Set the fontset of frame->face to the default fontset.
1373 * m17n-X.c (RGB_GC): New type.
1374 (enum gc_index): Renamed from enum face_gc. Member names changed.
1376 (struct MWDevice): Members foreground and background deleted. New
1377 member scratch_gc, gc_list.
1378 (DEFAULT_FONT, FALLBACK_FONT): New macros.
1379 (free_device): Free GCs in device->gc_list.
1380 (get_rgb_gc): New function.
1381 (get_gc): Renamed and argument changed from get_color.
1382 (get_gc_for_anti_alias): New function.
1383 (xfont_find_metric): Arguments changed. Get metrics of multiple
1385 (set_region): Argument changed. Caller changed.
1386 (xfont_render): Allways set a font in gc.
1387 (x_error_handler, x_io_error_handler): Define only if
1388 X_SET_ERROR_HANDLER is defined.
1389 (mwin__open_device): Create device->scratch_gc. Set members
1390 foreground, background, and videomode of frame. Call
1391 XSetErrorHandler and XSetIOErrorHandler only if
1392 X_SET_ERROR_HANDLER is defined.
1393 (struct gc_list): Deleted.
1394 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1395 (mwin__realize_face): Adjusted for the change of the format of
1396 rface->info and the charge of set_region.
1397 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1398 (mwin__draw_box): Likewise.
1399 (mwin__draw_bitmap): This function deleted.
1400 (mwin__draw_points): New function.
1401 (mwin__verify_region): Adjusted for the change of the format of
1402 rface->info and the charge of set_region.
1403 (mwin__create_window): Inherit backgound pixel from parent.
1404 (mwin__dump_gc): Adjusted for the change of the format of
1407 2004-03-16 Kenichi Handa <handa@m17n.org>
1409 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1411 * input.c (M_key_alias): New variable.
1412 (handle_key): Try M_key_alias property of a key too.
1413 (minput__init): Initialize M_key_alias. Give that property to
1414 symbols in one_char_symbol. Fix bug of initializing
1417 * draw.c (compose_glyph_string): Don't handle
1418 ignore_formatting_char here. Include formatting characters in the
1419 range processed by a FTL.
1420 (layout_glyph_string): Handle ignore_formatting_char here.
1422 2004-03-12 Kenichi Handa <handa@m17n.org>
1424 * input-gui.c (win_create_ic): Enable bidi in status control.
1426 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1428 2004-03-09 Kenichi Handa <handa@m17n.org>
1430 * input.c (load_input_method): If title is not specified, use the
1431 input method name as title.
1433 * m17n-X.c (get_color): Make it static.
1434 (xim_create_ic, xim_destroy_ic, x_error_handler)
1435 (x_io_error_handler): Likewise.
1437 2004-03-01 Kenichi Handa <handa@m17n.org>
1439 * Version 1.0 released.
1442 Copyright (C) 2003, 2004
1443 National Institute of Advanced Industrial Science and Technology (AIST)
1444 Registration Number H15PRO112
1446 This file is part of the m17n library.
1448 The m17n library is free software; you can redistribute it and/or
1449 modify it under the terms of the GNU Lesser General Public License
1450 as published by the Free Software Foundation; either version 2.1 of
1451 the License, or (at your option) any later version.
1453 The m17n library is distributed in the hope that it will be useful,
1454 but WITHOUT ANY WARRANTY; without even the implied warranty of
1455 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1456 Lesser General Public License for more details.
1458 You should have received a copy of the GNU Lesser General Public
1459 License along with the m17n library; if not, write to the Free
1460 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA