1 2006-07-21 Kenichi Handa <handa@m17n.org>
3 * draw.c (mdraw_text_extents): Fix previous typo.
5 2006-07-19 Kenichi Handa <handa@m17n.org>
7 * draw.c (gstring_width): New arg lbearing.
8 (render_glyph_string): Adjusted for the change of gstring_width.
9 (mdraw_text_extents): Fix lbearing of ink and line metrics.
11 * m17n-core.h (Mlanguage): Extern it.
13 * m17n.h (Mlanguage): Extern deleted.
15 * mtext.c (mtext__init): Initialize Mlanguage.
16 (Mlanguage): Declaration moved from locale.c
18 * locale.c (mlocale__init): Don't initialize Mlanguage here.
19 (Mlanguage): Declaration moved to mtext.c.
21 * language.c (mlang__init): Don't initialize Mlanguage here.
23 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
25 2006-07-14 Kenichi Handa <handa@m17n.org>
27 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
28 (MRealizedFontFT): New member face_encapsulated.
29 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
30 (ft_gen_font): New function.
31 (ft_add_font): Use ft_gen_font.
32 (ft_list_script): Store lists in ft_script_list.
33 (ft_check_otf): New arg ft_face. Caller changed.
34 (ft_check_language): Likewise.
35 (ft_check_script): Likewise.
36 (ft_encapsulate, ft_close): New functions.
37 (mfont__ft_driver): Initialize members encapsulate and close.
38 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
40 * font.h (struct MRealizedFont): New member encapsulating.
41 (struct MFontDriver): New members encapsulate and close.
43 * font.c (mfont__match_p): If FONT is realized, check capability
44 by font drivers's check_capability method.
45 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
48 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
49 declarations of foundry and fam local vars.
50 (xft_driver): Make it static.
52 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
53 (mfont_close): Extern them.
55 * m17n-gd.c (device_open): Don't specify foundry and family of the
58 2006-07-11 Kenichi Handa <handa@m17n.org>
60 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
62 2006-07-13 Kenichi Handa <handa@m17n.org>
64 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
66 (ft_check_script): Delete unused var.
67 (ft_list_capability): Likewise.
69 * font.c (mfont__get_capability): Setup cap->otf.
70 (Motf): Make it global.
71 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
73 * font.h (MFontCapability): New member otf.
75 * language.c (mlang__fini): Delete unused vars.
77 * m17n-gui.h (Motf): Extern it.
79 * database.c (update_database_list): Delete unused vars.
81 2006-07-07 Kenichi Handa <handa@m17n.org>
83 * font-ft.c (DEVICE_DELTA): Fix typo.
85 2006-07-06 Kenichi Handa <handa@m17n.org>
87 * fontset.c (mfont__lookup_fontset): Don't ignore family and
90 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
92 * database.c: Update comments.
94 2006-07-05 Kenichi Handa <handa@m17n.org>
96 * database.c (PATH_MAX): Define it if not yet defined.
97 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
99 (get_database_filename): Use GEN_PATH.
100 (get_dir_info): Don't include the last '/' in directory name.
101 (register_database): New function.
102 (update_database_list): Use register_database. Search all
103 directories in mdatabase__dir_list for wildcard databases.
104 (mdatabase__init): Check "~/.m17n.d".
106 2006-07-03 Kenichi Handa <handa@m17n.org>
108 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
109 push reverse property.
111 * plist.c (dump_plist_element): Fix previous change.
113 2006-06-28 Kenichi Handa <handa@m17n.org>
115 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
118 * draw.c (MbidiNSM): New variable.
119 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
120 attention to bidi type NSM.
121 (mdraw__init): Initialize MbibiNSM.
123 * language.c (mscript__char_list): Fix finding a char-list element.
125 * plist.c (dump_string): Return number of printed characters.
126 (dump_plist_element): Print elements more compactly.
128 2006-06-23 Kenichi Handa <handa@m17n.org>
130 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
131 (include_HEADERS): Likewise.
133 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
135 * language.c: Update documentation.
137 2006-06-23 Kenichi Handa <handa@m17n.org>
139 * font-ft.c (struct MFontFT): Delete member lang.
140 (free_ft_info): Don't unref member lang. Destroy members langset
142 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
143 changed. Set members langset and charset.
144 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
146 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
148 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
149 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
150 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
151 characters at first. If it fails, try listing by language names.
152 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
153 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
154 change of MFontCapability.
155 (ft_list_capability): Likewise. Try listing by languages, then by
156 scripts. Check OTF at last.
157 (ft_check_script): New function.
158 (ft_select): Adjusted for the check of MFontCapability.
159 (ft_list_family_names): New function.
160 (ft_check_capability): If cap->script is not Mnil, call
162 (mfont__ft_driver): Initialize with ft_list_family_names.
164 * font.h (struct MFontDriver): New member list_fmaily_names.
165 (struct): Change member "MSymbol *lang" to "MSymbol language".
167 * font.c: Include "language.h".
168 (Motf): New variable.
169 (otf_script_list, load_otf_script_list): Delete it.
170 (find_script_from_otf_tag): Delete it.
171 (merge_capability): New function.
172 (mfont__init): Init Motf.
173 (mfont__fini): Don't unref otf_script_list.
174 (free_font_capability): Check cap->script_tag to determine if
175 OTF-related capability is set.
176 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
177 the change of type MFontCapability.
178 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
180 (mfont_list): Call merge_capability for LANGUAGE arg.
181 (mfont_list_family_names): New function.
183 * input-gui.c: Typo in comments fixed.
185 * input.c: Typo in comments fixed.
187 * language.h (mlanguage__list): Delete it.
188 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
191 * language.c: Include "mtext.h".
192 (M_script_lang_list): Delete it.
193 (language_list, script_list): New variables.
194 (load_lang_script_list, init_language_list, init_script_list): New
196 (mlang__init): Don't load language database here.
197 (mlang__fini): Unref language_list and script_list if not NULL.
198 (mlanguage__list): Delete it.
199 (mlanguage__info, mscript__info, mscript__char_list)
200 (mscript__otf_tag, mscript__from_otf_tag): New functions.
201 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
202 (mscript_list, mscript_language_list): New functions.
204 * m17n-gui.h (mfont_list_family_names): Extern it.
206 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
207 (mlanguage_text, mscript_list, mscript_language_list): Extern
210 2006-06-21 Kenichi Handa <handa@m17n.org>
212 * m17n-X.c (xfont_driver): Initialize with
213 xfont_list_family_names.
214 (xfont_list_family_names): New function.
215 (xft_driver): Initialize with NULL for list_family_names member.
216 (device_init): Set list_family_names member of xft_driver to that
219 2006-06-06 Kenichi Handa <handa@m17n.org>
221 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
223 2006-03-24 Kenichi Handa <handa@m17n.org>
225 * font-ft.c (ft_open): Improve debug message.
227 * fontset.c (mfontset__get_font): Fix for the case that no font in
228 per_script list is available.
230 2006-02-06 Kenichi Handa <handa@m17n.org>
232 * Version 1.3.3 released.
234 2006-02-22 Kenichi Handa <handa@m17n.org>
236 * textprop.c: Fix some typos in documentation.
238 * plist.c: Fix some typos in documentation.
240 * m17n-core.h: Fix some typos in documentation.
241 (M17NLIB_PATCH_LEVEL): Updated to 3.
242 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
244 * symbol.c: Fix some typos in documentation.
246 * mtext.c: Fix some typos in documentation.
248 * input.c: Fix several typos in documentation.
250 2006-02-06 Kenichi Handa <handa@m17n.org>
252 * Version 1.3.2 released.
254 2006-02-03 Kenichi Handa <handa@m17n.org>
256 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
257 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
259 * font.c (xlfd_parse_name): Fix handling of the name "nil".
261 * draw.c (layout_glyphs): Fix handling left_padding of
264 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
266 2006-02-02 Kenichi Handa <handa@m17n.org>
268 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
271 2006-01-25 Kenichi Handa <handa@m17n.org>
273 * input.c (resolve_expression): If the value of PLIST is a plist,
274 but the first element is not symbol, return 0.
276 2006-01-17 Kenichi Handa <handa@m17n.org>
278 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
279 HAVE_GD is 2 or the greater.
281 2006-01-16 Kenichi Handa <handa@m17n.org>
283 * Version 1.3.1 released.
285 2006-01-16 Kenichi Handa <handa@m17n.org>
287 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
288 simulating anti-aliasing.
290 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
291 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
293 2006-01-12 Kenichi Handa <handa@m17n.org>
295 * input.c (get_surrounding_text): Always pop ic->plist.
296 (reset_ic): Don't reset ic->plist.
298 2006-01-10 Kenichi Handa <handa@m17n.org>
300 * input.c (preedit_commit): For debugging, print only commiting
301 charactes. Don't set ic->candidate_show to 0.
302 (handle_key): Don't run branch-actions just by shifting to the
304 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
305 Reset vars and plist.
307 2006-01-07 Kenichi Handa <handa@m17n.org>
309 * input.c (load_branch): Confirm that maps is not NULL.
311 2006-01-05 Kenichi Handa <handa@m17n.org>
313 * input-gui.c (win_filter): Try to convert arg to key only when
316 * plist.c (read_integer_element): If '#' and '-' are followed by
317 non-integer-constituent, read them as a part of a symbol.
318 (read_symbol_element): New arg C.
319 (read_element): Adjust args to read_symbol_element.
321 * input.c (load_macros): On overwriting a macro, free the old
323 (minput__init): Store Mmap in load_im_info_keys.
324 (minput_get_title_icon): If the input method has no title, be sure
326 (minput_get_description): If the input method has no description,
327 be sure to return NULL.
328 (minput_get_variables): Fix documentation.
329 (handle_key): Pay attention to the case that key is Mnil.
330 (filter): Likewise. Fix handling of such symbol as S-A.
332 2005-12-22 Kenichi Handa <handa@m17n.org>
334 * Version 1.3.0 released.
336 2005-12-22 Kenichi Handa <handa@m17n.org>
338 * font-ft.c (ft_list): If the specified font has no property,
341 2005-12-20 Kenichi Handa <handa@m17n.org>
343 * character.c (mchar_get_prop): Check char_prop_list.
344 (mchar_put_prop, mchar_get_prop_table): Likewise.
346 2005-12-18 Kenichi Handa <handa@m17n.org>
348 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
349 file name sans language.
351 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
353 * input.c: Fix typo in comments.
355 2005-12-14 Kenichi Handa <handa@m17n.org>
357 * input.c (minput_get_title_icon): Check the default icon for the
360 2005-12-13 Kenichi Handa <handa@m17n.org>
362 * input.c (Mless_equal, Mgreater_equal): New variables.
363 (parse_expression, resolve_expression, parse_action_list)
364 (take_action_list): Handle the aboves.
365 (filter): Treat key S-X as X.
366 (minput__init): Initialize Mless_equal and Mgreater_equal.
367 (minput_get_title_icon): New function.
369 * m17n.h (minput_get_title_icon): Extern it.
371 * database.c (get_database_filename): Return a filename instead of
373 (load_database): Adjusted for the above change.
374 (mdatabase__load_for_keys): Likewise.
375 (mdatabase__find_file): New function.
377 * database.h (mdatabase__find_file): Extern it.
379 * font.h (mfont__resize): Delete extern.
381 * font.c (mfont__list): Check resize ratio.
382 (mfont__resize): Delete it.
383 (mfont_resize_ratio): Include the code of mfont__resize.
385 * font-ft.c (ft_open): Check resize ratio.
387 * m17n-X.c (xfont_open): Check resize ratio.
388 (xft_open): Likewise.
390 2005-12-07 Kenichi Handa <handa@m17n.org>
392 * input.c (take_action_list): If take_action_list return -1,
394 (handle_key): Likewise.
396 * face.c (mface__for_chars): When font is specified and layouter
397 is found for it, if the layouter doesn't support one of a
398 character, use a face sans layouter for it.
400 2005-12-06 Kenichi Handa <handa@m17n.org>
402 * fontset.c (mfont__lookup_fontset): If only a fallback font is
403 found, don't use it for more than one character.
405 2005-12-05 Kenichi Handa <handa@m17n.org>
407 * face.c (mface__realize): Set rfont->layouter to Mnil.
408 (mface__for_chars): Fix handling of layouter.
410 * character.h (mchar__define_prop): Extern it.
412 * database.c (update_database_list): Call mchar__define_prop if
415 * character.c (mchar__init): Don't call mchar_define_property.
416 Instead just initialize property keys.
417 (mchar__fini): Free char_prop_list only if it's not NULL.
418 (mchar__define_prop): New function.
419 (mchar_define_property): Call mchar__define_prop.
421 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
424 2005-12-02 Kenichi Handa <handa@m17n.org>
426 * language.c (mlang__init): Handle extra chars.
428 * m17n-gui.h (mfont_check): Adjust prototype.
430 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
431 (xfont_check_capability): New function.
432 (xft_driver): Specify xft_check_capability.
433 (xft_check_capability): New function.
435 * font-ft.c (M0_3): Delete it.
437 (ft_get_charmaps): Refer to M0.
438 (fc_parse_pattern): Fix previous change.
439 (ft_list_language): Check also extra chars.
440 (ft_check_otf): Define it even if HAVE_OTF is undef.
441 (ft_check_lang): Check the result of FcLangSetHasLang against
442 FcLangDifferentLang. Check also extra chars.
443 (ft_list_capability): Delete ifdef HAVE_OTF.
444 (ft_select): Likewise.
445 (ft_open): Improve debug information.
446 (ft_check_capability): New function.
447 (mfont__ft_driver): Specify ft_check_capability.
448 (mfont__ft_init): Initialize M0.
450 * fontset.c (get_font_from_group): New function.
451 (mfontset__get_font): New function.
453 * fontset.h (mfontset__get_font): Extern it.
455 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
456 (mfont__fini): Delete ifdef HAVE_OTF.
457 (free_font_capability): Likewise.
458 (mfont__get_capability): Likewise.
459 (mfont__check_capability): New function.
460 (mfont_check): Change the order of arguments. Use
463 * font.h (struct MFontDriver): New member check_capability.
464 (MFontCapability): Delete ifdef HAVE_OTF.
465 (mfont__check_capability): Extern it.
467 * face.c (mface__realize): Fix handling of FONT arg.
468 (mface__for_chars): Fix handling of explicitly specified font.
470 2005-11-25 Kenichi Handa <handa@m17n.org>
472 * font-flt.c (run_command): Print debug info for
475 * draw.c (layout_glyphs): Fix handling of left/right_padding.
477 * face.c (mface__for_chars): Check rfont before accessing the
480 2005-11-21 Kenichi Handa <handa@m17n.org>
482 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
485 * fontset.c (fontset_table): New variable.
486 (free_fontset): Call M17N_OBJECT_UNREGISTER.
487 (mfont__fontset_init): Add fontset_table as an object array.
488 (mfont__realize_fontset): Ref FONTSET.
489 (mfont__free_realized_fontset): Unref REALIZED->fontset.
490 (mfontset): Call M17N_OBJECT_REGISTER.
491 (mfontset_copy): Likewise.
493 * input.c (handle_key): For debugging, print information about
495 (filter): Add an alias for Meta and Alt modifiers.
496 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
498 (minput__init): Initialize them.
499 (parse_expression): New function.
500 (resolve_expression): New function.
501 (parse_action_list): Handle expressions by parse_expression.
502 (take_action_list): Handle expressions by resolve_expression.
503 (parse_nested_list_value): Fix previous change.
504 (resolve_command): Fix handling of the return value of
507 2005-11-18 Kenichi Handa <handa@m17n.org>
509 * font-ft.c (ft_check_otf, otf_script_list): Define only when
511 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
513 (ft_select): Likewise.
515 * font.c (mfont_list): Fix for the case that FONT is NULL.
516 (OTF_tag): Delete it.
517 (load_otf_script_list): Define only when HAVE_OTF is defined.
518 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
521 * draw.c (truncate_gstring): Be sure to truncate at
522 glapheme-cluster boundary.
524 2005-11-11 Kenichi Handa <handa@m17n.org>
526 * input.c (delete_surrounding_text): Clear cache if necessary.
528 2005-11-09 Kenichi Handa <handa@m17n.org>
530 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
531 glyph prev is also supported by the current flt.
533 2005-11-08 Kenichi Handa <handa@m17n.org>
535 * m17n-X.c (xft_render): Cancel previous change.
537 2005-11-07 Kenichi Handa <handa@m17n.org>
539 * input.c: Include <stdlib.h>.
540 (get_surrounding_text, delete_surrounding_text)
541 (get_preceding_char, get_following_char): New functions.
542 (integer_value): New arg surrounding. If it is nonzero, try to
543 get a surrounding character. Callers changed.
544 (take_action_list): Check `value' before setting an element.
545 (destroy_ic): Unref ic_info->preceding_text and
546 ic_info->following_text.
547 (minput__init): Initialize Minput_get_surrounding_text and
548 Minput_delete_surrounding_text.
549 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
551 (filter): Unref ic_info->preceding_text and
552 ic_info->following_text.
554 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
557 * input.h (MInputContextInfo): New members preceding_text and
560 2005-11-04 Kenichi Handa <handa@m17n.org>
562 * input.c (parse_nested_list_value): Fix handling of the global
564 (get_nested_list): Get global definitions by load_partial_im_info.
565 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
566 MInputCandidatesChanged.
567 (take_action_list): Likewise.
568 (reset_ic): Likewise.
569 (create_ic): Don't pay special attention to
570 Mcandidates_group_size.
571 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
572 (minput_set_variable): Get a definition of varible by
573 mplist_find_by_value, not mplist_get.
575 * m17n.h (enum MInputCandidatesChanged): New enum.
577 2005-11-01 Kenichi Handa <handa@m17n.org>
579 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
581 (mwin__destroy_window): If xft_draw's drawable is win, change it
582 to device->drawable before destroying win.
584 2005-10-31 Kenichi Handa <handa@m17n.org>
586 * input.c (load_im_info): Fix adding of state.
588 * m17n-core.c (m17n_fini_core): Fix reporting of module
591 * m17n.c (m17n_fini): Fix reporting of module finalization.
593 * m17n-gui.c (m17n_init_win): Fix reporting of module
596 2005-10-29 Kenichi Handa <handa@m17n.org>
598 * input.c (get_candidate_list): Fix the timing of referring plist.
600 2005-10-28 Kenichi Handa <handa@m17n.org>
602 * input.c (load_branch): Ignore an undefined map name.
603 (load_im_info): Set im_info->title from `name' only if it's not
605 (shift_state): Always update ic->status.
606 (adjust_candidates): Renamed from adjust_candidate_command.
607 Argument changed. Caller changed.
608 (get_candidate_list, regularize_action): New functions.
609 (take_action_list): Use them. On handling Munhandle, don't set
611 (handle_key): If KEY is not handled by MAP, and MAP has
612 branch_actions, perform them.
614 * database.c (mdatabase__fini): Free dir_info->filename;
616 2005-10-20 Kenichi Handa <handa@m17n.org>
618 * input.c (marker_code): Accept '@@'.
619 (integer_value): Handle '@@'.
620 (parse_action_list): Accept a symbol argument.
621 (take_action_list): Resolve the symbol argument. Handle the
624 2005-10-18 Kenichi Handa <handa@m17n.org>
626 * input.c: Include "charset.h".
627 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
629 (MIMState): New member (M17NObject control).
630 (lookup_nested_list, set_nested_list, parse_nested_list_value)
631 (get_nested_list, resolve_variable): New functions.
632 (integer_value): New arg (MPlist **value). Set it to the plist
633 element containing the value.
634 (resolve_command): New function.
635 (load_translation): New arg (MPlist *map_actions).
636 (load_branch): New args language and name. If `keylist' is a
637 symbol, resolved that as a command name.
638 (free_map): New arg top. Free map->map_actions only if top is
640 (free_state): New function.
641 (load_state): New arg name.
642 (im_info_list): New variable.
643 (free_im_info, get_im_info_by_tags): New functions.
644 (load_im_info): Arg key changed to plist. Handle `include'.
645 Return (MInputMethodInfo *).
646 (preedit_commit): Ref ic->candidate_list.
647 (get_select_charset, adjust_candidate_command): New functions.
648 (take_action_list): Handle `include'. Adjust candidate action
649 properly. Handle control variables `candidates-charset' and
650 `candidates-group-size'.
651 (open_im): Use get_im_info.
652 (create_ic): Get global variables.
653 (load_partial_im_info): New function.
654 (get_im_info): New function.
655 (check_command_keyseq, check_command_list, check_variable_list):
657 (minput__init): Don't handle M_database_hook and Mdetail_text.
658 Initialize M_candidates, Mcandidates_group_size,
660 (parse_variable_list, get_variable_list, parse_command_list)
661 (get_command_list): Delete them.
662 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
663 (minput__fini): Simply unref command_list and variable_list.
664 (minput_get_description): Adjusted for the new form of description.
665 (minput_get_commands): Use get_nested_list.
666 (minput_assign_command_keys): Likewise.
667 (minput_get_variables, minput_set_variable): Likewise.
669 * input.h (MInputMethodInfo): New members im and maps.
671 * database.h (M_database_hook): Delete extern.
672 (MDatabaseHookFunc): Delete extern.
673 (mdatabase__check): Extern it.
675 * database.c: Include <glob.h>.
676 (MAX_TIME): New macro.
677 (Masterisk): New variable.
678 (get_database_stream): Argument changed to (MDatabaseInfo *).
680 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
681 (find_database): New function.
682 (update_database_list): New function.
683 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
684 calling update_database_list.
685 (mdatabase__check): New function.
686 (mdatabase_find): Use update_database and find_database. Don't
687 handle MDatabaseHookFunc.
688 (mdatabase_list): Call update_database at first.
689 (mdatabase_define): Adjusted for the change of mdb->extra_info.
690 (MDatabaseList): New type.
692 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
694 * m17n.h (Mdetail_text): Delete extern.
696 * m17n-core.h (mplist_conc): Delete extern.
698 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
700 (mplist_conc): Renamed to mplist__conc.
701 (mplist__pop_unref): New function.
703 2005-10-14 Kenichi Handa <handa@m17n.org>
705 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
707 (read_element): If keys is an empty plist, return any element
709 (dump_plist_element): Check if plist is nested.
710 (mplist_conc): Always ref tail.
711 (mplist_set): If key is a managing key, ref val in advance.
713 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
714 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
715 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
718 * fontset.c (free_fontset): Unref fontset_list if necessary.
719 (mfont__fontset_fini): Don't free fontset_list. Unref
721 (mfont__realize_fontset): Initialize request.
722 (mfontset): Ref default_fontset or fontset only if necessary.
723 (mfontset_copy): Don't ref copy.
725 * draw.c (render_glyphs): Check gend->type before checking
728 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
729 unrefed plists to NULL.
731 2005-10-04 Kenichi Handa <handa@m17n.org>
733 * textprop.c (mtext_serialize): Be sure to make mt
734 MTEXT_FORMAT_UTF_8 and NULL terminated.
736 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
738 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
740 2005-10-03 Kenichi Handa <handa@m17n.org>
742 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
743 is not at the beginning of line.
745 2005-09-22 Kenichi Handa <handa@m17n.org>
747 * input.c: Include <sys/stat.h> and <unistd.h>.
748 (Minclude, Mcommit, Munhandle): New variables.
749 (minput__init): Initialize them. Push only Mstate to
750 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
751 (parse_action_list): Allow integer arg for undo. Handle Mcommit
753 (load_input_method): Handle "include" directive. If no states are
755 (shift_state): If state_name is Mt, shift back to the previous
756 state. Call preedit_commit to commit preedit text.
757 (preedit_commit): New function.
758 (take_action_list): Improve debug printing. Handle commit and
760 (handle_key): Check the return value of take_action_list. Don't
761 take branch_actions just after changing to the root map.
762 (reset_ic): Reset all ic_info members.
763 (filter): When a key is not handled, just move ic_info->keys
764 instead fo calling reset_ic.
765 (load_im_info): If key is not Mstate, push Mmap to
767 (MDatabaseStatList): New type.
768 (imdir_stat_list): New variable.
769 (input_method_hook): Don't cancel the hook. Check the
770 modification time of directories.
771 (minput__fini): Free imdir_stat_list;
773 * input.h (MInputContextInfo): New member prev_state.
775 * m17n-core.h (mplist_conc): Extern it.
777 * plist.c (mplist_conc): New function.
779 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
781 * font.h (MRealizedFont): New member average_width.
783 * font-ft.c (ft_open): Set rface->average_width.
785 * font.c (xlfd_unparse_name): Print '*' before registry name.
787 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
788 (xfont_open): Set rfont->average_width.
789 (xft_open): Likewise.
790 (device_open): Initialize disp_info->AVERAGE_WIDTH.
792 * internal-gui.h (struct MFrame): New member average_width.
794 * m17n-gui.c (mframe): Fix setting of frame->rfont.
795 (mframe_get_prop): Return the average_width of a font.
797 * face.c (mface__realize): Set rface->average_width.
798 (mface__update_frame_face): Set frame->average_width.
800 * face.h (MRealizedFace): New member average_width.
802 2005-09-19 Kenichi Handa <handa@m17n.org>
804 * font.c (xlfd_unparse_name): New arg full_xlfd.
805 (mfont__encode_char): Use shortcut only for X core fonts.
806 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
807 (mfont_put_prop): Handle `language' property.
808 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
809 Print file can capability info too.
811 * m17n-core.c (mdebug__output): New variable.
812 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
813 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
814 (m17n_fini_core): Close mdebug__output if it's not stderr.
816 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
817 (xfont_open): Handle baseline_offset.
818 (xfont_find_metric): Likewise.
819 (xfont_render): Likewise.
820 (xft_open): Likewise.
821 (xft_render): Likewise.
823 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
824 (mdebug__output): Extern it.
825 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
826 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
827 (MDEBUG_DUMP): New macro.
828 (MDEBUG_PRINT_TIME): Print to medebug__output.
830 * font.h (MRealizedFont): New member baseline_offset.
832 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
834 (fc_weight_table): Add FC_WEIGHT_REGULAR.
835 (ft_list_family): Check alias.
836 (ft_list_language): If language is "en", don't try to the second
838 (ft_default_list): New variable.
839 (ft_list_default): New function.
840 (ft_select): If family is not specified, try only the default
841 fonts. Treat the weights normal and medium same.
842 (ft_open): Fix debug message. If registry is not specified, try
843 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
844 (ft_find_metric): Likewise.
845 (ft_render): Likewise.
846 (ft_list): Fix debug message. Accept the registring iso8859-1.
847 If family is not specified, try only the default fonts.
849 * face.c (mface__realize): Fix logic of opening a font.
851 2005-09-16 Kenichi Handa <handa@m17n.org>
853 * face.c (mface__realize):
855 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
858 * input.c (shift_state): Fix the condition of taking init actions.
859 (take_action_list): Fix handling of pushback action.
860 (handle_key): Don't change key while checking its alias.
861 (minput__init): Initialize new variables.
862 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
865 2005-09-12 Kenichi Handa <handa@m17n.org>
867 * mtext.c (mtext__uppercase): Add proper open/close parens.
868 (mtext_titlecase): Add proper casting.
870 * input.c (parse_action_list): Handle the case that the arg is a
871 key sequence (MText or MPlist).
872 (take_action_list): Likewise.
873 (shift_state): Shorter debug message.
874 (handle_key): Terminate a debug message by "\n".
875 (reset_ic): Don't take initial actions here.
876 (minput_open_im): Print a debug message.
877 (minput_close_im): Likewise.
878 (minput_create_ic): Likewise.
879 (minput_destroy_ic): Likewise.
881 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
883 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
886 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
887 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
890 * character.c: Add Japanese documentation for
891 mchar_get_prop_table ().
893 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
895 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
896 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
897 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
899 (init_case_conversion): New function.
900 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
901 (uppercase_precheck, lowercase_precheck, final_sigma)
902 (after_soft_dotted, more_above, before_dot, after_i)
903 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
905 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
907 * plist.c (read_mtext_element): Fix previous change.
909 2005-09-05 Kenichi Handa <handa@m17n.org>
911 * plist.c (read_mtext_element): Handle \uXXXX notation.
913 * internal.h (MTABLE_MALLOC): Don't use a local variable.
914 (MTABLE_ALLOCA): Change the name of local variable.
916 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
917 HAVE_FREETYPE are defined.
919 * m17n-X.c: Check HAVE_X11.
921 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
922 directory listing libraries.
923 (noinst_PROGRAMS): Define it only in maintainer mode.
925 2005-09-02 Kenichi Handa <handa@m17n.org>
927 * m17n-gui.h (mdraw_line_break_option): Extern it.
929 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
930 end of the first glyph.
931 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
933 (mdraw_line_break_option): New variable.
934 (mdraw_default_line_break): Use mtext_line_break.
936 * mtext.h (wordseg_func_table): Don't extern it.
937 (mtext__wseg_fini): Extern it.
939 * mtext.c: Don't include word-thai.h.
940 (wordseg_func_table): Delete this variable.
941 (mtext__init): Don't initialize above. Don't call
942 mtext__word_thai_init.
943 (mtext__fini): Don't free wordseg_func_table. Call
944 mtext__wseg_fini instead fo mtext__word_thai_fini.
945 (MTextWordsegFunc): Don't typedef it.
946 (mtext__word_segment): Moved to mtext-wseg.c.
948 * m17n-core.h (enum MTextLineBreakOption): New enum.
949 (mtext_line_break): Extern it.
951 * mtext-wseg.c: New file.
953 * mtext-lbrk.c: New file.
955 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
956 add mtext-lbrk.c and mtext-wseg.c.
958 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
959 the case that head is NULL.
961 2005-09-01 Kenichi Handa <handa@m17n.org>
963 * word-thai.c (wordseg_propertize): If the property value is nil,
964 don't make the property no-merge.
965 (thai_wordseg): Don't require *from and *to are set a priori. Pay
966 attention to the case that they are NULL.
967 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
970 * character.c (mchar_get_prop_table): New function.
972 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
974 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
975 (mchar_get_prop_table): Extern it.
977 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
978 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
980 * internal.h (enum MTextCoverage): New enum.
981 (MText): New member coverage.
983 * mtext.c (FORMAT_COVERAGE): New macro.
984 (insert): Copy mt2->coverage.
985 (mtext__from_data): Initialize mt->coverage.
986 (mtext__adjust_format): Update mt->coverage.
987 (mtext): Initialize mt->coverage.
988 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
989 Update mt->coverage if necessary.
990 (mtext_duplicate): Copy mt->coverage.
991 (mtext_insert, mtext_replace): New functions.
992 (mtext_dup): Use mtext_duplicate.
993 (mtext__word_segment): Don't set *from and *to if a word
994 segmentation funcion is not found.
995 (mtext_ins_char): Fix typo.
997 2005-08-25 Kenichi Handa <handa@m17n.org>
999 * font.h (MFont): New member for_full_width.
1001 * font.c (compare_font_score): Prefer a font of not
1004 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1005 registry charset of a font is one of CJK charsets.
1007 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1008 supports some of CJK.
1010 2005-08-24 Kenichi Handa <handa@m17n.org>
1012 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1014 * m17n-gui.c (null_device_open): Check Mresolution param and set
1017 * m17n-gd.c (device_open): Check Mresolution param and set
1020 * m17n-X.c (MWDevice): New member resy.
1021 (xfont_open): Set ascent, descent, and max_advance members of
1023 (xft_open): Likewise.
1024 (device_open): Compare also screen_num to find a device. Set
1025 device->resy and frame->dpi.
1027 * internal-gui.h (MFrame): New member dpi.
1029 * font.h (MRealizedFont): New member max_advance.
1031 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1032 (mfont__init): Don't initialize Mascent, Mdescent.
1033 (Mascent, Mdescent): Delete these variables.
1034 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1035 Mfont_descent instead of Mascent and Mdescent.
1036 (mfont_put_prop): Allow negative size.
1037 (mfont_find): Handle the case of spec->size < 0. Fix previous
1039 (mfont_list): Handle the case of spec->size < 0.
1040 (mfont_check): Likewise.
1042 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1043 (fc_get_pattern): Handle the case of font->size < 0.
1044 (ft_open): Set ascent, descent, and max_advance members of rfont.
1045 (ft_find_metric): Improve rounding.
1046 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1049 * face.c (mface__realize): Handle the case of font->size < 0.
1051 2005-08-22 Kenichi Handa <handa@m17n.org>
1053 * coding.c (MConverterStatus): Change the member buf to union.
1054 (mconv_buffer_converter): Add const to the arg buf.
1055 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1056 (mconv_decode): Adjusted for the change of MConverterStatus.
1057 (mconv_encode_range): Likewise.
1059 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1060 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1062 2005-08-20 Kenichi Handa <handa@m17n.org>
1064 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1065 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1067 * m17n-X.c (xfont_open): Set members ascent, descent, and
1068 max_advance of rfont.
1069 (xft_open): Likewise.
1071 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1073 (mfont__ft_parse_name): Add const to the arg name.
1075 * font.c (xlfd_parse_name): Add const to the arg name. Call
1076 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1077 (xlfd_unparse_name): Handle spacing.
1078 (mfont__init): Initialize new variables.
1079 (mfont__id): Handle spacing.
1080 (mfont__merge): Likewise.
1081 (mfont__set_spec): This function deleted.
1082 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1083 condition of calling mfont__ft_parse_name.
1084 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1085 (mfont_get_prop): Handle properties spacing, ascent, descent,
1087 (mfont_find): Return a realized font.
1088 (mfont_from_name): Add const to the arg name.
1090 * font.h (enum MFontProperty): New member MFONT_SPACING.
1091 (enum MFontSpacing): New enum.
1092 (MFont): New members spacing and max_advance.
1093 (mfont__ft_parse_name): Prototype adjusted.
1094 (mfont__set_spec): Extern deleted.
1095 (mfont__parse_name_into_font): Prototype adjusted.
1097 2005-08-19 Kenichi Handa <handa@m17n.org>
1099 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1101 * font.c (mfont_list): If FONT is null, use a temporary font.
1102 (mfont_parse_name): Add const to the arg name.
1104 2005-08-18 Kenichi Handa <handa@m17n.org>
1106 * word-thai.c: Surround code by #ifdef and #endif to escape from
1109 * font-ft.c: Mostly re-written.
1111 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1112 (FontLayoutCmd): Type of the member otf changed..
1113 (load_otf_command): Adjusted for the format change of otf command.
1114 (load_command): Likewise.
1115 (free_flt_command): Unref cmd->body.otf.
1116 (run_otf): Ajusted for the type change of otf_cmd.
1117 (run_command): Ajusted for the type change of otf_cmd. On
1118 debugging, print ctx->combining_code.
1119 (mfont__flt_run): Initialize ctx's members code_offset,
1120 combining_code, and left_padding to 0.
1122 * face.h (struct MRealizedFace): New member font.
1123 (mface__realize): Prototype adjusted.
1125 * face.c (find_realized_face): New arg font.
1126 (find_realized_face): Adjusted for the change of MFont.
1127 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1128 (mface__fini): Don't call mdebug__report_object.
1129 (mface__realize): New arg font.
1130 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1131 Optimize the latin case.
1132 (mface__free_realized): Free rface->font.
1133 (mface__update_frame_face): Adjusted for the change of mface__realize.
1134 (mface_equal): New function.
1136 * draw.c (Mcommon): New variable.
1137 (visual_order): Args to mfont__encode_char changed.
1138 (compose_glyph_string): Handle Mfont text property.
1139 (layout_glyphs): Adjusted for the change of MFont.
1140 (mdraw__init): Initialize Mcommon.
1141 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1143 * font.h (enum MFontType): Members completely changed.
1144 (enum MFontProperty): Move MFONT_SIZE to the tail.
1145 (enum MFontSource): New enum.
1146 (struct MFont): New members type, source, sizes, file, capability,
1148 (struct MRealizedFont): Type of member font changed. Members
1149 score, status, and encoding deleted.
1150 (MFontScore): New type.
1151 (MFontList): Member changed.
1152 (struct MFontDriver): New member has_char. Types of members
1154 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1155 (Mapple_roman): Extern them.
1156 (OTF_Tag): Typedefed if not HAVE_OTF.
1157 (enum MFontOpenTypeTable): New enum.
1158 (MFontCapability): New type.
1159 (mfont__ft_drive_otf): Prototype adjusted.
1160 (mfont__score): Extern deleted.
1161 (mfont__merge): Extern it.
1162 (mfont__has_char): Extern it.
1163 (mfont__encode_char): Prototype adjusted.
1164 (mfont__open): Extern it.
1165 (mfont__set_spec): Prototype adjusted.
1166 (mfont__get_capability): Extern it.
1168 * font.c: Include "fontset.h".
1169 (M_font_capability, M_font_list, M_font_list_len): New variables.
1170 (font_score_priority): Change order of initial elements.
1171 (font_score_shift_bits): Fix array size.
1172 (common_weight): Add "thin", "semibold", and "heavy".
1173 (common_stretch): Add "ultracondensed", "extracondensed",
1174 "extraexpanded", and "utltraexpand".
1175 (font_weight_regular, font_weight_normal, font_weight_medium): New
1177 (gen_font_name): This function deleted.
1178 (find_encoding): Set font->encoding.
1179 (OTF_tag): New function.
1180 (otf_script_list): New variable.
1181 (load_otf_script_list): New function.
1182 (find_script_from_otf_tag): New function.
1183 (xlfd_parse_name): Set font->type and font->source.
1184 (mfont__free_realized): Free chains rfonts.
1185 (font_score): Renamed from mfont__score.
1186 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1187 (Mapple_roman): New variables.
1188 (mfont__init): Initilize new variables. Initalize
1189 default_encoding.encoding_name and
1190 default_encoding.encoding_charset to Municode_full and
1191 mcharset__unicode. Use SAFE* macros for allocating filepath
1193 (mfont__fini): Free otf_script_list.
1194 (mfont__id): New function.
1195 (mfont__match_p): Check also capability member of MFont.
1196 (mfont__merge): New funciton.
1197 (mfont__set_spec_from_face): Set type and source members.
1198 (mfont__set_spec_from_plist): Set capability and type members.
1199 (mfont__select): Argument changed.
1200 (mfont__available): New function.
1201 (compare_font_score): New function.
1202 (mfont__list): New function.
1203 (mfont__open): Return a realized font.
1204 (mfont__resize): Adjusted for the change of MFont.
1205 (mfont__has_char): New function.
1206 (mfont__encode_char): Argument changed.
1207 (mfont__set_spec): Argument changed.
1208 (free_font_capability): New function.
1209 (mfont__get_capability): New function.
1210 (MFontfile): New variable.
1211 (mfont_get_prop): Adjusted for the change of MFont.
1212 (mfont_put_prop): Likewise.
1213 (mfont_set_selection_priority): Fix the way of setting
1214 font_score_priority[].
1215 (mfont_find): Use mfont__list instead of mfont__select.
1216 (mfont_resize_ratio): Adjusted for the change of MFont.
1217 (mfont_list): Use mfont__list.
1218 (mfont_check): New function.
1219 (font_score): Make it static.
1221 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1222 (mfont__lookup_fontset): Likewise.
1224 * fontset.c (struct MFontset): Delete member font_spec_list.
1225 (struct MRealizedFontset): Type of member spec changed. New
1227 (load_font_group): Arg spec_list deleted.
1228 (load_fontset_contents): Adjusted for the change of fontset_def.
1229 (free_fontset): Fix the way of freeing fontset elements.
1230 (realize_fontset_elements): Argument changed.
1231 (get_per_script): New function.
1232 (free_realized_fontset_elements): Fix the way of feeing rfontset
1234 (update_fontset_elements): Fix args to realize_fontset_elements.
1235 (mfont__realize_fontset): New arg spec.
1236 (try_font_list): New function.
1237 (try_font_group): New arg request. Use try_font_list.
1238 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1240 (mfontset): Adjusted for the change of MFontset.
1241 (mfontset_copy): Likewise. Don't share plists.
1242 (mfontset_modify_entry): Adjusted for the change of MFontset.
1243 (mfontset_lookup): Call get_per_script.
1244 (mdebug_dump_fontset): Print also the address of fonts.
1246 * input.c (shift_state): Don't reset ic_info->vars.
1247 (take_action_list): Call MDEBUG_PRINT fore calling
1250 * internal-gui.h (MFontDriver): Don't typedef it here.
1252 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1253 (MXFont): This type deleted.
1255 (struct _MFontX): New struct.
1256 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1257 (MDisplayInfo): Member base_font_list deleted.
1258 (DEFAULT_FONT): Definition changed.
1259 (FALLBACK_FONT): This maclr deleted.
1260 (free_display_info): Adjusted for the change of MDisplayInfo.
1261 (free_device): Argument to mfont__free_realized changed.
1262 (xfont_driver): Adjusted for the change of MFontDriver.
1263 (xfont_registry_list): Use MFontX instead of MXFont.
1264 (MRealizedFontX): Renamed from MXFontInfo.
1265 (xfont_select): Return the font found first.
1266 (close_xfont): Change MXFontInfo to MRealizedFontX.
1267 (xfont_open): Return the realized font.
1268 (xfont_find_metric): Get xfont from rfont->fontp.
1269 (xfont_has_char): New function.
1270 (xfont_encode_char): Adjusted for the argument change.
1271 (xfont_render): Get xfont from rfont->fontp.
1272 (xfont_list): Adjusted for the argument change.
1273 (MRealizedFontXft): Renamed from MXftFontInfo.
1274 (xft_driver): Ajusted for the change of MFontDriver.
1275 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1276 (xft_open_font): Argument changed.
1277 (xft_open): Argument changed. Return the realized font.
1278 (xft_find_metric): Get xft_font from rfont->fontp.
1279 (xft_has_char, xft_encode_char): New functions.
1280 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1281 font if not yet opened.
1282 (device_open): Don't set frame->font.
1284 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1286 (gd_font_open): New function.
1287 (gd_render): Don't use the local variable ft_info.
1288 (device_init): Adjusted for the change of gd_font_driver.
1290 * textprop.c (mtext__prop_init): Initialize text_property_table.
1291 Call M17N_OBJECT_ADD_ARRAY.
1292 (mtext__prop_fini): Don't call mdebug__report_object.
1294 * plist.c (mplist__init): Initialize plist_table.
1295 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1296 (mplist__fini): Don't call mdebug__report_object.
1298 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1299 (mtext__fini): Don't call mdebug__report_object.
1300 (MTEXT_FORMAT_UTF_16): Correct type.
1301 (mtext_data): New function.
1302 (mtext_text): Fix calculation of limit and args to
1305 * language.c: Include "plist.h".
1306 (M_script_lang_list): New variable.
1307 (mlang__init): Read languages and their information from m17n
1309 (mlanguage__list): New function.
1310 (Miso639_1, Miso639_2): New variables.
1312 * language.h (mlanguage__list): Extern it.
1314 * database.c (get_database_stream): Use SAFE_* macros for
1315 allocating and freeing path.
1316 (mdatabase__init): Likewise.
1318 * symbol.c (msymbol__fini): Don't free symbols here.
1319 (msymbol__free_table): New function.
1320 (msymbol_is_managing_key): New function.
1322 * symbol.h (msymbol__free_table): Extern it.
1323 (msymbol__list): Extern it.
1325 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1327 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1328 (struct _M17NObjectArray): New member name and next.
1329 (mdebug__add_object_array): Extern it.
1330 (M17N_OBJECT_ADD_ARRAY): New macro.
1331 (mdebug__report_object): Don't extern it.
1333 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1335 * m17n-gui.c (free_frame): Don't free frame->font.
1336 (null_device_fini): Fix code for freeing
1337 null_device.realized_font_list.
1338 (m17n_fini_win): Free interface.
1339 (mframe): Cast the return value of dlsym. Set frame->font here.
1340 (mframe_get_prop): Check frame->rface->rfont before accessing the
1343 * m17n-gui.h (Mfontfile): Extern it.
1344 (mfont_check): Extern it.
1345 (mface_equal): Extern it.
1347 * m17n-core.c: Include "symbol.h".
1348 (report_header_printed): This variable deleted.
1349 (object_array_root): New variable.
1350 (report_object_array): New function.
1351 (mdebug__report_object): This function deleted.
1352 (mdebug__add_object_array): New function.
1353 (m17n_init_core): Call mchartable_init () before mtext_init ().
1354 (m17n_fini_core): Call report_object_array (if necessary) and
1355 msymbol__free_atable at the end.
1357 * m17n-core.h (msymbol_is_managing_key): Extern it.
1358 (mtext_data): Extern it.
1359 (MTEXT_FORMAT_UTF_16): Correct type.
1360 (M17NLIB_MINOR_VERSION): Changed to 3.
1361 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1363 * chartab.c (mchartable__init): Initalize chartable_table.count.
1364 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1365 mdebug__report_object.
1367 2005-05-26 Kenichi Handa <handa@m17n.org>
1369 * m17n.h (Miso639_1, Miso639_2): Extern them.
1371 * symbol.h (msymbol__list): Extern it.
1373 * symbol.c (msymbol__list): New function.
1375 2005-05-19 Kenichi Handa <handa@m17n.org>
1377 * input-gui.c (minput__win_init): Don't change the value of
1380 2005-05-16 Kenichi Handa <handa@m17n.org>
1382 * m17n-core.c (m17n_object): Be sure to initialize all members.
1384 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1386 2005-05-09 Kenichi Handa <handa@m17n.org>
1388 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1390 2005-04-27 Kenichi Handa <handa@m17n.org>
1392 * language.c (mlang__init): Add "an" (Aragonese).
1394 * word-thai.c: Add support for libthai.
1395 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1396 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1398 * mtext.c: Include "word-thai.h" conditionaly.
1399 (mtext__init): Call mtext__word_thai_init conditionaly.
1400 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1402 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1403 not WORDCUT_LD_FLAGS.
1405 2005-04-19 Kenichi Handa <handa@m17n.org>
1407 * word-thai.c (wordseg_propertize): Always unref the attached
1409 (thai_wordseg): Don't unref the property.
1411 2005-04-18 Kenichi Handa <handa@m17n.org>
1413 * word-thai.c: Include stdlib.h.
1414 (wordseg_propertize): Add dummy function for the case that wordcut
1415 library doesn't exist.
1416 (wordseg_propertize): Fix for old wordcut library.
1418 2005-04-16 Kenichi Handa <handa@m17n.org>
1420 * word-thai.c: Include <stdio.h>.
1422 2005-04-15 Kenichi Handa <handa@m17n.org>
1424 * draw.c: Include mtext.h.
1425 (linebreak_table, M_break_at_space, M_break_at_word)
1426 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1427 (compose_glyph_string): Check POS before getting Mface text
1429 (truncate_gstring): Give correct TO arg to line_break function.
1430 (GET_LB_TYPE): New macro.
1431 (find_break_backward, find_break_forward): New functions.
1432 (mdraw__init): Initialize the above new variables.
1433 (mdraw__fini): Free linebreak_table.
1434 (mdraw_default_line_break): Use find_break_backward and
1437 * word-thai.c: New file.
1439 * word-thai.h: New file.
1441 * mtext.c: Include word-thai.h.
1442 (wordseg_func_table): New variable.
1443 (mtext__init): Initialize wordseg_func_table and call
1444 mtext__word_thai_init.
1445 (mtext__fini): Call mtext__word_thai_fini, free
1447 (MTextWordsegFunc): New type.
1448 (mtext__word_segment): New function.
1450 * mtext.h (wordseg_func_table): Extern it.
1451 (mtext__word_segment): Extern it.
1453 * m17n.c (m17n_init): Fix typo (== -> =).
1455 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1456 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1458 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1459 (MTEXTPROP_VAL): New macros.
1461 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1463 2005-04-07 Kenichi Handa <handa@m17n.org>
1465 * database.c (load_chartable): Fix pursing of symbol name.
1467 2005-03-24 Kenichi Handa <handa@m17n.org>
1469 * m17n.c (m17n_init): Fix typo (== -> =).
1471 2005-03-11 Kenichi Handa <handa@m17n.org>
1473 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1475 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1477 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1480 2005-03-09 handa <handa@m17n.org>
1482 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1483 calling m17n_init ().
1485 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1486 calling m17n_init_core ().
1488 2005-02-28 Kenichi Handa <handa@m17n.org>
1490 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1493 2005-02-17 Kenichi Handa <handa@m17n.org>
1495 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1496 (M_description, M_command, M_variable): New variables.
1497 (load_im_info_keys): New variables.
1498 (load_im_info, check_command_keyseq, get_description_advance)
1499 (parse_command_list, get_command_list, parse_variable_list)
1500 (get_variable_list, input_method_hook): New functions.
1501 (command_list, variable_list): New variables.
1502 (minput__init): Put input_method_hook to Minput_method.
1503 Initialize M_description, M_command, M_variable, Mdetail_text,
1504 load_im_info_keys, command_list, variable_list.
1505 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1506 (Mdetail_text): New variable.
1507 (minput_get_description, minput_get_commands)
1508 (minput_assign_command_keys, minput_get_variables)
1509 (minput_set_variable): New functions.
1511 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1512 (minput_assign_command_keys, minput_get_variables)
1513 (minput_set_variable): Extern them.
1515 * plist.c (UNGETC): Just decrement st->p.
1516 (read_mtext_element): New arg skip.
1517 (read_integer_element): Likewise.
1518 (read_symbol_element): Likewise.
1519 (read_element): New arg KEYS.
1520 (mplist__from_plist): Don't increment ref-count of NULL object.
1521 (mplist__from_file): New arg KEYS.
1522 (mplist_put): Don't increment ref-count of NULL object.
1523 (mplist_add): Likewise.
1524 (mplist_push): Likewise.
1525 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1527 * plist.h (mplist__from_file): Prototype adjusted.
1529 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1530 (get_database_stream): New function.
1531 (load_database): Use get_database_stream.
1532 (M_database_hook): New variable
1533 (mdatabase__init): Initialize M_database_hook.
1534 (mdatabase__load_for_keys): New function.
1535 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1537 (mdatabase_define): Free mdb->extra_info if necessary.
1539 * database.h (mdatabase__dir_list, M_database_hook)
1540 (mdatabase__load_for_keys): Extern them.
1541 (MDatabaseHookFunc): New type.
1543 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1545 2004-12-27 Kenichi Handa <handa@m17n.org>
1547 * Version 1.2.0 released.
1549 2004-12-27 Kenichi Handa <handa@m17n.org>
1551 * input.c (minput_filter): Don't reset ic->xxx_changed.
1553 * mtext.c (mtext_from_data): Fix documentation.
1555 2004-12-25 Kenichi Handa <handa@m17n.org>
1557 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1558 (M17NLIB_VERSION_NAME): Update to "1.2.".
1560 2004-12-24 Kenichi Handa <handa@m17n.org>
1562 * input.c (reset_ic): Set key_unhandled to 0.
1564 2004-12-21 Kenichi Handa <handa@m17n.org>
1566 * m17n-gui.h (mfont_from_spec): Delete extern.
1568 * input-gui.c (win_callback): Handle Minput_reset.
1569 (minput__win_init): Register reset_ic as a callback for
1572 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1573 changed. At first, shift to the initial state.
1574 (minput__init): Initialize Minput_reset. Register reset_ic as a
1575 callback for Minput_reset.
1576 (Minput_reset): New variable.
1577 (minput_filter): Always set ic->xxx_changed to 0.
1578 (minput_reset_ic): New function.
1579 (integer_value): Fix typo ('>' -> '<') and calculation of length
1582 * m17n-core.c (merror_code): Change type to `int'.
1584 * m17n-misc.h (merror_code): Adjust type.
1586 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1588 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1589 (mtext_change_prop): Delete extern.
1591 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1592 to `int'. Move the documents to m17n-core.h.
1594 2004-12-13 Kenichi Handa <handa@m17n.org>
1596 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1597 (MTextProperty): Document it.
1599 2004-12-09 Kenichi Handa <handa@m17n.org>
1601 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1603 2004-12-03 Kenichi Handa <handa@m17n.org>
1605 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1606 m17n__gui_initialized): New externs.
1608 * m17n-core.h (enum M17NStatus): New enum.
1609 (m17n_status): Extern it.
1611 * m17n-core.c (core_initialized): Delete this variable.
1612 (m17n__core_initialized, m17n__shell_initialized,
1613 m17n__gui_initialized): New variables.
1614 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1615 instead of core_initialized.
1616 (m17n_status): New function.
1618 * m17n.c (shell_initialized): Delete this variable.
1619 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1622 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1624 * m17n-gui.c (win_initialized): Delete this variable.
1625 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1626 instead of gui_initialized.
1628 2004-11-19 Kenichi Handa <handa@m17n.org>
1630 * input.c (reset_ic): Check if ic_info->state is NULL.
1631 (filter): If ic_info->state is NULL, return 0.
1632 (load_input_method): Don't unref `maps' it it's not created.
1634 2004-11-15 Kenichi Handa <handa@m17n.org>
1636 * input.c (find_candidates_group): If INDEX is -1, find the last
1638 (take_action_list): If the previous of the first candidate is
1639 requested, select the last candidate.
1641 2004-11-08 Kenichi Handa <handa@m17n.org>
1643 * m17n-X.c (device_open): Try at most 32 fonts to find a
1644 non-autoscaled font.
1646 * font.c (xlfd_parse_name): Fix previous change.
1648 2004-11-05 Kenichi Handa <handa@m17n.org>
1650 * font.c: (commont_style): Include dummy elements "slanted" and
1651 "rslanted" to prefer "o" to "r" if "i" is requested.
1653 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1655 2004-10-29 Kenichi Handa <handa@m17n.org>
1657 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1659 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1660 New members smallest and larger.
1661 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1662 (xfont_registry_list): Likewise.
1663 (xfont_select): Likewise.
1666 2004-10-28 Kenichi Handa <handa@m17n.org>
1668 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1669 font name comparison.
1670 (xfont_select): Fix logic for selecting a larger size font.
1672 2004-10-25 Kenichi Handa <handa@m17n.org>
1674 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1677 2004-10-22 Kenichi Handa <handa@m17n.org>
1679 * input.c (update_candidate): Renamed from udpate_candidate.
1680 (take_action_list): Show more debugging info on arithmetic commands.
1682 * m17n-X.c (device_open): Fix previous change.
1684 * draw.c (compose_glyph_string): Don't get face property at the
1687 2004-10-21 Kenichi Handa <handa@m17n.org>
1689 * draw.c (compose_glyph_string): Fix for the case of category
1692 2004-10-19 Kenichi Handa <handa@m17n.org>
1694 * input.c (mdebug_mask): New variable.
1695 (shift_state): Print debug information.
1696 (take_action_list): Likewise.
1697 (handle_key): Likewise.
1699 2004-10-14 Kenichi Handa <handa@m17n.org>
1701 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1703 2004-10-13 Kenichi Handa <handa@m17n.org>
1705 * m17n-X.c (device_open): Be sure to register at least one font
1708 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1709 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1711 2004-10-12 Kenichi Handa <handa@m17n.org>
1713 * draw.c (alloc_gstring): Fix previous change.
1715 * font-ft.c (ft_list_generic): Fix for the case of not
1718 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1720 * font.c (mfont_list): If no font is found, return NULL.
1721 (load_font_encoding_table): Put entries of nil registry first.
1722 (find_encoding): Adjust for the above change.
1724 2004-10-11 Kenichi Handa <handa@m17n.org>
1726 * m17n-gui.h (mfont_list): Adjust prototype.
1728 * m17n-X.c (xfont_list): New arg maxnum.
1730 * font.h (struct MFontDriver): Change prototype of <list>.
1732 * font-ft.c (fc_generic_family_list): Delete it.
1733 (Mserif, Msans_serif, Mmonospace): Delete them.
1734 (M_generic_family_info): New variable.
1735 (enum GenericFamilyType): New enum.
1736 (struct GenericFamilyInfo): New struct.
1737 (generic_family_table): New variable.
1738 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1740 (add_font_info): Get style here.
1741 (ft_list_family): Don't initialize fc_config here. Don't list
1743 (ft_list_generic): New function.
1744 (ft_select): Pay attention to generic familes here.
1745 (ft_open): Fix calculation of ascent and descent.
1746 (ft_list): Pay attention to generic families.
1747 (mfont__ft_init): Initialize M_generic_family_info,
1748 generic_family_table, and fc_config..
1749 (mfont__ft_fini): Finalize generic_family_table.
1751 * draw.c (compose_glyph_string): Use more constant font for
1752 glyphs. Adjust for the member change in MGlyph.
1753 (layout_glyph_string): Adjust for the member change in MGlyph.
1754 (alloc_gstring): Intilize scracth_glyph to avoid
1755 compose_glyph_string on it.
1756 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1757 (mdraw_coordinates_position): Fix previous change.
1759 * internal-gui.h (glyph_category): New enum.
1760 (MGlyph): Change type of <category> to enum glyph_category.
1762 * face.c (mface__realize): Delete args langauge and charset.
1763 (mface__for_chars): Fix for the case that glyphs have different
1765 (mface__update_frame_face): Adjust for mface__realize change.
1767 * face.h (mface__realize): Adjust prototype.
1769 2004-10-05 Kenichi Handa <handa@m17n.org>
1771 * language.c (mlang__init): Add Akan.
1773 2004-10-04 Kenichi Handa <handa@m17n.org>
1775 * font-ft.c (add_font_info): Add instead of push the element.
1776 (ft_list_family): For generic fonts, try all
1777 substituted. families.
1779 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1780 (run_rule): Don't update cluster range here.
1781 (run_command): Update cluster range on appending a glyph.
1782 (run_otf): Update cluster range for glyphs generated by OTF.
1784 2004-10-02 Kenichi Handa <handa@m17n.org>
1786 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1788 2004-09-30 Kenichi Handa <handa@m17n.org>
1790 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1792 2004-09-30 Kenichi Handa <handa@m17n.org>
1794 * font.h: Include <fontconfig/fontconfig.h>.
1795 (MFTInfo): New member langset.
1796 (mfont__encoding_list): Extern it.
1798 * font.c (mfont__encoding_list): New function.
1799 (mdebug_dump_font_list): New function.
1801 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1802 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1804 (ft_family_list): New variable.
1805 (set_font_info): New arg basep. Callers changed.
1806 (fc_list): Check the return value of FcPatternGetString.
1807 (add_font_info): New arg plist. Callers changed. Update
1809 (ft_list_family): New function (merged fc_list and ft_list_all).
1810 (ft_select): Use ft_list_family.
1811 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
1813 (mfont__ft_init): Initialize above new variables.
1814 (mfont__ft_fini): Free ft_family_list.
1815 (STRDUP_LOWER): New macro.
1816 (set_font_info): Use STRDUP_LOWER.
1817 (ft_list_family): Avoid duplicate addition of font path. Use
1819 (fc_decode_prop): Fix typo.
1821 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1822 (xfont_registry_list): Change argument disp_info to frame.
1824 (xfont_list_all): New function.
1825 (xfont_list): If FONT is not NULL, check all fonts.
1827 2004-09-28 Kenichi Handa <handa@m17n.org>
1829 * m17n-X.c (MXFont, MXFontList): New types.
1830 (MDisplayInfo): Delete members font_registry_list,
1831 iso8859_1_family_list, iso10646_1_family_list, new members
1832 font_list, base_font_list.
1833 (free_display_info): Adusted for the change of MDisplayInfo.
1834 (xfont_driver): Initialize with xfont_list.
1835 (font_compare): New function.
1836 (build_font_list): Deleted.
1837 (xfont_registry_list): New function.
1838 (xfont_select): Use xfont_registry_list.
1839 (xfont_list): New function.
1840 (device_open): Adusted for the change of MDisplayInfo.
1842 * font-ft.c (add_font_info): New arg languages. Callers changed.
1843 (fc_list): Get languages from fonts..
1844 (ft_list_all): Renamed from ft_list. Callers changed.
1845 (ft_list): New function.
1846 (mfont__ft_driver): Initalize with ft_list.
1848 * font.c (mfont_list): New function.
1850 * font.h (struct MFontDriver): New member `list'.
1851 (MFTInfo): New member languages.
1853 * m17n-gui.h (mfont_list): Extern it.
1855 2004-09-27 Kenichi Handa <handa@m17n.org>
1857 * internal-gui.h (struct MGlyphString): Delete members mt,
1858 sub_width, sub_lbrearing, sub_rbearing, and region.
1860 * draw.c (MSubTextExtents): New type.
1861 (layout_glyphs): New arg extents. Set its members.
1862 (layout_glyph_string): Adjusted for the above change.
1863 (alloc_gstring): Don't set gstring->mt.
1864 (truncate_gstring): Call line_break function with mt instead of
1867 2004-09-22 Kenichi Handa <handa@m17n.org>
1869 * mtext.c (count_utf_16_chars): Count each code of invalid
1872 2004-09-19 Kenichi Handa <handa@m17n.org>
1874 * mtext.c (default_utf_16, default_utf_32): Rename them to
1875 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
1878 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
1881 2004-09-13 Kenichi Handa <handa@m17n.org>
1883 * draw.c (Mlatin): Don't declare it here.
1884 (visual_order): Fix reordering of combining characters.
1885 (compose_glyph_string): Fix detection of script.
1886 (layout_glyphs): Don't fix reordering of combining characters
1888 (layout_glyph_string): Pay attention to
1889 control->disable_overlapping_adjustment.
1890 (truncate_gstring): Include at least on character in a line.
1891 (get_gstring): Always scan one full line.
1892 (mdraw__init): Don't initialize Mlatin here.
1893 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
1894 have a font, use ascent/descent of an ASCII font. Allow
1895 ink_array_return and logical_array_return to be NULL.
1896 (mdraw_coordinates_position): Fix iteration.
1898 * font-ft.c (MFTtoProp): Member completely changed.
1899 (ft_to_prop): Adjusted for the above change.
1900 (ft_to_prop_size): Likewise.
1901 (set_font_info): Adjusted for the change of MFTtoProp.
1902 (fc_generic_family_list): New variable.
1903 (fc_list): Add special handling of generic font names.
1904 (mfont__ft_init): Adjusted for the change of MFTtoProp.
1905 Initialize fc_generic_family_list.
1906 (mfont__ft_fini): Don't free ft_to_prop. Free
1907 fc_generic_family_list.
1908 (FC_vs_M17N_font_prop): New type.
1909 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
1910 (fc_decode_prop, fc_encode_prop): New functions.
1911 (mfont__ft_parse_name): Use fc_decode_prop.
1912 (mfont__ft_unparse_name): Use fc_encode_prop.
1914 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
1915 (MWDevice): Add member realized_font_list.
1916 (free_display_info): Don't free disp_info->realized_font_list.
1917 (free_device): Free device->realized_fontset_list.
1918 (xft_find_metric): Use gstring->frame instead of rfont->frame.
1919 (device_open): Don't initialize disp_info->realized_font_list.
1920 (device_open): Initialize device->realized_font_list and set it to
1921 frame->realized_font_list.
1923 * fontset.c (try_font_group): New function.
1924 (mfont__lookup_fontset): Use try_font_group.
1926 * font.c (common_weight): Change the order of "regular".
1928 * face.c (Mlatin): Don't make it static.
1929 (mface__realize): Be sure to set work_gstring.frame.
1930 (mface__for_chars): Likewise.
1932 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
1935 * internal-gui.h (Mlatin): Extern it.
1937 * m17n-gui.h (MDrawControl): New member
1938 disable_overlapping_adjustment.
1940 2004-09-06 Kenichi Handa <handa@m17n.org>
1942 * font-flt.c (run_otf): Fix typo ('}'->']').
1944 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
1945 (COMBINING_PRECOMPUTED_P): New macros.
1947 * draw.c (layout_glyphs): Handle precomputed combining code.
1949 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
1950 precomupted combining code.
1952 2004-09-03 Kenichi Handa <handa@m17n.org>
1954 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
1957 2004-08-27 Kenichi Handa <handa@m17n.org>
1959 * face.c (mface_put_prop): If the new value is the same as the
1960 current one, don't increment frame->tick.
1962 2004-08-25 Kenichi Handa <handa@m17n.org>
1964 * fontset.c (mfontset): Initialize font_spec_list member.
1965 (mfontset_copy): Load fontset if necessary.
1967 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
1968 'metrics' to for C++.
1970 * draw.c (mdraw_glyph_info): Adjusted for the member name change
1973 2004-08-16 Kenichi Handa <handa@m17n.org>
1975 * Version 1.1.0 released.
1977 2004-08-13 Kenichi Handa <handa@m17n.org>
1979 * language.c (mlang__init): Add Dhivehi.
1981 * m17n-gui.c (Mx, Mfreetype): Delete it.
1982 (m17n_init_win): Don't initialize Mx and Mfreetype here.
1984 * m17n-gui.h (Mfreetype, Mxft): Extern them.
1985 (mfont_resize_ratio): Extern it.
1986 (MDrawGlyphInfo): New member logical_width;
1987 (MDrawGlyph): New type.
1988 (mdraw_glyph_list): Prototype adjusted.
1990 * m17n-X.c (xfont_open): Set type and fontp members.
1991 (xft_open): Likewise.
1993 * internal-gui.h (Mx, Mfreetype): Delete extern.
1995 * font.h (struct MRealizedFont): New member type and fontp.
1997 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1998 (Mx, Mfreetype): Declare here.
1999 (Mxft): New variable.
2000 (mfont_resize_ratio): New function.
2002 * font-ft.c (ft_open): Set type and fontp members.
2004 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2007 2004-08-11 Kenichi Handa <handa@m17n.org>
2009 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2012 2004-08-06 Kenichi Handa <handa@m17n.org>
2014 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2017 * font-flt.c (run_otf): Print debugging information if necessary.
2019 2004-08-05 Kenichi Handa <handa@m17n.org>
2021 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2022 positioning_type 5 and 6. Switch simplified.
2024 2004-08-04 Kenichi Handa <handa@m17n.org>
2026 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2028 2004-08-02 Kenichi Handa <handa@m17n.org>
2030 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2031 set val to 1 even if it is greater than 1.
2033 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2035 2004-07-29 Kenichi Handa <handa@m17n.org>
2037 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2038 debugging information.
2040 * internal.h (MDEBUG_PRINT5): New macro.
2042 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2043 the previous one if the zero width glyph has left or right
2046 2004-07-26 Kenichi Handa <handa@m17n.org>
2048 * m17n-X.c (xft_render): Pay attention to members left_padding and
2049 right_padding of MGlyph.
2051 * draw.c (visual_order): Allocate one more elements for arrays as
2052 a workaround of fribidi bug.
2053 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2054 instead of MGlyph->bidi_sensitive.
2055 (layout_glyph_string): Pay attentinon to
2056 control->orientation_reversed when padding at the head or tail.
2057 Fix adjustment of space glyph width.
2058 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2061 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2062 instead of MGlyph->bidi_sensitive.
2064 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2066 2004-07-26 Kenichi Handa <handa@m17n.org>
2068 * draw.c (visual_order): Don't treat combined glyphs specially.
2069 (layout_glyphs): Don't get metrics glyphs that are already ready.
2070 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2071 width with the previous one.
2072 (draw_background): Fix bar cursor position on a r2l glyph.
2074 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2075 (run_rule): Fix place of updating cluster_begin_pos and
2076 cluster_end_pos here.
2077 (run_otf): Don't set left_padding.
2079 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2081 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2082 Fix handling of GPOS.
2083 (mfont__ft_drive_gpos): Delete this function.
2085 * font.h (mfont__ft_drive_otf): Renamed back from
2086 mfont__ft_drive_gsub.
2087 (mfont__ft_drive_gpos): Delete extern.
2089 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2090 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2092 2004-07-23 Kenichi Handa <handa@m17n.org>
2094 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2095 the same bidi level.
2097 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2099 2004-07-22 Kenichi Handa <handa@m17n.org>
2101 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2103 2004-07-20 Kenichi Handa <handa@m17n.org>
2105 * draw.c (render_glyphs): Fix checking of g->code validity.
2107 * face.c (mface__realize): Set g.type.
2109 2004-07-18 Kenichi Handa <handa@m17n.org>
2111 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2114 * m17n-gui.c (mframe): Print error message give by dlopen to
2117 2004-07-16 Kenichi Handa <handa@m17n.org>
2119 * draw.c (compose_glyph_string): Improve the way of deciding a
2120 script. For a character that doesn't have script property, use
2121 the last non-latin script.
2123 * font-ft.c (fc_list): Cancel previous change.
2124 (mfont__ft_init): Add more entries in ft_to_prop_name.
2126 2004-07-15 Kenichi Handa <handa@m17n.org>
2128 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2129 previous or next character glyphs.
2131 2004-07-14 Kenichi Handa <handa@m17n.org>
2133 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2134 of type GLYPH_SPACE.
2136 * fontset.c (mfont__lookup_fontset): If glyph type is
2137 GLYPH_SPACE, get codes for SPACE.
2139 * internal-gui.h (Mfont): Delete extern.
2141 * m17n-gui.h (Mfont): Delete duplicated extern.
2143 2004-07-13 Kenichi Handa <handa@m17n.org>
2145 * font-ft.c (DEVICE_DELTA): New macro.
2146 (adjust_anchor): New function.
2147 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2149 (mfont__ft_drive_gpos): New function.
2151 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2152 (FontLayoutContext): Delete member `rfont'.
2153 (run_otf): Set g->otf_cmd. Call
2154 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2155 only whne HAVE_OTF is defined.
2157 * fontset.c: Include "config.h".
2159 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2160 (MGlyph): New member otf_cmd.
2162 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2163 (mfont__ft_drive_gpos): Extern it.
2165 * face.c: Include "config.h".
2167 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2169 * input-gui.c: Include "config.h".
2171 * plist.c: Include "config.h".
2173 2004-07-06 Kenichi Handa <handa@m17n.org>
2175 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2176 internal-gui.h: Cancel previous changes.
2178 * m17n-gd.h: Delete it.
2180 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2181 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2182 @XML2_LD_FLAGS@ to above.
2183 (libm17n_la_LIBADD): Add -ldl.
2184 (libm17n_la_LDFLAGS): Add -export-dynamic.
2185 (X_LD_FLAGS): Fix the order of linking.
2186 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2187 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2188 (libm17n_X_la_LDFLAGS): Add -module.
2189 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2190 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2191 (libm17n_gd_la_LDFLAGS): Add -module.
2192 (include_HEADERS): Delete m17n-gd.h.
2194 2004-06-30 Kenichi Handa <handa@m17n.org>
2196 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2197 (MDeviceLibraryInterface): Delete it.
2198 (register_device_library): Delete it.
2199 (m17n__device_library_list): Renamed from device_library_list.
2201 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2202 (m17n_init_win): Adjust prototype.
2204 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2205 (m17n_init_gd): New function.
2207 * m17n-gd.h: New file.
2209 * m17n-X.h: Include <m17n-gui.h>.
2210 (m17n_init_X): Extern it.
2211 (M17N_INIT): Redefine it.
2213 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2214 (m17n_init_X): New function.
2216 * internal-gui.h (m17n__device_library_list): Extern it.
2217 (struct MDeviceDriver): New members initialized, init, and fini.
2219 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2221 (libm17n_X_la_LIBADD): Delete aboves.
2222 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2223 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2224 (libm17n_gd_la_LDFLAGS): Delete it.
2225 (include_HEADERS): Add m17n-gd.h.
2227 2004-06-25 Kenichi Handa <handa@m17n.org>
2229 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2230 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2232 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2234 * font-ft.c (fc_list): If FcFontList finds no font, try
2237 * draw.c (compose_glyph_string): Terminate the last loop after
2238 doing default combining if necessary.
2240 2004-06-24 Kenichi Handa <handa@m17n.org>
2242 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2244 * character.c (mchar_define_property): Add const to an arg.
2246 * charset.c (mchar_define_charset): Add const to an arg.
2248 * coding.c (MCodingSystem): Add const to an arg or decoder.
2249 (finish_decoding): Add const to an arg.
2250 (decode_coding_charset, decode_coding_utf_8)
2251 (decode_coding_utf_16, decode_coding_utf_32)
2252 (decode_coding_iso_2022, decode_coding_sjis)
2253 (mconv_define_coding): Likewise.
2255 * m17n-X.c (xft_find_metric): Delete unused variable.
2257 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2260 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2263 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2264 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2266 * mtext.h (mtext__from_data): Ajust prototype.
2268 2004-06-23 Kenichi Handa <handa@m17n.org>
2270 * draw.c (compose_glyph_string): Always get glyph codes by
2272 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2273 (mdraw_glyph_list): New function.
2275 * font-flt.c (mfont__flt_run): Be sure to call
2276 rfont->driver->encode_char.
2278 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2279 (ft_encode_char): Delete arg C.
2280 (ft_render): Don't call FT_Get_Char_Index.
2282 * font.c (mfont__encodable_p): Delete it.
2283 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2285 * font.h (struct MFontDriver): Delete arg C of encode_char.
2286 (mfont__encodable_p): Delete extern.
2288 * m17n-X.c (xfont_encode_char): Delete arg C.
2289 (xft_find_metric): Don't cal FT_Get_Char_Index.
2290 (xft_render): Likewise.
2292 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2294 (mdraw_glyph_list): Extern it.
2296 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2298 2004-06-22 Kenichi Handa <handa@m17n.org>
2300 * m17n-gui.h (mfontset_lookup): Extern it.
2302 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2304 * fontset.c (realize_fontset_elements)
2305 (free_realized_fontset_elements, update_fontset_elements): New
2307 (mfont__realize_fontset): Call realize_fontset_elements.
2308 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2309 (mfont__lookup_fontset): If a fontset was modified, update
2310 the realized fontset.
2311 (mfontset_modify_entry): Increment fontset->tick.
2312 (mfontset_lookup): New function.
2314 2004-06-21 Kenichi Handa <handa@m17n.org>
2316 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2318 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2319 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2320 length of source text 0.
2322 2004-06-21 Kenichi Handa <handa@m17n.org>
2324 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2325 (compare): Pay attention to format other than utf-8.
2326 (copy): Delete this function.
2327 (count_by_utf_8, count_by_utf_16, insert): New functions.
2328 (count_utf_16_chars): Fix handling of a surrogate pair.
2329 (find_char_forward, find_char_backward): Likewise.
2330 (mtext__from_data): Delete unnecessary check. Fix number of
2332 (mtext_from_data): Don't count items.
2333 (mtext_ref_char): Optimize the code.
2334 (mtext_set_char): Pay attention to format other than utf-8.
2335 (mtext_cat_char): Likewise.
2336 (mtext_dup): Don't call copy, instead do allocation here.
2337 (mtext_cat): Call insert instead of copy.
2338 (mtext_ncat): Likewise.
2339 (mtext_cpy): Delete character at first and call insert instead of
2341 (mtext_ncpy): Likewise.
2342 (mtext_copy): Likewise.
2343 (mtext_duplicate): Call insert instead of copy.
2344 (mtext_del): Pay attention to format other than utf-8.
2345 (mtext_ins): Simply call insert.
2346 (mtext_ins_char): Pay attention to format other than utf-8.
2347 (mtext_tok): Call insert instead of copy.
2348 (mtext_text): Call UNIT_BYTES.
2350 * textprop.c (mtext__adjust_plist_for_change): New function.
2352 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2353 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2354 (CHAR_UNITS_AT): Fix typo.
2355 (CHAR_UNITS_BY_HEAD): Fix typo.
2356 (STRING_CHAR_AND_UNITS): Fix typo.
2358 * internal.h (MTEXT_READ_ONLY_P): New macro.
2360 * mtext.h (mtext__replace): Delete the extern.
2361 (mtext__adjust_foramt): Adjust prototype.
2363 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2364 if possible. Otherwise make a copy of mmt.
2366 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2369 2004-06-18 Kenichi Handa <handa@m17n.org>
2371 * character.h (CHAR_STRING_UTF16): Fix syntax.
2373 2004-06-16 Kenichi Handa <handa@m17n.org>
2375 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2376 (libm17n_X_la_LIBADD): Delete it.
2377 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2379 * m17n-X.c (device_open): Add parens in `if' condition.
2381 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2382 (DEC_POSITION): Likewise.
2383 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2385 2004-06-15 Kenichi Handa <handa@m17n.org>
2387 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2390 * draw.c (compose_glyph_string): If langauge is specified, call
2391 mface__for_chars even if a text is all latin. Fix condition for
2392 setting non_ascii_found.
2394 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2396 * m17n.h (minput_char_to_key): Delete extern.
2398 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2400 * m17n-gui.c (null_device_open): Set several members of frame.
2402 2004-06-14 Kenichi Handa <handa@m17n.org>
2404 * m17n-gui.h (minput_event_to_key): Delete extern.
2406 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2408 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2410 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2412 2004-06-08 Kenichi Handa <handa@m17n.org>
2414 * character.c (mchar_put_prop): Don't increment the ref-count of
2417 2004-06-04 Kenichi Handa <handa@m17n.org>
2419 * m17n-core.c (mdebug__register_object): New function.
2420 (mdebug__unregister_object): Likewise.
2422 * internal.h (mdebug__register_object, mdebug__unregister_object):
2424 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2427 * charset.c (mcharset__load_from_database): Don't call
2428 mconv__register_charset_coding here.
2430 * coding.c (find_coding): Get a real name from an element of
2431 coding_definition_list.
2432 (mconv__register_charset_coding): Set the real name at the top of
2434 (mcoding__load_from_database): Likewise.
2435 (mconv_list_codings): Adjusted for the above change.
2437 2004-06-03 Kenichi Handa <handa@m17n.org>
2439 * coding.c (find_coding): Find by canonicalized name. Don't have
2440 to modify the element of coding_definition_list by
2442 (mconv__define_coding_from_charset): Delete it.
2443 (mconv__register_charset_coding): Canonicalize sym.
2444 (mcoding__load_from_database): Register plist modified by
2447 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2449 * font-ft.c (ft_open): Fix setting of rfont->descent.
2451 2004-06-02 Kenichi Handa <handa@m17n.org>
2453 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2454 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2455 (xlfd_unparse_name): Renamed from xfont_build_name.
2456 (mfont__init): Initialized Mfontconfig.
2457 (mfont__free_realized): Unconditionally unref rfont->info.
2458 (mfont__select): Free `this' if it's not best.
2459 (mfont__open): Don't check frame->realized_font_list.
2460 (mfont__parse_name_into_font): New function.
2461 (Mfontconfig): New variable.
2462 (mfont_from_name): Call mfont_parse_name.
2463 (mfont_name): Call mfont_unparse_name.
2464 (mdebug_dump_font): Likewise.
2466 * font.h (struct MFontDriver): Delete members parse_name and
2468 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2469 (mfont__parse_name_into_font): Extern it.
2471 * font-ft.c: Include "symbol.h".
2472 (close_ft): Unconditionally free filename and charmap_list of
2474 (ft_open): Duplicate base->filename. Increment ref-count of
2475 ft_info->charmap_list. Free ft_info->charmap_list and
2476 ft_info->filename on error.
2477 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2479 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2481 (enum xlfd_field_idx): Moved to font.c.
2482 (split_font_name, build_font_name): Likewise.
2483 (build_font_list): Call mfont__parse_name_info_font.
2484 (xfont_open): Call mfont__unparse_name. Free name.
2485 (xfont_parse_name, xfont_build_name): Moved to font.c
2486 (xft_select): Prototype deleted.
2487 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2488 Call mfont_pase_name.
2490 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2491 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2494 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2497 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2499 2004-06-01 Kenichi Handa <handa@m17n.org>
2501 * fontset.c (mfontset_modify_entry): Pay attention to the case
2502 that fontset->font_spec_list is NULL.
2504 2004-05-31 Kenichi Handa <handa@m17n.org>
2506 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2508 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2510 * font.c (mfont__select): Print score the a font for debugging.
2512 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2514 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2515 kanji_sym and kana_sym.
2517 2004-05-28 Kenichi Handa <handa@m17n.org>
2519 * Makefile.am (VINFO): New variable.
2520 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2521 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2523 2004-05-27 Kenichi Handa <handa@m17n.org>
2525 The following chanages are to make device dependent functions
2526 accessible only from MDeviceDriver structure, and to add GD and
2527 null device drivers. Font drivers get also device dependent.
2529 * m17n.c (m17n_init): Increament shell_initialized.
2530 (m17n_fini): Decremented shell_initialized.
2532 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2534 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2535 (Mwidget, Mcolormap, Mx): Extern them.
2537 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2538 (free_frame): Call frame->driver->close instead of
2540 (DLOPEN_SHLIB_EXT): New macro.
2541 (MDeviceLibraryInterface): New type.
2542 (device_library_list): New variable.
2543 (register_device_library): New function.
2544 (null_device): New variable.
2545 (null_device_close, null_device_get_prop)
2546 (null_device_realize_face, null_device_free_realized_face): New
2548 (null_driver): New variable.
2549 (null_device_init, null_device_fini, null_device_open): New
2551 (null_interface): New variable.
2552 (Mfreetype, Mdevice): Declare them.
2553 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2554 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2555 Mwin__Close_Device. Register drivers for Mx and Mgd.
2556 (m17n_fini_win): Decremented win_initialized. Call "fini"
2557 function of all opened devices. Don't call mwin__fini.
2558 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2560 (mframe): Handle Mdevice key of PLIST.
2561 (mframe_get_prop): Call frame->device->get_prop instead of
2562 mwin__device_get_prop.
2564 * m17n-gd.c: New file.
2566 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2567 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2569 * m17n-core.c (m17n_init_core): Increate core_initialized.
2570 (m17n_fini_core): Decremented core_initialized.
2572 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2573 (Mcolormap): Don't extern them here.
2575 * m17n-X.c (FRAME_DEVICE): New macro.
2576 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2577 (free_display_info): Use MPLIST_DO.
2578 (free_device): Free rface->info.
2579 (xft_close): Delete it.
2580 (device_init): Renamed from mwin__init.
2581 (device_fini): Renamed from mwin__fini.
2582 (device_open): Renamed from mwin__open_device.
2583 (x_driver): New variable.
2584 (MXFontInfo): Delete member frame, add member display.
2585 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2586 Don't declare them here.
2588 * internal-gui.h (MDeviceType): New enum.
2589 (MWDefice): Delete it.
2590 (struct MFrame): Change type of device to void *. New members
2591 device_type, driver, font_driver_list.
2592 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2593 (MDeviceDriver): New type.
2594 (Mx, Mgd, Mfreetype): Extern them.
2595 (mwin__XXX): Delete all of them.
2597 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2599 (win_destroy_ic): Likewise.
2600 (adjust_window_and_draw): Likewise.
2601 (win_callback): Likewise.
2602 (Mxim): Declare it here.
2603 (minput_event_to_key): Call M_CHECK_READABLE.
2605 * fontset.c (mfont__lookup_fontset): Delete local variable
2608 * font.h (struct MFontDriver): Delete member close, add members
2609 parse_name and build_name.
2610 (mfont__driver_list): Delete extern.
2611 (mfont__close): Delete extern.
2613 * font.c (mfont__init): Don't set mfont__driver_list.
2614 (mfont__fini): Don't unref mfont__driver_list.
2615 (mfont__select): Try font drivers in frame->font_driver_list. Set
2616 driver member of a realized font.
2617 (mfont__close): Delete it.
2618 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2619 functions of the default frame.
2621 * font-ft.c (close_ft): Check ft_info->ft_face and work
2623 (add_font_info): Allocate ft_info by M17N_OBJECT.
2624 (ft_close): Delete it.
2625 (mfont__ft_driver): Don't set ft_close.
2626 (ft_select): Increment ref-count of best_font.
2627 (ft_open): Decremented ref-count of base. On error, call
2628 FT_Done_Face and free ft_info.
2629 (ft_find_metric): Always use XXX_MONO in load_flags.
2630 (ft_render): Fix setting of width. Call
2631 frame->driver->draw_points instead of mwin__draw_points.
2632 (ft_to_prop): Don't set mfont__driver_list.
2633 (mfont__ft_fini): Just unref ft_info.
2635 * face.c (mface__init): Exchange foreground and background of
2636 mface__default. Call mface_put_prop to set hline of
2638 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2639 (mface__free_realized): Don't call mwin__free_realized_face.
2641 * draw.c (Mdepth): Don't declare it here.
2642 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2643 (render_glyphs, render_glyph_string): Likewise.
2644 (mdraw__init): Don't set Mdepth.
2645 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2647 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2649 (mdraw_text_items): Check FRAME is writable.
2650 (mdraw_per_char_extents): Implement body.
2652 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2654 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2655 (GUI_SOURCES): Delete it.
2656 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2657 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2658 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2659 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2660 (linkgui_LDADD): Set to libm17n-gui.la
2661 (linkgui_LDFLAGS): New target.
2662 (SRC): Include ${libm17n_gui_la_SOURCES} and
2663 ${libm17n_gd_la_SOURCES}.
2665 2004-05-24 Kenichi Handa <handa@m17n.org>
2667 * draw.c (draw_background): Don't draw background even if
2668 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2670 2004-05-22 Kenichi Handa <handa@m17n.org>
2672 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2674 2004-05-20 Kenichi Handa <handa@m17n.org>
2676 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2678 * m17n-gui.c: Include "plist.h".
2679 (mframe): If PLIST is NULL, initialize it to emply plist.
2681 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2682 (xft_driver): New variable.
2683 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2684 (xft_find_metric, xft_render): New function.
2685 (mwin__init): Adjusted for the new mfont__driver_list.
2686 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2687 generated face to PARAM.
2688 (mwin__realize_face): Fix setting of box colors. Don't call hook
2690 (mwin__draw_hline): New function.
2691 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2692 (mwin__xft_render): Delete these function.
2694 * internal-gui.h (struct MFrame): New member tick.
2695 (struct MGlyphString): New member tick.
2696 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2697 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2698 (mwin__xft_render): Delete extern.
2700 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2701 (mfontset): Always increment the reference count of returned
2704 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2705 (MFTInfo): Moved to font.h.
2706 (ft_iso8859_1_font_list): Delete this variable.
2707 (set_font_info): Don't set font->property[MFONT_TYPE].
2708 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2709 (add_font_info): Change type to void.
2710 (fc_list): Change anme from xft_list. Caller changed. Include
2711 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2712 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2713 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2714 (close_ft): Don't call mwin__xft_close. Unref
2715 ft_info->extra_info.
2716 (ft_open): Don't setup ft_info->fontname. Don't call
2718 (ft_find_metric): Don't call mwin__xft_get_metric.
2719 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2720 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2721 (mfont__ft_init): Adjusted for new mfont__driver_list.
2722 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2724 * font.c (mfont__driver_list): Make it MPlist.
2725 (mfont__init): Adjust initialization of mfont__driver_list.
2726 (mfont__fini): Free mfont__driver_list.
2727 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2728 (mfont__select): Adjusted for the new mfont__driver_list.
2730 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2731 (mfont__drirver_list): Adjust prototype.
2732 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2734 * face.h (struct MFace): Delete member realized_face_list, add
2736 (struct MRealizedFace): Delete member need_update
2737 andnofont_rface, add member non_ascii_list.
2738 (mface__update_frame_face): Extern it.
2740 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2742 (get_hline_create, get_box_create): New functions.
2743 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2745 (free_face): Cancep previous change. Free face->frame_list.
2746 (serialize_hline): Do nothing if hline->width is zero.
2747 (serialize_box): Do nothing if box->width is zero.
2748 (mface__init): Setup all properties of mface__default.
2749 (mface__fini): Free hline_prop_list and box_prop_list.
2750 (mface__realize): Cancel previous change. Update
2751 face->frame_list. Setup rface->non_ascii_list.
2752 (mface__for_chars): Update rface->non_ascii_list.
2753 (mface__free_realized): Free rface->non_ascii_list.
2754 (mface__update_frame_face): New function.
2755 (mface): Initialize face->frame_list.
2756 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2758 (mface_merge): Likewise.
2759 (mface_put_prop): If key is Mhline or Mbox, get value by
2760 get_hline_create or get_box_create respectively.
2761 (mface_put_prop): Update frame->tick and call
2762 mface__update_frame_face if necessary.
2763 (mface_update): Do nothing if func is noop_hook.
2765 * draw.c (render_glyphs): If a font is not found, use
2766 mwin__draw_empty_boxes.
2767 (alloc_gstring): Initialize gstring->tick.
2768 (get_gstring): Check gstring->tick.
2770 2004-05-17 Kenichi Handa <handa@m17n.org>
2772 * face.c (find_realized_face): Return value changed. If RFONT is
2773 NULL, avoid unnecessary checking.
2774 (free_face): Free face->realized_face_list.
2775 (mface__realize): Adjusted for the change of find_realized_face.
2776 If it returns a realized face that needs update, free it and
2777 realize a new one. Push a new realized face to
2778 frame->realized_face_list instead of appending.
2779 (mface__for_chars): Adjusted for the change of find_realized_face.
2780 Short cut if the required font is in rface->ascii_rface.
2781 (mface_put_prop): Free old value if necessary. Set need_update
2782 member of realized faces to 1.
2784 * face.h (struct MFace): Delete member tick, add member
2786 (struct MRealizedFace): Delete member tick, add member
2789 2004-05-13 Kenichi Handa <handa@m17n.org>
2791 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2793 2004-05-12 Kenichi Handa <handa@m17n.org>
2795 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2797 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2798 parse it XftNameParse.
2800 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2801 (all_fonts_scaned): New variable.
2802 (set_font_info): FAMILY may be Mnil.
2803 (add_font_info): Argument changed.
2804 (xft_list): Call add_font_info in it.
2805 (ft_list): Likewise.
2806 (ft_select): Make it work in the case family is Mnil.
2807 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2808 (mfont__ft_fini): Set all_fonts_scaned to 0.
2810 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2811 that is failed to open.
2813 2004-05-10 Kenichi Handa <handa@m17n.org>
2815 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2816 device's depth is 1 (i.e. monochrome).
2818 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2819 to work around the problem of libtool.
2821 * font-ft.c: Include <freetype/ftbdf.h>.
2822 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2824 (mfont__ft_init): Initialize them.
2825 (ft_iso8859_1_font_list): New variable.
2826 (set_font_info): Detect a font containing iso8859-1 glyphs and
2827 register it in ft_iso8859_1_font_list. If the font is not
2828 scalable, assume it as BDF or PCF font and setup SIZE and RESY
2829 properties of the font from its properties.
2830 (add_font_list): If the font is not scalable, check if it is BDF
2831 or PCF font. If not, ignore it.
2832 (ft_select): If FAMILY is Mnil, return NULL only if the requested
2833 registry is not iso8859-1.
2834 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2835 ft_iso8859_1_font_list.
2836 (ft_find_metric): If the font is not scalable, assume it as BDF
2837 or PCF, and get a metric from its properties.
2838 (mfont__ft_fini): Free ft_iso8859_1_font_list.
2840 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
2842 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2843 (libm17n_la_LDFLAGS): Delete it.
2844 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2845 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2847 2004-05-06 Kenichi Handa <handa@m17n.org>
2849 * draw.c (compose_glyph_string): Fix previous change.
2851 2004-04-30 Kenichi Handa <handa@m17n.org>
2853 * font-ft.c (ft_list): Delete unused variable `result'.
2854 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
2856 2004-04-27 Kenichi Handa <handa@m17n.org>
2858 * m17n-X.c: Include config.h
2859 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
2860 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
2861 (MWDevice) [HAVE_XFT2]: New member xft_draw.
2862 (FRAME_CMAP, FRAME_VISUAL): New macros.
2863 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
2864 (xfont_driver): Make it static.
2865 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
2866 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
2867 info->xft_color_back.
2868 (MXftFontInfo) [HAVE_XFT2]: New type.
2869 (mwin__xft_close) [HAVE_XFT2]: New function.
2870 (mwin__xft_open) [HAVE_XFT2]: New function.
2871 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
2872 (mwin__xft_render) [HAVE_XFT2]: New function.
2874 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2875 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
2876 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
2879 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2881 * font-ft.c: Don't include FT_FREETYPE_H here.
2882 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
2883 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
2884 (MFTInfo): New member charmap_index.
2885 (MFTInfo) [HAVE_XFT2]: New member xft_info.
2886 (check_otf_filename): Renamed from check_filename. Return value
2888 (ft_set_property): This function deleted.
2889 (set_font_info): New function.
2890 (add_font_list): Argument changed. Add multiple fonts.
2891 (xft_list) [HAVE_XFT2]: New function.
2892 (ft_list) [not HAVE_XFT2]: New function.
2893 (ft_select): Add code for Xft.
2894 (close_ft): Likewise.
2895 (ft_open): Likewise.
2896 (ft_find_metric): Likewise.
2897 (ft_encode_char): Likewise.
2898 (ft_render): Likewise.
2900 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
2902 2004-04-26 Kenichi Handa <handa@m17n.org>
2904 * textprop.c (mtext_attach_property): Declare the return type as
2907 2004-04-21 Kenichi Handa <handa@m17n.org>
2909 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
2911 2004-04-09 Kenichi Handa <handa@m17n.org>
2913 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
2915 (load_command): Setup above members.
2917 2004-04-05 Kenichi Handa <handa@m17n.org>
2919 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
2921 2004-03-30 Kenichi Handa <handa@m17n.org>
2923 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
2926 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
2927 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
2929 2004-03-29 Kenichi Handa <handa@m17n.org>
2931 * Version 1.0 Patch Level 2 released.
2933 2004-03-29 Kenichi Handa <handa@m17n.org>
2935 * charset.c (make_charset): Set charset->fully_loaded and
2936 charset->simple correctly. Don't try to get charset->min_char and
2937 charset->max_char for a charset of method subset and superset.
2938 Don't load a mapping file here.
2939 (mcharset__init): Set unified_max.
2940 (mcharset__load_from_database): Free a working plist.
2942 * coding.c (mcoding__fini): Free all malloced data.
2944 * input-gui.c (win_create_ic): Set control.as_image for preediting
2947 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
2948 `count') to initialize the array.
2950 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
2953 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
2955 (mwin__create_window): Fix bug of setting a background pixel of a
2957 (mwin__adjust_window): Clear the window before drawing.
2959 * m17n-core.c (mdebug__report_object): Free array->objectes if
2961 (m17n_init_core): Don't set report_header_printed to 0 here.
2962 Fix debugging information.
2963 (m17n_fini_core): Set report_header_printed to 0 here.
2965 * m17n-core.h (mplist_deserialize): Extern it.
2967 * m17n-gui.c (m17n_fini_win): Fix debugging information.
2969 * m17n.c (m17n_fini): Fix debugging information.
2971 * mtext.c (mtext__adjust_foramt): New function.
2973 * mtext.h (mtext__adjust_foramt): Extern it.
2975 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2977 * plist.h (mplist__deserialize): Don't extern it.
2979 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
2980 elements of symbol_table to NULL. Report about created and freed
2981 symbols if MDEBUG_FINI is set.
2983 2004-03-22 Kenichi Handa <handa@m17n.org>
2985 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2987 * m17n.c (m17n_init): Fix the way of checking merror_code.
2989 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2991 2004-03-22 Kenichi Handa <handa@m17n.org>
2993 * fontset.c (realize_font_group): Adjust the font size by
2994 mfont__resize before selecting a font.
2996 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2998 2004-03-19 Kenichi Handa <handa@m17n.org>
3000 * Version 1.0 Patch Level 1 released.
3002 2004-03-19 Kenichi Handa <handa@m17n.org>
3004 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3006 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3008 2004-03-19 Kenichi Handa <handa@m17n.org>
3010 Re-apply the changes forgotten in the released version.
3012 * charset.c (mcharset__load_from_database): Call
3013 mchar_define_charset.
3015 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3016 (mconv_encode_range): Put Mcoding text property.
3018 2004-03-18 Kenichi Handa <handa@m17n.org>
3020 * draw.c (Mdepth): New variable.
3021 (visual_order): Delete unused local var `pos'.
3022 (compose_glyph_string): Fix for the case that gstring->glyphs is
3023 realloced. Stop generating glyphs at TO. Fix handling of
3025 (layout_glyphs): Get metrics of all glyphs in advance. Set
3026 lbearing and rbearing of base of composition glyph correctly.
3027 Handle left-overhang glyphs correctly.
3028 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3030 (dump_combining_code): Change the defualt off_x character to ".".
3031 (mdraw__init): Initialize Mdepth.
3033 * face.c (work_gstring): New variable
3034 (mface__init): Initialize work_gstring.
3035 (mface__fini): Free work_gstring.glyphs.
3036 (mface__realize): Don't handle videomode property here. Adjusted
3037 for the change of mfont__get_metric.
3038 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3040 * face.h (enum face_gc): Moved to m17n-X.c.
3042 * font.h (struct MFontDriver): Arguments of find_metric changed.
3043 (mfont__select): Prototype adjusted.
3044 (mfont__get_metric): Likewise.
3045 (mfont__ft_drive_otf): Likewise.
3046 (mfont__flt_run): Likewise.
3048 * font.c (mfont__select): New argument layouter. If layouter is
3049 different in the registered font, make a new copy of realized
3051 (mfont__get_metric): Argument changed. Get metrics of multiple
3053 (mfont_find): Call mfont__select with layouter as Mnil.
3055 * font-flt.c (FontLayoutContext): New member rfont.
3056 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3057 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3059 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3061 (NUM_POINTS): New macro.
3062 (MPointTable): New type.
3063 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3064 (mfont__ft_drive_otf): New argument rfont.
3066 * fontset.c (realize_font_group): Adjusted for the changed of
3068 (check_fontset_element): This function deleted.
3070 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3071 off the parent window if the preedit text is zero length.
3073 * internal-gui.h (struct MFrame): New members foreground,
3074 background, videomode, font.
3075 (struct MGlyphString): New member anti_alias.
3076 (MDrawPoint): New type.
3077 (mwin__draw_bitmap): Prototype deleted.
3078 (mwin__draw_points): Prototype added.
3080 * m17n-gui.h (MDrawControl): New member anti_alias.
3082 * m17n-gui.c (free_frame): Free frame->font.
3083 (mframe): Set the fontset of frame->face to the default fontset.
3085 * m17n-X.c (RGB_GC): New type.
3086 (enum gc_index): Renamed from enum face_gc. Member names changed.
3088 (struct MWDevice): Members foreground and background deleted. New
3089 member scratch_gc, gc_list.
3090 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3091 (free_device): Free GCs in device->gc_list.
3092 (get_rgb_gc): New function.
3093 (get_gc): Renamed and argument changed from get_color.
3094 (get_gc_for_anti_alias): New function.
3095 (xfont_find_metric): Arguments changed. Get metrics of multiple
3097 (set_region): Argument changed. Caller changed.
3098 (xfont_render): Allways set a font in gc.
3099 (x_error_handler, x_io_error_handler): Define only if
3100 X_SET_ERROR_HANDLER is defined.
3101 (mwin__open_device): Create device->scratch_gc. Set members
3102 foreground, background, and videomode of frame. Call
3103 XSetErrorHandler and XSetIOErrorHandler only if
3104 X_SET_ERROR_HANDLER is defined.
3105 (struct gc_list): Deleted.
3106 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3107 (mwin__realize_face): Adjusted for the change of the format of
3108 rface->info and the charge of set_region.
3109 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3110 (mwin__draw_box): Likewise.
3111 (mwin__draw_bitmap): This function deleted.
3112 (mwin__draw_points): New function.
3113 (mwin__verify_region): Adjusted for the change of the format of
3114 rface->info and the charge of set_region.
3115 (mwin__create_window): Inherit backgound pixel from parent.
3116 (mwin__dump_gc): Adjusted for the change of the format of
3119 2004-03-16 Kenichi Handa <handa@m17n.org>
3121 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3123 * input.c (M_key_alias): New variable.
3124 (handle_key): Try M_key_alias property of a key too.
3125 (minput__init): Initialize M_key_alias. Give that property to
3126 symbols in one_char_symbol. Fix bug of initializing
3129 * draw.c (compose_glyph_string): Don't handle
3130 ignore_formatting_char here. Include formatting characters in the
3131 range processed by a FTL.
3132 (layout_glyph_string): Handle ignore_formatting_char here.
3134 2004-03-12 Kenichi Handa <handa@m17n.org>
3136 * input-gui.c (win_create_ic): Enable bidi in status control.
3138 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3140 2004-03-09 Kenichi Handa <handa@m17n.org>
3142 * input.c (load_input_method): If title is not specified, use the
3143 input method name as title.
3145 * m17n-X.c (get_color): Make it static.
3146 (xim_create_ic, xim_destroy_ic, x_error_handler)
3147 (x_io_error_handler): Likewise.
3149 2004-03-01 Kenichi Handa <handa@m17n.org>
3151 * Version 1.0 released.
3154 Copyright (C) 2003, 2004
3155 National Institute of Advanced Industrial Science and Technology (AIST)
3156 Registration Number H15PRO112
3158 This file is part of the m17n library.
3160 The m17n library is free software; you can redistribute it and/or
3161 modify it under the terms of the GNU Lesser General Public License
3162 as published by the Free Software Foundation; either version 2.1 of
3163 the License, or (at your option) any later version.
3165 The m17n library is distributed in the hope that it will be useful,
3166 but WITHOUT ANY WARRANTY; without even the implied warranty of
3167 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3168 Lesser General Public License for more details.
3170 You should have received a copy of the GNU Lesser General Public
3171 License along with the m17n library; if not, write to the Free
3172 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA