1 2006-09-14 Kenichi Handa <handa@m17n.org>
3 * database.c: Include <libgen.h>.
4 (mdatabase__lock): Make a directory if necessary.
6 * input.c (resolve_command): Adjusted for the format change of
7 configured_cmds member.
8 (load_commands, load_variables): Fix for errornous data handling.
9 (config_command, config_variable): New function.
10 (config_all_commands, config_all_variables): Renamed from
11 config_commands and config_variables. Utilize the above function.
12 (check_variable_value): Argument changed. Callers changed.
13 (load_im_info): Call config_all_commands and config_all_variables.
14 (init_ic_info): Adjusted for the format change of configured_vars
16 (minput__init): Initialize Mcustomized, Mconfigured, and
18 (Mcustomized, Mconfigured, Minherited): New variables.
19 (minput_get_command): Be sure to return NULL if an input method
21 (minput_get_variable): Be sure to return NULL if an input method
22 use no local variable.
23 (minput_config_command, minput_config_variable)
24 (minput_save_config): Adjusted for the format change of
25 configured_cmds and configured_vars members.
27 * plist.c (write_element): Delete superfluous ':'.
29 2006-09-13 Kenichi Handa <handa@m17n.org>
31 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
32 (minput_config_file): Extern it.
34 * draw.c (Minherited): Declaration moved to input.c.
35 (mdraw__init): Don't initialize Minherited here.
37 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
39 2006-09-07 Kenichi Handa <handa@m17n.org>
41 * textprop.c (mtext_serialize): Call mplist__serialize with the
44 * plist.h (mplist__serialize): Prototype adjusted.
45 (mplist__assq): Extern it.
47 * plist.c: Include <ctype.h>
48 (PUTC, PUTS): New macros.
49 (write_symbol): New function.
50 (write_element): New arg indent.
51 (dump_string, dump_plist_element): Delete them.
52 (mplist__from_string): New arg pretty.
53 (mplist__assq): New function.
54 (mdebug_dump_plist): Use write_element.
56 * mtext.c (mtext_cat_char): Allocate more memory.
57 (mdebug_dump_mtext): Don't escal a newline character.
59 * m17n.h (minput_get_command, minput_get_variable)
60 (minput_config_command, minput_config_variable)
61 (minput_save_config): Extern them.
63 * m17n-core.c: Include <string.h>.
64 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
65 use the stream stdout instead of a file of that name.
67 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
70 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
71 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
72 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
73 (MDEBUG_DUMP): Flush the stream.
75 * input.h (struct _MInputMethodInfo): Delete member im. New
76 members mdb, language, name, extra, cmds, configured_cmds,
77 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
78 (MInputContextInfo): New member tick.
80 * input.c: Big change to improve user-side input method
81 customization. Here, list just public API changes.
82 (minput_get_commands, minput_get_variables)
83 (minput_assign_command_keys, minput_set_variable): Label them
85 (minput_get_command, minput_get_variable)
86 (minput_config_command, minput_config_variable)
87 (minput_save_config): New functions.
89 * database.h (PATH_MAX): Define it if not yet defined.
90 (PATH_SEPARATOR): Likewise.
91 (enum MDatabaseStatus): New enum.
92 (struct MDatabaseInfo): Moved from database.c. New members status,
93 time, lock_file, and uniq_file.
94 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
95 (mdatabase__unlock): Extern them.
97 * database.c: Include <time.h>.
98 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
99 (GEN_PATH): Args changed. Callers changed.
100 (struct MDatabaseInfo): Moved to database.h.
101 (struct MDatabase, mdb_list): Deleted.
102 (mdatabase__list): New var.
103 (get_database_filename): Deleted. Callers changed to use
105 (find_file, get_database_file): New files.
106 (get_dir_info): Initialize new members of MDatabaseInfo.
107 (find_database): Arg chagnded. Callers changed.
108 (free_db_info, register_database, register_databases_in_files):
110 (update_database_list): Deleted.
111 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
112 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
113 (mdatabase__update): New function.
114 (mdatabase__check): Return value changed.
115 (mdatabase__file, mdatabase__lock, mdatabase__save)
116 (mdatabase__unlock): New functions.
118 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
120 * input.c (get_surrounding_text): Return -2 when surrounding text
122 (get_following_char): Likewise.
123 (get_preceding_char): Likewise.
124 (minput__callback): Return 0 if there is a callback function,
127 2006-08-17 Kenichi Handa <handa@m17n.org>
129 * input.c (reset_ic): Use shift_state to setup the current state.
131 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
133 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
134 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
135 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
137 2006-08-02 Kenichi Handa <handa@m17n.org>
139 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
141 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
143 * font-ft.c (ft_encapsulate): Add code for debugging.
144 (mfont__ft_drive_otf): Be sure to encode character before getting
147 2006-07-21 Kenichi Handa <handa@m17n.org>
149 * draw.c (mdraw_text_extents): Fix previous typo.
151 2006-07-19 Kenichi Handa <handa@m17n.org>
153 * draw.c (gstring_width): New arg lbearing.
154 (render_glyph_string): Adjusted for the change of gstring_width.
155 (mdraw_text_extents): Fix lbearing of ink and line metrics.
157 * m17n-core.h (Mlanguage): Extern it.
159 * m17n.h (Mlanguage): Extern deleted.
161 * mtext.c (mtext__init): Initialize Mlanguage.
162 (Mlanguage): Declaration moved from locale.c
164 * locale.c (mlocale__init): Don't initialize Mlanguage here.
165 (Mlanguage): Declaration moved to mtext.c.
167 * language.c (mlang__init): Don't initialize Mlanguage here.
169 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
171 2006-07-14 Kenichi Handa <handa@m17n.org>
173 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
174 (MRealizedFontFT): New member face_encapsulated.
175 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
176 (ft_gen_font): New function.
177 (ft_add_font): Use ft_gen_font.
178 (ft_list_script): Store lists in ft_script_list.
179 (ft_check_otf): New arg ft_face. Caller changed.
180 (ft_check_language): Likewise.
181 (ft_check_script): Likewise.
182 (ft_encapsulate, ft_close): New functions.
183 (mfont__ft_driver): Initialize members encapsulate and close.
184 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
186 * font.h (struct MRealizedFont): New member encapsulating.
187 (struct MFontDriver): New members encapsulate and close.
189 * font.c (mfont__match_p): If FONT is realized, check capability
190 by font drivers's check_capability method.
191 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
194 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
195 declarations of foundry and fam local vars.
196 (xft_driver): Make it static.
198 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
199 (mfont_close): Extern them.
201 * m17n-gd.c (device_open): Don't specify foundry and family of the
204 2006-07-11 Kenichi Handa <handa@m17n.org>
206 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
208 2006-07-13 Kenichi Handa <handa@m17n.org>
210 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
212 (ft_check_script): Delete unused var.
213 (ft_list_capability): Likewise.
215 * font.c (mfont__get_capability): Setup cap->otf.
216 (Motf): Make it global.
217 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
219 * font.h (MFontCapability): New member otf.
221 * language.c (mlang__fini): Delete unused vars.
223 * m17n-gui.h (Motf): Extern it.
225 * database.c (update_database_list): Delete unused vars.
227 2006-07-07 Kenichi Handa <handa@m17n.org>
229 * font-ft.c (DEVICE_DELTA): Fix typo.
231 2006-07-06 Kenichi Handa <handa@m17n.org>
233 * fontset.c (mfont__lookup_fontset): Don't ignore family and
236 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
238 * database.c: Update comments.
240 2006-07-05 Kenichi Handa <handa@m17n.org>
242 * database.c (PATH_MAX): Define it if not yet defined.
243 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
245 (get_database_filename): Use GEN_PATH.
246 (get_dir_info): Don't include the last '/' in directory name.
247 (register_database): New function.
248 (update_database_list): Use register_database. Search all
249 directories in mdatabase__dir_list for wildcard databases.
250 (mdatabase__init): Check "~/.m17n.d".
252 2006-07-03 Kenichi Handa <handa@m17n.org>
254 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
255 push reverse property.
257 * plist.c (dump_plist_element): Fix previous change.
259 2006-06-28 Kenichi Handa <handa@m17n.org>
261 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
264 * draw.c (MbidiNSM): New variable.
265 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
266 attention to bidi type NSM.
267 (mdraw__init): Initialize MbibiNSM.
269 * language.c (mscript__char_list): Fix finding a char-list element.
271 * plist.c (dump_string): Return number of printed characters.
272 (dump_plist_element): Print elements more compactly.
274 2006-06-23 Kenichi Handa <handa@m17n.org>
276 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
277 (include_HEADERS): Likewise.
279 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
281 * language.c: Update documentation.
283 2006-06-23 Kenichi Handa <handa@m17n.org>
285 * font-ft.c (struct MFontFT): Delete member lang.
286 (free_ft_info): Don't unref member lang. Destroy members langset
288 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
289 changed. Set members langset and charset.
290 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
292 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
294 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
295 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
296 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
297 characters at first. If it fails, try listing by language names.
298 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
299 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
300 change of MFontCapability.
301 (ft_list_capability): Likewise. Try listing by languages, then by
302 scripts. Check OTF at last.
303 (ft_check_script): New function.
304 (ft_select): Adjusted for the check of MFontCapability.
305 (ft_list_family_names): New function.
306 (ft_check_capability): If cap->script is not Mnil, call
308 (mfont__ft_driver): Initialize with ft_list_family_names.
310 * font.h (struct MFontDriver): New member list_fmaily_names.
311 (struct): Change member "MSymbol *lang" to "MSymbol language".
313 * font.c: Include "language.h".
314 (Motf): New variable.
315 (otf_script_list, load_otf_script_list): Delete it.
316 (find_script_from_otf_tag): Delete it.
317 (merge_capability): New function.
318 (mfont__init): Init Motf.
319 (mfont__fini): Don't unref otf_script_list.
320 (free_font_capability): Check cap->script_tag to determine if
321 OTF-related capability is set.
322 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
323 the change of type MFontCapability.
324 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
326 (mfont_list): Call merge_capability for LANGUAGE arg.
327 (mfont_list_family_names): New function.
329 * input-gui.c: Typo in comments fixed.
331 * input.c: Typo in comments fixed.
333 * language.h (mlanguage__list): Delete it.
334 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
337 * language.c: Include "mtext.h".
338 (M_script_lang_list): Delete it.
339 (language_list, script_list): New variables.
340 (load_lang_script_list, init_language_list, init_script_list): New
342 (mlang__init): Don't load language database here.
343 (mlang__fini): Unref language_list and script_list if not NULL.
344 (mlanguage__list): Delete it.
345 (mlanguage__info, mscript__info, mscript__char_list)
346 (mscript__otf_tag, mscript__from_otf_tag): New functions.
347 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
348 (mscript_list, mscript_language_list): New functions.
350 * m17n-gui.h (mfont_list_family_names): Extern it.
352 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
353 (mlanguage_text, mscript_list, mscript_language_list): Extern
356 2006-06-21 Kenichi Handa <handa@m17n.org>
358 * m17n-X.c (xfont_driver): Initialize with
359 xfont_list_family_names.
360 (xfont_list_family_names): New function.
361 (xft_driver): Initialize with NULL for list_family_names member.
362 (device_init): Set list_family_names member of xft_driver to that
365 2006-06-06 Kenichi Handa <handa@m17n.org>
367 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
369 2006-03-24 Kenichi Handa <handa@m17n.org>
371 * font-ft.c (ft_open): Improve debug message.
373 * fontset.c (mfontset__get_font): Fix for the case that no font in
374 per_script list is available.
376 2006-02-06 Kenichi Handa <handa@m17n.org>
378 * Version 1.3.3 released.
380 2006-02-22 Kenichi Handa <handa@m17n.org>
382 * textprop.c: Fix some typos in documentation.
384 * plist.c: Fix some typos in documentation.
386 * m17n-core.h: Fix some typos in documentation.
387 (M17NLIB_PATCH_LEVEL): Updated to 3.
388 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
390 * symbol.c: Fix some typos in documentation.
392 * mtext.c: Fix some typos in documentation.
394 * input.c: Fix several typos in documentation.
396 2006-02-06 Kenichi Handa <handa@m17n.org>
398 * Version 1.3.2 released.
400 2006-02-03 Kenichi Handa <handa@m17n.org>
402 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
403 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
405 * font.c (xlfd_parse_name): Fix handling of the name "nil".
407 * draw.c (layout_glyphs): Fix handling left_padding of
410 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
412 2006-02-02 Kenichi Handa <handa@m17n.org>
414 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
417 2006-01-25 Kenichi Handa <handa@m17n.org>
419 * input.c (resolve_expression): If the value of PLIST is a plist,
420 but the first element is not symbol, return 0.
422 2006-01-17 Kenichi Handa <handa@m17n.org>
424 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
425 HAVE_GD is 2 or the greater.
427 2006-01-16 Kenichi Handa <handa@m17n.org>
429 * Version 1.3.1 released.
431 2006-01-16 Kenichi Handa <handa@m17n.org>
433 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
434 simulating anti-aliasing.
436 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
437 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
439 2006-01-12 Kenichi Handa <handa@m17n.org>
441 * input.c (get_surrounding_text): Always pop ic->plist.
442 (reset_ic): Don't reset ic->plist.
444 2006-01-10 Kenichi Handa <handa@m17n.org>
446 * input.c (preedit_commit): For debugging, print only commiting
447 charactes. Don't set ic->candidate_show to 0.
448 (handle_key): Don't run branch-actions just by shifting to the
450 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
451 Reset vars and plist.
453 2006-01-07 Kenichi Handa <handa@m17n.org>
455 * input.c (load_branch): Confirm that maps is not NULL.
457 2006-01-05 Kenichi Handa <handa@m17n.org>
459 * input-gui.c (win_filter): Try to convert arg to key only when
462 * plist.c (read_integer_element): If '#' and '-' are followed by
463 non-integer-constituent, read them as a part of a symbol.
464 (read_symbol_element): New arg C.
465 (read_element): Adjust args to read_symbol_element.
467 * input.c (load_macros): On overwriting a macro, free the old
469 (minput__init): Store Mmap in load_im_info_keys.
470 (minput_get_title_icon): If the input method has no title, be sure
472 (minput_get_description): If the input method has no description,
473 be sure to return NULL.
474 (minput_get_variables): Fix documentation.
475 (handle_key): Pay attention to the case that key is Mnil.
476 (filter): Likewise. Fix handling of such symbol as S-A.
478 2005-12-22 Kenichi Handa <handa@m17n.org>
480 * Version 1.3.0 released.
482 2005-12-22 Kenichi Handa <handa@m17n.org>
484 * font-ft.c (ft_list): If the specified font has no property,
487 2005-12-20 Kenichi Handa <handa@m17n.org>
489 * character.c (mchar_get_prop): Check char_prop_list.
490 (mchar_put_prop, mchar_get_prop_table): Likewise.
492 2005-12-18 Kenichi Handa <handa@m17n.org>
494 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
495 file name sans language.
497 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
499 * input.c: Fix typo in comments.
501 2005-12-14 Kenichi Handa <handa@m17n.org>
503 * input.c (minput_get_title_icon): Check the default icon for the
506 2005-12-13 Kenichi Handa <handa@m17n.org>
508 * input.c (Mless_equal, Mgreater_equal): New variables.
509 (parse_expression, resolve_expression, parse_action_list)
510 (take_action_list): Handle the aboves.
511 (filter): Treat key S-X as X.
512 (minput__init): Initialize Mless_equal and Mgreater_equal.
513 (minput_get_title_icon): New function.
515 * m17n.h (minput_get_title_icon): Extern it.
517 * database.c (get_database_filename): Return a filename instead of
519 (load_database): Adjusted for the above change.
520 (mdatabase__load_for_keys): Likewise.
521 (mdatabase__find_file): New function.
523 * database.h (mdatabase__find_file): Extern it.
525 * font.h (mfont__resize): Delete extern.
527 * font.c (mfont__list): Check resize ratio.
528 (mfont__resize): Delete it.
529 (mfont_resize_ratio): Include the code of mfont__resize.
531 * font-ft.c (ft_open): Check resize ratio.
533 * m17n-X.c (xfont_open): Check resize ratio.
534 (xft_open): Likewise.
536 2005-12-07 Kenichi Handa <handa@m17n.org>
538 * input.c (take_action_list): If take_action_list return -1,
540 (handle_key): Likewise.
542 * face.c (mface__for_chars): When font is specified and layouter
543 is found for it, if the layouter doesn't support one of a
544 character, use a face sans layouter for it.
546 2005-12-06 Kenichi Handa <handa@m17n.org>
548 * fontset.c (mfont__lookup_fontset): If only a fallback font is
549 found, don't use it for more than one character.
551 2005-12-05 Kenichi Handa <handa@m17n.org>
553 * face.c (mface__realize): Set rfont->layouter to Mnil.
554 (mface__for_chars): Fix handling of layouter.
556 * character.h (mchar__define_prop): Extern it.
558 * database.c (update_database_list): Call mchar__define_prop if
561 * character.c (mchar__init): Don't call mchar_define_property.
562 Instead just initialize property keys.
563 (mchar__fini): Free char_prop_list only if it's not NULL.
564 (mchar__define_prop): New function.
565 (mchar_define_property): Call mchar__define_prop.
567 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
570 2005-12-02 Kenichi Handa <handa@m17n.org>
572 * language.c (mlang__init): Handle extra chars.
574 * m17n-gui.h (mfont_check): Adjust prototype.
576 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
577 (xfont_check_capability): New function.
578 (xft_driver): Specify xft_check_capability.
579 (xft_check_capability): New function.
581 * font-ft.c (M0_3): Delete it.
583 (ft_get_charmaps): Refer to M0.
584 (fc_parse_pattern): Fix previous change.
585 (ft_list_language): Check also extra chars.
586 (ft_check_otf): Define it even if HAVE_OTF is undef.
587 (ft_check_lang): Check the result of FcLangSetHasLang against
588 FcLangDifferentLang. Check also extra chars.
589 (ft_list_capability): Delete ifdef HAVE_OTF.
590 (ft_select): Likewise.
591 (ft_open): Improve debug information.
592 (ft_check_capability): New function.
593 (mfont__ft_driver): Specify ft_check_capability.
594 (mfont__ft_init): Initialize M0.
596 * fontset.c (get_font_from_group): New function.
597 (mfontset__get_font): New function.
599 * fontset.h (mfontset__get_font): Extern it.
601 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
602 (mfont__fini): Delete ifdef HAVE_OTF.
603 (free_font_capability): Likewise.
604 (mfont__get_capability): Likewise.
605 (mfont__check_capability): New function.
606 (mfont_check): Change the order of arguments. Use
609 * font.h (struct MFontDriver): New member check_capability.
610 (MFontCapability): Delete ifdef HAVE_OTF.
611 (mfont__check_capability): Extern it.
613 * face.c (mface__realize): Fix handling of FONT arg.
614 (mface__for_chars): Fix handling of explicitly specified font.
616 2005-11-25 Kenichi Handa <handa@m17n.org>
618 * font-flt.c (run_command): Print debug info for
621 * draw.c (layout_glyphs): Fix handling of left/right_padding.
623 * face.c (mface__for_chars): Check rfont before accessing the
626 2005-11-21 Kenichi Handa <handa@m17n.org>
628 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
631 * fontset.c (fontset_table): New variable.
632 (free_fontset): Call M17N_OBJECT_UNREGISTER.
633 (mfont__fontset_init): Add fontset_table as an object array.
634 (mfont__realize_fontset): Ref FONTSET.
635 (mfont__free_realized_fontset): Unref REALIZED->fontset.
636 (mfontset): Call M17N_OBJECT_REGISTER.
637 (mfontset_copy): Likewise.
639 * input.c (handle_key): For debugging, print information about
641 (filter): Add an alias for Meta and Alt modifiers.
642 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
644 (minput__init): Initialize them.
645 (parse_expression): New function.
646 (resolve_expression): New function.
647 (parse_action_list): Handle expressions by parse_expression.
648 (take_action_list): Handle expressions by resolve_expression.
649 (parse_nested_list_value): Fix previous change.
650 (resolve_command): Fix handling of the return value of
653 2005-11-18 Kenichi Handa <handa@m17n.org>
655 * font-ft.c (ft_check_otf, otf_script_list): Define only when
657 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
659 (ft_select): Likewise.
661 * font.c (mfont_list): Fix for the case that FONT is NULL.
662 (OTF_tag): Delete it.
663 (load_otf_script_list): Define only when HAVE_OTF is defined.
664 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
667 * draw.c (truncate_gstring): Be sure to truncate at
668 glapheme-cluster boundary.
670 2005-11-11 Kenichi Handa <handa@m17n.org>
672 * input.c (delete_surrounding_text): Clear cache if necessary.
674 2005-11-09 Kenichi Handa <handa@m17n.org>
676 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
677 glyph prev is also supported by the current flt.
679 2005-11-08 Kenichi Handa <handa@m17n.org>
681 * m17n-X.c (xft_render): Cancel previous change.
683 2005-11-07 Kenichi Handa <handa@m17n.org>
685 * input.c: Include <stdlib.h>.
686 (get_surrounding_text, delete_surrounding_text)
687 (get_preceding_char, get_following_char): New functions.
688 (integer_value): New arg surrounding. If it is nonzero, try to
689 get a surrounding character. Callers changed.
690 (take_action_list): Check `value' before setting an element.
691 (destroy_ic): Unref ic_info->preceding_text and
692 ic_info->following_text.
693 (minput__init): Initialize Minput_get_surrounding_text and
694 Minput_delete_surrounding_text.
695 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
697 (filter): Unref ic_info->preceding_text and
698 ic_info->following_text.
700 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
703 * input.h (MInputContextInfo): New members preceding_text and
706 2005-11-04 Kenichi Handa <handa@m17n.org>
708 * input.c (parse_nested_list_value): Fix handling of the global
710 (get_nested_list): Get global definitions by load_partial_im_info.
711 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
712 MInputCandidatesChanged.
713 (take_action_list): Likewise.
714 (reset_ic): Likewise.
715 (create_ic): Don't pay special attention to
716 Mcandidates_group_size.
717 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
718 (minput_set_variable): Get a definition of varible by
719 mplist_find_by_value, not mplist_get.
721 * m17n.h (enum MInputCandidatesChanged): New enum.
723 2005-11-01 Kenichi Handa <handa@m17n.org>
725 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
727 (mwin__destroy_window): If xft_draw's drawable is win, change it
728 to device->drawable before destroying win.
730 2005-10-31 Kenichi Handa <handa@m17n.org>
732 * input.c (load_im_info): Fix adding of state.
734 * m17n-core.c (m17n_fini_core): Fix reporting of module
737 * m17n.c (m17n_fini): Fix reporting of module finalization.
739 * m17n-gui.c (m17n_init_win): Fix reporting of module
742 2005-10-29 Kenichi Handa <handa@m17n.org>
744 * input.c (get_candidate_list): Fix the timing of referring plist.
746 2005-10-28 Kenichi Handa <handa@m17n.org>
748 * input.c (load_branch): Ignore an undefined map name.
749 (load_im_info): Set im_info->title from `name' only if it's not
751 (shift_state): Always update ic->status.
752 (adjust_candidates): Renamed from adjust_candidate_command.
753 Argument changed. Caller changed.
754 (get_candidate_list, regularize_action): New functions.
755 (take_action_list): Use them. On handling Munhandle, don't set
757 (handle_key): If KEY is not handled by MAP, and MAP has
758 branch_actions, perform them.
760 * database.c (mdatabase__fini): Free dir_info->filename;
762 2005-10-20 Kenichi Handa <handa@m17n.org>
764 * input.c (marker_code): Accept '@@'.
765 (integer_value): Handle '@@'.
766 (parse_action_list): Accept a symbol argument.
767 (take_action_list): Resolve the symbol argument. Handle the
770 2005-10-18 Kenichi Handa <handa@m17n.org>
772 * input.c: Include "charset.h".
773 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
775 (MIMState): New member (M17NObject control).
776 (lookup_nested_list, set_nested_list, parse_nested_list_value)
777 (get_nested_list, resolve_variable): New functions.
778 (integer_value): New arg (MPlist **value). Set it to the plist
779 element containing the value.
780 (resolve_command): New function.
781 (load_translation): New arg (MPlist *map_actions).
782 (load_branch): New args language and name. If `keylist' is a
783 symbol, resolved that as a command name.
784 (free_map): New arg top. Free map->map_actions only if top is
786 (free_state): New function.
787 (load_state): New arg name.
788 (im_info_list): New variable.
789 (free_im_info, get_im_info_by_tags): New functions.
790 (load_im_info): Arg key changed to plist. Handle `include'.
791 Return (MInputMethodInfo *).
792 (preedit_commit): Ref ic->candidate_list.
793 (get_select_charset, adjust_candidate_command): New functions.
794 (take_action_list): Handle `include'. Adjust candidate action
795 properly. Handle control variables `candidates-charset' and
796 `candidates-group-size'.
797 (open_im): Use get_im_info.
798 (create_ic): Get global variables.
799 (load_partial_im_info): New function.
800 (get_im_info): New function.
801 (check_command_keyseq, check_command_list, check_variable_list):
803 (minput__init): Don't handle M_database_hook and Mdetail_text.
804 Initialize M_candidates, Mcandidates_group_size,
806 (parse_variable_list, get_variable_list, parse_command_list)
807 (get_command_list): Delete them.
808 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
809 (minput__fini): Simply unref command_list and variable_list.
810 (minput_get_description): Adjusted for the new form of description.
811 (minput_get_commands): Use get_nested_list.
812 (minput_assign_command_keys): Likewise.
813 (minput_get_variables, minput_set_variable): Likewise.
815 * input.h (MInputMethodInfo): New members im and maps.
817 * database.h (M_database_hook): Delete extern.
818 (MDatabaseHookFunc): Delete extern.
819 (mdatabase__check): Extern it.
821 * database.c: Include <glob.h>.
822 (MAX_TIME): New macro.
823 (Masterisk): New variable.
824 (get_database_stream): Argument changed to (MDatabaseInfo *).
826 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
827 (find_database): New function.
828 (update_database_list): New function.
829 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
830 calling update_database_list.
831 (mdatabase__check): New function.
832 (mdatabase_find): Use update_database and find_database. Don't
833 handle MDatabaseHookFunc.
834 (mdatabase_list): Call update_database at first.
835 (mdatabase_define): Adjusted for the change of mdb->extra_info.
836 (MDatabaseList): New type.
838 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
840 * m17n.h (Mdetail_text): Delete extern.
842 * m17n-core.h (mplist_conc): Delete extern.
844 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
846 (mplist_conc): Renamed to mplist__conc.
847 (mplist__pop_unref): New function.
849 2005-10-14 Kenichi Handa <handa@m17n.org>
851 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
853 (read_element): If keys is an empty plist, return any element
855 (dump_plist_element): Check if plist is nested.
856 (mplist_conc): Always ref tail.
857 (mplist_set): If key is a managing key, ref val in advance.
859 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
860 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
861 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
864 * fontset.c (free_fontset): Unref fontset_list if necessary.
865 (mfont__fontset_fini): Don't free fontset_list. Unref
867 (mfont__realize_fontset): Initialize request.
868 (mfontset): Ref default_fontset or fontset only if necessary.
869 (mfontset_copy): Don't ref copy.
871 * draw.c (render_glyphs): Check gend->type before checking
874 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
875 unrefed plists to NULL.
877 2005-10-04 Kenichi Handa <handa@m17n.org>
879 * textprop.c (mtext_serialize): Be sure to make mt
880 MTEXT_FORMAT_UTF_8 and NULL terminated.
882 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
884 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
886 2005-10-03 Kenichi Handa <handa@m17n.org>
888 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
889 is not at the beginning of line.
891 2005-09-22 Kenichi Handa <handa@m17n.org>
893 * input.c: Include <sys/stat.h> and <unistd.h>.
894 (Minclude, Mcommit, Munhandle): New variables.
895 (minput__init): Initialize them. Push only Mstate to
896 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
897 (parse_action_list): Allow integer arg for undo. Handle Mcommit
899 (load_input_method): Handle "include" directive. If no states are
901 (shift_state): If state_name is Mt, shift back to the previous
902 state. Call preedit_commit to commit preedit text.
903 (preedit_commit): New function.
904 (take_action_list): Improve debug printing. Handle commit and
906 (handle_key): Check the return value of take_action_list. Don't
907 take branch_actions just after changing to the root map.
908 (reset_ic): Reset all ic_info members.
909 (filter): When a key is not handled, just move ic_info->keys
910 instead fo calling reset_ic.
911 (load_im_info): If key is not Mstate, push Mmap to
913 (MDatabaseStatList): New type.
914 (imdir_stat_list): New variable.
915 (input_method_hook): Don't cancel the hook. Check the
916 modification time of directories.
917 (minput__fini): Free imdir_stat_list;
919 * input.h (MInputContextInfo): New member prev_state.
921 * m17n-core.h (mplist_conc): Extern it.
923 * plist.c (mplist_conc): New function.
925 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
927 * font.h (MRealizedFont): New member average_width.
929 * font-ft.c (ft_open): Set rface->average_width.
931 * font.c (xlfd_unparse_name): Print '*' before registry name.
933 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
934 (xfont_open): Set rfont->average_width.
935 (xft_open): Likewise.
936 (device_open): Initialize disp_info->AVERAGE_WIDTH.
938 * internal-gui.h (struct MFrame): New member average_width.
940 * m17n-gui.c (mframe): Fix setting of frame->rfont.
941 (mframe_get_prop): Return the average_width of a font.
943 * face.c (mface__realize): Set rface->average_width.
944 (mface__update_frame_face): Set frame->average_width.
946 * face.h (MRealizedFace): New member average_width.
948 2005-09-19 Kenichi Handa <handa@m17n.org>
950 * font.c (xlfd_unparse_name): New arg full_xlfd.
951 (mfont__encode_char): Use shortcut only for X core fonts.
952 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
953 (mfont_put_prop): Handle `language' property.
954 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
955 Print file can capability info too.
957 * m17n-core.c (mdebug__output): New variable.
958 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
959 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
960 (m17n_fini_core): Close mdebug__output if it's not stderr.
962 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
963 (xfont_open): Handle baseline_offset.
964 (xfont_find_metric): Likewise.
965 (xfont_render): Likewise.
966 (xft_open): Likewise.
967 (xft_render): Likewise.
969 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
970 (mdebug__output): Extern it.
971 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
972 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
973 (MDEBUG_DUMP): New macro.
974 (MDEBUG_PRINT_TIME): Print to medebug__output.
976 * font.h (MRealizedFont): New member baseline_offset.
978 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
980 (fc_weight_table): Add FC_WEIGHT_REGULAR.
981 (ft_list_family): Check alias.
982 (ft_list_language): If language is "en", don't try to the second
984 (ft_default_list): New variable.
985 (ft_list_default): New function.
986 (ft_select): If family is not specified, try only the default
987 fonts. Treat the weights normal and medium same.
988 (ft_open): Fix debug message. If registry is not specified, try
989 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
990 (ft_find_metric): Likewise.
991 (ft_render): Likewise.
992 (ft_list): Fix debug message. Accept the registring iso8859-1.
993 If family is not specified, try only the default fonts.
995 * face.c (mface__realize): Fix logic of opening a font.
997 2005-09-16 Kenichi Handa <handa@m17n.org>
999 * face.c (mface__realize):
1001 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1004 * input.c (shift_state): Fix the condition of taking init actions.
1005 (take_action_list): Fix handling of pushback action.
1006 (handle_key): Don't change key while checking its alias.
1007 (minput__init): Initialize new variables.
1008 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1011 2005-09-12 Kenichi Handa <handa@m17n.org>
1013 * mtext.c (mtext__uppercase): Add proper open/close parens.
1014 (mtext_titlecase): Add proper casting.
1016 * input.c (parse_action_list): Handle the case that the arg is a
1017 key sequence (MText or MPlist).
1018 (take_action_list): Likewise.
1019 (shift_state): Shorter debug message.
1020 (handle_key): Terminate a debug message by "\n".
1021 (reset_ic): Don't take initial actions here.
1022 (minput_open_im): Print a debug message.
1023 (minput_close_im): Likewise.
1024 (minput_create_ic): Likewise.
1025 (minput_destroy_ic): Likewise.
1027 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1029 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1032 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1033 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1036 * character.c: Add Japanese documentation for
1037 mchar_get_prop_table ().
1039 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1041 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1042 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1043 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1045 (init_case_conversion): New function.
1046 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1047 (uppercase_precheck, lowercase_precheck, final_sigma)
1048 (after_soft_dotted, more_above, before_dot, after_i)
1049 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1051 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1053 * plist.c (read_mtext_element): Fix previous change.
1055 2005-09-05 Kenichi Handa <handa@m17n.org>
1057 * plist.c (read_mtext_element): Handle \uXXXX notation.
1059 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1060 (MTABLE_ALLOCA): Change the name of local variable.
1062 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1063 HAVE_FREETYPE are defined.
1065 * m17n-X.c: Check HAVE_X11.
1067 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1068 directory listing libraries.
1069 (noinst_PROGRAMS): Define it only in maintainer mode.
1071 2005-09-02 Kenichi Handa <handa@m17n.org>
1073 * m17n-gui.h (mdraw_line_break_option): Extern it.
1075 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1076 end of the first glyph.
1077 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1079 (mdraw_line_break_option): New variable.
1080 (mdraw_default_line_break): Use mtext_line_break.
1082 * mtext.h (wordseg_func_table): Don't extern it.
1083 (mtext__wseg_fini): Extern it.
1085 * mtext.c: Don't include word-thai.h.
1086 (wordseg_func_table): Delete this variable.
1087 (mtext__init): Don't initialize above. Don't call
1088 mtext__word_thai_init.
1089 (mtext__fini): Don't free wordseg_func_table. Call
1090 mtext__wseg_fini instead fo mtext__word_thai_fini.
1091 (MTextWordsegFunc): Don't typedef it.
1092 (mtext__word_segment): Moved to mtext-wseg.c.
1094 * m17n-core.h (enum MTextLineBreakOption): New enum.
1095 (mtext_line_break): Extern it.
1097 * mtext-wseg.c: New file.
1099 * mtext-lbrk.c: New file.
1101 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1102 add mtext-lbrk.c and mtext-wseg.c.
1104 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1105 the case that head is NULL.
1107 2005-09-01 Kenichi Handa <handa@m17n.org>
1109 * word-thai.c (wordseg_propertize): If the property value is nil,
1110 don't make the property no-merge.
1111 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1112 attention to the case that they are NULL.
1113 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1116 * character.c (mchar_get_prop_table): New function.
1118 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1120 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1121 (mchar_get_prop_table): Extern it.
1123 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1124 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1126 * internal.h (enum MTextCoverage): New enum.
1127 (MText): New member coverage.
1129 * mtext.c (FORMAT_COVERAGE): New macro.
1130 (insert): Copy mt2->coverage.
1131 (mtext__from_data): Initialize mt->coverage.
1132 (mtext__adjust_format): Update mt->coverage.
1133 (mtext): Initialize mt->coverage.
1134 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1135 Update mt->coverage if necessary.
1136 (mtext_duplicate): Copy mt->coverage.
1137 (mtext_insert, mtext_replace): New functions.
1138 (mtext_dup): Use mtext_duplicate.
1139 (mtext__word_segment): Don't set *from and *to if a word
1140 segmentation funcion is not found.
1141 (mtext_ins_char): Fix typo.
1143 2005-08-25 Kenichi Handa <handa@m17n.org>
1145 * font.h (MFont): New member for_full_width.
1147 * font.c (compare_font_score): Prefer a font of not
1150 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1151 registry charset of a font is one of CJK charsets.
1153 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1154 supports some of CJK.
1156 2005-08-24 Kenichi Handa <handa@m17n.org>
1158 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1160 * m17n-gui.c (null_device_open): Check Mresolution param and set
1163 * m17n-gd.c (device_open): Check Mresolution param and set
1166 * m17n-X.c (MWDevice): New member resy.
1167 (xfont_open): Set ascent, descent, and max_advance members of
1169 (xft_open): Likewise.
1170 (device_open): Compare also screen_num to find a device. Set
1171 device->resy and frame->dpi.
1173 * internal-gui.h (MFrame): New member dpi.
1175 * font.h (MRealizedFont): New member max_advance.
1177 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1178 (mfont__init): Don't initialize Mascent, Mdescent.
1179 (Mascent, Mdescent): Delete these variables.
1180 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1181 Mfont_descent instead of Mascent and Mdescent.
1182 (mfont_put_prop): Allow negative size.
1183 (mfont_find): Handle the case of spec->size < 0. Fix previous
1185 (mfont_list): Handle the case of spec->size < 0.
1186 (mfont_check): Likewise.
1188 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1189 (fc_get_pattern): Handle the case of font->size < 0.
1190 (ft_open): Set ascent, descent, and max_advance members of rfont.
1191 (ft_find_metric): Improve rounding.
1192 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1195 * face.c (mface__realize): Handle the case of font->size < 0.
1197 2005-08-22 Kenichi Handa <handa@m17n.org>
1199 * coding.c (MConverterStatus): Change the member buf to union.
1200 (mconv_buffer_converter): Add const to the arg buf.
1201 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1202 (mconv_decode): Adjusted for the change of MConverterStatus.
1203 (mconv_encode_range): Likewise.
1205 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1206 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1208 2005-08-20 Kenichi Handa <handa@m17n.org>
1210 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1211 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1213 * m17n-X.c (xfont_open): Set members ascent, descent, and
1214 max_advance of rfont.
1215 (xft_open): Likewise.
1217 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1219 (mfont__ft_parse_name): Add const to the arg name.
1221 * font.c (xlfd_parse_name): Add const to the arg name. Call
1222 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1223 (xlfd_unparse_name): Handle spacing.
1224 (mfont__init): Initialize new variables.
1225 (mfont__id): Handle spacing.
1226 (mfont__merge): Likewise.
1227 (mfont__set_spec): This function deleted.
1228 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1229 condition of calling mfont__ft_parse_name.
1230 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1231 (mfont_get_prop): Handle properties spacing, ascent, descent,
1233 (mfont_find): Return a realized font.
1234 (mfont_from_name): Add const to the arg name.
1236 * font.h (enum MFontProperty): New member MFONT_SPACING.
1237 (enum MFontSpacing): New enum.
1238 (MFont): New members spacing and max_advance.
1239 (mfont__ft_parse_name): Prototype adjusted.
1240 (mfont__set_spec): Extern deleted.
1241 (mfont__parse_name_into_font): Prototype adjusted.
1243 2005-08-19 Kenichi Handa <handa@m17n.org>
1245 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1247 * font.c (mfont_list): If FONT is null, use a temporary font.
1248 (mfont_parse_name): Add const to the arg name.
1250 2005-08-18 Kenichi Handa <handa@m17n.org>
1252 * word-thai.c: Surround code by #ifdef and #endif to escape from
1255 * font-ft.c: Mostly re-written.
1257 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1258 (FontLayoutCmd): Type of the member otf changed..
1259 (load_otf_command): Adjusted for the format change of otf command.
1260 (load_command): Likewise.
1261 (free_flt_command): Unref cmd->body.otf.
1262 (run_otf): Ajusted for the type change of otf_cmd.
1263 (run_command): Ajusted for the type change of otf_cmd. On
1264 debugging, print ctx->combining_code.
1265 (mfont__flt_run): Initialize ctx's members code_offset,
1266 combining_code, and left_padding to 0.
1268 * face.h (struct MRealizedFace): New member font.
1269 (mface__realize): Prototype adjusted.
1271 * face.c (find_realized_face): New arg font.
1272 (find_realized_face): Adjusted for the change of MFont.
1273 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1274 (mface__fini): Don't call mdebug__report_object.
1275 (mface__realize): New arg font.
1276 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1277 Optimize the latin case.
1278 (mface__free_realized): Free rface->font.
1279 (mface__update_frame_face): Adjusted for the change of mface__realize.
1280 (mface_equal): New function.
1282 * draw.c (Mcommon): New variable.
1283 (visual_order): Args to mfont__encode_char changed.
1284 (compose_glyph_string): Handle Mfont text property.
1285 (layout_glyphs): Adjusted for the change of MFont.
1286 (mdraw__init): Initialize Mcommon.
1287 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1289 * font.h (enum MFontType): Members completely changed.
1290 (enum MFontProperty): Move MFONT_SIZE to the tail.
1291 (enum MFontSource): New enum.
1292 (struct MFont): New members type, source, sizes, file, capability,
1294 (struct MRealizedFont): Type of member font changed. Members
1295 score, status, and encoding deleted.
1296 (MFontScore): New type.
1297 (MFontList): Member changed.
1298 (struct MFontDriver): New member has_char. Types of members
1300 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1301 (Mapple_roman): Extern them.
1302 (OTF_Tag): Typedefed if not HAVE_OTF.
1303 (enum MFontOpenTypeTable): New enum.
1304 (MFontCapability): New type.
1305 (mfont__ft_drive_otf): Prototype adjusted.
1306 (mfont__score): Extern deleted.
1307 (mfont__merge): Extern it.
1308 (mfont__has_char): Extern it.
1309 (mfont__encode_char): Prototype adjusted.
1310 (mfont__open): Extern it.
1311 (mfont__set_spec): Prototype adjusted.
1312 (mfont__get_capability): Extern it.
1314 * font.c: Include "fontset.h".
1315 (M_font_capability, M_font_list, M_font_list_len): New variables.
1316 (font_score_priority): Change order of initial elements.
1317 (font_score_shift_bits): Fix array size.
1318 (common_weight): Add "thin", "semibold", and "heavy".
1319 (common_stretch): Add "ultracondensed", "extracondensed",
1320 "extraexpanded", and "utltraexpand".
1321 (font_weight_regular, font_weight_normal, font_weight_medium): New
1323 (gen_font_name): This function deleted.
1324 (find_encoding): Set font->encoding.
1325 (OTF_tag): New function.
1326 (otf_script_list): New variable.
1327 (load_otf_script_list): New function.
1328 (find_script_from_otf_tag): New function.
1329 (xlfd_parse_name): Set font->type and font->source.
1330 (mfont__free_realized): Free chains rfonts.
1331 (font_score): Renamed from mfont__score.
1332 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1333 (Mapple_roman): New variables.
1334 (mfont__init): Initilize new variables. Initalize
1335 default_encoding.encoding_name and
1336 default_encoding.encoding_charset to Municode_full and
1337 mcharset__unicode. Use SAFE* macros for allocating filepath
1339 (mfont__fini): Free otf_script_list.
1340 (mfont__id): New function.
1341 (mfont__match_p): Check also capability member of MFont.
1342 (mfont__merge): New funciton.
1343 (mfont__set_spec_from_face): Set type and source members.
1344 (mfont__set_spec_from_plist): Set capability and type members.
1345 (mfont__select): Argument changed.
1346 (mfont__available): New function.
1347 (compare_font_score): New function.
1348 (mfont__list): New function.
1349 (mfont__open): Return a realized font.
1350 (mfont__resize): Adjusted for the change of MFont.
1351 (mfont__has_char): New function.
1352 (mfont__encode_char): Argument changed.
1353 (mfont__set_spec): Argument changed.
1354 (free_font_capability): New function.
1355 (mfont__get_capability): New function.
1356 (MFontfile): New variable.
1357 (mfont_get_prop): Adjusted for the change of MFont.
1358 (mfont_put_prop): Likewise.
1359 (mfont_set_selection_priority): Fix the way of setting
1360 font_score_priority[].
1361 (mfont_find): Use mfont__list instead of mfont__select.
1362 (mfont_resize_ratio): Adjusted for the change of MFont.
1363 (mfont_list): Use mfont__list.
1364 (mfont_check): New function.
1365 (font_score): Make it static.
1367 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1368 (mfont__lookup_fontset): Likewise.
1370 * fontset.c (struct MFontset): Delete member font_spec_list.
1371 (struct MRealizedFontset): Type of member spec changed. New
1373 (load_font_group): Arg spec_list deleted.
1374 (load_fontset_contents): Adjusted for the change of fontset_def.
1375 (free_fontset): Fix the way of freeing fontset elements.
1376 (realize_fontset_elements): Argument changed.
1377 (get_per_script): New function.
1378 (free_realized_fontset_elements): Fix the way of feeing rfontset
1380 (update_fontset_elements): Fix args to realize_fontset_elements.
1381 (mfont__realize_fontset): New arg spec.
1382 (try_font_list): New function.
1383 (try_font_group): New arg request. Use try_font_list.
1384 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1386 (mfontset): Adjusted for the change of MFontset.
1387 (mfontset_copy): Likewise. Don't share plists.
1388 (mfontset_modify_entry): Adjusted for the change of MFontset.
1389 (mfontset_lookup): Call get_per_script.
1390 (mdebug_dump_fontset): Print also the address of fonts.
1392 * input.c (shift_state): Don't reset ic_info->vars.
1393 (take_action_list): Call MDEBUG_PRINT fore calling
1396 * internal-gui.h (MFontDriver): Don't typedef it here.
1398 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1399 (MXFont): This type deleted.
1401 (struct _MFontX): New struct.
1402 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1403 (MDisplayInfo): Member base_font_list deleted.
1404 (DEFAULT_FONT): Definition changed.
1405 (FALLBACK_FONT): This maclr deleted.
1406 (free_display_info): Adjusted for the change of MDisplayInfo.
1407 (free_device): Argument to mfont__free_realized changed.
1408 (xfont_driver): Adjusted for the change of MFontDriver.
1409 (xfont_registry_list): Use MFontX instead of MXFont.
1410 (MRealizedFontX): Renamed from MXFontInfo.
1411 (xfont_select): Return the font found first.
1412 (close_xfont): Change MXFontInfo to MRealizedFontX.
1413 (xfont_open): Return the realized font.
1414 (xfont_find_metric): Get xfont from rfont->fontp.
1415 (xfont_has_char): New function.
1416 (xfont_encode_char): Adjusted for the argument change.
1417 (xfont_render): Get xfont from rfont->fontp.
1418 (xfont_list): Adjusted for the argument change.
1419 (MRealizedFontXft): Renamed from MXftFontInfo.
1420 (xft_driver): Ajusted for the change of MFontDriver.
1421 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1422 (xft_open_font): Argument changed.
1423 (xft_open): Argument changed. Return the realized font.
1424 (xft_find_metric): Get xft_font from rfont->fontp.
1425 (xft_has_char, xft_encode_char): New functions.
1426 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1427 font if not yet opened.
1428 (device_open): Don't set frame->font.
1430 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1432 (gd_font_open): New function.
1433 (gd_render): Don't use the local variable ft_info.
1434 (device_init): Adjusted for the change of gd_font_driver.
1436 * textprop.c (mtext__prop_init): Initialize text_property_table.
1437 Call M17N_OBJECT_ADD_ARRAY.
1438 (mtext__prop_fini): Don't call mdebug__report_object.
1440 * plist.c (mplist__init): Initialize plist_table.
1441 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1442 (mplist__fini): Don't call mdebug__report_object.
1444 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1445 (mtext__fini): Don't call mdebug__report_object.
1446 (MTEXT_FORMAT_UTF_16): Correct type.
1447 (mtext_data): New function.
1448 (mtext_text): Fix calculation of limit and args to
1451 * language.c: Include "plist.h".
1452 (M_script_lang_list): New variable.
1453 (mlang__init): Read languages and their information from m17n
1455 (mlanguage__list): New function.
1456 (Miso639_1, Miso639_2): New variables.
1458 * language.h (mlanguage__list): Extern it.
1460 * database.c (get_database_stream): Use SAFE_* macros for
1461 allocating and freeing path.
1462 (mdatabase__init): Likewise.
1464 * symbol.c (msymbol__fini): Don't free symbols here.
1465 (msymbol__free_table): New function.
1466 (msymbol_is_managing_key): New function.
1468 * symbol.h (msymbol__free_table): Extern it.
1469 (msymbol__list): Extern it.
1471 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1473 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1474 (struct _M17NObjectArray): New member name and next.
1475 (mdebug__add_object_array): Extern it.
1476 (M17N_OBJECT_ADD_ARRAY): New macro.
1477 (mdebug__report_object): Don't extern it.
1479 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1481 * m17n-gui.c (free_frame): Don't free frame->font.
1482 (null_device_fini): Fix code for freeing
1483 null_device.realized_font_list.
1484 (m17n_fini_win): Free interface.
1485 (mframe): Cast the return value of dlsym. Set frame->font here.
1486 (mframe_get_prop): Check frame->rface->rfont before accessing the
1489 * m17n-gui.h (Mfontfile): Extern it.
1490 (mfont_check): Extern it.
1491 (mface_equal): Extern it.
1493 * m17n-core.c: Include "symbol.h".
1494 (report_header_printed): This variable deleted.
1495 (object_array_root): New variable.
1496 (report_object_array): New function.
1497 (mdebug__report_object): This function deleted.
1498 (mdebug__add_object_array): New function.
1499 (m17n_init_core): Call mchartable_init () before mtext_init ().
1500 (m17n_fini_core): Call report_object_array (if necessary) and
1501 msymbol__free_atable at the end.
1503 * m17n-core.h (msymbol_is_managing_key): Extern it.
1504 (mtext_data): Extern it.
1505 (MTEXT_FORMAT_UTF_16): Correct type.
1506 (M17NLIB_MINOR_VERSION): Changed to 3.
1507 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1509 * chartab.c (mchartable__init): Initalize chartable_table.count.
1510 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1511 mdebug__report_object.
1513 2005-05-26 Kenichi Handa <handa@m17n.org>
1515 * m17n.h (Miso639_1, Miso639_2): Extern them.
1517 * symbol.h (msymbol__list): Extern it.
1519 * symbol.c (msymbol__list): New function.
1521 2005-05-19 Kenichi Handa <handa@m17n.org>
1523 * input-gui.c (minput__win_init): Don't change the value of
1526 2005-05-16 Kenichi Handa <handa@m17n.org>
1528 * m17n-core.c (m17n_object): Be sure to initialize all members.
1530 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1532 2005-05-09 Kenichi Handa <handa@m17n.org>
1534 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1536 2005-04-27 Kenichi Handa <handa@m17n.org>
1538 * language.c (mlang__init): Add "an" (Aragonese).
1540 * word-thai.c: Add support for libthai.
1541 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1542 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1544 * mtext.c: Include "word-thai.h" conditionaly.
1545 (mtext__init): Call mtext__word_thai_init conditionaly.
1546 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1548 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1549 not WORDCUT_LD_FLAGS.
1551 2005-04-19 Kenichi Handa <handa@m17n.org>
1553 * word-thai.c (wordseg_propertize): Always unref the attached
1555 (thai_wordseg): Don't unref the property.
1557 2005-04-18 Kenichi Handa <handa@m17n.org>
1559 * word-thai.c: Include stdlib.h.
1560 (wordseg_propertize): Add dummy function for the case that wordcut
1561 library doesn't exist.
1562 (wordseg_propertize): Fix for old wordcut library.
1564 2005-04-16 Kenichi Handa <handa@m17n.org>
1566 * word-thai.c: Include <stdio.h>.
1568 2005-04-15 Kenichi Handa <handa@m17n.org>
1570 * draw.c: Include mtext.h.
1571 (linebreak_table, M_break_at_space, M_break_at_word)
1572 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1573 (compose_glyph_string): Check POS before getting Mface text
1575 (truncate_gstring): Give correct TO arg to line_break function.
1576 (GET_LB_TYPE): New macro.
1577 (find_break_backward, find_break_forward): New functions.
1578 (mdraw__init): Initialize the above new variables.
1579 (mdraw__fini): Free linebreak_table.
1580 (mdraw_default_line_break): Use find_break_backward and
1583 * word-thai.c: New file.
1585 * word-thai.h: New file.
1587 * mtext.c: Include word-thai.h.
1588 (wordseg_func_table): New variable.
1589 (mtext__init): Initialize wordseg_func_table and call
1590 mtext__word_thai_init.
1591 (mtext__fini): Call mtext__word_thai_fini, free
1593 (MTextWordsegFunc): New type.
1594 (mtext__word_segment): New function.
1596 * mtext.h (wordseg_func_table): Extern it.
1597 (mtext__word_segment): Extern it.
1599 * m17n.c (m17n_init): Fix typo (== -> =).
1601 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1602 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1604 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1605 (MTEXTPROP_VAL): New macros.
1607 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1609 2005-04-07 Kenichi Handa <handa@m17n.org>
1611 * database.c (load_chartable): Fix pursing of symbol name.
1613 2005-03-24 Kenichi Handa <handa@m17n.org>
1615 * m17n.c (m17n_init): Fix typo (== -> =).
1617 2005-03-11 Kenichi Handa <handa@m17n.org>
1619 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1621 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1623 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1626 2005-03-09 handa <handa@m17n.org>
1628 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1629 calling m17n_init ().
1631 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1632 calling m17n_init_core ().
1634 2005-02-28 Kenichi Handa <handa@m17n.org>
1636 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1639 2005-02-17 Kenichi Handa <handa@m17n.org>
1641 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1642 (M_description, M_command, M_variable): New variables.
1643 (load_im_info_keys): New variables.
1644 (load_im_info, check_command_keyseq, get_description_advance)
1645 (parse_command_list, get_command_list, parse_variable_list)
1646 (get_variable_list, input_method_hook): New functions.
1647 (command_list, variable_list): New variables.
1648 (minput__init): Put input_method_hook to Minput_method.
1649 Initialize M_description, M_command, M_variable, Mdetail_text,
1650 load_im_info_keys, command_list, variable_list.
1651 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1652 (Mdetail_text): New variable.
1653 (minput_get_description, minput_get_commands)
1654 (minput_assign_command_keys, minput_get_variables)
1655 (minput_set_variable): New functions.
1657 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1658 (minput_assign_command_keys, minput_get_variables)
1659 (minput_set_variable): Extern them.
1661 * plist.c (UNGETC): Just decrement st->p.
1662 (read_mtext_element): New arg skip.
1663 (read_integer_element): Likewise.
1664 (read_symbol_element): Likewise.
1665 (read_element): New arg KEYS.
1666 (mplist__from_plist): Don't increment ref-count of NULL object.
1667 (mplist__from_file): New arg KEYS.
1668 (mplist_put): Don't increment ref-count of NULL object.
1669 (mplist_add): Likewise.
1670 (mplist_push): Likewise.
1671 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1673 * plist.h (mplist__from_file): Prototype adjusted.
1675 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1676 (get_database_stream): New function.
1677 (load_database): Use get_database_stream.
1678 (M_database_hook): New variable
1679 (mdatabase__init): Initialize M_database_hook.
1680 (mdatabase__load_for_keys): New function.
1681 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1683 (mdatabase_define): Free mdb->extra_info if necessary.
1685 * database.h (mdatabase__dir_list, M_database_hook)
1686 (mdatabase__load_for_keys): Extern them.
1687 (MDatabaseHookFunc): New type.
1689 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1691 2004-12-27 Kenichi Handa <handa@m17n.org>
1693 * Version 1.2.0 released.
1695 2004-12-27 Kenichi Handa <handa@m17n.org>
1697 * input.c (minput_filter): Don't reset ic->xxx_changed.
1699 * mtext.c (mtext_from_data): Fix documentation.
1701 2004-12-25 Kenichi Handa <handa@m17n.org>
1703 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1704 (M17NLIB_VERSION_NAME): Update to "1.2.".
1706 2004-12-24 Kenichi Handa <handa@m17n.org>
1708 * input.c (reset_ic): Set key_unhandled to 0.
1710 2004-12-21 Kenichi Handa <handa@m17n.org>
1712 * m17n-gui.h (mfont_from_spec): Delete extern.
1714 * input-gui.c (win_callback): Handle Minput_reset.
1715 (minput__win_init): Register reset_ic as a callback for
1718 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1719 changed. At first, shift to the initial state.
1720 (minput__init): Initialize Minput_reset. Register reset_ic as a
1721 callback for Minput_reset.
1722 (Minput_reset): New variable.
1723 (minput_filter): Always set ic->xxx_changed to 0.
1724 (minput_reset_ic): New function.
1725 (integer_value): Fix typo ('>' -> '<') and calculation of length
1728 * m17n-core.c (merror_code): Change type to `int'.
1730 * m17n-misc.h (merror_code): Adjust type.
1732 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1734 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1735 (mtext_change_prop): Delete extern.
1737 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1738 to `int'. Move the documents to m17n-core.h.
1740 2004-12-13 Kenichi Handa <handa@m17n.org>
1742 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1743 (MTextProperty): Document it.
1745 2004-12-09 Kenichi Handa <handa@m17n.org>
1747 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1749 2004-12-03 Kenichi Handa <handa@m17n.org>
1751 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1752 m17n__gui_initialized): New externs.
1754 * m17n-core.h (enum M17NStatus): New enum.
1755 (m17n_status): Extern it.
1757 * m17n-core.c (core_initialized): Delete this variable.
1758 (m17n__core_initialized, m17n__shell_initialized,
1759 m17n__gui_initialized): New variables.
1760 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1761 instead of core_initialized.
1762 (m17n_status): New function.
1764 * m17n.c (shell_initialized): Delete this variable.
1765 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1768 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1770 * m17n-gui.c (win_initialized): Delete this variable.
1771 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1772 instead of gui_initialized.
1774 2004-11-19 Kenichi Handa <handa@m17n.org>
1776 * input.c (reset_ic): Check if ic_info->state is NULL.
1777 (filter): If ic_info->state is NULL, return 0.
1778 (load_input_method): Don't unref `maps' it it's not created.
1780 2004-11-15 Kenichi Handa <handa@m17n.org>
1782 * input.c (find_candidates_group): If INDEX is -1, find the last
1784 (take_action_list): If the previous of the first candidate is
1785 requested, select the last candidate.
1787 2004-11-08 Kenichi Handa <handa@m17n.org>
1789 * m17n-X.c (device_open): Try at most 32 fonts to find a
1790 non-autoscaled font.
1792 * font.c (xlfd_parse_name): Fix previous change.
1794 2004-11-05 Kenichi Handa <handa@m17n.org>
1796 * font.c: (commont_style): Include dummy elements "slanted" and
1797 "rslanted" to prefer "o" to "r" if "i" is requested.
1799 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1801 2004-10-29 Kenichi Handa <handa@m17n.org>
1803 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1805 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1806 New members smallest and larger.
1807 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1808 (xfont_registry_list): Likewise.
1809 (xfont_select): Likewise.
1812 2004-10-28 Kenichi Handa <handa@m17n.org>
1814 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1815 font name comparison.
1816 (xfont_select): Fix logic for selecting a larger size font.
1818 2004-10-25 Kenichi Handa <handa@m17n.org>
1820 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1823 2004-10-22 Kenichi Handa <handa@m17n.org>
1825 * input.c (update_candidate): Renamed from udpate_candidate.
1826 (take_action_list): Show more debugging info on arithmetic commands.
1828 * m17n-X.c (device_open): Fix previous change.
1830 * draw.c (compose_glyph_string): Don't get face property at the
1833 2004-10-21 Kenichi Handa <handa@m17n.org>
1835 * draw.c (compose_glyph_string): Fix for the case of category
1838 2004-10-19 Kenichi Handa <handa@m17n.org>
1840 * input.c (mdebug_mask): New variable.
1841 (shift_state): Print debug information.
1842 (take_action_list): Likewise.
1843 (handle_key): Likewise.
1845 2004-10-14 Kenichi Handa <handa@m17n.org>
1847 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1849 2004-10-13 Kenichi Handa <handa@m17n.org>
1851 * m17n-X.c (device_open): Be sure to register at least one font
1854 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1855 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1857 2004-10-12 Kenichi Handa <handa@m17n.org>
1859 * draw.c (alloc_gstring): Fix previous change.
1861 * font-ft.c (ft_list_generic): Fix for the case of not
1864 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1866 * font.c (mfont_list): If no font is found, return NULL.
1867 (load_font_encoding_table): Put entries of nil registry first.
1868 (find_encoding): Adjust for the above change.
1870 2004-10-11 Kenichi Handa <handa@m17n.org>
1872 * m17n-gui.h (mfont_list): Adjust prototype.
1874 * m17n-X.c (xfont_list): New arg maxnum.
1876 * font.h (struct MFontDriver): Change prototype of <list>.
1878 * font-ft.c (fc_generic_family_list): Delete it.
1879 (Mserif, Msans_serif, Mmonospace): Delete them.
1880 (M_generic_family_info): New variable.
1881 (enum GenericFamilyType): New enum.
1882 (struct GenericFamilyInfo): New struct.
1883 (generic_family_table): New variable.
1884 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1886 (add_font_info): Get style here.
1887 (ft_list_family): Don't initialize fc_config here. Don't list
1889 (ft_list_generic): New function.
1890 (ft_select): Pay attention to generic familes here.
1891 (ft_open): Fix calculation of ascent and descent.
1892 (ft_list): Pay attention to generic families.
1893 (mfont__ft_init): Initialize M_generic_family_info,
1894 generic_family_table, and fc_config..
1895 (mfont__ft_fini): Finalize generic_family_table.
1897 * draw.c (compose_glyph_string): Use more constant font for
1898 glyphs. Adjust for the member change in MGlyph.
1899 (layout_glyph_string): Adjust for the member change in MGlyph.
1900 (alloc_gstring): Intilize scracth_glyph to avoid
1901 compose_glyph_string on it.
1902 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1903 (mdraw_coordinates_position): Fix previous change.
1905 * internal-gui.h (glyph_category): New enum.
1906 (MGlyph): Change type of <category> to enum glyph_category.
1908 * face.c (mface__realize): Delete args langauge and charset.
1909 (mface__for_chars): Fix for the case that glyphs have different
1911 (mface__update_frame_face): Adjust for mface__realize change.
1913 * face.h (mface__realize): Adjust prototype.
1915 2004-10-05 Kenichi Handa <handa@m17n.org>
1917 * language.c (mlang__init): Add Akan.
1919 2004-10-04 Kenichi Handa <handa@m17n.org>
1921 * font-ft.c (add_font_info): Add instead of push the element.
1922 (ft_list_family): For generic fonts, try all
1923 substituted. families.
1925 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1926 (run_rule): Don't update cluster range here.
1927 (run_command): Update cluster range on appending a glyph.
1928 (run_otf): Update cluster range for glyphs generated by OTF.
1930 2004-10-02 Kenichi Handa <handa@m17n.org>
1932 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1934 2004-09-30 Kenichi Handa <handa@m17n.org>
1936 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1938 2004-09-30 Kenichi Handa <handa@m17n.org>
1940 * font.h: Include <fontconfig/fontconfig.h>.
1941 (MFTInfo): New member langset.
1942 (mfont__encoding_list): Extern it.
1944 * font.c (mfont__encoding_list): New function.
1945 (mdebug_dump_font_list): New function.
1947 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1948 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1950 (ft_family_list): New variable.
1951 (set_font_info): New arg basep. Callers changed.
1952 (fc_list): Check the return value of FcPatternGetString.
1953 (add_font_info): New arg plist. Callers changed. Update
1955 (ft_list_family): New function (merged fc_list and ft_list_all).
1956 (ft_select): Use ft_list_family.
1957 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
1959 (mfont__ft_init): Initialize above new variables.
1960 (mfont__ft_fini): Free ft_family_list.
1961 (STRDUP_LOWER): New macro.
1962 (set_font_info): Use STRDUP_LOWER.
1963 (ft_list_family): Avoid duplicate addition of font path. Use
1965 (fc_decode_prop): Fix typo.
1967 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1968 (xfont_registry_list): Change argument disp_info to frame.
1970 (xfont_list_all): New function.
1971 (xfont_list): If FONT is not NULL, check all fonts.
1973 2004-09-28 Kenichi Handa <handa@m17n.org>
1975 * m17n-X.c (MXFont, MXFontList): New types.
1976 (MDisplayInfo): Delete members font_registry_list,
1977 iso8859_1_family_list, iso10646_1_family_list, new members
1978 font_list, base_font_list.
1979 (free_display_info): Adusted for the change of MDisplayInfo.
1980 (xfont_driver): Initialize with xfont_list.
1981 (font_compare): New function.
1982 (build_font_list): Deleted.
1983 (xfont_registry_list): New function.
1984 (xfont_select): Use xfont_registry_list.
1985 (xfont_list): New function.
1986 (device_open): Adusted for the change of MDisplayInfo.
1988 * font-ft.c (add_font_info): New arg languages. Callers changed.
1989 (fc_list): Get languages from fonts..
1990 (ft_list_all): Renamed from ft_list. Callers changed.
1991 (ft_list): New function.
1992 (mfont__ft_driver): Initalize with ft_list.
1994 * font.c (mfont_list): New function.
1996 * font.h (struct MFontDriver): New member `list'.
1997 (MFTInfo): New member languages.
1999 * m17n-gui.h (mfont_list): Extern it.
2001 2004-09-27 Kenichi Handa <handa@m17n.org>
2003 * internal-gui.h (struct MGlyphString): Delete members mt,
2004 sub_width, sub_lbrearing, sub_rbearing, and region.
2006 * draw.c (MSubTextExtents): New type.
2007 (layout_glyphs): New arg extents. Set its members.
2008 (layout_glyph_string): Adjusted for the above change.
2009 (alloc_gstring): Don't set gstring->mt.
2010 (truncate_gstring): Call line_break function with mt instead of
2013 2004-09-22 Kenichi Handa <handa@m17n.org>
2015 * mtext.c (count_utf_16_chars): Count each code of invalid
2018 2004-09-19 Kenichi Handa <handa@m17n.org>
2020 * mtext.c (default_utf_16, default_utf_32): Rename them to
2021 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2024 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2027 2004-09-13 Kenichi Handa <handa@m17n.org>
2029 * draw.c (Mlatin): Don't declare it here.
2030 (visual_order): Fix reordering of combining characters.
2031 (compose_glyph_string): Fix detection of script.
2032 (layout_glyphs): Don't fix reordering of combining characters
2034 (layout_glyph_string): Pay attention to
2035 control->disable_overlapping_adjustment.
2036 (truncate_gstring): Include at least on character in a line.
2037 (get_gstring): Always scan one full line.
2038 (mdraw__init): Don't initialize Mlatin here.
2039 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2040 have a font, use ascent/descent of an ASCII font. Allow
2041 ink_array_return and logical_array_return to be NULL.
2042 (mdraw_coordinates_position): Fix iteration.
2044 * font-ft.c (MFTtoProp): Member completely changed.
2045 (ft_to_prop): Adjusted for the above change.
2046 (ft_to_prop_size): Likewise.
2047 (set_font_info): Adjusted for the change of MFTtoProp.
2048 (fc_generic_family_list): New variable.
2049 (fc_list): Add special handling of generic font names.
2050 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2051 Initialize fc_generic_family_list.
2052 (mfont__ft_fini): Don't free ft_to_prop. Free
2053 fc_generic_family_list.
2054 (FC_vs_M17N_font_prop): New type.
2055 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2056 (fc_decode_prop, fc_encode_prop): New functions.
2057 (mfont__ft_parse_name): Use fc_decode_prop.
2058 (mfont__ft_unparse_name): Use fc_encode_prop.
2060 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2061 (MWDevice): Add member realized_font_list.
2062 (free_display_info): Don't free disp_info->realized_font_list.
2063 (free_device): Free device->realized_fontset_list.
2064 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2065 (device_open): Don't initialize disp_info->realized_font_list.
2066 (device_open): Initialize device->realized_font_list and set it to
2067 frame->realized_font_list.
2069 * fontset.c (try_font_group): New function.
2070 (mfont__lookup_fontset): Use try_font_group.
2072 * font.c (common_weight): Change the order of "regular".
2074 * face.c (Mlatin): Don't make it static.
2075 (mface__realize): Be sure to set work_gstring.frame.
2076 (mface__for_chars): Likewise.
2078 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2081 * internal-gui.h (Mlatin): Extern it.
2083 * m17n-gui.h (MDrawControl): New member
2084 disable_overlapping_adjustment.
2086 2004-09-06 Kenichi Handa <handa@m17n.org>
2088 * font-flt.c (run_otf): Fix typo ('}'->']').
2090 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2091 (COMBINING_PRECOMPUTED_P): New macros.
2093 * draw.c (layout_glyphs): Handle precomputed combining code.
2095 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2096 precomupted combining code.
2098 2004-09-03 Kenichi Handa <handa@m17n.org>
2100 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2103 2004-08-27 Kenichi Handa <handa@m17n.org>
2105 * face.c (mface_put_prop): If the new value is the same as the
2106 current one, don't increment frame->tick.
2108 2004-08-25 Kenichi Handa <handa@m17n.org>
2110 * fontset.c (mfontset): Initialize font_spec_list member.
2111 (mfontset_copy): Load fontset if necessary.
2113 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2114 'metrics' to for C++.
2116 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2119 2004-08-16 Kenichi Handa <handa@m17n.org>
2121 * Version 1.1.0 released.
2123 2004-08-13 Kenichi Handa <handa@m17n.org>
2125 * language.c (mlang__init): Add Dhivehi.
2127 * m17n-gui.c (Mx, Mfreetype): Delete it.
2128 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2130 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2131 (mfont_resize_ratio): Extern it.
2132 (MDrawGlyphInfo): New member logical_width;
2133 (MDrawGlyph): New type.
2134 (mdraw_glyph_list): Prototype adjusted.
2136 * m17n-X.c (xfont_open): Set type and fontp members.
2137 (xft_open): Likewise.
2139 * internal-gui.h (Mx, Mfreetype): Delete extern.
2141 * font.h (struct MRealizedFont): New member type and fontp.
2143 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2144 (Mx, Mfreetype): Declare here.
2145 (Mxft): New variable.
2146 (mfont_resize_ratio): New function.
2148 * font-ft.c (ft_open): Set type and fontp members.
2150 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2153 2004-08-11 Kenichi Handa <handa@m17n.org>
2155 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2158 2004-08-06 Kenichi Handa <handa@m17n.org>
2160 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2163 * font-flt.c (run_otf): Print debugging information if necessary.
2165 2004-08-05 Kenichi Handa <handa@m17n.org>
2167 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2168 positioning_type 5 and 6. Switch simplified.
2170 2004-08-04 Kenichi Handa <handa@m17n.org>
2172 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2174 2004-08-02 Kenichi Handa <handa@m17n.org>
2176 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2177 set val to 1 even if it is greater than 1.
2179 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2181 2004-07-29 Kenichi Handa <handa@m17n.org>
2183 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2184 debugging information.
2186 * internal.h (MDEBUG_PRINT5): New macro.
2188 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2189 the previous one if the zero width glyph has left or right
2192 2004-07-26 Kenichi Handa <handa@m17n.org>
2194 * m17n-X.c (xft_render): Pay attention to members left_padding and
2195 right_padding of MGlyph.
2197 * draw.c (visual_order): Allocate one more elements for arrays as
2198 a workaround of fribidi bug.
2199 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2200 instead of MGlyph->bidi_sensitive.
2201 (layout_glyph_string): Pay attentinon to
2202 control->orientation_reversed when padding at the head or tail.
2203 Fix adjustment of space glyph width.
2204 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2207 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2208 instead of MGlyph->bidi_sensitive.
2210 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2212 2004-07-26 Kenichi Handa <handa@m17n.org>
2214 * draw.c (visual_order): Don't treat combined glyphs specially.
2215 (layout_glyphs): Don't get metrics glyphs that are already ready.
2216 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2217 width with the previous one.
2218 (draw_background): Fix bar cursor position on a r2l glyph.
2220 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2221 (run_rule): Fix place of updating cluster_begin_pos and
2222 cluster_end_pos here.
2223 (run_otf): Don't set left_padding.
2225 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2227 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2228 Fix handling of GPOS.
2229 (mfont__ft_drive_gpos): Delete this function.
2231 * font.h (mfont__ft_drive_otf): Renamed back from
2232 mfont__ft_drive_gsub.
2233 (mfont__ft_drive_gpos): Delete extern.
2235 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2236 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2238 2004-07-23 Kenichi Handa <handa@m17n.org>
2240 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2241 the same bidi level.
2243 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2245 2004-07-22 Kenichi Handa <handa@m17n.org>
2247 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2249 2004-07-20 Kenichi Handa <handa@m17n.org>
2251 * draw.c (render_glyphs): Fix checking of g->code validity.
2253 * face.c (mface__realize): Set g.type.
2255 2004-07-18 Kenichi Handa <handa@m17n.org>
2257 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2260 * m17n-gui.c (mframe): Print error message give by dlopen to
2263 2004-07-16 Kenichi Handa <handa@m17n.org>
2265 * draw.c (compose_glyph_string): Improve the way of deciding a
2266 script. For a character that doesn't have script property, use
2267 the last non-latin script.
2269 * font-ft.c (fc_list): Cancel previous change.
2270 (mfont__ft_init): Add more entries in ft_to_prop_name.
2272 2004-07-15 Kenichi Handa <handa@m17n.org>
2274 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2275 previous or next character glyphs.
2277 2004-07-14 Kenichi Handa <handa@m17n.org>
2279 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2280 of type GLYPH_SPACE.
2282 * fontset.c (mfont__lookup_fontset): If glyph type is
2283 GLYPH_SPACE, get codes for SPACE.
2285 * internal-gui.h (Mfont): Delete extern.
2287 * m17n-gui.h (Mfont): Delete duplicated extern.
2289 2004-07-13 Kenichi Handa <handa@m17n.org>
2291 * font-ft.c (DEVICE_DELTA): New macro.
2292 (adjust_anchor): New function.
2293 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2295 (mfont__ft_drive_gpos): New function.
2297 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2298 (FontLayoutContext): Delete member `rfont'.
2299 (run_otf): Set g->otf_cmd. Call
2300 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2301 only whne HAVE_OTF is defined.
2303 * fontset.c: Include "config.h".
2305 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2306 (MGlyph): New member otf_cmd.
2308 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2309 (mfont__ft_drive_gpos): Extern it.
2311 * face.c: Include "config.h".
2313 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2315 * input-gui.c: Include "config.h".
2317 * plist.c: Include "config.h".
2319 2004-07-06 Kenichi Handa <handa@m17n.org>
2321 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2322 internal-gui.h: Cancel previous changes.
2324 * m17n-gd.h: Delete it.
2326 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2327 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2328 @XML2_LD_FLAGS@ to above.
2329 (libm17n_la_LIBADD): Add -ldl.
2330 (libm17n_la_LDFLAGS): Add -export-dynamic.
2331 (X_LD_FLAGS): Fix the order of linking.
2332 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2333 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2334 (libm17n_X_la_LDFLAGS): Add -module.
2335 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2336 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2337 (libm17n_gd_la_LDFLAGS): Add -module.
2338 (include_HEADERS): Delete m17n-gd.h.
2340 2004-06-30 Kenichi Handa <handa@m17n.org>
2342 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2343 (MDeviceLibraryInterface): Delete it.
2344 (register_device_library): Delete it.
2345 (m17n__device_library_list): Renamed from device_library_list.
2347 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2348 (m17n_init_win): Adjust prototype.
2350 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2351 (m17n_init_gd): New function.
2353 * m17n-gd.h: New file.
2355 * m17n-X.h: Include <m17n-gui.h>.
2356 (m17n_init_X): Extern it.
2357 (M17N_INIT): Redefine it.
2359 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2360 (m17n_init_X): New function.
2362 * internal-gui.h (m17n__device_library_list): Extern it.
2363 (struct MDeviceDriver): New members initialized, init, and fini.
2365 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2367 (libm17n_X_la_LIBADD): Delete aboves.
2368 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2369 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2370 (libm17n_gd_la_LDFLAGS): Delete it.
2371 (include_HEADERS): Add m17n-gd.h.
2373 2004-06-25 Kenichi Handa <handa@m17n.org>
2375 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2376 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2378 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2380 * font-ft.c (fc_list): If FcFontList finds no font, try
2383 * draw.c (compose_glyph_string): Terminate the last loop after
2384 doing default combining if necessary.
2386 2004-06-24 Kenichi Handa <handa@m17n.org>
2388 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2390 * character.c (mchar_define_property): Add const to an arg.
2392 * charset.c (mchar_define_charset): Add const to an arg.
2394 * coding.c (MCodingSystem): Add const to an arg or decoder.
2395 (finish_decoding): Add const to an arg.
2396 (decode_coding_charset, decode_coding_utf_8)
2397 (decode_coding_utf_16, decode_coding_utf_32)
2398 (decode_coding_iso_2022, decode_coding_sjis)
2399 (mconv_define_coding): Likewise.
2401 * m17n-X.c (xft_find_metric): Delete unused variable.
2403 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2406 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2409 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2410 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2412 * mtext.h (mtext__from_data): Ajust prototype.
2414 2004-06-23 Kenichi Handa <handa@m17n.org>
2416 * draw.c (compose_glyph_string): Always get glyph codes by
2418 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2419 (mdraw_glyph_list): New function.
2421 * font-flt.c (mfont__flt_run): Be sure to call
2422 rfont->driver->encode_char.
2424 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2425 (ft_encode_char): Delete arg C.
2426 (ft_render): Don't call FT_Get_Char_Index.
2428 * font.c (mfont__encodable_p): Delete it.
2429 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2431 * font.h (struct MFontDriver): Delete arg C of encode_char.
2432 (mfont__encodable_p): Delete extern.
2434 * m17n-X.c (xfont_encode_char): Delete arg C.
2435 (xft_find_metric): Don't cal FT_Get_Char_Index.
2436 (xft_render): Likewise.
2438 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2440 (mdraw_glyph_list): Extern it.
2442 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2444 2004-06-22 Kenichi Handa <handa@m17n.org>
2446 * m17n-gui.h (mfontset_lookup): Extern it.
2448 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2450 * fontset.c (realize_fontset_elements)
2451 (free_realized_fontset_elements, update_fontset_elements): New
2453 (mfont__realize_fontset): Call realize_fontset_elements.
2454 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2455 (mfont__lookup_fontset): If a fontset was modified, update
2456 the realized fontset.
2457 (mfontset_modify_entry): Increment fontset->tick.
2458 (mfontset_lookup): New function.
2460 2004-06-21 Kenichi Handa <handa@m17n.org>
2462 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2464 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2465 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2466 length of source text 0.
2468 2004-06-21 Kenichi Handa <handa@m17n.org>
2470 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2471 (compare): Pay attention to format other than utf-8.
2472 (copy): Delete this function.
2473 (count_by_utf_8, count_by_utf_16, insert): New functions.
2474 (count_utf_16_chars): Fix handling of a surrogate pair.
2475 (find_char_forward, find_char_backward): Likewise.
2476 (mtext__from_data): Delete unnecessary check. Fix number of
2478 (mtext_from_data): Don't count items.
2479 (mtext_ref_char): Optimize the code.
2480 (mtext_set_char): Pay attention to format other than utf-8.
2481 (mtext_cat_char): Likewise.
2482 (mtext_dup): Don't call copy, instead do allocation here.
2483 (mtext_cat): Call insert instead of copy.
2484 (mtext_ncat): Likewise.
2485 (mtext_cpy): Delete character at first and call insert instead of
2487 (mtext_ncpy): Likewise.
2488 (mtext_copy): Likewise.
2489 (mtext_duplicate): Call insert instead of copy.
2490 (mtext_del): Pay attention to format other than utf-8.
2491 (mtext_ins): Simply call insert.
2492 (mtext_ins_char): Pay attention to format other than utf-8.
2493 (mtext_tok): Call insert instead of copy.
2494 (mtext_text): Call UNIT_BYTES.
2496 * textprop.c (mtext__adjust_plist_for_change): New function.
2498 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2499 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2500 (CHAR_UNITS_AT): Fix typo.
2501 (CHAR_UNITS_BY_HEAD): Fix typo.
2502 (STRING_CHAR_AND_UNITS): Fix typo.
2504 * internal.h (MTEXT_READ_ONLY_P): New macro.
2506 * mtext.h (mtext__replace): Delete the extern.
2507 (mtext__adjust_foramt): Adjust prototype.
2509 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2510 if possible. Otherwise make a copy of mmt.
2512 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2515 2004-06-18 Kenichi Handa <handa@m17n.org>
2517 * character.h (CHAR_STRING_UTF16): Fix syntax.
2519 2004-06-16 Kenichi Handa <handa@m17n.org>
2521 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2522 (libm17n_X_la_LIBADD): Delete it.
2523 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2525 * m17n-X.c (device_open): Add parens in `if' condition.
2527 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2528 (DEC_POSITION): Likewise.
2529 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2531 2004-06-15 Kenichi Handa <handa@m17n.org>
2533 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2536 * draw.c (compose_glyph_string): If langauge is specified, call
2537 mface__for_chars even if a text is all latin. Fix condition for
2538 setting non_ascii_found.
2540 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2542 * m17n.h (minput_char_to_key): Delete extern.
2544 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2546 * m17n-gui.c (null_device_open): Set several members of frame.
2548 2004-06-14 Kenichi Handa <handa@m17n.org>
2550 * m17n-gui.h (minput_event_to_key): Delete extern.
2552 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2554 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2556 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2558 2004-06-08 Kenichi Handa <handa@m17n.org>
2560 * character.c (mchar_put_prop): Don't increment the ref-count of
2563 2004-06-04 Kenichi Handa <handa@m17n.org>
2565 * m17n-core.c (mdebug__register_object): New function.
2566 (mdebug__unregister_object): Likewise.
2568 * internal.h (mdebug__register_object, mdebug__unregister_object):
2570 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2573 * charset.c (mcharset__load_from_database): Don't call
2574 mconv__register_charset_coding here.
2576 * coding.c (find_coding): Get a real name from an element of
2577 coding_definition_list.
2578 (mconv__register_charset_coding): Set the real name at the top of
2580 (mcoding__load_from_database): Likewise.
2581 (mconv_list_codings): Adjusted for the above change.
2583 2004-06-03 Kenichi Handa <handa@m17n.org>
2585 * coding.c (find_coding): Find by canonicalized name. Don't have
2586 to modify the element of coding_definition_list by
2588 (mconv__define_coding_from_charset): Delete it.
2589 (mconv__register_charset_coding): Canonicalize sym.
2590 (mcoding__load_from_database): Register plist modified by
2593 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2595 * font-ft.c (ft_open): Fix setting of rfont->descent.
2597 2004-06-02 Kenichi Handa <handa@m17n.org>
2599 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2600 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2601 (xlfd_unparse_name): Renamed from xfont_build_name.
2602 (mfont__init): Initialized Mfontconfig.
2603 (mfont__free_realized): Unconditionally unref rfont->info.
2604 (mfont__select): Free `this' if it's not best.
2605 (mfont__open): Don't check frame->realized_font_list.
2606 (mfont__parse_name_into_font): New function.
2607 (Mfontconfig): New variable.
2608 (mfont_from_name): Call mfont_parse_name.
2609 (mfont_name): Call mfont_unparse_name.
2610 (mdebug_dump_font): Likewise.
2612 * font.h (struct MFontDriver): Delete members parse_name and
2614 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2615 (mfont__parse_name_into_font): Extern it.
2617 * font-ft.c: Include "symbol.h".
2618 (close_ft): Unconditionally free filename and charmap_list of
2620 (ft_open): Duplicate base->filename. Increment ref-count of
2621 ft_info->charmap_list. Free ft_info->charmap_list and
2622 ft_info->filename on error.
2623 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2625 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2627 (enum xlfd_field_idx): Moved to font.c.
2628 (split_font_name, build_font_name): Likewise.
2629 (build_font_list): Call mfont__parse_name_info_font.
2630 (xfont_open): Call mfont__unparse_name. Free name.
2631 (xfont_parse_name, xfont_build_name): Moved to font.c
2632 (xft_select): Prototype deleted.
2633 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2634 Call mfont_pase_name.
2636 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2637 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2640 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2643 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2645 2004-06-01 Kenichi Handa <handa@m17n.org>
2647 * fontset.c (mfontset_modify_entry): Pay attention to the case
2648 that fontset->font_spec_list is NULL.
2650 2004-05-31 Kenichi Handa <handa@m17n.org>
2652 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2654 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2656 * font.c (mfont__select): Print score the a font for debugging.
2658 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2660 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2661 kanji_sym and kana_sym.
2663 2004-05-28 Kenichi Handa <handa@m17n.org>
2665 * Makefile.am (VINFO): New variable.
2666 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2667 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2669 2004-05-27 Kenichi Handa <handa@m17n.org>
2671 The following chanages are to make device dependent functions
2672 accessible only from MDeviceDriver structure, and to add GD and
2673 null device drivers. Font drivers get also device dependent.
2675 * m17n.c (m17n_init): Increament shell_initialized.
2676 (m17n_fini): Decremented shell_initialized.
2678 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2680 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2681 (Mwidget, Mcolormap, Mx): Extern them.
2683 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2684 (free_frame): Call frame->driver->close instead of
2686 (DLOPEN_SHLIB_EXT): New macro.
2687 (MDeviceLibraryInterface): New type.
2688 (device_library_list): New variable.
2689 (register_device_library): New function.
2690 (null_device): New variable.
2691 (null_device_close, null_device_get_prop)
2692 (null_device_realize_face, null_device_free_realized_face): New
2694 (null_driver): New variable.
2695 (null_device_init, null_device_fini, null_device_open): New
2697 (null_interface): New variable.
2698 (Mfreetype, Mdevice): Declare them.
2699 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2700 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2701 Mwin__Close_Device. Register drivers for Mx and Mgd.
2702 (m17n_fini_win): Decremented win_initialized. Call "fini"
2703 function of all opened devices. Don't call mwin__fini.
2704 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2706 (mframe): Handle Mdevice key of PLIST.
2707 (mframe_get_prop): Call frame->device->get_prop instead of
2708 mwin__device_get_prop.
2710 * m17n-gd.c: New file.
2712 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2713 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2715 * m17n-core.c (m17n_init_core): Increate core_initialized.
2716 (m17n_fini_core): Decremented core_initialized.
2718 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2719 (Mcolormap): Don't extern them here.
2721 * m17n-X.c (FRAME_DEVICE): New macro.
2722 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2723 (free_display_info): Use MPLIST_DO.
2724 (free_device): Free rface->info.
2725 (xft_close): Delete it.
2726 (device_init): Renamed from mwin__init.
2727 (device_fini): Renamed from mwin__fini.
2728 (device_open): Renamed from mwin__open_device.
2729 (x_driver): New variable.
2730 (MXFontInfo): Delete member frame, add member display.
2731 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2732 Don't declare them here.
2734 * internal-gui.h (MDeviceType): New enum.
2735 (MWDefice): Delete it.
2736 (struct MFrame): Change type of device to void *. New members
2737 device_type, driver, font_driver_list.
2738 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2739 (MDeviceDriver): New type.
2740 (Mx, Mgd, Mfreetype): Extern them.
2741 (mwin__XXX): Delete all of them.
2743 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2745 (win_destroy_ic): Likewise.
2746 (adjust_window_and_draw): Likewise.
2747 (win_callback): Likewise.
2748 (Mxim): Declare it here.
2749 (minput_event_to_key): Call M_CHECK_READABLE.
2751 * fontset.c (mfont__lookup_fontset): Delete local variable
2754 * font.h (struct MFontDriver): Delete member close, add members
2755 parse_name and build_name.
2756 (mfont__driver_list): Delete extern.
2757 (mfont__close): Delete extern.
2759 * font.c (mfont__init): Don't set mfont__driver_list.
2760 (mfont__fini): Don't unref mfont__driver_list.
2761 (mfont__select): Try font drivers in frame->font_driver_list. Set
2762 driver member of a realized font.
2763 (mfont__close): Delete it.
2764 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2765 functions of the default frame.
2767 * font-ft.c (close_ft): Check ft_info->ft_face and work
2769 (add_font_info): Allocate ft_info by M17N_OBJECT.
2770 (ft_close): Delete it.
2771 (mfont__ft_driver): Don't set ft_close.
2772 (ft_select): Increment ref-count of best_font.
2773 (ft_open): Decremented ref-count of base. On error, call
2774 FT_Done_Face and free ft_info.
2775 (ft_find_metric): Always use XXX_MONO in load_flags.
2776 (ft_render): Fix setting of width. Call
2777 frame->driver->draw_points instead of mwin__draw_points.
2778 (ft_to_prop): Don't set mfont__driver_list.
2779 (mfont__ft_fini): Just unref ft_info.
2781 * face.c (mface__init): Exchange foreground and background of
2782 mface__default. Call mface_put_prop to set hline of
2784 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2785 (mface__free_realized): Don't call mwin__free_realized_face.
2787 * draw.c (Mdepth): Don't declare it here.
2788 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2789 (render_glyphs, render_glyph_string): Likewise.
2790 (mdraw__init): Don't set Mdepth.
2791 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2793 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2795 (mdraw_text_items): Check FRAME is writable.
2796 (mdraw_per_char_extents): Implement body.
2798 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2800 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2801 (GUI_SOURCES): Delete it.
2802 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2803 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2804 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2805 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2806 (linkgui_LDADD): Set to libm17n-gui.la
2807 (linkgui_LDFLAGS): New target.
2808 (SRC): Include ${libm17n_gui_la_SOURCES} and
2809 ${libm17n_gd_la_SOURCES}.
2811 2004-05-24 Kenichi Handa <handa@m17n.org>
2813 * draw.c (draw_background): Don't draw background even if
2814 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2816 2004-05-22 Kenichi Handa <handa@m17n.org>
2818 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2820 2004-05-20 Kenichi Handa <handa@m17n.org>
2822 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2824 * m17n-gui.c: Include "plist.h".
2825 (mframe): If PLIST is NULL, initialize it to emply plist.
2827 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2828 (xft_driver): New variable.
2829 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2830 (xft_find_metric, xft_render): New function.
2831 (mwin__init): Adjusted for the new mfont__driver_list.
2832 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2833 generated face to PARAM.
2834 (mwin__realize_face): Fix setting of box colors. Don't call hook
2836 (mwin__draw_hline): New function.
2837 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2838 (mwin__xft_render): Delete these function.
2840 * internal-gui.h (struct MFrame): New member tick.
2841 (struct MGlyphString): New member tick.
2842 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2843 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2844 (mwin__xft_render): Delete extern.
2846 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2847 (mfontset): Always increment the reference count of returned
2850 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2851 (MFTInfo): Moved to font.h.
2852 (ft_iso8859_1_font_list): Delete this variable.
2853 (set_font_info): Don't set font->property[MFONT_TYPE].
2854 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2855 (add_font_info): Change type to void.
2856 (fc_list): Change anme from xft_list. Caller changed. Include
2857 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2858 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2859 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2860 (close_ft): Don't call mwin__xft_close. Unref
2861 ft_info->extra_info.
2862 (ft_open): Don't setup ft_info->fontname. Don't call
2864 (ft_find_metric): Don't call mwin__xft_get_metric.
2865 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2866 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2867 (mfont__ft_init): Adjusted for new mfont__driver_list.
2868 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2870 * font.c (mfont__driver_list): Make it MPlist.
2871 (mfont__init): Adjust initialization of mfont__driver_list.
2872 (mfont__fini): Free mfont__driver_list.
2873 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2874 (mfont__select): Adjusted for the new mfont__driver_list.
2876 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2877 (mfont__drirver_list): Adjust prototype.
2878 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2880 * face.h (struct MFace): Delete member realized_face_list, add
2882 (struct MRealizedFace): Delete member need_update
2883 andnofont_rface, add member non_ascii_list.
2884 (mface__update_frame_face): Extern it.
2886 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2888 (get_hline_create, get_box_create): New functions.
2889 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2891 (free_face): Cancep previous change. Free face->frame_list.
2892 (serialize_hline): Do nothing if hline->width is zero.
2893 (serialize_box): Do nothing if box->width is zero.
2894 (mface__init): Setup all properties of mface__default.
2895 (mface__fini): Free hline_prop_list and box_prop_list.
2896 (mface__realize): Cancel previous change. Update
2897 face->frame_list. Setup rface->non_ascii_list.
2898 (mface__for_chars): Update rface->non_ascii_list.
2899 (mface__free_realized): Free rface->non_ascii_list.
2900 (mface__update_frame_face): New function.
2901 (mface): Initialize face->frame_list.
2902 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2904 (mface_merge): Likewise.
2905 (mface_put_prop): If key is Mhline or Mbox, get value by
2906 get_hline_create or get_box_create respectively.
2907 (mface_put_prop): Update frame->tick and call
2908 mface__update_frame_face if necessary.
2909 (mface_update): Do nothing if func is noop_hook.
2911 * draw.c (render_glyphs): If a font is not found, use
2912 mwin__draw_empty_boxes.
2913 (alloc_gstring): Initialize gstring->tick.
2914 (get_gstring): Check gstring->tick.
2916 2004-05-17 Kenichi Handa <handa@m17n.org>
2918 * face.c (find_realized_face): Return value changed. If RFONT is
2919 NULL, avoid unnecessary checking.
2920 (free_face): Free face->realized_face_list.
2921 (mface__realize): Adjusted for the change of find_realized_face.
2922 If it returns a realized face that needs update, free it and
2923 realize a new one. Push a new realized face to
2924 frame->realized_face_list instead of appending.
2925 (mface__for_chars): Adjusted for the change of find_realized_face.
2926 Short cut if the required font is in rface->ascii_rface.
2927 (mface_put_prop): Free old value if necessary. Set need_update
2928 member of realized faces to 1.
2930 * face.h (struct MFace): Delete member tick, add member
2932 (struct MRealizedFace): Delete member tick, add member
2935 2004-05-13 Kenichi Handa <handa@m17n.org>
2937 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2939 2004-05-12 Kenichi Handa <handa@m17n.org>
2941 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2943 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2944 parse it XftNameParse.
2946 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2947 (all_fonts_scaned): New variable.
2948 (set_font_info): FAMILY may be Mnil.
2949 (add_font_info): Argument changed.
2950 (xft_list): Call add_font_info in it.
2951 (ft_list): Likewise.
2952 (ft_select): Make it work in the case family is Mnil.
2953 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2954 (mfont__ft_fini): Set all_fonts_scaned to 0.
2956 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2957 that is failed to open.
2959 2004-05-10 Kenichi Handa <handa@m17n.org>
2961 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2962 device's depth is 1 (i.e. monochrome).
2964 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2965 to work around the problem of libtool.
2967 * font-ft.c: Include <freetype/ftbdf.h>.
2968 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2970 (mfont__ft_init): Initialize them.
2971 (ft_iso8859_1_font_list): New variable.
2972 (set_font_info): Detect a font containing iso8859-1 glyphs and
2973 register it in ft_iso8859_1_font_list. If the font is not
2974 scalable, assume it as BDF or PCF font and setup SIZE and RESY
2975 properties of the font from its properties.
2976 (add_font_list): If the font is not scalable, check if it is BDF
2977 or PCF font. If not, ignore it.
2978 (ft_select): If FAMILY is Mnil, return NULL only if the requested
2979 registry is not iso8859-1.
2980 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2981 ft_iso8859_1_font_list.
2982 (ft_find_metric): If the font is not scalable, assume it as BDF
2983 or PCF, and get a metric from its properties.
2984 (mfont__ft_fini): Free ft_iso8859_1_font_list.
2986 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
2988 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2989 (libm17n_la_LDFLAGS): Delete it.
2990 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2991 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2993 2004-05-06 Kenichi Handa <handa@m17n.org>
2995 * draw.c (compose_glyph_string): Fix previous change.
2997 2004-04-30 Kenichi Handa <handa@m17n.org>
2999 * font-ft.c (ft_list): Delete unused variable `result'.
3000 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3002 2004-04-27 Kenichi Handa <handa@m17n.org>
3004 * m17n-X.c: Include config.h
3005 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3006 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3007 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3008 (FRAME_CMAP, FRAME_VISUAL): New macros.
3009 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3010 (xfont_driver): Make it static.
3011 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3012 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3013 info->xft_color_back.
3014 (MXftFontInfo) [HAVE_XFT2]: New type.
3015 (mwin__xft_close) [HAVE_XFT2]: New function.
3016 (mwin__xft_open) [HAVE_XFT2]: New function.
3017 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3018 (mwin__xft_render) [HAVE_XFT2]: New function.
3020 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3021 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3022 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3025 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3027 * font-ft.c: Don't include FT_FREETYPE_H here.
3028 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3029 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3030 (MFTInfo): New member charmap_index.
3031 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3032 (check_otf_filename): Renamed from check_filename. Return value
3034 (ft_set_property): This function deleted.
3035 (set_font_info): New function.
3036 (add_font_list): Argument changed. Add multiple fonts.
3037 (xft_list) [HAVE_XFT2]: New function.
3038 (ft_list) [not HAVE_XFT2]: New function.
3039 (ft_select): Add code for Xft.
3040 (close_ft): Likewise.
3041 (ft_open): Likewise.
3042 (ft_find_metric): Likewise.
3043 (ft_encode_char): Likewise.
3044 (ft_render): Likewise.
3046 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3048 2004-04-26 Kenichi Handa <handa@m17n.org>
3050 * textprop.c (mtext_attach_property): Declare the return type as
3053 2004-04-21 Kenichi Handa <handa@m17n.org>
3055 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3057 2004-04-09 Kenichi Handa <handa@m17n.org>
3059 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3061 (load_command): Setup above members.
3063 2004-04-05 Kenichi Handa <handa@m17n.org>
3065 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3067 2004-03-30 Kenichi Handa <handa@m17n.org>
3069 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3072 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3073 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3075 2004-03-29 Kenichi Handa <handa@m17n.org>
3077 * Version 1.0 Patch Level 2 released.
3079 2004-03-29 Kenichi Handa <handa@m17n.org>
3081 * charset.c (make_charset): Set charset->fully_loaded and
3082 charset->simple correctly. Don't try to get charset->min_char and
3083 charset->max_char for a charset of method subset and superset.
3084 Don't load a mapping file here.
3085 (mcharset__init): Set unified_max.
3086 (mcharset__load_from_database): Free a working plist.
3088 * coding.c (mcoding__fini): Free all malloced data.
3090 * input-gui.c (win_create_ic): Set control.as_image for preediting
3093 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3094 `count') to initialize the array.
3096 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3099 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3101 (mwin__create_window): Fix bug of setting a background pixel of a
3103 (mwin__adjust_window): Clear the window before drawing.
3105 * m17n-core.c (mdebug__report_object): Free array->objectes if
3107 (m17n_init_core): Don't set report_header_printed to 0 here.
3108 Fix debugging information.
3109 (m17n_fini_core): Set report_header_printed to 0 here.
3111 * m17n-core.h (mplist_deserialize): Extern it.
3113 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3115 * m17n.c (m17n_fini): Fix debugging information.
3117 * mtext.c (mtext__adjust_foramt): New function.
3119 * mtext.h (mtext__adjust_foramt): Extern it.
3121 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3123 * plist.h (mplist__deserialize): Don't extern it.
3125 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3126 elements of symbol_table to NULL. Report about created and freed
3127 symbols if MDEBUG_FINI is set.
3129 2004-03-22 Kenichi Handa <handa@m17n.org>
3131 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3133 * m17n.c (m17n_init): Fix the way of checking merror_code.
3135 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3137 2004-03-22 Kenichi Handa <handa@m17n.org>
3139 * fontset.c (realize_font_group): Adjust the font size by
3140 mfont__resize before selecting a font.
3142 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3144 2004-03-19 Kenichi Handa <handa@m17n.org>
3146 * Version 1.0 Patch Level 1 released.
3148 2004-03-19 Kenichi Handa <handa@m17n.org>
3150 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3152 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3154 2004-03-19 Kenichi Handa <handa@m17n.org>
3156 Re-apply the changes forgotten in the released version.
3158 * charset.c (mcharset__load_from_database): Call
3159 mchar_define_charset.
3161 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3162 (mconv_encode_range): Put Mcoding text property.
3164 2004-03-18 Kenichi Handa <handa@m17n.org>
3166 * draw.c (Mdepth): New variable.
3167 (visual_order): Delete unused local var `pos'.
3168 (compose_glyph_string): Fix for the case that gstring->glyphs is
3169 realloced. Stop generating glyphs at TO. Fix handling of
3171 (layout_glyphs): Get metrics of all glyphs in advance. Set
3172 lbearing and rbearing of base of composition glyph correctly.
3173 Handle left-overhang glyphs correctly.
3174 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3176 (dump_combining_code): Change the defualt off_x character to ".".
3177 (mdraw__init): Initialize Mdepth.
3179 * face.c (work_gstring): New variable
3180 (mface__init): Initialize work_gstring.
3181 (mface__fini): Free work_gstring.glyphs.
3182 (mface__realize): Don't handle videomode property here. Adjusted
3183 for the change of mfont__get_metric.
3184 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3186 * face.h (enum face_gc): Moved to m17n-X.c.
3188 * font.h (struct MFontDriver): Arguments of find_metric changed.
3189 (mfont__select): Prototype adjusted.
3190 (mfont__get_metric): Likewise.
3191 (mfont__ft_drive_otf): Likewise.
3192 (mfont__flt_run): Likewise.
3194 * font.c (mfont__select): New argument layouter. If layouter is
3195 different in the registered font, make a new copy of realized
3197 (mfont__get_metric): Argument changed. Get metrics of multiple
3199 (mfont_find): Call mfont__select with layouter as Mnil.
3201 * font-flt.c (FontLayoutContext): New member rfont.
3202 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3203 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3205 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3207 (NUM_POINTS): New macro.
3208 (MPointTable): New type.
3209 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3210 (mfont__ft_drive_otf): New argument rfont.
3212 * fontset.c (realize_font_group): Adjusted for the changed of
3214 (check_fontset_element): This function deleted.
3216 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3217 off the parent window if the preedit text is zero length.
3219 * internal-gui.h (struct MFrame): New members foreground,
3220 background, videomode, font.
3221 (struct MGlyphString): New member anti_alias.
3222 (MDrawPoint): New type.
3223 (mwin__draw_bitmap): Prototype deleted.
3224 (mwin__draw_points): Prototype added.
3226 * m17n-gui.h (MDrawControl): New member anti_alias.
3228 * m17n-gui.c (free_frame): Free frame->font.
3229 (mframe): Set the fontset of frame->face to the default fontset.
3231 * m17n-X.c (RGB_GC): New type.
3232 (enum gc_index): Renamed from enum face_gc. Member names changed.
3234 (struct MWDevice): Members foreground and background deleted. New
3235 member scratch_gc, gc_list.
3236 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3237 (free_device): Free GCs in device->gc_list.
3238 (get_rgb_gc): New function.
3239 (get_gc): Renamed and argument changed from get_color.
3240 (get_gc_for_anti_alias): New function.
3241 (xfont_find_metric): Arguments changed. Get metrics of multiple
3243 (set_region): Argument changed. Caller changed.
3244 (xfont_render): Allways set a font in gc.
3245 (x_error_handler, x_io_error_handler): Define only if
3246 X_SET_ERROR_HANDLER is defined.
3247 (mwin__open_device): Create device->scratch_gc. Set members
3248 foreground, background, and videomode of frame. Call
3249 XSetErrorHandler and XSetIOErrorHandler only if
3250 X_SET_ERROR_HANDLER is defined.
3251 (struct gc_list): Deleted.
3252 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3253 (mwin__realize_face): Adjusted for the change of the format of
3254 rface->info and the charge of set_region.
3255 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3256 (mwin__draw_box): Likewise.
3257 (mwin__draw_bitmap): This function deleted.
3258 (mwin__draw_points): New function.
3259 (mwin__verify_region): Adjusted for the change of the format of
3260 rface->info and the charge of set_region.
3261 (mwin__create_window): Inherit backgound pixel from parent.
3262 (mwin__dump_gc): Adjusted for the change of the format of
3265 2004-03-16 Kenichi Handa <handa@m17n.org>
3267 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3269 * input.c (M_key_alias): New variable.
3270 (handle_key): Try M_key_alias property of a key too.
3271 (minput__init): Initialize M_key_alias. Give that property to
3272 symbols in one_char_symbol. Fix bug of initializing
3275 * draw.c (compose_glyph_string): Don't handle
3276 ignore_formatting_char here. Include formatting characters in the
3277 range processed by a FTL.
3278 (layout_glyph_string): Handle ignore_formatting_char here.
3280 2004-03-12 Kenichi Handa <handa@m17n.org>
3282 * input-gui.c (win_create_ic): Enable bidi in status control.
3284 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3286 2004-03-09 Kenichi Handa <handa@m17n.org>
3288 * input.c (load_input_method): If title is not specified, use the
3289 input method name as title.
3291 * m17n-X.c (get_color): Make it static.
3292 (xim_create_ic, xim_destroy_ic, x_error_handler)
3293 (x_io_error_handler): Likewise.
3295 2004-03-01 Kenichi Handa <handa@m17n.org>
3297 * Version 1.0 released.
3300 Copyright (C) 2003, 2004
3301 National Institute of Advanced Industrial Science and Technology (AIST)
3302 Registration Number H15PRO112
3304 This file is part of the m17n library.
3306 The m17n library is free software; you can redistribute it and/or
3307 modify it under the terms of the GNU Lesser General Public License
3308 as published by the Free Software Foundation; either version 2.1 of
3309 the License, or (at your option) any later version.
3311 The m17n library is distributed in the hope that it will be useful,
3312 but WITHOUT ANY WARRANTY; without even the implied warranty of
3313 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3314 Lesser General Public License for more details.
3316 You should have received a copy of the GNU Lesser General Public
3317 License along with the m17n library; if not, write to the Free
3318 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA