1 2004-11-05 Kenichi Handa <handa@m17n.org>
3 * font.c: (commont_style): Include dummy elements "slanted" and
4 "rslanted" to prefer "o" to "r" if "i" is requested.
6 * font-ft.c (ft_to_prop): Fix "oblique" entry.
8 2004-10-29 Kenichi Handa <handa@m17n.org>
10 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
12 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
13 New members smallest and larger.
14 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
15 (xfont_registry_list): Likewise.
16 (xfont_select): Likewise.
19 2004-10-28 Kenichi Handa <handa@m17n.org>
21 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
23 (xfont_select): Fix logic for selecting a larger size font.
25 2004-10-25 Kenichi Handa <handa@m17n.org>
27 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
30 2004-10-22 Kenichi Handa <handa@m17n.org>
32 * input.c (update_candidate): Renamed from udpate_candidate.
33 (take_action_list): Show more debugging info on arithmetic commands.
35 * m17n-X.c (device_open): Fix previous change.
37 * draw.c (compose_glyph_string): Don't get face property at the
40 2004-10-21 Kenichi Handa <handa@m17n.org>
42 * draw.c (compose_glyph_string): Fix for the case of category
45 2004-10-19 Kenichi Handa <handa@m17n.org>
47 * input.c (mdebug_mask): New variable.
48 (shift_state): Print debug information.
49 (take_action_list): Likewise.
50 (handle_key): Likewise.
52 2004-10-14 Kenichi Handa <handa@m17n.org>
54 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
56 2004-10-13 Kenichi Handa <handa@m17n.org>
58 * m17n-X.c (device_open): Be sure to register at least one font
61 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
62 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
64 2004-10-12 Kenichi Handa <handa@m17n.org>
66 * draw.c (alloc_gstring): Fix previous change.
68 * font-ft.c (ft_list_generic): Fix for the case of not
71 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
73 * font.c (mfont_list): If no font is found, return NULL.
74 (load_font_encoding_table): Put entries of nil registry first.
75 (find_encoding): Adjust for the above change.
77 2004-10-11 Kenichi Handa <handa@m17n.org>
79 * m17n-gui.h (mfont_list): Adjust prototype.
81 * m17n-X.c (xfont_list): New arg maxnum.
83 * font.h (struct MFontDriver): Change prototype of <list>.
85 * font-ft.c (fc_generic_family_list): Delete it.
86 (Mserif, Msans_serif, Mmonospace): Delete them.
87 (M_generic_family_info): New variable.
88 (enum GenericFamilyType): New enum.
89 (struct GenericFamilyInfo): New struct.
90 (generic_family_table): New variable.
91 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
93 (add_font_info): Get style here.
94 (ft_list_family): Don't initialize fc_config here. Don't list
96 (ft_list_generic): New function.
97 (ft_select): Pay attention to generic familes here.
98 (ft_open): Fix calculation of ascent and descent.
99 (ft_list): Pay attention to generic families.
100 (mfont__ft_init): Initialize M_generic_family_info,
101 generic_family_table, and fc_config..
102 (mfont__ft_fini): Finalize generic_family_table.
104 * draw.c (compose_glyph_string): Use more constant font for
105 glyphs. Adjust for the member change in MGlyph.
106 (layout_glyph_string): Adjust for the member change in MGlyph.
107 (alloc_gstring): Intilize scracth_glyph to avoid
108 compose_glyph_string on it.
109 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
110 (mdraw_coordinates_position): Fix previous change.
112 * internal-gui.h (glyph_category): New enum.
113 (MGlyph): Change type of <category> to enum glyph_category.
115 * face.c (mface__realize): Delete args langauge and charset.
116 (mface__for_chars): Fix for the case that glyphs have different
118 (mface__update_frame_face): Adjust for mface__realize change.
120 * face.h (mface__realize): Adjust prototype.
122 2004-10-05 Kenichi Handa <handa@m17n.org>
124 * language.c (mlang__init): Add Akan.
126 2004-10-04 Kenichi Handa <handa@m17n.org>
128 * font-ft.c (add_font_info): Add instead of push the element.
129 (ft_list_family): For generic fonts, try all
130 substituted. families.
132 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
133 (run_rule): Don't update cluster range here.
134 (run_command): Update cluster range on appending a glyph.
135 (run_otf): Update cluster range for glyphs generated by OTF.
137 2004-10-02 Kenichi Handa <handa@m17n.org>
139 * m17n-X.c (device_open): Handle Mfont key in PLIST.
141 2004-09-30 Kenichi Handa <handa@m17n.org>
143 * font-ft.c (ft_select): Ignore family on calling mfont__score.
145 2004-09-30 Kenichi Handa <handa@m17n.org>
147 * font.h: Include <fontconfig/fontconfig.h>.
148 (MFTInfo): New member langset.
149 (mfont__encoding_list): Extern it.
151 * font.c (mfont__encoding_list): New function.
152 (mdebug_dump_font_list): New function.
154 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
155 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
157 (ft_family_list): New variable.
158 (set_font_info): New arg basep. Callers changed.
159 (fc_list): Check the return value of FcPatternGetString.
160 (add_font_info): New arg plist. Callers changed. Update
162 (ft_list_family): New function (merged fc_list and ft_list_all).
163 (ft_select): Use ft_list_family.
164 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
166 (mfont__ft_init): Initialize above new variables.
167 (mfont__ft_fini): Free ft_family_list.
168 (STRDUP_LOWER): New macro.
169 (set_font_info): Use STRDUP_LOWER.
170 (ft_list_family): Avoid duplicate addition of font path. Use
172 (fc_decode_prop): Fix typo.
174 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
175 (xfont_registry_list): Change argument disp_info to frame.
177 (xfont_list_all): New function.
178 (xfont_list): If FONT is not NULL, check all fonts.
180 2004-09-28 Kenichi Handa <handa@m17n.org>
182 * m17n-X.c (MXFont, MXFontList): New types.
183 (MDisplayInfo): Delete members font_registry_list,
184 iso8859_1_family_list, iso10646_1_family_list, new members
185 font_list, base_font_list.
186 (free_display_info): Adusted for the change of MDisplayInfo.
187 (xfont_driver): Initialize with xfont_list.
188 (font_compare): New function.
189 (build_font_list): Deleted.
190 (xfont_registry_list): New function.
191 (xfont_select): Use xfont_registry_list.
192 (xfont_list): New function.
193 (device_open): Adusted for the change of MDisplayInfo.
195 * font-ft.c (add_font_info): New arg languages. Callers changed.
196 (fc_list): Get languages from fonts..
197 (ft_list_all): Renamed from ft_list. Callers changed.
198 (ft_list): New function.
199 (mfont__ft_driver): Initalize with ft_list.
201 * font.c (mfont_list): New function.
203 * font.h (struct MFontDriver): New member `list'.
204 (MFTInfo): New member languages.
206 * m17n-gui.h (mfont_list): Extern it.
208 2004-09-27 Kenichi Handa <handa@m17n.org>
210 * internal-gui.h (struct MGlyphString): Delete members mt,
211 sub_width, sub_lbrearing, sub_rbearing, and region.
213 * draw.c (MSubTextExtents): New type.
214 (layout_glyphs): New arg extents. Set its members.
215 (layout_glyph_string): Adjusted for the above change.
216 (alloc_gstring): Don't set gstring->mt.
217 (truncate_gstring): Call line_break function with mt instead of
220 2004-09-22 Kenichi Handa <handa@m17n.org>
222 * mtext.c (count_utf_16_chars): Count each code of invalid
225 2004-09-19 Kenichi Handa <handa@m17n.org>
227 * mtext.c (default_utf_16, default_utf_32): Rename them to
228 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
231 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
234 2004-09-13 Kenichi Handa <handa@m17n.org>
236 * draw.c (Mlatin): Don't declare it here.
237 (visual_order): Fix reordering of combining characters.
238 (compose_glyph_string): Fix detection of script.
239 (layout_glyphs): Don't fix reordering of combining characters
241 (layout_glyph_string): Pay attention to
242 control->disable_overlapping_adjustment.
243 (truncate_gstring): Include at least on character in a line.
244 (get_gstring): Always scan one full line.
245 (mdraw__init): Don't initialize Mlatin here.
246 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
247 have a font, use ascent/descent of an ASCII font. Allow
248 ink_array_return and logical_array_return to be NULL.
249 (mdraw_coordinates_position): Fix iteration.
251 * font-ft.c (MFTtoProp): Member completely changed.
252 (ft_to_prop): Adjusted for the above change.
253 (ft_to_prop_size): Likewise.
254 (set_font_info): Adjusted for the change of MFTtoProp.
255 (fc_generic_family_list): New variable.
256 (fc_list): Add special handling of generic font names.
257 (mfont__ft_init): Adjusted for the change of MFTtoProp.
258 Initialize fc_generic_family_list.
259 (mfont__ft_fini): Don't free ft_to_prop. Free
260 fc_generic_family_list.
261 (FC_vs_M17N_font_prop): New type.
262 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
263 (fc_decode_prop, fc_encode_prop): New functions.
264 (mfont__ft_parse_name): Use fc_decode_prop.
265 (mfont__ft_unparse_name): Use fc_encode_prop.
267 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
268 (MWDevice): Add member realized_font_list.
269 (free_display_info): Don't free disp_info->realized_font_list.
270 (free_device): Free device->realized_fontset_list.
271 (xft_find_metric): Use gstring->frame instead of rfont->frame.
272 (device_open): Don't initialize disp_info->realized_font_list.
273 (device_open): Initialize device->realized_font_list and set it to
274 frame->realized_font_list.
276 * fontset.c (try_font_group): New function.
277 (mfont__lookup_fontset): Use try_font_group.
279 * font.c (common_weight): Change the order of "regular".
281 * face.c (Mlatin): Don't make it static.
282 (mface__realize): Be sure to set work_gstring.frame.
283 (mface__for_chars): Likewise.
285 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
288 * internal-gui.h (Mlatin): Extern it.
290 * m17n-gui.h (MDrawControl): New member
291 disable_overlapping_adjustment.
293 2004-09-06 Kenichi Handa <handa@m17n.org>
295 * font-flt.c (run_otf): Fix typo ('}'->']').
297 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
298 (COMBINING_PRECOMPUTED_P): New macros.
300 * draw.c (layout_glyphs): Handle precomputed combining code.
302 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
303 precomupted combining code.
305 2004-09-03 Kenichi Handa <handa@m17n.org>
307 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
310 2004-08-27 Kenichi Handa <handa@m17n.org>
312 * face.c (mface_put_prop): If the new value is the same as the
313 current one, don't increment frame->tick.
315 2004-08-25 Kenichi Handa <handa@m17n.org>
317 * fontset.c (mfontset): Initialize font_spec_list member.
318 (mfontset_copy): Load fontset if necessary.
320 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
321 'metrics' to for C++.
323 * draw.c (mdraw_glyph_info): Adjusted for the member name change
326 2004-08-16 Kenichi Handa <handa@m17n.org>
328 * Version 1.1.0 released.
330 2004-08-13 Kenichi Handa <handa@m17n.org>
332 * language.c (mlang__init): Add Dhivehi.
334 * m17n-gui.c (Mx, Mfreetype): Delete it.
335 (m17n_init_win): Don't initialize Mx and Mfreetype here.
337 * m17n-gui.h (Mfreetype, Mxft): Extern them.
338 (mfont_resize_ratio): Extern it.
339 (MDrawGlyphInfo): New member logical_width;
340 (MDrawGlyph): New type.
341 (mdraw_glyph_list): Prototype adjusted.
343 * m17n-X.c (xfont_open): Set type and fontp members.
344 (xft_open): Likewise.
346 * internal-gui.h (Mx, Mfreetype): Delete extern.
348 * font.h (struct MRealizedFont): New member type and fontp.
350 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
351 (Mx, Mfreetype): Declare here.
352 (Mxft): New variable.
353 (mfont_resize_ratio): New function.
355 * font-ft.c (ft_open): Set type and fontp members.
357 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
360 2004-08-11 Kenichi Handa <handa@m17n.org>
362 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
365 2004-08-06 Kenichi Handa <handa@m17n.org>
367 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
370 * font-flt.c (run_otf): Print debugging information if necessary.
372 2004-08-05 Kenichi Handa <handa@m17n.org>
374 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
375 positioning_type 5 and 6. Switch simplified.
377 2004-08-04 Kenichi Handa <handa@m17n.org>
379 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
381 2004-08-02 Kenichi Handa <handa@m17n.org>
383 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
384 set val to 1 even if it is greater than 1.
386 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
388 2004-07-29 Kenichi Handa <handa@m17n.org>
390 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
391 debugging information.
393 * internal.h (MDEBUG_PRINT5): New macro.
395 * draw.c (layout_glyphs): Don't combine a zero width glyph with
396 the previous one if the zero width glyph has left or right
399 2004-07-26 Kenichi Handa <handa@m17n.org>
401 * m17n-X.c (xft_render): Pay attention to members left_padding and
402 right_padding of MGlyph.
404 * draw.c (visual_order): Allocate one more elements for arrays as
405 a workaround of fribidi bug.
406 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
407 instead of MGlyph->bidi_sensitive.
408 (layout_glyph_string): Pay attentinon to
409 control->orientation_reversed when padding at the head or tail.
410 Fix adjustment of space glyph width.
411 (get_gstring): If cursor_width or cursor_bidi is changed, don't
414 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
415 instead of MGlyph->bidi_sensitive.
417 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
419 2004-07-26 Kenichi Handa <handa@m17n.org>
421 * draw.c (visual_order): Don't treat combined glyphs specially.
422 (layout_glyphs): Don't get metrics glyphs that are already ready.
423 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
424 width with the previous one.
425 (draw_background): Fix bar cursor position on a r2l glyph.
427 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
428 (run_rule): Fix place of updating cluster_begin_pos and
429 cluster_end_pos here.
430 (run_otf): Don't set left_padding.
432 * font-ft.c (adjust_anchor): Type of argument `code' changed.
434 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
435 Fix handling of GPOS.
436 (mfont__ft_drive_gpos): Delete this function.
438 * font.h (mfont__ft_drive_otf): Renamed back from
439 mfont__ft_drive_gsub.
440 (mfont__ft_drive_gpos): Delete extern.
442 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
443 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
445 2004-07-23 Kenichi Handa <handa@m17n.org>
447 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
450 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
452 2004-07-22 Kenichi Handa <handa@m17n.org>
454 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
456 2004-07-20 Kenichi Handa <handa@m17n.org>
458 * draw.c (render_glyphs): Fix checking of g->code validity.
460 * face.c (mface__realize): Set g.type.
462 2004-07-18 Kenichi Handa <handa@m17n.org>
464 * Makefile.am: Prepend ${top_srcdir} to all *.la in
467 * m17n-gui.c (mframe): Print error message give by dlopen to
470 2004-07-16 Kenichi Handa <handa@m17n.org>
472 * draw.c (compose_glyph_string): Improve the way of deciding a
473 script. For a character that doesn't have script property, use
474 the last non-latin script.
476 * font-ft.c (fc_list): Cancel previous change.
477 (mfont__ft_init): Add more entries in ft_to_prop_name.
479 2004-07-15 Kenichi Handa <handa@m17n.org>
481 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
482 previous or next character glyphs.
484 2004-07-14 Kenichi Handa <handa@m17n.org>
486 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
489 * fontset.c (mfont__lookup_fontset): If glyph type is
490 GLYPH_SPACE, get codes for SPACE.
492 * internal-gui.h (Mfont): Delete extern.
494 * m17n-gui.h (Mfont): Delete duplicated extern.
496 2004-07-13 Kenichi Handa <handa@m17n.org>
498 * font-ft.c (DEVICE_DELTA): New macro.
499 (adjust_anchor): New function.
500 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
502 (mfont__ft_drive_gpos): New function.
504 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
505 (FontLayoutContext): Delete member `rfont'.
506 (run_otf): Set g->otf_cmd. Call
507 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
508 only whne HAVE_OTF is defined.
510 * fontset.c: Include "config.h".
512 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
513 (MGlyph): New member otf_cmd.
515 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
516 (mfont__ft_drive_gpos): Extern it.
518 * face.c: Include "config.h".
520 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
522 * input-gui.c: Include "config.h".
524 * plist.c: Include "config.h".
526 2004-07-06 Kenichi Handa <handa@m17n.org>
528 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
529 internal-gui.h: Cancel previous changes.
531 * m17n-gd.h: Delete it.
533 * Makefile.am (libm17n_core_la_LIBADD): New variable.
534 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
535 @XML2_LD_FLAGS@ to above.
536 (libm17n_la_LIBADD): Add -ldl.
537 (libm17n_la_LDFLAGS): Add -export-dynamic.
538 (X_LD_FLAGS): Fix the order of linking.
539 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
540 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
541 (libm17n_X_la_LDFLAGS): Add -module.
542 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
543 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
544 (libm17n_gd_la_LDFLAGS): Add -module.
545 (include_HEADERS): Delete m17n-gd.h.
547 2004-06-30 Kenichi Handa <handa@m17n.org>
549 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
550 (MDeviceLibraryInterface): Delete it.
551 (register_device_library): Delete it.
552 (m17n__device_library_list): Renamed from device_library_list.
554 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
555 (m17n_init_win): Adjust prototype.
557 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
558 (m17n_init_gd): New function.
560 * m17n-gd.h: New file.
562 * m17n-X.h: Include <m17n-gui.h>.
563 (m17n_init_X): Extern it.
564 (M17N_INIT): Redefine it.
566 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
567 (m17n_init_X): New function.
569 * internal-gui.h (m17n__device_library_list): Extern it.
570 (struct MDeviceDriver): New members initialized, init, and fini.
572 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
574 (libm17n_X_la_LIBADD): Delete aboves.
575 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
576 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
577 (libm17n_gd_la_LDFLAGS): Delete it.
578 (include_HEADERS): Add m17n-gd.h.
580 2004-06-25 Kenichi Handa <handa@m17n.org>
582 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
583 (libm17n_gd_la_LDFLAGS): Cancel previous change.
585 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
587 * font-ft.c (fc_list): If FcFontList finds no font, try
590 * draw.c (compose_glyph_string): Terminate the last loop after
591 doing default combining if necessary.
593 2004-06-24 Kenichi Handa <handa@m17n.org>
595 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
597 * character.c (mchar_define_property): Add const to an arg.
599 * charset.c (mchar_define_charset): Add const to an arg.
601 * coding.c (MCodingSystem): Add const to an arg or decoder.
602 (finish_decoding): Add const to an arg.
603 (decode_coding_charset, decode_coding_utf_8)
604 (decode_coding_utf_16, decode_coding_utf_32)
605 (decode_coding_iso_2022, decode_coding_sjis)
606 (mconv_define_coding): Likewise.
608 * m17n-X.c (xft_find_metric): Delete unused variable.
610 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
613 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
616 * mtext.c (count_utf_8_chars, count_utf_16_chars)
617 (mtext__from_data, mtext_from_data): Add `const' to an arg.
619 * mtext.h (mtext__from_data): Ajust prototype.
621 2004-06-23 Kenichi Handa <handa@m17n.org>
623 * draw.c (compose_glyph_string): Always get glyph codes by
625 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
626 (mdraw_glyph_list): New function.
628 * font-flt.c (mfont__flt_run): Be sure to call
629 rfont->driver->encode_char.
631 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
632 (ft_encode_char): Delete arg C.
633 (ft_render): Don't call FT_Get_Char_Index.
635 * font.c (mfont__encodable_p): Delete it.
636 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
638 * font.h (struct MFontDriver): Delete arg C of encode_char.
639 (mfont__encodable_p): Delete extern.
641 * m17n-X.c (xfont_encode_char): Delete arg C.
642 (xft_find_metric): Don't cal FT_Get_Char_Index.
643 (xft_render): Likewise.
645 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
647 (mdraw_glyph_list): Extern it.
649 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
651 2004-06-22 Kenichi Handa <handa@m17n.org>
653 * m17n-gui.h (mfontset_lookup): Extern it.
655 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
657 * fontset.c (realize_fontset_elements)
658 (free_realized_fontset_elements, update_fontset_elements): New
660 (mfont__realize_fontset): Call realize_fontset_elements.
661 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
662 (mfont__lookup_fontset): If a fontset was modified, update
663 the realized fontset.
664 (mfontset_modify_entry): Increment fontset->tick.
665 (mfontset_lookup): New function.
667 2004-06-21 Kenichi Handa <handa@m17n.org>
669 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
671 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
672 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
673 length of source text 0.
675 2004-06-21 Kenichi Handa <handa@m17n.org>
677 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
678 (compare): Pay attention to format other than utf-8.
679 (copy): Delete this function.
680 (count_by_utf_8, count_by_utf_16, insert): New functions.
681 (count_utf_16_chars): Fix handling of a surrogate pair.
682 (find_char_forward, find_char_backward): Likewise.
683 (mtext__from_data): Delete unnecessary check. Fix number of
685 (mtext_from_data): Don't count items.
686 (mtext_ref_char): Optimize the code.
687 (mtext_set_char): Pay attention to format other than utf-8.
688 (mtext_cat_char): Likewise.
689 (mtext_dup): Don't call copy, instead do allocation here.
690 (mtext_cat): Call insert instead of copy.
691 (mtext_ncat): Likewise.
692 (mtext_cpy): Delete character at first and call insert instead of
694 (mtext_ncpy): Likewise.
695 (mtext_copy): Likewise.
696 (mtext_duplicate): Call insert instead of copy.
697 (mtext_del): Pay attention to format other than utf-8.
698 (mtext_ins): Simply call insert.
699 (mtext_ins_char): Pay attention to format other than utf-8.
700 (mtext_tok): Call insert instead of copy.
701 (mtext_text): Call UNIT_BYTES.
703 * textprop.c (mtext__adjust_plist_for_change): New function.
705 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
706 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
707 (CHAR_UNITS_AT): Fix typo.
708 (CHAR_UNITS_BY_HEAD): Fix typo.
709 (STRING_CHAR_AND_UNITS): Fix typo.
711 * internal.h (MTEXT_READ_ONLY_P): New macro.
713 * mtext.h (mtext__replace): Delete the extern.
714 (mtext__adjust_foramt): Adjust prototype.
716 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
717 if possible. Otherwise make a copy of mmt.
719 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
722 2004-06-18 Kenichi Handa <handa@m17n.org>
724 * character.h (CHAR_STRING_UTF16): Fix syntax.
726 2004-06-16 Kenichi Handa <handa@m17n.org>
728 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
729 (libm17n_X_la_LIBADD): Delete it.
730 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
732 * m17n-X.c (device_open): Add parens in `if' condition.
734 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
735 (DEC_POSITION): Likewise.
736 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
738 2004-06-15 Kenichi Handa <handa@m17n.org>
740 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
743 * draw.c (compose_glyph_string): If langauge is specified, call
744 mface__for_chars even if a text is all latin. Fix condition for
745 setting non_ascii_found.
747 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
749 * m17n.h (minput_char_to_key): Delete extern.
751 * m17n-gui.h (minput_event_to_key): Cancel previous change.
753 * m17n-gui.c (null_device_open): Set several members of frame.
755 2004-06-14 Kenichi Handa <handa@m17n.org>
757 * m17n-gui.h (minput_event_to_key): Delete extern.
759 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
761 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
763 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
765 2004-06-08 Kenichi Handa <handa@m17n.org>
767 * character.c (mchar_put_prop): Don't increment the ref-count of
770 2004-06-04 Kenichi Handa <handa@m17n.org>
772 * m17n-core.c (mdebug__register_object): New function.
773 (mdebug__unregister_object): Likewise.
775 * internal.h (mdebug__register_object, mdebug__unregister_object):
777 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
780 * charset.c (mcharset__load_from_database): Don't call
781 mconv__register_charset_coding here.
783 * coding.c (find_coding): Get a real name from an element of
784 coding_definition_list.
785 (mconv__register_charset_coding): Set the real name at the top of
787 (mcoding__load_from_database): Likewise.
788 (mconv_list_codings): Adjusted for the above change.
790 2004-06-03 Kenichi Handa <handa@m17n.org>
792 * coding.c (find_coding): Find by canonicalized name. Don't have
793 to modify the element of coding_definition_list by
795 (mconv__define_coding_from_charset): Delete it.
796 (mconv__register_charset_coding): Canonicalize sym.
797 (mcoding__load_from_database): Register plist modified by
800 * coding.h (mconv__define_coding_from_charset): Don't extern it.
802 * font-ft.c (ft_open): Fix setting of rfont->descent.
804 2004-06-02 Kenichi Handa <handa@m17n.org>
806 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
807 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
808 (xlfd_unparse_name): Renamed from xfont_build_name.
809 (mfont__init): Initialized Mfontconfig.
810 (mfont__free_realized): Unconditionally unref rfont->info.
811 (mfont__select): Free `this' if it's not best.
812 (mfont__open): Don't check frame->realized_font_list.
813 (mfont__parse_name_into_font): New function.
814 (Mfontconfig): New variable.
815 (mfont_from_name): Call mfont_parse_name.
816 (mfont_name): Call mfont_unparse_name.
817 (mdebug_dump_font): Likewise.
819 * font.h (struct MFontDriver): Delete members parse_name and
821 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
822 (mfont__parse_name_into_font): Extern it.
824 * font-ft.c: Include "symbol.h".
825 (close_ft): Unconditionally free filename and charmap_list of
827 (ft_open): Duplicate base->filename. Increment ref-count of
828 ft_info->charmap_list. Free ft_info->charmap_list and
829 ft_info->filename on error.
830 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
832 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
834 (enum xlfd_field_idx): Moved to font.c.
835 (split_font_name, build_font_name): Likewise.
836 (build_font_list): Call mfont__parse_name_info_font.
837 (xfont_open): Call mfont__unparse_name. Free name.
838 (xfont_parse_name, xfont_build_name): Moved to font.c
839 (xft_select): Prototype deleted.
840 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
841 Call mfont_pase_name.
843 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
844 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
847 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
850 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
852 2004-06-01 Kenichi Handa <handa@m17n.org>
854 * fontset.c (mfontset_modify_entry): Pay attention to the case
855 that fontset->font_spec_list is NULL.
857 2004-05-31 Kenichi Handa <handa@m17n.org>
859 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
861 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
863 * font.c (mfont__select): Print score the a font for debugging.
865 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
867 * coding.c (reset_coding_sjis): Check kanji and kana instead of
868 kanji_sym and kana_sym.
870 2004-05-28 Kenichi Handa <handa@m17n.org>
872 * Makefile.am (VINFO): New variable.
873 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
874 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
876 2004-05-27 Kenichi Handa <handa@m17n.org>
878 The following chanages are to make device dependent functions
879 accessible only from MDeviceDriver structure, and to add GD and
880 null device drivers. Font drivers get also device dependent.
882 * m17n.c (m17n_init): Increament shell_initialized.
883 (m17n_fini): Decremented shell_initialized.
885 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
887 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
888 (Mwidget, Mcolormap, Mx): Extern them.
890 * m17n-gui.c: Include <dlfcn.h> and "config.h".
891 (free_frame): Call frame->driver->close instead of
893 (DLOPEN_SHLIB_EXT): New macro.
894 (MDeviceLibraryInterface): New type.
895 (device_library_list): New variable.
896 (register_device_library): New function.
897 (null_device): New variable.
898 (null_device_close, null_device_get_prop)
899 (null_device_realize_face, null_device_free_realized_face): New
901 (null_driver): New variable.
902 (null_device_init, null_device_fini, null_device_open): New
904 (null_interface): New variable.
905 (Mfreetype, Mdevice): Declare them.
906 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
907 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
908 Mwin__Close_Device. Register drivers for Mx and Mgd.
909 (m17n_fini_win): Decremented win_initialized. Call "fini"
910 function of all opened devices. Don't call mwin__fini.
911 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
913 (mframe): Handle Mdevice key of PLIST.
914 (mframe_get_prop): Call frame->device->get_prop instead of
915 mwin__device_get_prop.
917 * m17n-gd.c: New file.
919 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
920 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
922 * m17n-core.c (m17n_init_core): Increate core_initialized.
923 (m17n_fini_core): Decremented core_initialized.
925 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
926 (Mcolormap): Don't extern them here.
928 * m17n-X.c (FRAME_DEVICE): New macro.
929 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
930 (free_display_info): Use MPLIST_DO.
931 (free_device): Free rface->info.
932 (xft_close): Delete it.
933 (device_init): Renamed from mwin__init.
934 (device_fini): Renamed from mwin__fini.
935 (device_open): Renamed from mwin__open_device.
936 (x_driver): New variable.
937 (MXFontInfo): Delete member frame, add member display.
938 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
939 Don't declare them here.
941 * internal-gui.h (MDeviceType): New enum.
942 (MWDefice): Delete it.
943 (struct MFrame): Change type of device to void *. New members
944 device_type, driver, font_driver_list.
945 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
946 (MDeviceDriver): New type.
947 (Mx, Mgd, Mfreetype): Extern them.
948 (mwin__XXX): Delete all of them.
950 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
952 (win_destroy_ic): Likewise.
953 (adjust_window_and_draw): Likewise.
954 (win_callback): Likewise.
955 (Mxim): Declare it here.
956 (minput_event_to_key): Call M_CHECK_READABLE.
958 * fontset.c (mfont__lookup_fontset): Delete local variable
961 * font.h (struct MFontDriver): Delete member close, add members
962 parse_name and build_name.
963 (mfont__driver_list): Delete extern.
964 (mfont__close): Delete extern.
966 * font.c (mfont__init): Don't set mfont__driver_list.
967 (mfont__fini): Don't unref mfont__driver_list.
968 (mfont__select): Try font drivers in frame->font_driver_list. Set
969 driver member of a realized font.
970 (mfont__close): Delete it.
971 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
972 functions of the default frame.
974 * font-ft.c (close_ft): Check ft_info->ft_face and work
976 (add_font_info): Allocate ft_info by M17N_OBJECT.
977 (ft_close): Delete it.
978 (mfont__ft_driver): Don't set ft_close.
979 (ft_select): Increment ref-count of best_font.
980 (ft_open): Decremented ref-count of base. On error, call
981 FT_Done_Face and free ft_info.
982 (ft_find_metric): Always use XXX_MONO in load_flags.
983 (ft_render): Fix setting of width. Call
984 frame->driver->draw_points instead of mwin__draw_points.
985 (ft_to_prop): Don't set mfont__driver_list.
986 (mfont__ft_fini): Just unref ft_info.
988 * face.c (mface__init): Exchange foreground and background of
989 mface__default. Call mface_put_prop to set hline of
991 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
992 (mface__free_realized): Don't call mwin__free_realized_face.
994 * draw.c (Mdepth): Don't declare it here.
995 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
996 (render_glyphs, render_glyph_string): Likewise.
997 (mdraw__init): Don't set Mdepth.
998 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
1000 (mdraw_text_per_char_extents): Return 0 on success and -1 on
1002 (mdraw_text_items): Check FRAME is writable.
1003 (mdraw_per_char_extents): Implement body.
1005 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
1007 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
1008 (GUI_SOURCES): Delete it.
1009 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
1010 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
1011 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
1012 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
1013 (linkgui_LDADD): Set to libm17n-gui.la
1014 (linkgui_LDFLAGS): New target.
1015 (SRC): Include ${libm17n_gui_la_SOURCES} and
1016 ${libm17n_gd_la_SOURCES}.
1018 2004-05-24 Kenichi Handa <handa@m17n.org>
1020 * draw.c (draw_background): Don't draw background even if
1021 rface->face.property[MFACE_BACKGROUND] is not Mnil.
1023 2004-05-22 Kenichi Handa <handa@m17n.org>
1025 * m17n-X.c (xft_open_font): Fix anti_alias setting.
1027 2004-05-20 Kenichi Handa <handa@m17n.org>
1029 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
1031 * m17n-gui.c: Include "plist.h".
1032 (mframe): If PLIST is NULL, initialize it to emply plist.
1034 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
1035 (xft_driver): New variable.
1036 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
1037 (xft_find_metric, xft_render): New function.
1038 (mwin__init): Adjusted for the new mfont__driver_list.
1039 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
1040 generated face to PARAM.
1041 (mwin__realize_face): Fix setting of box colors. Don't call hook
1043 (mwin__draw_hline): New function.
1044 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
1045 (mwin__xft_render): Delete these function.
1047 * internal-gui.h (struct MFrame): New member tick.
1048 (struct MGlyphString): New member tick.
1049 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
1050 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
1051 (mwin__xft_render): Delete extern.
1053 * fontset.c (mfont__lookup_fontset): Make the code simpler.
1054 (mfontset): Always increment the reference count of returned
1057 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
1058 (MFTInfo): Moved to font.h.
1059 (ft_iso8859_1_font_list): Delete this variable.
1060 (set_font_info): Don't set font->property[MFONT_TYPE].
1061 (set_font_info): Don't udpate ft_iso8859_1_font_list.
1062 (add_font_info): Change type to void.
1063 (fc_list): Change anme from xft_list. Caller changed. Include
1064 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1065 (mfont__ft_driver): Change name from ft_driver. Caller changed.
1066 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1067 (close_ft): Don't call mwin__xft_close. Unref
1068 ft_info->extra_info.
1069 (ft_open): Don't setup ft_info->fontname. Don't call
1071 (ft_find_metric): Don't call mwin__xft_get_metric.
1072 (ft_encode_char): Call rfont->driver->open instead of ft_open.
1073 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
1074 (mfont__ft_init): Adjusted for new mfont__driver_list.
1075 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1077 * font.c (mfont__driver_list): Make it MPlist.
1078 (mfont__init): Adjust initialization of mfont__driver_list.
1079 (mfont__fini): Free mfont__driver_list.
1080 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1081 (mfont__select): Adjusted for the new mfont__driver_list.
1083 * font.h (enum MFontProperty): Delete MFONT_TYPE.
1084 (mfont__drirver_list): Adjust prototype.
1085 (MFTInfo): Move to here from fron.c. Deleve member fontname.
1087 * face.h (struct MFace): Delete member realized_face_list, add
1089 (struct MRealizedFace): Delete member need_update
1090 andnofont_rface, add member non_ascii_list.
1091 (mface__update_frame_face): Extern it.
1093 * face.c (hline_prop_list, box_prop_list, noop_hook): New
1095 (get_hline_create, get_box_create): New functions.
1096 (find_realized_face): Cancel previous change. Arg RFONT deleted.
1098 (free_face): Cancep previous change. Free face->frame_list.
1099 (serialize_hline): Do nothing if hline->width is zero.
1100 (serialize_box): Do nothing if box->width is zero.
1101 (mface__init): Setup all properties of mface__default.
1102 (mface__fini): Free hline_prop_list and box_prop_list.
1103 (mface__realize): Cancel previous change. Update
1104 face->frame_list. Setup rface->non_ascii_list.
1105 (mface__for_chars): Update rface->non_ascii_list.
1106 (mface__free_realized): Free rface->non_ascii_list.
1107 (mface__update_frame_face): New function.
1108 (mface): Initialize face->frame_list.
1109 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
1111 (mface_merge): Likewise.
1112 (mface_put_prop): If key is Mhline or Mbox, get value by
1113 get_hline_create or get_box_create respectively.
1114 (mface_put_prop): Update frame->tick and call
1115 mface__update_frame_face if necessary.
1116 (mface_update): Do nothing if func is noop_hook.
1118 * draw.c (render_glyphs): If a font is not found, use
1119 mwin__draw_empty_boxes.
1120 (alloc_gstring): Initialize gstring->tick.
1121 (get_gstring): Check gstring->tick.
1123 2004-05-17 Kenichi Handa <handa@m17n.org>
1125 * face.c (find_realized_face): Return value changed. If RFONT is
1126 NULL, avoid unnecessary checking.
1127 (free_face): Free face->realized_face_list.
1128 (mface__realize): Adjusted for the change of find_realized_face.
1129 If it returns a realized face that needs update, free it and
1130 realize a new one. Push a new realized face to
1131 frame->realized_face_list instead of appending.
1132 (mface__for_chars): Adjusted for the change of find_realized_face.
1133 Short cut if the required font is in rface->ascii_rface.
1134 (mface_put_prop): Free old value if necessary. Set need_update
1135 member of realized faces to 1.
1137 * face.h (struct MFace): Delete member tick, add member
1139 (struct MRealizedFace): Delete member tick, add member
1142 2004-05-13 Kenichi Handa <handa@m17n.org>
1144 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1146 2004-05-12 Kenichi Handa <handa@m17n.org>
1148 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1150 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1151 parse it XftNameParse.
1153 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1154 (all_fonts_scaned): New variable.
1155 (set_font_info): FAMILY may be Mnil.
1156 (add_font_info): Argument changed.
1157 (xft_list): Call add_font_info in it.
1158 (ft_list): Likewise.
1159 (ft_select): Make it work in the case family is Mnil.
1160 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1161 (mfont__ft_fini): Set all_fonts_scaned to 0.
1163 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1164 that is failed to open.
1166 2004-05-10 Kenichi Handa <handa@m17n.org>
1168 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1169 device's depth is 1 (i.e. monochrome).
1171 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1172 to work around the problem of libtool.
1174 * font-ft.c: Include <freetype/ftbdf.h>.
1175 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1177 (mfont__ft_init): Initialize them.
1178 (ft_iso8859_1_font_list): New variable.
1179 (set_font_info): Detect a font containing iso8859-1 glyphs and
1180 register it in ft_iso8859_1_font_list. If the font is not
1181 scalable, assume it as BDF or PCF font and setup SIZE and RESY
1182 properties of the font from its properties.
1183 (add_font_list): If the font is not scalable, check if it is BDF
1184 or PCF font. If not, ignore it.
1185 (ft_select): If FAMILY is Mnil, return NULL only if the requested
1186 registry is not iso8859-1.
1187 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1188 ft_iso8859_1_font_list.
1189 (ft_find_metric): If the font is not scalable, assume it as BDF
1190 or PCF, and get a metric from its properties.
1191 (mfont__ft_fini): Free ft_iso8859_1_font_list.
1193 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
1195 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1196 (libm17n_la_LDFLAGS): Delete it.
1197 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1198 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1200 2004-05-06 Kenichi Handa <handa@m17n.org>
1202 * draw.c (compose_glyph_string): Fix previous change.
1204 2004-04-30 Kenichi Handa <handa@m17n.org>
1206 * font-ft.c (ft_list): Delete unused variable `result'.
1207 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1209 2004-04-27 Kenichi Handa <handa@m17n.org>
1211 * m17n-X.c: Include config.h
1212 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1213 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1214 (MWDevice) [HAVE_XFT2]: New member xft_draw.
1215 (FRAME_CMAP, FRAME_VISUAL): New macros.
1216 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1217 (xfont_driver): Make it static.
1218 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1219 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1220 info->xft_color_back.
1221 (MXftFontInfo) [HAVE_XFT2]: New type.
1222 (mwin__xft_close) [HAVE_XFT2]: New function.
1223 (mwin__xft_open) [HAVE_XFT2]: New function.
1224 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1225 (mwin__xft_render) [HAVE_XFT2]: New function.
1227 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1228 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1229 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1232 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1234 * font-ft.c: Don't include FT_FREETYPE_H here.
1235 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1236 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1237 (MFTInfo): New member charmap_index.
1238 (MFTInfo) [HAVE_XFT2]: New member xft_info.
1239 (check_otf_filename): Renamed from check_filename. Return value
1241 (ft_set_property): This function deleted.
1242 (set_font_info): New function.
1243 (add_font_list): Argument changed. Add multiple fonts.
1244 (xft_list) [HAVE_XFT2]: New function.
1245 (ft_list) [not HAVE_XFT2]: New function.
1246 (ft_select): Add code for Xft.
1247 (close_ft): Likewise.
1248 (ft_open): Likewise.
1249 (ft_find_metric): Likewise.
1250 (ft_encode_char): Likewise.
1251 (ft_render): Likewise.
1253 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1255 2004-04-26 Kenichi Handa <handa@m17n.org>
1257 * textprop.c (mtext_attach_property): Declare the return type as
1260 2004-04-21 Kenichi Handa <handa@m17n.org>
1262 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1264 2004-04-09 Kenichi Handa <handa@m17n.org>
1266 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1268 (load_command): Setup above members.
1270 2004-04-05 Kenichi Handa <handa@m17n.org>
1272 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1274 2004-03-30 Kenichi Handa <handa@m17n.org>
1276 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1279 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1280 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1282 2004-03-29 Kenichi Handa <handa@m17n.org>
1284 * Version 1.0 Patch Level 2 released.
1286 2004-03-29 Kenichi Handa <handa@m17n.org>
1288 * charset.c (make_charset): Set charset->fully_loaded and
1289 charset->simple correctly. Don't try to get charset->min_char and
1290 charset->max_char for a charset of method subset and superset.
1291 Don't load a mapping file here.
1292 (mcharset__init): Set unified_max.
1293 (mcharset__load_from_database): Free a working plist.
1295 * coding.c (mcoding__fini): Free all malloced data.
1297 * input-gui.c (win_create_ic): Set control.as_image for preediting
1300 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1301 `count') to initialize the array.
1303 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1306 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1308 (mwin__create_window): Fix bug of setting a background pixel of a
1310 (mwin__adjust_window): Clear the window before drawing.
1312 * m17n-core.c (mdebug__report_object): Free array->objectes if
1314 (m17n_init_core): Don't set report_header_printed to 0 here.
1315 Fix debugging information.
1316 (m17n_fini_core): Set report_header_printed to 0 here.
1318 * m17n-core.h (mplist_deserialize): Extern it.
1320 * m17n-gui.c (m17n_fini_win): Fix debugging information.
1322 * m17n.c (m17n_fini): Fix debugging information.
1324 * mtext.c (mtext__adjust_foramt): New function.
1326 * mtext.h (mtext__adjust_foramt): Extern it.
1328 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1330 * plist.h (mplist__deserialize): Don't extern it.
1332 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
1333 elements of symbol_table to NULL. Report about created and freed
1334 symbols if MDEBUG_FINI is set.
1336 2004-03-22 Kenichi Handa <handa@m17n.org>
1338 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1340 * m17n.c (m17n_init): Fix the way of checking merror_code.
1342 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1344 2004-03-22 Kenichi Handa <handa@m17n.org>
1346 * fontset.c (realize_font_group): Adjust the font size by
1347 mfont__resize before selecting a font.
1349 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1351 2004-03-19 Kenichi Handa <handa@m17n.org>
1353 * Version 1.0 Patch Level 1 released.
1355 2004-03-19 Kenichi Handa <handa@m17n.org>
1357 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1359 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1361 2004-03-19 Kenichi Handa <handa@m17n.org>
1363 Re-apply the changes forgotten in the released version.
1365 * charset.c (mcharset__load_from_database): Call
1366 mchar_define_charset.
1368 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1369 (mconv_encode_range): Put Mcoding text property.
1371 2004-03-18 Kenichi Handa <handa@m17n.org>
1373 * draw.c (Mdepth): New variable.
1374 (visual_order): Delete unused local var `pos'.
1375 (compose_glyph_string): Fix for the case that gstring->glyphs is
1376 realloced. Stop generating glyphs at TO. Fix handling of
1378 (layout_glyphs): Get metrics of all glyphs in advance. Set
1379 lbearing and rbearing of base of composition glyph correctly.
1380 Handle left-overhang glyphs correctly.
1381 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
1383 (dump_combining_code): Change the defualt off_x character to ".".
1384 (mdraw__init): Initialize Mdepth.
1386 * face.c (work_gstring): New variable
1387 (mface__init): Initialize work_gstring.
1388 (mface__fini): Free work_gstring.glyphs.
1389 (mface__realize): Don't handle videomode property here. Adjusted
1390 for the change of mfont__get_metric.
1391 (mface__for_chars): Adjusted for the change of mfont__get_metric.
1393 * face.h (enum face_gc): Moved to m17n-X.c.
1395 * font.h (struct MFontDriver): Arguments of find_metric changed.
1396 (mfont__select): Prototype adjusted.
1397 (mfont__get_metric): Likewise.
1398 (mfont__ft_drive_otf): Likewise.
1399 (mfont__flt_run): Likewise.
1401 * font.c (mfont__select): New argument layouter. If layouter is
1402 different in the registered font, make a new copy of realized
1404 (mfont__get_metric): Argument changed. Get metrics of multiple
1406 (mfont_find): Call mfont__select with layouter as Mnil.
1408 * font-flt.c (FontLayoutContext): New member rfont.
1409 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1410 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
1412 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
1414 (NUM_POINTS): New macro.
1415 (MPointTable): New type.
1416 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1417 (mfont__ft_drive_otf): New argument rfont.
1419 * fontset.c (realize_font_group): Adjusted for the changed of
1421 (check_fontset_element): This function deleted.
1423 * input-gui.c (adjust_window_and_draw): Locate a preedit window
1424 off the parent window if the preedit text is zero length.
1426 * internal-gui.h (struct MFrame): New members foreground,
1427 background, videomode, font.
1428 (struct MGlyphString): New member anti_alias.
1429 (MDrawPoint): New type.
1430 (mwin__draw_bitmap): Prototype deleted.
1431 (mwin__draw_points): Prototype added.
1433 * m17n-gui.h (MDrawControl): New member anti_alias.
1435 * m17n-gui.c (free_frame): Free frame->font.
1436 (mframe): Set the fontset of frame->face to the default fontset.
1438 * m17n-X.c (RGB_GC): New type.
1439 (enum gc_index): Renamed from enum face_gc. Member names changed.
1441 (struct MWDevice): Members foreground and background deleted. New
1442 member scratch_gc, gc_list.
1443 (DEFAULT_FONT, FALLBACK_FONT): New macros.
1444 (free_device): Free GCs in device->gc_list.
1445 (get_rgb_gc): New function.
1446 (get_gc): Renamed and argument changed from get_color.
1447 (get_gc_for_anti_alias): New function.
1448 (xfont_find_metric): Arguments changed. Get metrics of multiple
1450 (set_region): Argument changed. Caller changed.
1451 (xfont_render): Allways set a font in gc.
1452 (x_error_handler, x_io_error_handler): Define only if
1453 X_SET_ERROR_HANDLER is defined.
1454 (mwin__open_device): Create device->scratch_gc. Set members
1455 foreground, background, and videomode of frame. Call
1456 XSetErrorHandler and XSetIOErrorHandler only if
1457 X_SET_ERROR_HANDLER is defined.
1458 (struct gc_list): Deleted.
1459 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1460 (mwin__realize_face): Adjusted for the change of the format of
1461 rface->info and the charge of set_region.
1462 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1463 (mwin__draw_box): Likewise.
1464 (mwin__draw_bitmap): This function deleted.
1465 (mwin__draw_points): New function.
1466 (mwin__verify_region): Adjusted for the change of the format of
1467 rface->info and the charge of set_region.
1468 (mwin__create_window): Inherit backgound pixel from parent.
1469 (mwin__dump_gc): Adjusted for the change of the format of
1472 2004-03-16 Kenichi Handa <handa@m17n.org>
1474 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1476 * input.c (M_key_alias): New variable.
1477 (handle_key): Try M_key_alias property of a key too.
1478 (minput__init): Initialize M_key_alias. Give that property to
1479 symbols in one_char_symbol. Fix bug of initializing
1482 * draw.c (compose_glyph_string): Don't handle
1483 ignore_formatting_char here. Include formatting characters in the
1484 range processed by a FTL.
1485 (layout_glyph_string): Handle ignore_formatting_char here.
1487 2004-03-12 Kenichi Handa <handa@m17n.org>
1489 * input-gui.c (win_create_ic): Enable bidi in status control.
1491 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1493 2004-03-09 Kenichi Handa <handa@m17n.org>
1495 * input.c (load_input_method): If title is not specified, use the
1496 input method name as title.
1498 * m17n-X.c (get_color): Make it static.
1499 (xim_create_ic, xim_destroy_ic, x_error_handler)
1500 (x_io_error_handler): Likewise.
1502 2004-03-01 Kenichi Handa <handa@m17n.org>
1504 * Version 1.0 released.
1507 Copyright (C) 2003, 2004
1508 National Institute of Advanced Industrial Science and Technology (AIST)
1509 Registration Number H15PRO112
1511 This file is part of the m17n library.
1513 The m17n library is free software; you can redistribute it and/or
1514 modify it under the terms of the GNU Lesser General Public License
1515 as published by the Free Software Foundation; either version 2.1 of
1516 the License, or (at your option) any later version.
1518 The m17n library is distributed in the hope that it will be useful,
1519 but WITHOUT ANY WARRANTY; without even the implied warranty of
1520 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1521 Lesser General Public License for more details.
1523 You should have received a copy of the GNU Lesser General Public
1524 License along with the m17n library; if not, write to the Free
1525 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA