1 2004-12-27 Kenichi Handa <handa@m17n.org>
3 * Version 1.2.0 released.
5 2004-12-27 Kenichi Handa <handa@m17n.org>
7 * mtext.c (mtext_from_data): Fix documentation.
9 2004-12-25 Kenichi Handa <handa@m17n.org>
11 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
12 (M17NLIB_VERSION_NAME): Update to "1.2.".
14 2004-12-24 Kenichi Handa <handa@m17n.org>
16 * input.c (reset_ic): Set key_unhandled to 0.
18 2004-12-21 Kenichi Handa <handa@m17n.org>
20 * m17n-gui.h (mfont_from_spec): Delete extern.
22 * input-gui.c (win_callback): Handle Minput_reset.
23 (minput__win_init): Register reset_ic as a callback for
26 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
27 changed. At first, shift to the initial state.
28 (minput__init): Initialize Minput_reset. Register reset_ic as a
29 callback for Minput_reset.
30 (Minput_reset): New variable.
31 (minput_filter): Always set ic->xxx_changed to 0.
32 (minput_reset_ic): New function.
33 (integer_value): Fix typo ('>' -> '<') and calculation of length
36 * m17n-core.c (merror_code): Change type to `int'.
38 * m17n-misc.h (merror_code): Adjust type.
40 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
42 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
43 (mtext_change_prop): Delete extern.
45 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
46 to `int'. Move the documents to m17n-core.h.
48 2004-12-13 Kenichi Handa <handa@m17n.org>
50 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
51 (MTextProperty): Document it.
53 2004-12-09 Kenichi Handa <handa@m17n.org>
55 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
57 2004-12-03 Kenichi Handa <handa@m17n.org>
59 * internal.h (m17n__core_initialized, m17n__shell_initialized,
60 m17n__gui_initialized): New externs.
62 * m17n-core.h (enum M17NStatus): New enum.
63 (m17n_status): Extern it.
65 * m17n-core.c (core_initialized): Delete this variable.
66 (m17n__core_initialized, m17n__shell_initialized,
67 m17n__gui_initialized): New variables.
68 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
69 instead of core_initialized.
70 (m17n_status): New function.
72 * m17n.c (shell_initialized): Delete this variable.
73 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
76 * m17n-gui.h (m17n_init_win): Adjust the prototype.
78 * m17n-gui.c (win_initialized): Delete this variable.
79 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
80 instead of gui_initialized.
82 2004-11-19 Kenichi Handa <handa@m17n.org>
84 * input.c (reset_ic): Check if ic_info->state is NULL.
85 (filter): If ic_info->state is NULL, return 0.
86 (load_input_method): Don't unref `maps' it it's not created.
88 2004-11-15 Kenichi Handa <handa@m17n.org>
90 * input.c (find_candidates_group): If INDEX is -1, find the last
92 (take_action_list): If the previous of the first candidate is
93 requested, select the last candidate.
95 2004-11-08 Kenichi Handa <handa@m17n.org>
97 * m17n-X.c (device_open): Try at most 32 fonts to find a
100 * font.c (xlfd_parse_name): Fix previous change.
102 2004-11-05 Kenichi Handa <handa@m17n.org>
104 * font.c: (commont_style): Include dummy elements "slanted" and
105 "rslanted" to prefer "o" to "r" if "i" is requested.
107 * font-ft.c (ft_to_prop): Fix "oblique" entry.
109 2004-10-29 Kenichi Handa <handa@m17n.org>
111 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
113 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
114 New members smallest and larger.
115 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
116 (xfont_registry_list): Likewise.
117 (xfont_select): Likewise.
120 2004-10-28 Kenichi Handa <handa@m17n.org>
122 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
123 font name comparison.
124 (xfont_select): Fix logic for selecting a larger size font.
126 2004-10-25 Kenichi Handa <handa@m17n.org>
128 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
131 2004-10-22 Kenichi Handa <handa@m17n.org>
133 * input.c (update_candidate): Renamed from udpate_candidate.
134 (take_action_list): Show more debugging info on arithmetic commands.
136 * m17n-X.c (device_open): Fix previous change.
138 * draw.c (compose_glyph_string): Don't get face property at the
141 2004-10-21 Kenichi Handa <handa@m17n.org>
143 * draw.c (compose_glyph_string): Fix for the case of category
146 2004-10-19 Kenichi Handa <handa@m17n.org>
148 * input.c (mdebug_mask): New variable.
149 (shift_state): Print debug information.
150 (take_action_list): Likewise.
151 (handle_key): Likewise.
153 2004-10-14 Kenichi Handa <handa@m17n.org>
155 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
157 2004-10-13 Kenichi Handa <handa@m17n.org>
159 * m17n-X.c (device_open): Be sure to register at least one font
162 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
163 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
165 2004-10-12 Kenichi Handa <handa@m17n.org>
167 * draw.c (alloc_gstring): Fix previous change.
169 * font-ft.c (ft_list_generic): Fix for the case of not
172 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
174 * font.c (mfont_list): If no font is found, return NULL.
175 (load_font_encoding_table): Put entries of nil registry first.
176 (find_encoding): Adjust for the above change.
178 2004-10-11 Kenichi Handa <handa@m17n.org>
180 * m17n-gui.h (mfont_list): Adjust prototype.
182 * m17n-X.c (xfont_list): New arg maxnum.
184 * font.h (struct MFontDriver): Change prototype of <list>.
186 * font-ft.c (fc_generic_family_list): Delete it.
187 (Mserif, Msans_serif, Mmonospace): Delete them.
188 (M_generic_family_info): New variable.
189 (enum GenericFamilyType): New enum.
190 (struct GenericFamilyInfo): New struct.
191 (generic_family_table): New variable.
192 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
194 (add_font_info): Get style here.
195 (ft_list_family): Don't initialize fc_config here. Don't list
197 (ft_list_generic): New function.
198 (ft_select): Pay attention to generic familes here.
199 (ft_open): Fix calculation of ascent and descent.
200 (ft_list): Pay attention to generic families.
201 (mfont__ft_init): Initialize M_generic_family_info,
202 generic_family_table, and fc_config..
203 (mfont__ft_fini): Finalize generic_family_table.
205 * draw.c (compose_glyph_string): Use more constant font for
206 glyphs. Adjust for the member change in MGlyph.
207 (layout_glyph_string): Adjust for the member change in MGlyph.
208 (alloc_gstring): Intilize scracth_glyph to avoid
209 compose_glyph_string on it.
210 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
211 (mdraw_coordinates_position): Fix previous change.
213 * internal-gui.h (glyph_category): New enum.
214 (MGlyph): Change type of <category> to enum glyph_category.
216 * face.c (mface__realize): Delete args langauge and charset.
217 (mface__for_chars): Fix for the case that glyphs have different
219 (mface__update_frame_face): Adjust for mface__realize change.
221 * face.h (mface__realize): Adjust prototype.
223 2004-10-05 Kenichi Handa <handa@m17n.org>
225 * language.c (mlang__init): Add Akan.
227 2004-10-04 Kenichi Handa <handa@m17n.org>
229 * font-ft.c (add_font_info): Add instead of push the element.
230 (ft_list_family): For generic fonts, try all
231 substituted. families.
233 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
234 (run_rule): Don't update cluster range here.
235 (run_command): Update cluster range on appending a glyph.
236 (run_otf): Update cluster range for glyphs generated by OTF.
238 2004-10-02 Kenichi Handa <handa@m17n.org>
240 * m17n-X.c (device_open): Handle Mfont key in PLIST.
242 2004-09-30 Kenichi Handa <handa@m17n.org>
244 * font-ft.c (ft_select): Ignore family on calling mfont__score.
246 2004-09-30 Kenichi Handa <handa@m17n.org>
248 * font.h: Include <fontconfig/fontconfig.h>.
249 (MFTInfo): New member langset.
250 (mfont__encoding_list): Extern it.
252 * font.c (mfont__encoding_list): New function.
253 (mdebug_dump_font_list): New function.
255 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
256 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
258 (ft_family_list): New variable.
259 (set_font_info): New arg basep. Callers changed.
260 (fc_list): Check the return value of FcPatternGetString.
261 (add_font_info): New arg plist. Callers changed. Update
263 (ft_list_family): New function (merged fc_list and ft_list_all).
264 (ft_select): Use ft_list_family.
265 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
267 (mfont__ft_init): Initialize above new variables.
268 (mfont__ft_fini): Free ft_family_list.
269 (STRDUP_LOWER): New macro.
270 (set_font_info): Use STRDUP_LOWER.
271 (ft_list_family): Avoid duplicate addition of font path. Use
273 (fc_decode_prop): Fix typo.
275 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
276 (xfont_registry_list): Change argument disp_info to frame.
278 (xfont_list_all): New function.
279 (xfont_list): If FONT is not NULL, check all fonts.
281 2004-09-28 Kenichi Handa <handa@m17n.org>
283 * m17n-X.c (MXFont, MXFontList): New types.
284 (MDisplayInfo): Delete members font_registry_list,
285 iso8859_1_family_list, iso10646_1_family_list, new members
286 font_list, base_font_list.
287 (free_display_info): Adusted for the change of MDisplayInfo.
288 (xfont_driver): Initialize with xfont_list.
289 (font_compare): New function.
290 (build_font_list): Deleted.
291 (xfont_registry_list): New function.
292 (xfont_select): Use xfont_registry_list.
293 (xfont_list): New function.
294 (device_open): Adusted for the change of MDisplayInfo.
296 * font-ft.c (add_font_info): New arg languages. Callers changed.
297 (fc_list): Get languages from fonts..
298 (ft_list_all): Renamed from ft_list. Callers changed.
299 (ft_list): New function.
300 (mfont__ft_driver): Initalize with ft_list.
302 * font.c (mfont_list): New function.
304 * font.h (struct MFontDriver): New member `list'.
305 (MFTInfo): New member languages.
307 * m17n-gui.h (mfont_list): Extern it.
309 2004-09-27 Kenichi Handa <handa@m17n.org>
311 * internal-gui.h (struct MGlyphString): Delete members mt,
312 sub_width, sub_lbrearing, sub_rbearing, and region.
314 * draw.c (MSubTextExtents): New type.
315 (layout_glyphs): New arg extents. Set its members.
316 (layout_glyph_string): Adjusted for the above change.
317 (alloc_gstring): Don't set gstring->mt.
318 (truncate_gstring): Call line_break function with mt instead of
321 2004-09-22 Kenichi Handa <handa@m17n.org>
323 * mtext.c (count_utf_16_chars): Count each code of invalid
326 2004-09-19 Kenichi Handa <handa@m17n.org>
328 * mtext.c (default_utf_16, default_utf_32): Rename them to
329 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
332 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
335 2004-09-13 Kenichi Handa <handa@m17n.org>
337 * draw.c (Mlatin): Don't declare it here.
338 (visual_order): Fix reordering of combining characters.
339 (compose_glyph_string): Fix detection of script.
340 (layout_glyphs): Don't fix reordering of combining characters
342 (layout_glyph_string): Pay attention to
343 control->disable_overlapping_adjustment.
344 (truncate_gstring): Include at least on character in a line.
345 (get_gstring): Always scan one full line.
346 (mdraw__init): Don't initialize Mlatin here.
347 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
348 have a font, use ascent/descent of an ASCII font. Allow
349 ink_array_return and logical_array_return to be NULL.
350 (mdraw_coordinates_position): Fix iteration.
352 * font-ft.c (MFTtoProp): Member completely changed.
353 (ft_to_prop): Adjusted for the above change.
354 (ft_to_prop_size): Likewise.
355 (set_font_info): Adjusted for the change of MFTtoProp.
356 (fc_generic_family_list): New variable.
357 (fc_list): Add special handling of generic font names.
358 (mfont__ft_init): Adjusted for the change of MFTtoProp.
359 Initialize fc_generic_family_list.
360 (mfont__ft_fini): Don't free ft_to_prop. Free
361 fc_generic_family_list.
362 (FC_vs_M17N_font_prop): New type.
363 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
364 (fc_decode_prop, fc_encode_prop): New functions.
365 (mfont__ft_parse_name): Use fc_decode_prop.
366 (mfont__ft_unparse_name): Use fc_encode_prop.
368 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
369 (MWDevice): Add member realized_font_list.
370 (free_display_info): Don't free disp_info->realized_font_list.
371 (free_device): Free device->realized_fontset_list.
372 (xft_find_metric): Use gstring->frame instead of rfont->frame.
373 (device_open): Don't initialize disp_info->realized_font_list.
374 (device_open): Initialize device->realized_font_list and set it to
375 frame->realized_font_list.
377 * fontset.c (try_font_group): New function.
378 (mfont__lookup_fontset): Use try_font_group.
380 * font.c (common_weight): Change the order of "regular".
382 * face.c (Mlatin): Don't make it static.
383 (mface__realize): Be sure to set work_gstring.frame.
384 (mface__for_chars): Likewise.
386 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
389 * internal-gui.h (Mlatin): Extern it.
391 * m17n-gui.h (MDrawControl): New member
392 disable_overlapping_adjustment.
394 2004-09-06 Kenichi Handa <handa@m17n.org>
396 * font-flt.c (run_otf): Fix typo ('}'->']').
398 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
399 (COMBINING_PRECOMPUTED_P): New macros.
401 * draw.c (layout_glyphs): Handle precomputed combining code.
403 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
404 precomupted combining code.
406 2004-09-03 Kenichi Handa <handa@m17n.org>
408 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
411 2004-08-27 Kenichi Handa <handa@m17n.org>
413 * face.c (mface_put_prop): If the new value is the same as the
414 current one, don't increment frame->tick.
416 2004-08-25 Kenichi Handa <handa@m17n.org>
418 * fontset.c (mfontset): Initialize font_spec_list member.
419 (mfontset_copy): Load fontset if necessary.
421 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
422 'metrics' to for C++.
424 * draw.c (mdraw_glyph_info): Adjusted for the member name change
427 2004-08-16 Kenichi Handa <handa@m17n.org>
429 * Version 1.1.0 released.
431 2004-08-13 Kenichi Handa <handa@m17n.org>
433 * language.c (mlang__init): Add Dhivehi.
435 * m17n-gui.c (Mx, Mfreetype): Delete it.
436 (m17n_init_win): Don't initialize Mx and Mfreetype here.
438 * m17n-gui.h (Mfreetype, Mxft): Extern them.
439 (mfont_resize_ratio): Extern it.
440 (MDrawGlyphInfo): New member logical_width;
441 (MDrawGlyph): New type.
442 (mdraw_glyph_list): Prototype adjusted.
444 * m17n-X.c (xfont_open): Set type and fontp members.
445 (xft_open): Likewise.
447 * internal-gui.h (Mx, Mfreetype): Delete extern.
449 * font.h (struct MRealizedFont): New member type and fontp.
451 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
452 (Mx, Mfreetype): Declare here.
453 (Mxft): New variable.
454 (mfont_resize_ratio): New function.
456 * font-ft.c (ft_open): Set type and fontp members.
458 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
461 2004-08-11 Kenichi Handa <handa@m17n.org>
463 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
466 2004-08-06 Kenichi Handa <handa@m17n.org>
468 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
471 * font-flt.c (run_otf): Print debugging information if necessary.
473 2004-08-05 Kenichi Handa <handa@m17n.org>
475 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
476 positioning_type 5 and 6. Switch simplified.
478 2004-08-04 Kenichi Handa <handa@m17n.org>
480 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
482 2004-08-02 Kenichi Handa <handa@m17n.org>
484 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
485 set val to 1 even if it is greater than 1.
487 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
489 2004-07-29 Kenichi Handa <handa@m17n.org>
491 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
492 debugging information.
494 * internal.h (MDEBUG_PRINT5): New macro.
496 * draw.c (layout_glyphs): Don't combine a zero width glyph with
497 the previous one if the zero width glyph has left or right
500 2004-07-26 Kenichi Handa <handa@m17n.org>
502 * m17n-X.c (xft_render): Pay attention to members left_padding and
503 right_padding of MGlyph.
505 * draw.c (visual_order): Allocate one more elements for arrays as
506 a workaround of fribidi bug.
507 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
508 instead of MGlyph->bidi_sensitive.
509 (layout_glyph_string): Pay attentinon to
510 control->orientation_reversed when padding at the head or tail.
511 Fix adjustment of space glyph width.
512 (get_gstring): If cursor_width or cursor_bidi is changed, don't
515 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
516 instead of MGlyph->bidi_sensitive.
518 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
520 2004-07-26 Kenichi Handa <handa@m17n.org>
522 * draw.c (visual_order): Don't treat combined glyphs specially.
523 (layout_glyphs): Don't get metrics glyphs that are already ready.
524 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
525 width with the previous one.
526 (draw_background): Fix bar cursor position on a r2l glyph.
528 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
529 (run_rule): Fix place of updating cluster_begin_pos and
530 cluster_end_pos here.
531 (run_otf): Don't set left_padding.
533 * font-ft.c (adjust_anchor): Type of argument `code' changed.
535 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
536 Fix handling of GPOS.
537 (mfont__ft_drive_gpos): Delete this function.
539 * font.h (mfont__ft_drive_otf): Renamed back from
540 mfont__ft_drive_gsub.
541 (mfont__ft_drive_gpos): Delete extern.
543 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
544 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
546 2004-07-23 Kenichi Handa <handa@m17n.org>
548 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
551 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
553 2004-07-22 Kenichi Handa <handa@m17n.org>
555 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
557 2004-07-20 Kenichi Handa <handa@m17n.org>
559 * draw.c (render_glyphs): Fix checking of g->code validity.
561 * face.c (mface__realize): Set g.type.
563 2004-07-18 Kenichi Handa <handa@m17n.org>
565 * Makefile.am: Prepend ${top_srcdir} to all *.la in
568 * m17n-gui.c (mframe): Print error message give by dlopen to
571 2004-07-16 Kenichi Handa <handa@m17n.org>
573 * draw.c (compose_glyph_string): Improve the way of deciding a
574 script. For a character that doesn't have script property, use
575 the last non-latin script.
577 * font-ft.c (fc_list): Cancel previous change.
578 (mfont__ft_init): Add more entries in ft_to_prop_name.
580 2004-07-15 Kenichi Handa <handa@m17n.org>
582 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
583 previous or next character glyphs.
585 2004-07-14 Kenichi Handa <handa@m17n.org>
587 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
590 * fontset.c (mfont__lookup_fontset): If glyph type is
591 GLYPH_SPACE, get codes for SPACE.
593 * internal-gui.h (Mfont): Delete extern.
595 * m17n-gui.h (Mfont): Delete duplicated extern.
597 2004-07-13 Kenichi Handa <handa@m17n.org>
599 * font-ft.c (DEVICE_DELTA): New macro.
600 (adjust_anchor): New function.
601 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
603 (mfont__ft_drive_gpos): New function.
605 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
606 (FontLayoutContext): Delete member `rfont'.
607 (run_otf): Set g->otf_cmd. Call
608 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
609 only whne HAVE_OTF is defined.
611 * fontset.c: Include "config.h".
613 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
614 (MGlyph): New member otf_cmd.
616 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
617 (mfont__ft_drive_gpos): Extern it.
619 * face.c: Include "config.h".
621 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
623 * input-gui.c: Include "config.h".
625 * plist.c: Include "config.h".
627 2004-07-06 Kenichi Handa <handa@m17n.org>
629 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
630 internal-gui.h: Cancel previous changes.
632 * m17n-gd.h: Delete it.
634 * Makefile.am (libm17n_core_la_LIBADD): New variable.
635 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
636 @XML2_LD_FLAGS@ to above.
637 (libm17n_la_LIBADD): Add -ldl.
638 (libm17n_la_LDFLAGS): Add -export-dynamic.
639 (X_LD_FLAGS): Fix the order of linking.
640 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
641 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
642 (libm17n_X_la_LDFLAGS): Add -module.
643 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
644 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
645 (libm17n_gd_la_LDFLAGS): Add -module.
646 (include_HEADERS): Delete m17n-gd.h.
648 2004-06-30 Kenichi Handa <handa@m17n.org>
650 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
651 (MDeviceLibraryInterface): Delete it.
652 (register_device_library): Delete it.
653 (m17n__device_library_list): Renamed from device_library_list.
655 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
656 (m17n_init_win): Adjust prototype.
658 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
659 (m17n_init_gd): New function.
661 * m17n-gd.h: New file.
663 * m17n-X.h: Include <m17n-gui.h>.
664 (m17n_init_X): Extern it.
665 (M17N_INIT): Redefine it.
667 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
668 (m17n_init_X): New function.
670 * internal-gui.h (m17n__device_library_list): Extern it.
671 (struct MDeviceDriver): New members initialized, init, and fini.
673 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
675 (libm17n_X_la_LIBADD): Delete aboves.
676 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
677 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
678 (libm17n_gd_la_LDFLAGS): Delete it.
679 (include_HEADERS): Add m17n-gd.h.
681 2004-06-25 Kenichi Handa <handa@m17n.org>
683 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
684 (libm17n_gd_la_LDFLAGS): Cancel previous change.
686 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
688 * font-ft.c (fc_list): If FcFontList finds no font, try
691 * draw.c (compose_glyph_string): Terminate the last loop after
692 doing default combining if necessary.
694 2004-06-24 Kenichi Handa <handa@m17n.org>
696 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
698 * character.c (mchar_define_property): Add const to an arg.
700 * charset.c (mchar_define_charset): Add const to an arg.
702 * coding.c (MCodingSystem): Add const to an arg or decoder.
703 (finish_decoding): Add const to an arg.
704 (decode_coding_charset, decode_coding_utf_8)
705 (decode_coding_utf_16, decode_coding_utf_32)
706 (decode_coding_iso_2022, decode_coding_sjis)
707 (mconv_define_coding): Likewise.
709 * m17n-X.c (xft_find_metric): Delete unused variable.
711 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
714 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
717 * mtext.c (count_utf_8_chars, count_utf_16_chars)
718 (mtext__from_data, mtext_from_data): Add `const' to an arg.
720 * mtext.h (mtext__from_data): Ajust prototype.
722 2004-06-23 Kenichi Handa <handa@m17n.org>
724 * draw.c (compose_glyph_string): Always get glyph codes by
726 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
727 (mdraw_glyph_list): New function.
729 * font-flt.c (mfont__flt_run): Be sure to call
730 rfont->driver->encode_char.
732 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
733 (ft_encode_char): Delete arg C.
734 (ft_render): Don't call FT_Get_Char_Index.
736 * font.c (mfont__encodable_p): Delete it.
737 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
739 * font.h (struct MFontDriver): Delete arg C of encode_char.
740 (mfont__encodable_p): Delete extern.
742 * m17n-X.c (xfont_encode_char): Delete arg C.
743 (xft_find_metric): Don't cal FT_Get_Char_Index.
744 (xft_render): Likewise.
746 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
748 (mdraw_glyph_list): Extern it.
750 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
752 2004-06-22 Kenichi Handa <handa@m17n.org>
754 * m17n-gui.h (mfontset_lookup): Extern it.
756 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
758 * fontset.c (realize_fontset_elements)
759 (free_realized_fontset_elements, update_fontset_elements): New
761 (mfont__realize_fontset): Call realize_fontset_elements.
762 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
763 (mfont__lookup_fontset): If a fontset was modified, update
764 the realized fontset.
765 (mfontset_modify_entry): Increment fontset->tick.
766 (mfontset_lookup): New function.
768 2004-06-21 Kenichi Handa <handa@m17n.org>
770 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
772 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
773 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
774 length of source text 0.
776 2004-06-21 Kenichi Handa <handa@m17n.org>
778 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
779 (compare): Pay attention to format other than utf-8.
780 (copy): Delete this function.
781 (count_by_utf_8, count_by_utf_16, insert): New functions.
782 (count_utf_16_chars): Fix handling of a surrogate pair.
783 (find_char_forward, find_char_backward): Likewise.
784 (mtext__from_data): Delete unnecessary check. Fix number of
786 (mtext_from_data): Don't count items.
787 (mtext_ref_char): Optimize the code.
788 (mtext_set_char): Pay attention to format other than utf-8.
789 (mtext_cat_char): Likewise.
790 (mtext_dup): Don't call copy, instead do allocation here.
791 (mtext_cat): Call insert instead of copy.
792 (mtext_ncat): Likewise.
793 (mtext_cpy): Delete character at first and call insert instead of
795 (mtext_ncpy): Likewise.
796 (mtext_copy): Likewise.
797 (mtext_duplicate): Call insert instead of copy.
798 (mtext_del): Pay attention to format other than utf-8.
799 (mtext_ins): Simply call insert.
800 (mtext_ins_char): Pay attention to format other than utf-8.
801 (mtext_tok): Call insert instead of copy.
802 (mtext_text): Call UNIT_BYTES.
804 * textprop.c (mtext__adjust_plist_for_change): New function.
806 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
807 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
808 (CHAR_UNITS_AT): Fix typo.
809 (CHAR_UNITS_BY_HEAD): Fix typo.
810 (STRING_CHAR_AND_UNITS): Fix typo.
812 * internal.h (MTEXT_READ_ONLY_P): New macro.
814 * mtext.h (mtext__replace): Delete the extern.
815 (mtext__adjust_foramt): Adjust prototype.
817 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
818 if possible. Otherwise make a copy of mmt.
820 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
823 2004-06-18 Kenichi Handa <handa@m17n.org>
825 * character.h (CHAR_STRING_UTF16): Fix syntax.
827 2004-06-16 Kenichi Handa <handa@m17n.org>
829 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
830 (libm17n_X_la_LIBADD): Delete it.
831 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
833 * m17n-X.c (device_open): Add parens in `if' condition.
835 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
836 (DEC_POSITION): Likewise.
837 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
839 2004-06-15 Kenichi Handa <handa@m17n.org>
841 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
844 * draw.c (compose_glyph_string): If langauge is specified, call
845 mface__for_chars even if a text is all latin. Fix condition for
846 setting non_ascii_found.
848 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
850 * m17n.h (minput_char_to_key): Delete extern.
852 * m17n-gui.h (minput_event_to_key): Cancel previous change.
854 * m17n-gui.c (null_device_open): Set several members of frame.
856 2004-06-14 Kenichi Handa <handa@m17n.org>
858 * m17n-gui.h (minput_event_to_key): Delete extern.
860 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
862 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
864 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
866 2004-06-08 Kenichi Handa <handa@m17n.org>
868 * character.c (mchar_put_prop): Don't increment the ref-count of
871 2004-06-04 Kenichi Handa <handa@m17n.org>
873 * m17n-core.c (mdebug__register_object): New function.
874 (mdebug__unregister_object): Likewise.
876 * internal.h (mdebug__register_object, mdebug__unregister_object):
878 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
881 * charset.c (mcharset__load_from_database): Don't call
882 mconv__register_charset_coding here.
884 * coding.c (find_coding): Get a real name from an element of
885 coding_definition_list.
886 (mconv__register_charset_coding): Set the real name at the top of
888 (mcoding__load_from_database): Likewise.
889 (mconv_list_codings): Adjusted for the above change.
891 2004-06-03 Kenichi Handa <handa@m17n.org>
893 * coding.c (find_coding): Find by canonicalized name. Don't have
894 to modify the element of coding_definition_list by
896 (mconv__define_coding_from_charset): Delete it.
897 (mconv__register_charset_coding): Canonicalize sym.
898 (mcoding__load_from_database): Register plist modified by
901 * coding.h (mconv__define_coding_from_charset): Don't extern it.
903 * font-ft.c (ft_open): Fix setting of rfont->descent.
905 2004-06-02 Kenichi Handa <handa@m17n.org>
907 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
908 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
909 (xlfd_unparse_name): Renamed from xfont_build_name.
910 (mfont__init): Initialized Mfontconfig.
911 (mfont__free_realized): Unconditionally unref rfont->info.
912 (mfont__select): Free `this' if it's not best.
913 (mfont__open): Don't check frame->realized_font_list.
914 (mfont__parse_name_into_font): New function.
915 (Mfontconfig): New variable.
916 (mfont_from_name): Call mfont_parse_name.
917 (mfont_name): Call mfont_unparse_name.
918 (mdebug_dump_font): Likewise.
920 * font.h (struct MFontDriver): Delete members parse_name and
922 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
923 (mfont__parse_name_into_font): Extern it.
925 * font-ft.c: Include "symbol.h".
926 (close_ft): Unconditionally free filename and charmap_list of
928 (ft_open): Duplicate base->filename. Increment ref-count of
929 ft_info->charmap_list. Free ft_info->charmap_list and
930 ft_info->filename on error.
931 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
933 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
935 (enum xlfd_field_idx): Moved to font.c.
936 (split_font_name, build_font_name): Likewise.
937 (build_font_list): Call mfont__parse_name_info_font.
938 (xfont_open): Call mfont__unparse_name. Free name.
939 (xfont_parse_name, xfont_build_name): Moved to font.c
940 (xft_select): Prototype deleted.
941 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
942 Call mfont_pase_name.
944 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
945 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
948 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
951 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
953 2004-06-01 Kenichi Handa <handa@m17n.org>
955 * fontset.c (mfontset_modify_entry): Pay attention to the case
956 that fontset->font_spec_list is NULL.
958 2004-05-31 Kenichi Handa <handa@m17n.org>
960 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
962 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
964 * font.c (mfont__select): Print score the a font for debugging.
966 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
968 * coding.c (reset_coding_sjis): Check kanji and kana instead of
969 kanji_sym and kana_sym.
971 2004-05-28 Kenichi Handa <handa@m17n.org>
973 * Makefile.am (VINFO): New variable.
974 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
975 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
977 2004-05-27 Kenichi Handa <handa@m17n.org>
979 The following chanages are to make device dependent functions
980 accessible only from MDeviceDriver structure, and to add GD and
981 null device drivers. Font drivers get also device dependent.
983 * m17n.c (m17n_init): Increament shell_initialized.
984 (m17n_fini): Decremented shell_initialized.
986 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
988 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
989 (Mwidget, Mcolormap, Mx): Extern them.
991 * m17n-gui.c: Include <dlfcn.h> and "config.h".
992 (free_frame): Call frame->driver->close instead of
994 (DLOPEN_SHLIB_EXT): New macro.
995 (MDeviceLibraryInterface): New type.
996 (device_library_list): New variable.
997 (register_device_library): New function.
998 (null_device): New variable.
999 (null_device_close, null_device_get_prop)
1000 (null_device_realize_face, null_device_free_realized_face): New
1002 (null_driver): New variable.
1003 (null_device_init, null_device_fini, null_device_open): New
1005 (null_interface): New variable.
1006 (Mfreetype, Mdevice): Declare them.
1007 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
1008 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
1009 Mwin__Close_Device. Register drivers for Mx and Mgd.
1010 (m17n_fini_win): Decremented win_initialized. Call "fini"
1011 function of all opened devices. Don't call mwin__fini.
1012 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
1014 (mframe): Handle Mdevice key of PLIST.
1015 (mframe_get_prop): Call frame->device->get_prop instead of
1016 mwin__device_get_prop.
1018 * m17n-gd.c: New file.
1020 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
1021 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
1023 * m17n-core.c (m17n_init_core): Increate core_initialized.
1024 (m17n_fini_core): Decremented core_initialized.
1026 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
1027 (Mcolormap): Don't extern them here.
1029 * m17n-X.c (FRAME_DEVICE): New macro.
1030 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
1031 (free_display_info): Use MPLIST_DO.
1032 (free_device): Free rface->info.
1033 (xft_close): Delete it.
1034 (device_init): Renamed from mwin__init.
1035 (device_fini): Renamed from mwin__fini.
1036 (device_open): Renamed from mwin__open_device.
1037 (x_driver): New variable.
1038 (MXFontInfo): Delete member frame, add member display.
1039 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
1040 Don't declare them here.
1042 * internal-gui.h (MDeviceType): New enum.
1043 (MWDefice): Delete it.
1044 (struct MFrame): Change type of device to void *. New members
1045 device_type, driver, font_driver_list.
1046 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
1047 (MDeviceDriver): New type.
1048 (Mx, Mgd, Mfreetype): Extern them.
1049 (mwin__XXX): Delete all of them.
1051 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
1053 (win_destroy_ic): Likewise.
1054 (adjust_window_and_draw): Likewise.
1055 (win_callback): Likewise.
1056 (Mxim): Declare it here.
1057 (minput_event_to_key): Call M_CHECK_READABLE.
1059 * fontset.c (mfont__lookup_fontset): Delete local variable
1062 * font.h (struct MFontDriver): Delete member close, add members
1063 parse_name and build_name.
1064 (mfont__driver_list): Delete extern.
1065 (mfont__close): Delete extern.
1067 * font.c (mfont__init): Don't set mfont__driver_list.
1068 (mfont__fini): Don't unref mfont__driver_list.
1069 (mfont__select): Try font drivers in frame->font_driver_list. Set
1070 driver member of a realized font.
1071 (mfont__close): Delete it.
1072 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
1073 functions of the default frame.
1075 * font-ft.c (close_ft): Check ft_info->ft_face and work
1077 (add_font_info): Allocate ft_info by M17N_OBJECT.
1078 (ft_close): Delete it.
1079 (mfont__ft_driver): Don't set ft_close.
1080 (ft_select): Increment ref-count of best_font.
1081 (ft_open): Decremented ref-count of base. On error, call
1082 FT_Done_Face and free ft_info.
1083 (ft_find_metric): Always use XXX_MONO in load_flags.
1084 (ft_render): Fix setting of width. Call
1085 frame->driver->draw_points instead of mwin__draw_points.
1086 (ft_to_prop): Don't set mfont__driver_list.
1087 (mfont__ft_fini): Just unref ft_info.
1089 * face.c (mface__init): Exchange foreground and background of
1090 mface__default. Call mface_put_prop to set hline of
1092 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
1093 (mface__free_realized): Don't call mwin__free_realized_face.
1095 * draw.c (Mdepth): Don't declare it here.
1096 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
1097 (render_glyphs, render_glyph_string): Likewise.
1098 (mdraw__init): Don't set Mdepth.
1099 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
1101 (mdraw_text_per_char_extents): Return 0 on success and -1 on
1103 (mdraw_text_items): Check FRAME is writable.
1104 (mdraw_per_char_extents): Implement body.
1106 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
1108 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
1109 (GUI_SOURCES): Delete it.
1110 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
1111 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
1112 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
1113 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
1114 (linkgui_LDADD): Set to libm17n-gui.la
1115 (linkgui_LDFLAGS): New target.
1116 (SRC): Include ${libm17n_gui_la_SOURCES} and
1117 ${libm17n_gd_la_SOURCES}.
1119 2004-05-24 Kenichi Handa <handa@m17n.org>
1121 * draw.c (draw_background): Don't draw background even if
1122 rface->face.property[MFACE_BACKGROUND] is not Mnil.
1124 2004-05-22 Kenichi Handa <handa@m17n.org>
1126 * m17n-X.c (xft_open_font): Fix anti_alias setting.
1128 2004-05-20 Kenichi Handa <handa@m17n.org>
1130 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
1132 * m17n-gui.c: Include "plist.h".
1133 (mframe): If PLIST is NULL, initialize it to emply plist.
1135 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
1136 (xft_driver): New variable.
1137 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
1138 (xft_find_metric, xft_render): New function.
1139 (mwin__init): Adjusted for the new mfont__driver_list.
1140 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
1141 generated face to PARAM.
1142 (mwin__realize_face): Fix setting of box colors. Don't call hook
1144 (mwin__draw_hline): New function.
1145 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
1146 (mwin__xft_render): Delete these function.
1148 * internal-gui.h (struct MFrame): New member tick.
1149 (struct MGlyphString): New member tick.
1150 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
1151 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
1152 (mwin__xft_render): Delete extern.
1154 * fontset.c (mfont__lookup_fontset): Make the code simpler.
1155 (mfontset): Always increment the reference count of returned
1158 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
1159 (MFTInfo): Moved to font.h.
1160 (ft_iso8859_1_font_list): Delete this variable.
1161 (set_font_info): Don't set font->property[MFONT_TYPE].
1162 (set_font_info): Don't udpate ft_iso8859_1_font_list.
1163 (add_font_info): Change type to void.
1164 (fc_list): Change anme from xft_list. Caller changed. Include
1165 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1166 (mfont__ft_driver): Change name from ft_driver. Caller changed.
1167 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1168 (close_ft): Don't call mwin__xft_close. Unref
1169 ft_info->extra_info.
1170 (ft_open): Don't setup ft_info->fontname. Don't call
1172 (ft_find_metric): Don't call mwin__xft_get_metric.
1173 (ft_encode_char): Call rfont->driver->open instead of ft_open.
1174 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
1175 (mfont__ft_init): Adjusted for new mfont__driver_list.
1176 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1178 * font.c (mfont__driver_list): Make it MPlist.
1179 (mfont__init): Adjust initialization of mfont__driver_list.
1180 (mfont__fini): Free mfont__driver_list.
1181 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1182 (mfont__select): Adjusted for the new mfont__driver_list.
1184 * font.h (enum MFontProperty): Delete MFONT_TYPE.
1185 (mfont__drirver_list): Adjust prototype.
1186 (MFTInfo): Move to here from fron.c. Deleve member fontname.
1188 * face.h (struct MFace): Delete member realized_face_list, add
1190 (struct MRealizedFace): Delete member need_update
1191 andnofont_rface, add member non_ascii_list.
1192 (mface__update_frame_face): Extern it.
1194 * face.c (hline_prop_list, box_prop_list, noop_hook): New
1196 (get_hline_create, get_box_create): New functions.
1197 (find_realized_face): Cancel previous change. Arg RFONT deleted.
1199 (free_face): Cancep previous change. Free face->frame_list.
1200 (serialize_hline): Do nothing if hline->width is zero.
1201 (serialize_box): Do nothing if box->width is zero.
1202 (mface__init): Setup all properties of mface__default.
1203 (mface__fini): Free hline_prop_list and box_prop_list.
1204 (mface__realize): Cancel previous change. Update
1205 face->frame_list. Setup rface->non_ascii_list.
1206 (mface__for_chars): Update rface->non_ascii_list.
1207 (mface__free_realized): Free rface->non_ascii_list.
1208 (mface__update_frame_face): New function.
1209 (mface): Initialize face->frame_list.
1210 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
1212 (mface_merge): Likewise.
1213 (mface_put_prop): If key is Mhline or Mbox, get value by
1214 get_hline_create or get_box_create respectively.
1215 (mface_put_prop): Update frame->tick and call
1216 mface__update_frame_face if necessary.
1217 (mface_update): Do nothing if func is noop_hook.
1219 * draw.c (render_glyphs): If a font is not found, use
1220 mwin__draw_empty_boxes.
1221 (alloc_gstring): Initialize gstring->tick.
1222 (get_gstring): Check gstring->tick.
1224 2004-05-17 Kenichi Handa <handa@m17n.org>
1226 * face.c (find_realized_face): Return value changed. If RFONT is
1227 NULL, avoid unnecessary checking.
1228 (free_face): Free face->realized_face_list.
1229 (mface__realize): Adjusted for the change of find_realized_face.
1230 If it returns a realized face that needs update, free it and
1231 realize a new one. Push a new realized face to
1232 frame->realized_face_list instead of appending.
1233 (mface__for_chars): Adjusted for the change of find_realized_face.
1234 Short cut if the required font is in rface->ascii_rface.
1235 (mface_put_prop): Free old value if necessary. Set need_update
1236 member of realized faces to 1.
1238 * face.h (struct MFace): Delete member tick, add member
1240 (struct MRealizedFace): Delete member tick, add member
1243 2004-05-13 Kenichi Handa <handa@m17n.org>
1245 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1247 2004-05-12 Kenichi Handa <handa@m17n.org>
1249 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1251 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1252 parse it XftNameParse.
1254 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1255 (all_fonts_scaned): New variable.
1256 (set_font_info): FAMILY may be Mnil.
1257 (add_font_info): Argument changed.
1258 (xft_list): Call add_font_info in it.
1259 (ft_list): Likewise.
1260 (ft_select): Make it work in the case family is Mnil.
1261 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1262 (mfont__ft_fini): Set all_fonts_scaned to 0.
1264 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1265 that is failed to open.
1267 2004-05-10 Kenichi Handa <handa@m17n.org>
1269 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1270 device's depth is 1 (i.e. monochrome).
1272 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1273 to work around the problem of libtool.
1275 * font-ft.c: Include <freetype/ftbdf.h>.
1276 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1278 (mfont__ft_init): Initialize them.
1279 (ft_iso8859_1_font_list): New variable.
1280 (set_font_info): Detect a font containing iso8859-1 glyphs and
1281 register it in ft_iso8859_1_font_list. If the font is not
1282 scalable, assume it as BDF or PCF font and setup SIZE and RESY
1283 properties of the font from its properties.
1284 (add_font_list): If the font is not scalable, check if it is BDF
1285 or PCF font. If not, ignore it.
1286 (ft_select): If FAMILY is Mnil, return NULL only if the requested
1287 registry is not iso8859-1.
1288 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1289 ft_iso8859_1_font_list.
1290 (ft_find_metric): If the font is not scalable, assume it as BDF
1291 or PCF, and get a metric from its properties.
1292 (mfont__ft_fini): Free ft_iso8859_1_font_list.
1294 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
1296 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1297 (libm17n_la_LDFLAGS): Delete it.
1298 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1299 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1301 2004-05-06 Kenichi Handa <handa@m17n.org>
1303 * draw.c (compose_glyph_string): Fix previous change.
1305 2004-04-30 Kenichi Handa <handa@m17n.org>
1307 * font-ft.c (ft_list): Delete unused variable `result'.
1308 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1310 2004-04-27 Kenichi Handa <handa@m17n.org>
1312 * m17n-X.c: Include config.h
1313 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1314 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1315 (MWDevice) [HAVE_XFT2]: New member xft_draw.
1316 (FRAME_CMAP, FRAME_VISUAL): New macros.
1317 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1318 (xfont_driver): Make it static.
1319 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1320 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1321 info->xft_color_back.
1322 (MXftFontInfo) [HAVE_XFT2]: New type.
1323 (mwin__xft_close) [HAVE_XFT2]: New function.
1324 (mwin__xft_open) [HAVE_XFT2]: New function.
1325 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1326 (mwin__xft_render) [HAVE_XFT2]: New function.
1328 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1329 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1330 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1333 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1335 * font-ft.c: Don't include FT_FREETYPE_H here.
1336 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1337 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1338 (MFTInfo): New member charmap_index.
1339 (MFTInfo) [HAVE_XFT2]: New member xft_info.
1340 (check_otf_filename): Renamed from check_filename. Return value
1342 (ft_set_property): This function deleted.
1343 (set_font_info): New function.
1344 (add_font_list): Argument changed. Add multiple fonts.
1345 (xft_list) [HAVE_XFT2]: New function.
1346 (ft_list) [not HAVE_XFT2]: New function.
1347 (ft_select): Add code for Xft.
1348 (close_ft): Likewise.
1349 (ft_open): Likewise.
1350 (ft_find_metric): Likewise.
1351 (ft_encode_char): Likewise.
1352 (ft_render): Likewise.
1354 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1356 2004-04-26 Kenichi Handa <handa@m17n.org>
1358 * textprop.c (mtext_attach_property): Declare the return type as
1361 2004-04-21 Kenichi Handa <handa@m17n.org>
1363 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1365 2004-04-09 Kenichi Handa <handa@m17n.org>
1367 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1369 (load_command): Setup above members.
1371 2004-04-05 Kenichi Handa <handa@m17n.org>
1373 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1375 2004-03-30 Kenichi Handa <handa@m17n.org>
1377 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1380 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1381 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1383 2004-03-29 Kenichi Handa <handa@m17n.org>
1385 * Version 1.0 Patch Level 2 released.
1387 2004-03-29 Kenichi Handa <handa@m17n.org>
1389 * charset.c (make_charset): Set charset->fully_loaded and
1390 charset->simple correctly. Don't try to get charset->min_char and
1391 charset->max_char for a charset of method subset and superset.
1392 Don't load a mapping file here.
1393 (mcharset__init): Set unified_max.
1394 (mcharset__load_from_database): Free a working plist.
1396 * coding.c (mcoding__fini): Free all malloced data.
1398 * input-gui.c (win_create_ic): Set control.as_image for preediting
1401 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1402 `count') to initialize the array.
1404 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1407 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1409 (mwin__create_window): Fix bug of setting a background pixel of a
1411 (mwin__adjust_window): Clear the window before drawing.
1413 * m17n-core.c (mdebug__report_object): Free array->objectes if
1415 (m17n_init_core): Don't set report_header_printed to 0 here.
1416 Fix debugging information.
1417 (m17n_fini_core): Set report_header_printed to 0 here.
1419 * m17n-core.h (mplist_deserialize): Extern it.
1421 * m17n-gui.c (m17n_fini_win): Fix debugging information.
1423 * m17n.c (m17n_fini): Fix debugging information.
1425 * mtext.c (mtext__adjust_foramt): New function.
1427 * mtext.h (mtext__adjust_foramt): Extern it.
1429 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1431 * plist.h (mplist__deserialize): Don't extern it.
1433 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
1434 elements of symbol_table to NULL. Report about created and freed
1435 symbols if MDEBUG_FINI is set.
1437 2004-03-22 Kenichi Handa <handa@m17n.org>
1439 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1441 * m17n.c (m17n_init): Fix the way of checking merror_code.
1443 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1445 2004-03-22 Kenichi Handa <handa@m17n.org>
1447 * fontset.c (realize_font_group): Adjust the font size by
1448 mfont__resize before selecting a font.
1450 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1452 2004-03-19 Kenichi Handa <handa@m17n.org>
1454 * Version 1.0 Patch Level 1 released.
1456 2004-03-19 Kenichi Handa <handa@m17n.org>
1458 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1460 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1462 2004-03-19 Kenichi Handa <handa@m17n.org>
1464 Re-apply the changes forgotten in the released version.
1466 * charset.c (mcharset__load_from_database): Call
1467 mchar_define_charset.
1469 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1470 (mconv_encode_range): Put Mcoding text property.
1472 2004-03-18 Kenichi Handa <handa@m17n.org>
1474 * draw.c (Mdepth): New variable.
1475 (visual_order): Delete unused local var `pos'.
1476 (compose_glyph_string): Fix for the case that gstring->glyphs is
1477 realloced. Stop generating glyphs at TO. Fix handling of
1479 (layout_glyphs): Get metrics of all glyphs in advance. Set
1480 lbearing and rbearing of base of composition glyph correctly.
1481 Handle left-overhang glyphs correctly.
1482 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
1484 (dump_combining_code): Change the defualt off_x character to ".".
1485 (mdraw__init): Initialize Mdepth.
1487 * face.c (work_gstring): New variable
1488 (mface__init): Initialize work_gstring.
1489 (mface__fini): Free work_gstring.glyphs.
1490 (mface__realize): Don't handle videomode property here. Adjusted
1491 for the change of mfont__get_metric.
1492 (mface__for_chars): Adjusted for the change of mfont__get_metric.
1494 * face.h (enum face_gc): Moved to m17n-X.c.
1496 * font.h (struct MFontDriver): Arguments of find_metric changed.
1497 (mfont__select): Prototype adjusted.
1498 (mfont__get_metric): Likewise.
1499 (mfont__ft_drive_otf): Likewise.
1500 (mfont__flt_run): Likewise.
1502 * font.c (mfont__select): New argument layouter. If layouter is
1503 different in the registered font, make a new copy of realized
1505 (mfont__get_metric): Argument changed. Get metrics of multiple
1507 (mfont_find): Call mfont__select with layouter as Mnil.
1509 * font-flt.c (FontLayoutContext): New member rfont.
1510 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1511 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
1513 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
1515 (NUM_POINTS): New macro.
1516 (MPointTable): New type.
1517 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1518 (mfont__ft_drive_otf): New argument rfont.
1520 * fontset.c (realize_font_group): Adjusted for the changed of
1522 (check_fontset_element): This function deleted.
1524 * input-gui.c (adjust_window_and_draw): Locate a preedit window
1525 off the parent window if the preedit text is zero length.
1527 * internal-gui.h (struct MFrame): New members foreground,
1528 background, videomode, font.
1529 (struct MGlyphString): New member anti_alias.
1530 (MDrawPoint): New type.
1531 (mwin__draw_bitmap): Prototype deleted.
1532 (mwin__draw_points): Prototype added.
1534 * m17n-gui.h (MDrawControl): New member anti_alias.
1536 * m17n-gui.c (free_frame): Free frame->font.
1537 (mframe): Set the fontset of frame->face to the default fontset.
1539 * m17n-X.c (RGB_GC): New type.
1540 (enum gc_index): Renamed from enum face_gc. Member names changed.
1542 (struct MWDevice): Members foreground and background deleted. New
1543 member scratch_gc, gc_list.
1544 (DEFAULT_FONT, FALLBACK_FONT): New macros.
1545 (free_device): Free GCs in device->gc_list.
1546 (get_rgb_gc): New function.
1547 (get_gc): Renamed and argument changed from get_color.
1548 (get_gc_for_anti_alias): New function.
1549 (xfont_find_metric): Arguments changed. Get metrics of multiple
1551 (set_region): Argument changed. Caller changed.
1552 (xfont_render): Allways set a font in gc.
1553 (x_error_handler, x_io_error_handler): Define only if
1554 X_SET_ERROR_HANDLER is defined.
1555 (mwin__open_device): Create device->scratch_gc. Set members
1556 foreground, background, and videomode of frame. Call
1557 XSetErrorHandler and XSetIOErrorHandler only if
1558 X_SET_ERROR_HANDLER is defined.
1559 (struct gc_list): Deleted.
1560 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1561 (mwin__realize_face): Adjusted for the change of the format of
1562 rface->info and the charge of set_region.
1563 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1564 (mwin__draw_box): Likewise.
1565 (mwin__draw_bitmap): This function deleted.
1566 (mwin__draw_points): New function.
1567 (mwin__verify_region): Adjusted for the change of the format of
1568 rface->info and the charge of set_region.
1569 (mwin__create_window): Inherit backgound pixel from parent.
1570 (mwin__dump_gc): Adjusted for the change of the format of
1573 2004-03-16 Kenichi Handa <handa@m17n.org>
1575 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1577 * input.c (M_key_alias): New variable.
1578 (handle_key): Try M_key_alias property of a key too.
1579 (minput__init): Initialize M_key_alias. Give that property to
1580 symbols in one_char_symbol. Fix bug of initializing
1583 * draw.c (compose_glyph_string): Don't handle
1584 ignore_formatting_char here. Include formatting characters in the
1585 range processed by a FTL.
1586 (layout_glyph_string): Handle ignore_formatting_char here.
1588 2004-03-12 Kenichi Handa <handa@m17n.org>
1590 * input-gui.c (win_create_ic): Enable bidi in status control.
1592 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1594 2004-03-09 Kenichi Handa <handa@m17n.org>
1596 * input.c (load_input_method): If title is not specified, use the
1597 input method name as title.
1599 * m17n-X.c (get_color): Make it static.
1600 (xim_create_ic, xim_destroy_ic, x_error_handler)
1601 (x_io_error_handler): Likewise.
1603 2004-03-01 Kenichi Handa <handa@m17n.org>
1605 * Version 1.0 released.
1608 Copyright (C) 2003, 2004
1609 National Institute of Advanced Industrial Science and Technology (AIST)
1610 Registration Number H15PRO112
1612 This file is part of the m17n library.
1614 The m17n library is free software; you can redistribute it and/or
1615 modify it under the terms of the GNU Lesser General Public License
1616 as published by the Free Software Foundation; either version 2.1 of
1617 the License, or (at your option) any later version.
1619 The m17n library is distributed in the hope that it will be useful,
1620 but WITHOUT ANY WARRANTY; without even the implied warranty of
1621 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1622 Lesser General Public License for more details.
1624 You should have received a copy of the GNU Lesser General Public
1625 License along with the m17n library; if not, write to the Free
1626 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA