1 2006-12-06 Kenichi Handa <handa@m17n.org>
3 * Version 1.3.4 released.
5 2006-11-16 Kenichi Handa <handa@m17n.org>
7 * input.c (parse_action_list): Allow (undo 0).
8 (adjust_markers): New function.
9 (preedit_insert, preedit_delete): Call adjust_markers.
10 (preedit_replace): New function.
11 (update_candidate): Call preedit_replace instead of preedit_insert
13 (filter): When ic_info->commit_key_head is nonzero, shift input
14 event keys even if there's no committed text.
16 2006-11-10 Kenichi Handa <handa@m17n.org>
18 * input.h (MInputContextInfo): New member commit_key_head.
20 * input.c (preedit_commit): Update ic_info->commit_key_head.
21 (take_action_list): Reset ic_info->commit_key_head on Mundo.
22 (filter): When committed, shift keys by ic_info->commit_key_head.
24 2006-10-27 Kenichi Handa <handa@m17n.org>
26 * input.c (marker_code): New arg surrounding. Callers changed.
27 (surrounding_pos): Check if name[0] == '@'.
28 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
29 (take_action_list): Likewise.
30 (get_preceding_char): If POS is zero, always call
33 2006-10-19 Kenichi Handa <handa@m17n.org>
35 * input.c (load_variables): Fix setting of `global'.
37 2006-10-16 Kenichi Handa <handa@m17n.org>
39 * draw.c (draw_background): Be sure to set *to_x.
40 (render_glyph_string): If from == to, just return.
42 2006-10-18 Kenichi Handa <handa@m17n.org>
44 * database.c (get_dir_info): Return NULL if the directory name is
46 (register_databases_in_files): Call register_database with
48 (mdatabase__update): Fix logic. Call register_database with
50 (mdatabase_define): Call register_database with
53 * input.c (delete_surrounding_text): Be sure to set members
54 preceding_text and following_text to NULL.
55 (shift_state): Save variable values in ic_info->vars_saved.
56 (preedit_commit): Don't print debug information here. Don't
57 change ic_info->keys here.
58 (get_candidate_list): Don't ref plist.
59 (take_action_list): Don't unref return value of
60 get_candidate_list. For undo, reset ic->produced and recover
61 ic_info->vars. Be sure to set ic->candidate_list to NULL after
63 (init_ic_info): Set ic_info->vars_saved.
64 (fini_ic_info): Unref ic_info->vars_saved.
65 (re_init_ic): Be sure to set ic->candidate_list to NULL after
67 (filter): Be sure to set members preceding_text and following_text
68 to NULL. Print debug information about produced text. Delete
69 processed keys from ic_info->keys.
71 * input.h (MInputContextInfo): New member vars_saved.
73 2006-10-16 Kenichi Handa <handa@m17n.org>
75 * database.c (mdatabase__update): Fix the way to get db_info.
77 2006-10-02 Kenichi Handa <handa@m17n.org>
79 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
82 * font.c (xlfd_unparse_name): Adjusted for the change of
84 (font_score): Likewise.
85 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
87 * m17n-X.c (MFontX, _MFontX): Deleted.
88 (SET_SIZE, HAVE_SIZE): Deleted.
89 (free_display_info): Adjusted for the change of
90 disp_info->font_list format.
91 (xfont_registry_list): Likewise.
92 (xfont_open): Likewise.
93 (xfont_list): Likewise.
94 (xfont_encode_char): Ignore size to find a realized font.
95 (MRealizedFontXft): Change the order of members to make it
96 compatible with MRealizedFontFT.
98 2006-09-27 Kenichi Handa <handa@m17n.org>
100 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
101 (mfont_close): Add comments.
103 * mtext-lbrk.c (mtext_line_break): Add comment.
105 2006-09-26 Kenichi Handa <handa@m17n.org>
107 * input.c (minput_get_description): Handle description about
108 inclusion-only input methods.
110 2006-09-21 Kenichi Handa <handa@m17n.org>
112 * input.c (M_gettext): New variable.
113 (fully_initialize): Initialize M_gettext.
114 (check_description): New function.
115 (load_commands): Call check_description.
116 (config_all_commands): Be sure to unref pl.
117 (load_variables): Call check_description.
118 (config_all_variables): Be sure to unref pl.
119 (load_im_info): Call check_description.
121 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
123 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
124 and bind_textdomain_codeset.
126 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
128 2006-09-15 Kenichi Handa <handa@m17n.org>
130 * input.c (reload_im_info): Update custom and global info.
131 (init_ic_info): Fix previous change.
133 2006-09-14 Kenichi Handa <handa@m17n.org>
135 * database.c: Include <libgen.h>.
136 (mdatabase__lock): Make a directory if necessary.
138 * input.c (resolve_command): Adjusted for the format change of
139 configured_cmds member.
140 (load_commands, load_variables): Fix for errornous data handling.
141 (config_command, config_variable): New function.
142 (config_all_commands, config_all_variables): Renamed from
143 config_commands and config_variables. Utilize the above function.
144 (check_variable_value): Argument changed. Callers changed.
145 (load_im_info): Call config_all_commands and config_all_variables.
146 (init_ic_info): Adjusted for the format change of configured_vars
148 (minput__init): Initialize Mcustomized, Mconfigured, and
150 (Mcustomized, Mconfigured, Minherited): New variables.
151 (minput_get_command): Be sure to return NULL if an input method
152 use no local command.
153 (minput_get_variable): Be sure to return NULL if an input method
154 use no local variable.
155 (minput_config_command, minput_config_variable)
156 (minput_save_config): Adjusted for the format change of
157 configured_cmds and configured_vars members.
159 * plist.c (write_element): Delete superfluous ':'.
161 2006-09-13 Kenichi Handa <handa@m17n.org>
163 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
164 (minput_config_file): Extern it.
166 * draw.c (Minherited): Declaration moved to input.c.
167 (mdraw__init): Don't initialize Minherited here.
169 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
171 2006-09-07 Kenichi Handa <handa@m17n.org>
173 * textprop.c (mtext_serialize): Call mplist__serialize with the
176 * plist.h (mplist__serialize): Prototype adjusted.
177 (mplist__assq): Extern it.
179 * plist.c: Include <ctype.h>
180 (PUTC, PUTS): New macros.
181 (write_symbol): New function.
182 (write_element): New arg indent.
183 (dump_string, dump_plist_element): Delete them.
184 (mplist__from_string): New arg pretty.
185 (mplist__assq): New function.
186 (mdebug_dump_plist): Use write_element.
188 * mtext.c (mtext_cat_char): Allocate more memory.
189 (mdebug_dump_mtext): Don't escal a newline character.
191 * m17n.h (minput_get_command, minput_get_variable)
192 (minput_config_command, minput_config_variable)
193 (minput_save_config): Extern them.
195 * m17n-core.c: Include <string.h>.
196 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
197 use the stream stdout instead of a file of that name.
199 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
202 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
203 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
204 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
205 (MDEBUG_DUMP): Flush the stream.
207 * input.h (struct _MInputMethodInfo): Delete member im. New
208 members mdb, language, name, extra, cmds, configured_cmds,
209 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
210 (MInputContextInfo): New member tick.
212 * input.c: Big change to improve user-side input method
213 customization. Here, list just public API changes.
214 (minput_get_commands, minput_get_variables)
215 (minput_assign_command_keys, minput_set_variable): Label them
217 (minput_get_command, minput_get_variable)
218 (minput_config_command, minput_config_variable)
219 (minput_save_config): New functions.
221 * database.h (PATH_MAX): Define it if not yet defined.
222 (PATH_SEPARATOR): Likewise.
223 (enum MDatabaseStatus): New enum.
224 (struct MDatabaseInfo): Moved from database.c. New members status,
225 time, lock_file, and uniq_file.
226 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
227 (mdatabase__unlock): Extern them.
229 * database.c: Include <time.h>.
230 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
231 (GEN_PATH): Args changed. Callers changed.
232 (struct MDatabaseInfo): Moved to database.h.
233 (struct MDatabase, mdb_list): Deleted.
234 (mdatabase__list): New var.
235 (get_database_filename): Deleted. Callers changed to use
237 (find_file, get_database_file): New files.
238 (get_dir_info): Initialize new members of MDatabaseInfo.
239 (find_database): Arg chagnded. Callers changed.
240 (free_db_info, register_database, register_databases_in_files):
242 (update_database_list): Deleted.
243 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
244 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
245 (mdatabase__update): New function.
246 (mdatabase__check): Return value changed.
247 (mdatabase__file, mdatabase__lock, mdatabase__save)
248 (mdatabase__unlock): New functions.
250 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
252 * input.c (get_surrounding_text): Return -2 when surrounding text
254 (get_following_char): Likewise.
255 (get_preceding_char): Likewise.
256 (minput__callback): Return 0 if there is a callback function,
259 2006-08-17 Kenichi Handa <handa@m17n.org>
261 * input.c (reset_ic): Use shift_state to setup the current state.
263 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
265 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
266 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
267 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
269 2006-08-02 Kenichi Handa <handa@m17n.org>
271 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
273 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
275 * font-ft.c (ft_encapsulate): Add code for debugging.
276 (mfont__ft_drive_otf): Be sure to encode character before getting
279 2006-07-21 Kenichi Handa <handa@m17n.org>
281 * draw.c (mdraw_text_extents): Fix previous typo.
283 2006-07-19 Kenichi Handa <handa@m17n.org>
285 * draw.c (gstring_width): New arg lbearing.
286 (render_glyph_string): Adjusted for the change of gstring_width.
287 (mdraw_text_extents): Fix lbearing of ink and line metrics.
289 * m17n-core.h (Mlanguage): Extern it.
291 * m17n.h (Mlanguage): Extern deleted.
293 * mtext.c (mtext__init): Initialize Mlanguage.
294 (Mlanguage): Declaration moved from locale.c
296 * locale.c (mlocale__init): Don't initialize Mlanguage here.
297 (Mlanguage): Declaration moved to mtext.c.
299 * language.c (mlang__init): Don't initialize Mlanguage here.
301 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
303 2006-07-14 Kenichi Handa <handa@m17n.org>
305 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
306 (MRealizedFontFT): New member face_encapsulated.
307 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
308 (ft_gen_font): New function.
309 (ft_add_font): Use ft_gen_font.
310 (ft_list_script): Store lists in ft_script_list.
311 (ft_check_otf): New arg ft_face. Caller changed.
312 (ft_check_language): Likewise.
313 (ft_check_script): Likewise.
314 (ft_encapsulate, ft_close): New functions.
315 (mfont__ft_driver): Initialize members encapsulate and close.
316 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
318 * font.h (struct MRealizedFont): New member encapsulating.
319 (struct MFontDriver): New members encapsulate and close.
321 * font.c (mfont__match_p): If FONT is realized, check capability
322 by font drivers's check_capability method.
323 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
326 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
327 declarations of foundry and fam local vars.
328 (xft_driver): Make it static.
330 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
331 (mfont_close): Extern them.
333 * m17n-gd.c (device_open): Don't specify foundry and family of the
336 2006-07-11 Kenichi Handa <handa@m17n.org>
338 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
340 2006-07-13 Kenichi Handa <handa@m17n.org>
342 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
344 (ft_check_script): Delete unused var.
345 (ft_list_capability): Likewise.
347 * font.c (mfont__get_capability): Setup cap->otf.
348 (Motf): Make it global.
349 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
351 * font.h (MFontCapability): New member otf.
353 * language.c (mlang__fini): Delete unused vars.
355 * m17n-gui.h (Motf): Extern it.
357 * database.c (update_database_list): Delete unused vars.
359 2006-07-07 Kenichi Handa <handa@m17n.org>
361 * font-ft.c (DEVICE_DELTA): Fix typo.
363 2006-07-06 Kenichi Handa <handa@m17n.org>
365 * fontset.c (mfont__lookup_fontset): Don't ignore family and
368 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
370 * database.c: Update comments.
372 2006-07-05 Kenichi Handa <handa@m17n.org>
374 * database.c (PATH_MAX): Define it if not yet defined.
375 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
377 (get_database_filename): Use GEN_PATH.
378 (get_dir_info): Don't include the last '/' in directory name.
379 (register_database): New function.
380 (update_database_list): Use register_database. Search all
381 directories in mdatabase__dir_list for wildcard databases.
382 (mdatabase__init): Check "~/.m17n.d".
384 2006-07-03 Kenichi Handa <handa@m17n.org>
386 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
387 push reverse property.
389 * plist.c (dump_plist_element): Fix previous change.
391 2006-06-28 Kenichi Handa <handa@m17n.org>
393 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
396 * draw.c (MbidiNSM): New variable.
397 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
398 attention to bidi type NSM.
399 (mdraw__init): Initialize MbibiNSM.
401 * language.c (mscript__char_list): Fix finding a char-list element.
403 * plist.c (dump_string): Return number of printed characters.
404 (dump_plist_element): Print elements more compactly.
406 2006-06-23 Kenichi Handa <handa@m17n.org>
408 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
409 (include_HEADERS): Likewise.
411 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
413 * language.c: Update documentation.
415 2006-06-23 Kenichi Handa <handa@m17n.org>
417 * font-ft.c (struct MFontFT): Delete member lang.
418 (free_ft_info): Don't unref member lang. Destroy members langset
420 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
421 changed. Set members langset and charset.
422 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
424 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
426 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
427 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
428 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
429 characters at first. If it fails, try listing by language names.
430 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
431 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
432 change of MFontCapability.
433 (ft_list_capability): Likewise. Try listing by languages, then by
434 scripts. Check OTF at last.
435 (ft_check_script): New function.
436 (ft_select): Adjusted for the check of MFontCapability.
437 (ft_list_family_names): New function.
438 (ft_check_capability): If cap->script is not Mnil, call
440 (mfont__ft_driver): Initialize with ft_list_family_names.
442 * font.h (struct MFontDriver): New member list_fmaily_names.
443 (struct): Change member "MSymbol *lang" to "MSymbol language".
445 * font.c: Include "language.h".
446 (Motf): New variable.
447 (otf_script_list, load_otf_script_list): Delete it.
448 (find_script_from_otf_tag): Delete it.
449 (merge_capability): New function.
450 (mfont__init): Init Motf.
451 (mfont__fini): Don't unref otf_script_list.
452 (free_font_capability): Check cap->script_tag to determine if
453 OTF-related capability is set.
454 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
455 the change of type MFontCapability.
456 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
458 (mfont_list): Call merge_capability for LANGUAGE arg.
459 (mfont_list_family_names): New function.
461 * input-gui.c: Typo in comments fixed.
463 * input.c: Typo in comments fixed.
465 * language.h (mlanguage__list): Delete it.
466 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
469 * language.c: Include "mtext.h".
470 (M_script_lang_list): Delete it.
471 (language_list, script_list): New variables.
472 (load_lang_script_list, init_language_list, init_script_list): New
474 (mlang__init): Don't load language database here.
475 (mlang__fini): Unref language_list and script_list if not NULL.
476 (mlanguage__list): Delete it.
477 (mlanguage__info, mscript__info, mscript__char_list)
478 (mscript__otf_tag, mscript__from_otf_tag): New functions.
479 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
480 (mscript_list, mscript_language_list): New functions.
482 * m17n-gui.h (mfont_list_family_names): Extern it.
484 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
485 (mlanguage_text, mscript_list, mscript_language_list): Extern
488 2006-06-21 Kenichi Handa <handa@m17n.org>
490 * m17n-X.c (xfont_driver): Initialize with
491 xfont_list_family_names.
492 (xfont_list_family_names): New function.
493 (xft_driver): Initialize with NULL for list_family_names member.
494 (device_init): Set list_family_names member of xft_driver to that
497 2006-06-06 Kenichi Handa <handa@m17n.org>
499 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
501 2006-03-24 Kenichi Handa <handa@m17n.org>
503 * font-ft.c (ft_open): Improve debug message.
505 * fontset.c (mfontset__get_font): Fix for the case that no font in
506 per_script list is available.
508 2006-02-06 Kenichi Handa <handa@m17n.org>
510 * Version 1.3.3 released.
512 2006-02-22 Kenichi Handa <handa@m17n.org>
514 * textprop.c: Fix some typos in documentation.
516 * plist.c: Fix some typos in documentation.
518 * m17n-core.h: Fix some typos in documentation.
519 (M17NLIB_PATCH_LEVEL): Updated to 3.
520 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
522 * symbol.c: Fix some typos in documentation.
524 * mtext.c: Fix some typos in documentation.
526 * input.c: Fix several typos in documentation.
528 2006-02-06 Kenichi Handa <handa@m17n.org>
530 * Version 1.3.2 released.
532 2006-02-03 Kenichi Handa <handa@m17n.org>
534 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
535 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
537 * font.c (xlfd_parse_name): Fix handling of the name "nil".
539 * draw.c (layout_glyphs): Fix handling left_padding of
542 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
544 2006-02-02 Kenichi Handa <handa@m17n.org>
546 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
549 2006-01-25 Kenichi Handa <handa@m17n.org>
551 * input.c (resolve_expression): If the value of PLIST is a plist,
552 but the first element is not symbol, return 0.
554 2006-01-17 Kenichi Handa <handa@m17n.org>
556 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
557 HAVE_GD is 2 or the greater.
559 2006-01-16 Kenichi Handa <handa@m17n.org>
561 * Version 1.3.1 released.
563 2006-01-16 Kenichi Handa <handa@m17n.org>
565 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
566 simulating anti-aliasing.
568 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
569 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
571 2006-01-12 Kenichi Handa <handa@m17n.org>
573 * input.c (get_surrounding_text): Always pop ic->plist.
574 (reset_ic): Don't reset ic->plist.
576 2006-01-10 Kenichi Handa <handa@m17n.org>
578 * input.c (preedit_commit): For debugging, print only commiting
579 charactes. Don't set ic->candidate_show to 0.
580 (handle_key): Don't run branch-actions just by shifting to the
582 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
583 Reset vars and plist.
585 2006-01-07 Kenichi Handa <handa@m17n.org>
587 * input.c (load_branch): Confirm that maps is not NULL.
589 2006-01-05 Kenichi Handa <handa@m17n.org>
591 * input-gui.c (win_filter): Try to convert arg to key only when
594 * plist.c (read_integer_element): If '#' and '-' are followed by
595 non-integer-constituent, read them as a part of a symbol.
596 (read_symbol_element): New arg C.
597 (read_element): Adjust args to read_symbol_element.
599 * input.c (load_macros): On overwriting a macro, free the old
601 (minput__init): Store Mmap in load_im_info_keys.
602 (minput_get_title_icon): If the input method has no title, be sure
604 (minput_get_description): If the input method has no description,
605 be sure to return NULL.
606 (minput_get_variables): Fix documentation.
607 (handle_key): Pay attention to the case that key is Mnil.
608 (filter): Likewise. Fix handling of such symbol as S-A.
610 2005-12-22 Kenichi Handa <handa@m17n.org>
612 * Version 1.3.0 released.
614 2005-12-22 Kenichi Handa <handa@m17n.org>
616 * font-ft.c (ft_list): If the specified font has no property,
619 2005-12-20 Kenichi Handa <handa@m17n.org>
621 * character.c (mchar_get_prop): Check char_prop_list.
622 (mchar_put_prop, mchar_get_prop_table): Likewise.
624 2005-12-18 Kenichi Handa <handa@m17n.org>
626 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
627 file name sans language.
629 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
631 * input.c: Fix typo in comments.
633 2005-12-14 Kenichi Handa <handa@m17n.org>
635 * input.c (minput_get_title_icon): Check the default icon for the
638 2005-12-13 Kenichi Handa <handa@m17n.org>
640 * input.c (Mless_equal, Mgreater_equal): New variables.
641 (parse_expression, resolve_expression, parse_action_list)
642 (take_action_list): Handle the aboves.
643 (filter): Treat key S-X as X.
644 (minput__init): Initialize Mless_equal and Mgreater_equal.
645 (minput_get_title_icon): New function.
647 * m17n.h (minput_get_title_icon): Extern it.
649 * database.c (get_database_filename): Return a filename instead of
651 (load_database): Adjusted for the above change.
652 (mdatabase__load_for_keys): Likewise.
653 (mdatabase__find_file): New function.
655 * database.h (mdatabase__find_file): Extern it.
657 * font.h (mfont__resize): Delete extern.
659 * font.c (mfont__list): Check resize ratio.
660 (mfont__resize): Delete it.
661 (mfont_resize_ratio): Include the code of mfont__resize.
663 * font-ft.c (ft_open): Check resize ratio.
665 * m17n-X.c (xfont_open): Check resize ratio.
666 (xft_open): Likewise.
668 2005-12-07 Kenichi Handa <handa@m17n.org>
670 * input.c (take_action_list): If take_action_list return -1,
672 (handle_key): Likewise.
674 * face.c (mface__for_chars): When font is specified and layouter
675 is found for it, if the layouter doesn't support one of a
676 character, use a face sans layouter for it.
678 2005-12-06 Kenichi Handa <handa@m17n.org>
680 * fontset.c (mfont__lookup_fontset): If only a fallback font is
681 found, don't use it for more than one character.
683 2005-12-05 Kenichi Handa <handa@m17n.org>
685 * face.c (mface__realize): Set rfont->layouter to Mnil.
686 (mface__for_chars): Fix handling of layouter.
688 * character.h (mchar__define_prop): Extern it.
690 * database.c (update_database_list): Call mchar__define_prop if
693 * character.c (mchar__init): Don't call mchar_define_property.
694 Instead just initialize property keys.
695 (mchar__fini): Free char_prop_list only if it's not NULL.
696 (mchar__define_prop): New function.
697 (mchar_define_property): Call mchar__define_prop.
699 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
702 2005-12-02 Kenichi Handa <handa@m17n.org>
704 * language.c (mlang__init): Handle extra chars.
706 * m17n-gui.h (mfont_check): Adjust prototype.
708 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
709 (xfont_check_capability): New function.
710 (xft_driver): Specify xft_check_capability.
711 (xft_check_capability): New function.
713 * font-ft.c (M0_3): Delete it.
715 (ft_get_charmaps): Refer to M0.
716 (fc_parse_pattern): Fix previous change.
717 (ft_list_language): Check also extra chars.
718 (ft_check_otf): Define it even if HAVE_OTF is undef.
719 (ft_check_lang): Check the result of FcLangSetHasLang against
720 FcLangDifferentLang. Check also extra chars.
721 (ft_list_capability): Delete ifdef HAVE_OTF.
722 (ft_select): Likewise.
723 (ft_open): Improve debug information.
724 (ft_check_capability): New function.
725 (mfont__ft_driver): Specify ft_check_capability.
726 (mfont__ft_init): Initialize M0.
728 * fontset.c (get_font_from_group): New function.
729 (mfontset__get_font): New function.
731 * fontset.h (mfontset__get_font): Extern it.
733 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
734 (mfont__fini): Delete ifdef HAVE_OTF.
735 (free_font_capability): Likewise.
736 (mfont__get_capability): Likewise.
737 (mfont__check_capability): New function.
738 (mfont_check): Change the order of arguments. Use
741 * font.h (struct MFontDriver): New member check_capability.
742 (MFontCapability): Delete ifdef HAVE_OTF.
743 (mfont__check_capability): Extern it.
745 * face.c (mface__realize): Fix handling of FONT arg.
746 (mface__for_chars): Fix handling of explicitly specified font.
748 2005-11-25 Kenichi Handa <handa@m17n.org>
750 * font-flt.c (run_command): Print debug info for
753 * draw.c (layout_glyphs): Fix handling of left/right_padding.
755 * face.c (mface__for_chars): Check rfont before accessing the
758 2005-11-21 Kenichi Handa <handa@m17n.org>
760 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
763 * fontset.c (fontset_table): New variable.
764 (free_fontset): Call M17N_OBJECT_UNREGISTER.
765 (mfont__fontset_init): Add fontset_table as an object array.
766 (mfont__realize_fontset): Ref FONTSET.
767 (mfont__free_realized_fontset): Unref REALIZED->fontset.
768 (mfontset): Call M17N_OBJECT_REGISTER.
769 (mfontset_copy): Likewise.
771 * input.c (handle_key): For debugging, print information about
773 (filter): Add an alias for Meta and Alt modifiers.
774 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
776 (minput__init): Initialize them.
777 (parse_expression): New function.
778 (resolve_expression): New function.
779 (parse_action_list): Handle expressions by parse_expression.
780 (take_action_list): Handle expressions by resolve_expression.
781 (parse_nested_list_value): Fix previous change.
782 (resolve_command): Fix handling of the return value of
785 2005-11-18 Kenichi Handa <handa@m17n.org>
787 * font-ft.c (ft_check_otf, otf_script_list): Define only when
789 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
791 (ft_select): Likewise.
793 * font.c (mfont_list): Fix for the case that FONT is NULL.
794 (OTF_tag): Delete it.
795 (load_otf_script_list): Define only when HAVE_OTF is defined.
796 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
799 * draw.c (truncate_gstring): Be sure to truncate at
800 glapheme-cluster boundary.
802 2005-11-11 Kenichi Handa <handa@m17n.org>
804 * input.c (delete_surrounding_text): Clear cache if necessary.
806 2005-11-09 Kenichi Handa <handa@m17n.org>
808 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
809 glyph prev is also supported by the current flt.
811 2005-11-08 Kenichi Handa <handa@m17n.org>
813 * m17n-X.c (xft_render): Cancel previous change.
815 2005-11-07 Kenichi Handa <handa@m17n.org>
817 * input.c: Include <stdlib.h>.
818 (get_surrounding_text, delete_surrounding_text)
819 (get_preceding_char, get_following_char): New functions.
820 (integer_value): New arg surrounding. If it is nonzero, try to
821 get a surrounding character. Callers changed.
822 (take_action_list): Check `value' before setting an element.
823 (destroy_ic): Unref ic_info->preceding_text and
824 ic_info->following_text.
825 (minput__init): Initialize Minput_get_surrounding_text and
826 Minput_delete_surrounding_text.
827 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
829 (filter): Unref ic_info->preceding_text and
830 ic_info->following_text.
832 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
835 * input.h (MInputContextInfo): New members preceding_text and
838 2005-11-04 Kenichi Handa <handa@m17n.org>
840 * input.c (parse_nested_list_value): Fix handling of the global
842 (get_nested_list): Get global definitions by load_partial_im_info.
843 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
844 MInputCandidatesChanged.
845 (take_action_list): Likewise.
846 (reset_ic): Likewise.
847 (create_ic): Don't pay special attention to
848 Mcandidates_group_size.
849 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
850 (minput_set_variable): Get a definition of varible by
851 mplist_find_by_value, not mplist_get.
853 * m17n.h (enum MInputCandidatesChanged): New enum.
855 2005-11-01 Kenichi Handa <handa@m17n.org>
857 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
859 (mwin__destroy_window): If xft_draw's drawable is win, change it
860 to device->drawable before destroying win.
862 2005-10-31 Kenichi Handa <handa@m17n.org>
864 * input.c (load_im_info): Fix adding of state.
866 * m17n-core.c (m17n_fini_core): Fix reporting of module
869 * m17n.c (m17n_fini): Fix reporting of module finalization.
871 * m17n-gui.c (m17n_init_win): Fix reporting of module
874 2005-10-29 Kenichi Handa <handa@m17n.org>
876 * input.c (get_candidate_list): Fix the timing of referring plist.
878 2005-10-28 Kenichi Handa <handa@m17n.org>
880 * input.c (load_branch): Ignore an undefined map name.
881 (load_im_info): Set im_info->title from `name' only if it's not
883 (shift_state): Always update ic->status.
884 (adjust_candidates): Renamed from adjust_candidate_command.
885 Argument changed. Caller changed.
886 (get_candidate_list, regularize_action): New functions.
887 (take_action_list): Use them. On handling Munhandle, don't set
889 (handle_key): If KEY is not handled by MAP, and MAP has
890 branch_actions, perform them.
892 * database.c (mdatabase__fini): Free dir_info->filename;
894 2005-10-20 Kenichi Handa <handa@m17n.org>
896 * input.c (marker_code): Accept '@@'.
897 (integer_value): Handle '@@'.
898 (parse_action_list): Accept a symbol argument.
899 (take_action_list): Resolve the symbol argument. Handle the
902 2005-10-18 Kenichi Handa <handa@m17n.org>
904 * input.c: Include "charset.h".
905 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
907 (MIMState): New member (M17NObject control).
908 (lookup_nested_list, set_nested_list, parse_nested_list_value)
909 (get_nested_list, resolve_variable): New functions.
910 (integer_value): New arg (MPlist **value). Set it to the plist
911 element containing the value.
912 (resolve_command): New function.
913 (load_translation): New arg (MPlist *map_actions).
914 (load_branch): New args language and name. If `keylist' is a
915 symbol, resolved that as a command name.
916 (free_map): New arg top. Free map->map_actions only if top is
918 (free_state): New function.
919 (load_state): New arg name.
920 (im_info_list): New variable.
921 (free_im_info, get_im_info_by_tags): New functions.
922 (load_im_info): Arg key changed to plist. Handle `include'.
923 Return (MInputMethodInfo *).
924 (preedit_commit): Ref ic->candidate_list.
925 (get_select_charset, adjust_candidate_command): New functions.
926 (take_action_list): Handle `include'. Adjust candidate action
927 properly. Handle control variables `candidates-charset' and
928 `candidates-group-size'.
929 (open_im): Use get_im_info.
930 (create_ic): Get global variables.
931 (load_partial_im_info): New function.
932 (get_im_info): New function.
933 (check_command_keyseq, check_command_list, check_variable_list):
935 (minput__init): Don't handle M_database_hook and Mdetail_text.
936 Initialize M_candidates, Mcandidates_group_size,
938 (parse_variable_list, get_variable_list, parse_command_list)
939 (get_command_list): Delete them.
940 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
941 (minput__fini): Simply unref command_list and variable_list.
942 (minput_get_description): Adjusted for the new form of description.
943 (minput_get_commands): Use get_nested_list.
944 (minput_assign_command_keys): Likewise.
945 (minput_get_variables, minput_set_variable): Likewise.
947 * input.h (MInputMethodInfo): New members im and maps.
949 * database.h (M_database_hook): Delete extern.
950 (MDatabaseHookFunc): Delete extern.
951 (mdatabase__check): Extern it.
953 * database.c: Include <glob.h>.
954 (MAX_TIME): New macro.
955 (Masterisk): New variable.
956 (get_database_stream): Argument changed to (MDatabaseInfo *).
958 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
959 (find_database): New function.
960 (update_database_list): New function.
961 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
962 calling update_database_list.
963 (mdatabase__check): New function.
964 (mdatabase_find): Use update_database and find_database. Don't
965 handle MDatabaseHookFunc.
966 (mdatabase_list): Call update_database at first.
967 (mdatabase_define): Adjusted for the change of mdb->extra_info.
968 (MDatabaseList): New type.
970 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
972 * m17n.h (Mdetail_text): Delete extern.
974 * m17n-core.h (mplist_conc): Delete extern.
976 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
978 (mplist_conc): Renamed to mplist__conc.
979 (mplist__pop_unref): New function.
981 2005-10-14 Kenichi Handa <handa@m17n.org>
983 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
985 (read_element): If keys is an empty plist, return any element
987 (dump_plist_element): Check if plist is nested.
988 (mplist_conc): Always ref tail.
989 (mplist_set): If key is a managing key, ref val in advance.
991 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
992 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
993 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
996 * fontset.c (free_fontset): Unref fontset_list if necessary.
997 (mfont__fontset_fini): Don't free fontset_list. Unref
999 (mfont__realize_fontset): Initialize request.
1000 (mfontset): Ref default_fontset or fontset only if necessary.
1001 (mfontset_copy): Don't ref copy.
1003 * draw.c (render_glyphs): Check gend->type before checking
1006 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1007 unrefed plists to NULL.
1009 2005-10-04 Kenichi Handa <handa@m17n.org>
1011 * textprop.c (mtext_serialize): Be sure to make mt
1012 MTEXT_FORMAT_UTF_8 and NULL terminated.
1014 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1016 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1018 2005-10-03 Kenichi Handa <handa@m17n.org>
1020 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1021 is not at the beginning of line.
1023 2005-09-22 Kenichi Handa <handa@m17n.org>
1025 * input.c: Include <sys/stat.h> and <unistd.h>.
1026 (Minclude, Mcommit, Munhandle): New variables.
1027 (minput__init): Initialize them. Push only Mstate to
1028 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1029 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1031 (load_input_method): Handle "include" directive. If no states are
1033 (shift_state): If state_name is Mt, shift back to the previous
1034 state. Call preedit_commit to commit preedit text.
1035 (preedit_commit): New function.
1036 (take_action_list): Improve debug printing. Handle commit and
1038 (handle_key): Check the return value of take_action_list. Don't
1039 take branch_actions just after changing to the root map.
1040 (reset_ic): Reset all ic_info members.
1041 (filter): When a key is not handled, just move ic_info->keys
1042 instead fo calling reset_ic.
1043 (load_im_info): If key is not Mstate, push Mmap to
1045 (MDatabaseStatList): New type.
1046 (imdir_stat_list): New variable.
1047 (input_method_hook): Don't cancel the hook. Check the
1048 modification time of directories.
1049 (minput__fini): Free imdir_stat_list;
1051 * input.h (MInputContextInfo): New member prev_state.
1053 * m17n-core.h (mplist_conc): Extern it.
1055 * plist.c (mplist_conc): New function.
1057 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1059 * font.h (MRealizedFont): New member average_width.
1061 * font-ft.c (ft_open): Set rface->average_width.
1063 * font.c (xlfd_unparse_name): Print '*' before registry name.
1065 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1066 (xfont_open): Set rfont->average_width.
1067 (xft_open): Likewise.
1068 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1070 * internal-gui.h (struct MFrame): New member average_width.
1072 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1073 (mframe_get_prop): Return the average_width of a font.
1075 * face.c (mface__realize): Set rface->average_width.
1076 (mface__update_frame_face): Set frame->average_width.
1078 * face.h (MRealizedFace): New member average_width.
1080 2005-09-19 Kenichi Handa <handa@m17n.org>
1082 * font.c (xlfd_unparse_name): New arg full_xlfd.
1083 (mfont__encode_char): Use shortcut only for X core fonts.
1084 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1085 (mfont_put_prop): Handle `language' property.
1086 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1087 Print file can capability info too.
1089 * m17n-core.c (mdebug__output): New variable.
1090 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1091 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1092 (m17n_fini_core): Close mdebug__output if it's not stderr.
1094 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1095 (xfont_open): Handle baseline_offset.
1096 (xfont_find_metric): Likewise.
1097 (xfont_render): Likewise.
1098 (xft_open): Likewise.
1099 (xft_render): Likewise.
1101 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1102 (mdebug__output): Extern it.
1103 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1104 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1105 (MDEBUG_DUMP): New macro.
1106 (MDEBUG_PRINT_TIME): Print to medebug__output.
1108 * font.h (MRealizedFont): New member baseline_offset.
1110 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1112 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1113 (ft_list_family): Check alias.
1114 (ft_list_language): If language is "en", don't try to the second
1116 (ft_default_list): New variable.
1117 (ft_list_default): New function.
1118 (ft_select): If family is not specified, try only the default
1119 fonts. Treat the weights normal and medium same.
1120 (ft_open): Fix debug message. If registry is not specified, try
1121 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1122 (ft_find_metric): Likewise.
1123 (ft_render): Likewise.
1124 (ft_list): Fix debug message. Accept the registring iso8859-1.
1125 If family is not specified, try only the default fonts.
1127 * face.c (mface__realize): Fix logic of opening a font.
1129 2005-09-16 Kenichi Handa <handa@m17n.org>
1131 * face.c (mface__realize):
1133 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1136 * input.c (shift_state): Fix the condition of taking init actions.
1137 (take_action_list): Fix handling of pushback action.
1138 (handle_key): Don't change key while checking its alias.
1139 (minput__init): Initialize new variables.
1140 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1143 2005-09-12 Kenichi Handa <handa@m17n.org>
1145 * mtext.c (mtext__uppercase): Add proper open/close parens.
1146 (mtext_titlecase): Add proper casting.
1148 * input.c (parse_action_list): Handle the case that the arg is a
1149 key sequence (MText or MPlist).
1150 (take_action_list): Likewise.
1151 (shift_state): Shorter debug message.
1152 (handle_key): Terminate a debug message by "\n".
1153 (reset_ic): Don't take initial actions here.
1154 (minput_open_im): Print a debug message.
1155 (minput_close_im): Likewise.
1156 (minput_create_ic): Likewise.
1157 (minput_destroy_ic): Likewise.
1159 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1161 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1164 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1165 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1168 * character.c: Add Japanese documentation for
1169 mchar_get_prop_table ().
1171 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1173 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1174 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1175 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1177 (init_case_conversion): New function.
1178 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1179 (uppercase_precheck, lowercase_precheck, final_sigma)
1180 (after_soft_dotted, more_above, before_dot, after_i)
1181 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1183 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1185 * plist.c (read_mtext_element): Fix previous change.
1187 2005-09-05 Kenichi Handa <handa@m17n.org>
1189 * plist.c (read_mtext_element): Handle \uXXXX notation.
1191 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1192 (MTABLE_ALLOCA): Change the name of local variable.
1194 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1195 HAVE_FREETYPE are defined.
1197 * m17n-X.c: Check HAVE_X11.
1199 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1200 directory listing libraries.
1201 (noinst_PROGRAMS): Define it only in maintainer mode.
1203 2005-09-02 Kenichi Handa <handa@m17n.org>
1205 * m17n-gui.h (mdraw_line_break_option): Extern it.
1207 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1208 end of the first glyph.
1209 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1211 (mdraw_line_break_option): New variable.
1212 (mdraw_default_line_break): Use mtext_line_break.
1214 * mtext.h (wordseg_func_table): Don't extern it.
1215 (mtext__wseg_fini): Extern it.
1217 * mtext.c: Don't include word-thai.h.
1218 (wordseg_func_table): Delete this variable.
1219 (mtext__init): Don't initialize above. Don't call
1220 mtext__word_thai_init.
1221 (mtext__fini): Don't free wordseg_func_table. Call
1222 mtext__wseg_fini instead fo mtext__word_thai_fini.
1223 (MTextWordsegFunc): Don't typedef it.
1224 (mtext__word_segment): Moved to mtext-wseg.c.
1226 * m17n-core.h (enum MTextLineBreakOption): New enum.
1227 (mtext_line_break): Extern it.
1229 * mtext-wseg.c: New file.
1231 * mtext-lbrk.c: New file.
1233 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1234 add mtext-lbrk.c and mtext-wseg.c.
1236 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1237 the case that head is NULL.
1239 2005-09-01 Kenichi Handa <handa@m17n.org>
1241 * word-thai.c (wordseg_propertize): If the property value is nil,
1242 don't make the property no-merge.
1243 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1244 attention to the case that they are NULL.
1245 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1248 * character.c (mchar_get_prop_table): New function.
1250 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1252 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1253 (mchar_get_prop_table): Extern it.
1255 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1256 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1258 * internal.h (enum MTextCoverage): New enum.
1259 (MText): New member coverage.
1261 * mtext.c (FORMAT_COVERAGE): New macro.
1262 (insert): Copy mt2->coverage.
1263 (mtext__from_data): Initialize mt->coverage.
1264 (mtext__adjust_format): Update mt->coverage.
1265 (mtext): Initialize mt->coverage.
1266 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1267 Update mt->coverage if necessary.
1268 (mtext_duplicate): Copy mt->coverage.
1269 (mtext_insert, mtext_replace): New functions.
1270 (mtext_dup): Use mtext_duplicate.
1271 (mtext__word_segment): Don't set *from and *to if a word
1272 segmentation funcion is not found.
1273 (mtext_ins_char): Fix typo.
1275 2005-08-25 Kenichi Handa <handa@m17n.org>
1277 * font.h (MFont): New member for_full_width.
1279 * font.c (compare_font_score): Prefer a font of not
1282 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1283 registry charset of a font is one of CJK charsets.
1285 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1286 supports some of CJK.
1288 2005-08-24 Kenichi Handa <handa@m17n.org>
1290 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1292 * m17n-gui.c (null_device_open): Check Mresolution param and set
1295 * m17n-gd.c (device_open): Check Mresolution param and set
1298 * m17n-X.c (MWDevice): New member resy.
1299 (xfont_open): Set ascent, descent, and max_advance members of
1301 (xft_open): Likewise.
1302 (device_open): Compare also screen_num to find a device. Set
1303 device->resy and frame->dpi.
1305 * internal-gui.h (MFrame): New member dpi.
1307 * font.h (MRealizedFont): New member max_advance.
1309 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1310 (mfont__init): Don't initialize Mascent, Mdescent.
1311 (Mascent, Mdescent): Delete these variables.
1312 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1313 Mfont_descent instead of Mascent and Mdescent.
1314 (mfont_put_prop): Allow negative size.
1315 (mfont_find): Handle the case of spec->size < 0. Fix previous
1317 (mfont_list): Handle the case of spec->size < 0.
1318 (mfont_check): Likewise.
1320 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1321 (fc_get_pattern): Handle the case of font->size < 0.
1322 (ft_open): Set ascent, descent, and max_advance members of rfont.
1323 (ft_find_metric): Improve rounding.
1324 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1327 * face.c (mface__realize): Handle the case of font->size < 0.
1329 2005-08-22 Kenichi Handa <handa@m17n.org>
1331 * coding.c (MConverterStatus): Change the member buf to union.
1332 (mconv_buffer_converter): Add const to the arg buf.
1333 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1334 (mconv_decode): Adjusted for the change of MConverterStatus.
1335 (mconv_encode_range): Likewise.
1337 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1338 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1340 2005-08-20 Kenichi Handa <handa@m17n.org>
1342 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1343 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1345 * m17n-X.c (xfont_open): Set members ascent, descent, and
1346 max_advance of rfont.
1347 (xft_open): Likewise.
1349 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1351 (mfont__ft_parse_name): Add const to the arg name.
1353 * font.c (xlfd_parse_name): Add const to the arg name. Call
1354 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1355 (xlfd_unparse_name): Handle spacing.
1356 (mfont__init): Initialize new variables.
1357 (mfont__id): Handle spacing.
1358 (mfont__merge): Likewise.
1359 (mfont__set_spec): This function deleted.
1360 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1361 condition of calling mfont__ft_parse_name.
1362 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1363 (mfont_get_prop): Handle properties spacing, ascent, descent,
1365 (mfont_find): Return a realized font.
1366 (mfont_from_name): Add const to the arg name.
1368 * font.h (enum MFontProperty): New member MFONT_SPACING.
1369 (enum MFontSpacing): New enum.
1370 (MFont): New members spacing and max_advance.
1371 (mfont__ft_parse_name): Prototype adjusted.
1372 (mfont__set_spec): Extern deleted.
1373 (mfont__parse_name_into_font): Prototype adjusted.
1375 2005-08-19 Kenichi Handa <handa@m17n.org>
1377 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1379 * font.c (mfont_list): If FONT is null, use a temporary font.
1380 (mfont_parse_name): Add const to the arg name.
1382 2005-08-18 Kenichi Handa <handa@m17n.org>
1384 * word-thai.c: Surround code by #ifdef and #endif to escape from
1387 * font-ft.c: Mostly re-written.
1389 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1390 (FontLayoutCmd): Type of the member otf changed..
1391 (load_otf_command): Adjusted for the format change of otf command.
1392 (load_command): Likewise.
1393 (free_flt_command): Unref cmd->body.otf.
1394 (run_otf): Ajusted for the type change of otf_cmd.
1395 (run_command): Ajusted for the type change of otf_cmd. On
1396 debugging, print ctx->combining_code.
1397 (mfont__flt_run): Initialize ctx's members code_offset,
1398 combining_code, and left_padding to 0.
1400 * face.h (struct MRealizedFace): New member font.
1401 (mface__realize): Prototype adjusted.
1403 * face.c (find_realized_face): New arg font.
1404 (find_realized_face): Adjusted for the change of MFont.
1405 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1406 (mface__fini): Don't call mdebug__report_object.
1407 (mface__realize): New arg font.
1408 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1409 Optimize the latin case.
1410 (mface__free_realized): Free rface->font.
1411 (mface__update_frame_face): Adjusted for the change of mface__realize.
1412 (mface_equal): New function.
1414 * draw.c (Mcommon): New variable.
1415 (visual_order): Args to mfont__encode_char changed.
1416 (compose_glyph_string): Handle Mfont text property.
1417 (layout_glyphs): Adjusted for the change of MFont.
1418 (mdraw__init): Initialize Mcommon.
1419 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1421 * font.h (enum MFontType): Members completely changed.
1422 (enum MFontProperty): Move MFONT_SIZE to the tail.
1423 (enum MFontSource): New enum.
1424 (struct MFont): New members type, source, sizes, file, capability,
1426 (struct MRealizedFont): Type of member font changed. Members
1427 score, status, and encoding deleted.
1428 (MFontScore): New type.
1429 (MFontList): Member changed.
1430 (struct MFontDriver): New member has_char. Types of members
1432 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1433 (Mapple_roman): Extern them.
1434 (OTF_Tag): Typedefed if not HAVE_OTF.
1435 (enum MFontOpenTypeTable): New enum.
1436 (MFontCapability): New type.
1437 (mfont__ft_drive_otf): Prototype adjusted.
1438 (mfont__score): Extern deleted.
1439 (mfont__merge): Extern it.
1440 (mfont__has_char): Extern it.
1441 (mfont__encode_char): Prototype adjusted.
1442 (mfont__open): Extern it.
1443 (mfont__set_spec): Prototype adjusted.
1444 (mfont__get_capability): Extern it.
1446 * font.c: Include "fontset.h".
1447 (M_font_capability, M_font_list, M_font_list_len): New variables.
1448 (font_score_priority): Change order of initial elements.
1449 (font_score_shift_bits): Fix array size.
1450 (common_weight): Add "thin", "semibold", and "heavy".
1451 (common_stretch): Add "ultracondensed", "extracondensed",
1452 "extraexpanded", and "utltraexpand".
1453 (font_weight_regular, font_weight_normal, font_weight_medium): New
1455 (gen_font_name): This function deleted.
1456 (find_encoding): Set font->encoding.
1457 (OTF_tag): New function.
1458 (otf_script_list): New variable.
1459 (load_otf_script_list): New function.
1460 (find_script_from_otf_tag): New function.
1461 (xlfd_parse_name): Set font->type and font->source.
1462 (mfont__free_realized): Free chains rfonts.
1463 (font_score): Renamed from mfont__score.
1464 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1465 (Mapple_roman): New variables.
1466 (mfont__init): Initilize new variables. Initalize
1467 default_encoding.encoding_name and
1468 default_encoding.encoding_charset to Municode_full and
1469 mcharset__unicode. Use SAFE* macros for allocating filepath
1471 (mfont__fini): Free otf_script_list.
1472 (mfont__id): New function.
1473 (mfont__match_p): Check also capability member of MFont.
1474 (mfont__merge): New funciton.
1475 (mfont__set_spec_from_face): Set type and source members.
1476 (mfont__set_spec_from_plist): Set capability and type members.
1477 (mfont__select): Argument changed.
1478 (mfont__available): New function.
1479 (compare_font_score): New function.
1480 (mfont__list): New function.
1481 (mfont__open): Return a realized font.
1482 (mfont__resize): Adjusted for the change of MFont.
1483 (mfont__has_char): New function.
1484 (mfont__encode_char): Argument changed.
1485 (mfont__set_spec): Argument changed.
1486 (free_font_capability): New function.
1487 (mfont__get_capability): New function.
1488 (MFontfile): New variable.
1489 (mfont_get_prop): Adjusted for the change of MFont.
1490 (mfont_put_prop): Likewise.
1491 (mfont_set_selection_priority): Fix the way of setting
1492 font_score_priority[].
1493 (mfont_find): Use mfont__list instead of mfont__select.
1494 (mfont_resize_ratio): Adjusted for the change of MFont.
1495 (mfont_list): Use mfont__list.
1496 (mfont_check): New function.
1497 (font_score): Make it static.
1499 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1500 (mfont__lookup_fontset): Likewise.
1502 * fontset.c (struct MFontset): Delete member font_spec_list.
1503 (struct MRealizedFontset): Type of member spec changed. New
1505 (load_font_group): Arg spec_list deleted.
1506 (load_fontset_contents): Adjusted for the change of fontset_def.
1507 (free_fontset): Fix the way of freeing fontset elements.
1508 (realize_fontset_elements): Argument changed.
1509 (get_per_script): New function.
1510 (free_realized_fontset_elements): Fix the way of feeing rfontset
1512 (update_fontset_elements): Fix args to realize_fontset_elements.
1513 (mfont__realize_fontset): New arg spec.
1514 (try_font_list): New function.
1515 (try_font_group): New arg request. Use try_font_list.
1516 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1518 (mfontset): Adjusted for the change of MFontset.
1519 (mfontset_copy): Likewise. Don't share plists.
1520 (mfontset_modify_entry): Adjusted for the change of MFontset.
1521 (mfontset_lookup): Call get_per_script.
1522 (mdebug_dump_fontset): Print also the address of fonts.
1524 * input.c (shift_state): Don't reset ic_info->vars.
1525 (take_action_list): Call MDEBUG_PRINT fore calling
1528 * internal-gui.h (MFontDriver): Don't typedef it here.
1530 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1531 (MXFont): This type deleted.
1533 (struct _MFontX): New struct.
1534 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1535 (MDisplayInfo): Member base_font_list deleted.
1536 (DEFAULT_FONT): Definition changed.
1537 (FALLBACK_FONT): This maclr deleted.
1538 (free_display_info): Adjusted for the change of MDisplayInfo.
1539 (free_device): Argument to mfont__free_realized changed.
1540 (xfont_driver): Adjusted for the change of MFontDriver.
1541 (xfont_registry_list): Use MFontX instead of MXFont.
1542 (MRealizedFontX): Renamed from MXFontInfo.
1543 (xfont_select): Return the font found first.
1544 (close_xfont): Change MXFontInfo to MRealizedFontX.
1545 (xfont_open): Return the realized font.
1546 (xfont_find_metric): Get xfont from rfont->fontp.
1547 (xfont_has_char): New function.
1548 (xfont_encode_char): Adjusted for the argument change.
1549 (xfont_render): Get xfont from rfont->fontp.
1550 (xfont_list): Adjusted for the argument change.
1551 (MRealizedFontXft): Renamed from MXftFontInfo.
1552 (xft_driver): Ajusted for the change of MFontDriver.
1553 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1554 (xft_open_font): Argument changed.
1555 (xft_open): Argument changed. Return the realized font.
1556 (xft_find_metric): Get xft_font from rfont->fontp.
1557 (xft_has_char, xft_encode_char): New functions.
1558 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1559 font if not yet opened.
1560 (device_open): Don't set frame->font.
1562 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1564 (gd_font_open): New function.
1565 (gd_render): Don't use the local variable ft_info.
1566 (device_init): Adjusted for the change of gd_font_driver.
1568 * textprop.c (mtext__prop_init): Initialize text_property_table.
1569 Call M17N_OBJECT_ADD_ARRAY.
1570 (mtext__prop_fini): Don't call mdebug__report_object.
1572 * plist.c (mplist__init): Initialize plist_table.
1573 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1574 (mplist__fini): Don't call mdebug__report_object.
1576 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1577 (mtext__fini): Don't call mdebug__report_object.
1578 (MTEXT_FORMAT_UTF_16): Correct type.
1579 (mtext_data): New function.
1580 (mtext_text): Fix calculation of limit and args to
1583 * language.c: Include "plist.h".
1584 (M_script_lang_list): New variable.
1585 (mlang__init): Read languages and their information from m17n
1587 (mlanguage__list): New function.
1588 (Miso639_1, Miso639_2): New variables.
1590 * language.h (mlanguage__list): Extern it.
1592 * database.c (get_database_stream): Use SAFE_* macros for
1593 allocating and freeing path.
1594 (mdatabase__init): Likewise.
1596 * symbol.c (msymbol__fini): Don't free symbols here.
1597 (msymbol__free_table): New function.
1598 (msymbol_is_managing_key): New function.
1600 * symbol.h (msymbol__free_table): Extern it.
1601 (msymbol__list): Extern it.
1603 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1605 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1606 (struct _M17NObjectArray): New member name and next.
1607 (mdebug__add_object_array): Extern it.
1608 (M17N_OBJECT_ADD_ARRAY): New macro.
1609 (mdebug__report_object): Don't extern it.
1611 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1613 * m17n-gui.c (free_frame): Don't free frame->font.
1614 (null_device_fini): Fix code for freeing
1615 null_device.realized_font_list.
1616 (m17n_fini_win): Free interface.
1617 (mframe): Cast the return value of dlsym. Set frame->font here.
1618 (mframe_get_prop): Check frame->rface->rfont before accessing the
1621 * m17n-gui.h (Mfontfile): Extern it.
1622 (mfont_check): Extern it.
1623 (mface_equal): Extern it.
1625 * m17n-core.c: Include "symbol.h".
1626 (report_header_printed): This variable deleted.
1627 (object_array_root): New variable.
1628 (report_object_array): New function.
1629 (mdebug__report_object): This function deleted.
1630 (mdebug__add_object_array): New function.
1631 (m17n_init_core): Call mchartable_init () before mtext_init ().
1632 (m17n_fini_core): Call report_object_array (if necessary) and
1633 msymbol__free_atable at the end.
1635 * m17n-core.h (msymbol_is_managing_key): Extern it.
1636 (mtext_data): Extern it.
1637 (MTEXT_FORMAT_UTF_16): Correct type.
1638 (M17NLIB_MINOR_VERSION): Changed to 3.
1639 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1641 * chartab.c (mchartable__init): Initalize chartable_table.count.
1642 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1643 mdebug__report_object.
1645 2005-05-26 Kenichi Handa <handa@m17n.org>
1647 * m17n.h (Miso639_1, Miso639_2): Extern them.
1649 * symbol.h (msymbol__list): Extern it.
1651 * symbol.c (msymbol__list): New function.
1653 2005-05-19 Kenichi Handa <handa@m17n.org>
1655 * input-gui.c (minput__win_init): Don't change the value of
1658 2005-05-16 Kenichi Handa <handa@m17n.org>
1660 * m17n-core.c (m17n_object): Be sure to initialize all members.
1662 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1664 2005-05-09 Kenichi Handa <handa@m17n.org>
1666 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1668 2005-04-27 Kenichi Handa <handa@m17n.org>
1670 * language.c (mlang__init): Add "an" (Aragonese).
1672 * word-thai.c: Add support for libthai.
1673 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1674 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1676 * mtext.c: Include "word-thai.h" conditionaly.
1677 (mtext__init): Call mtext__word_thai_init conditionaly.
1678 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1680 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1681 not WORDCUT_LD_FLAGS.
1683 2005-04-19 Kenichi Handa <handa@m17n.org>
1685 * word-thai.c (wordseg_propertize): Always unref the attached
1687 (thai_wordseg): Don't unref the property.
1689 2005-04-18 Kenichi Handa <handa@m17n.org>
1691 * word-thai.c: Include stdlib.h.
1692 (wordseg_propertize): Add dummy function for the case that wordcut
1693 library doesn't exist.
1694 (wordseg_propertize): Fix for old wordcut library.
1696 2005-04-16 Kenichi Handa <handa@m17n.org>
1698 * word-thai.c: Include <stdio.h>.
1700 2005-04-15 Kenichi Handa <handa@m17n.org>
1702 * draw.c: Include mtext.h.
1703 (linebreak_table, M_break_at_space, M_break_at_word)
1704 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1705 (compose_glyph_string): Check POS before getting Mface text
1707 (truncate_gstring): Give correct TO arg to line_break function.
1708 (GET_LB_TYPE): New macro.
1709 (find_break_backward, find_break_forward): New functions.
1710 (mdraw__init): Initialize the above new variables.
1711 (mdraw__fini): Free linebreak_table.
1712 (mdraw_default_line_break): Use find_break_backward and
1715 * word-thai.c: New file.
1717 * word-thai.h: New file.
1719 * mtext.c: Include word-thai.h.
1720 (wordseg_func_table): New variable.
1721 (mtext__init): Initialize wordseg_func_table and call
1722 mtext__word_thai_init.
1723 (mtext__fini): Call mtext__word_thai_fini, free
1725 (MTextWordsegFunc): New type.
1726 (mtext__word_segment): New function.
1728 * mtext.h (wordseg_func_table): Extern it.
1729 (mtext__word_segment): Extern it.
1731 * m17n.c (m17n_init): Fix typo (== -> =).
1733 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1734 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1736 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1737 (MTEXTPROP_VAL): New macros.
1739 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1741 2005-04-07 Kenichi Handa <handa@m17n.org>
1743 * database.c (load_chartable): Fix pursing of symbol name.
1745 2005-03-24 Kenichi Handa <handa@m17n.org>
1747 * m17n.c (m17n_init): Fix typo (== -> =).
1749 2005-03-11 Kenichi Handa <handa@m17n.org>
1751 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1753 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1755 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1758 2005-03-09 handa <handa@m17n.org>
1760 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1761 calling m17n_init ().
1763 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1764 calling m17n_init_core ().
1766 2005-02-28 Kenichi Handa <handa@m17n.org>
1768 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1771 2005-02-17 Kenichi Handa <handa@m17n.org>
1773 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1774 (M_description, M_command, M_variable): New variables.
1775 (load_im_info_keys): New variables.
1776 (load_im_info, check_command_keyseq, get_description_advance)
1777 (parse_command_list, get_command_list, parse_variable_list)
1778 (get_variable_list, input_method_hook): New functions.
1779 (command_list, variable_list): New variables.
1780 (minput__init): Put input_method_hook to Minput_method.
1781 Initialize M_description, M_command, M_variable, Mdetail_text,
1782 load_im_info_keys, command_list, variable_list.
1783 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1784 (Mdetail_text): New variable.
1785 (minput_get_description, minput_get_commands)
1786 (minput_assign_command_keys, minput_get_variables)
1787 (minput_set_variable): New functions.
1789 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1790 (minput_assign_command_keys, minput_get_variables)
1791 (minput_set_variable): Extern them.
1793 * plist.c (UNGETC): Just decrement st->p.
1794 (read_mtext_element): New arg skip.
1795 (read_integer_element): Likewise.
1796 (read_symbol_element): Likewise.
1797 (read_element): New arg KEYS.
1798 (mplist__from_plist): Don't increment ref-count of NULL object.
1799 (mplist__from_file): New arg KEYS.
1800 (mplist_put): Don't increment ref-count of NULL object.
1801 (mplist_add): Likewise.
1802 (mplist_push): Likewise.
1803 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1805 * plist.h (mplist__from_file): Prototype adjusted.
1807 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1808 (get_database_stream): New function.
1809 (load_database): Use get_database_stream.
1810 (M_database_hook): New variable
1811 (mdatabase__init): Initialize M_database_hook.
1812 (mdatabase__load_for_keys): New function.
1813 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1815 (mdatabase_define): Free mdb->extra_info if necessary.
1817 * database.h (mdatabase__dir_list, M_database_hook)
1818 (mdatabase__load_for_keys): Extern them.
1819 (MDatabaseHookFunc): New type.
1821 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1823 2004-12-27 Kenichi Handa <handa@m17n.org>
1825 * Version 1.2.0 released.
1827 2004-12-27 Kenichi Handa <handa@m17n.org>
1829 * input.c (minput_filter): Don't reset ic->xxx_changed.
1831 * mtext.c (mtext_from_data): Fix documentation.
1833 2004-12-25 Kenichi Handa <handa@m17n.org>
1835 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1836 (M17NLIB_VERSION_NAME): Update to "1.2.".
1838 2004-12-24 Kenichi Handa <handa@m17n.org>
1840 * input.c (reset_ic): Set key_unhandled to 0.
1842 2004-12-21 Kenichi Handa <handa@m17n.org>
1844 * m17n-gui.h (mfont_from_spec): Delete extern.
1846 * input-gui.c (win_callback): Handle Minput_reset.
1847 (minput__win_init): Register reset_ic as a callback for
1850 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1851 changed. At first, shift to the initial state.
1852 (minput__init): Initialize Minput_reset. Register reset_ic as a
1853 callback for Minput_reset.
1854 (Minput_reset): New variable.
1855 (minput_filter): Always set ic->xxx_changed to 0.
1856 (minput_reset_ic): New function.
1857 (integer_value): Fix typo ('>' -> '<') and calculation of length
1860 * m17n-core.c (merror_code): Change type to `int'.
1862 * m17n-misc.h (merror_code): Adjust type.
1864 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1866 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1867 (mtext_change_prop): Delete extern.
1869 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1870 to `int'. Move the documents to m17n-core.h.
1872 2004-12-13 Kenichi Handa <handa@m17n.org>
1874 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1875 (MTextProperty): Document it.
1877 2004-12-09 Kenichi Handa <handa@m17n.org>
1879 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1881 2004-12-03 Kenichi Handa <handa@m17n.org>
1883 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1884 m17n__gui_initialized): New externs.
1886 * m17n-core.h (enum M17NStatus): New enum.
1887 (m17n_status): Extern it.
1889 * m17n-core.c (core_initialized): Delete this variable.
1890 (m17n__core_initialized, m17n__shell_initialized,
1891 m17n__gui_initialized): New variables.
1892 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1893 instead of core_initialized.
1894 (m17n_status): New function.
1896 * m17n.c (shell_initialized): Delete this variable.
1897 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1900 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1902 * m17n-gui.c (win_initialized): Delete this variable.
1903 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1904 instead of gui_initialized.
1906 2004-11-19 Kenichi Handa <handa@m17n.org>
1908 * input.c (reset_ic): Check if ic_info->state is NULL.
1909 (filter): If ic_info->state is NULL, return 0.
1910 (load_input_method): Don't unref `maps' it it's not created.
1912 2004-11-15 Kenichi Handa <handa@m17n.org>
1914 * input.c (find_candidates_group): If INDEX is -1, find the last
1916 (take_action_list): If the previous of the first candidate is
1917 requested, select the last candidate.
1919 2004-11-08 Kenichi Handa <handa@m17n.org>
1921 * m17n-X.c (device_open): Try at most 32 fonts to find a
1922 non-autoscaled font.
1924 * font.c (xlfd_parse_name): Fix previous change.
1926 2004-11-05 Kenichi Handa <handa@m17n.org>
1928 * font.c: (commont_style): Include dummy elements "slanted" and
1929 "rslanted" to prefer "o" to "r" if "i" is requested.
1931 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1933 2004-10-29 Kenichi Handa <handa@m17n.org>
1935 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1937 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1938 New members smallest and larger.
1939 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1940 (xfont_registry_list): Likewise.
1941 (xfont_select): Likewise.
1944 2004-10-28 Kenichi Handa <handa@m17n.org>
1946 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1947 font name comparison.
1948 (xfont_select): Fix logic for selecting a larger size font.
1950 2004-10-25 Kenichi Handa <handa@m17n.org>
1952 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1955 2004-10-22 Kenichi Handa <handa@m17n.org>
1957 * input.c (update_candidate): Renamed from udpate_candidate.
1958 (take_action_list): Show more debugging info on arithmetic commands.
1960 * m17n-X.c (device_open): Fix previous change.
1962 * draw.c (compose_glyph_string): Don't get face property at the
1965 2004-10-21 Kenichi Handa <handa@m17n.org>
1967 * draw.c (compose_glyph_string): Fix for the case of category
1970 2004-10-19 Kenichi Handa <handa@m17n.org>
1972 * input.c (mdebug_mask): New variable.
1973 (shift_state): Print debug information.
1974 (take_action_list): Likewise.
1975 (handle_key): Likewise.
1977 2004-10-14 Kenichi Handa <handa@m17n.org>
1979 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1981 2004-10-13 Kenichi Handa <handa@m17n.org>
1983 * m17n-X.c (device_open): Be sure to register at least one font
1986 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1987 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1989 2004-10-12 Kenichi Handa <handa@m17n.org>
1991 * draw.c (alloc_gstring): Fix previous change.
1993 * font-ft.c (ft_list_generic): Fix for the case of not
1996 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1998 * font.c (mfont_list): If no font is found, return NULL.
1999 (load_font_encoding_table): Put entries of nil registry first.
2000 (find_encoding): Adjust for the above change.
2002 2004-10-11 Kenichi Handa <handa@m17n.org>
2004 * m17n-gui.h (mfont_list): Adjust prototype.
2006 * m17n-X.c (xfont_list): New arg maxnum.
2008 * font.h (struct MFontDriver): Change prototype of <list>.
2010 * font-ft.c (fc_generic_family_list): Delete it.
2011 (Mserif, Msans_serif, Mmonospace): Delete them.
2012 (M_generic_family_info): New variable.
2013 (enum GenericFamilyType): New enum.
2014 (struct GenericFamilyInfo): New struct.
2015 (generic_family_table): New variable.
2016 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2018 (add_font_info): Get style here.
2019 (ft_list_family): Don't initialize fc_config here. Don't list
2021 (ft_list_generic): New function.
2022 (ft_select): Pay attention to generic familes here.
2023 (ft_open): Fix calculation of ascent and descent.
2024 (ft_list): Pay attention to generic families.
2025 (mfont__ft_init): Initialize M_generic_family_info,
2026 generic_family_table, and fc_config..
2027 (mfont__ft_fini): Finalize generic_family_table.
2029 * draw.c (compose_glyph_string): Use more constant font for
2030 glyphs. Adjust for the member change in MGlyph.
2031 (layout_glyph_string): Adjust for the member change in MGlyph.
2032 (alloc_gstring): Intilize scracth_glyph to avoid
2033 compose_glyph_string on it.
2034 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2035 (mdraw_coordinates_position): Fix previous change.
2037 * internal-gui.h (glyph_category): New enum.
2038 (MGlyph): Change type of <category> to enum glyph_category.
2040 * face.c (mface__realize): Delete args langauge and charset.
2041 (mface__for_chars): Fix for the case that glyphs have different
2043 (mface__update_frame_face): Adjust for mface__realize change.
2045 * face.h (mface__realize): Adjust prototype.
2047 2004-10-05 Kenichi Handa <handa@m17n.org>
2049 * language.c (mlang__init): Add Akan.
2051 2004-10-04 Kenichi Handa <handa@m17n.org>
2053 * font-ft.c (add_font_info): Add instead of push the element.
2054 (ft_list_family): For generic fonts, try all
2055 substituted. families.
2057 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2058 (run_rule): Don't update cluster range here.
2059 (run_command): Update cluster range on appending a glyph.
2060 (run_otf): Update cluster range for glyphs generated by OTF.
2062 2004-10-02 Kenichi Handa <handa@m17n.org>
2064 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2066 2004-09-30 Kenichi Handa <handa@m17n.org>
2068 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2070 2004-09-30 Kenichi Handa <handa@m17n.org>
2072 * font.h: Include <fontconfig/fontconfig.h>.
2073 (MFTInfo): New member langset.
2074 (mfont__encoding_list): Extern it.
2076 * font.c (mfont__encoding_list): New function.
2077 (mdebug_dump_font_list): New function.
2079 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2080 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2082 (ft_family_list): New variable.
2083 (set_font_info): New arg basep. Callers changed.
2084 (fc_list): Check the return value of FcPatternGetString.
2085 (add_font_info): New arg plist. Callers changed. Update
2087 (ft_list_family): New function (merged fc_list and ft_list_all).
2088 (ft_select): Use ft_list_family.
2089 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2091 (mfont__ft_init): Initialize above new variables.
2092 (mfont__ft_fini): Free ft_family_list.
2093 (STRDUP_LOWER): New macro.
2094 (set_font_info): Use STRDUP_LOWER.
2095 (ft_list_family): Avoid duplicate addition of font path. Use
2097 (fc_decode_prop): Fix typo.
2099 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2100 (xfont_registry_list): Change argument disp_info to frame.
2102 (xfont_list_all): New function.
2103 (xfont_list): If FONT is not NULL, check all fonts.
2105 2004-09-28 Kenichi Handa <handa@m17n.org>
2107 * m17n-X.c (MXFont, MXFontList): New types.
2108 (MDisplayInfo): Delete members font_registry_list,
2109 iso8859_1_family_list, iso10646_1_family_list, new members
2110 font_list, base_font_list.
2111 (free_display_info): Adusted for the change of MDisplayInfo.
2112 (xfont_driver): Initialize with xfont_list.
2113 (font_compare): New function.
2114 (build_font_list): Deleted.
2115 (xfont_registry_list): New function.
2116 (xfont_select): Use xfont_registry_list.
2117 (xfont_list): New function.
2118 (device_open): Adusted for the change of MDisplayInfo.
2120 * font-ft.c (add_font_info): New arg languages. Callers changed.
2121 (fc_list): Get languages from fonts..
2122 (ft_list_all): Renamed from ft_list. Callers changed.
2123 (ft_list): New function.
2124 (mfont__ft_driver): Initalize with ft_list.
2126 * font.c (mfont_list): New function.
2128 * font.h (struct MFontDriver): New member `list'.
2129 (MFTInfo): New member languages.
2131 * m17n-gui.h (mfont_list): Extern it.
2133 2004-09-27 Kenichi Handa <handa@m17n.org>
2135 * internal-gui.h (struct MGlyphString): Delete members mt,
2136 sub_width, sub_lbrearing, sub_rbearing, and region.
2138 * draw.c (MSubTextExtents): New type.
2139 (layout_glyphs): New arg extents. Set its members.
2140 (layout_glyph_string): Adjusted for the above change.
2141 (alloc_gstring): Don't set gstring->mt.
2142 (truncate_gstring): Call line_break function with mt instead of
2145 2004-09-22 Kenichi Handa <handa@m17n.org>
2147 * mtext.c (count_utf_16_chars): Count each code of invalid
2150 2004-09-19 Kenichi Handa <handa@m17n.org>
2152 * mtext.c (default_utf_16, default_utf_32): Rename them to
2153 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2156 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2159 2004-09-13 Kenichi Handa <handa@m17n.org>
2161 * draw.c (Mlatin): Don't declare it here.
2162 (visual_order): Fix reordering of combining characters.
2163 (compose_glyph_string): Fix detection of script.
2164 (layout_glyphs): Don't fix reordering of combining characters
2166 (layout_glyph_string): Pay attention to
2167 control->disable_overlapping_adjustment.
2168 (truncate_gstring): Include at least on character in a line.
2169 (get_gstring): Always scan one full line.
2170 (mdraw__init): Don't initialize Mlatin here.
2171 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2172 have a font, use ascent/descent of an ASCII font. Allow
2173 ink_array_return and logical_array_return to be NULL.
2174 (mdraw_coordinates_position): Fix iteration.
2176 * font-ft.c (MFTtoProp): Member completely changed.
2177 (ft_to_prop): Adjusted for the above change.
2178 (ft_to_prop_size): Likewise.
2179 (set_font_info): Adjusted for the change of MFTtoProp.
2180 (fc_generic_family_list): New variable.
2181 (fc_list): Add special handling of generic font names.
2182 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2183 Initialize fc_generic_family_list.
2184 (mfont__ft_fini): Don't free ft_to_prop. Free
2185 fc_generic_family_list.
2186 (FC_vs_M17N_font_prop): New type.
2187 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2188 (fc_decode_prop, fc_encode_prop): New functions.
2189 (mfont__ft_parse_name): Use fc_decode_prop.
2190 (mfont__ft_unparse_name): Use fc_encode_prop.
2192 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2193 (MWDevice): Add member realized_font_list.
2194 (free_display_info): Don't free disp_info->realized_font_list.
2195 (free_device): Free device->realized_fontset_list.
2196 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2197 (device_open): Don't initialize disp_info->realized_font_list.
2198 (device_open): Initialize device->realized_font_list and set it to
2199 frame->realized_font_list.
2201 * fontset.c (try_font_group): New function.
2202 (mfont__lookup_fontset): Use try_font_group.
2204 * font.c (common_weight): Change the order of "regular".
2206 * face.c (Mlatin): Don't make it static.
2207 (mface__realize): Be sure to set work_gstring.frame.
2208 (mface__for_chars): Likewise.
2210 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2213 * internal-gui.h (Mlatin): Extern it.
2215 * m17n-gui.h (MDrawControl): New member
2216 disable_overlapping_adjustment.
2218 2004-09-06 Kenichi Handa <handa@m17n.org>
2220 * font-flt.c (run_otf): Fix typo ('}'->']').
2222 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2223 (COMBINING_PRECOMPUTED_P): New macros.
2225 * draw.c (layout_glyphs): Handle precomputed combining code.
2227 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2228 precomupted combining code.
2230 2004-09-03 Kenichi Handa <handa@m17n.org>
2232 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2235 2004-08-27 Kenichi Handa <handa@m17n.org>
2237 * face.c (mface_put_prop): If the new value is the same as the
2238 current one, don't increment frame->tick.
2240 2004-08-25 Kenichi Handa <handa@m17n.org>
2242 * fontset.c (mfontset): Initialize font_spec_list member.
2243 (mfontset_copy): Load fontset if necessary.
2245 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2246 'metrics' to for C++.
2248 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2251 2004-08-16 Kenichi Handa <handa@m17n.org>
2253 * Version 1.1.0 released.
2255 2004-08-13 Kenichi Handa <handa@m17n.org>
2257 * language.c (mlang__init): Add Dhivehi.
2259 * m17n-gui.c (Mx, Mfreetype): Delete it.
2260 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2262 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2263 (mfont_resize_ratio): Extern it.
2264 (MDrawGlyphInfo): New member logical_width;
2265 (MDrawGlyph): New type.
2266 (mdraw_glyph_list): Prototype adjusted.
2268 * m17n-X.c (xfont_open): Set type and fontp members.
2269 (xft_open): Likewise.
2271 * internal-gui.h (Mx, Mfreetype): Delete extern.
2273 * font.h (struct MRealizedFont): New member type and fontp.
2275 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2276 (Mx, Mfreetype): Declare here.
2277 (Mxft): New variable.
2278 (mfont_resize_ratio): New function.
2280 * font-ft.c (ft_open): Set type and fontp members.
2282 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2285 2004-08-11 Kenichi Handa <handa@m17n.org>
2287 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2290 2004-08-06 Kenichi Handa <handa@m17n.org>
2292 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2295 * font-flt.c (run_otf): Print debugging information if necessary.
2297 2004-08-05 Kenichi Handa <handa@m17n.org>
2299 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2300 positioning_type 5 and 6. Switch simplified.
2302 2004-08-04 Kenichi Handa <handa@m17n.org>
2304 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2306 2004-08-02 Kenichi Handa <handa@m17n.org>
2308 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2309 set val to 1 even if it is greater than 1.
2311 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2313 2004-07-29 Kenichi Handa <handa@m17n.org>
2315 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2316 debugging information.
2318 * internal.h (MDEBUG_PRINT5): New macro.
2320 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2321 the previous one if the zero width glyph has left or right
2324 2004-07-26 Kenichi Handa <handa@m17n.org>
2326 * m17n-X.c (xft_render): Pay attention to members left_padding and
2327 right_padding of MGlyph.
2329 * draw.c (visual_order): Allocate one more elements for arrays as
2330 a workaround of fribidi bug.
2331 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2332 instead of MGlyph->bidi_sensitive.
2333 (layout_glyph_string): Pay attentinon to
2334 control->orientation_reversed when padding at the head or tail.
2335 Fix adjustment of space glyph width.
2336 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2339 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2340 instead of MGlyph->bidi_sensitive.
2342 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2344 2004-07-26 Kenichi Handa <handa@m17n.org>
2346 * draw.c (visual_order): Don't treat combined glyphs specially.
2347 (layout_glyphs): Don't get metrics glyphs that are already ready.
2348 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2349 width with the previous one.
2350 (draw_background): Fix bar cursor position on a r2l glyph.
2352 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2353 (run_rule): Fix place of updating cluster_begin_pos and
2354 cluster_end_pos here.
2355 (run_otf): Don't set left_padding.
2357 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2359 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2360 Fix handling of GPOS.
2361 (mfont__ft_drive_gpos): Delete this function.
2363 * font.h (mfont__ft_drive_otf): Renamed back from
2364 mfont__ft_drive_gsub.
2365 (mfont__ft_drive_gpos): Delete extern.
2367 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2368 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2370 2004-07-23 Kenichi Handa <handa@m17n.org>
2372 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2373 the same bidi level.
2375 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2377 2004-07-22 Kenichi Handa <handa@m17n.org>
2379 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2381 2004-07-20 Kenichi Handa <handa@m17n.org>
2383 * draw.c (render_glyphs): Fix checking of g->code validity.
2385 * face.c (mface__realize): Set g.type.
2387 2004-07-18 Kenichi Handa <handa@m17n.org>
2389 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2392 * m17n-gui.c (mframe): Print error message give by dlopen to
2395 2004-07-16 Kenichi Handa <handa@m17n.org>
2397 * draw.c (compose_glyph_string): Improve the way of deciding a
2398 script. For a character that doesn't have script property, use
2399 the last non-latin script.
2401 * font-ft.c (fc_list): Cancel previous change.
2402 (mfont__ft_init): Add more entries in ft_to_prop_name.
2404 2004-07-15 Kenichi Handa <handa@m17n.org>
2406 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2407 previous or next character glyphs.
2409 2004-07-14 Kenichi Handa <handa@m17n.org>
2411 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2412 of type GLYPH_SPACE.
2414 * fontset.c (mfont__lookup_fontset): If glyph type is
2415 GLYPH_SPACE, get codes for SPACE.
2417 * internal-gui.h (Mfont): Delete extern.
2419 * m17n-gui.h (Mfont): Delete duplicated extern.
2421 2004-07-13 Kenichi Handa <handa@m17n.org>
2423 * font-ft.c (DEVICE_DELTA): New macro.
2424 (adjust_anchor): New function.
2425 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2427 (mfont__ft_drive_gpos): New function.
2429 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2430 (FontLayoutContext): Delete member `rfont'.
2431 (run_otf): Set g->otf_cmd. Call
2432 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2433 only whne HAVE_OTF is defined.
2435 * fontset.c: Include "config.h".
2437 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2438 (MGlyph): New member otf_cmd.
2440 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2441 (mfont__ft_drive_gpos): Extern it.
2443 * face.c: Include "config.h".
2445 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2447 * input-gui.c: Include "config.h".
2449 * plist.c: Include "config.h".
2451 2004-07-06 Kenichi Handa <handa@m17n.org>
2453 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2454 internal-gui.h: Cancel previous changes.
2456 * m17n-gd.h: Delete it.
2458 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2459 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2460 @XML2_LD_FLAGS@ to above.
2461 (libm17n_la_LIBADD): Add -ldl.
2462 (libm17n_la_LDFLAGS): Add -export-dynamic.
2463 (X_LD_FLAGS): Fix the order of linking.
2464 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2465 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2466 (libm17n_X_la_LDFLAGS): Add -module.
2467 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2468 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2469 (libm17n_gd_la_LDFLAGS): Add -module.
2470 (include_HEADERS): Delete m17n-gd.h.
2472 2004-06-30 Kenichi Handa <handa@m17n.org>
2474 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2475 (MDeviceLibraryInterface): Delete it.
2476 (register_device_library): Delete it.
2477 (m17n__device_library_list): Renamed from device_library_list.
2479 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2480 (m17n_init_win): Adjust prototype.
2482 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2483 (m17n_init_gd): New function.
2485 * m17n-gd.h: New file.
2487 * m17n-X.h: Include <m17n-gui.h>.
2488 (m17n_init_X): Extern it.
2489 (M17N_INIT): Redefine it.
2491 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2492 (m17n_init_X): New function.
2494 * internal-gui.h (m17n__device_library_list): Extern it.
2495 (struct MDeviceDriver): New members initialized, init, and fini.
2497 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2499 (libm17n_X_la_LIBADD): Delete aboves.
2500 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2501 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2502 (libm17n_gd_la_LDFLAGS): Delete it.
2503 (include_HEADERS): Add m17n-gd.h.
2505 2004-06-25 Kenichi Handa <handa@m17n.org>
2507 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2508 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2510 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2512 * font-ft.c (fc_list): If FcFontList finds no font, try
2515 * draw.c (compose_glyph_string): Terminate the last loop after
2516 doing default combining if necessary.
2518 2004-06-24 Kenichi Handa <handa@m17n.org>
2520 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2522 * character.c (mchar_define_property): Add const to an arg.
2524 * charset.c (mchar_define_charset): Add const to an arg.
2526 * coding.c (MCodingSystem): Add const to an arg or decoder.
2527 (finish_decoding): Add const to an arg.
2528 (decode_coding_charset, decode_coding_utf_8)
2529 (decode_coding_utf_16, decode_coding_utf_32)
2530 (decode_coding_iso_2022, decode_coding_sjis)
2531 (mconv_define_coding): Likewise.
2533 * m17n-X.c (xft_find_metric): Delete unused variable.
2535 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2538 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2541 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2542 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2544 * mtext.h (mtext__from_data): Ajust prototype.
2546 2004-06-23 Kenichi Handa <handa@m17n.org>
2548 * draw.c (compose_glyph_string): Always get glyph codes by
2550 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2551 (mdraw_glyph_list): New function.
2553 * font-flt.c (mfont__flt_run): Be sure to call
2554 rfont->driver->encode_char.
2556 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2557 (ft_encode_char): Delete arg C.
2558 (ft_render): Don't call FT_Get_Char_Index.
2560 * font.c (mfont__encodable_p): Delete it.
2561 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2563 * font.h (struct MFontDriver): Delete arg C of encode_char.
2564 (mfont__encodable_p): Delete extern.
2566 * m17n-X.c (xfont_encode_char): Delete arg C.
2567 (xft_find_metric): Don't cal FT_Get_Char_Index.
2568 (xft_render): Likewise.
2570 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2572 (mdraw_glyph_list): Extern it.
2574 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2576 2004-06-22 Kenichi Handa <handa@m17n.org>
2578 * m17n-gui.h (mfontset_lookup): Extern it.
2580 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2582 * fontset.c (realize_fontset_elements)
2583 (free_realized_fontset_elements, update_fontset_elements): New
2585 (mfont__realize_fontset): Call realize_fontset_elements.
2586 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2587 (mfont__lookup_fontset): If a fontset was modified, update
2588 the realized fontset.
2589 (mfontset_modify_entry): Increment fontset->tick.
2590 (mfontset_lookup): New function.
2592 2004-06-21 Kenichi Handa <handa@m17n.org>
2594 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2596 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2597 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2598 length of source text 0.
2600 2004-06-21 Kenichi Handa <handa@m17n.org>
2602 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2603 (compare): Pay attention to format other than utf-8.
2604 (copy): Delete this function.
2605 (count_by_utf_8, count_by_utf_16, insert): New functions.
2606 (count_utf_16_chars): Fix handling of a surrogate pair.
2607 (find_char_forward, find_char_backward): Likewise.
2608 (mtext__from_data): Delete unnecessary check. Fix number of
2610 (mtext_from_data): Don't count items.
2611 (mtext_ref_char): Optimize the code.
2612 (mtext_set_char): Pay attention to format other than utf-8.
2613 (mtext_cat_char): Likewise.
2614 (mtext_dup): Don't call copy, instead do allocation here.
2615 (mtext_cat): Call insert instead of copy.
2616 (mtext_ncat): Likewise.
2617 (mtext_cpy): Delete character at first and call insert instead of
2619 (mtext_ncpy): Likewise.
2620 (mtext_copy): Likewise.
2621 (mtext_duplicate): Call insert instead of copy.
2622 (mtext_del): Pay attention to format other than utf-8.
2623 (mtext_ins): Simply call insert.
2624 (mtext_ins_char): Pay attention to format other than utf-8.
2625 (mtext_tok): Call insert instead of copy.
2626 (mtext_text): Call UNIT_BYTES.
2628 * textprop.c (mtext__adjust_plist_for_change): New function.
2630 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2631 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2632 (CHAR_UNITS_AT): Fix typo.
2633 (CHAR_UNITS_BY_HEAD): Fix typo.
2634 (STRING_CHAR_AND_UNITS): Fix typo.
2636 * internal.h (MTEXT_READ_ONLY_P): New macro.
2638 * mtext.h (mtext__replace): Delete the extern.
2639 (mtext__adjust_foramt): Adjust prototype.
2641 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2642 if possible. Otherwise make a copy of mmt.
2644 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2647 2004-06-18 Kenichi Handa <handa@m17n.org>
2649 * character.h (CHAR_STRING_UTF16): Fix syntax.
2651 2004-06-16 Kenichi Handa <handa@m17n.org>
2653 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2654 (libm17n_X_la_LIBADD): Delete it.
2655 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2657 * m17n-X.c (device_open): Add parens in `if' condition.
2659 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2660 (DEC_POSITION): Likewise.
2661 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2663 2004-06-15 Kenichi Handa <handa@m17n.org>
2665 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2668 * draw.c (compose_glyph_string): If langauge is specified, call
2669 mface__for_chars even if a text is all latin. Fix condition for
2670 setting non_ascii_found.
2672 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2674 * m17n.h (minput_char_to_key): Delete extern.
2676 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2678 * m17n-gui.c (null_device_open): Set several members of frame.
2680 2004-06-14 Kenichi Handa <handa@m17n.org>
2682 * m17n-gui.h (minput_event_to_key): Delete extern.
2684 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2686 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2688 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2690 2004-06-08 Kenichi Handa <handa@m17n.org>
2692 * character.c (mchar_put_prop): Don't increment the ref-count of
2695 2004-06-04 Kenichi Handa <handa@m17n.org>
2697 * m17n-core.c (mdebug__register_object): New function.
2698 (mdebug__unregister_object): Likewise.
2700 * internal.h (mdebug__register_object, mdebug__unregister_object):
2702 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2705 * charset.c (mcharset__load_from_database): Don't call
2706 mconv__register_charset_coding here.
2708 * coding.c (find_coding): Get a real name from an element of
2709 coding_definition_list.
2710 (mconv__register_charset_coding): Set the real name at the top of
2712 (mcoding__load_from_database): Likewise.
2713 (mconv_list_codings): Adjusted for the above change.
2715 2004-06-03 Kenichi Handa <handa@m17n.org>
2717 * coding.c (find_coding): Find by canonicalized name. Don't have
2718 to modify the element of coding_definition_list by
2720 (mconv__define_coding_from_charset): Delete it.
2721 (mconv__register_charset_coding): Canonicalize sym.
2722 (mcoding__load_from_database): Register plist modified by
2725 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2727 * font-ft.c (ft_open): Fix setting of rfont->descent.
2729 2004-06-02 Kenichi Handa <handa@m17n.org>
2731 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2732 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2733 (xlfd_unparse_name): Renamed from xfont_build_name.
2734 (mfont__init): Initialized Mfontconfig.
2735 (mfont__free_realized): Unconditionally unref rfont->info.
2736 (mfont__select): Free `this' if it's not best.
2737 (mfont__open): Don't check frame->realized_font_list.
2738 (mfont__parse_name_into_font): New function.
2739 (Mfontconfig): New variable.
2740 (mfont_from_name): Call mfont_parse_name.
2741 (mfont_name): Call mfont_unparse_name.
2742 (mdebug_dump_font): Likewise.
2744 * font.h (struct MFontDriver): Delete members parse_name and
2746 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2747 (mfont__parse_name_into_font): Extern it.
2749 * font-ft.c: Include "symbol.h".
2750 (close_ft): Unconditionally free filename and charmap_list of
2752 (ft_open): Duplicate base->filename. Increment ref-count of
2753 ft_info->charmap_list. Free ft_info->charmap_list and
2754 ft_info->filename on error.
2755 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2757 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2759 (enum xlfd_field_idx): Moved to font.c.
2760 (split_font_name, build_font_name): Likewise.
2761 (build_font_list): Call mfont__parse_name_info_font.
2762 (xfont_open): Call mfont__unparse_name. Free name.
2763 (xfont_parse_name, xfont_build_name): Moved to font.c
2764 (xft_select): Prototype deleted.
2765 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2766 Call mfont_pase_name.
2768 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2769 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2772 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2775 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2777 2004-06-01 Kenichi Handa <handa@m17n.org>
2779 * fontset.c (mfontset_modify_entry): Pay attention to the case
2780 that fontset->font_spec_list is NULL.
2782 2004-05-31 Kenichi Handa <handa@m17n.org>
2784 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2786 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2788 * font.c (mfont__select): Print score the a font for debugging.
2790 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2792 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2793 kanji_sym and kana_sym.
2795 2004-05-28 Kenichi Handa <handa@m17n.org>
2797 * Makefile.am (VINFO): New variable.
2798 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2799 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2801 2004-05-27 Kenichi Handa <handa@m17n.org>
2803 The following chanages are to make device dependent functions
2804 accessible only from MDeviceDriver structure, and to add GD and
2805 null device drivers. Font drivers get also device dependent.
2807 * m17n.c (m17n_init): Increament shell_initialized.
2808 (m17n_fini): Decremented shell_initialized.
2810 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2812 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2813 (Mwidget, Mcolormap, Mx): Extern them.
2815 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2816 (free_frame): Call frame->driver->close instead of
2818 (DLOPEN_SHLIB_EXT): New macro.
2819 (MDeviceLibraryInterface): New type.
2820 (device_library_list): New variable.
2821 (register_device_library): New function.
2822 (null_device): New variable.
2823 (null_device_close, null_device_get_prop)
2824 (null_device_realize_face, null_device_free_realized_face): New
2826 (null_driver): New variable.
2827 (null_device_init, null_device_fini, null_device_open): New
2829 (null_interface): New variable.
2830 (Mfreetype, Mdevice): Declare them.
2831 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2832 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2833 Mwin__Close_Device. Register drivers for Mx and Mgd.
2834 (m17n_fini_win): Decremented win_initialized. Call "fini"
2835 function of all opened devices. Don't call mwin__fini.
2836 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2838 (mframe): Handle Mdevice key of PLIST.
2839 (mframe_get_prop): Call frame->device->get_prop instead of
2840 mwin__device_get_prop.
2842 * m17n-gd.c: New file.
2844 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2845 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2847 * m17n-core.c (m17n_init_core): Increate core_initialized.
2848 (m17n_fini_core): Decremented core_initialized.
2850 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2851 (Mcolormap): Don't extern them here.
2853 * m17n-X.c (FRAME_DEVICE): New macro.
2854 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2855 (free_display_info): Use MPLIST_DO.
2856 (free_device): Free rface->info.
2857 (xft_close): Delete it.
2858 (device_init): Renamed from mwin__init.
2859 (device_fini): Renamed from mwin__fini.
2860 (device_open): Renamed from mwin__open_device.
2861 (x_driver): New variable.
2862 (MXFontInfo): Delete member frame, add member display.
2863 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2864 Don't declare them here.
2866 * internal-gui.h (MDeviceType): New enum.
2867 (MWDefice): Delete it.
2868 (struct MFrame): Change type of device to void *. New members
2869 device_type, driver, font_driver_list.
2870 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2871 (MDeviceDriver): New type.
2872 (Mx, Mgd, Mfreetype): Extern them.
2873 (mwin__XXX): Delete all of them.
2875 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2877 (win_destroy_ic): Likewise.
2878 (adjust_window_and_draw): Likewise.
2879 (win_callback): Likewise.
2880 (Mxim): Declare it here.
2881 (minput_event_to_key): Call M_CHECK_READABLE.
2883 * fontset.c (mfont__lookup_fontset): Delete local variable
2886 * font.h (struct MFontDriver): Delete member close, add members
2887 parse_name and build_name.
2888 (mfont__driver_list): Delete extern.
2889 (mfont__close): Delete extern.
2891 * font.c (mfont__init): Don't set mfont__driver_list.
2892 (mfont__fini): Don't unref mfont__driver_list.
2893 (mfont__select): Try font drivers in frame->font_driver_list. Set
2894 driver member of a realized font.
2895 (mfont__close): Delete it.
2896 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2897 functions of the default frame.
2899 * font-ft.c (close_ft): Check ft_info->ft_face and work
2901 (add_font_info): Allocate ft_info by M17N_OBJECT.
2902 (ft_close): Delete it.
2903 (mfont__ft_driver): Don't set ft_close.
2904 (ft_select): Increment ref-count of best_font.
2905 (ft_open): Decremented ref-count of base. On error, call
2906 FT_Done_Face and free ft_info.
2907 (ft_find_metric): Always use XXX_MONO in load_flags.
2908 (ft_render): Fix setting of width. Call
2909 frame->driver->draw_points instead of mwin__draw_points.
2910 (ft_to_prop): Don't set mfont__driver_list.
2911 (mfont__ft_fini): Just unref ft_info.
2913 * face.c (mface__init): Exchange foreground and background of
2914 mface__default. Call mface_put_prop to set hline of
2916 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2917 (mface__free_realized): Don't call mwin__free_realized_face.
2919 * draw.c (Mdepth): Don't declare it here.
2920 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2921 (render_glyphs, render_glyph_string): Likewise.
2922 (mdraw__init): Don't set Mdepth.
2923 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2925 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2927 (mdraw_text_items): Check FRAME is writable.
2928 (mdraw_per_char_extents): Implement body.
2930 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2932 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2933 (GUI_SOURCES): Delete it.
2934 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2935 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2936 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2937 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2938 (linkgui_LDADD): Set to libm17n-gui.la
2939 (linkgui_LDFLAGS): New target.
2940 (SRC): Include ${libm17n_gui_la_SOURCES} and
2941 ${libm17n_gd_la_SOURCES}.
2943 2004-05-24 Kenichi Handa <handa@m17n.org>
2945 * draw.c (draw_background): Don't draw background even if
2946 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2948 2004-05-22 Kenichi Handa <handa@m17n.org>
2950 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2952 2004-05-20 Kenichi Handa <handa@m17n.org>
2954 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2956 * m17n-gui.c: Include "plist.h".
2957 (mframe): If PLIST is NULL, initialize it to emply plist.
2959 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2960 (xft_driver): New variable.
2961 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2962 (xft_find_metric, xft_render): New function.
2963 (mwin__init): Adjusted for the new mfont__driver_list.
2964 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2965 generated face to PARAM.
2966 (mwin__realize_face): Fix setting of box colors. Don't call hook
2968 (mwin__draw_hline): New function.
2969 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2970 (mwin__xft_render): Delete these function.
2972 * internal-gui.h (struct MFrame): New member tick.
2973 (struct MGlyphString): New member tick.
2974 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2975 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2976 (mwin__xft_render): Delete extern.
2978 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2979 (mfontset): Always increment the reference count of returned
2982 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2983 (MFTInfo): Moved to font.h.
2984 (ft_iso8859_1_font_list): Delete this variable.
2985 (set_font_info): Don't set font->property[MFONT_TYPE].
2986 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2987 (add_font_info): Change type to void.
2988 (fc_list): Change anme from xft_list. Caller changed. Include
2989 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2990 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2991 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2992 (close_ft): Don't call mwin__xft_close. Unref
2993 ft_info->extra_info.
2994 (ft_open): Don't setup ft_info->fontname. Don't call
2996 (ft_find_metric): Don't call mwin__xft_get_metric.
2997 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2998 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2999 (mfont__ft_init): Adjusted for new mfont__driver_list.
3000 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3002 * font.c (mfont__driver_list): Make it MPlist.
3003 (mfont__init): Adjust initialization of mfont__driver_list.
3004 (mfont__fini): Free mfont__driver_list.
3005 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3006 (mfont__select): Adjusted for the new mfont__driver_list.
3008 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3009 (mfont__drirver_list): Adjust prototype.
3010 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3012 * face.h (struct MFace): Delete member realized_face_list, add
3014 (struct MRealizedFace): Delete member need_update
3015 andnofont_rface, add member non_ascii_list.
3016 (mface__update_frame_face): Extern it.
3018 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3020 (get_hline_create, get_box_create): New functions.
3021 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3023 (free_face): Cancep previous change. Free face->frame_list.
3024 (serialize_hline): Do nothing if hline->width is zero.
3025 (serialize_box): Do nothing if box->width is zero.
3026 (mface__init): Setup all properties of mface__default.
3027 (mface__fini): Free hline_prop_list and box_prop_list.
3028 (mface__realize): Cancel previous change. Update
3029 face->frame_list. Setup rface->non_ascii_list.
3030 (mface__for_chars): Update rface->non_ascii_list.
3031 (mface__free_realized): Free rface->non_ascii_list.
3032 (mface__update_frame_face): New function.
3033 (mface): Initialize face->frame_list.
3034 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3036 (mface_merge): Likewise.
3037 (mface_put_prop): If key is Mhline or Mbox, get value by
3038 get_hline_create or get_box_create respectively.
3039 (mface_put_prop): Update frame->tick and call
3040 mface__update_frame_face if necessary.
3041 (mface_update): Do nothing if func is noop_hook.
3043 * draw.c (render_glyphs): If a font is not found, use
3044 mwin__draw_empty_boxes.
3045 (alloc_gstring): Initialize gstring->tick.
3046 (get_gstring): Check gstring->tick.
3048 2004-05-17 Kenichi Handa <handa@m17n.org>
3050 * face.c (find_realized_face): Return value changed. If RFONT is
3051 NULL, avoid unnecessary checking.
3052 (free_face): Free face->realized_face_list.
3053 (mface__realize): Adjusted for the change of find_realized_face.
3054 If it returns a realized face that needs update, free it and
3055 realize a new one. Push a new realized face to
3056 frame->realized_face_list instead of appending.
3057 (mface__for_chars): Adjusted for the change of find_realized_face.
3058 Short cut if the required font is in rface->ascii_rface.
3059 (mface_put_prop): Free old value if necessary. Set need_update
3060 member of realized faces to 1.
3062 * face.h (struct MFace): Delete member tick, add member
3064 (struct MRealizedFace): Delete member tick, add member
3067 2004-05-13 Kenichi Handa <handa@m17n.org>
3069 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3071 2004-05-12 Kenichi Handa <handa@m17n.org>
3073 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3075 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3076 parse it XftNameParse.
3078 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3079 (all_fonts_scaned): New variable.
3080 (set_font_info): FAMILY may be Mnil.
3081 (add_font_info): Argument changed.
3082 (xft_list): Call add_font_info in it.
3083 (ft_list): Likewise.
3084 (ft_select): Make it work in the case family is Mnil.
3085 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3086 (mfont__ft_fini): Set all_fonts_scaned to 0.
3088 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3089 that is failed to open.
3091 2004-05-10 Kenichi Handa <handa@m17n.org>
3093 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3094 device's depth is 1 (i.e. monochrome).
3096 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3097 to work around the problem of libtool.
3099 * font-ft.c: Include <freetype/ftbdf.h>.
3100 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3102 (mfont__ft_init): Initialize them.
3103 (ft_iso8859_1_font_list): New variable.
3104 (set_font_info): Detect a font containing iso8859-1 glyphs and
3105 register it in ft_iso8859_1_font_list. If the font is not
3106 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3107 properties of the font from its properties.
3108 (add_font_list): If the font is not scalable, check if it is BDF
3109 or PCF font. If not, ignore it.
3110 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3111 registry is not iso8859-1.
3112 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3113 ft_iso8859_1_font_list.
3114 (ft_find_metric): If the font is not scalable, assume it as BDF
3115 or PCF, and get a metric from its properties.
3116 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3118 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3120 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3121 (libm17n_la_LDFLAGS): Delete it.
3122 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3123 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3125 2004-05-06 Kenichi Handa <handa@m17n.org>
3127 * draw.c (compose_glyph_string): Fix previous change.
3129 2004-04-30 Kenichi Handa <handa@m17n.org>
3131 * font-ft.c (ft_list): Delete unused variable `result'.
3132 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3134 2004-04-27 Kenichi Handa <handa@m17n.org>
3136 * m17n-X.c: Include config.h
3137 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3138 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3139 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3140 (FRAME_CMAP, FRAME_VISUAL): New macros.
3141 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3142 (xfont_driver): Make it static.
3143 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3144 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3145 info->xft_color_back.
3146 (MXftFontInfo) [HAVE_XFT2]: New type.
3147 (mwin__xft_close) [HAVE_XFT2]: New function.
3148 (mwin__xft_open) [HAVE_XFT2]: New function.
3149 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3150 (mwin__xft_render) [HAVE_XFT2]: New function.
3152 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3153 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3154 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3157 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3159 * font-ft.c: Don't include FT_FREETYPE_H here.
3160 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3161 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3162 (MFTInfo): New member charmap_index.
3163 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3164 (check_otf_filename): Renamed from check_filename. Return value
3166 (ft_set_property): This function deleted.
3167 (set_font_info): New function.
3168 (add_font_list): Argument changed. Add multiple fonts.
3169 (xft_list) [HAVE_XFT2]: New function.
3170 (ft_list) [not HAVE_XFT2]: New function.
3171 (ft_select): Add code for Xft.
3172 (close_ft): Likewise.
3173 (ft_open): Likewise.
3174 (ft_find_metric): Likewise.
3175 (ft_encode_char): Likewise.
3176 (ft_render): Likewise.
3178 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3180 2004-04-26 Kenichi Handa <handa@m17n.org>
3182 * textprop.c (mtext_attach_property): Declare the return type as
3185 2004-04-21 Kenichi Handa <handa@m17n.org>
3187 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3189 2004-04-09 Kenichi Handa <handa@m17n.org>
3191 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3193 (load_command): Setup above members.
3195 2004-04-05 Kenichi Handa <handa@m17n.org>
3197 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3199 2004-03-30 Kenichi Handa <handa@m17n.org>
3201 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3204 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3205 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3207 2004-03-29 Kenichi Handa <handa@m17n.org>
3209 * Version 1.0 Patch Level 2 released.
3211 2004-03-29 Kenichi Handa <handa@m17n.org>
3213 * charset.c (make_charset): Set charset->fully_loaded and
3214 charset->simple correctly. Don't try to get charset->min_char and
3215 charset->max_char for a charset of method subset and superset.
3216 Don't load a mapping file here.
3217 (mcharset__init): Set unified_max.
3218 (mcharset__load_from_database): Free a working plist.
3220 * coding.c (mcoding__fini): Free all malloced data.
3222 * input-gui.c (win_create_ic): Set control.as_image for preediting
3225 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3226 `count') to initialize the array.
3228 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3231 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3233 (mwin__create_window): Fix bug of setting a background pixel of a
3235 (mwin__adjust_window): Clear the window before drawing.
3237 * m17n-core.c (mdebug__report_object): Free array->objectes if
3239 (m17n_init_core): Don't set report_header_printed to 0 here.
3240 Fix debugging information.
3241 (m17n_fini_core): Set report_header_printed to 0 here.
3243 * m17n-core.h (mplist_deserialize): Extern it.
3245 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3247 * m17n.c (m17n_fini): Fix debugging information.
3249 * mtext.c (mtext__adjust_foramt): New function.
3251 * mtext.h (mtext__adjust_foramt): Extern it.
3253 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3255 * plist.h (mplist__deserialize): Don't extern it.
3257 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3258 elements of symbol_table to NULL. Report about created and freed
3259 symbols if MDEBUG_FINI is set.
3261 2004-03-22 Kenichi Handa <handa@m17n.org>
3263 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3265 * m17n.c (m17n_init): Fix the way of checking merror_code.
3267 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3269 2004-03-22 Kenichi Handa <handa@m17n.org>
3271 * fontset.c (realize_font_group): Adjust the font size by
3272 mfont__resize before selecting a font.
3274 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3276 2004-03-19 Kenichi Handa <handa@m17n.org>
3278 * Version 1.0 Patch Level 1 released.
3280 2004-03-19 Kenichi Handa <handa@m17n.org>
3282 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3284 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3286 2004-03-19 Kenichi Handa <handa@m17n.org>
3288 Re-apply the changes forgotten in the released version.
3290 * charset.c (mcharset__load_from_database): Call
3291 mchar_define_charset.
3293 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3294 (mconv_encode_range): Put Mcoding text property.
3296 2004-03-18 Kenichi Handa <handa@m17n.org>
3298 * draw.c (Mdepth): New variable.
3299 (visual_order): Delete unused local var `pos'.
3300 (compose_glyph_string): Fix for the case that gstring->glyphs is
3301 realloced. Stop generating glyphs at TO. Fix handling of
3303 (layout_glyphs): Get metrics of all glyphs in advance. Set
3304 lbearing and rbearing of base of composition glyph correctly.
3305 Handle left-overhang glyphs correctly.
3306 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3308 (dump_combining_code): Change the defualt off_x character to ".".
3309 (mdraw__init): Initialize Mdepth.
3311 * face.c (work_gstring): New variable
3312 (mface__init): Initialize work_gstring.
3313 (mface__fini): Free work_gstring.glyphs.
3314 (mface__realize): Don't handle videomode property here. Adjusted
3315 for the change of mfont__get_metric.
3316 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3318 * face.h (enum face_gc): Moved to m17n-X.c.
3320 * font.h (struct MFontDriver): Arguments of find_metric changed.
3321 (mfont__select): Prototype adjusted.
3322 (mfont__get_metric): Likewise.
3323 (mfont__ft_drive_otf): Likewise.
3324 (mfont__flt_run): Likewise.
3326 * font.c (mfont__select): New argument layouter. If layouter is
3327 different in the registered font, make a new copy of realized
3329 (mfont__get_metric): Argument changed. Get metrics of multiple
3331 (mfont_find): Call mfont__select with layouter as Mnil.
3333 * font-flt.c (FontLayoutContext): New member rfont.
3334 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3335 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3337 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3339 (NUM_POINTS): New macro.
3340 (MPointTable): New type.
3341 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3342 (mfont__ft_drive_otf): New argument rfont.
3344 * fontset.c (realize_font_group): Adjusted for the changed of
3346 (check_fontset_element): This function deleted.
3348 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3349 off the parent window if the preedit text is zero length.
3351 * internal-gui.h (struct MFrame): New members foreground,
3352 background, videomode, font.
3353 (struct MGlyphString): New member anti_alias.
3354 (MDrawPoint): New type.
3355 (mwin__draw_bitmap): Prototype deleted.
3356 (mwin__draw_points): Prototype added.
3358 * m17n-gui.h (MDrawControl): New member anti_alias.
3360 * m17n-gui.c (free_frame): Free frame->font.
3361 (mframe): Set the fontset of frame->face to the default fontset.
3363 * m17n-X.c (RGB_GC): New type.
3364 (enum gc_index): Renamed from enum face_gc. Member names changed.
3366 (struct MWDevice): Members foreground and background deleted. New
3367 member scratch_gc, gc_list.
3368 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3369 (free_device): Free GCs in device->gc_list.
3370 (get_rgb_gc): New function.
3371 (get_gc): Renamed and argument changed from get_color.
3372 (get_gc_for_anti_alias): New function.
3373 (xfont_find_metric): Arguments changed. Get metrics of multiple
3375 (set_region): Argument changed. Caller changed.
3376 (xfont_render): Allways set a font in gc.
3377 (x_error_handler, x_io_error_handler): Define only if
3378 X_SET_ERROR_HANDLER is defined.
3379 (mwin__open_device): Create device->scratch_gc. Set members
3380 foreground, background, and videomode of frame. Call
3381 XSetErrorHandler and XSetIOErrorHandler only if
3382 X_SET_ERROR_HANDLER is defined.
3383 (struct gc_list): Deleted.
3384 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3385 (mwin__realize_face): Adjusted for the change of the format of
3386 rface->info and the charge of set_region.
3387 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3388 (mwin__draw_box): Likewise.
3389 (mwin__draw_bitmap): This function deleted.
3390 (mwin__draw_points): New function.
3391 (mwin__verify_region): Adjusted for the change of the format of
3392 rface->info and the charge of set_region.
3393 (mwin__create_window): Inherit backgound pixel from parent.
3394 (mwin__dump_gc): Adjusted for the change of the format of
3397 2004-03-16 Kenichi Handa <handa@m17n.org>
3399 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3401 * input.c (M_key_alias): New variable.
3402 (handle_key): Try M_key_alias property of a key too.
3403 (minput__init): Initialize M_key_alias. Give that property to
3404 symbols in one_char_symbol. Fix bug of initializing
3407 * draw.c (compose_glyph_string): Don't handle
3408 ignore_formatting_char here. Include formatting characters in the
3409 range processed by a FTL.
3410 (layout_glyph_string): Handle ignore_formatting_char here.
3412 2004-03-12 Kenichi Handa <handa@m17n.org>
3414 * input-gui.c (win_create_ic): Enable bidi in status control.
3416 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3418 2004-03-09 Kenichi Handa <handa@m17n.org>
3420 * input.c (load_input_method): If title is not specified, use the
3421 input method name as title.
3423 * m17n-X.c (get_color): Make it static.
3424 (xim_create_ic, xim_destroy_ic, x_error_handler)
3425 (x_io_error_handler): Likewise.
3427 2004-03-01 Kenichi Handa <handa@m17n.org>
3429 * Version 1.0 released.
3432 Copyright (C) 2003, 2004
3433 National Institute of Advanced Industrial Science and Technology (AIST)
3434 Registration Number H15PRO112
3436 This file is part of the m17n library.
3438 The m17n library is free software; you can redistribute it and/or
3439 modify it under the terms of the GNU Lesser General Public License
3440 as published by the Free Software Foundation; either version 2.1 of
3441 the License, or (at your option) any later version.
3443 The m17n library is distributed in the hope that it will be useful,
3444 but WITHOUT ANY WARRANTY; without even the implied warranty of
3445 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3446 Lesser General Public License for more details.
3448 You should have received a copy of the GNU Lesser General Public
3449 License along with the m17n library; if not, write to the Free
3450 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3451 Boston, MA 02110-1301, USA.