1 2004-10-22 Kenichi Handa <handa@m17n.org>
3 * input.c (update_candidate): Renamed from udpate_candidate.
4 (take_action_list): Show more debugging info on arithmetic commands.
6 * m17n-X.c (device_open): Fix previous change.
8 * draw.c (compose_glyph_string): Don't get face property at the
11 2004-10-21 Kenichi Handa <handa@m17n.org>
13 * draw.c (compose_glyph_string): Fix for the case of category
16 2004-10-19 Kenichi Handa <handa@m17n.org>
18 * input.c (mdebug_mask): New variable.
19 (shift_state): Print debug information.
20 (take_action_list): Likewise.
21 (handle_key): Likewise.
23 2004-10-14 Kenichi Handa <handa@m17n.org>
25 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
27 2004-10-13 Kenichi Handa <handa@m17n.org>
29 * m17n-X.c (device_open): Be sure to register at least one font
32 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
33 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
35 2004-10-12 Kenichi Handa <handa@m17n.org>
37 * draw.c (alloc_gstring): Fix previous change.
39 * font-ft.c (ft_list_generic): Fix for the case of not
42 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
44 * font.c (mfont_list): If no font is found, return NULL.
45 (load_font_encoding_table): Put entries of nil registry first.
46 (find_encoding): Adjust for the above change.
48 2004-10-11 Kenichi Handa <handa@m17n.org>
50 * m17n-gui.h (mfont_list): Adjust prototype.
52 * m17n-X.c (xfont_list): New arg maxnum.
54 * font.h (struct MFontDriver): Change prototype of <list>.
56 * font-ft.c (fc_generic_family_list): Delete it.
57 (Mserif, Msans_serif, Mmonospace): Delete them.
58 (M_generic_family_info): New variable.
59 (enum GenericFamilyType): New enum.
60 (struct GenericFamilyInfo): New struct.
61 (generic_family_table): New variable.
62 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
64 (add_font_info): Get style here.
65 (ft_list_family): Don't initialize fc_config here. Don't list
67 (ft_list_generic): New function.
68 (ft_select): Pay attention to generic familes here.
69 (ft_open): Fix calculation of ascent and descent.
70 (ft_list): Pay attention to generic families.
71 (mfont__ft_init): Initialize M_generic_family_info,
72 generic_family_table, and fc_config..
73 (mfont__ft_fini): Finalize generic_family_table.
75 * draw.c (compose_glyph_string): Use more constant font for
76 glyphs. Adjust for the member change in MGlyph.
77 (layout_glyph_string): Adjust for the member change in MGlyph.
78 (alloc_gstring): Intilize scracth_glyph to avoid
79 compose_glyph_string on it.
80 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
81 (mdraw_coordinates_position): Fix previous change.
83 * internal-gui.h (glyph_category): New enum.
84 (MGlyph): Change type of <category> to enum glyph_category.
86 * face.c (mface__realize): Delete args langauge and charset.
87 (mface__for_chars): Fix for the case that glyphs have different
89 (mface__update_frame_face): Adjust for mface__realize change.
91 * face.h (mface__realize): Adjust prototype.
93 2004-10-05 Kenichi Handa <handa@m17n.org>
95 * language.c (mlang__init): Add Akan.
97 2004-10-04 Kenichi Handa <handa@m17n.org>
99 * font-ft.c (add_font_info): Add instead of push the element.
100 (ft_list_family): For generic fonts, try all
101 substituted. families.
103 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
104 (run_rule): Don't update cluster range here.
105 (run_command): Update cluster range on appending a glyph.
106 (run_otf): Update cluster range for glyphs generated by OTF.
108 2004-10-02 Kenichi Handa <handa@m17n.org>
110 * m17n-X.c (device_open): Handle Mfont key in PLIST.
112 2004-09-30 Kenichi Handa <handa@m17n.org>
114 * font-ft.c (ft_select): Ignore family on calling mfont__score.
116 2004-09-30 Kenichi Handa <handa@m17n.org>
118 * font.h: Include <fontconfig/fontconfig.h>.
119 (MFTInfo): New member langset.
120 (mfont__encoding_list): Extern it.
122 * font.c (mfont__encoding_list): New function.
123 (mdebug_dump_font_list): New function.
125 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
126 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
128 (ft_family_list): New variable.
129 (set_font_info): New arg basep. Callers changed.
130 (fc_list): Check the return value of FcPatternGetString.
131 (add_font_info): New arg plist. Callers changed. Update
133 (ft_list_family): New function (merged fc_list and ft_list_all).
134 (ft_select): Use ft_list_family.
135 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
137 (mfont__ft_init): Initialize above new variables.
138 (mfont__ft_fini): Free ft_family_list.
139 (STRDUP_LOWER): New macro.
140 (set_font_info): Use STRDUP_LOWER.
141 (ft_list_family): Avoid duplicate addition of font path. Use
143 (fc_decode_prop): Fix typo.
145 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
146 (xfont_registry_list): Change argument disp_info to frame.
148 (xfont_list_all): New function.
149 (xfont_list): If FONT is not NULL, check all fonts.
151 2004-09-28 Kenichi Handa <handa@m17n.org>
153 * m17n-X.c (MXFont, MXFontList): New types.
154 (MDisplayInfo): Delete members font_registry_list,
155 iso8859_1_family_list, iso10646_1_family_list, new members
156 font_list, base_font_list.
157 (free_display_info): Adusted for the change of MDisplayInfo.
158 (xfont_driver): Initialize with xfont_list.
159 (font_compare): New function.
160 (build_font_list): Deleted.
161 (xfont_registry_list): New function.
162 (xfont_select): Use xfont_registry_list.
163 (xfont_list): New function.
164 (device_open): Adusted for the change of MDisplayInfo.
166 * font-ft.c (add_font_info): New arg languages. Callers changed.
167 (fc_list): Get languages from fonts..
168 (ft_list_all): Renamed from ft_list. Callers changed.
169 (ft_list): New function.
170 (mfont__ft_driver): Initalize with ft_list.
172 * font.c (mfont_list): New function.
174 * font.h (struct MFontDriver): New member `list'.
175 (MFTInfo): New member languages.
177 * m17n-gui.h (mfont_list): Extern it.
179 2004-09-27 Kenichi Handa <handa@m17n.org>
181 * internal-gui.h (struct MGlyphString): Delete members mt,
182 sub_width, sub_lbrearing, sub_rbearing, and region.
184 * draw.c (MSubTextExtents): New type.
185 (layout_glyphs): New arg extents. Set its members.
186 (layout_glyph_string): Adjusted for the above change.
187 (alloc_gstring): Don't set gstring->mt.
188 (truncate_gstring): Call line_break function with mt instead of
191 2004-09-22 Kenichi Handa <handa@m17n.org>
193 * mtext.c (count_utf_16_chars): Count each code of invalid
196 2004-09-19 Kenichi Handa <handa@m17n.org>
198 * mtext.c (default_utf_16, default_utf_32): Rename them to
199 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
202 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
205 2004-09-13 Kenichi Handa <handa@m17n.org>
207 * draw.c (Mlatin): Don't declare it here.
208 (visual_order): Fix reordering of combining characters.
209 (compose_glyph_string): Fix detection of script.
210 (layout_glyphs): Don't fix reordering of combining characters
212 (layout_glyph_string): Pay attention to
213 control->disable_overlapping_adjustment.
214 (truncate_gstring): Include at least on character in a line.
215 (get_gstring): Always scan one full line.
216 (mdraw__init): Don't initialize Mlatin here.
217 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
218 have a font, use ascent/descent of an ASCII font. Allow
219 ink_array_return and logical_array_return to be NULL.
220 (mdraw_coordinates_position): Fix iteration.
222 * font-ft.c (MFTtoProp): Member completely changed.
223 (ft_to_prop): Adjusted for the above change.
224 (ft_to_prop_size): Likewise.
225 (set_font_info): Adjusted for the change of MFTtoProp.
226 (fc_generic_family_list): New variable.
227 (fc_list): Add special handling of generic font names.
228 (mfont__ft_init): Adjusted for the change of MFTtoProp.
229 Initialize fc_generic_family_list.
230 (mfont__ft_fini): Don't free ft_to_prop. Free
231 fc_generic_family_list.
232 (FC_vs_M17N_font_prop): New type.
233 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
234 (fc_decode_prop, fc_encode_prop): New functions.
235 (mfont__ft_parse_name): Use fc_decode_prop.
236 (mfont__ft_unparse_name): Use fc_encode_prop.
238 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
239 (MWDevice): Add member realized_font_list.
240 (free_display_info): Don't free disp_info->realized_font_list.
241 (free_device): Free device->realized_fontset_list.
242 (xft_find_metric): Use gstring->frame instead of rfont->frame.
243 (device_open): Don't initialize disp_info->realized_font_list.
244 (device_open): Initialize device->realized_font_list and set it to
245 frame->realized_font_list.
247 * fontset.c (try_font_group): New function.
248 (mfont__lookup_fontset): Use try_font_group.
250 * font.c (common_weight): Change the order of "regular".
252 * face.c (Mlatin): Don't make it static.
253 (mface__realize): Be sure to set work_gstring.frame.
254 (mface__for_chars): Likewise.
256 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
259 * internal-gui.h (Mlatin): Extern it.
261 * m17n-gui.h (MDrawControl): New member
262 disable_overlapping_adjustment.
264 2004-09-06 Kenichi Handa <handa@m17n.org>
266 * font-flt.c (run_otf): Fix typo ('}'->']').
268 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
269 (COMBINING_PRECOMPUTED_P): New macros.
271 * draw.c (layout_glyphs): Handle precomputed combining code.
273 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
274 precomupted combining code.
276 2004-09-03 Kenichi Handa <handa@m17n.org>
278 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
281 2004-08-27 Kenichi Handa <handa@m17n.org>
283 * face.c (mface_put_prop): If the new value is the same as the
284 current one, don't increment frame->tick.
286 2004-08-25 Kenichi Handa <handa@m17n.org>
288 * fontset.c (mfontset): Initialize font_spec_list member.
289 (mfontset_copy): Load fontset if necessary.
291 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
292 'metrics' to for C++.
294 * draw.c (mdraw_glyph_info): Adjusted for the member name change
297 2004-08-16 Kenichi Handa <handa@m17n.org>
299 * Version 1.1.0 released.
301 2004-08-13 Kenichi Handa <handa@m17n.org>
303 * language.c (mlang__init): Add Dhivehi.
305 * m17n-gui.c (Mx, Mfreetype): Delete it.
306 (m17n_init_win): Don't initialize Mx and Mfreetype here.
308 * m17n-gui.h (Mfreetype, Mxft): Extern them.
309 (mfont_resize_ratio): Extern it.
310 (MDrawGlyphInfo): New member logical_width;
311 (MDrawGlyph): New type.
312 (mdraw_glyph_list): Prototype adjusted.
314 * m17n-X.c (xfont_open): Set type and fontp members.
315 (xft_open): Likewise.
317 * internal-gui.h (Mx, Mfreetype): Delete extern.
319 * font.h (struct MRealizedFont): New member type and fontp.
321 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
322 (Mx, Mfreetype): Declare here.
323 (Mxft): New variable.
324 (mfont_resize_ratio): New function.
326 * font-ft.c (ft_open): Set type and fontp members.
328 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
331 2004-08-11 Kenichi Handa <handa@m17n.org>
333 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
336 2004-08-06 Kenichi Handa <handa@m17n.org>
338 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
341 * font-flt.c (run_otf): Print debugging information if necessary.
343 2004-08-05 Kenichi Handa <handa@m17n.org>
345 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
346 positioning_type 5 and 6. Switch simplified.
348 2004-08-04 Kenichi Handa <handa@m17n.org>
350 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
352 2004-08-02 Kenichi Handa <handa@m17n.org>
354 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
355 set val to 1 even if it is greater than 1.
357 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
359 2004-07-29 Kenichi Handa <handa@m17n.org>
361 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
362 debugging information.
364 * internal.h (MDEBUG_PRINT5): New macro.
366 * draw.c (layout_glyphs): Don't combine a zero width glyph with
367 the previous one if the zero width glyph has left or right
370 2004-07-26 Kenichi Handa <handa@m17n.org>
372 * m17n-X.c (xft_render): Pay attention to members left_padding and
373 right_padding of MGlyph.
375 * draw.c (visual_order): Allocate one more elements for arrays as
376 a workaround of fribidi bug.
377 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
378 instead of MGlyph->bidi_sensitive.
379 (layout_glyph_string): Pay attentinon to
380 control->orientation_reversed when padding at the head or tail.
381 Fix adjustment of space glyph width.
382 (get_gstring): If cursor_width or cursor_bidi is changed, don't
385 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
386 instead of MGlyph->bidi_sensitive.
388 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
390 2004-07-26 Kenichi Handa <handa@m17n.org>
392 * draw.c (visual_order): Don't treat combined glyphs specially.
393 (layout_glyphs): Don't get metrics glyphs that are already ready.
394 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
395 width with the previous one.
396 (draw_background): Fix bar cursor position on a r2l glyph.
398 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
399 (run_rule): Fix place of updating cluster_begin_pos and
400 cluster_end_pos here.
401 (run_otf): Don't set left_padding.
403 * font-ft.c (adjust_anchor): Type of argument `code' changed.
405 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
406 Fix handling of GPOS.
407 (mfont__ft_drive_gpos): Delete this function.
409 * font.h (mfont__ft_drive_otf): Renamed back from
410 mfont__ft_drive_gsub.
411 (mfont__ft_drive_gpos): Delete extern.
413 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
414 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
416 2004-07-23 Kenichi Handa <handa@m17n.org>
418 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
421 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
423 2004-07-22 Kenichi Handa <handa@m17n.org>
425 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
427 2004-07-20 Kenichi Handa <handa@m17n.org>
429 * draw.c (render_glyphs): Fix checking of g->code validity.
431 * face.c (mface__realize): Set g.type.
433 2004-07-18 Kenichi Handa <handa@m17n.org>
435 * Makefile.am: Prepend ${top_srcdir} to all *.la in
438 * m17n-gui.c (mframe): Print error message give by dlopen to
441 2004-07-16 Kenichi Handa <handa@m17n.org>
443 * draw.c (compose_glyph_string): Improve the way of deciding a
444 script. For a character that doesn't have script property, use
445 the last non-latin script.
447 * font-ft.c (fc_list): Cancel previous change.
448 (mfont__ft_init): Add more entries in ft_to_prop_name.
450 2004-07-15 Kenichi Handa <handa@m17n.org>
452 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
453 previous or next character glyphs.
455 2004-07-14 Kenichi Handa <handa@m17n.org>
457 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
460 * fontset.c (mfont__lookup_fontset): If glyph type is
461 GLYPH_SPACE, get codes for SPACE.
463 * internal-gui.h (Mfont): Delete extern.
465 * m17n-gui.h (Mfont): Delete duplicated extern.
467 2004-07-13 Kenichi Handa <handa@m17n.org>
469 * font-ft.c (DEVICE_DELTA): New macro.
470 (adjust_anchor): New function.
471 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
473 (mfont__ft_drive_gpos): New function.
475 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
476 (FontLayoutContext): Delete member `rfont'.
477 (run_otf): Set g->otf_cmd. Call
478 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
479 only whne HAVE_OTF is defined.
481 * fontset.c: Include "config.h".
483 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
484 (MGlyph): New member otf_cmd.
486 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
487 (mfont__ft_drive_gpos): Extern it.
489 * face.c: Include "config.h".
491 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
493 * input-gui.c: Include "config.h".
495 * plist.c: Include "config.h".
497 2004-07-06 Kenichi Handa <handa@m17n.org>
499 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
500 internal-gui.h: Cancel previous changes.
502 * m17n-gd.h: Delete it.
504 * Makefile.am (libm17n_core_la_LIBADD): New variable.
505 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
506 @XML2_LD_FLAGS@ to above.
507 (libm17n_la_LIBADD): Add -ldl.
508 (libm17n_la_LDFLAGS): Add -export-dynamic.
509 (X_LD_FLAGS): Fix the order of linking.
510 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
511 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
512 (libm17n_X_la_LDFLAGS): Add -module.
513 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
514 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
515 (libm17n_gd_la_LDFLAGS): Add -module.
516 (include_HEADERS): Delete m17n-gd.h.
518 2004-06-30 Kenichi Handa <handa@m17n.org>
520 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
521 (MDeviceLibraryInterface): Delete it.
522 (register_device_library): Delete it.
523 (m17n__device_library_list): Renamed from device_library_list.
525 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
526 (m17n_init_win): Adjust prototype.
528 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
529 (m17n_init_gd): New function.
531 * m17n-gd.h: New file.
533 * m17n-X.h: Include <m17n-gui.h>.
534 (m17n_init_X): Extern it.
535 (M17N_INIT): Redefine it.
537 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
538 (m17n_init_X): New function.
540 * internal-gui.h (m17n__device_library_list): Extern it.
541 (struct MDeviceDriver): New members initialized, init, and fini.
543 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
545 (libm17n_X_la_LIBADD): Delete aboves.
546 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
547 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
548 (libm17n_gd_la_LDFLAGS): Delete it.
549 (include_HEADERS): Add m17n-gd.h.
551 2004-06-25 Kenichi Handa <handa@m17n.org>
553 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
554 (libm17n_gd_la_LDFLAGS): Cancel previous change.
556 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
558 * font-ft.c (fc_list): If FcFontList finds no font, try
561 * draw.c (compose_glyph_string): Terminate the last loop after
562 doing default combining if necessary.
564 2004-06-24 Kenichi Handa <handa@m17n.org>
566 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
568 * character.c (mchar_define_property): Add const to an arg.
570 * charset.c (mchar_define_charset): Add const to an arg.
572 * coding.c (MCodingSystem): Add const to an arg or decoder.
573 (finish_decoding): Add const to an arg.
574 (decode_coding_charset, decode_coding_utf_8)
575 (decode_coding_utf_16, decode_coding_utf_32)
576 (decode_coding_iso_2022, decode_coding_sjis)
577 (mconv_define_coding): Likewise.
579 * m17n-X.c (xft_find_metric): Delete unused variable.
581 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
584 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
587 * mtext.c (count_utf_8_chars, count_utf_16_chars)
588 (mtext__from_data, mtext_from_data): Add `const' to an arg.
590 * mtext.h (mtext__from_data): Ajust prototype.
592 2004-06-23 Kenichi Handa <handa@m17n.org>
594 * draw.c (compose_glyph_string): Always get glyph codes by
596 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
597 (mdraw_glyph_list): New function.
599 * font-flt.c (mfont__flt_run): Be sure to call
600 rfont->driver->encode_char.
602 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
603 (ft_encode_char): Delete arg C.
604 (ft_render): Don't call FT_Get_Char_Index.
606 * font.c (mfont__encodable_p): Delete it.
607 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
609 * font.h (struct MFontDriver): Delete arg C of encode_char.
610 (mfont__encodable_p): Delete extern.
612 * m17n-X.c (xfont_encode_char): Delete arg C.
613 (xft_find_metric): Don't cal FT_Get_Char_Index.
614 (xft_render): Likewise.
616 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
618 (mdraw_glyph_list): Extern it.
620 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
622 2004-06-22 Kenichi Handa <handa@m17n.org>
624 * m17n-gui.h (mfontset_lookup): Extern it.
626 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
628 * fontset.c (realize_fontset_elements)
629 (free_realized_fontset_elements, update_fontset_elements): New
631 (mfont__realize_fontset): Call realize_fontset_elements.
632 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
633 (mfont__lookup_fontset): If a fontset was modified, update
634 the realized fontset.
635 (mfontset_modify_entry): Increment fontset->tick.
636 (mfontset_lookup): New function.
638 2004-06-21 Kenichi Handa <handa@m17n.org>
640 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
642 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
643 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
644 length of source text 0.
646 2004-06-21 Kenichi Handa <handa@m17n.org>
648 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
649 (compare): Pay attention to format other than utf-8.
650 (copy): Delete this function.
651 (count_by_utf_8, count_by_utf_16, insert): New functions.
652 (count_utf_16_chars): Fix handling of a surrogate pair.
653 (find_char_forward, find_char_backward): Likewise.
654 (mtext__from_data): Delete unnecessary check. Fix number of
656 (mtext_from_data): Don't count items.
657 (mtext_ref_char): Optimize the code.
658 (mtext_set_char): Pay attention to format other than utf-8.
659 (mtext_cat_char): Likewise.
660 (mtext_dup): Don't call copy, instead do allocation here.
661 (mtext_cat): Call insert instead of copy.
662 (mtext_ncat): Likewise.
663 (mtext_cpy): Delete character at first and call insert instead of
665 (mtext_ncpy): Likewise.
666 (mtext_copy): Likewise.
667 (mtext_duplicate): Call insert instead of copy.
668 (mtext_del): Pay attention to format other than utf-8.
669 (mtext_ins): Simply call insert.
670 (mtext_ins_char): Pay attention to format other than utf-8.
671 (mtext_tok): Call insert instead of copy.
672 (mtext_text): Call UNIT_BYTES.
674 * textprop.c (mtext__adjust_plist_for_change): New function.
676 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
677 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
678 (CHAR_UNITS_AT): Fix typo.
679 (CHAR_UNITS_BY_HEAD): Fix typo.
680 (STRING_CHAR_AND_UNITS): Fix typo.
682 * internal.h (MTEXT_READ_ONLY_P): New macro.
684 * mtext.h (mtext__replace): Delete the extern.
685 (mtext__adjust_foramt): Adjust prototype.
687 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
688 if possible. Otherwise make a copy of mmt.
690 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
693 2004-06-18 Kenichi Handa <handa@m17n.org>
695 * character.h (CHAR_STRING_UTF16): Fix syntax.
697 2004-06-16 Kenichi Handa <handa@m17n.org>
699 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
700 (libm17n_X_la_LIBADD): Delete it.
701 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
703 * m17n-X.c (device_open): Add parens in `if' condition.
705 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
706 (DEC_POSITION): Likewise.
707 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
709 2004-06-15 Kenichi Handa <handa@m17n.org>
711 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
714 * draw.c (compose_glyph_string): If langauge is specified, call
715 mface__for_chars even if a text is all latin. Fix condition for
716 setting non_ascii_found.
718 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
720 * m17n.h (minput_char_to_key): Delete extern.
722 * m17n-gui.h (minput_event_to_key): Cancel previous change.
724 * m17n-gui.c (null_device_open): Set several members of frame.
726 2004-06-14 Kenichi Handa <handa@m17n.org>
728 * m17n-gui.h (minput_event_to_key): Delete extern.
730 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
732 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
734 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
736 2004-06-08 Kenichi Handa <handa@m17n.org>
738 * character.c (mchar_put_prop): Don't increment the ref-count of
741 2004-06-04 Kenichi Handa <handa@m17n.org>
743 * m17n-core.c (mdebug__register_object): New function.
744 (mdebug__unregister_object): Likewise.
746 * internal.h (mdebug__register_object, mdebug__unregister_object):
748 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
751 * charset.c (mcharset__load_from_database): Don't call
752 mconv__register_charset_coding here.
754 * coding.c (find_coding): Get a real name from an element of
755 coding_definition_list.
756 (mconv__register_charset_coding): Set the real name at the top of
758 (mcoding__load_from_database): Likewise.
759 (mconv_list_codings): Adjusted for the above change.
761 2004-06-03 Kenichi Handa <handa@m17n.org>
763 * coding.c (find_coding): Find by canonicalized name. Don't have
764 to modify the element of coding_definition_list by
766 (mconv__define_coding_from_charset): Delete it.
767 (mconv__register_charset_coding): Canonicalize sym.
768 (mcoding__load_from_database): Register plist modified by
771 * coding.h (mconv__define_coding_from_charset): Don't extern it.
773 * font-ft.c (ft_open): Fix setting of rfont->descent.
775 2004-06-02 Kenichi Handa <handa@m17n.org>
777 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
778 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
779 (xlfd_unparse_name): Renamed from xfont_build_name.
780 (mfont__init): Initialized Mfontconfig.
781 (mfont__free_realized): Unconditionally unref rfont->info.
782 (mfont__select): Free `this' if it's not best.
783 (mfont__open): Don't check frame->realized_font_list.
784 (mfont__parse_name_into_font): New function.
785 (Mfontconfig): New variable.
786 (mfont_from_name): Call mfont_parse_name.
787 (mfont_name): Call mfont_unparse_name.
788 (mdebug_dump_font): Likewise.
790 * font.h (struct MFontDriver): Delete members parse_name and
792 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
793 (mfont__parse_name_into_font): Extern it.
795 * font-ft.c: Include "symbol.h".
796 (close_ft): Unconditionally free filename and charmap_list of
798 (ft_open): Duplicate base->filename. Increment ref-count of
799 ft_info->charmap_list. Free ft_info->charmap_list and
800 ft_info->filename on error.
801 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
803 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
805 (enum xlfd_field_idx): Moved to font.c.
806 (split_font_name, build_font_name): Likewise.
807 (build_font_list): Call mfont__parse_name_info_font.
808 (xfont_open): Call mfont__unparse_name. Free name.
809 (xfont_parse_name, xfont_build_name): Moved to font.c
810 (xft_select): Prototype deleted.
811 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
812 Call mfont_pase_name.
814 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
815 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
818 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
821 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
823 2004-06-01 Kenichi Handa <handa@m17n.org>
825 * fontset.c (mfontset_modify_entry): Pay attention to the case
826 that fontset->font_spec_list is NULL.
828 2004-05-31 Kenichi Handa <handa@m17n.org>
830 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
832 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
834 * font.c (mfont__select): Print score the a font for debugging.
836 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
838 * coding.c (reset_coding_sjis): Check kanji and kana instead of
839 kanji_sym and kana_sym.
841 2004-05-28 Kenichi Handa <handa@m17n.org>
843 * Makefile.am (VINFO): New variable.
844 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
845 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
847 2004-05-27 Kenichi Handa <handa@m17n.org>
849 The following chanages are to make device dependent functions
850 accessible only from MDeviceDriver structure, and to add GD and
851 null device drivers. Font drivers get also device dependent.
853 * m17n.c (m17n_init): Increament shell_initialized.
854 (m17n_fini): Decremented shell_initialized.
856 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
858 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
859 (Mwidget, Mcolormap, Mx): Extern them.
861 * m17n-gui.c: Include <dlfcn.h> and "config.h".
862 (free_frame): Call frame->driver->close instead of
864 (DLOPEN_SHLIB_EXT): New macro.
865 (MDeviceLibraryInterface): New type.
866 (device_library_list): New variable.
867 (register_device_library): New function.
868 (null_device): New variable.
869 (null_device_close, null_device_get_prop)
870 (null_device_realize_face, null_device_free_realized_face): New
872 (null_driver): New variable.
873 (null_device_init, null_device_fini, null_device_open): New
875 (null_interface): New variable.
876 (Mfreetype, Mdevice): Declare them.
877 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
878 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
879 Mwin__Close_Device. Register drivers for Mx and Mgd.
880 (m17n_fini_win): Decremented win_initialized. Call "fini"
881 function of all opened devices. Don't call mwin__fini.
882 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
884 (mframe): Handle Mdevice key of PLIST.
885 (mframe_get_prop): Call frame->device->get_prop instead of
886 mwin__device_get_prop.
888 * m17n-gd.c: New file.
890 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
891 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
893 * m17n-core.c (m17n_init_core): Increate core_initialized.
894 (m17n_fini_core): Decremented core_initialized.
896 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
897 (Mcolormap): Don't extern them here.
899 * m17n-X.c (FRAME_DEVICE): New macro.
900 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
901 (free_display_info): Use MPLIST_DO.
902 (free_device): Free rface->info.
903 (xft_close): Delete it.
904 (device_init): Renamed from mwin__init.
905 (device_fini): Renamed from mwin__fini.
906 (device_open): Renamed from mwin__open_device.
907 (x_driver): New variable.
908 (MXFontInfo): Delete member frame, add member display.
909 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
910 Don't declare them here.
912 * internal-gui.h (MDeviceType): New enum.
913 (MWDefice): Delete it.
914 (struct MFrame): Change type of device to void *. New members
915 device_type, driver, font_driver_list.
916 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
917 (MDeviceDriver): New type.
918 (Mx, Mgd, Mfreetype): Extern them.
919 (mwin__XXX): Delete all of them.
921 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
923 (win_destroy_ic): Likewise.
924 (adjust_window_and_draw): Likewise.
925 (win_callback): Likewise.
926 (Mxim): Declare it here.
927 (minput_event_to_key): Call M_CHECK_READABLE.
929 * fontset.c (mfont__lookup_fontset): Delete local variable
932 * font.h (struct MFontDriver): Delete member close, add members
933 parse_name and build_name.
934 (mfont__driver_list): Delete extern.
935 (mfont__close): Delete extern.
937 * font.c (mfont__init): Don't set mfont__driver_list.
938 (mfont__fini): Don't unref mfont__driver_list.
939 (mfont__select): Try font drivers in frame->font_driver_list. Set
940 driver member of a realized font.
941 (mfont__close): Delete it.
942 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
943 functions of the default frame.
945 * font-ft.c (close_ft): Check ft_info->ft_face and work
947 (add_font_info): Allocate ft_info by M17N_OBJECT.
948 (ft_close): Delete it.
949 (mfont__ft_driver): Don't set ft_close.
950 (ft_select): Increment ref-count of best_font.
951 (ft_open): Decremented ref-count of base. On error, call
952 FT_Done_Face and free ft_info.
953 (ft_find_metric): Always use XXX_MONO in load_flags.
954 (ft_render): Fix setting of width. Call
955 frame->driver->draw_points instead of mwin__draw_points.
956 (ft_to_prop): Don't set mfont__driver_list.
957 (mfont__ft_fini): Just unref ft_info.
959 * face.c (mface__init): Exchange foreground and background of
960 mface__default. Call mface_put_prop to set hline of
962 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
963 (mface__free_realized): Don't call mwin__free_realized_face.
965 * draw.c (Mdepth): Don't declare it here.
966 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
967 (render_glyphs, render_glyph_string): Likewise.
968 (mdraw__init): Don't set Mdepth.
969 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
971 (mdraw_text_per_char_extents): Return 0 on success and -1 on
973 (mdraw_text_items): Check FRAME is writable.
974 (mdraw_per_char_extents): Implement body.
976 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
978 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
979 (GUI_SOURCES): Delete it.
980 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
981 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
982 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
983 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
984 (linkgui_LDADD): Set to libm17n-gui.la
985 (linkgui_LDFLAGS): New target.
986 (SRC): Include ${libm17n_gui_la_SOURCES} and
987 ${libm17n_gd_la_SOURCES}.
989 2004-05-24 Kenichi Handa <handa@m17n.org>
991 * draw.c (draw_background): Don't draw background even if
992 rface->face.property[MFACE_BACKGROUND] is not Mnil.
994 2004-05-22 Kenichi Handa <handa@m17n.org>
996 * m17n-X.c (xft_open_font): Fix anti_alias setting.
998 2004-05-20 Kenichi Handa <handa@m17n.org>
1000 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
1002 * m17n-gui.c: Include "plist.h".
1003 (mframe): If PLIST is NULL, initialize it to emply plist.
1005 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
1006 (xft_driver): New variable.
1007 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
1008 (xft_find_metric, xft_render): New function.
1009 (mwin__init): Adjusted for the new mfont__driver_list.
1010 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
1011 generated face to PARAM.
1012 (mwin__realize_face): Fix setting of box colors. Don't call hook
1014 (mwin__draw_hline): New function.
1015 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
1016 (mwin__xft_render): Delete these function.
1018 * internal-gui.h (struct MFrame): New member tick.
1019 (struct MGlyphString): New member tick.
1020 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
1021 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
1022 (mwin__xft_render): Delete extern.
1024 * fontset.c (mfont__lookup_fontset): Make the code simpler.
1025 (mfontset): Always increment the reference count of returned
1028 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
1029 (MFTInfo): Moved to font.h.
1030 (ft_iso8859_1_font_list): Delete this variable.
1031 (set_font_info): Don't set font->property[MFONT_TYPE].
1032 (set_font_info): Don't udpate ft_iso8859_1_font_list.
1033 (add_font_info): Change type to void.
1034 (fc_list): Change anme from xft_list. Caller changed. Include
1035 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1036 (mfont__ft_driver): Change name from ft_driver. Caller changed.
1037 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1038 (close_ft): Don't call mwin__xft_close. Unref
1039 ft_info->extra_info.
1040 (ft_open): Don't setup ft_info->fontname. Don't call
1042 (ft_find_metric): Don't call mwin__xft_get_metric.
1043 (ft_encode_char): Call rfont->driver->open instead of ft_open.
1044 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
1045 (mfont__ft_init): Adjusted for new mfont__driver_list.
1046 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1048 * font.c (mfont__driver_list): Make it MPlist.
1049 (mfont__init): Adjust initialization of mfont__driver_list.
1050 (mfont__fini): Free mfont__driver_list.
1051 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1052 (mfont__select): Adjusted for the new mfont__driver_list.
1054 * font.h (enum MFontProperty): Delete MFONT_TYPE.
1055 (mfont__drirver_list): Adjust prototype.
1056 (MFTInfo): Move to here from fron.c. Deleve member fontname.
1058 * face.h (struct MFace): Delete member realized_face_list, add
1060 (struct MRealizedFace): Delete member need_update
1061 andnofont_rface, add member non_ascii_list.
1062 (mface__update_frame_face): Extern it.
1064 * face.c (hline_prop_list, box_prop_list, noop_hook): New
1066 (get_hline_create, get_box_create): New functions.
1067 (find_realized_face): Cancel previous change. Arg RFONT deleted.
1069 (free_face): Cancep previous change. Free face->frame_list.
1070 (serialize_hline): Do nothing if hline->width is zero.
1071 (serialize_box): Do nothing if box->width is zero.
1072 (mface__init): Setup all properties of mface__default.
1073 (mface__fini): Free hline_prop_list and box_prop_list.
1074 (mface__realize): Cancel previous change. Update
1075 face->frame_list. Setup rface->non_ascii_list.
1076 (mface__for_chars): Update rface->non_ascii_list.
1077 (mface__free_realized): Free rface->non_ascii_list.
1078 (mface__update_frame_face): New function.
1079 (mface): Initialize face->frame_list.
1080 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
1082 (mface_merge): Likewise.
1083 (mface_put_prop): If key is Mhline or Mbox, get value by
1084 get_hline_create or get_box_create respectively.
1085 (mface_put_prop): Update frame->tick and call
1086 mface__update_frame_face if necessary.
1087 (mface_update): Do nothing if func is noop_hook.
1089 * draw.c (render_glyphs): If a font is not found, use
1090 mwin__draw_empty_boxes.
1091 (alloc_gstring): Initialize gstring->tick.
1092 (get_gstring): Check gstring->tick.
1094 2004-05-17 Kenichi Handa <handa@m17n.org>
1096 * face.c (find_realized_face): Return value changed. If RFONT is
1097 NULL, avoid unnecessary checking.
1098 (free_face): Free face->realized_face_list.
1099 (mface__realize): Adjusted for the change of find_realized_face.
1100 If it returns a realized face that needs update, free it and
1101 realize a new one. Push a new realized face to
1102 frame->realized_face_list instead of appending.
1103 (mface__for_chars): Adjusted for the change of find_realized_face.
1104 Short cut if the required font is in rface->ascii_rface.
1105 (mface_put_prop): Free old value if necessary. Set need_update
1106 member of realized faces to 1.
1108 * face.h (struct MFace): Delete member tick, add member
1110 (struct MRealizedFace): Delete member tick, add member
1113 2004-05-13 Kenichi Handa <handa@m17n.org>
1115 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1117 2004-05-12 Kenichi Handa <handa@m17n.org>
1119 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1121 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1122 parse it XftNameParse.
1124 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1125 (all_fonts_scaned): New variable.
1126 (set_font_info): FAMILY may be Mnil.
1127 (add_font_info): Argument changed.
1128 (xft_list): Call add_font_info in it.
1129 (ft_list): Likewise.
1130 (ft_select): Make it work in the case family is Mnil.
1131 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1132 (mfont__ft_fini): Set all_fonts_scaned to 0.
1134 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1135 that is failed to open.
1137 2004-05-10 Kenichi Handa <handa@m17n.org>
1139 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1140 device's depth is 1 (i.e. monochrome).
1142 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1143 to work around the problem of libtool.
1145 * font-ft.c: Include <freetype/ftbdf.h>.
1146 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1148 (mfont__ft_init): Initialize them.
1149 (ft_iso8859_1_font_list): New variable.
1150 (set_font_info): Detect a font containing iso8859-1 glyphs and
1151 register it in ft_iso8859_1_font_list. If the font is not
1152 scalable, assume it as BDF or PCF font and setup SIZE and RESY
1153 properties of the font from its properties.
1154 (add_font_list): If the font is not scalable, check if it is BDF
1155 or PCF font. If not, ignore it.
1156 (ft_select): If FAMILY is Mnil, return NULL only if the requested
1157 registry is not iso8859-1.
1158 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1159 ft_iso8859_1_font_list.
1160 (ft_find_metric): If the font is not scalable, assume it as BDF
1161 or PCF, and get a metric from its properties.
1162 (mfont__ft_fini): Free ft_iso8859_1_font_list.
1164 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
1166 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1167 (libm17n_la_LDFLAGS): Delete it.
1168 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1169 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1171 2004-05-06 Kenichi Handa <handa@m17n.org>
1173 * draw.c (compose_glyph_string): Fix previous change.
1175 2004-04-30 Kenichi Handa <handa@m17n.org>
1177 * font-ft.c (ft_list): Delete unused variable `result'.
1178 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1180 2004-04-27 Kenichi Handa <handa@m17n.org>
1182 * m17n-X.c: Include config.h
1183 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1184 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1185 (MWDevice) [HAVE_XFT2]: New member xft_draw.
1186 (FRAME_CMAP, FRAME_VISUAL): New macros.
1187 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1188 (xfont_driver): Make it static.
1189 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1190 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1191 info->xft_color_back.
1192 (MXftFontInfo) [HAVE_XFT2]: New type.
1193 (mwin__xft_close) [HAVE_XFT2]: New function.
1194 (mwin__xft_open) [HAVE_XFT2]: New function.
1195 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1196 (mwin__xft_render) [HAVE_XFT2]: New function.
1198 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1199 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1200 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1203 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1205 * font-ft.c: Don't include FT_FREETYPE_H here.
1206 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1207 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1208 (MFTInfo): New member charmap_index.
1209 (MFTInfo) [HAVE_XFT2]: New member xft_info.
1210 (check_otf_filename): Renamed from check_filename. Return value
1212 (ft_set_property): This function deleted.
1213 (set_font_info): New function.
1214 (add_font_list): Argument changed. Add multiple fonts.
1215 (xft_list) [HAVE_XFT2]: New function.
1216 (ft_list) [not HAVE_XFT2]: New function.
1217 (ft_select): Add code for Xft.
1218 (close_ft): Likewise.
1219 (ft_open): Likewise.
1220 (ft_find_metric): Likewise.
1221 (ft_encode_char): Likewise.
1222 (ft_render): Likewise.
1224 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1226 2004-04-26 Kenichi Handa <handa@m17n.org>
1228 * textprop.c (mtext_attach_property): Declare the return type as
1231 2004-04-21 Kenichi Handa <handa@m17n.org>
1233 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1235 2004-04-09 Kenichi Handa <handa@m17n.org>
1237 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1239 (load_command): Setup above members.
1241 2004-04-05 Kenichi Handa <handa@m17n.org>
1243 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1245 2004-03-30 Kenichi Handa <handa@m17n.org>
1247 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1250 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1251 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1253 2004-03-29 Kenichi Handa <handa@m17n.org>
1255 * Version 1.0 Patch Level 2 released.
1257 2004-03-29 Kenichi Handa <handa@m17n.org>
1259 * charset.c (make_charset): Set charset->fully_loaded and
1260 charset->simple correctly. Don't try to get charset->min_char and
1261 charset->max_char for a charset of method subset and superset.
1262 Don't load a mapping file here.
1263 (mcharset__init): Set unified_max.
1264 (mcharset__load_from_database): Free a working plist.
1266 * coding.c (mcoding__fini): Free all malloced data.
1268 * input-gui.c (win_create_ic): Set control.as_image for preediting
1271 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1272 `count') to initialize the array.
1274 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1277 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1279 (mwin__create_window): Fix bug of setting a background pixel of a
1281 (mwin__adjust_window): Clear the window before drawing.
1283 * m17n-core.c (mdebug__report_object): Free array->objectes if
1285 (m17n_init_core): Don't set report_header_printed to 0 here.
1286 Fix debugging information.
1287 (m17n_fini_core): Set report_header_printed to 0 here.
1289 * m17n-core.h (mplist_deserialize): Extern it.
1291 * m17n-gui.c (m17n_fini_win): Fix debugging information.
1293 * m17n.c (m17n_fini): Fix debugging information.
1295 * mtext.c (mtext__adjust_foramt): New function.
1297 * mtext.h (mtext__adjust_foramt): Extern it.
1299 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1301 * plist.h (mplist__deserialize): Don't extern it.
1303 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
1304 elements of symbol_table to NULL. Report about created and freed
1305 symbols if MDEBUG_FINI is set.
1307 2004-03-22 Kenichi Handa <handa@m17n.org>
1309 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1311 * m17n.c (m17n_init): Fix the way of checking merror_code.
1313 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1315 2004-03-22 Kenichi Handa <handa@m17n.org>
1317 * fontset.c (realize_font_group): Adjust the font size by
1318 mfont__resize before selecting a font.
1320 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1322 2004-03-19 Kenichi Handa <handa@m17n.org>
1324 * Version 1.0 Patch Level 1 released.
1326 2004-03-19 Kenichi Handa <handa@m17n.org>
1328 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1330 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1332 2004-03-19 Kenichi Handa <handa@m17n.org>
1334 Re-apply the changes forgotten in the released version.
1336 * charset.c (mcharset__load_from_database): Call
1337 mchar_define_charset.
1339 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1340 (mconv_encode_range): Put Mcoding text property.
1342 2004-03-18 Kenichi Handa <handa@m17n.org>
1344 * draw.c (Mdepth): New variable.
1345 (visual_order): Delete unused local var `pos'.
1346 (compose_glyph_string): Fix for the case that gstring->glyphs is
1347 realloced. Stop generating glyphs at TO. Fix handling of
1349 (layout_glyphs): Get metrics of all glyphs in advance. Set
1350 lbearing and rbearing of base of composition glyph correctly.
1351 Handle left-overhang glyphs correctly.
1352 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
1354 (dump_combining_code): Change the defualt off_x character to ".".
1355 (mdraw__init): Initialize Mdepth.
1357 * face.c (work_gstring): New variable
1358 (mface__init): Initialize work_gstring.
1359 (mface__fini): Free work_gstring.glyphs.
1360 (mface__realize): Don't handle videomode property here. Adjusted
1361 for the change of mfont__get_metric.
1362 (mface__for_chars): Adjusted for the change of mfont__get_metric.
1364 * face.h (enum face_gc): Moved to m17n-X.c.
1366 * font.h (struct MFontDriver): Arguments of find_metric changed.
1367 (mfont__select): Prototype adjusted.
1368 (mfont__get_metric): Likewise.
1369 (mfont__ft_drive_otf): Likewise.
1370 (mfont__flt_run): Likewise.
1372 * font.c (mfont__select): New argument layouter. If layouter is
1373 different in the registered font, make a new copy of realized
1375 (mfont__get_metric): Argument changed. Get metrics of multiple
1377 (mfont_find): Call mfont__select with layouter as Mnil.
1379 * font-flt.c (FontLayoutContext): New member rfont.
1380 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1381 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
1383 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
1385 (NUM_POINTS): New macro.
1386 (MPointTable): New type.
1387 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1388 (mfont__ft_drive_otf): New argument rfont.
1390 * fontset.c (realize_font_group): Adjusted for the changed of
1392 (check_fontset_element): This function deleted.
1394 * input-gui.c (adjust_window_and_draw): Locate a preedit window
1395 off the parent window if the preedit text is zero length.
1397 * internal-gui.h (struct MFrame): New members foreground,
1398 background, videomode, font.
1399 (struct MGlyphString): New member anti_alias.
1400 (MDrawPoint): New type.
1401 (mwin__draw_bitmap): Prototype deleted.
1402 (mwin__draw_points): Prototype added.
1404 * m17n-gui.h (MDrawControl): New member anti_alias.
1406 * m17n-gui.c (free_frame): Free frame->font.
1407 (mframe): Set the fontset of frame->face to the default fontset.
1409 * m17n-X.c (RGB_GC): New type.
1410 (enum gc_index): Renamed from enum face_gc. Member names changed.
1412 (struct MWDevice): Members foreground and background deleted. New
1413 member scratch_gc, gc_list.
1414 (DEFAULT_FONT, FALLBACK_FONT): New macros.
1415 (free_device): Free GCs in device->gc_list.
1416 (get_rgb_gc): New function.
1417 (get_gc): Renamed and argument changed from get_color.
1418 (get_gc_for_anti_alias): New function.
1419 (xfont_find_metric): Arguments changed. Get metrics of multiple
1421 (set_region): Argument changed. Caller changed.
1422 (xfont_render): Allways set a font in gc.
1423 (x_error_handler, x_io_error_handler): Define only if
1424 X_SET_ERROR_HANDLER is defined.
1425 (mwin__open_device): Create device->scratch_gc. Set members
1426 foreground, background, and videomode of frame. Call
1427 XSetErrorHandler and XSetIOErrorHandler only if
1428 X_SET_ERROR_HANDLER is defined.
1429 (struct gc_list): Deleted.
1430 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1431 (mwin__realize_face): Adjusted for the change of the format of
1432 rface->info and the charge of set_region.
1433 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1434 (mwin__draw_box): Likewise.
1435 (mwin__draw_bitmap): This function deleted.
1436 (mwin__draw_points): New function.
1437 (mwin__verify_region): Adjusted for the change of the format of
1438 rface->info and the charge of set_region.
1439 (mwin__create_window): Inherit backgound pixel from parent.
1440 (mwin__dump_gc): Adjusted for the change of the format of
1443 2004-03-16 Kenichi Handa <handa@m17n.org>
1445 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1447 * input.c (M_key_alias): New variable.
1448 (handle_key): Try M_key_alias property of a key too.
1449 (minput__init): Initialize M_key_alias. Give that property to
1450 symbols in one_char_symbol. Fix bug of initializing
1453 * draw.c (compose_glyph_string): Don't handle
1454 ignore_formatting_char here. Include formatting characters in the
1455 range processed by a FTL.
1456 (layout_glyph_string): Handle ignore_formatting_char here.
1458 2004-03-12 Kenichi Handa <handa@m17n.org>
1460 * input-gui.c (win_create_ic): Enable bidi in status control.
1462 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1464 2004-03-09 Kenichi Handa <handa@m17n.org>
1466 * input.c (load_input_method): If title is not specified, use the
1467 input method name as title.
1469 * m17n-X.c (get_color): Make it static.
1470 (xim_create_ic, xim_destroy_ic, x_error_handler)
1471 (x_io_error_handler): Likewise.
1473 2004-03-01 Kenichi Handa <handa@m17n.org>
1475 * Version 1.0 released.
1478 Copyright (C) 2003, 2004
1479 National Institute of Advanced Industrial Science and Technology (AIST)
1480 Registration Number H15PRO112
1482 This file is part of the m17n library.
1484 The m17n library is free software; you can redistribute it and/or
1485 modify it under the terms of the GNU Lesser General Public License
1486 as published by the Free Software Foundation; either version 2.1 of
1487 the License, or (at your option) any later version.
1489 The m17n library is distributed in the hope that it will be useful,
1490 but WITHOUT ANY WARRANTY; without even the implied warranty of
1491 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1492 Lesser General Public License for more details.
1494 You should have received a copy of the GNU Lesser General Public
1495 License along with the m17n library; if not, write to the Free
1496 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA