1 2006-09-15 Kenichi Handa <handa@m17n.org>
3 * input.c (reload_im_info): Update custom and global info.
4 (init_ic_info): Fix previous change.
6 2006-09-14 Kenichi Handa <handa@m17n.org>
8 * database.c: Include <libgen.h>.
9 (mdatabase__lock): Make a directory if necessary.
11 * input.c (resolve_command): Adjusted for the format change of
12 configured_cmds member.
13 (load_commands, load_variables): Fix for errornous data handling.
14 (config_command, config_variable): New function.
15 (config_all_commands, config_all_variables): Renamed from
16 config_commands and config_variables. Utilize the above function.
17 (check_variable_value): Argument changed. Callers changed.
18 (load_im_info): Call config_all_commands and config_all_variables.
19 (init_ic_info): Adjusted for the format change of configured_vars
21 (minput__init): Initialize Mcustomized, Mconfigured, and
23 (Mcustomized, Mconfigured, Minherited): New variables.
24 (minput_get_command): Be sure to return NULL if an input method
26 (minput_get_variable): Be sure to return NULL if an input method
27 use no local variable.
28 (minput_config_command, minput_config_variable)
29 (minput_save_config): Adjusted for the format change of
30 configured_cmds and configured_vars members.
32 * plist.c (write_element): Delete superfluous ':'.
34 2006-09-13 Kenichi Handa <handa@m17n.org>
36 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
37 (minput_config_file): Extern it.
39 * draw.c (Minherited): Declaration moved to input.c.
40 (mdraw__init): Don't initialize Minherited here.
42 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
44 2006-09-07 Kenichi Handa <handa@m17n.org>
46 * textprop.c (mtext_serialize): Call mplist__serialize with the
49 * plist.h (mplist__serialize): Prototype adjusted.
50 (mplist__assq): Extern it.
52 * plist.c: Include <ctype.h>
53 (PUTC, PUTS): New macros.
54 (write_symbol): New function.
55 (write_element): New arg indent.
56 (dump_string, dump_plist_element): Delete them.
57 (mplist__from_string): New arg pretty.
58 (mplist__assq): New function.
59 (mdebug_dump_plist): Use write_element.
61 * mtext.c (mtext_cat_char): Allocate more memory.
62 (mdebug_dump_mtext): Don't escal a newline character.
64 * m17n.h (minput_get_command, minput_get_variable)
65 (minput_config_command, minput_config_variable)
66 (minput_save_config): Extern them.
68 * m17n-core.c: Include <string.h>.
69 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
70 use the stream stdout instead of a file of that name.
72 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
75 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
76 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
77 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
78 (MDEBUG_DUMP): Flush the stream.
80 * input.h (struct _MInputMethodInfo): Delete member im. New
81 members mdb, language, name, extra, cmds, configured_cmds,
82 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
83 (MInputContextInfo): New member tick.
85 * input.c: Big change to improve user-side input method
86 customization. Here, list just public API changes.
87 (minput_get_commands, minput_get_variables)
88 (minput_assign_command_keys, minput_set_variable): Label them
90 (minput_get_command, minput_get_variable)
91 (minput_config_command, minput_config_variable)
92 (minput_save_config): New functions.
94 * database.h (PATH_MAX): Define it if not yet defined.
95 (PATH_SEPARATOR): Likewise.
96 (enum MDatabaseStatus): New enum.
97 (struct MDatabaseInfo): Moved from database.c. New members status,
98 time, lock_file, and uniq_file.
99 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
100 (mdatabase__unlock): Extern them.
102 * database.c: Include <time.h>.
103 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
104 (GEN_PATH): Args changed. Callers changed.
105 (struct MDatabaseInfo): Moved to database.h.
106 (struct MDatabase, mdb_list): Deleted.
107 (mdatabase__list): New var.
108 (get_database_filename): Deleted. Callers changed to use
110 (find_file, get_database_file): New files.
111 (get_dir_info): Initialize new members of MDatabaseInfo.
112 (find_database): Arg chagnded. Callers changed.
113 (free_db_info, register_database, register_databases_in_files):
115 (update_database_list): Deleted.
116 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
117 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
118 (mdatabase__update): New function.
119 (mdatabase__check): Return value changed.
120 (mdatabase__file, mdatabase__lock, mdatabase__save)
121 (mdatabase__unlock): New functions.
123 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
125 * input.c (get_surrounding_text): Return -2 when surrounding text
127 (get_following_char): Likewise.
128 (get_preceding_char): Likewise.
129 (minput__callback): Return 0 if there is a callback function,
132 2006-08-17 Kenichi Handa <handa@m17n.org>
134 * input.c (reset_ic): Use shift_state to setup the current state.
136 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
138 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
139 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
140 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
142 2006-08-02 Kenichi Handa <handa@m17n.org>
144 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
146 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
148 * font-ft.c (ft_encapsulate): Add code for debugging.
149 (mfont__ft_drive_otf): Be sure to encode character before getting
152 2006-07-21 Kenichi Handa <handa@m17n.org>
154 * draw.c (mdraw_text_extents): Fix previous typo.
156 2006-07-19 Kenichi Handa <handa@m17n.org>
158 * draw.c (gstring_width): New arg lbearing.
159 (render_glyph_string): Adjusted for the change of gstring_width.
160 (mdraw_text_extents): Fix lbearing of ink and line metrics.
162 * m17n-core.h (Mlanguage): Extern it.
164 * m17n.h (Mlanguage): Extern deleted.
166 * mtext.c (mtext__init): Initialize Mlanguage.
167 (Mlanguage): Declaration moved from locale.c
169 * locale.c (mlocale__init): Don't initialize Mlanguage here.
170 (Mlanguage): Declaration moved to mtext.c.
172 * language.c (mlang__init): Don't initialize Mlanguage here.
174 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
176 2006-07-14 Kenichi Handa <handa@m17n.org>
178 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
179 (MRealizedFontFT): New member face_encapsulated.
180 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
181 (ft_gen_font): New function.
182 (ft_add_font): Use ft_gen_font.
183 (ft_list_script): Store lists in ft_script_list.
184 (ft_check_otf): New arg ft_face. Caller changed.
185 (ft_check_language): Likewise.
186 (ft_check_script): Likewise.
187 (ft_encapsulate, ft_close): New functions.
188 (mfont__ft_driver): Initialize members encapsulate and close.
189 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
191 * font.h (struct MRealizedFont): New member encapsulating.
192 (struct MFontDriver): New members encapsulate and close.
194 * font.c (mfont__match_p): If FONT is realized, check capability
195 by font drivers's check_capability method.
196 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
199 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
200 declarations of foundry and fam local vars.
201 (xft_driver): Make it static.
203 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
204 (mfont_close): Extern them.
206 * m17n-gd.c (device_open): Don't specify foundry and family of the
209 2006-07-11 Kenichi Handa <handa@m17n.org>
211 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
213 2006-07-13 Kenichi Handa <handa@m17n.org>
215 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
217 (ft_check_script): Delete unused var.
218 (ft_list_capability): Likewise.
220 * font.c (mfont__get_capability): Setup cap->otf.
221 (Motf): Make it global.
222 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
224 * font.h (MFontCapability): New member otf.
226 * language.c (mlang__fini): Delete unused vars.
228 * m17n-gui.h (Motf): Extern it.
230 * database.c (update_database_list): Delete unused vars.
232 2006-07-07 Kenichi Handa <handa@m17n.org>
234 * font-ft.c (DEVICE_DELTA): Fix typo.
236 2006-07-06 Kenichi Handa <handa@m17n.org>
238 * fontset.c (mfont__lookup_fontset): Don't ignore family and
241 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
243 * database.c: Update comments.
245 2006-07-05 Kenichi Handa <handa@m17n.org>
247 * database.c (PATH_MAX): Define it if not yet defined.
248 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
250 (get_database_filename): Use GEN_PATH.
251 (get_dir_info): Don't include the last '/' in directory name.
252 (register_database): New function.
253 (update_database_list): Use register_database. Search all
254 directories in mdatabase__dir_list for wildcard databases.
255 (mdatabase__init): Check "~/.m17n.d".
257 2006-07-03 Kenichi Handa <handa@m17n.org>
259 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
260 push reverse property.
262 * plist.c (dump_plist_element): Fix previous change.
264 2006-06-28 Kenichi Handa <handa@m17n.org>
266 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
269 * draw.c (MbidiNSM): New variable.
270 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
271 attention to bidi type NSM.
272 (mdraw__init): Initialize MbibiNSM.
274 * language.c (mscript__char_list): Fix finding a char-list element.
276 * plist.c (dump_string): Return number of printed characters.
277 (dump_plist_element): Print elements more compactly.
279 2006-06-23 Kenichi Handa <handa@m17n.org>
281 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
282 (include_HEADERS): Likewise.
284 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
286 * language.c: Update documentation.
288 2006-06-23 Kenichi Handa <handa@m17n.org>
290 * font-ft.c (struct MFontFT): Delete member lang.
291 (free_ft_info): Don't unref member lang. Destroy members langset
293 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
294 changed. Set members langset and charset.
295 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
297 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
299 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
300 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
301 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
302 characters at first. If it fails, try listing by language names.
303 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
304 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
305 change of MFontCapability.
306 (ft_list_capability): Likewise. Try listing by languages, then by
307 scripts. Check OTF at last.
308 (ft_check_script): New function.
309 (ft_select): Adjusted for the check of MFontCapability.
310 (ft_list_family_names): New function.
311 (ft_check_capability): If cap->script is not Mnil, call
313 (mfont__ft_driver): Initialize with ft_list_family_names.
315 * font.h (struct MFontDriver): New member list_fmaily_names.
316 (struct): Change member "MSymbol *lang" to "MSymbol language".
318 * font.c: Include "language.h".
319 (Motf): New variable.
320 (otf_script_list, load_otf_script_list): Delete it.
321 (find_script_from_otf_tag): Delete it.
322 (merge_capability): New function.
323 (mfont__init): Init Motf.
324 (mfont__fini): Don't unref otf_script_list.
325 (free_font_capability): Check cap->script_tag to determine if
326 OTF-related capability is set.
327 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
328 the change of type MFontCapability.
329 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
331 (mfont_list): Call merge_capability for LANGUAGE arg.
332 (mfont_list_family_names): New function.
334 * input-gui.c: Typo in comments fixed.
336 * input.c: Typo in comments fixed.
338 * language.h (mlanguage__list): Delete it.
339 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
342 * language.c: Include "mtext.h".
343 (M_script_lang_list): Delete it.
344 (language_list, script_list): New variables.
345 (load_lang_script_list, init_language_list, init_script_list): New
347 (mlang__init): Don't load language database here.
348 (mlang__fini): Unref language_list and script_list if not NULL.
349 (mlanguage__list): Delete it.
350 (mlanguage__info, mscript__info, mscript__char_list)
351 (mscript__otf_tag, mscript__from_otf_tag): New functions.
352 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
353 (mscript_list, mscript_language_list): New functions.
355 * m17n-gui.h (mfont_list_family_names): Extern it.
357 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
358 (mlanguage_text, mscript_list, mscript_language_list): Extern
361 2006-06-21 Kenichi Handa <handa@m17n.org>
363 * m17n-X.c (xfont_driver): Initialize with
364 xfont_list_family_names.
365 (xfont_list_family_names): New function.
366 (xft_driver): Initialize with NULL for list_family_names member.
367 (device_init): Set list_family_names member of xft_driver to that
370 2006-06-06 Kenichi Handa <handa@m17n.org>
372 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
374 2006-03-24 Kenichi Handa <handa@m17n.org>
376 * font-ft.c (ft_open): Improve debug message.
378 * fontset.c (mfontset__get_font): Fix for the case that no font in
379 per_script list is available.
381 2006-02-06 Kenichi Handa <handa@m17n.org>
383 * Version 1.3.3 released.
385 2006-02-22 Kenichi Handa <handa@m17n.org>
387 * textprop.c: Fix some typos in documentation.
389 * plist.c: Fix some typos in documentation.
391 * m17n-core.h: Fix some typos in documentation.
392 (M17NLIB_PATCH_LEVEL): Updated to 3.
393 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
395 * symbol.c: Fix some typos in documentation.
397 * mtext.c: Fix some typos in documentation.
399 * input.c: Fix several typos in documentation.
401 2006-02-06 Kenichi Handa <handa@m17n.org>
403 * Version 1.3.2 released.
405 2006-02-03 Kenichi Handa <handa@m17n.org>
407 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
408 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
410 * font.c (xlfd_parse_name): Fix handling of the name "nil".
412 * draw.c (layout_glyphs): Fix handling left_padding of
415 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
417 2006-02-02 Kenichi Handa <handa@m17n.org>
419 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
422 2006-01-25 Kenichi Handa <handa@m17n.org>
424 * input.c (resolve_expression): If the value of PLIST is a plist,
425 but the first element is not symbol, return 0.
427 2006-01-17 Kenichi Handa <handa@m17n.org>
429 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
430 HAVE_GD is 2 or the greater.
432 2006-01-16 Kenichi Handa <handa@m17n.org>
434 * Version 1.3.1 released.
436 2006-01-16 Kenichi Handa <handa@m17n.org>
438 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
439 simulating anti-aliasing.
441 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
442 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
444 2006-01-12 Kenichi Handa <handa@m17n.org>
446 * input.c (get_surrounding_text): Always pop ic->plist.
447 (reset_ic): Don't reset ic->plist.
449 2006-01-10 Kenichi Handa <handa@m17n.org>
451 * input.c (preedit_commit): For debugging, print only commiting
452 charactes. Don't set ic->candidate_show to 0.
453 (handle_key): Don't run branch-actions just by shifting to the
455 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
456 Reset vars and plist.
458 2006-01-07 Kenichi Handa <handa@m17n.org>
460 * input.c (load_branch): Confirm that maps is not NULL.
462 2006-01-05 Kenichi Handa <handa@m17n.org>
464 * input-gui.c (win_filter): Try to convert arg to key only when
467 * plist.c (read_integer_element): If '#' and '-' are followed by
468 non-integer-constituent, read them as a part of a symbol.
469 (read_symbol_element): New arg C.
470 (read_element): Adjust args to read_symbol_element.
472 * input.c (load_macros): On overwriting a macro, free the old
474 (minput__init): Store Mmap in load_im_info_keys.
475 (minput_get_title_icon): If the input method has no title, be sure
477 (minput_get_description): If the input method has no description,
478 be sure to return NULL.
479 (minput_get_variables): Fix documentation.
480 (handle_key): Pay attention to the case that key is Mnil.
481 (filter): Likewise. Fix handling of such symbol as S-A.
483 2005-12-22 Kenichi Handa <handa@m17n.org>
485 * Version 1.3.0 released.
487 2005-12-22 Kenichi Handa <handa@m17n.org>
489 * font-ft.c (ft_list): If the specified font has no property,
492 2005-12-20 Kenichi Handa <handa@m17n.org>
494 * character.c (mchar_get_prop): Check char_prop_list.
495 (mchar_put_prop, mchar_get_prop_table): Likewise.
497 2005-12-18 Kenichi Handa <handa@m17n.org>
499 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
500 file name sans language.
502 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
504 * input.c: Fix typo in comments.
506 2005-12-14 Kenichi Handa <handa@m17n.org>
508 * input.c (minput_get_title_icon): Check the default icon for the
511 2005-12-13 Kenichi Handa <handa@m17n.org>
513 * input.c (Mless_equal, Mgreater_equal): New variables.
514 (parse_expression, resolve_expression, parse_action_list)
515 (take_action_list): Handle the aboves.
516 (filter): Treat key S-X as X.
517 (minput__init): Initialize Mless_equal and Mgreater_equal.
518 (minput_get_title_icon): New function.
520 * m17n.h (minput_get_title_icon): Extern it.
522 * database.c (get_database_filename): Return a filename instead of
524 (load_database): Adjusted for the above change.
525 (mdatabase__load_for_keys): Likewise.
526 (mdatabase__find_file): New function.
528 * database.h (mdatabase__find_file): Extern it.
530 * font.h (mfont__resize): Delete extern.
532 * font.c (mfont__list): Check resize ratio.
533 (mfont__resize): Delete it.
534 (mfont_resize_ratio): Include the code of mfont__resize.
536 * font-ft.c (ft_open): Check resize ratio.
538 * m17n-X.c (xfont_open): Check resize ratio.
539 (xft_open): Likewise.
541 2005-12-07 Kenichi Handa <handa@m17n.org>
543 * input.c (take_action_list): If take_action_list return -1,
545 (handle_key): Likewise.
547 * face.c (mface__for_chars): When font is specified and layouter
548 is found for it, if the layouter doesn't support one of a
549 character, use a face sans layouter for it.
551 2005-12-06 Kenichi Handa <handa@m17n.org>
553 * fontset.c (mfont__lookup_fontset): If only a fallback font is
554 found, don't use it for more than one character.
556 2005-12-05 Kenichi Handa <handa@m17n.org>
558 * face.c (mface__realize): Set rfont->layouter to Mnil.
559 (mface__for_chars): Fix handling of layouter.
561 * character.h (mchar__define_prop): Extern it.
563 * database.c (update_database_list): Call mchar__define_prop if
566 * character.c (mchar__init): Don't call mchar_define_property.
567 Instead just initialize property keys.
568 (mchar__fini): Free char_prop_list only if it's not NULL.
569 (mchar__define_prop): New function.
570 (mchar_define_property): Call mchar__define_prop.
572 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
575 2005-12-02 Kenichi Handa <handa@m17n.org>
577 * language.c (mlang__init): Handle extra chars.
579 * m17n-gui.h (mfont_check): Adjust prototype.
581 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
582 (xfont_check_capability): New function.
583 (xft_driver): Specify xft_check_capability.
584 (xft_check_capability): New function.
586 * font-ft.c (M0_3): Delete it.
588 (ft_get_charmaps): Refer to M0.
589 (fc_parse_pattern): Fix previous change.
590 (ft_list_language): Check also extra chars.
591 (ft_check_otf): Define it even if HAVE_OTF is undef.
592 (ft_check_lang): Check the result of FcLangSetHasLang against
593 FcLangDifferentLang. Check also extra chars.
594 (ft_list_capability): Delete ifdef HAVE_OTF.
595 (ft_select): Likewise.
596 (ft_open): Improve debug information.
597 (ft_check_capability): New function.
598 (mfont__ft_driver): Specify ft_check_capability.
599 (mfont__ft_init): Initialize M0.
601 * fontset.c (get_font_from_group): New function.
602 (mfontset__get_font): New function.
604 * fontset.h (mfontset__get_font): Extern it.
606 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
607 (mfont__fini): Delete ifdef HAVE_OTF.
608 (free_font_capability): Likewise.
609 (mfont__get_capability): Likewise.
610 (mfont__check_capability): New function.
611 (mfont_check): Change the order of arguments. Use
614 * font.h (struct MFontDriver): New member check_capability.
615 (MFontCapability): Delete ifdef HAVE_OTF.
616 (mfont__check_capability): Extern it.
618 * face.c (mface__realize): Fix handling of FONT arg.
619 (mface__for_chars): Fix handling of explicitly specified font.
621 2005-11-25 Kenichi Handa <handa@m17n.org>
623 * font-flt.c (run_command): Print debug info for
626 * draw.c (layout_glyphs): Fix handling of left/right_padding.
628 * face.c (mface__for_chars): Check rfont before accessing the
631 2005-11-21 Kenichi Handa <handa@m17n.org>
633 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
636 * fontset.c (fontset_table): New variable.
637 (free_fontset): Call M17N_OBJECT_UNREGISTER.
638 (mfont__fontset_init): Add fontset_table as an object array.
639 (mfont__realize_fontset): Ref FONTSET.
640 (mfont__free_realized_fontset): Unref REALIZED->fontset.
641 (mfontset): Call M17N_OBJECT_REGISTER.
642 (mfontset_copy): Likewise.
644 * input.c (handle_key): For debugging, print information about
646 (filter): Add an alias for Meta and Alt modifiers.
647 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
649 (minput__init): Initialize them.
650 (parse_expression): New function.
651 (resolve_expression): New function.
652 (parse_action_list): Handle expressions by parse_expression.
653 (take_action_list): Handle expressions by resolve_expression.
654 (parse_nested_list_value): Fix previous change.
655 (resolve_command): Fix handling of the return value of
658 2005-11-18 Kenichi Handa <handa@m17n.org>
660 * font-ft.c (ft_check_otf, otf_script_list): Define only when
662 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
664 (ft_select): Likewise.
666 * font.c (mfont_list): Fix for the case that FONT is NULL.
667 (OTF_tag): Delete it.
668 (load_otf_script_list): Define only when HAVE_OTF is defined.
669 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
672 * draw.c (truncate_gstring): Be sure to truncate at
673 glapheme-cluster boundary.
675 2005-11-11 Kenichi Handa <handa@m17n.org>
677 * input.c (delete_surrounding_text): Clear cache if necessary.
679 2005-11-09 Kenichi Handa <handa@m17n.org>
681 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
682 glyph prev is also supported by the current flt.
684 2005-11-08 Kenichi Handa <handa@m17n.org>
686 * m17n-X.c (xft_render): Cancel previous change.
688 2005-11-07 Kenichi Handa <handa@m17n.org>
690 * input.c: Include <stdlib.h>.
691 (get_surrounding_text, delete_surrounding_text)
692 (get_preceding_char, get_following_char): New functions.
693 (integer_value): New arg surrounding. If it is nonzero, try to
694 get a surrounding character. Callers changed.
695 (take_action_list): Check `value' before setting an element.
696 (destroy_ic): Unref ic_info->preceding_text and
697 ic_info->following_text.
698 (minput__init): Initialize Minput_get_surrounding_text and
699 Minput_delete_surrounding_text.
700 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
702 (filter): Unref ic_info->preceding_text and
703 ic_info->following_text.
705 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
708 * input.h (MInputContextInfo): New members preceding_text and
711 2005-11-04 Kenichi Handa <handa@m17n.org>
713 * input.c (parse_nested_list_value): Fix handling of the global
715 (get_nested_list): Get global definitions by load_partial_im_info.
716 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
717 MInputCandidatesChanged.
718 (take_action_list): Likewise.
719 (reset_ic): Likewise.
720 (create_ic): Don't pay special attention to
721 Mcandidates_group_size.
722 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
723 (minput_set_variable): Get a definition of varible by
724 mplist_find_by_value, not mplist_get.
726 * m17n.h (enum MInputCandidatesChanged): New enum.
728 2005-11-01 Kenichi Handa <handa@m17n.org>
730 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
732 (mwin__destroy_window): If xft_draw's drawable is win, change it
733 to device->drawable before destroying win.
735 2005-10-31 Kenichi Handa <handa@m17n.org>
737 * input.c (load_im_info): Fix adding of state.
739 * m17n-core.c (m17n_fini_core): Fix reporting of module
742 * m17n.c (m17n_fini): Fix reporting of module finalization.
744 * m17n-gui.c (m17n_init_win): Fix reporting of module
747 2005-10-29 Kenichi Handa <handa@m17n.org>
749 * input.c (get_candidate_list): Fix the timing of referring plist.
751 2005-10-28 Kenichi Handa <handa@m17n.org>
753 * input.c (load_branch): Ignore an undefined map name.
754 (load_im_info): Set im_info->title from `name' only if it's not
756 (shift_state): Always update ic->status.
757 (adjust_candidates): Renamed from adjust_candidate_command.
758 Argument changed. Caller changed.
759 (get_candidate_list, regularize_action): New functions.
760 (take_action_list): Use them. On handling Munhandle, don't set
762 (handle_key): If KEY is not handled by MAP, and MAP has
763 branch_actions, perform them.
765 * database.c (mdatabase__fini): Free dir_info->filename;
767 2005-10-20 Kenichi Handa <handa@m17n.org>
769 * input.c (marker_code): Accept '@@'.
770 (integer_value): Handle '@@'.
771 (parse_action_list): Accept a symbol argument.
772 (take_action_list): Resolve the symbol argument. Handle the
775 2005-10-18 Kenichi Handa <handa@m17n.org>
777 * input.c: Include "charset.h".
778 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
780 (MIMState): New member (M17NObject control).
781 (lookup_nested_list, set_nested_list, parse_nested_list_value)
782 (get_nested_list, resolve_variable): New functions.
783 (integer_value): New arg (MPlist **value). Set it to the plist
784 element containing the value.
785 (resolve_command): New function.
786 (load_translation): New arg (MPlist *map_actions).
787 (load_branch): New args language and name. If `keylist' is a
788 symbol, resolved that as a command name.
789 (free_map): New arg top. Free map->map_actions only if top is
791 (free_state): New function.
792 (load_state): New arg name.
793 (im_info_list): New variable.
794 (free_im_info, get_im_info_by_tags): New functions.
795 (load_im_info): Arg key changed to plist. Handle `include'.
796 Return (MInputMethodInfo *).
797 (preedit_commit): Ref ic->candidate_list.
798 (get_select_charset, adjust_candidate_command): New functions.
799 (take_action_list): Handle `include'. Adjust candidate action
800 properly. Handle control variables `candidates-charset' and
801 `candidates-group-size'.
802 (open_im): Use get_im_info.
803 (create_ic): Get global variables.
804 (load_partial_im_info): New function.
805 (get_im_info): New function.
806 (check_command_keyseq, check_command_list, check_variable_list):
808 (minput__init): Don't handle M_database_hook and Mdetail_text.
809 Initialize M_candidates, Mcandidates_group_size,
811 (parse_variable_list, get_variable_list, parse_command_list)
812 (get_command_list): Delete them.
813 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
814 (minput__fini): Simply unref command_list and variable_list.
815 (minput_get_description): Adjusted for the new form of description.
816 (minput_get_commands): Use get_nested_list.
817 (minput_assign_command_keys): Likewise.
818 (minput_get_variables, minput_set_variable): Likewise.
820 * input.h (MInputMethodInfo): New members im and maps.
822 * database.h (M_database_hook): Delete extern.
823 (MDatabaseHookFunc): Delete extern.
824 (mdatabase__check): Extern it.
826 * database.c: Include <glob.h>.
827 (MAX_TIME): New macro.
828 (Masterisk): New variable.
829 (get_database_stream): Argument changed to (MDatabaseInfo *).
831 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
832 (find_database): New function.
833 (update_database_list): New function.
834 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
835 calling update_database_list.
836 (mdatabase__check): New function.
837 (mdatabase_find): Use update_database and find_database. Don't
838 handle MDatabaseHookFunc.
839 (mdatabase_list): Call update_database at first.
840 (mdatabase_define): Adjusted for the change of mdb->extra_info.
841 (MDatabaseList): New type.
843 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
845 * m17n.h (Mdetail_text): Delete extern.
847 * m17n-core.h (mplist_conc): Delete extern.
849 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
851 (mplist_conc): Renamed to mplist__conc.
852 (mplist__pop_unref): New function.
854 2005-10-14 Kenichi Handa <handa@m17n.org>
856 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
858 (read_element): If keys is an empty plist, return any element
860 (dump_plist_element): Check if plist is nested.
861 (mplist_conc): Always ref tail.
862 (mplist_set): If key is a managing key, ref val in advance.
864 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
865 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
866 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
869 * fontset.c (free_fontset): Unref fontset_list if necessary.
870 (mfont__fontset_fini): Don't free fontset_list. Unref
872 (mfont__realize_fontset): Initialize request.
873 (mfontset): Ref default_fontset or fontset only if necessary.
874 (mfontset_copy): Don't ref copy.
876 * draw.c (render_glyphs): Check gend->type before checking
879 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
880 unrefed plists to NULL.
882 2005-10-04 Kenichi Handa <handa@m17n.org>
884 * textprop.c (mtext_serialize): Be sure to make mt
885 MTEXT_FORMAT_UTF_8 and NULL terminated.
887 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
889 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
891 2005-10-03 Kenichi Handa <handa@m17n.org>
893 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
894 is not at the beginning of line.
896 2005-09-22 Kenichi Handa <handa@m17n.org>
898 * input.c: Include <sys/stat.h> and <unistd.h>.
899 (Minclude, Mcommit, Munhandle): New variables.
900 (minput__init): Initialize them. Push only Mstate to
901 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
902 (parse_action_list): Allow integer arg for undo. Handle Mcommit
904 (load_input_method): Handle "include" directive. If no states are
906 (shift_state): If state_name is Mt, shift back to the previous
907 state. Call preedit_commit to commit preedit text.
908 (preedit_commit): New function.
909 (take_action_list): Improve debug printing. Handle commit and
911 (handle_key): Check the return value of take_action_list. Don't
912 take branch_actions just after changing to the root map.
913 (reset_ic): Reset all ic_info members.
914 (filter): When a key is not handled, just move ic_info->keys
915 instead fo calling reset_ic.
916 (load_im_info): If key is not Mstate, push Mmap to
918 (MDatabaseStatList): New type.
919 (imdir_stat_list): New variable.
920 (input_method_hook): Don't cancel the hook. Check the
921 modification time of directories.
922 (minput__fini): Free imdir_stat_list;
924 * input.h (MInputContextInfo): New member prev_state.
926 * m17n-core.h (mplist_conc): Extern it.
928 * plist.c (mplist_conc): New function.
930 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
932 * font.h (MRealizedFont): New member average_width.
934 * font-ft.c (ft_open): Set rface->average_width.
936 * font.c (xlfd_unparse_name): Print '*' before registry name.
938 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
939 (xfont_open): Set rfont->average_width.
940 (xft_open): Likewise.
941 (device_open): Initialize disp_info->AVERAGE_WIDTH.
943 * internal-gui.h (struct MFrame): New member average_width.
945 * m17n-gui.c (mframe): Fix setting of frame->rfont.
946 (mframe_get_prop): Return the average_width of a font.
948 * face.c (mface__realize): Set rface->average_width.
949 (mface__update_frame_face): Set frame->average_width.
951 * face.h (MRealizedFace): New member average_width.
953 2005-09-19 Kenichi Handa <handa@m17n.org>
955 * font.c (xlfd_unparse_name): New arg full_xlfd.
956 (mfont__encode_char): Use shortcut only for X core fonts.
957 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
958 (mfont_put_prop): Handle `language' property.
959 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
960 Print file can capability info too.
962 * m17n-core.c (mdebug__output): New variable.
963 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
964 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
965 (m17n_fini_core): Close mdebug__output if it's not stderr.
967 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
968 (xfont_open): Handle baseline_offset.
969 (xfont_find_metric): Likewise.
970 (xfont_render): Likewise.
971 (xft_open): Likewise.
972 (xft_render): Likewise.
974 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
975 (mdebug__output): Extern it.
976 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
977 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
978 (MDEBUG_DUMP): New macro.
979 (MDEBUG_PRINT_TIME): Print to medebug__output.
981 * font.h (MRealizedFont): New member baseline_offset.
983 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
985 (fc_weight_table): Add FC_WEIGHT_REGULAR.
986 (ft_list_family): Check alias.
987 (ft_list_language): If language is "en", don't try to the second
989 (ft_default_list): New variable.
990 (ft_list_default): New function.
991 (ft_select): If family is not specified, try only the default
992 fonts. Treat the weights normal and medium same.
993 (ft_open): Fix debug message. If registry is not specified, try
994 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
995 (ft_find_metric): Likewise.
996 (ft_render): Likewise.
997 (ft_list): Fix debug message. Accept the registring iso8859-1.
998 If family is not specified, try only the default fonts.
1000 * face.c (mface__realize): Fix logic of opening a font.
1002 2005-09-16 Kenichi Handa <handa@m17n.org>
1004 * face.c (mface__realize):
1006 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1009 * input.c (shift_state): Fix the condition of taking init actions.
1010 (take_action_list): Fix handling of pushback action.
1011 (handle_key): Don't change key while checking its alias.
1012 (minput__init): Initialize new variables.
1013 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1016 2005-09-12 Kenichi Handa <handa@m17n.org>
1018 * mtext.c (mtext__uppercase): Add proper open/close parens.
1019 (mtext_titlecase): Add proper casting.
1021 * input.c (parse_action_list): Handle the case that the arg is a
1022 key sequence (MText or MPlist).
1023 (take_action_list): Likewise.
1024 (shift_state): Shorter debug message.
1025 (handle_key): Terminate a debug message by "\n".
1026 (reset_ic): Don't take initial actions here.
1027 (minput_open_im): Print a debug message.
1028 (minput_close_im): Likewise.
1029 (minput_create_ic): Likewise.
1030 (minput_destroy_ic): Likewise.
1032 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1034 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1037 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1038 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1041 * character.c: Add Japanese documentation for
1042 mchar_get_prop_table ().
1044 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1046 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1047 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1048 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1050 (init_case_conversion): New function.
1051 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1052 (uppercase_precheck, lowercase_precheck, final_sigma)
1053 (after_soft_dotted, more_above, before_dot, after_i)
1054 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1056 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1058 * plist.c (read_mtext_element): Fix previous change.
1060 2005-09-05 Kenichi Handa <handa@m17n.org>
1062 * plist.c (read_mtext_element): Handle \uXXXX notation.
1064 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1065 (MTABLE_ALLOCA): Change the name of local variable.
1067 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1068 HAVE_FREETYPE are defined.
1070 * m17n-X.c: Check HAVE_X11.
1072 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1073 directory listing libraries.
1074 (noinst_PROGRAMS): Define it only in maintainer mode.
1076 2005-09-02 Kenichi Handa <handa@m17n.org>
1078 * m17n-gui.h (mdraw_line_break_option): Extern it.
1080 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1081 end of the first glyph.
1082 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1084 (mdraw_line_break_option): New variable.
1085 (mdraw_default_line_break): Use mtext_line_break.
1087 * mtext.h (wordseg_func_table): Don't extern it.
1088 (mtext__wseg_fini): Extern it.
1090 * mtext.c: Don't include word-thai.h.
1091 (wordseg_func_table): Delete this variable.
1092 (mtext__init): Don't initialize above. Don't call
1093 mtext__word_thai_init.
1094 (mtext__fini): Don't free wordseg_func_table. Call
1095 mtext__wseg_fini instead fo mtext__word_thai_fini.
1096 (MTextWordsegFunc): Don't typedef it.
1097 (mtext__word_segment): Moved to mtext-wseg.c.
1099 * m17n-core.h (enum MTextLineBreakOption): New enum.
1100 (mtext_line_break): Extern it.
1102 * mtext-wseg.c: New file.
1104 * mtext-lbrk.c: New file.
1106 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1107 add mtext-lbrk.c and mtext-wseg.c.
1109 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1110 the case that head is NULL.
1112 2005-09-01 Kenichi Handa <handa@m17n.org>
1114 * word-thai.c (wordseg_propertize): If the property value is nil,
1115 don't make the property no-merge.
1116 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1117 attention to the case that they are NULL.
1118 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1121 * character.c (mchar_get_prop_table): New function.
1123 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1125 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1126 (mchar_get_prop_table): Extern it.
1128 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1129 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1131 * internal.h (enum MTextCoverage): New enum.
1132 (MText): New member coverage.
1134 * mtext.c (FORMAT_COVERAGE): New macro.
1135 (insert): Copy mt2->coverage.
1136 (mtext__from_data): Initialize mt->coverage.
1137 (mtext__adjust_format): Update mt->coverage.
1138 (mtext): Initialize mt->coverage.
1139 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1140 Update mt->coverage if necessary.
1141 (mtext_duplicate): Copy mt->coverage.
1142 (mtext_insert, mtext_replace): New functions.
1143 (mtext_dup): Use mtext_duplicate.
1144 (mtext__word_segment): Don't set *from and *to if a word
1145 segmentation funcion is not found.
1146 (mtext_ins_char): Fix typo.
1148 2005-08-25 Kenichi Handa <handa@m17n.org>
1150 * font.h (MFont): New member for_full_width.
1152 * font.c (compare_font_score): Prefer a font of not
1155 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1156 registry charset of a font is one of CJK charsets.
1158 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1159 supports some of CJK.
1161 2005-08-24 Kenichi Handa <handa@m17n.org>
1163 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1165 * m17n-gui.c (null_device_open): Check Mresolution param and set
1168 * m17n-gd.c (device_open): Check Mresolution param and set
1171 * m17n-X.c (MWDevice): New member resy.
1172 (xfont_open): Set ascent, descent, and max_advance members of
1174 (xft_open): Likewise.
1175 (device_open): Compare also screen_num to find a device. Set
1176 device->resy and frame->dpi.
1178 * internal-gui.h (MFrame): New member dpi.
1180 * font.h (MRealizedFont): New member max_advance.
1182 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1183 (mfont__init): Don't initialize Mascent, Mdescent.
1184 (Mascent, Mdescent): Delete these variables.
1185 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1186 Mfont_descent instead of Mascent and Mdescent.
1187 (mfont_put_prop): Allow negative size.
1188 (mfont_find): Handle the case of spec->size < 0. Fix previous
1190 (mfont_list): Handle the case of spec->size < 0.
1191 (mfont_check): Likewise.
1193 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1194 (fc_get_pattern): Handle the case of font->size < 0.
1195 (ft_open): Set ascent, descent, and max_advance members of rfont.
1196 (ft_find_metric): Improve rounding.
1197 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1200 * face.c (mface__realize): Handle the case of font->size < 0.
1202 2005-08-22 Kenichi Handa <handa@m17n.org>
1204 * coding.c (MConverterStatus): Change the member buf to union.
1205 (mconv_buffer_converter): Add const to the arg buf.
1206 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1207 (mconv_decode): Adjusted for the change of MConverterStatus.
1208 (mconv_encode_range): Likewise.
1210 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1211 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1213 2005-08-20 Kenichi Handa <handa@m17n.org>
1215 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1216 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1218 * m17n-X.c (xfont_open): Set members ascent, descent, and
1219 max_advance of rfont.
1220 (xft_open): Likewise.
1222 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1224 (mfont__ft_parse_name): Add const to the arg name.
1226 * font.c (xlfd_parse_name): Add const to the arg name. Call
1227 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1228 (xlfd_unparse_name): Handle spacing.
1229 (mfont__init): Initialize new variables.
1230 (mfont__id): Handle spacing.
1231 (mfont__merge): Likewise.
1232 (mfont__set_spec): This function deleted.
1233 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1234 condition of calling mfont__ft_parse_name.
1235 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1236 (mfont_get_prop): Handle properties spacing, ascent, descent,
1238 (mfont_find): Return a realized font.
1239 (mfont_from_name): Add const to the arg name.
1241 * font.h (enum MFontProperty): New member MFONT_SPACING.
1242 (enum MFontSpacing): New enum.
1243 (MFont): New members spacing and max_advance.
1244 (mfont__ft_parse_name): Prototype adjusted.
1245 (mfont__set_spec): Extern deleted.
1246 (mfont__parse_name_into_font): Prototype adjusted.
1248 2005-08-19 Kenichi Handa <handa@m17n.org>
1250 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1252 * font.c (mfont_list): If FONT is null, use a temporary font.
1253 (mfont_parse_name): Add const to the arg name.
1255 2005-08-18 Kenichi Handa <handa@m17n.org>
1257 * word-thai.c: Surround code by #ifdef and #endif to escape from
1260 * font-ft.c: Mostly re-written.
1262 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1263 (FontLayoutCmd): Type of the member otf changed..
1264 (load_otf_command): Adjusted for the format change of otf command.
1265 (load_command): Likewise.
1266 (free_flt_command): Unref cmd->body.otf.
1267 (run_otf): Ajusted for the type change of otf_cmd.
1268 (run_command): Ajusted for the type change of otf_cmd. On
1269 debugging, print ctx->combining_code.
1270 (mfont__flt_run): Initialize ctx's members code_offset,
1271 combining_code, and left_padding to 0.
1273 * face.h (struct MRealizedFace): New member font.
1274 (mface__realize): Prototype adjusted.
1276 * face.c (find_realized_face): New arg font.
1277 (find_realized_face): Adjusted for the change of MFont.
1278 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1279 (mface__fini): Don't call mdebug__report_object.
1280 (mface__realize): New arg font.
1281 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1282 Optimize the latin case.
1283 (mface__free_realized): Free rface->font.
1284 (mface__update_frame_face): Adjusted for the change of mface__realize.
1285 (mface_equal): New function.
1287 * draw.c (Mcommon): New variable.
1288 (visual_order): Args to mfont__encode_char changed.
1289 (compose_glyph_string): Handle Mfont text property.
1290 (layout_glyphs): Adjusted for the change of MFont.
1291 (mdraw__init): Initialize Mcommon.
1292 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1294 * font.h (enum MFontType): Members completely changed.
1295 (enum MFontProperty): Move MFONT_SIZE to the tail.
1296 (enum MFontSource): New enum.
1297 (struct MFont): New members type, source, sizes, file, capability,
1299 (struct MRealizedFont): Type of member font changed. Members
1300 score, status, and encoding deleted.
1301 (MFontScore): New type.
1302 (MFontList): Member changed.
1303 (struct MFontDriver): New member has_char. Types of members
1305 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1306 (Mapple_roman): Extern them.
1307 (OTF_Tag): Typedefed if not HAVE_OTF.
1308 (enum MFontOpenTypeTable): New enum.
1309 (MFontCapability): New type.
1310 (mfont__ft_drive_otf): Prototype adjusted.
1311 (mfont__score): Extern deleted.
1312 (mfont__merge): Extern it.
1313 (mfont__has_char): Extern it.
1314 (mfont__encode_char): Prototype adjusted.
1315 (mfont__open): Extern it.
1316 (mfont__set_spec): Prototype adjusted.
1317 (mfont__get_capability): Extern it.
1319 * font.c: Include "fontset.h".
1320 (M_font_capability, M_font_list, M_font_list_len): New variables.
1321 (font_score_priority): Change order of initial elements.
1322 (font_score_shift_bits): Fix array size.
1323 (common_weight): Add "thin", "semibold", and "heavy".
1324 (common_stretch): Add "ultracondensed", "extracondensed",
1325 "extraexpanded", and "utltraexpand".
1326 (font_weight_regular, font_weight_normal, font_weight_medium): New
1328 (gen_font_name): This function deleted.
1329 (find_encoding): Set font->encoding.
1330 (OTF_tag): New function.
1331 (otf_script_list): New variable.
1332 (load_otf_script_list): New function.
1333 (find_script_from_otf_tag): New function.
1334 (xlfd_parse_name): Set font->type and font->source.
1335 (mfont__free_realized): Free chains rfonts.
1336 (font_score): Renamed from mfont__score.
1337 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1338 (Mapple_roman): New variables.
1339 (mfont__init): Initilize new variables. Initalize
1340 default_encoding.encoding_name and
1341 default_encoding.encoding_charset to Municode_full and
1342 mcharset__unicode. Use SAFE* macros for allocating filepath
1344 (mfont__fini): Free otf_script_list.
1345 (mfont__id): New function.
1346 (mfont__match_p): Check also capability member of MFont.
1347 (mfont__merge): New funciton.
1348 (mfont__set_spec_from_face): Set type and source members.
1349 (mfont__set_spec_from_plist): Set capability and type members.
1350 (mfont__select): Argument changed.
1351 (mfont__available): New function.
1352 (compare_font_score): New function.
1353 (mfont__list): New function.
1354 (mfont__open): Return a realized font.
1355 (mfont__resize): Adjusted for the change of MFont.
1356 (mfont__has_char): New function.
1357 (mfont__encode_char): Argument changed.
1358 (mfont__set_spec): Argument changed.
1359 (free_font_capability): New function.
1360 (mfont__get_capability): New function.
1361 (MFontfile): New variable.
1362 (mfont_get_prop): Adjusted for the change of MFont.
1363 (mfont_put_prop): Likewise.
1364 (mfont_set_selection_priority): Fix the way of setting
1365 font_score_priority[].
1366 (mfont_find): Use mfont__list instead of mfont__select.
1367 (mfont_resize_ratio): Adjusted for the change of MFont.
1368 (mfont_list): Use mfont__list.
1369 (mfont_check): New function.
1370 (font_score): Make it static.
1372 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1373 (mfont__lookup_fontset): Likewise.
1375 * fontset.c (struct MFontset): Delete member font_spec_list.
1376 (struct MRealizedFontset): Type of member spec changed. New
1378 (load_font_group): Arg spec_list deleted.
1379 (load_fontset_contents): Adjusted for the change of fontset_def.
1380 (free_fontset): Fix the way of freeing fontset elements.
1381 (realize_fontset_elements): Argument changed.
1382 (get_per_script): New function.
1383 (free_realized_fontset_elements): Fix the way of feeing rfontset
1385 (update_fontset_elements): Fix args to realize_fontset_elements.
1386 (mfont__realize_fontset): New arg spec.
1387 (try_font_list): New function.
1388 (try_font_group): New arg request. Use try_font_list.
1389 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1391 (mfontset): Adjusted for the change of MFontset.
1392 (mfontset_copy): Likewise. Don't share plists.
1393 (mfontset_modify_entry): Adjusted for the change of MFontset.
1394 (mfontset_lookup): Call get_per_script.
1395 (mdebug_dump_fontset): Print also the address of fonts.
1397 * input.c (shift_state): Don't reset ic_info->vars.
1398 (take_action_list): Call MDEBUG_PRINT fore calling
1401 * internal-gui.h (MFontDriver): Don't typedef it here.
1403 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1404 (MXFont): This type deleted.
1406 (struct _MFontX): New struct.
1407 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1408 (MDisplayInfo): Member base_font_list deleted.
1409 (DEFAULT_FONT): Definition changed.
1410 (FALLBACK_FONT): This maclr deleted.
1411 (free_display_info): Adjusted for the change of MDisplayInfo.
1412 (free_device): Argument to mfont__free_realized changed.
1413 (xfont_driver): Adjusted for the change of MFontDriver.
1414 (xfont_registry_list): Use MFontX instead of MXFont.
1415 (MRealizedFontX): Renamed from MXFontInfo.
1416 (xfont_select): Return the font found first.
1417 (close_xfont): Change MXFontInfo to MRealizedFontX.
1418 (xfont_open): Return the realized font.
1419 (xfont_find_metric): Get xfont from rfont->fontp.
1420 (xfont_has_char): New function.
1421 (xfont_encode_char): Adjusted for the argument change.
1422 (xfont_render): Get xfont from rfont->fontp.
1423 (xfont_list): Adjusted for the argument change.
1424 (MRealizedFontXft): Renamed from MXftFontInfo.
1425 (xft_driver): Ajusted for the change of MFontDriver.
1426 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1427 (xft_open_font): Argument changed.
1428 (xft_open): Argument changed. Return the realized font.
1429 (xft_find_metric): Get xft_font from rfont->fontp.
1430 (xft_has_char, xft_encode_char): New functions.
1431 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1432 font if not yet opened.
1433 (device_open): Don't set frame->font.
1435 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1437 (gd_font_open): New function.
1438 (gd_render): Don't use the local variable ft_info.
1439 (device_init): Adjusted for the change of gd_font_driver.
1441 * textprop.c (mtext__prop_init): Initialize text_property_table.
1442 Call M17N_OBJECT_ADD_ARRAY.
1443 (mtext__prop_fini): Don't call mdebug__report_object.
1445 * plist.c (mplist__init): Initialize plist_table.
1446 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1447 (mplist__fini): Don't call mdebug__report_object.
1449 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1450 (mtext__fini): Don't call mdebug__report_object.
1451 (MTEXT_FORMAT_UTF_16): Correct type.
1452 (mtext_data): New function.
1453 (mtext_text): Fix calculation of limit and args to
1456 * language.c: Include "plist.h".
1457 (M_script_lang_list): New variable.
1458 (mlang__init): Read languages and their information from m17n
1460 (mlanguage__list): New function.
1461 (Miso639_1, Miso639_2): New variables.
1463 * language.h (mlanguage__list): Extern it.
1465 * database.c (get_database_stream): Use SAFE_* macros for
1466 allocating and freeing path.
1467 (mdatabase__init): Likewise.
1469 * symbol.c (msymbol__fini): Don't free symbols here.
1470 (msymbol__free_table): New function.
1471 (msymbol_is_managing_key): New function.
1473 * symbol.h (msymbol__free_table): Extern it.
1474 (msymbol__list): Extern it.
1476 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1478 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1479 (struct _M17NObjectArray): New member name and next.
1480 (mdebug__add_object_array): Extern it.
1481 (M17N_OBJECT_ADD_ARRAY): New macro.
1482 (mdebug__report_object): Don't extern it.
1484 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1486 * m17n-gui.c (free_frame): Don't free frame->font.
1487 (null_device_fini): Fix code for freeing
1488 null_device.realized_font_list.
1489 (m17n_fini_win): Free interface.
1490 (mframe): Cast the return value of dlsym. Set frame->font here.
1491 (mframe_get_prop): Check frame->rface->rfont before accessing the
1494 * m17n-gui.h (Mfontfile): Extern it.
1495 (mfont_check): Extern it.
1496 (mface_equal): Extern it.
1498 * m17n-core.c: Include "symbol.h".
1499 (report_header_printed): This variable deleted.
1500 (object_array_root): New variable.
1501 (report_object_array): New function.
1502 (mdebug__report_object): This function deleted.
1503 (mdebug__add_object_array): New function.
1504 (m17n_init_core): Call mchartable_init () before mtext_init ().
1505 (m17n_fini_core): Call report_object_array (if necessary) and
1506 msymbol__free_atable at the end.
1508 * m17n-core.h (msymbol_is_managing_key): Extern it.
1509 (mtext_data): Extern it.
1510 (MTEXT_FORMAT_UTF_16): Correct type.
1511 (M17NLIB_MINOR_VERSION): Changed to 3.
1512 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1514 * chartab.c (mchartable__init): Initalize chartable_table.count.
1515 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1516 mdebug__report_object.
1518 2005-05-26 Kenichi Handa <handa@m17n.org>
1520 * m17n.h (Miso639_1, Miso639_2): Extern them.
1522 * symbol.h (msymbol__list): Extern it.
1524 * symbol.c (msymbol__list): New function.
1526 2005-05-19 Kenichi Handa <handa@m17n.org>
1528 * input-gui.c (minput__win_init): Don't change the value of
1531 2005-05-16 Kenichi Handa <handa@m17n.org>
1533 * m17n-core.c (m17n_object): Be sure to initialize all members.
1535 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1537 2005-05-09 Kenichi Handa <handa@m17n.org>
1539 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1541 2005-04-27 Kenichi Handa <handa@m17n.org>
1543 * language.c (mlang__init): Add "an" (Aragonese).
1545 * word-thai.c: Add support for libthai.
1546 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1547 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1549 * mtext.c: Include "word-thai.h" conditionaly.
1550 (mtext__init): Call mtext__word_thai_init conditionaly.
1551 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1553 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1554 not WORDCUT_LD_FLAGS.
1556 2005-04-19 Kenichi Handa <handa@m17n.org>
1558 * word-thai.c (wordseg_propertize): Always unref the attached
1560 (thai_wordseg): Don't unref the property.
1562 2005-04-18 Kenichi Handa <handa@m17n.org>
1564 * word-thai.c: Include stdlib.h.
1565 (wordseg_propertize): Add dummy function for the case that wordcut
1566 library doesn't exist.
1567 (wordseg_propertize): Fix for old wordcut library.
1569 2005-04-16 Kenichi Handa <handa@m17n.org>
1571 * word-thai.c: Include <stdio.h>.
1573 2005-04-15 Kenichi Handa <handa@m17n.org>
1575 * draw.c: Include mtext.h.
1576 (linebreak_table, M_break_at_space, M_break_at_word)
1577 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1578 (compose_glyph_string): Check POS before getting Mface text
1580 (truncate_gstring): Give correct TO arg to line_break function.
1581 (GET_LB_TYPE): New macro.
1582 (find_break_backward, find_break_forward): New functions.
1583 (mdraw__init): Initialize the above new variables.
1584 (mdraw__fini): Free linebreak_table.
1585 (mdraw_default_line_break): Use find_break_backward and
1588 * word-thai.c: New file.
1590 * word-thai.h: New file.
1592 * mtext.c: Include word-thai.h.
1593 (wordseg_func_table): New variable.
1594 (mtext__init): Initialize wordseg_func_table and call
1595 mtext__word_thai_init.
1596 (mtext__fini): Call mtext__word_thai_fini, free
1598 (MTextWordsegFunc): New type.
1599 (mtext__word_segment): New function.
1601 * mtext.h (wordseg_func_table): Extern it.
1602 (mtext__word_segment): Extern it.
1604 * m17n.c (m17n_init): Fix typo (== -> =).
1606 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1607 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1609 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1610 (MTEXTPROP_VAL): New macros.
1612 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1614 2005-04-07 Kenichi Handa <handa@m17n.org>
1616 * database.c (load_chartable): Fix pursing of symbol name.
1618 2005-03-24 Kenichi Handa <handa@m17n.org>
1620 * m17n.c (m17n_init): Fix typo (== -> =).
1622 2005-03-11 Kenichi Handa <handa@m17n.org>
1624 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1626 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1628 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1631 2005-03-09 handa <handa@m17n.org>
1633 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1634 calling m17n_init ().
1636 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1637 calling m17n_init_core ().
1639 2005-02-28 Kenichi Handa <handa@m17n.org>
1641 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1644 2005-02-17 Kenichi Handa <handa@m17n.org>
1646 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1647 (M_description, M_command, M_variable): New variables.
1648 (load_im_info_keys): New variables.
1649 (load_im_info, check_command_keyseq, get_description_advance)
1650 (parse_command_list, get_command_list, parse_variable_list)
1651 (get_variable_list, input_method_hook): New functions.
1652 (command_list, variable_list): New variables.
1653 (minput__init): Put input_method_hook to Minput_method.
1654 Initialize M_description, M_command, M_variable, Mdetail_text,
1655 load_im_info_keys, command_list, variable_list.
1656 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1657 (Mdetail_text): New variable.
1658 (minput_get_description, minput_get_commands)
1659 (minput_assign_command_keys, minput_get_variables)
1660 (minput_set_variable): New functions.
1662 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1663 (minput_assign_command_keys, minput_get_variables)
1664 (minput_set_variable): Extern them.
1666 * plist.c (UNGETC): Just decrement st->p.
1667 (read_mtext_element): New arg skip.
1668 (read_integer_element): Likewise.
1669 (read_symbol_element): Likewise.
1670 (read_element): New arg KEYS.
1671 (mplist__from_plist): Don't increment ref-count of NULL object.
1672 (mplist__from_file): New arg KEYS.
1673 (mplist_put): Don't increment ref-count of NULL object.
1674 (mplist_add): Likewise.
1675 (mplist_push): Likewise.
1676 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1678 * plist.h (mplist__from_file): Prototype adjusted.
1680 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1681 (get_database_stream): New function.
1682 (load_database): Use get_database_stream.
1683 (M_database_hook): New variable
1684 (mdatabase__init): Initialize M_database_hook.
1685 (mdatabase__load_for_keys): New function.
1686 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1688 (mdatabase_define): Free mdb->extra_info if necessary.
1690 * database.h (mdatabase__dir_list, M_database_hook)
1691 (mdatabase__load_for_keys): Extern them.
1692 (MDatabaseHookFunc): New type.
1694 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1696 2004-12-27 Kenichi Handa <handa@m17n.org>
1698 * Version 1.2.0 released.
1700 2004-12-27 Kenichi Handa <handa@m17n.org>
1702 * input.c (minput_filter): Don't reset ic->xxx_changed.
1704 * mtext.c (mtext_from_data): Fix documentation.
1706 2004-12-25 Kenichi Handa <handa@m17n.org>
1708 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1709 (M17NLIB_VERSION_NAME): Update to "1.2.".
1711 2004-12-24 Kenichi Handa <handa@m17n.org>
1713 * input.c (reset_ic): Set key_unhandled to 0.
1715 2004-12-21 Kenichi Handa <handa@m17n.org>
1717 * m17n-gui.h (mfont_from_spec): Delete extern.
1719 * input-gui.c (win_callback): Handle Minput_reset.
1720 (minput__win_init): Register reset_ic as a callback for
1723 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1724 changed. At first, shift to the initial state.
1725 (minput__init): Initialize Minput_reset. Register reset_ic as a
1726 callback for Minput_reset.
1727 (Minput_reset): New variable.
1728 (minput_filter): Always set ic->xxx_changed to 0.
1729 (minput_reset_ic): New function.
1730 (integer_value): Fix typo ('>' -> '<') and calculation of length
1733 * m17n-core.c (merror_code): Change type to `int'.
1735 * m17n-misc.h (merror_code): Adjust type.
1737 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1739 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1740 (mtext_change_prop): Delete extern.
1742 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1743 to `int'. Move the documents to m17n-core.h.
1745 2004-12-13 Kenichi Handa <handa@m17n.org>
1747 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1748 (MTextProperty): Document it.
1750 2004-12-09 Kenichi Handa <handa@m17n.org>
1752 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1754 2004-12-03 Kenichi Handa <handa@m17n.org>
1756 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1757 m17n__gui_initialized): New externs.
1759 * m17n-core.h (enum M17NStatus): New enum.
1760 (m17n_status): Extern it.
1762 * m17n-core.c (core_initialized): Delete this variable.
1763 (m17n__core_initialized, m17n__shell_initialized,
1764 m17n__gui_initialized): New variables.
1765 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1766 instead of core_initialized.
1767 (m17n_status): New function.
1769 * m17n.c (shell_initialized): Delete this variable.
1770 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1773 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1775 * m17n-gui.c (win_initialized): Delete this variable.
1776 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1777 instead of gui_initialized.
1779 2004-11-19 Kenichi Handa <handa@m17n.org>
1781 * input.c (reset_ic): Check if ic_info->state is NULL.
1782 (filter): If ic_info->state is NULL, return 0.
1783 (load_input_method): Don't unref `maps' it it's not created.
1785 2004-11-15 Kenichi Handa <handa@m17n.org>
1787 * input.c (find_candidates_group): If INDEX is -1, find the last
1789 (take_action_list): If the previous of the first candidate is
1790 requested, select the last candidate.
1792 2004-11-08 Kenichi Handa <handa@m17n.org>
1794 * m17n-X.c (device_open): Try at most 32 fonts to find a
1795 non-autoscaled font.
1797 * font.c (xlfd_parse_name): Fix previous change.
1799 2004-11-05 Kenichi Handa <handa@m17n.org>
1801 * font.c: (commont_style): Include dummy elements "slanted" and
1802 "rslanted" to prefer "o" to "r" if "i" is requested.
1804 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1806 2004-10-29 Kenichi Handa <handa@m17n.org>
1808 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1810 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1811 New members smallest and larger.
1812 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1813 (xfont_registry_list): Likewise.
1814 (xfont_select): Likewise.
1817 2004-10-28 Kenichi Handa <handa@m17n.org>
1819 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1820 font name comparison.
1821 (xfont_select): Fix logic for selecting a larger size font.
1823 2004-10-25 Kenichi Handa <handa@m17n.org>
1825 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1828 2004-10-22 Kenichi Handa <handa@m17n.org>
1830 * input.c (update_candidate): Renamed from udpate_candidate.
1831 (take_action_list): Show more debugging info on arithmetic commands.
1833 * m17n-X.c (device_open): Fix previous change.
1835 * draw.c (compose_glyph_string): Don't get face property at the
1838 2004-10-21 Kenichi Handa <handa@m17n.org>
1840 * draw.c (compose_glyph_string): Fix for the case of category
1843 2004-10-19 Kenichi Handa <handa@m17n.org>
1845 * input.c (mdebug_mask): New variable.
1846 (shift_state): Print debug information.
1847 (take_action_list): Likewise.
1848 (handle_key): Likewise.
1850 2004-10-14 Kenichi Handa <handa@m17n.org>
1852 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1854 2004-10-13 Kenichi Handa <handa@m17n.org>
1856 * m17n-X.c (device_open): Be sure to register at least one font
1859 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1860 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1862 2004-10-12 Kenichi Handa <handa@m17n.org>
1864 * draw.c (alloc_gstring): Fix previous change.
1866 * font-ft.c (ft_list_generic): Fix for the case of not
1869 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1871 * font.c (mfont_list): If no font is found, return NULL.
1872 (load_font_encoding_table): Put entries of nil registry first.
1873 (find_encoding): Adjust for the above change.
1875 2004-10-11 Kenichi Handa <handa@m17n.org>
1877 * m17n-gui.h (mfont_list): Adjust prototype.
1879 * m17n-X.c (xfont_list): New arg maxnum.
1881 * font.h (struct MFontDriver): Change prototype of <list>.
1883 * font-ft.c (fc_generic_family_list): Delete it.
1884 (Mserif, Msans_serif, Mmonospace): Delete them.
1885 (M_generic_family_info): New variable.
1886 (enum GenericFamilyType): New enum.
1887 (struct GenericFamilyInfo): New struct.
1888 (generic_family_table): New variable.
1889 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1891 (add_font_info): Get style here.
1892 (ft_list_family): Don't initialize fc_config here. Don't list
1894 (ft_list_generic): New function.
1895 (ft_select): Pay attention to generic familes here.
1896 (ft_open): Fix calculation of ascent and descent.
1897 (ft_list): Pay attention to generic families.
1898 (mfont__ft_init): Initialize M_generic_family_info,
1899 generic_family_table, and fc_config..
1900 (mfont__ft_fini): Finalize generic_family_table.
1902 * draw.c (compose_glyph_string): Use more constant font for
1903 glyphs. Adjust for the member change in MGlyph.
1904 (layout_glyph_string): Adjust for the member change in MGlyph.
1905 (alloc_gstring): Intilize scracth_glyph to avoid
1906 compose_glyph_string on it.
1907 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1908 (mdraw_coordinates_position): Fix previous change.
1910 * internal-gui.h (glyph_category): New enum.
1911 (MGlyph): Change type of <category> to enum glyph_category.
1913 * face.c (mface__realize): Delete args langauge and charset.
1914 (mface__for_chars): Fix for the case that glyphs have different
1916 (mface__update_frame_face): Adjust for mface__realize change.
1918 * face.h (mface__realize): Adjust prototype.
1920 2004-10-05 Kenichi Handa <handa@m17n.org>
1922 * language.c (mlang__init): Add Akan.
1924 2004-10-04 Kenichi Handa <handa@m17n.org>
1926 * font-ft.c (add_font_info): Add instead of push the element.
1927 (ft_list_family): For generic fonts, try all
1928 substituted. families.
1930 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1931 (run_rule): Don't update cluster range here.
1932 (run_command): Update cluster range on appending a glyph.
1933 (run_otf): Update cluster range for glyphs generated by OTF.
1935 2004-10-02 Kenichi Handa <handa@m17n.org>
1937 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1939 2004-09-30 Kenichi Handa <handa@m17n.org>
1941 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1943 2004-09-30 Kenichi Handa <handa@m17n.org>
1945 * font.h: Include <fontconfig/fontconfig.h>.
1946 (MFTInfo): New member langset.
1947 (mfont__encoding_list): Extern it.
1949 * font.c (mfont__encoding_list): New function.
1950 (mdebug_dump_font_list): New function.
1952 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1953 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1955 (ft_family_list): New variable.
1956 (set_font_info): New arg basep. Callers changed.
1957 (fc_list): Check the return value of FcPatternGetString.
1958 (add_font_info): New arg plist. Callers changed. Update
1960 (ft_list_family): New function (merged fc_list and ft_list_all).
1961 (ft_select): Use ft_list_family.
1962 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
1964 (mfont__ft_init): Initialize above new variables.
1965 (mfont__ft_fini): Free ft_family_list.
1966 (STRDUP_LOWER): New macro.
1967 (set_font_info): Use STRDUP_LOWER.
1968 (ft_list_family): Avoid duplicate addition of font path. Use
1970 (fc_decode_prop): Fix typo.
1972 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1973 (xfont_registry_list): Change argument disp_info to frame.
1975 (xfont_list_all): New function.
1976 (xfont_list): If FONT is not NULL, check all fonts.
1978 2004-09-28 Kenichi Handa <handa@m17n.org>
1980 * m17n-X.c (MXFont, MXFontList): New types.
1981 (MDisplayInfo): Delete members font_registry_list,
1982 iso8859_1_family_list, iso10646_1_family_list, new members
1983 font_list, base_font_list.
1984 (free_display_info): Adusted for the change of MDisplayInfo.
1985 (xfont_driver): Initialize with xfont_list.
1986 (font_compare): New function.
1987 (build_font_list): Deleted.
1988 (xfont_registry_list): New function.
1989 (xfont_select): Use xfont_registry_list.
1990 (xfont_list): New function.
1991 (device_open): Adusted for the change of MDisplayInfo.
1993 * font-ft.c (add_font_info): New arg languages. Callers changed.
1994 (fc_list): Get languages from fonts..
1995 (ft_list_all): Renamed from ft_list. Callers changed.
1996 (ft_list): New function.
1997 (mfont__ft_driver): Initalize with ft_list.
1999 * font.c (mfont_list): New function.
2001 * font.h (struct MFontDriver): New member `list'.
2002 (MFTInfo): New member languages.
2004 * m17n-gui.h (mfont_list): Extern it.
2006 2004-09-27 Kenichi Handa <handa@m17n.org>
2008 * internal-gui.h (struct MGlyphString): Delete members mt,
2009 sub_width, sub_lbrearing, sub_rbearing, and region.
2011 * draw.c (MSubTextExtents): New type.
2012 (layout_glyphs): New arg extents. Set its members.
2013 (layout_glyph_string): Adjusted for the above change.
2014 (alloc_gstring): Don't set gstring->mt.
2015 (truncate_gstring): Call line_break function with mt instead of
2018 2004-09-22 Kenichi Handa <handa@m17n.org>
2020 * mtext.c (count_utf_16_chars): Count each code of invalid
2023 2004-09-19 Kenichi Handa <handa@m17n.org>
2025 * mtext.c (default_utf_16, default_utf_32): Rename them to
2026 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2029 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2032 2004-09-13 Kenichi Handa <handa@m17n.org>
2034 * draw.c (Mlatin): Don't declare it here.
2035 (visual_order): Fix reordering of combining characters.
2036 (compose_glyph_string): Fix detection of script.
2037 (layout_glyphs): Don't fix reordering of combining characters
2039 (layout_glyph_string): Pay attention to
2040 control->disable_overlapping_adjustment.
2041 (truncate_gstring): Include at least on character in a line.
2042 (get_gstring): Always scan one full line.
2043 (mdraw__init): Don't initialize Mlatin here.
2044 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2045 have a font, use ascent/descent of an ASCII font. Allow
2046 ink_array_return and logical_array_return to be NULL.
2047 (mdraw_coordinates_position): Fix iteration.
2049 * font-ft.c (MFTtoProp): Member completely changed.
2050 (ft_to_prop): Adjusted for the above change.
2051 (ft_to_prop_size): Likewise.
2052 (set_font_info): Adjusted for the change of MFTtoProp.
2053 (fc_generic_family_list): New variable.
2054 (fc_list): Add special handling of generic font names.
2055 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2056 Initialize fc_generic_family_list.
2057 (mfont__ft_fini): Don't free ft_to_prop. Free
2058 fc_generic_family_list.
2059 (FC_vs_M17N_font_prop): New type.
2060 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2061 (fc_decode_prop, fc_encode_prop): New functions.
2062 (mfont__ft_parse_name): Use fc_decode_prop.
2063 (mfont__ft_unparse_name): Use fc_encode_prop.
2065 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2066 (MWDevice): Add member realized_font_list.
2067 (free_display_info): Don't free disp_info->realized_font_list.
2068 (free_device): Free device->realized_fontset_list.
2069 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2070 (device_open): Don't initialize disp_info->realized_font_list.
2071 (device_open): Initialize device->realized_font_list and set it to
2072 frame->realized_font_list.
2074 * fontset.c (try_font_group): New function.
2075 (mfont__lookup_fontset): Use try_font_group.
2077 * font.c (common_weight): Change the order of "regular".
2079 * face.c (Mlatin): Don't make it static.
2080 (mface__realize): Be sure to set work_gstring.frame.
2081 (mface__for_chars): Likewise.
2083 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2086 * internal-gui.h (Mlatin): Extern it.
2088 * m17n-gui.h (MDrawControl): New member
2089 disable_overlapping_adjustment.
2091 2004-09-06 Kenichi Handa <handa@m17n.org>
2093 * font-flt.c (run_otf): Fix typo ('}'->']').
2095 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2096 (COMBINING_PRECOMPUTED_P): New macros.
2098 * draw.c (layout_glyphs): Handle precomputed combining code.
2100 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2101 precomupted combining code.
2103 2004-09-03 Kenichi Handa <handa@m17n.org>
2105 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2108 2004-08-27 Kenichi Handa <handa@m17n.org>
2110 * face.c (mface_put_prop): If the new value is the same as the
2111 current one, don't increment frame->tick.
2113 2004-08-25 Kenichi Handa <handa@m17n.org>
2115 * fontset.c (mfontset): Initialize font_spec_list member.
2116 (mfontset_copy): Load fontset if necessary.
2118 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2119 'metrics' to for C++.
2121 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2124 2004-08-16 Kenichi Handa <handa@m17n.org>
2126 * Version 1.1.0 released.
2128 2004-08-13 Kenichi Handa <handa@m17n.org>
2130 * language.c (mlang__init): Add Dhivehi.
2132 * m17n-gui.c (Mx, Mfreetype): Delete it.
2133 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2135 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2136 (mfont_resize_ratio): Extern it.
2137 (MDrawGlyphInfo): New member logical_width;
2138 (MDrawGlyph): New type.
2139 (mdraw_glyph_list): Prototype adjusted.
2141 * m17n-X.c (xfont_open): Set type and fontp members.
2142 (xft_open): Likewise.
2144 * internal-gui.h (Mx, Mfreetype): Delete extern.
2146 * font.h (struct MRealizedFont): New member type and fontp.
2148 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2149 (Mx, Mfreetype): Declare here.
2150 (Mxft): New variable.
2151 (mfont_resize_ratio): New function.
2153 * font-ft.c (ft_open): Set type and fontp members.
2155 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2158 2004-08-11 Kenichi Handa <handa@m17n.org>
2160 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2163 2004-08-06 Kenichi Handa <handa@m17n.org>
2165 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2168 * font-flt.c (run_otf): Print debugging information if necessary.
2170 2004-08-05 Kenichi Handa <handa@m17n.org>
2172 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2173 positioning_type 5 and 6. Switch simplified.
2175 2004-08-04 Kenichi Handa <handa@m17n.org>
2177 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2179 2004-08-02 Kenichi Handa <handa@m17n.org>
2181 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2182 set val to 1 even if it is greater than 1.
2184 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2186 2004-07-29 Kenichi Handa <handa@m17n.org>
2188 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2189 debugging information.
2191 * internal.h (MDEBUG_PRINT5): New macro.
2193 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2194 the previous one if the zero width glyph has left or right
2197 2004-07-26 Kenichi Handa <handa@m17n.org>
2199 * m17n-X.c (xft_render): Pay attention to members left_padding and
2200 right_padding of MGlyph.
2202 * draw.c (visual_order): Allocate one more elements for arrays as
2203 a workaround of fribidi bug.
2204 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2205 instead of MGlyph->bidi_sensitive.
2206 (layout_glyph_string): Pay attentinon to
2207 control->orientation_reversed when padding at the head or tail.
2208 Fix adjustment of space glyph width.
2209 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2212 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2213 instead of MGlyph->bidi_sensitive.
2215 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2217 2004-07-26 Kenichi Handa <handa@m17n.org>
2219 * draw.c (visual_order): Don't treat combined glyphs specially.
2220 (layout_glyphs): Don't get metrics glyphs that are already ready.
2221 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2222 width with the previous one.
2223 (draw_background): Fix bar cursor position on a r2l glyph.
2225 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2226 (run_rule): Fix place of updating cluster_begin_pos and
2227 cluster_end_pos here.
2228 (run_otf): Don't set left_padding.
2230 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2232 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2233 Fix handling of GPOS.
2234 (mfont__ft_drive_gpos): Delete this function.
2236 * font.h (mfont__ft_drive_otf): Renamed back from
2237 mfont__ft_drive_gsub.
2238 (mfont__ft_drive_gpos): Delete extern.
2240 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2241 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2243 2004-07-23 Kenichi Handa <handa@m17n.org>
2245 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2246 the same bidi level.
2248 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2250 2004-07-22 Kenichi Handa <handa@m17n.org>
2252 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2254 2004-07-20 Kenichi Handa <handa@m17n.org>
2256 * draw.c (render_glyphs): Fix checking of g->code validity.
2258 * face.c (mface__realize): Set g.type.
2260 2004-07-18 Kenichi Handa <handa@m17n.org>
2262 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2265 * m17n-gui.c (mframe): Print error message give by dlopen to
2268 2004-07-16 Kenichi Handa <handa@m17n.org>
2270 * draw.c (compose_glyph_string): Improve the way of deciding a
2271 script. For a character that doesn't have script property, use
2272 the last non-latin script.
2274 * font-ft.c (fc_list): Cancel previous change.
2275 (mfont__ft_init): Add more entries in ft_to_prop_name.
2277 2004-07-15 Kenichi Handa <handa@m17n.org>
2279 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2280 previous or next character glyphs.
2282 2004-07-14 Kenichi Handa <handa@m17n.org>
2284 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2285 of type GLYPH_SPACE.
2287 * fontset.c (mfont__lookup_fontset): If glyph type is
2288 GLYPH_SPACE, get codes for SPACE.
2290 * internal-gui.h (Mfont): Delete extern.
2292 * m17n-gui.h (Mfont): Delete duplicated extern.
2294 2004-07-13 Kenichi Handa <handa@m17n.org>
2296 * font-ft.c (DEVICE_DELTA): New macro.
2297 (adjust_anchor): New function.
2298 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2300 (mfont__ft_drive_gpos): New function.
2302 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2303 (FontLayoutContext): Delete member `rfont'.
2304 (run_otf): Set g->otf_cmd. Call
2305 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2306 only whne HAVE_OTF is defined.
2308 * fontset.c: Include "config.h".
2310 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2311 (MGlyph): New member otf_cmd.
2313 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2314 (mfont__ft_drive_gpos): Extern it.
2316 * face.c: Include "config.h".
2318 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2320 * input-gui.c: Include "config.h".
2322 * plist.c: Include "config.h".
2324 2004-07-06 Kenichi Handa <handa@m17n.org>
2326 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2327 internal-gui.h: Cancel previous changes.
2329 * m17n-gd.h: Delete it.
2331 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2332 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2333 @XML2_LD_FLAGS@ to above.
2334 (libm17n_la_LIBADD): Add -ldl.
2335 (libm17n_la_LDFLAGS): Add -export-dynamic.
2336 (X_LD_FLAGS): Fix the order of linking.
2337 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2338 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2339 (libm17n_X_la_LDFLAGS): Add -module.
2340 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2341 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2342 (libm17n_gd_la_LDFLAGS): Add -module.
2343 (include_HEADERS): Delete m17n-gd.h.
2345 2004-06-30 Kenichi Handa <handa@m17n.org>
2347 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2348 (MDeviceLibraryInterface): Delete it.
2349 (register_device_library): Delete it.
2350 (m17n__device_library_list): Renamed from device_library_list.
2352 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2353 (m17n_init_win): Adjust prototype.
2355 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2356 (m17n_init_gd): New function.
2358 * m17n-gd.h: New file.
2360 * m17n-X.h: Include <m17n-gui.h>.
2361 (m17n_init_X): Extern it.
2362 (M17N_INIT): Redefine it.
2364 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2365 (m17n_init_X): New function.
2367 * internal-gui.h (m17n__device_library_list): Extern it.
2368 (struct MDeviceDriver): New members initialized, init, and fini.
2370 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2372 (libm17n_X_la_LIBADD): Delete aboves.
2373 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2374 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2375 (libm17n_gd_la_LDFLAGS): Delete it.
2376 (include_HEADERS): Add m17n-gd.h.
2378 2004-06-25 Kenichi Handa <handa@m17n.org>
2380 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2381 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2383 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2385 * font-ft.c (fc_list): If FcFontList finds no font, try
2388 * draw.c (compose_glyph_string): Terminate the last loop after
2389 doing default combining if necessary.
2391 2004-06-24 Kenichi Handa <handa@m17n.org>
2393 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2395 * character.c (mchar_define_property): Add const to an arg.
2397 * charset.c (mchar_define_charset): Add const to an arg.
2399 * coding.c (MCodingSystem): Add const to an arg or decoder.
2400 (finish_decoding): Add const to an arg.
2401 (decode_coding_charset, decode_coding_utf_8)
2402 (decode_coding_utf_16, decode_coding_utf_32)
2403 (decode_coding_iso_2022, decode_coding_sjis)
2404 (mconv_define_coding): Likewise.
2406 * m17n-X.c (xft_find_metric): Delete unused variable.
2408 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2411 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2414 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2415 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2417 * mtext.h (mtext__from_data): Ajust prototype.
2419 2004-06-23 Kenichi Handa <handa@m17n.org>
2421 * draw.c (compose_glyph_string): Always get glyph codes by
2423 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2424 (mdraw_glyph_list): New function.
2426 * font-flt.c (mfont__flt_run): Be sure to call
2427 rfont->driver->encode_char.
2429 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2430 (ft_encode_char): Delete arg C.
2431 (ft_render): Don't call FT_Get_Char_Index.
2433 * font.c (mfont__encodable_p): Delete it.
2434 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2436 * font.h (struct MFontDriver): Delete arg C of encode_char.
2437 (mfont__encodable_p): Delete extern.
2439 * m17n-X.c (xfont_encode_char): Delete arg C.
2440 (xft_find_metric): Don't cal FT_Get_Char_Index.
2441 (xft_render): Likewise.
2443 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2445 (mdraw_glyph_list): Extern it.
2447 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2449 2004-06-22 Kenichi Handa <handa@m17n.org>
2451 * m17n-gui.h (mfontset_lookup): Extern it.
2453 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2455 * fontset.c (realize_fontset_elements)
2456 (free_realized_fontset_elements, update_fontset_elements): New
2458 (mfont__realize_fontset): Call realize_fontset_elements.
2459 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2460 (mfont__lookup_fontset): If a fontset was modified, update
2461 the realized fontset.
2462 (mfontset_modify_entry): Increment fontset->tick.
2463 (mfontset_lookup): New function.
2465 2004-06-21 Kenichi Handa <handa@m17n.org>
2467 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2469 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2470 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2471 length of source text 0.
2473 2004-06-21 Kenichi Handa <handa@m17n.org>
2475 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2476 (compare): Pay attention to format other than utf-8.
2477 (copy): Delete this function.
2478 (count_by_utf_8, count_by_utf_16, insert): New functions.
2479 (count_utf_16_chars): Fix handling of a surrogate pair.
2480 (find_char_forward, find_char_backward): Likewise.
2481 (mtext__from_data): Delete unnecessary check. Fix number of
2483 (mtext_from_data): Don't count items.
2484 (mtext_ref_char): Optimize the code.
2485 (mtext_set_char): Pay attention to format other than utf-8.
2486 (mtext_cat_char): Likewise.
2487 (mtext_dup): Don't call copy, instead do allocation here.
2488 (mtext_cat): Call insert instead of copy.
2489 (mtext_ncat): Likewise.
2490 (mtext_cpy): Delete character at first and call insert instead of
2492 (mtext_ncpy): Likewise.
2493 (mtext_copy): Likewise.
2494 (mtext_duplicate): Call insert instead of copy.
2495 (mtext_del): Pay attention to format other than utf-8.
2496 (mtext_ins): Simply call insert.
2497 (mtext_ins_char): Pay attention to format other than utf-8.
2498 (mtext_tok): Call insert instead of copy.
2499 (mtext_text): Call UNIT_BYTES.
2501 * textprop.c (mtext__adjust_plist_for_change): New function.
2503 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2504 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2505 (CHAR_UNITS_AT): Fix typo.
2506 (CHAR_UNITS_BY_HEAD): Fix typo.
2507 (STRING_CHAR_AND_UNITS): Fix typo.
2509 * internal.h (MTEXT_READ_ONLY_P): New macro.
2511 * mtext.h (mtext__replace): Delete the extern.
2512 (mtext__adjust_foramt): Adjust prototype.
2514 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2515 if possible. Otherwise make a copy of mmt.
2517 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2520 2004-06-18 Kenichi Handa <handa@m17n.org>
2522 * character.h (CHAR_STRING_UTF16): Fix syntax.
2524 2004-06-16 Kenichi Handa <handa@m17n.org>
2526 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2527 (libm17n_X_la_LIBADD): Delete it.
2528 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2530 * m17n-X.c (device_open): Add parens in `if' condition.
2532 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2533 (DEC_POSITION): Likewise.
2534 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2536 2004-06-15 Kenichi Handa <handa@m17n.org>
2538 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2541 * draw.c (compose_glyph_string): If langauge is specified, call
2542 mface__for_chars even if a text is all latin. Fix condition for
2543 setting non_ascii_found.
2545 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2547 * m17n.h (minput_char_to_key): Delete extern.
2549 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2551 * m17n-gui.c (null_device_open): Set several members of frame.
2553 2004-06-14 Kenichi Handa <handa@m17n.org>
2555 * m17n-gui.h (minput_event_to_key): Delete extern.
2557 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2559 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2561 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2563 2004-06-08 Kenichi Handa <handa@m17n.org>
2565 * character.c (mchar_put_prop): Don't increment the ref-count of
2568 2004-06-04 Kenichi Handa <handa@m17n.org>
2570 * m17n-core.c (mdebug__register_object): New function.
2571 (mdebug__unregister_object): Likewise.
2573 * internal.h (mdebug__register_object, mdebug__unregister_object):
2575 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2578 * charset.c (mcharset__load_from_database): Don't call
2579 mconv__register_charset_coding here.
2581 * coding.c (find_coding): Get a real name from an element of
2582 coding_definition_list.
2583 (mconv__register_charset_coding): Set the real name at the top of
2585 (mcoding__load_from_database): Likewise.
2586 (mconv_list_codings): Adjusted for the above change.
2588 2004-06-03 Kenichi Handa <handa@m17n.org>
2590 * coding.c (find_coding): Find by canonicalized name. Don't have
2591 to modify the element of coding_definition_list by
2593 (mconv__define_coding_from_charset): Delete it.
2594 (mconv__register_charset_coding): Canonicalize sym.
2595 (mcoding__load_from_database): Register plist modified by
2598 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2600 * font-ft.c (ft_open): Fix setting of rfont->descent.
2602 2004-06-02 Kenichi Handa <handa@m17n.org>
2604 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2605 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2606 (xlfd_unparse_name): Renamed from xfont_build_name.
2607 (mfont__init): Initialized Mfontconfig.
2608 (mfont__free_realized): Unconditionally unref rfont->info.
2609 (mfont__select): Free `this' if it's not best.
2610 (mfont__open): Don't check frame->realized_font_list.
2611 (mfont__parse_name_into_font): New function.
2612 (Mfontconfig): New variable.
2613 (mfont_from_name): Call mfont_parse_name.
2614 (mfont_name): Call mfont_unparse_name.
2615 (mdebug_dump_font): Likewise.
2617 * font.h (struct MFontDriver): Delete members parse_name and
2619 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2620 (mfont__parse_name_into_font): Extern it.
2622 * font-ft.c: Include "symbol.h".
2623 (close_ft): Unconditionally free filename and charmap_list of
2625 (ft_open): Duplicate base->filename. Increment ref-count of
2626 ft_info->charmap_list. Free ft_info->charmap_list and
2627 ft_info->filename on error.
2628 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2630 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2632 (enum xlfd_field_idx): Moved to font.c.
2633 (split_font_name, build_font_name): Likewise.
2634 (build_font_list): Call mfont__parse_name_info_font.
2635 (xfont_open): Call mfont__unparse_name. Free name.
2636 (xfont_parse_name, xfont_build_name): Moved to font.c
2637 (xft_select): Prototype deleted.
2638 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2639 Call mfont_pase_name.
2641 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2642 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2645 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2648 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2650 2004-06-01 Kenichi Handa <handa@m17n.org>
2652 * fontset.c (mfontset_modify_entry): Pay attention to the case
2653 that fontset->font_spec_list is NULL.
2655 2004-05-31 Kenichi Handa <handa@m17n.org>
2657 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2659 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2661 * font.c (mfont__select): Print score the a font for debugging.
2663 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2665 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2666 kanji_sym and kana_sym.
2668 2004-05-28 Kenichi Handa <handa@m17n.org>
2670 * Makefile.am (VINFO): New variable.
2671 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2672 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2674 2004-05-27 Kenichi Handa <handa@m17n.org>
2676 The following chanages are to make device dependent functions
2677 accessible only from MDeviceDriver structure, and to add GD and
2678 null device drivers. Font drivers get also device dependent.
2680 * m17n.c (m17n_init): Increament shell_initialized.
2681 (m17n_fini): Decremented shell_initialized.
2683 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2685 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2686 (Mwidget, Mcolormap, Mx): Extern them.
2688 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2689 (free_frame): Call frame->driver->close instead of
2691 (DLOPEN_SHLIB_EXT): New macro.
2692 (MDeviceLibraryInterface): New type.
2693 (device_library_list): New variable.
2694 (register_device_library): New function.
2695 (null_device): New variable.
2696 (null_device_close, null_device_get_prop)
2697 (null_device_realize_face, null_device_free_realized_face): New
2699 (null_driver): New variable.
2700 (null_device_init, null_device_fini, null_device_open): New
2702 (null_interface): New variable.
2703 (Mfreetype, Mdevice): Declare them.
2704 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2705 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2706 Mwin__Close_Device. Register drivers for Mx and Mgd.
2707 (m17n_fini_win): Decremented win_initialized. Call "fini"
2708 function of all opened devices. Don't call mwin__fini.
2709 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2711 (mframe): Handle Mdevice key of PLIST.
2712 (mframe_get_prop): Call frame->device->get_prop instead of
2713 mwin__device_get_prop.
2715 * m17n-gd.c: New file.
2717 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2718 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2720 * m17n-core.c (m17n_init_core): Increate core_initialized.
2721 (m17n_fini_core): Decremented core_initialized.
2723 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2724 (Mcolormap): Don't extern them here.
2726 * m17n-X.c (FRAME_DEVICE): New macro.
2727 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2728 (free_display_info): Use MPLIST_DO.
2729 (free_device): Free rface->info.
2730 (xft_close): Delete it.
2731 (device_init): Renamed from mwin__init.
2732 (device_fini): Renamed from mwin__fini.
2733 (device_open): Renamed from mwin__open_device.
2734 (x_driver): New variable.
2735 (MXFontInfo): Delete member frame, add member display.
2736 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2737 Don't declare them here.
2739 * internal-gui.h (MDeviceType): New enum.
2740 (MWDefice): Delete it.
2741 (struct MFrame): Change type of device to void *. New members
2742 device_type, driver, font_driver_list.
2743 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2744 (MDeviceDriver): New type.
2745 (Mx, Mgd, Mfreetype): Extern them.
2746 (mwin__XXX): Delete all of them.
2748 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2750 (win_destroy_ic): Likewise.
2751 (adjust_window_and_draw): Likewise.
2752 (win_callback): Likewise.
2753 (Mxim): Declare it here.
2754 (minput_event_to_key): Call M_CHECK_READABLE.
2756 * fontset.c (mfont__lookup_fontset): Delete local variable
2759 * font.h (struct MFontDriver): Delete member close, add members
2760 parse_name and build_name.
2761 (mfont__driver_list): Delete extern.
2762 (mfont__close): Delete extern.
2764 * font.c (mfont__init): Don't set mfont__driver_list.
2765 (mfont__fini): Don't unref mfont__driver_list.
2766 (mfont__select): Try font drivers in frame->font_driver_list. Set
2767 driver member of a realized font.
2768 (mfont__close): Delete it.
2769 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2770 functions of the default frame.
2772 * font-ft.c (close_ft): Check ft_info->ft_face and work
2774 (add_font_info): Allocate ft_info by M17N_OBJECT.
2775 (ft_close): Delete it.
2776 (mfont__ft_driver): Don't set ft_close.
2777 (ft_select): Increment ref-count of best_font.
2778 (ft_open): Decremented ref-count of base. On error, call
2779 FT_Done_Face and free ft_info.
2780 (ft_find_metric): Always use XXX_MONO in load_flags.
2781 (ft_render): Fix setting of width. Call
2782 frame->driver->draw_points instead of mwin__draw_points.
2783 (ft_to_prop): Don't set mfont__driver_list.
2784 (mfont__ft_fini): Just unref ft_info.
2786 * face.c (mface__init): Exchange foreground and background of
2787 mface__default. Call mface_put_prop to set hline of
2789 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2790 (mface__free_realized): Don't call mwin__free_realized_face.
2792 * draw.c (Mdepth): Don't declare it here.
2793 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2794 (render_glyphs, render_glyph_string): Likewise.
2795 (mdraw__init): Don't set Mdepth.
2796 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2798 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2800 (mdraw_text_items): Check FRAME is writable.
2801 (mdraw_per_char_extents): Implement body.
2803 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2805 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2806 (GUI_SOURCES): Delete it.
2807 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2808 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2809 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2810 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2811 (linkgui_LDADD): Set to libm17n-gui.la
2812 (linkgui_LDFLAGS): New target.
2813 (SRC): Include ${libm17n_gui_la_SOURCES} and
2814 ${libm17n_gd_la_SOURCES}.
2816 2004-05-24 Kenichi Handa <handa@m17n.org>
2818 * draw.c (draw_background): Don't draw background even if
2819 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2821 2004-05-22 Kenichi Handa <handa@m17n.org>
2823 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2825 2004-05-20 Kenichi Handa <handa@m17n.org>
2827 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2829 * m17n-gui.c: Include "plist.h".
2830 (mframe): If PLIST is NULL, initialize it to emply plist.
2832 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2833 (xft_driver): New variable.
2834 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2835 (xft_find_metric, xft_render): New function.
2836 (mwin__init): Adjusted for the new mfont__driver_list.
2837 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2838 generated face to PARAM.
2839 (mwin__realize_face): Fix setting of box colors. Don't call hook
2841 (mwin__draw_hline): New function.
2842 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2843 (mwin__xft_render): Delete these function.
2845 * internal-gui.h (struct MFrame): New member tick.
2846 (struct MGlyphString): New member tick.
2847 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2848 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2849 (mwin__xft_render): Delete extern.
2851 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2852 (mfontset): Always increment the reference count of returned
2855 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2856 (MFTInfo): Moved to font.h.
2857 (ft_iso8859_1_font_list): Delete this variable.
2858 (set_font_info): Don't set font->property[MFONT_TYPE].
2859 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2860 (add_font_info): Change type to void.
2861 (fc_list): Change anme from xft_list. Caller changed. Include
2862 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2863 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2864 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2865 (close_ft): Don't call mwin__xft_close. Unref
2866 ft_info->extra_info.
2867 (ft_open): Don't setup ft_info->fontname. Don't call
2869 (ft_find_metric): Don't call mwin__xft_get_metric.
2870 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2871 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2872 (mfont__ft_init): Adjusted for new mfont__driver_list.
2873 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2875 * font.c (mfont__driver_list): Make it MPlist.
2876 (mfont__init): Adjust initialization of mfont__driver_list.
2877 (mfont__fini): Free mfont__driver_list.
2878 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2879 (mfont__select): Adjusted for the new mfont__driver_list.
2881 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2882 (mfont__drirver_list): Adjust prototype.
2883 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2885 * face.h (struct MFace): Delete member realized_face_list, add
2887 (struct MRealizedFace): Delete member need_update
2888 andnofont_rface, add member non_ascii_list.
2889 (mface__update_frame_face): Extern it.
2891 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2893 (get_hline_create, get_box_create): New functions.
2894 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2896 (free_face): Cancep previous change. Free face->frame_list.
2897 (serialize_hline): Do nothing if hline->width is zero.
2898 (serialize_box): Do nothing if box->width is zero.
2899 (mface__init): Setup all properties of mface__default.
2900 (mface__fini): Free hline_prop_list and box_prop_list.
2901 (mface__realize): Cancel previous change. Update
2902 face->frame_list. Setup rface->non_ascii_list.
2903 (mface__for_chars): Update rface->non_ascii_list.
2904 (mface__free_realized): Free rface->non_ascii_list.
2905 (mface__update_frame_face): New function.
2906 (mface): Initialize face->frame_list.
2907 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2909 (mface_merge): Likewise.
2910 (mface_put_prop): If key is Mhline or Mbox, get value by
2911 get_hline_create or get_box_create respectively.
2912 (mface_put_prop): Update frame->tick and call
2913 mface__update_frame_face if necessary.
2914 (mface_update): Do nothing if func is noop_hook.
2916 * draw.c (render_glyphs): If a font is not found, use
2917 mwin__draw_empty_boxes.
2918 (alloc_gstring): Initialize gstring->tick.
2919 (get_gstring): Check gstring->tick.
2921 2004-05-17 Kenichi Handa <handa@m17n.org>
2923 * face.c (find_realized_face): Return value changed. If RFONT is
2924 NULL, avoid unnecessary checking.
2925 (free_face): Free face->realized_face_list.
2926 (mface__realize): Adjusted for the change of find_realized_face.
2927 If it returns a realized face that needs update, free it and
2928 realize a new one. Push a new realized face to
2929 frame->realized_face_list instead of appending.
2930 (mface__for_chars): Adjusted for the change of find_realized_face.
2931 Short cut if the required font is in rface->ascii_rface.
2932 (mface_put_prop): Free old value if necessary. Set need_update
2933 member of realized faces to 1.
2935 * face.h (struct MFace): Delete member tick, add member
2937 (struct MRealizedFace): Delete member tick, add member
2940 2004-05-13 Kenichi Handa <handa@m17n.org>
2942 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2944 2004-05-12 Kenichi Handa <handa@m17n.org>
2946 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2948 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2949 parse it XftNameParse.
2951 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2952 (all_fonts_scaned): New variable.
2953 (set_font_info): FAMILY may be Mnil.
2954 (add_font_info): Argument changed.
2955 (xft_list): Call add_font_info in it.
2956 (ft_list): Likewise.
2957 (ft_select): Make it work in the case family is Mnil.
2958 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2959 (mfont__ft_fini): Set all_fonts_scaned to 0.
2961 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2962 that is failed to open.
2964 2004-05-10 Kenichi Handa <handa@m17n.org>
2966 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2967 device's depth is 1 (i.e. monochrome).
2969 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2970 to work around the problem of libtool.
2972 * font-ft.c: Include <freetype/ftbdf.h>.
2973 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2975 (mfont__ft_init): Initialize them.
2976 (ft_iso8859_1_font_list): New variable.
2977 (set_font_info): Detect a font containing iso8859-1 glyphs and
2978 register it in ft_iso8859_1_font_list. If the font is not
2979 scalable, assume it as BDF or PCF font and setup SIZE and RESY
2980 properties of the font from its properties.
2981 (add_font_list): If the font is not scalable, check if it is BDF
2982 or PCF font. If not, ignore it.
2983 (ft_select): If FAMILY is Mnil, return NULL only if the requested
2984 registry is not iso8859-1.
2985 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2986 ft_iso8859_1_font_list.
2987 (ft_find_metric): If the font is not scalable, assume it as BDF
2988 or PCF, and get a metric from its properties.
2989 (mfont__ft_fini): Free ft_iso8859_1_font_list.
2991 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
2993 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2994 (libm17n_la_LDFLAGS): Delete it.
2995 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2996 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2998 2004-05-06 Kenichi Handa <handa@m17n.org>
3000 * draw.c (compose_glyph_string): Fix previous change.
3002 2004-04-30 Kenichi Handa <handa@m17n.org>
3004 * font-ft.c (ft_list): Delete unused variable `result'.
3005 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3007 2004-04-27 Kenichi Handa <handa@m17n.org>
3009 * m17n-X.c: Include config.h
3010 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3011 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3012 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3013 (FRAME_CMAP, FRAME_VISUAL): New macros.
3014 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3015 (xfont_driver): Make it static.
3016 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3017 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3018 info->xft_color_back.
3019 (MXftFontInfo) [HAVE_XFT2]: New type.
3020 (mwin__xft_close) [HAVE_XFT2]: New function.
3021 (mwin__xft_open) [HAVE_XFT2]: New function.
3022 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3023 (mwin__xft_render) [HAVE_XFT2]: New function.
3025 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3026 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3027 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3030 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3032 * font-ft.c: Don't include FT_FREETYPE_H here.
3033 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3034 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3035 (MFTInfo): New member charmap_index.
3036 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3037 (check_otf_filename): Renamed from check_filename. Return value
3039 (ft_set_property): This function deleted.
3040 (set_font_info): New function.
3041 (add_font_list): Argument changed. Add multiple fonts.
3042 (xft_list) [HAVE_XFT2]: New function.
3043 (ft_list) [not HAVE_XFT2]: New function.
3044 (ft_select): Add code for Xft.
3045 (close_ft): Likewise.
3046 (ft_open): Likewise.
3047 (ft_find_metric): Likewise.
3048 (ft_encode_char): Likewise.
3049 (ft_render): Likewise.
3051 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3053 2004-04-26 Kenichi Handa <handa@m17n.org>
3055 * textprop.c (mtext_attach_property): Declare the return type as
3058 2004-04-21 Kenichi Handa <handa@m17n.org>
3060 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3062 2004-04-09 Kenichi Handa <handa@m17n.org>
3064 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3066 (load_command): Setup above members.
3068 2004-04-05 Kenichi Handa <handa@m17n.org>
3070 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3072 2004-03-30 Kenichi Handa <handa@m17n.org>
3074 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3077 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3078 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3080 2004-03-29 Kenichi Handa <handa@m17n.org>
3082 * Version 1.0 Patch Level 2 released.
3084 2004-03-29 Kenichi Handa <handa@m17n.org>
3086 * charset.c (make_charset): Set charset->fully_loaded and
3087 charset->simple correctly. Don't try to get charset->min_char and
3088 charset->max_char for a charset of method subset and superset.
3089 Don't load a mapping file here.
3090 (mcharset__init): Set unified_max.
3091 (mcharset__load_from_database): Free a working plist.
3093 * coding.c (mcoding__fini): Free all malloced data.
3095 * input-gui.c (win_create_ic): Set control.as_image for preediting
3098 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3099 `count') to initialize the array.
3101 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3104 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3106 (mwin__create_window): Fix bug of setting a background pixel of a
3108 (mwin__adjust_window): Clear the window before drawing.
3110 * m17n-core.c (mdebug__report_object): Free array->objectes if
3112 (m17n_init_core): Don't set report_header_printed to 0 here.
3113 Fix debugging information.
3114 (m17n_fini_core): Set report_header_printed to 0 here.
3116 * m17n-core.h (mplist_deserialize): Extern it.
3118 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3120 * m17n.c (m17n_fini): Fix debugging information.
3122 * mtext.c (mtext__adjust_foramt): New function.
3124 * mtext.h (mtext__adjust_foramt): Extern it.
3126 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3128 * plist.h (mplist__deserialize): Don't extern it.
3130 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3131 elements of symbol_table to NULL. Report about created and freed
3132 symbols if MDEBUG_FINI is set.
3134 2004-03-22 Kenichi Handa <handa@m17n.org>
3136 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3138 * m17n.c (m17n_init): Fix the way of checking merror_code.
3140 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3142 2004-03-22 Kenichi Handa <handa@m17n.org>
3144 * fontset.c (realize_font_group): Adjust the font size by
3145 mfont__resize before selecting a font.
3147 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3149 2004-03-19 Kenichi Handa <handa@m17n.org>
3151 * Version 1.0 Patch Level 1 released.
3153 2004-03-19 Kenichi Handa <handa@m17n.org>
3155 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3157 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3159 2004-03-19 Kenichi Handa <handa@m17n.org>
3161 Re-apply the changes forgotten in the released version.
3163 * charset.c (mcharset__load_from_database): Call
3164 mchar_define_charset.
3166 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3167 (mconv_encode_range): Put Mcoding text property.
3169 2004-03-18 Kenichi Handa <handa@m17n.org>
3171 * draw.c (Mdepth): New variable.
3172 (visual_order): Delete unused local var `pos'.
3173 (compose_glyph_string): Fix for the case that gstring->glyphs is
3174 realloced. Stop generating glyphs at TO. Fix handling of
3176 (layout_glyphs): Get metrics of all glyphs in advance. Set
3177 lbearing and rbearing of base of composition glyph correctly.
3178 Handle left-overhang glyphs correctly.
3179 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3181 (dump_combining_code): Change the defualt off_x character to ".".
3182 (mdraw__init): Initialize Mdepth.
3184 * face.c (work_gstring): New variable
3185 (mface__init): Initialize work_gstring.
3186 (mface__fini): Free work_gstring.glyphs.
3187 (mface__realize): Don't handle videomode property here. Adjusted
3188 for the change of mfont__get_metric.
3189 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3191 * face.h (enum face_gc): Moved to m17n-X.c.
3193 * font.h (struct MFontDriver): Arguments of find_metric changed.
3194 (mfont__select): Prototype adjusted.
3195 (mfont__get_metric): Likewise.
3196 (mfont__ft_drive_otf): Likewise.
3197 (mfont__flt_run): Likewise.
3199 * font.c (mfont__select): New argument layouter. If layouter is
3200 different in the registered font, make a new copy of realized
3202 (mfont__get_metric): Argument changed. Get metrics of multiple
3204 (mfont_find): Call mfont__select with layouter as Mnil.
3206 * font-flt.c (FontLayoutContext): New member rfont.
3207 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3208 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3210 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3212 (NUM_POINTS): New macro.
3213 (MPointTable): New type.
3214 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3215 (mfont__ft_drive_otf): New argument rfont.
3217 * fontset.c (realize_font_group): Adjusted for the changed of
3219 (check_fontset_element): This function deleted.
3221 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3222 off the parent window if the preedit text is zero length.
3224 * internal-gui.h (struct MFrame): New members foreground,
3225 background, videomode, font.
3226 (struct MGlyphString): New member anti_alias.
3227 (MDrawPoint): New type.
3228 (mwin__draw_bitmap): Prototype deleted.
3229 (mwin__draw_points): Prototype added.
3231 * m17n-gui.h (MDrawControl): New member anti_alias.
3233 * m17n-gui.c (free_frame): Free frame->font.
3234 (mframe): Set the fontset of frame->face to the default fontset.
3236 * m17n-X.c (RGB_GC): New type.
3237 (enum gc_index): Renamed from enum face_gc. Member names changed.
3239 (struct MWDevice): Members foreground and background deleted. New
3240 member scratch_gc, gc_list.
3241 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3242 (free_device): Free GCs in device->gc_list.
3243 (get_rgb_gc): New function.
3244 (get_gc): Renamed and argument changed from get_color.
3245 (get_gc_for_anti_alias): New function.
3246 (xfont_find_metric): Arguments changed. Get metrics of multiple
3248 (set_region): Argument changed. Caller changed.
3249 (xfont_render): Allways set a font in gc.
3250 (x_error_handler, x_io_error_handler): Define only if
3251 X_SET_ERROR_HANDLER is defined.
3252 (mwin__open_device): Create device->scratch_gc. Set members
3253 foreground, background, and videomode of frame. Call
3254 XSetErrorHandler and XSetIOErrorHandler only if
3255 X_SET_ERROR_HANDLER is defined.
3256 (struct gc_list): Deleted.
3257 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3258 (mwin__realize_face): Adjusted for the change of the format of
3259 rface->info and the charge of set_region.
3260 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3261 (mwin__draw_box): Likewise.
3262 (mwin__draw_bitmap): This function deleted.
3263 (mwin__draw_points): New function.
3264 (mwin__verify_region): Adjusted for the change of the format of
3265 rface->info and the charge of set_region.
3266 (mwin__create_window): Inherit backgound pixel from parent.
3267 (mwin__dump_gc): Adjusted for the change of the format of
3270 2004-03-16 Kenichi Handa <handa@m17n.org>
3272 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3274 * input.c (M_key_alias): New variable.
3275 (handle_key): Try M_key_alias property of a key too.
3276 (minput__init): Initialize M_key_alias. Give that property to
3277 symbols in one_char_symbol. Fix bug of initializing
3280 * draw.c (compose_glyph_string): Don't handle
3281 ignore_formatting_char here. Include formatting characters in the
3282 range processed by a FTL.
3283 (layout_glyph_string): Handle ignore_formatting_char here.
3285 2004-03-12 Kenichi Handa <handa@m17n.org>
3287 * input-gui.c (win_create_ic): Enable bidi in status control.
3289 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3291 2004-03-09 Kenichi Handa <handa@m17n.org>
3293 * input.c (load_input_method): If title is not specified, use the
3294 input method name as title.
3296 * m17n-X.c (get_color): Make it static.
3297 (xim_create_ic, xim_destroy_ic, x_error_handler)
3298 (x_io_error_handler): Likewise.
3300 2004-03-01 Kenichi Handa <handa@m17n.org>
3302 * Version 1.0 released.
3305 Copyright (C) 2003, 2004
3306 National Institute of Advanced Industrial Science and Technology (AIST)
3307 Registration Number H15PRO112
3309 This file is part of the m17n library.
3311 The m17n library is free software; you can redistribute it and/or
3312 modify it under the terms of the GNU Lesser General Public License
3313 as published by the Free Software Foundation; either version 2.1 of
3314 the License, or (at your option) any later version.
3316 The m17n library is distributed in the hope that it will be useful,
3317 but WITHOUT ANY WARRANTY; without even the implied warranty of
3318 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3319 Lesser General Public License for more details.
3321 You should have received a copy of the GNU Lesser General Public
3322 License along with the m17n library; if not, write to the Free
3323 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA