1 2006-07-03 Kenichi Handa <handa@m17n.org>
3 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
6 * plist.c (dump_plist_element): Fix previous change.
8 2006-06-28 Kenichi Handa <handa@m17n.org>
10 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
13 * draw.c (MbidiNSM): New variable.
14 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
15 attention to bidi type NSM.
16 (mdraw__init): Initialize MbibiNSM.
18 * language.c (mscript__char_list): Fix finding a char-list element.
20 * plist.c (dump_string): Return number of printed characters.
21 (dump_plist_element): Print elements more compactly.
23 2006-06-23 Kenichi Handa <handa@m17n.org>
25 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
26 (include_HEADERS): Likewise.
28 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
30 * language.c: Update documentation.
32 2006-06-23 Kenichi Handa <handa@m17n.org>
34 * font-ft.c (struct MFontFT): Delete member lang.
35 (free_ft_info): Don't unref member lang. Destroy members langset
37 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
38 changed. Set members langset and charset.
39 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
41 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
43 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
44 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
45 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
46 characters at first. If it fails, try listing by language names.
47 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
48 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
49 change of MFontCapability.
50 (ft_list_capability): Likewise. Try listing by languages, then by
51 scripts. Check OTF at last.
52 (ft_check_script): New function.
53 (ft_select): Adjusted for the check of MFontCapability.
54 (ft_list_family_names): New function.
55 (ft_check_capability): If cap->script is not Mnil, call
57 (mfont__ft_driver): Initialize with ft_list_family_names.
59 * font.h (struct MFontDriver): New member list_fmaily_names.
60 (struct): Change member "MSymbol *lang" to "MSymbol language".
62 * font.c: Include "language.h".
64 (otf_script_list, load_otf_script_list): Delete it.
65 (find_script_from_otf_tag): Delete it.
66 (merge_capability): New function.
67 (mfont__init): Init Motf.
68 (mfont__fini): Don't unref otf_script_list.
69 (free_font_capability): Check cap->script_tag to determine if
70 OTF-related capability is set.
71 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
72 the change of type MFontCapability.
73 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
75 (mfont_list): Call merge_capability for LANGUAGE arg.
76 (mfont_list_family_names): New function.
78 * input-gui.c: Typo in comments fixed.
80 * input.c: Typo in comments fixed.
82 * language.h (mlanguage__list): Delete it.
83 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
86 * language.c: Include "mtext.h".
87 (M_script_lang_list): Delete it.
88 (language_list, script_list): New variables.
89 (load_lang_script_list, init_language_list, init_script_list): New
91 (mlang__init): Don't load language database here.
92 (mlang__fini): Unref language_list and script_list if not NULL.
93 (mlanguage__list): Delete it.
94 (mlanguage__info, mscript__info, mscript__char_list)
95 (mscript__otf_tag, mscript__from_otf_tag): New functions.
96 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
97 (mscript_list, mscript_language_list): New functions.
99 * m17n-gui.h (mfont_list_family_names): Extern it.
101 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
102 (mlanguage_text, mscript_list, mscript_language_list): Extern
105 2006-06-21 Kenichi Handa <handa@m17n.org>
107 * m17n-X.c (xfont_driver): Initialize with
108 xfont_list_family_names.
109 (xfont_list_family_names): New function.
110 (xft_driver): Initialize with NULL for list_family_names member.
111 (device_init): Set list_family_names member of xft_driver to that
114 2006-06-06 Kenichi Handa <handa@m17n.org>
116 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
118 2006-03-24 Kenichi Handa <handa@m17n.org>
120 * font-ft.c (ft_open): Improve debug message.
122 * fontset.c (mfontset__get_font): Fix for the case that no font in
123 per_script list is available.
125 2006-02-06 Kenichi Handa <handa@m17n.org>
127 * Version 1.3.3 released.
129 2006-02-22 Kenichi Handa <handa@m17n.org>
131 * textprop.c: Fix some typos in documentation.
133 * plist.c: Fix some typos in documentation.
135 * m17n-core.h: Fix some typos in documentation.
136 (M17NLIB_PATCH_LEVEL): Updated to 3.
137 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
139 * symbol.c: Fix some typos in documentation.
141 * mtext.c: Fix some typos in documentation.
143 * input.c: Fix several typos in documentation.
145 2006-02-06 Kenichi Handa <handa@m17n.org>
147 * Version 1.3.2 released.
149 2006-02-03 Kenichi Handa <handa@m17n.org>
151 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
152 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
154 * font.c (xlfd_parse_name): Fix handling of the name "nil".
156 * draw.c (layout_glyphs): Fix handling left_padding of
159 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
161 2006-02-02 Kenichi Handa <handa@m17n.org>
163 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
166 2006-01-25 Kenichi Handa <handa@m17n.org>
168 * input.c (resolve_expression): If the value of PLIST is a plist,
169 but the first element is not symbol, return 0.
171 2006-01-17 Kenichi Handa <handa@m17n.org>
173 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
174 HAVE_GD is 2 or the greater.
176 2006-01-16 Kenichi Handa <handa@m17n.org>
178 * Version 1.3.1 released.
180 2006-01-16 Kenichi Handa <handa@m17n.org>
182 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
183 simulating anti-aliasing.
185 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
186 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
188 2006-01-12 Kenichi Handa <handa@m17n.org>
190 * input.c (get_surrounding_text): Always pop ic->plist.
191 (reset_ic): Don't reset ic->plist.
193 2006-01-10 Kenichi Handa <handa@m17n.org>
195 * input.c (preedit_commit): For debugging, print only commiting
196 charactes. Don't set ic->candidate_show to 0.
197 (handle_key): Don't run branch-actions just by shifting to the
199 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
200 Reset vars and plist.
202 2006-01-07 Kenichi Handa <handa@m17n.org>
204 * input.c (load_branch): Confirm that maps is not NULL.
206 2006-01-05 Kenichi Handa <handa@m17n.org>
208 * input-gui.c (win_filter): Try to convert arg to key only when
211 * plist.c (read_integer_element): If '#' and '-' are followed by
212 non-integer-constituent, read them as a part of a symbol.
213 (read_symbol_element): New arg C.
214 (read_element): Adjust args to read_symbol_element.
216 * input.c (load_macros): On overwriting a macro, free the old
218 (minput__init): Store Mmap in load_im_info_keys.
219 (minput_get_title_icon): If the input method has no title, be sure
221 (minput_get_description): If the input method has no description,
222 be sure to return NULL.
223 (minput_get_variables): Fix documentation.
224 (handle_key): Pay attention to the case that key is Mnil.
225 (filter): Likewise. Fix handling of such symbol as S-A.
227 2005-12-22 Kenichi Handa <handa@m17n.org>
229 * Version 1.3.0 released.
231 2005-12-22 Kenichi Handa <handa@m17n.org>
233 * font-ft.c (ft_list): If the specified font has no property,
236 2005-12-20 Kenichi Handa <handa@m17n.org>
238 * character.c (mchar_get_prop): Check char_prop_list.
239 (mchar_put_prop, mchar_get_prop_table): Likewise.
241 2005-12-18 Kenichi Handa <handa@m17n.org>
243 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
244 file name sans language.
246 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
248 * input.c: Fix typo in comments.
250 2005-12-14 Kenichi Handa <handa@m17n.org>
252 * input.c (minput_get_title_icon): Check the default icon for the
255 2005-12-13 Kenichi Handa <handa@m17n.org>
257 * input.c (Mless_equal, Mgreater_equal): New variables.
258 (parse_expression, resolve_expression, parse_action_list)
259 (take_action_list): Handle the aboves.
260 (filter): Treat key S-X as X.
261 (minput__init): Initialize Mless_equal and Mgreater_equal.
262 (minput_get_title_icon): New function.
264 * m17n.h (minput_get_title_icon): Extern it.
266 * database.c (get_database_filename): Return a filename instead of
268 (load_database): Adjusted for the above change.
269 (mdatabase__load_for_keys): Likewise.
270 (mdatabase__find_file): New function.
272 * database.h (mdatabase__find_file): Extern it.
274 * font.h (mfont__resize): Delete extern.
276 * font.c (mfont__list): Check resize ratio.
277 (mfont__resize): Delete it.
278 (mfont_resize_ratio): Include the code of mfont__resize.
280 * font-ft.c (ft_open): Check resize ratio.
282 * m17n-X.c (xfont_open): Check resize ratio.
283 (xft_open): Likewise.
285 2005-12-07 Kenichi Handa <handa@m17n.org>
287 * input.c (take_action_list): If take_action_list return -1,
289 (handle_key): Likewise.
291 * face.c (mface__for_chars): When font is specified and layouter
292 is found for it, if the layouter doesn't support one of a
293 character, use a face sans layouter for it.
295 2005-12-06 Kenichi Handa <handa@m17n.org>
297 * fontset.c (mfont__lookup_fontset): If only a fallback font is
298 found, don't use it for more than one character.
300 2005-12-05 Kenichi Handa <handa@m17n.org>
302 * face.c (mface__realize): Set rfont->layouter to Mnil.
303 (mface__for_chars): Fix handling of layouter.
305 * character.h (mchar__define_prop): Extern it.
307 * database.c (update_database_list): Call mchar__define_prop if
310 * character.c (mchar__init): Don't call mchar_define_property.
311 Instead just initialize property keys.
312 (mchar__fini): Free char_prop_list only if it's not NULL.
313 (mchar__define_prop): New function.
314 (mchar_define_property): Call mchar__define_prop.
316 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
319 2005-12-02 Kenichi Handa <handa@m17n.org>
321 * language.c (mlang__init): Handle extra chars.
323 * m17n-gui.h (mfont_check): Adjust prototype.
325 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
326 (xfont_check_capability): New function.
327 (xft_driver): Specify xft_check_capability.
328 (xft_check_capability): New function.
330 * font-ft.c (M0_3): Delete it.
332 (ft_get_charmaps): Refer to M0.
333 (fc_parse_pattern): Fix previous change.
334 (ft_list_language): Check also extra chars.
335 (ft_check_otf): Define it even if HAVE_OTF is undef.
336 (ft_check_lang): Check the result of FcLangSetHasLang against
337 FcLangDifferentLang. Check also extra chars.
338 (ft_list_capability): Delete ifdef HAVE_OTF.
339 (ft_select): Likewise.
340 (ft_open): Improve debug information.
341 (ft_check_capability): New function.
342 (mfont__ft_driver): Specify ft_check_capability.
343 (mfont__ft_init): Initialize M0.
345 * fontset.c (get_font_from_group): New function.
346 (mfontset__get_font): New function.
348 * fontset.h (mfontset__get_font): Extern it.
350 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
351 (mfont__fini): Delete ifdef HAVE_OTF.
352 (free_font_capability): Likewise.
353 (mfont__get_capability): Likewise.
354 (mfont__check_capability): New function.
355 (mfont_check): Change the order of arguments. Use
358 * font.h (struct MFontDriver): New member check_capability.
359 (MFontCapability): Delete ifdef HAVE_OTF.
360 (mfont__check_capability): Extern it.
362 * face.c (mface__realize): Fix handling of FONT arg.
363 (mface__for_chars): Fix handling of explicitly specified font.
365 2005-11-25 Kenichi Handa <handa@m17n.org>
367 * font-flt.c (run_command): Print debug info for
370 * draw.c (layout_glyphs): Fix handling of left/right_padding.
372 * face.c (mface__for_chars): Check rfont before accessing the
375 2005-11-21 Kenichi Handa <handa@m17n.org>
377 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
380 * fontset.c (fontset_table): New variable.
381 (free_fontset): Call M17N_OBJECT_UNREGISTER.
382 (mfont__fontset_init): Add fontset_table as an object array.
383 (mfont__realize_fontset): Ref FONTSET.
384 (mfont__free_realized_fontset): Unref REALIZED->fontset.
385 (mfontset): Call M17N_OBJECT_REGISTER.
386 (mfontset_copy): Likewise.
388 * input.c (handle_key): For debugging, print information about
390 (filter): Add an alias for Meta and Alt modifiers.
391 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
393 (minput__init): Initialize them.
394 (parse_expression): New function.
395 (resolve_expression): New function.
396 (parse_action_list): Handle expressions by parse_expression.
397 (take_action_list): Handle expressions by resolve_expression.
398 (parse_nested_list_value): Fix previous change.
399 (resolve_command): Fix handling of the return value of
402 2005-11-18 Kenichi Handa <handa@m17n.org>
404 * font-ft.c (ft_check_otf, otf_script_list): Define only when
406 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
408 (ft_select): Likewise.
410 * font.c (mfont_list): Fix for the case that FONT is NULL.
411 (OTF_tag): Delete it.
412 (load_otf_script_list): Define only when HAVE_OTF is defined.
413 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
416 * draw.c (truncate_gstring): Be sure to truncate at
417 glapheme-cluster boundary.
419 2005-11-11 Kenichi Handa <handa@m17n.org>
421 * input.c (delete_surrounding_text): Clear cache if necessary.
423 2005-11-09 Kenichi Handa <handa@m17n.org>
425 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
426 glyph prev is also supported by the current flt.
428 2005-11-08 Kenichi Handa <handa@m17n.org>
430 * m17n-X.c (xft_render): Cancel previous change.
432 2005-11-07 Kenichi Handa <handa@m17n.org>
434 * input.c: Include <stdlib.h>.
435 (get_surrounding_text, delete_surrounding_text)
436 (get_preceding_char, get_following_char): New functions.
437 (integer_value): New arg surrounding. If it is nonzero, try to
438 get a surrounding character. Callers changed.
439 (take_action_list): Check `value' before setting an element.
440 (destroy_ic): Unref ic_info->preceding_text and
441 ic_info->following_text.
442 (minput__init): Initialize Minput_get_surrounding_text and
443 Minput_delete_surrounding_text.
444 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
446 (filter): Unref ic_info->preceding_text and
447 ic_info->following_text.
449 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
452 * input.h (MInputContextInfo): New members preceding_text and
455 2005-11-04 Kenichi Handa <handa@m17n.org>
457 * input.c (parse_nested_list_value): Fix handling of the global
459 (get_nested_list): Get global definitions by load_partial_im_info.
460 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
461 MInputCandidatesChanged.
462 (take_action_list): Likewise.
463 (reset_ic): Likewise.
464 (create_ic): Don't pay special attention to
465 Mcandidates_group_size.
466 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
467 (minput_set_variable): Get a definition of varible by
468 mplist_find_by_value, not mplist_get.
470 * m17n.h (enum MInputCandidatesChanged): New enum.
472 2005-11-01 Kenichi Handa <handa@m17n.org>
474 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
476 (mwin__destroy_window): If xft_draw's drawable is win, change it
477 to device->drawable before destroying win.
479 2005-10-31 Kenichi Handa <handa@m17n.org>
481 * input.c (load_im_info): Fix adding of state.
483 * m17n-core.c (m17n_fini_core): Fix reporting of module
486 * m17n.c (m17n_fini): Fix reporting of module finalization.
488 * m17n-gui.c (m17n_init_win): Fix reporting of module
491 2005-10-29 Kenichi Handa <handa@m17n.org>
493 * input.c (get_candidate_list): Fix the timing of referring plist.
495 2005-10-28 Kenichi Handa <handa@m17n.org>
497 * input.c (load_branch): Ignore an undefined map name.
498 (load_im_info): Set im_info->title from `name' only if it's not
500 (shift_state): Always update ic->status.
501 (adjust_candidates): Renamed from adjust_candidate_command.
502 Argument changed. Caller changed.
503 (get_candidate_list, regularize_action): New functions.
504 (take_action_list): Use them. On handling Munhandle, don't set
506 (handle_key): If KEY is not handled by MAP, and MAP has
507 branch_actions, perform them.
509 * database.c (mdatabase__fini): Free dir_info->filename;
511 2005-10-20 Kenichi Handa <handa@m17n.org>
513 * input.c (marker_code): Accept '@@'.
514 (integer_value): Handle '@@'.
515 (parse_action_list): Accept a symbol argument.
516 (take_action_list): Resolve the symbol argument. Handle the
519 2005-10-18 Kenichi Handa <handa@m17n.org>
521 * input.c: Include "charset.h".
522 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
524 (MIMState): New member (M17NObject control).
525 (lookup_nested_list, set_nested_list, parse_nested_list_value)
526 (get_nested_list, resolve_variable): New functions.
527 (integer_value): New arg (MPlist **value). Set it to the plist
528 element containing the value.
529 (resolve_command): New function.
530 (load_translation): New arg (MPlist *map_actions).
531 (load_branch): New args language and name. If `keylist' is a
532 symbol, resolved that as a command name.
533 (free_map): New arg top. Free map->map_actions only if top is
535 (free_state): New function.
536 (load_state): New arg name.
537 (im_info_list): New variable.
538 (free_im_info, get_im_info_by_tags): New functions.
539 (load_im_info): Arg key changed to plist. Handle `include'.
540 Return (MInputMethodInfo *).
541 (preedit_commit): Ref ic->candidate_list.
542 (get_select_charset, adjust_candidate_command): New functions.
543 (take_action_list): Handle `include'. Adjust candidate action
544 properly. Handle control variables `candidates-charset' and
545 `candidates-group-size'.
546 (open_im): Use get_im_info.
547 (create_ic): Get global variables.
548 (load_partial_im_info): New function.
549 (get_im_info): New function.
550 (check_command_keyseq, check_command_list, check_variable_list):
552 (minput__init): Don't handle M_database_hook and Mdetail_text.
553 Initialize M_candidates, Mcandidates_group_size,
555 (parse_variable_list, get_variable_list, parse_command_list)
556 (get_command_list): Delete them.
557 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
558 (minput__fini): Simply unref command_list and variable_list.
559 (minput_get_description): Adjusted for the new form of description.
560 (minput_get_commands): Use get_nested_list.
561 (minput_assign_command_keys): Likewise.
562 (minput_get_variables, minput_set_variable): Likewise.
564 * input.h (MInputMethodInfo): New members im and maps.
566 * database.h (M_database_hook): Delete extern.
567 (MDatabaseHookFunc): Delete extern.
568 (mdatabase__check): Extern it.
570 * database.c: Include <glob.h>.
571 (MAX_TIME): New macro.
572 (Masterisk): New variable.
573 (get_database_stream): Argument changed to (MDatabaseInfo *).
575 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
576 (find_database): New function.
577 (update_database_list): New function.
578 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
579 calling update_database_list.
580 (mdatabase__check): New function.
581 (mdatabase_find): Use update_database and find_database. Don't
582 handle MDatabaseHookFunc.
583 (mdatabase_list): Call update_database at first.
584 (mdatabase_define): Adjusted for the change of mdb->extra_info.
585 (MDatabaseList): New type.
587 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
589 * m17n.h (Mdetail_text): Delete extern.
591 * m17n-core.h (mplist_conc): Delete extern.
593 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
595 (mplist_conc): Renamed to mplist__conc.
596 (mplist__pop_unref): New function.
598 2005-10-14 Kenichi Handa <handa@m17n.org>
600 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
602 (read_element): If keys is an empty plist, return any element
604 (dump_plist_element): Check if plist is nested.
605 (mplist_conc): Always ref tail.
606 (mplist_set): If key is a managing key, ref val in advance.
608 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
609 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
610 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
613 * fontset.c (free_fontset): Unref fontset_list if necessary.
614 (mfont__fontset_fini): Don't free fontset_list. Unref
616 (mfont__realize_fontset): Initialize request.
617 (mfontset): Ref default_fontset or fontset only if necessary.
618 (mfontset_copy): Don't ref copy.
620 * draw.c (render_glyphs): Check gend->type before checking
623 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
624 unrefed plists to NULL.
626 2005-10-04 Kenichi Handa <handa@m17n.org>
628 * textprop.c (mtext_serialize): Be sure to make mt
629 MTEXT_FORMAT_UTF_8 and NULL terminated.
631 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
633 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
635 2005-10-03 Kenichi Handa <handa@m17n.org>
637 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
638 is not at the beginning of line.
640 2005-09-22 Kenichi Handa <handa@m17n.org>
642 * input.c: Include <sys/stat.h> and <unistd.h>.
643 (Minclude, Mcommit, Munhandle): New variables.
644 (minput__init): Initialize them. Push only Mstate to
645 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
646 (parse_action_list): Allow integer arg for undo. Handle Mcommit
648 (load_input_method): Handle "include" directive. If no states are
650 (shift_state): If state_name is Mt, shift back to the previous
651 state. Call preedit_commit to commit preedit text.
652 (preedit_commit): New function.
653 (take_action_list): Improve debug printing. Handle commit and
655 (handle_key): Check the return value of take_action_list. Don't
656 take branch_actions just after changing to the root map.
657 (reset_ic): Reset all ic_info members.
658 (filter): When a key is not handled, just move ic_info->keys
659 instead fo calling reset_ic.
660 (load_im_info): If key is not Mstate, push Mmap to
662 (MDatabaseStatList): New type.
663 (imdir_stat_list): New variable.
664 (input_method_hook): Don't cancel the hook. Check the
665 modification time of directories.
666 (minput__fini): Free imdir_stat_list;
668 * input.h (MInputContextInfo): New member prev_state.
670 * m17n-core.h (mplist_conc): Extern it.
672 * plist.c (mplist_conc): New function.
674 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
676 * font.h (MRealizedFont): New member average_width.
678 * font-ft.c (ft_open): Set rface->average_width.
680 * font.c (xlfd_unparse_name): Print '*' before registry name.
682 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
683 (xfont_open): Set rfont->average_width.
684 (xft_open): Likewise.
685 (device_open): Initialize disp_info->AVERAGE_WIDTH.
687 * internal-gui.h (struct MFrame): New member average_width.
689 * m17n-gui.c (mframe): Fix setting of frame->rfont.
690 (mframe_get_prop): Return the average_width of a font.
692 * face.c (mface__realize): Set rface->average_width.
693 (mface__update_frame_face): Set frame->average_width.
695 * face.h (MRealizedFace): New member average_width.
697 2005-09-19 Kenichi Handa <handa@m17n.org>
699 * font.c (xlfd_unparse_name): New arg full_xlfd.
700 (mfont__encode_char): Use shortcut only for X core fonts.
701 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
702 (mfont_put_prop): Handle `language' property.
703 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
704 Print file can capability info too.
706 * m17n-core.c (mdebug__output): New variable.
707 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
708 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
709 (m17n_fini_core): Close mdebug__output if it's not stderr.
711 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
712 (xfont_open): Handle baseline_offset.
713 (xfont_find_metric): Likewise.
714 (xfont_render): Likewise.
715 (xft_open): Likewise.
716 (xft_render): Likewise.
718 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
719 (mdebug__output): Extern it.
720 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
721 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
722 (MDEBUG_DUMP): New macro.
723 (MDEBUG_PRINT_TIME): Print to medebug__output.
725 * font.h (MRealizedFont): New member baseline_offset.
727 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
729 (fc_weight_table): Add FC_WEIGHT_REGULAR.
730 (ft_list_family): Check alias.
731 (ft_list_language): If language is "en", don't try to the second
733 (ft_default_list): New variable.
734 (ft_list_default): New function.
735 (ft_select): If family is not specified, try only the default
736 fonts. Treat the weights normal and medium same.
737 (ft_open): Fix debug message. If registry is not specified, try
738 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
739 (ft_find_metric): Likewise.
740 (ft_render): Likewise.
741 (ft_list): Fix debug message. Accept the registring iso8859-1.
742 If family is not specified, try only the default fonts.
744 * face.c (mface__realize): Fix logic of opening a font.
746 2005-09-16 Kenichi Handa <handa@m17n.org>
748 * face.c (mface__realize):
750 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
753 * input.c (shift_state): Fix the condition of taking init actions.
754 (take_action_list): Fix handling of pushback action.
755 (handle_key): Don't change key while checking its alias.
756 (minput__init): Initialize new variables.
757 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
760 2005-09-12 Kenichi Handa <handa@m17n.org>
762 * mtext.c (mtext__uppercase): Add proper open/close parens.
763 (mtext_titlecase): Add proper casting.
765 * input.c (parse_action_list): Handle the case that the arg is a
766 key sequence (MText or MPlist).
767 (take_action_list): Likewise.
768 (shift_state): Shorter debug message.
769 (handle_key): Terminate a debug message by "\n".
770 (reset_ic): Don't take initial actions here.
771 (minput_open_im): Print a debug message.
772 (minput_close_im): Likewise.
773 (minput_create_ic): Likewise.
774 (minput_destroy_ic): Likewise.
776 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
778 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
781 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
782 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
785 * character.c: Add Japanese documentation for
786 mchar_get_prop_table ().
788 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
790 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
791 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
792 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
794 (init_case_conversion): New function.
795 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
796 (uppercase_precheck, lowercase_precheck, final_sigma)
797 (after_soft_dotted, more_above, before_dot, after_i)
798 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
800 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
802 * plist.c (read_mtext_element): Fix previous change.
804 2005-09-05 Kenichi Handa <handa@m17n.org>
806 * plist.c (read_mtext_element): Handle \uXXXX notation.
808 * internal.h (MTABLE_MALLOC): Don't use a local variable.
809 (MTABLE_ALLOCA): Change the name of local variable.
811 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
812 HAVE_FREETYPE are defined.
814 * m17n-X.c: Check HAVE_X11.
816 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
817 directory listing libraries.
818 (noinst_PROGRAMS): Define it only in maintainer mode.
820 2005-09-02 Kenichi Handa <handa@m17n.org>
822 * m17n-gui.h (mdraw_line_break_option): Extern it.
824 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
825 end of the first glyph.
826 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
828 (mdraw_line_break_option): New variable.
829 (mdraw_default_line_break): Use mtext_line_break.
831 * mtext.h (wordseg_func_table): Don't extern it.
832 (mtext__wseg_fini): Extern it.
834 * mtext.c: Don't include word-thai.h.
835 (wordseg_func_table): Delete this variable.
836 (mtext__init): Don't initialize above. Don't call
837 mtext__word_thai_init.
838 (mtext__fini): Don't free wordseg_func_table. Call
839 mtext__wseg_fini instead fo mtext__word_thai_fini.
840 (MTextWordsegFunc): Don't typedef it.
841 (mtext__word_segment): Moved to mtext-wseg.c.
843 * m17n-core.h (enum MTextLineBreakOption): New enum.
844 (mtext_line_break): Extern it.
846 * mtext-wseg.c: New file.
848 * mtext-lbrk.c: New file.
850 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
851 add mtext-lbrk.c and mtext-wseg.c.
853 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
854 the case that head is NULL.
856 2005-09-01 Kenichi Handa <handa@m17n.org>
858 * word-thai.c (wordseg_propertize): If the property value is nil,
859 don't make the property no-merge.
860 (thai_wordseg): Don't require *from and *to are set a priori. Pay
861 attention to the case that they are NULL.
862 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
865 * character.c (mchar_get_prop_table): New function.
867 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
869 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
870 (mchar_get_prop_table): Extern it.
872 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
873 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
875 * internal.h (enum MTextCoverage): New enum.
876 (MText): New member coverage.
878 * mtext.c (FORMAT_COVERAGE): New macro.
879 (insert): Copy mt2->coverage.
880 (mtext__from_data): Initialize mt->coverage.
881 (mtext__adjust_format): Update mt->coverage.
882 (mtext): Initialize mt->coverage.
883 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
884 Update mt->coverage if necessary.
885 (mtext_duplicate): Copy mt->coverage.
886 (mtext_insert, mtext_replace): New functions.
887 (mtext_dup): Use mtext_duplicate.
888 (mtext__word_segment): Don't set *from and *to if a word
889 segmentation funcion is not found.
890 (mtext_ins_char): Fix typo.
892 2005-08-25 Kenichi Handa <handa@m17n.org>
894 * font.h (MFont): New member for_full_width.
896 * font.c (compare_font_score): Prefer a font of not
899 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
900 registry charset of a font is one of CJK charsets.
902 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
903 supports some of CJK.
905 2005-08-24 Kenichi Handa <handa@m17n.org>
907 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
909 * m17n-gui.c (null_device_open): Check Mresolution param and set
912 * m17n-gd.c (device_open): Check Mresolution param and set
915 * m17n-X.c (MWDevice): New member resy.
916 (xfont_open): Set ascent, descent, and max_advance members of
918 (xft_open): Likewise.
919 (device_open): Compare also screen_num to find a device. Set
920 device->resy and frame->dpi.
922 * internal-gui.h (MFrame): New member dpi.
924 * font.h (MRealizedFont): New member max_advance.
926 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
927 (mfont__init): Don't initialize Mascent, Mdescent.
928 (Mascent, Mdescent): Delete these variables.
929 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
930 Mfont_descent instead of Mascent and Mdescent.
931 (mfont_put_prop): Allow negative size.
932 (mfont_find): Handle the case of spec->size < 0. Fix previous
934 (mfont_list): Handle the case of spec->size < 0.
935 (mfont_check): Likewise.
937 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
938 (fc_get_pattern): Handle the case of font->size < 0.
939 (ft_open): Set ascent, descent, and max_advance members of rfont.
940 (ft_find_metric): Improve rounding.
941 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
944 * face.c (mface__realize): Handle the case of font->size < 0.
946 2005-08-22 Kenichi Handa <handa@m17n.org>
948 * coding.c (MConverterStatus): Change the member buf to union.
949 (mconv_buffer_converter): Add const to the arg buf.
950 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
951 (mconv_decode): Adjusted for the change of MConverterStatus.
952 (mconv_encode_range): Likewise.
954 * m17n.h (mconv_buffer_converter): Prototype adjusted.
955 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
957 2005-08-20 Kenichi Handa <handa@m17n.org>
959 * m17n-gui.h (mfont_from_name): Prototype adjusted.
960 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
962 * m17n-X.c (xfont_open): Set members ascent, descent, and
963 max_advance of rfont.
964 (xft_open): Likewise.
966 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
968 (mfont__ft_parse_name): Add const to the arg name.
970 * font.c (xlfd_parse_name): Add const to the arg name. Call
971 mfont__set_property instead of mfont_set_spec. Set font->spacing.
972 (xlfd_unparse_name): Handle spacing.
973 (mfont__init): Initialize new variables.
974 (mfont__id): Handle spacing.
975 (mfont__merge): Likewise.
976 (mfont__set_spec): This function deleted.
977 (mfont__parse_name_into_font): Add const to the arg name. Fix the
978 condition of calling mfont__ft_parse_name.
979 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
980 (mfont_get_prop): Handle properties spacing, ascent, descent,
982 (mfont_find): Return a realized font.
983 (mfont_from_name): Add const to the arg name.
985 * font.h (enum MFontProperty): New member MFONT_SPACING.
986 (enum MFontSpacing): New enum.
987 (MFont): New members spacing and max_advance.
988 (mfont__ft_parse_name): Prototype adjusted.
989 (mfont__set_spec): Extern deleted.
990 (mfont__parse_name_into_font): Prototype adjusted.
992 2005-08-19 Kenichi Handa <handa@m17n.org>
994 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
996 * font.c (mfont_list): If FONT is null, use a temporary font.
997 (mfont_parse_name): Add const to the arg name.
999 2005-08-18 Kenichi Handa <handa@m17n.org>
1001 * word-thai.c: Surround code by #ifdef and #endif to escape from
1004 * font-ft.c: Mostly re-written.
1006 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1007 (FontLayoutCmd): Type of the member otf changed..
1008 (load_otf_command): Adjusted for the format change of otf command.
1009 (load_command): Likewise.
1010 (free_flt_command): Unref cmd->body.otf.
1011 (run_otf): Ajusted for the type change of otf_cmd.
1012 (run_command): Ajusted for the type change of otf_cmd. On
1013 debugging, print ctx->combining_code.
1014 (mfont__flt_run): Initialize ctx's members code_offset,
1015 combining_code, and left_padding to 0.
1017 * face.h (struct MRealizedFace): New member font.
1018 (mface__realize): Prototype adjusted.
1020 * face.c (find_realized_face): New arg font.
1021 (find_realized_face): Adjusted for the change of MFont.
1022 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1023 (mface__fini): Don't call mdebug__report_object.
1024 (mface__realize): New arg font.
1025 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1026 Optimize the latin case.
1027 (mface__free_realized): Free rface->font.
1028 (mface__update_frame_face): Adjusted for the change of mface__realize.
1029 (mface_equal): New function.
1031 * draw.c (Mcommon): New variable.
1032 (visual_order): Args to mfont__encode_char changed.
1033 (compose_glyph_string): Handle Mfont text property.
1034 (layout_glyphs): Adjusted for the change of MFont.
1035 (mdraw__init): Initialize Mcommon.
1036 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1038 * font.h (enum MFontType): Members completely changed.
1039 (enum MFontProperty): Move MFONT_SIZE to the tail.
1040 (enum MFontSource): New enum.
1041 (struct MFont): New members type, source, sizes, file, capability,
1043 (struct MRealizedFont): Type of member font changed. Members
1044 score, status, and encoding deleted.
1045 (MFontScore): New type.
1046 (MFontList): Member changed.
1047 (struct MFontDriver): New member has_char. Types of members
1049 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1050 (Mapple_roman): Extern them.
1051 (OTF_Tag): Typedefed if not HAVE_OTF.
1052 (enum MFontOpenTypeTable): New enum.
1053 (MFontCapability): New type.
1054 (mfont__ft_drive_otf): Prototype adjusted.
1055 (mfont__score): Extern deleted.
1056 (mfont__merge): Extern it.
1057 (mfont__has_char): Extern it.
1058 (mfont__encode_char): Prototype adjusted.
1059 (mfont__open): Extern it.
1060 (mfont__set_spec): Prototype adjusted.
1061 (mfont__get_capability): Extern it.
1063 * font.c: Include "fontset.h".
1064 (M_font_capability, M_font_list, M_font_list_len): New variables.
1065 (font_score_priority): Change order of initial elements.
1066 (font_score_shift_bits): Fix array size.
1067 (common_weight): Add "thin", "semibold", and "heavy".
1068 (common_stretch): Add "ultracondensed", "extracondensed",
1069 "extraexpanded", and "utltraexpand".
1070 (font_weight_regular, font_weight_normal, font_weight_medium): New
1072 (gen_font_name): This function deleted.
1073 (find_encoding): Set font->encoding.
1074 (OTF_tag): New function.
1075 (otf_script_list): New variable.
1076 (load_otf_script_list): New function.
1077 (find_script_from_otf_tag): New function.
1078 (xlfd_parse_name): Set font->type and font->source.
1079 (mfont__free_realized): Free chains rfonts.
1080 (font_score): Renamed from mfont__score.
1081 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1082 (Mapple_roman): New variables.
1083 (mfont__init): Initilize new variables. Initalize
1084 default_encoding.encoding_name and
1085 default_encoding.encoding_charset to Municode_full and
1086 mcharset__unicode. Use SAFE* macros for allocating filepath
1088 (mfont__fini): Free otf_script_list.
1089 (mfont__id): New function.
1090 (mfont__match_p): Check also capability member of MFont.
1091 (mfont__merge): New funciton.
1092 (mfont__set_spec_from_face): Set type and source members.
1093 (mfont__set_spec_from_plist): Set capability and type members.
1094 (mfont__select): Argument changed.
1095 (mfont__available): New function.
1096 (compare_font_score): New function.
1097 (mfont__list): New function.
1098 (mfont__open): Return a realized font.
1099 (mfont__resize): Adjusted for the change of MFont.
1100 (mfont__has_char): New function.
1101 (mfont__encode_char): Argument changed.
1102 (mfont__set_spec): Argument changed.
1103 (free_font_capability): New function.
1104 (mfont__get_capability): New function.
1105 (MFontfile): New variable.
1106 (mfont_get_prop): Adjusted for the change of MFont.
1107 (mfont_put_prop): Likewise.
1108 (mfont_set_selection_priority): Fix the way of setting
1109 font_score_priority[].
1110 (mfont_find): Use mfont__list instead of mfont__select.
1111 (mfont_resize_ratio): Adjusted for the change of MFont.
1112 (mfont_list): Use mfont__list.
1113 (mfont_check): New function.
1114 (font_score): Make it static.
1116 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1117 (mfont__lookup_fontset): Likewise.
1119 * fontset.c (struct MFontset): Delete member font_spec_list.
1120 (struct MRealizedFontset): Type of member spec changed. New
1122 (load_font_group): Arg spec_list deleted.
1123 (load_fontset_contents): Adjusted for the change of fontset_def.
1124 (free_fontset): Fix the way of freeing fontset elements.
1125 (realize_fontset_elements): Argument changed.
1126 (get_per_script): New function.
1127 (free_realized_fontset_elements): Fix the way of feeing rfontset
1129 (update_fontset_elements): Fix args to realize_fontset_elements.
1130 (mfont__realize_fontset): New arg spec.
1131 (try_font_list): New function.
1132 (try_font_group): New arg request. Use try_font_list.
1133 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1135 (mfontset): Adjusted for the change of MFontset.
1136 (mfontset_copy): Likewise. Don't share plists.
1137 (mfontset_modify_entry): Adjusted for the change of MFontset.
1138 (mfontset_lookup): Call get_per_script.
1139 (mdebug_dump_fontset): Print also the address of fonts.
1141 * input.c (shift_state): Don't reset ic_info->vars.
1142 (take_action_list): Call MDEBUG_PRINT fore calling
1145 * internal-gui.h (MFontDriver): Don't typedef it here.
1147 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1148 (MXFont): This type deleted.
1150 (struct _MFontX): New struct.
1151 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1152 (MDisplayInfo): Member base_font_list deleted.
1153 (DEFAULT_FONT): Definition changed.
1154 (FALLBACK_FONT): This maclr deleted.
1155 (free_display_info): Adjusted for the change of MDisplayInfo.
1156 (free_device): Argument to mfont__free_realized changed.
1157 (xfont_driver): Adjusted for the change of MFontDriver.
1158 (xfont_registry_list): Use MFontX instead of MXFont.
1159 (MRealizedFontX): Renamed from MXFontInfo.
1160 (xfont_select): Return the font found first.
1161 (close_xfont): Change MXFontInfo to MRealizedFontX.
1162 (xfont_open): Return the realized font.
1163 (xfont_find_metric): Get xfont from rfont->fontp.
1164 (xfont_has_char): New function.
1165 (xfont_encode_char): Adjusted for the argument change.
1166 (xfont_render): Get xfont from rfont->fontp.
1167 (xfont_list): Adjusted for the argument change.
1168 (MRealizedFontXft): Renamed from MXftFontInfo.
1169 (xft_driver): Ajusted for the change of MFontDriver.
1170 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1171 (xft_open_font): Argument changed.
1172 (xft_open): Argument changed. Return the realized font.
1173 (xft_find_metric): Get xft_font from rfont->fontp.
1174 (xft_has_char, xft_encode_char): New functions.
1175 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1176 font if not yet opened.
1177 (device_open): Don't set frame->font.
1179 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1181 (gd_font_open): New function.
1182 (gd_render): Don't use the local variable ft_info.
1183 (device_init): Adjusted for the change of gd_font_driver.
1185 * textprop.c (mtext__prop_init): Initialize text_property_table.
1186 Call M17N_OBJECT_ADD_ARRAY.
1187 (mtext__prop_fini): Don't call mdebug__report_object.
1189 * plist.c (mplist__init): Initialize plist_table.
1190 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1191 (mplist__fini): Don't call mdebug__report_object.
1193 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1194 (mtext__fini): Don't call mdebug__report_object.
1195 (MTEXT_FORMAT_UTF_16): Correct type.
1196 (mtext_data): New function.
1197 (mtext_text): Fix calculation of limit and args to
1200 * language.c: Include "plist.h".
1201 (M_script_lang_list): New variable.
1202 (mlang__init): Read languages and their information from m17n
1204 (mlanguage__list): New function.
1205 (Miso639_1, Miso639_2): New variables.
1207 * language.h (mlanguage__list): Extern it.
1209 * database.c (get_database_stream): Use SAFE_* macros for
1210 allocating and freeing path.
1211 (mdatabase__init): Likewise.
1213 * symbol.c (msymbol__fini): Don't free symbols here.
1214 (msymbol__free_table): New function.
1215 (msymbol_is_managing_key): New function.
1217 * symbol.h (msymbol__free_table): Extern it.
1218 (msymbol__list): Extern it.
1220 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1222 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1223 (struct _M17NObjectArray): New member name and next.
1224 (mdebug__add_object_array): Extern it.
1225 (M17N_OBJECT_ADD_ARRAY): New macro.
1226 (mdebug__report_object): Don't extern it.
1228 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1230 * m17n-gui.c (free_frame): Don't free frame->font.
1231 (null_device_fini): Fix code for freeing
1232 null_device.realized_font_list.
1233 (m17n_fini_win): Free interface.
1234 (mframe): Cast the return value of dlsym. Set frame->font here.
1235 (mframe_get_prop): Check frame->rface->rfont before accessing the
1238 * m17n-gui.h (Mfontfile): Extern it.
1239 (mfont_check): Extern it.
1240 (mface_equal): Extern it.
1242 * m17n-core.c: Include "symbol.h".
1243 (report_header_printed): This variable deleted.
1244 (object_array_root): New variable.
1245 (report_object_array): New function.
1246 (mdebug__report_object): This function deleted.
1247 (mdebug__add_object_array): New function.
1248 (m17n_init_core): Call mchartable_init () before mtext_init ().
1249 (m17n_fini_core): Call report_object_array (if necessary) and
1250 msymbol__free_atable at the end.
1252 * m17n-core.h (msymbol_is_managing_key): Extern it.
1253 (mtext_data): Extern it.
1254 (MTEXT_FORMAT_UTF_16): Correct type.
1255 (M17NLIB_MINOR_VERSION): Changed to 3.
1256 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1258 * chartab.c (mchartable__init): Initalize chartable_table.count.
1259 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1260 mdebug__report_object.
1262 2005-05-26 Kenichi Handa <handa@m17n.org>
1264 * m17n.h (Miso639_1, Miso639_2): Extern them.
1266 * symbol.h (msymbol__list): Extern it.
1268 * symbol.c (msymbol__list): New function.
1270 2005-05-19 Kenichi Handa <handa@m17n.org>
1272 * input-gui.c (minput__win_init): Don't change the value of
1275 2005-05-16 Kenichi Handa <handa@m17n.org>
1277 * m17n-core.c (m17n_object): Be sure to initialize all members.
1279 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1281 2005-05-09 Kenichi Handa <handa@m17n.org>
1283 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1285 2005-04-27 Kenichi Handa <handa@m17n.org>
1287 * language.c (mlang__init): Add "an" (Aragonese).
1289 * word-thai.c: Add support for libthai.
1290 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1291 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1293 * mtext.c: Include "word-thai.h" conditionaly.
1294 (mtext__init): Call mtext__word_thai_init conditionaly.
1295 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1297 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1298 not WORDCUT_LD_FLAGS.
1300 2005-04-19 Kenichi Handa <handa@m17n.org>
1302 * word-thai.c (wordseg_propertize): Always unref the attached
1304 (thai_wordseg): Don't unref the property.
1306 2005-04-18 Kenichi Handa <handa@m17n.org>
1308 * word-thai.c: Include stdlib.h.
1309 (wordseg_propertize): Add dummy function for the case that wordcut
1310 library doesn't exist.
1311 (wordseg_propertize): Fix for old wordcut library.
1313 2005-04-16 Kenichi Handa <handa@m17n.org>
1315 * word-thai.c: Include <stdio.h>.
1317 2005-04-15 Kenichi Handa <handa@m17n.org>
1319 * draw.c: Include mtext.h.
1320 (linebreak_table, M_break_at_space, M_break_at_word)
1321 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1322 (compose_glyph_string): Check POS before getting Mface text
1324 (truncate_gstring): Give correct TO arg to line_break function.
1325 (GET_LB_TYPE): New macro.
1326 (find_break_backward, find_break_forward): New functions.
1327 (mdraw__init): Initialize the above new variables.
1328 (mdraw__fini): Free linebreak_table.
1329 (mdraw_default_line_break): Use find_break_backward and
1332 * word-thai.c: New file.
1334 * word-thai.h: New file.
1336 * mtext.c: Include word-thai.h.
1337 (wordseg_func_table): New variable.
1338 (mtext__init): Initialize wordseg_func_table and call
1339 mtext__word_thai_init.
1340 (mtext__fini): Call mtext__word_thai_fini, free
1342 (MTextWordsegFunc): New type.
1343 (mtext__word_segment): New function.
1345 * mtext.h (wordseg_func_table): Extern it.
1346 (mtext__word_segment): Extern it.
1348 * m17n.c (m17n_init): Fix typo (== -> =).
1350 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1351 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1353 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1354 (MTEXTPROP_VAL): New macros.
1356 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1358 2005-04-07 Kenichi Handa <handa@m17n.org>
1360 * database.c (load_chartable): Fix pursing of symbol name.
1362 2005-03-24 Kenichi Handa <handa@m17n.org>
1364 * m17n.c (m17n_init): Fix typo (== -> =).
1366 2005-03-11 Kenichi Handa <handa@m17n.org>
1368 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1370 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1372 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1375 2005-03-09 handa <handa@m17n.org>
1377 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1378 calling m17n_init ().
1380 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1381 calling m17n_init_core ().
1383 2005-02-28 Kenichi Handa <handa@m17n.org>
1385 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1388 2005-02-17 Kenichi Handa <handa@m17n.org>
1390 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1391 (M_description, M_command, M_variable): New variables.
1392 (load_im_info_keys): New variables.
1393 (load_im_info, check_command_keyseq, get_description_advance)
1394 (parse_command_list, get_command_list, parse_variable_list)
1395 (get_variable_list, input_method_hook): New functions.
1396 (command_list, variable_list): New variables.
1397 (minput__init): Put input_method_hook to Minput_method.
1398 Initialize M_description, M_command, M_variable, Mdetail_text,
1399 load_im_info_keys, command_list, variable_list.
1400 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1401 (Mdetail_text): New variable.
1402 (minput_get_description, minput_get_commands)
1403 (minput_assign_command_keys, minput_get_variables)
1404 (minput_set_variable): New functions.
1406 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1407 (minput_assign_command_keys, minput_get_variables)
1408 (minput_set_variable): Extern them.
1410 * plist.c (UNGETC): Just decrement st->p.
1411 (read_mtext_element): New arg skip.
1412 (read_integer_element): Likewise.
1413 (read_symbol_element): Likewise.
1414 (read_element): New arg KEYS.
1415 (mplist__from_plist): Don't increment ref-count of NULL object.
1416 (mplist__from_file): New arg KEYS.
1417 (mplist_put): Don't increment ref-count of NULL object.
1418 (mplist_add): Likewise.
1419 (mplist_push): Likewise.
1420 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1422 * plist.h (mplist__from_file): Prototype adjusted.
1424 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1425 (get_database_stream): New function.
1426 (load_database): Use get_database_stream.
1427 (M_database_hook): New variable
1428 (mdatabase__init): Initialize M_database_hook.
1429 (mdatabase__load_for_keys): New function.
1430 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1432 (mdatabase_define): Free mdb->extra_info if necessary.
1434 * database.h (mdatabase__dir_list, M_database_hook)
1435 (mdatabase__load_for_keys): Extern them.
1436 (MDatabaseHookFunc): New type.
1438 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1440 2004-12-27 Kenichi Handa <handa@m17n.org>
1442 * Version 1.2.0 released.
1444 2004-12-27 Kenichi Handa <handa@m17n.org>
1446 * input.c (minput_filter): Don't reset ic->xxx_changed.
1448 * mtext.c (mtext_from_data): Fix documentation.
1450 2004-12-25 Kenichi Handa <handa@m17n.org>
1452 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1453 (M17NLIB_VERSION_NAME): Update to "1.2.".
1455 2004-12-24 Kenichi Handa <handa@m17n.org>
1457 * input.c (reset_ic): Set key_unhandled to 0.
1459 2004-12-21 Kenichi Handa <handa@m17n.org>
1461 * m17n-gui.h (mfont_from_spec): Delete extern.
1463 * input-gui.c (win_callback): Handle Minput_reset.
1464 (minput__win_init): Register reset_ic as a callback for
1467 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1468 changed. At first, shift to the initial state.
1469 (minput__init): Initialize Minput_reset. Register reset_ic as a
1470 callback for Minput_reset.
1471 (Minput_reset): New variable.
1472 (minput_filter): Always set ic->xxx_changed to 0.
1473 (minput_reset_ic): New function.
1474 (integer_value): Fix typo ('>' -> '<') and calculation of length
1477 * m17n-core.c (merror_code): Change type to `int'.
1479 * m17n-misc.h (merror_code): Adjust type.
1481 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1483 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1484 (mtext_change_prop): Delete extern.
1486 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1487 to `int'. Move the documents to m17n-core.h.
1489 2004-12-13 Kenichi Handa <handa@m17n.org>
1491 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1492 (MTextProperty): Document it.
1494 2004-12-09 Kenichi Handa <handa@m17n.org>
1496 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1498 2004-12-03 Kenichi Handa <handa@m17n.org>
1500 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1501 m17n__gui_initialized): New externs.
1503 * m17n-core.h (enum M17NStatus): New enum.
1504 (m17n_status): Extern it.
1506 * m17n-core.c (core_initialized): Delete this variable.
1507 (m17n__core_initialized, m17n__shell_initialized,
1508 m17n__gui_initialized): New variables.
1509 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1510 instead of core_initialized.
1511 (m17n_status): New function.
1513 * m17n.c (shell_initialized): Delete this variable.
1514 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1517 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1519 * m17n-gui.c (win_initialized): Delete this variable.
1520 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1521 instead of gui_initialized.
1523 2004-11-19 Kenichi Handa <handa@m17n.org>
1525 * input.c (reset_ic): Check if ic_info->state is NULL.
1526 (filter): If ic_info->state is NULL, return 0.
1527 (load_input_method): Don't unref `maps' it it's not created.
1529 2004-11-15 Kenichi Handa <handa@m17n.org>
1531 * input.c (find_candidates_group): If INDEX is -1, find the last
1533 (take_action_list): If the previous of the first candidate is
1534 requested, select the last candidate.
1536 2004-11-08 Kenichi Handa <handa@m17n.org>
1538 * m17n-X.c (device_open): Try at most 32 fonts to find a
1539 non-autoscaled font.
1541 * font.c (xlfd_parse_name): Fix previous change.
1543 2004-11-05 Kenichi Handa <handa@m17n.org>
1545 * font.c: (commont_style): Include dummy elements "slanted" and
1546 "rslanted" to prefer "o" to "r" if "i" is requested.
1548 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1550 2004-10-29 Kenichi Handa <handa@m17n.org>
1552 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1554 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1555 New members smallest and larger.
1556 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1557 (xfont_registry_list): Likewise.
1558 (xfont_select): Likewise.
1561 2004-10-28 Kenichi Handa <handa@m17n.org>
1563 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1564 font name comparison.
1565 (xfont_select): Fix logic for selecting a larger size font.
1567 2004-10-25 Kenichi Handa <handa@m17n.org>
1569 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1572 2004-10-22 Kenichi Handa <handa@m17n.org>
1574 * input.c (update_candidate): Renamed from udpate_candidate.
1575 (take_action_list): Show more debugging info on arithmetic commands.
1577 * m17n-X.c (device_open): Fix previous change.
1579 * draw.c (compose_glyph_string): Don't get face property at the
1582 2004-10-21 Kenichi Handa <handa@m17n.org>
1584 * draw.c (compose_glyph_string): Fix for the case of category
1587 2004-10-19 Kenichi Handa <handa@m17n.org>
1589 * input.c (mdebug_mask): New variable.
1590 (shift_state): Print debug information.
1591 (take_action_list): Likewise.
1592 (handle_key): Likewise.
1594 2004-10-14 Kenichi Handa <handa@m17n.org>
1596 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1598 2004-10-13 Kenichi Handa <handa@m17n.org>
1600 * m17n-X.c (device_open): Be sure to register at least one font
1603 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1604 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1606 2004-10-12 Kenichi Handa <handa@m17n.org>
1608 * draw.c (alloc_gstring): Fix previous change.
1610 * font-ft.c (ft_list_generic): Fix for the case of not
1613 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1615 * font.c (mfont_list): If no font is found, return NULL.
1616 (load_font_encoding_table): Put entries of nil registry first.
1617 (find_encoding): Adjust for the above change.
1619 2004-10-11 Kenichi Handa <handa@m17n.org>
1621 * m17n-gui.h (mfont_list): Adjust prototype.
1623 * m17n-X.c (xfont_list): New arg maxnum.
1625 * font.h (struct MFontDriver): Change prototype of <list>.
1627 * font-ft.c (fc_generic_family_list): Delete it.
1628 (Mserif, Msans_serif, Mmonospace): Delete them.
1629 (M_generic_family_info): New variable.
1630 (enum GenericFamilyType): New enum.
1631 (struct GenericFamilyInfo): New struct.
1632 (generic_family_table): New variable.
1633 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1635 (add_font_info): Get style here.
1636 (ft_list_family): Don't initialize fc_config here. Don't list
1638 (ft_list_generic): New function.
1639 (ft_select): Pay attention to generic familes here.
1640 (ft_open): Fix calculation of ascent and descent.
1641 (ft_list): Pay attention to generic families.
1642 (mfont__ft_init): Initialize M_generic_family_info,
1643 generic_family_table, and fc_config..
1644 (mfont__ft_fini): Finalize generic_family_table.
1646 * draw.c (compose_glyph_string): Use more constant font for
1647 glyphs. Adjust for the member change in MGlyph.
1648 (layout_glyph_string): Adjust for the member change in MGlyph.
1649 (alloc_gstring): Intilize scracth_glyph to avoid
1650 compose_glyph_string on it.
1651 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1652 (mdraw_coordinates_position): Fix previous change.
1654 * internal-gui.h (glyph_category): New enum.
1655 (MGlyph): Change type of <category> to enum glyph_category.
1657 * face.c (mface__realize): Delete args langauge and charset.
1658 (mface__for_chars): Fix for the case that glyphs have different
1660 (mface__update_frame_face): Adjust for mface__realize change.
1662 * face.h (mface__realize): Adjust prototype.
1664 2004-10-05 Kenichi Handa <handa@m17n.org>
1666 * language.c (mlang__init): Add Akan.
1668 2004-10-04 Kenichi Handa <handa@m17n.org>
1670 * font-ft.c (add_font_info): Add instead of push the element.
1671 (ft_list_family): For generic fonts, try all
1672 substituted. families.
1674 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1675 (run_rule): Don't update cluster range here.
1676 (run_command): Update cluster range on appending a glyph.
1677 (run_otf): Update cluster range for glyphs generated by OTF.
1679 2004-10-02 Kenichi Handa <handa@m17n.org>
1681 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1683 2004-09-30 Kenichi Handa <handa@m17n.org>
1685 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1687 2004-09-30 Kenichi Handa <handa@m17n.org>
1689 * font.h: Include <fontconfig/fontconfig.h>.
1690 (MFTInfo): New member langset.
1691 (mfont__encoding_list): Extern it.
1693 * font.c (mfont__encoding_list): New function.
1694 (mdebug_dump_font_list): New function.
1696 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1697 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1699 (ft_family_list): New variable.
1700 (set_font_info): New arg basep. Callers changed.
1701 (fc_list): Check the return value of FcPatternGetString.
1702 (add_font_info): New arg plist. Callers changed. Update
1704 (ft_list_family): New function (merged fc_list and ft_list_all).
1705 (ft_select): Use ft_list_family.
1706 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
1708 (mfont__ft_init): Initialize above new variables.
1709 (mfont__ft_fini): Free ft_family_list.
1710 (STRDUP_LOWER): New macro.
1711 (set_font_info): Use STRDUP_LOWER.
1712 (ft_list_family): Avoid duplicate addition of font path. Use
1714 (fc_decode_prop): Fix typo.
1716 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1717 (xfont_registry_list): Change argument disp_info to frame.
1719 (xfont_list_all): New function.
1720 (xfont_list): If FONT is not NULL, check all fonts.
1722 2004-09-28 Kenichi Handa <handa@m17n.org>
1724 * m17n-X.c (MXFont, MXFontList): New types.
1725 (MDisplayInfo): Delete members font_registry_list,
1726 iso8859_1_family_list, iso10646_1_family_list, new members
1727 font_list, base_font_list.
1728 (free_display_info): Adusted for the change of MDisplayInfo.
1729 (xfont_driver): Initialize with xfont_list.
1730 (font_compare): New function.
1731 (build_font_list): Deleted.
1732 (xfont_registry_list): New function.
1733 (xfont_select): Use xfont_registry_list.
1734 (xfont_list): New function.
1735 (device_open): Adusted for the change of MDisplayInfo.
1737 * font-ft.c (add_font_info): New arg languages. Callers changed.
1738 (fc_list): Get languages from fonts..
1739 (ft_list_all): Renamed from ft_list. Callers changed.
1740 (ft_list): New function.
1741 (mfont__ft_driver): Initalize with ft_list.
1743 * font.c (mfont_list): New function.
1745 * font.h (struct MFontDriver): New member `list'.
1746 (MFTInfo): New member languages.
1748 * m17n-gui.h (mfont_list): Extern it.
1750 2004-09-27 Kenichi Handa <handa@m17n.org>
1752 * internal-gui.h (struct MGlyphString): Delete members mt,
1753 sub_width, sub_lbrearing, sub_rbearing, and region.
1755 * draw.c (MSubTextExtents): New type.
1756 (layout_glyphs): New arg extents. Set its members.
1757 (layout_glyph_string): Adjusted for the above change.
1758 (alloc_gstring): Don't set gstring->mt.
1759 (truncate_gstring): Call line_break function with mt instead of
1762 2004-09-22 Kenichi Handa <handa@m17n.org>
1764 * mtext.c (count_utf_16_chars): Count each code of invalid
1767 2004-09-19 Kenichi Handa <handa@m17n.org>
1769 * mtext.c (default_utf_16, default_utf_32): Rename them to
1770 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
1773 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
1776 2004-09-13 Kenichi Handa <handa@m17n.org>
1778 * draw.c (Mlatin): Don't declare it here.
1779 (visual_order): Fix reordering of combining characters.
1780 (compose_glyph_string): Fix detection of script.
1781 (layout_glyphs): Don't fix reordering of combining characters
1783 (layout_glyph_string): Pay attention to
1784 control->disable_overlapping_adjustment.
1785 (truncate_gstring): Include at least on character in a line.
1786 (get_gstring): Always scan one full line.
1787 (mdraw__init): Don't initialize Mlatin here.
1788 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
1789 have a font, use ascent/descent of an ASCII font. Allow
1790 ink_array_return and logical_array_return to be NULL.
1791 (mdraw_coordinates_position): Fix iteration.
1793 * font-ft.c (MFTtoProp): Member completely changed.
1794 (ft_to_prop): Adjusted for the above change.
1795 (ft_to_prop_size): Likewise.
1796 (set_font_info): Adjusted for the change of MFTtoProp.
1797 (fc_generic_family_list): New variable.
1798 (fc_list): Add special handling of generic font names.
1799 (mfont__ft_init): Adjusted for the change of MFTtoProp.
1800 Initialize fc_generic_family_list.
1801 (mfont__ft_fini): Don't free ft_to_prop. Free
1802 fc_generic_family_list.
1803 (FC_vs_M17N_font_prop): New type.
1804 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
1805 (fc_decode_prop, fc_encode_prop): New functions.
1806 (mfont__ft_parse_name): Use fc_decode_prop.
1807 (mfont__ft_unparse_name): Use fc_encode_prop.
1809 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
1810 (MWDevice): Add member realized_font_list.
1811 (free_display_info): Don't free disp_info->realized_font_list.
1812 (free_device): Free device->realized_fontset_list.
1813 (xft_find_metric): Use gstring->frame instead of rfont->frame.
1814 (device_open): Don't initialize disp_info->realized_font_list.
1815 (device_open): Initialize device->realized_font_list and set it to
1816 frame->realized_font_list.
1818 * fontset.c (try_font_group): New function.
1819 (mfont__lookup_fontset): Use try_font_group.
1821 * font.c (common_weight): Change the order of "regular".
1823 * face.c (Mlatin): Don't make it static.
1824 (mface__realize): Be sure to set work_gstring.frame.
1825 (mface__for_chars): Likewise.
1827 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
1830 * internal-gui.h (Mlatin): Extern it.
1832 * m17n-gui.h (MDrawControl): New member
1833 disable_overlapping_adjustment.
1835 2004-09-06 Kenichi Handa <handa@m17n.org>
1837 * font-flt.c (run_otf): Fix typo ('}'->']').
1839 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
1840 (COMBINING_PRECOMPUTED_P): New macros.
1842 * draw.c (layout_glyphs): Handle precomputed combining code.
1844 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
1845 precomupted combining code.
1847 2004-09-03 Kenichi Handa <handa@m17n.org>
1849 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
1852 2004-08-27 Kenichi Handa <handa@m17n.org>
1854 * face.c (mface_put_prop): If the new value is the same as the
1855 current one, don't increment frame->tick.
1857 2004-08-25 Kenichi Handa <handa@m17n.org>
1859 * fontset.c (mfontset): Initialize font_spec_list member.
1860 (mfontset_copy): Load fontset if necessary.
1862 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
1863 'metrics' to for C++.
1865 * draw.c (mdraw_glyph_info): Adjusted for the member name change
1868 2004-08-16 Kenichi Handa <handa@m17n.org>
1870 * Version 1.1.0 released.
1872 2004-08-13 Kenichi Handa <handa@m17n.org>
1874 * language.c (mlang__init): Add Dhivehi.
1876 * m17n-gui.c (Mx, Mfreetype): Delete it.
1877 (m17n_init_win): Don't initialize Mx and Mfreetype here.
1879 * m17n-gui.h (Mfreetype, Mxft): Extern them.
1880 (mfont_resize_ratio): Extern it.
1881 (MDrawGlyphInfo): New member logical_width;
1882 (MDrawGlyph): New type.
1883 (mdraw_glyph_list): Prototype adjusted.
1885 * m17n-X.c (xfont_open): Set type and fontp members.
1886 (xft_open): Likewise.
1888 * internal-gui.h (Mx, Mfreetype): Delete extern.
1890 * font.h (struct MRealizedFont): New member type and fontp.
1892 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1893 (Mx, Mfreetype): Declare here.
1894 (Mxft): New variable.
1895 (mfont_resize_ratio): New function.
1897 * font-ft.c (ft_open): Set type and fontp members.
1899 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
1902 2004-08-11 Kenichi Handa <handa@m17n.org>
1904 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
1907 2004-08-06 Kenichi Handa <handa@m17n.org>
1909 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
1912 * font-flt.c (run_otf): Print debugging information if necessary.
1914 2004-08-05 Kenichi Handa <handa@m17n.org>
1916 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
1917 positioning_type 5 and 6. Switch simplified.
1919 2004-08-04 Kenichi Handa <handa@m17n.org>
1921 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
1923 2004-08-02 Kenichi Handa <handa@m17n.org>
1925 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
1926 set val to 1 even if it is greater than 1.
1928 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
1930 2004-07-29 Kenichi Handa <handa@m17n.org>
1932 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
1933 debugging information.
1935 * internal.h (MDEBUG_PRINT5): New macro.
1937 * draw.c (layout_glyphs): Don't combine a zero width glyph with
1938 the previous one if the zero width glyph has left or right
1941 2004-07-26 Kenichi Handa <handa@m17n.org>
1943 * m17n-X.c (xft_render): Pay attention to members left_padding and
1944 right_padding of MGlyph.
1946 * draw.c (visual_order): Allocate one more elements for arrays as
1947 a workaround of fribidi bug.
1948 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
1949 instead of MGlyph->bidi_sensitive.
1950 (layout_glyph_string): Pay attentinon to
1951 control->orientation_reversed when padding at the head or tail.
1952 Fix adjustment of space glyph width.
1953 (get_gstring): If cursor_width or cursor_bidi is changed, don't
1956 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
1957 instead of MGlyph->bidi_sensitive.
1959 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
1961 2004-07-26 Kenichi Handa <handa@m17n.org>
1963 * draw.c (visual_order): Don't treat combined glyphs specially.
1964 (layout_glyphs): Don't get metrics glyphs that are already ready.
1965 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
1966 width with the previous one.
1967 (draw_background): Fix bar cursor position on a r2l glyph.
1969 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
1970 (run_rule): Fix place of updating cluster_begin_pos and
1971 cluster_end_pos here.
1972 (run_otf): Don't set left_padding.
1974 * font-ft.c (adjust_anchor): Type of argument `code' changed.
1976 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
1977 Fix handling of GPOS.
1978 (mfont__ft_drive_gpos): Delete this function.
1980 * font.h (mfont__ft_drive_otf): Renamed back from
1981 mfont__ft_drive_gsub.
1982 (mfont__ft_drive_gpos): Delete extern.
1984 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
1985 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
1987 2004-07-23 Kenichi Handa <handa@m17n.org>
1989 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
1990 the same bidi level.
1992 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
1994 2004-07-22 Kenichi Handa <handa@m17n.org>
1996 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
1998 2004-07-20 Kenichi Handa <handa@m17n.org>
2000 * draw.c (render_glyphs): Fix checking of g->code validity.
2002 * face.c (mface__realize): Set g.type.
2004 2004-07-18 Kenichi Handa <handa@m17n.org>
2006 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2009 * m17n-gui.c (mframe): Print error message give by dlopen to
2012 2004-07-16 Kenichi Handa <handa@m17n.org>
2014 * draw.c (compose_glyph_string): Improve the way of deciding a
2015 script. For a character that doesn't have script property, use
2016 the last non-latin script.
2018 * font-ft.c (fc_list): Cancel previous change.
2019 (mfont__ft_init): Add more entries in ft_to_prop_name.
2021 2004-07-15 Kenichi Handa <handa@m17n.org>
2023 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2024 previous or next character glyphs.
2026 2004-07-14 Kenichi Handa <handa@m17n.org>
2028 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2029 of type GLYPH_SPACE.
2031 * fontset.c (mfont__lookup_fontset): If glyph type is
2032 GLYPH_SPACE, get codes for SPACE.
2034 * internal-gui.h (Mfont): Delete extern.
2036 * m17n-gui.h (Mfont): Delete duplicated extern.
2038 2004-07-13 Kenichi Handa <handa@m17n.org>
2040 * font-ft.c (DEVICE_DELTA): New macro.
2041 (adjust_anchor): New function.
2042 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2044 (mfont__ft_drive_gpos): New function.
2046 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2047 (FontLayoutContext): Delete member `rfont'.
2048 (run_otf): Set g->otf_cmd. Call
2049 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2050 only whne HAVE_OTF is defined.
2052 * fontset.c: Include "config.h".
2054 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2055 (MGlyph): New member otf_cmd.
2057 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2058 (mfont__ft_drive_gpos): Extern it.
2060 * face.c: Include "config.h".
2062 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2064 * input-gui.c: Include "config.h".
2066 * plist.c: Include "config.h".
2068 2004-07-06 Kenichi Handa <handa@m17n.org>
2070 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2071 internal-gui.h: Cancel previous changes.
2073 * m17n-gd.h: Delete it.
2075 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2076 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2077 @XML2_LD_FLAGS@ to above.
2078 (libm17n_la_LIBADD): Add -ldl.
2079 (libm17n_la_LDFLAGS): Add -export-dynamic.
2080 (X_LD_FLAGS): Fix the order of linking.
2081 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2082 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2083 (libm17n_X_la_LDFLAGS): Add -module.
2084 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2085 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2086 (libm17n_gd_la_LDFLAGS): Add -module.
2087 (include_HEADERS): Delete m17n-gd.h.
2089 2004-06-30 Kenichi Handa <handa@m17n.org>
2091 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2092 (MDeviceLibraryInterface): Delete it.
2093 (register_device_library): Delete it.
2094 (m17n__device_library_list): Renamed from device_library_list.
2096 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2097 (m17n_init_win): Adjust prototype.
2099 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2100 (m17n_init_gd): New function.
2102 * m17n-gd.h: New file.
2104 * m17n-X.h: Include <m17n-gui.h>.
2105 (m17n_init_X): Extern it.
2106 (M17N_INIT): Redefine it.
2108 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2109 (m17n_init_X): New function.
2111 * internal-gui.h (m17n__device_library_list): Extern it.
2112 (struct MDeviceDriver): New members initialized, init, and fini.
2114 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2116 (libm17n_X_la_LIBADD): Delete aboves.
2117 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2118 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2119 (libm17n_gd_la_LDFLAGS): Delete it.
2120 (include_HEADERS): Add m17n-gd.h.
2122 2004-06-25 Kenichi Handa <handa@m17n.org>
2124 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2125 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2127 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2129 * font-ft.c (fc_list): If FcFontList finds no font, try
2132 * draw.c (compose_glyph_string): Terminate the last loop after
2133 doing default combining if necessary.
2135 2004-06-24 Kenichi Handa <handa@m17n.org>
2137 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2139 * character.c (mchar_define_property): Add const to an arg.
2141 * charset.c (mchar_define_charset): Add const to an arg.
2143 * coding.c (MCodingSystem): Add const to an arg or decoder.
2144 (finish_decoding): Add const to an arg.
2145 (decode_coding_charset, decode_coding_utf_8)
2146 (decode_coding_utf_16, decode_coding_utf_32)
2147 (decode_coding_iso_2022, decode_coding_sjis)
2148 (mconv_define_coding): Likewise.
2150 * m17n-X.c (xft_find_metric): Delete unused variable.
2152 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2155 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2158 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2159 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2161 * mtext.h (mtext__from_data): Ajust prototype.
2163 2004-06-23 Kenichi Handa <handa@m17n.org>
2165 * draw.c (compose_glyph_string): Always get glyph codes by
2167 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2168 (mdraw_glyph_list): New function.
2170 * font-flt.c (mfont__flt_run): Be sure to call
2171 rfont->driver->encode_char.
2173 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2174 (ft_encode_char): Delete arg C.
2175 (ft_render): Don't call FT_Get_Char_Index.
2177 * font.c (mfont__encodable_p): Delete it.
2178 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2180 * font.h (struct MFontDriver): Delete arg C of encode_char.
2181 (mfont__encodable_p): Delete extern.
2183 * m17n-X.c (xfont_encode_char): Delete arg C.
2184 (xft_find_metric): Don't cal FT_Get_Char_Index.
2185 (xft_render): Likewise.
2187 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2189 (mdraw_glyph_list): Extern it.
2191 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2193 2004-06-22 Kenichi Handa <handa@m17n.org>
2195 * m17n-gui.h (mfontset_lookup): Extern it.
2197 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2199 * fontset.c (realize_fontset_elements)
2200 (free_realized_fontset_elements, update_fontset_elements): New
2202 (mfont__realize_fontset): Call realize_fontset_elements.
2203 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2204 (mfont__lookup_fontset): If a fontset was modified, update
2205 the realized fontset.
2206 (mfontset_modify_entry): Increment fontset->tick.
2207 (mfontset_lookup): New function.
2209 2004-06-21 Kenichi Handa <handa@m17n.org>
2211 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2213 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2214 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2215 length of source text 0.
2217 2004-06-21 Kenichi Handa <handa@m17n.org>
2219 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2220 (compare): Pay attention to format other than utf-8.
2221 (copy): Delete this function.
2222 (count_by_utf_8, count_by_utf_16, insert): New functions.
2223 (count_utf_16_chars): Fix handling of a surrogate pair.
2224 (find_char_forward, find_char_backward): Likewise.
2225 (mtext__from_data): Delete unnecessary check. Fix number of
2227 (mtext_from_data): Don't count items.
2228 (mtext_ref_char): Optimize the code.
2229 (mtext_set_char): Pay attention to format other than utf-8.
2230 (mtext_cat_char): Likewise.
2231 (mtext_dup): Don't call copy, instead do allocation here.
2232 (mtext_cat): Call insert instead of copy.
2233 (mtext_ncat): Likewise.
2234 (mtext_cpy): Delete character at first and call insert instead of
2236 (mtext_ncpy): Likewise.
2237 (mtext_copy): Likewise.
2238 (mtext_duplicate): Call insert instead of copy.
2239 (mtext_del): Pay attention to format other than utf-8.
2240 (mtext_ins): Simply call insert.
2241 (mtext_ins_char): Pay attention to format other than utf-8.
2242 (mtext_tok): Call insert instead of copy.
2243 (mtext_text): Call UNIT_BYTES.
2245 * textprop.c (mtext__adjust_plist_for_change): New function.
2247 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2248 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2249 (CHAR_UNITS_AT): Fix typo.
2250 (CHAR_UNITS_BY_HEAD): Fix typo.
2251 (STRING_CHAR_AND_UNITS): Fix typo.
2253 * internal.h (MTEXT_READ_ONLY_P): New macro.
2255 * mtext.h (mtext__replace): Delete the extern.
2256 (mtext__adjust_foramt): Adjust prototype.
2258 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2259 if possible. Otherwise make a copy of mmt.
2261 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2264 2004-06-18 Kenichi Handa <handa@m17n.org>
2266 * character.h (CHAR_STRING_UTF16): Fix syntax.
2268 2004-06-16 Kenichi Handa <handa@m17n.org>
2270 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2271 (libm17n_X_la_LIBADD): Delete it.
2272 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2274 * m17n-X.c (device_open): Add parens in `if' condition.
2276 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2277 (DEC_POSITION): Likewise.
2278 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2280 2004-06-15 Kenichi Handa <handa@m17n.org>
2282 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2285 * draw.c (compose_glyph_string): If langauge is specified, call
2286 mface__for_chars even if a text is all latin. Fix condition for
2287 setting non_ascii_found.
2289 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2291 * m17n.h (minput_char_to_key): Delete extern.
2293 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2295 * m17n-gui.c (null_device_open): Set several members of frame.
2297 2004-06-14 Kenichi Handa <handa@m17n.org>
2299 * m17n-gui.h (minput_event_to_key): Delete extern.
2301 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2303 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2305 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2307 2004-06-08 Kenichi Handa <handa@m17n.org>
2309 * character.c (mchar_put_prop): Don't increment the ref-count of
2312 2004-06-04 Kenichi Handa <handa@m17n.org>
2314 * m17n-core.c (mdebug__register_object): New function.
2315 (mdebug__unregister_object): Likewise.
2317 * internal.h (mdebug__register_object, mdebug__unregister_object):
2319 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2322 * charset.c (mcharset__load_from_database): Don't call
2323 mconv__register_charset_coding here.
2325 * coding.c (find_coding): Get a real name from an element of
2326 coding_definition_list.
2327 (mconv__register_charset_coding): Set the real name at the top of
2329 (mcoding__load_from_database): Likewise.
2330 (mconv_list_codings): Adjusted for the above change.
2332 2004-06-03 Kenichi Handa <handa@m17n.org>
2334 * coding.c (find_coding): Find by canonicalized name. Don't have
2335 to modify the element of coding_definition_list by
2337 (mconv__define_coding_from_charset): Delete it.
2338 (mconv__register_charset_coding): Canonicalize sym.
2339 (mcoding__load_from_database): Register plist modified by
2342 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2344 * font-ft.c (ft_open): Fix setting of rfont->descent.
2346 2004-06-02 Kenichi Handa <handa@m17n.org>
2348 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2349 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2350 (xlfd_unparse_name): Renamed from xfont_build_name.
2351 (mfont__init): Initialized Mfontconfig.
2352 (mfont__free_realized): Unconditionally unref rfont->info.
2353 (mfont__select): Free `this' if it's not best.
2354 (mfont__open): Don't check frame->realized_font_list.
2355 (mfont__parse_name_into_font): New function.
2356 (Mfontconfig): New variable.
2357 (mfont_from_name): Call mfont_parse_name.
2358 (mfont_name): Call mfont_unparse_name.
2359 (mdebug_dump_font): Likewise.
2361 * font.h (struct MFontDriver): Delete members parse_name and
2363 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2364 (mfont__parse_name_into_font): Extern it.
2366 * font-ft.c: Include "symbol.h".
2367 (close_ft): Unconditionally free filename and charmap_list of
2369 (ft_open): Duplicate base->filename. Increment ref-count of
2370 ft_info->charmap_list. Free ft_info->charmap_list and
2371 ft_info->filename on error.
2372 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2374 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2376 (enum xlfd_field_idx): Moved to font.c.
2377 (split_font_name, build_font_name): Likewise.
2378 (build_font_list): Call mfont__parse_name_info_font.
2379 (xfont_open): Call mfont__unparse_name. Free name.
2380 (xfont_parse_name, xfont_build_name): Moved to font.c
2381 (xft_select): Prototype deleted.
2382 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2383 Call mfont_pase_name.
2385 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2386 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2389 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2392 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2394 2004-06-01 Kenichi Handa <handa@m17n.org>
2396 * fontset.c (mfontset_modify_entry): Pay attention to the case
2397 that fontset->font_spec_list is NULL.
2399 2004-05-31 Kenichi Handa <handa@m17n.org>
2401 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2403 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2405 * font.c (mfont__select): Print score the a font for debugging.
2407 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2409 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2410 kanji_sym and kana_sym.
2412 2004-05-28 Kenichi Handa <handa@m17n.org>
2414 * Makefile.am (VINFO): New variable.
2415 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2416 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2418 2004-05-27 Kenichi Handa <handa@m17n.org>
2420 The following chanages are to make device dependent functions
2421 accessible only from MDeviceDriver structure, and to add GD and
2422 null device drivers. Font drivers get also device dependent.
2424 * m17n.c (m17n_init): Increament shell_initialized.
2425 (m17n_fini): Decremented shell_initialized.
2427 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2429 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2430 (Mwidget, Mcolormap, Mx): Extern them.
2432 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2433 (free_frame): Call frame->driver->close instead of
2435 (DLOPEN_SHLIB_EXT): New macro.
2436 (MDeviceLibraryInterface): New type.
2437 (device_library_list): New variable.
2438 (register_device_library): New function.
2439 (null_device): New variable.
2440 (null_device_close, null_device_get_prop)
2441 (null_device_realize_face, null_device_free_realized_face): New
2443 (null_driver): New variable.
2444 (null_device_init, null_device_fini, null_device_open): New
2446 (null_interface): New variable.
2447 (Mfreetype, Mdevice): Declare them.
2448 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2449 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2450 Mwin__Close_Device. Register drivers for Mx and Mgd.
2451 (m17n_fini_win): Decremented win_initialized. Call "fini"
2452 function of all opened devices. Don't call mwin__fini.
2453 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2455 (mframe): Handle Mdevice key of PLIST.
2456 (mframe_get_prop): Call frame->device->get_prop instead of
2457 mwin__device_get_prop.
2459 * m17n-gd.c: New file.
2461 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2462 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2464 * m17n-core.c (m17n_init_core): Increate core_initialized.
2465 (m17n_fini_core): Decremented core_initialized.
2467 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2468 (Mcolormap): Don't extern them here.
2470 * m17n-X.c (FRAME_DEVICE): New macro.
2471 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2472 (free_display_info): Use MPLIST_DO.
2473 (free_device): Free rface->info.
2474 (xft_close): Delete it.
2475 (device_init): Renamed from mwin__init.
2476 (device_fini): Renamed from mwin__fini.
2477 (device_open): Renamed from mwin__open_device.
2478 (x_driver): New variable.
2479 (MXFontInfo): Delete member frame, add member display.
2480 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2481 Don't declare them here.
2483 * internal-gui.h (MDeviceType): New enum.
2484 (MWDefice): Delete it.
2485 (struct MFrame): Change type of device to void *. New members
2486 device_type, driver, font_driver_list.
2487 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2488 (MDeviceDriver): New type.
2489 (Mx, Mgd, Mfreetype): Extern them.
2490 (mwin__XXX): Delete all of them.
2492 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2494 (win_destroy_ic): Likewise.
2495 (adjust_window_and_draw): Likewise.
2496 (win_callback): Likewise.
2497 (Mxim): Declare it here.
2498 (minput_event_to_key): Call M_CHECK_READABLE.
2500 * fontset.c (mfont__lookup_fontset): Delete local variable
2503 * font.h (struct MFontDriver): Delete member close, add members
2504 parse_name and build_name.
2505 (mfont__driver_list): Delete extern.
2506 (mfont__close): Delete extern.
2508 * font.c (mfont__init): Don't set mfont__driver_list.
2509 (mfont__fini): Don't unref mfont__driver_list.
2510 (mfont__select): Try font drivers in frame->font_driver_list. Set
2511 driver member of a realized font.
2512 (mfont__close): Delete it.
2513 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2514 functions of the default frame.
2516 * font-ft.c (close_ft): Check ft_info->ft_face and work
2518 (add_font_info): Allocate ft_info by M17N_OBJECT.
2519 (ft_close): Delete it.
2520 (mfont__ft_driver): Don't set ft_close.
2521 (ft_select): Increment ref-count of best_font.
2522 (ft_open): Decremented ref-count of base. On error, call
2523 FT_Done_Face and free ft_info.
2524 (ft_find_metric): Always use XXX_MONO in load_flags.
2525 (ft_render): Fix setting of width. Call
2526 frame->driver->draw_points instead of mwin__draw_points.
2527 (ft_to_prop): Don't set mfont__driver_list.
2528 (mfont__ft_fini): Just unref ft_info.
2530 * face.c (mface__init): Exchange foreground and background of
2531 mface__default. Call mface_put_prop to set hline of
2533 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2534 (mface__free_realized): Don't call mwin__free_realized_face.
2536 * draw.c (Mdepth): Don't declare it here.
2537 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2538 (render_glyphs, render_glyph_string): Likewise.
2539 (mdraw__init): Don't set Mdepth.
2540 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2542 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2544 (mdraw_text_items): Check FRAME is writable.
2545 (mdraw_per_char_extents): Implement body.
2547 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2549 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2550 (GUI_SOURCES): Delete it.
2551 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2552 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2553 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2554 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2555 (linkgui_LDADD): Set to libm17n-gui.la
2556 (linkgui_LDFLAGS): New target.
2557 (SRC): Include ${libm17n_gui_la_SOURCES} and
2558 ${libm17n_gd_la_SOURCES}.
2560 2004-05-24 Kenichi Handa <handa@m17n.org>
2562 * draw.c (draw_background): Don't draw background even if
2563 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2565 2004-05-22 Kenichi Handa <handa@m17n.org>
2567 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2569 2004-05-20 Kenichi Handa <handa@m17n.org>
2571 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2573 * m17n-gui.c: Include "plist.h".
2574 (mframe): If PLIST is NULL, initialize it to emply plist.
2576 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2577 (xft_driver): New variable.
2578 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2579 (xft_find_metric, xft_render): New function.
2580 (mwin__init): Adjusted for the new mfont__driver_list.
2581 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2582 generated face to PARAM.
2583 (mwin__realize_face): Fix setting of box colors. Don't call hook
2585 (mwin__draw_hline): New function.
2586 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2587 (mwin__xft_render): Delete these function.
2589 * internal-gui.h (struct MFrame): New member tick.
2590 (struct MGlyphString): New member tick.
2591 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2592 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2593 (mwin__xft_render): Delete extern.
2595 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2596 (mfontset): Always increment the reference count of returned
2599 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2600 (MFTInfo): Moved to font.h.
2601 (ft_iso8859_1_font_list): Delete this variable.
2602 (set_font_info): Don't set font->property[MFONT_TYPE].
2603 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2604 (add_font_info): Change type to void.
2605 (fc_list): Change anme from xft_list. Caller changed. Include
2606 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2607 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2608 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2609 (close_ft): Don't call mwin__xft_close. Unref
2610 ft_info->extra_info.
2611 (ft_open): Don't setup ft_info->fontname. Don't call
2613 (ft_find_metric): Don't call mwin__xft_get_metric.
2614 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2615 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2616 (mfont__ft_init): Adjusted for new mfont__driver_list.
2617 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2619 * font.c (mfont__driver_list): Make it MPlist.
2620 (mfont__init): Adjust initialization of mfont__driver_list.
2621 (mfont__fini): Free mfont__driver_list.
2622 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2623 (mfont__select): Adjusted for the new mfont__driver_list.
2625 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2626 (mfont__drirver_list): Adjust prototype.
2627 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2629 * face.h (struct MFace): Delete member realized_face_list, add
2631 (struct MRealizedFace): Delete member need_update
2632 andnofont_rface, add member non_ascii_list.
2633 (mface__update_frame_face): Extern it.
2635 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2637 (get_hline_create, get_box_create): New functions.
2638 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2640 (free_face): Cancep previous change. Free face->frame_list.
2641 (serialize_hline): Do nothing if hline->width is zero.
2642 (serialize_box): Do nothing if box->width is zero.
2643 (mface__init): Setup all properties of mface__default.
2644 (mface__fini): Free hline_prop_list and box_prop_list.
2645 (mface__realize): Cancel previous change. Update
2646 face->frame_list. Setup rface->non_ascii_list.
2647 (mface__for_chars): Update rface->non_ascii_list.
2648 (mface__free_realized): Free rface->non_ascii_list.
2649 (mface__update_frame_face): New function.
2650 (mface): Initialize face->frame_list.
2651 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2653 (mface_merge): Likewise.
2654 (mface_put_prop): If key is Mhline or Mbox, get value by
2655 get_hline_create or get_box_create respectively.
2656 (mface_put_prop): Update frame->tick and call
2657 mface__update_frame_face if necessary.
2658 (mface_update): Do nothing if func is noop_hook.
2660 * draw.c (render_glyphs): If a font is not found, use
2661 mwin__draw_empty_boxes.
2662 (alloc_gstring): Initialize gstring->tick.
2663 (get_gstring): Check gstring->tick.
2665 2004-05-17 Kenichi Handa <handa@m17n.org>
2667 * face.c (find_realized_face): Return value changed. If RFONT is
2668 NULL, avoid unnecessary checking.
2669 (free_face): Free face->realized_face_list.
2670 (mface__realize): Adjusted for the change of find_realized_face.
2671 If it returns a realized face that needs update, free it and
2672 realize a new one. Push a new realized face to
2673 frame->realized_face_list instead of appending.
2674 (mface__for_chars): Adjusted for the change of find_realized_face.
2675 Short cut if the required font is in rface->ascii_rface.
2676 (mface_put_prop): Free old value if necessary. Set need_update
2677 member of realized faces to 1.
2679 * face.h (struct MFace): Delete member tick, add member
2681 (struct MRealizedFace): Delete member tick, add member
2684 2004-05-13 Kenichi Handa <handa@m17n.org>
2686 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2688 2004-05-12 Kenichi Handa <handa@m17n.org>
2690 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2692 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2693 parse it XftNameParse.
2695 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2696 (all_fonts_scaned): New variable.
2697 (set_font_info): FAMILY may be Mnil.
2698 (add_font_info): Argument changed.
2699 (xft_list): Call add_font_info in it.
2700 (ft_list): Likewise.
2701 (ft_select): Make it work in the case family is Mnil.
2702 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2703 (mfont__ft_fini): Set all_fonts_scaned to 0.
2705 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2706 that is failed to open.
2708 2004-05-10 Kenichi Handa <handa@m17n.org>
2710 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2711 device's depth is 1 (i.e. monochrome).
2713 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2714 to work around the problem of libtool.
2716 * font-ft.c: Include <freetype/ftbdf.h>.
2717 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2719 (mfont__ft_init): Initialize them.
2720 (ft_iso8859_1_font_list): New variable.
2721 (set_font_info): Detect a font containing iso8859-1 glyphs and
2722 register it in ft_iso8859_1_font_list. If the font is not
2723 scalable, assume it as BDF or PCF font and setup SIZE and RESY
2724 properties of the font from its properties.
2725 (add_font_list): If the font is not scalable, check if it is BDF
2726 or PCF font. If not, ignore it.
2727 (ft_select): If FAMILY is Mnil, return NULL only if the requested
2728 registry is not iso8859-1.
2729 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2730 ft_iso8859_1_font_list.
2731 (ft_find_metric): If the font is not scalable, assume it as BDF
2732 or PCF, and get a metric from its properties.
2733 (mfont__ft_fini): Free ft_iso8859_1_font_list.
2735 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
2737 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2738 (libm17n_la_LDFLAGS): Delete it.
2739 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2740 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2742 2004-05-06 Kenichi Handa <handa@m17n.org>
2744 * draw.c (compose_glyph_string): Fix previous change.
2746 2004-04-30 Kenichi Handa <handa@m17n.org>
2748 * font-ft.c (ft_list): Delete unused variable `result'.
2749 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
2751 2004-04-27 Kenichi Handa <handa@m17n.org>
2753 * m17n-X.c: Include config.h
2754 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
2755 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
2756 (MWDevice) [HAVE_XFT2]: New member xft_draw.
2757 (FRAME_CMAP, FRAME_VISUAL): New macros.
2758 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
2759 (xfont_driver): Make it static.
2760 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
2761 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
2762 info->xft_color_back.
2763 (MXftFontInfo) [HAVE_XFT2]: New type.
2764 (mwin__xft_close) [HAVE_XFT2]: New function.
2765 (mwin__xft_open) [HAVE_XFT2]: New function.
2766 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
2767 (mwin__xft_render) [HAVE_XFT2]: New function.
2769 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2770 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
2771 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
2774 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2776 * font-ft.c: Don't include FT_FREETYPE_H here.
2777 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
2778 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
2779 (MFTInfo): New member charmap_index.
2780 (MFTInfo) [HAVE_XFT2]: New member xft_info.
2781 (check_otf_filename): Renamed from check_filename. Return value
2783 (ft_set_property): This function deleted.
2784 (set_font_info): New function.
2785 (add_font_list): Argument changed. Add multiple fonts.
2786 (xft_list) [HAVE_XFT2]: New function.
2787 (ft_list) [not HAVE_XFT2]: New function.
2788 (ft_select): Add code for Xft.
2789 (close_ft): Likewise.
2790 (ft_open): Likewise.
2791 (ft_find_metric): Likewise.
2792 (ft_encode_char): Likewise.
2793 (ft_render): Likewise.
2795 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
2797 2004-04-26 Kenichi Handa <handa@m17n.org>
2799 * textprop.c (mtext_attach_property): Declare the return type as
2802 2004-04-21 Kenichi Handa <handa@m17n.org>
2804 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
2806 2004-04-09 Kenichi Handa <handa@m17n.org>
2808 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
2810 (load_command): Setup above members.
2812 2004-04-05 Kenichi Handa <handa@m17n.org>
2814 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
2816 2004-03-30 Kenichi Handa <handa@m17n.org>
2818 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
2821 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
2822 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
2824 2004-03-29 Kenichi Handa <handa@m17n.org>
2826 * Version 1.0 Patch Level 2 released.
2828 2004-03-29 Kenichi Handa <handa@m17n.org>
2830 * charset.c (make_charset): Set charset->fully_loaded and
2831 charset->simple correctly. Don't try to get charset->min_char and
2832 charset->max_char for a charset of method subset and superset.
2833 Don't load a mapping file here.
2834 (mcharset__init): Set unified_max.
2835 (mcharset__load_from_database): Free a working plist.
2837 * coding.c (mcoding__fini): Free all malloced data.
2839 * input-gui.c (win_create_ic): Set control.as_image for preediting
2842 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
2843 `count') to initialize the array.
2845 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
2848 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
2850 (mwin__create_window): Fix bug of setting a background pixel of a
2852 (mwin__adjust_window): Clear the window before drawing.
2854 * m17n-core.c (mdebug__report_object): Free array->objectes if
2856 (m17n_init_core): Don't set report_header_printed to 0 here.
2857 Fix debugging information.
2858 (m17n_fini_core): Set report_header_printed to 0 here.
2860 * m17n-core.h (mplist_deserialize): Extern it.
2862 * m17n-gui.c (m17n_fini_win): Fix debugging information.
2864 * m17n.c (m17n_fini): Fix debugging information.
2866 * mtext.c (mtext__adjust_foramt): New function.
2868 * mtext.h (mtext__adjust_foramt): Extern it.
2870 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2872 * plist.h (mplist__deserialize): Don't extern it.
2874 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
2875 elements of symbol_table to NULL. Report about created and freed
2876 symbols if MDEBUG_FINI is set.
2878 2004-03-22 Kenichi Handa <handa@m17n.org>
2880 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2882 * m17n.c (m17n_init): Fix the way of checking merror_code.
2884 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2886 2004-03-22 Kenichi Handa <handa@m17n.org>
2888 * fontset.c (realize_font_group): Adjust the font size by
2889 mfont__resize before selecting a font.
2891 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2893 2004-03-19 Kenichi Handa <handa@m17n.org>
2895 * Version 1.0 Patch Level 1 released.
2897 2004-03-19 Kenichi Handa <handa@m17n.org>
2899 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
2901 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
2903 2004-03-19 Kenichi Handa <handa@m17n.org>
2905 Re-apply the changes forgotten in the released version.
2907 * charset.c (mcharset__load_from_database): Call
2908 mchar_define_charset.
2910 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
2911 (mconv_encode_range): Put Mcoding text property.
2913 2004-03-18 Kenichi Handa <handa@m17n.org>
2915 * draw.c (Mdepth): New variable.
2916 (visual_order): Delete unused local var `pos'.
2917 (compose_glyph_string): Fix for the case that gstring->glyphs is
2918 realloced. Stop generating glyphs at TO. Fix handling of
2920 (layout_glyphs): Get metrics of all glyphs in advance. Set
2921 lbearing and rbearing of base of composition glyph correctly.
2922 Handle left-overhang glyphs correctly.
2923 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
2925 (dump_combining_code): Change the defualt off_x character to ".".
2926 (mdraw__init): Initialize Mdepth.
2928 * face.c (work_gstring): New variable
2929 (mface__init): Initialize work_gstring.
2930 (mface__fini): Free work_gstring.glyphs.
2931 (mface__realize): Don't handle videomode property here. Adjusted
2932 for the change of mfont__get_metric.
2933 (mface__for_chars): Adjusted for the change of mfont__get_metric.
2935 * face.h (enum face_gc): Moved to m17n-X.c.
2937 * font.h (struct MFontDriver): Arguments of find_metric changed.
2938 (mfont__select): Prototype adjusted.
2939 (mfont__get_metric): Likewise.
2940 (mfont__ft_drive_otf): Likewise.
2941 (mfont__flt_run): Likewise.
2943 * font.c (mfont__select): New argument layouter. If layouter is
2944 different in the registered font, make a new copy of realized
2946 (mfont__get_metric): Argument changed. Get metrics of multiple
2948 (mfont_find): Call mfont__select with layouter as Mnil.
2950 * font-flt.c (FontLayoutContext): New member rfont.
2951 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
2952 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
2954 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
2956 (NUM_POINTS): New macro.
2957 (MPointTable): New type.
2958 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
2959 (mfont__ft_drive_otf): New argument rfont.
2961 * fontset.c (realize_font_group): Adjusted for the changed of
2963 (check_fontset_element): This function deleted.
2965 * input-gui.c (adjust_window_and_draw): Locate a preedit window
2966 off the parent window if the preedit text is zero length.
2968 * internal-gui.h (struct MFrame): New members foreground,
2969 background, videomode, font.
2970 (struct MGlyphString): New member anti_alias.
2971 (MDrawPoint): New type.
2972 (mwin__draw_bitmap): Prototype deleted.
2973 (mwin__draw_points): Prototype added.
2975 * m17n-gui.h (MDrawControl): New member anti_alias.
2977 * m17n-gui.c (free_frame): Free frame->font.
2978 (mframe): Set the fontset of frame->face to the default fontset.
2980 * m17n-X.c (RGB_GC): New type.
2981 (enum gc_index): Renamed from enum face_gc. Member names changed.
2983 (struct MWDevice): Members foreground and background deleted. New
2984 member scratch_gc, gc_list.
2985 (DEFAULT_FONT, FALLBACK_FONT): New macros.
2986 (free_device): Free GCs in device->gc_list.
2987 (get_rgb_gc): New function.
2988 (get_gc): Renamed and argument changed from get_color.
2989 (get_gc_for_anti_alias): New function.
2990 (xfont_find_metric): Arguments changed. Get metrics of multiple
2992 (set_region): Argument changed. Caller changed.
2993 (xfont_render): Allways set a font in gc.
2994 (x_error_handler, x_io_error_handler): Define only if
2995 X_SET_ERROR_HANDLER is defined.
2996 (mwin__open_device): Create device->scratch_gc. Set members
2997 foreground, background, and videomode of frame. Call
2998 XSetErrorHandler and XSetIOErrorHandler only if
2999 X_SET_ERROR_HANDLER is defined.
3000 (struct gc_list): Deleted.
3001 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3002 (mwin__realize_face): Adjusted for the change of the format of
3003 rface->info and the charge of set_region.
3004 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3005 (mwin__draw_box): Likewise.
3006 (mwin__draw_bitmap): This function deleted.
3007 (mwin__draw_points): New function.
3008 (mwin__verify_region): Adjusted for the change of the format of
3009 rface->info and the charge of set_region.
3010 (mwin__create_window): Inherit backgound pixel from parent.
3011 (mwin__dump_gc): Adjusted for the change of the format of
3014 2004-03-16 Kenichi Handa <handa@m17n.org>
3016 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3018 * input.c (M_key_alias): New variable.
3019 (handle_key): Try M_key_alias property of a key too.
3020 (minput__init): Initialize M_key_alias. Give that property to
3021 symbols in one_char_symbol. Fix bug of initializing
3024 * draw.c (compose_glyph_string): Don't handle
3025 ignore_formatting_char here. Include formatting characters in the
3026 range processed by a FTL.
3027 (layout_glyph_string): Handle ignore_formatting_char here.
3029 2004-03-12 Kenichi Handa <handa@m17n.org>
3031 * input-gui.c (win_create_ic): Enable bidi in status control.
3033 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3035 2004-03-09 Kenichi Handa <handa@m17n.org>
3037 * input.c (load_input_method): If title is not specified, use the
3038 input method name as title.
3040 * m17n-X.c (get_color): Make it static.
3041 (xim_create_ic, xim_destroy_ic, x_error_handler)
3042 (x_io_error_handler): Likewise.
3044 2004-03-01 Kenichi Handa <handa@m17n.org>
3046 * Version 1.0 released.
3049 Copyright (C) 2003, 2004
3050 National Institute of Advanced Industrial Science and Technology (AIST)
3051 Registration Number H15PRO112
3053 This file is part of the m17n library.
3055 The m17n library is free software; you can redistribute it and/or
3056 modify it under the terms of the GNU Lesser General Public License
3057 as published by the Free Software Foundation; either version 2.1 of
3058 the License, or (at your option) any later version.
3060 The m17n library is distributed in the hope that it will be useful,
3061 but WITHOUT ANY WARRANTY; without even the implied warranty of
3062 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3063 Lesser General Public License for more details.
3065 You should have received a copy of the GNU Lesser General Public
3066 License along with the m17n library; if not, write to the Free
3067 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA