1 2006-12-26 Kenichi Handa <handa@m17n.org>
3 * m17n.h (minput_callback): Extern it.
5 * input.h (minput__callback): Delte extern.
7 * input.c (get_surrounding_text): Adjusted for the change of
8 minput__callback to minput_callback.
9 (delete_surrounding_text): Likewise.
10 (minput_create_ic): Likewise.
11 (minput_destroy_ic): Likewise.
12 (minput_filter): Likewise.
13 (minput_set_spot): Likewise.
14 (minput_toggle): Likewise.
15 (minput_reset_ic): Likewise.
17 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
18 and ic->candidate_to to 0.
19 (minput_callback): Renamed from minput__callback.
21 * input-gui.c (win_callback): Adjusted for the change of
22 minput__callback to minput_callback.
24 2006-12-15 Kenichi Handa <handa@m17n.org>
26 * font-ft.c (ft_add_font): Fix typo.
28 2006-12-06 Kenichi Handa <handa@m17n.org>
30 * Version 1.3.4 released.
32 2006-11-16 Kenichi Handa <handa@m17n.org>
34 * input.c (parse_action_list): Allow (undo 0).
35 (adjust_markers): New function.
36 (preedit_insert, preedit_delete): Call adjust_markers.
37 (preedit_replace): New function.
38 (update_candidate): Call preedit_replace instead of preedit_insert
40 (filter): When ic_info->commit_key_head is nonzero, shift input
41 event keys even if there's no committed text.
43 2006-11-10 Kenichi Handa <handa@m17n.org>
45 * input.h (MInputContextInfo): New member commit_key_head.
47 * input.c (preedit_commit): Update ic_info->commit_key_head.
48 (take_action_list): Reset ic_info->commit_key_head on Mundo.
49 (filter): When committed, shift keys by ic_info->commit_key_head.
51 2006-10-30 Kenichi Handa <handa@m17n.org>
53 * input.c (preedit_delete): Fix typo.
54 (take_action_list): Print more debugging information. Allow
55 variable in arg of 'select' and `pushback'.
57 * database.c (gen_database_name): Don't put extra space.
58 (load_database): Print debugging information.
59 (register_databases_in_files): New arg headlen. Callers changed.
60 (mdatabase__load_for_keys): Shorten debugging information.
61 (mdatabase_load): Don't print debugging information here.
63 2006-10-27 Kenichi Handa <handa@m17n.org>
65 * input.c (marker_code): New arg surrounding. Callers changed.
66 (surrounding_pos): Check if name[0] == '@'.
67 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
68 (take_action_list): Likewise.
69 (get_preceding_char): If POS is zero, always call
72 2006-10-19 Kenichi Handa <handa@m17n.org>
74 * input.c (load_variables): Fix setting of `global'.
76 2006-10-16 Kenichi Handa <handa@m17n.org>
78 * draw.c (draw_background): Be sure to set *to_x.
79 (render_glyph_string): If from == to, just return.
81 2006-10-18 Kenichi Handa <handa@m17n.org>
83 * database.c (get_dir_info): Return NULL if the directory name is
85 (register_databases_in_files): Call register_database with
87 (mdatabase__update): Fix logic. Call register_database with
89 (mdatabase_define): Call register_database with
92 * input.c (delete_surrounding_text): Be sure to set members
93 preceding_text and following_text to NULL.
94 (shift_state): Save variable values in ic_info->vars_saved.
95 (preedit_commit): Don't print debug information here. Don't
96 change ic_info->keys here.
97 (get_candidate_list): Don't ref plist.
98 (take_action_list): Don't unref return value of
99 get_candidate_list. For undo, reset ic->produced and recover
100 ic_info->vars. Be sure to set ic->candidate_list to NULL after
102 (init_ic_info): Set ic_info->vars_saved.
103 (fini_ic_info): Unref ic_info->vars_saved.
104 (re_init_ic): Be sure to set ic->candidate_list to NULL after
106 (filter): Be sure to set members preceding_text and following_text
107 to NULL. Print debug information about produced text. Delete
108 processed keys from ic_info->keys.
110 * input.h (MInputContextInfo): New member vars_saved.
112 2006-10-16 Kenichi Handa <handa@m17n.org>
114 * database.c (mdatabase__update): Fix the way to get db_info.
116 2006-10-02 Kenichi Handa <handa@m17n.org>
118 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
119 `size' changed to 24.
121 * font.c (xlfd_unparse_name): Adjusted for the change of
123 (font_score): Likewise.
124 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
126 * m17n-X.c (MFontX, _MFontX): Deleted.
127 (SET_SIZE, HAVE_SIZE): Deleted.
128 (free_display_info): Adjusted for the change of
129 disp_info->font_list format.
130 (xfont_registry_list): Likewise.
131 (xfont_open): Likewise.
132 (xfont_list): Likewise.
133 (xfont_encode_char): Ignore size to find a realized font.
134 (MRealizedFontXft): Change the order of members to make it
135 compatible with MRealizedFontFT.
137 2006-09-27 Kenichi Handa <handa@m17n.org>
139 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
140 (mfont_close): Add comments.
142 * mtext-lbrk.c (mtext_line_break): Add comment.
144 2006-09-26 Kenichi Handa <handa@m17n.org>
146 * input.c (minput_get_description): Handle description about
147 inclusion-only input methods.
149 2006-09-21 Kenichi Handa <handa@m17n.org>
151 * input.c (M_gettext): New variable.
152 (fully_initialize): Initialize M_gettext.
153 (check_description): New function.
154 (load_commands): Call check_description.
155 (config_all_commands): Be sure to unref pl.
156 (load_variables): Call check_description.
157 (config_all_variables): Be sure to unref pl.
158 (load_im_info): Call check_description.
160 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
162 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
163 and bind_textdomain_codeset.
165 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
167 2006-09-15 Kenichi Handa <handa@m17n.org>
169 * input.c (reload_im_info): Update custom and global info.
170 (init_ic_info): Fix previous change.
172 2006-09-14 Kenichi Handa <handa@m17n.org>
174 * database.c: Include <libgen.h>.
175 (mdatabase__lock): Make a directory if necessary.
177 * input.c (resolve_command): Adjusted for the format change of
178 configured_cmds member.
179 (load_commands, load_variables): Fix for errornous data handling.
180 (config_command, config_variable): New function.
181 (config_all_commands, config_all_variables): Renamed from
182 config_commands and config_variables. Utilize the above function.
183 (check_variable_value): Argument changed. Callers changed.
184 (load_im_info): Call config_all_commands and config_all_variables.
185 (init_ic_info): Adjusted for the format change of configured_vars
187 (minput__init): Initialize Mcustomized, Mconfigured, and
189 (Mcustomized, Mconfigured, Minherited): New variables.
190 (minput_get_command): Be sure to return NULL if an input method
191 use no local command.
192 (minput_get_variable): Be sure to return NULL if an input method
193 use no local variable.
194 (minput_config_command, minput_config_variable)
195 (minput_save_config): Adjusted for the format change of
196 configured_cmds and configured_vars members.
198 * plist.c (write_element): Delete superfluous ':'.
200 2006-09-13 Kenichi Handa <handa@m17n.org>
202 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
203 (minput_config_file): Extern it.
205 * draw.c (Minherited): Declaration moved to input.c.
206 (mdraw__init): Don't initialize Minherited here.
208 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
210 2006-09-07 Kenichi Handa <handa@m17n.org>
212 * textprop.c (mtext_serialize): Call mplist__serialize with the
215 * plist.h (mplist__serialize): Prototype adjusted.
216 (mplist__assq): Extern it.
218 * plist.c: Include <ctype.h>
219 (PUTC, PUTS): New macros.
220 (write_symbol): New function.
221 (write_element): New arg indent.
222 (dump_string, dump_plist_element): Delete them.
223 (mplist__from_string): New arg pretty.
224 (mplist__assq): New function.
225 (mdebug_dump_plist): Use write_element.
227 * mtext.c (mtext_cat_char): Allocate more memory.
228 (mdebug_dump_mtext): Don't escal a newline character.
230 * m17n.h (minput_get_command, minput_get_variable)
231 (minput_config_command, minput_config_variable)
232 (minput_save_config): Extern them.
234 * m17n-core.c: Include <string.h>.
235 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
236 use the stream stdout instead of a file of that name.
238 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
241 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
242 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
243 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
244 (MDEBUG_DUMP): Flush the stream.
246 * input.h (struct _MInputMethodInfo): Delete member im. New
247 members mdb, language, name, extra, cmds, configured_cmds,
248 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
249 (MInputContextInfo): New member tick.
251 * input.c: Big change to improve user-side input method
252 customization. Here, list just public API changes.
253 (minput_get_commands, minput_get_variables)
254 (minput_assign_command_keys, minput_set_variable): Label them
256 (minput_get_command, minput_get_variable)
257 (minput_config_command, minput_config_variable)
258 (minput_save_config): New functions.
260 * database.h (PATH_MAX): Define it if not yet defined.
261 (PATH_SEPARATOR): Likewise.
262 (enum MDatabaseStatus): New enum.
263 (struct MDatabaseInfo): Moved from database.c. New members status,
264 time, lock_file, and uniq_file.
265 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
266 (mdatabase__unlock): Extern them.
268 * database.c: Include <time.h>.
269 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
270 (GEN_PATH): Args changed. Callers changed.
271 (struct MDatabaseInfo): Moved to database.h.
272 (struct MDatabase, mdb_list): Deleted.
273 (mdatabase__list): New var.
274 (get_database_filename): Deleted. Callers changed to use
276 (find_file, get_database_file): New files.
277 (get_dir_info): Initialize new members of MDatabaseInfo.
278 (find_database): Arg chagnded. Callers changed.
279 (free_db_info, register_database, register_databases_in_files):
281 (update_database_list): Deleted.
282 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
283 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
284 (mdatabase__update): New function.
285 (mdatabase__check): Return value changed.
286 (mdatabase__file, mdatabase__lock, mdatabase__save)
287 (mdatabase__unlock): New functions.
289 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
291 * input.c (get_surrounding_text): Return -2 when surrounding text
293 (get_following_char): Likewise.
294 (get_preceding_char): Likewise.
295 (minput__callback): Return 0 if there is a callback function,
298 2006-08-17 Kenichi Handa <handa@m17n.org>
300 * input.c (reset_ic): Use shift_state to setup the current state.
302 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
304 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
305 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
306 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
308 2006-08-02 Kenichi Handa <handa@m17n.org>
310 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
312 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
314 * font-ft.c (ft_encapsulate): Add code for debugging.
315 (mfont__ft_drive_otf): Be sure to encode character before getting
318 2006-07-21 Kenichi Handa <handa@m17n.org>
320 * draw.c (mdraw_text_extents): Fix previous typo.
322 2006-07-19 Kenichi Handa <handa@m17n.org>
324 * draw.c (gstring_width): New arg lbearing.
325 (render_glyph_string): Adjusted for the change of gstring_width.
326 (mdraw_text_extents): Fix lbearing of ink and line metrics.
328 * m17n-core.h (Mlanguage): Extern it.
330 * m17n.h (Mlanguage): Extern deleted.
332 * mtext.c (mtext__init): Initialize Mlanguage.
333 (Mlanguage): Declaration moved from locale.c
335 * locale.c (mlocale__init): Don't initialize Mlanguage here.
336 (Mlanguage): Declaration moved to mtext.c.
338 * language.c (mlang__init): Don't initialize Mlanguage here.
340 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
342 2006-07-14 Kenichi Handa <handa@m17n.org>
344 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
345 (MRealizedFontFT): New member face_encapsulated.
346 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
347 (ft_gen_font): New function.
348 (ft_add_font): Use ft_gen_font.
349 (ft_list_script): Store lists in ft_script_list.
350 (ft_check_otf): New arg ft_face. Caller changed.
351 (ft_check_language): Likewise.
352 (ft_check_script): Likewise.
353 (ft_encapsulate, ft_close): New functions.
354 (mfont__ft_driver): Initialize members encapsulate and close.
355 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
357 * font.h (struct MRealizedFont): New member encapsulating.
358 (struct MFontDriver): New members encapsulate and close.
360 * font.c (mfont__match_p): If FONT is realized, check capability
361 by font drivers's check_capability method.
362 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
365 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
366 declarations of foundry and fam local vars.
367 (xft_driver): Make it static.
369 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
370 (mfont_close): Extern them.
372 * m17n-gd.c (device_open): Don't specify foundry and family of the
375 2006-07-11 Kenichi Handa <handa@m17n.org>
377 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
379 2006-07-13 Kenichi Handa <handa@m17n.org>
381 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
383 (ft_check_script): Delete unused var.
384 (ft_list_capability): Likewise.
386 * font.c (mfont__get_capability): Setup cap->otf.
387 (Motf): Make it global.
388 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
390 * font.h (MFontCapability): New member otf.
392 * language.c (mlang__fini): Delete unused vars.
394 * m17n-gui.h (Motf): Extern it.
396 * database.c (update_database_list): Delete unused vars.
398 2006-07-07 Kenichi Handa <handa@m17n.org>
400 * font-ft.c (DEVICE_DELTA): Fix typo.
402 2006-07-06 Kenichi Handa <handa@m17n.org>
404 * fontset.c (mfont__lookup_fontset): Don't ignore family and
407 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
409 * database.c: Update comments.
411 2006-07-05 Kenichi Handa <handa@m17n.org>
413 * database.c (PATH_MAX): Define it if not yet defined.
414 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
416 (get_database_filename): Use GEN_PATH.
417 (get_dir_info): Don't include the last '/' in directory name.
418 (register_database): New function.
419 (update_database_list): Use register_database. Search all
420 directories in mdatabase__dir_list for wildcard databases.
421 (mdatabase__init): Check "~/.m17n.d".
423 2006-07-03 Kenichi Handa <handa@m17n.org>
425 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
426 push reverse property.
428 * plist.c (dump_plist_element): Fix previous change.
430 2006-06-28 Kenichi Handa <handa@m17n.org>
432 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
435 * draw.c (MbidiNSM): New variable.
436 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
437 attention to bidi type NSM.
438 (mdraw__init): Initialize MbibiNSM.
440 * language.c (mscript__char_list): Fix finding a char-list element.
442 * plist.c (dump_string): Return number of printed characters.
443 (dump_plist_element): Print elements more compactly.
445 2006-06-23 Kenichi Handa <handa@m17n.org>
447 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
448 (include_HEADERS): Likewise.
450 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
452 * language.c: Update documentation.
454 2006-06-23 Kenichi Handa <handa@m17n.org>
456 * font-ft.c (struct MFontFT): Delete member lang.
457 (free_ft_info): Don't unref member lang. Destroy members langset
459 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
460 changed. Set members langset and charset.
461 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
463 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
465 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
466 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
467 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
468 characters at first. If it fails, try listing by language names.
469 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
470 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
471 change of MFontCapability.
472 (ft_list_capability): Likewise. Try listing by languages, then by
473 scripts. Check OTF at last.
474 (ft_check_script): New function.
475 (ft_select): Adjusted for the check of MFontCapability.
476 (ft_list_family_names): New function.
477 (ft_check_capability): If cap->script is not Mnil, call
479 (mfont__ft_driver): Initialize with ft_list_family_names.
481 * font.h (struct MFontDriver): New member list_fmaily_names.
482 (struct): Change member "MSymbol *lang" to "MSymbol language".
484 * font.c: Include "language.h".
485 (Motf): New variable.
486 (otf_script_list, load_otf_script_list): Delete it.
487 (find_script_from_otf_tag): Delete it.
488 (merge_capability): New function.
489 (mfont__init): Init Motf.
490 (mfont__fini): Don't unref otf_script_list.
491 (free_font_capability): Check cap->script_tag to determine if
492 OTF-related capability is set.
493 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
494 the change of type MFontCapability.
495 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
497 (mfont_list): Call merge_capability for LANGUAGE arg.
498 (mfont_list_family_names): New function.
500 * input-gui.c: Typo in comments fixed.
502 * input.c: Typo in comments fixed.
504 * language.h (mlanguage__list): Delete it.
505 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
508 * language.c: Include "mtext.h".
509 (M_script_lang_list): Delete it.
510 (language_list, script_list): New variables.
511 (load_lang_script_list, init_language_list, init_script_list): New
513 (mlang__init): Don't load language database here.
514 (mlang__fini): Unref language_list and script_list if not NULL.
515 (mlanguage__list): Delete it.
516 (mlanguage__info, mscript__info, mscript__char_list)
517 (mscript__otf_tag, mscript__from_otf_tag): New functions.
518 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
519 (mscript_list, mscript_language_list): New functions.
521 * m17n-gui.h (mfont_list_family_names): Extern it.
523 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
524 (mlanguage_text, mscript_list, mscript_language_list): Extern
527 2006-06-21 Kenichi Handa <handa@m17n.org>
529 * m17n-X.c (xfont_driver): Initialize with
530 xfont_list_family_names.
531 (xfont_list_family_names): New function.
532 (xft_driver): Initialize with NULL for list_family_names member.
533 (device_init): Set list_family_names member of xft_driver to that
536 2006-06-06 Kenichi Handa <handa@m17n.org>
538 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
540 2006-03-24 Kenichi Handa <handa@m17n.org>
542 * font-ft.c (ft_open): Improve debug message.
544 * fontset.c (mfontset__get_font): Fix for the case that no font in
545 per_script list is available.
547 2006-02-06 Kenichi Handa <handa@m17n.org>
549 * Version 1.3.3 released.
551 2006-02-22 Kenichi Handa <handa@m17n.org>
553 * textprop.c: Fix some typos in documentation.
555 * plist.c: Fix some typos in documentation.
557 * m17n-core.h: Fix some typos in documentation.
558 (M17NLIB_PATCH_LEVEL): Updated to 3.
559 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
561 * symbol.c: Fix some typos in documentation.
563 * mtext.c: Fix some typos in documentation.
565 * input.c: Fix several typos in documentation.
567 2006-02-06 Kenichi Handa <handa@m17n.org>
569 * Version 1.3.2 released.
571 2006-02-03 Kenichi Handa <handa@m17n.org>
573 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
574 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
576 * font.c (xlfd_parse_name): Fix handling of the name "nil".
578 * draw.c (layout_glyphs): Fix handling left_padding of
581 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
583 2006-02-02 Kenichi Handa <handa@m17n.org>
585 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
588 2006-01-25 Kenichi Handa <handa@m17n.org>
590 * input.c (resolve_expression): If the value of PLIST is a plist,
591 but the first element is not symbol, return 0.
593 2006-01-17 Kenichi Handa <handa@m17n.org>
595 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
596 HAVE_GD is 2 or the greater.
598 2006-01-16 Kenichi Handa <handa@m17n.org>
600 * Version 1.3.1 released.
602 2006-01-16 Kenichi Handa <handa@m17n.org>
604 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
605 simulating anti-aliasing.
607 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
608 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
610 2006-01-12 Kenichi Handa <handa@m17n.org>
612 * input.c (get_surrounding_text): Always pop ic->plist.
613 (reset_ic): Don't reset ic->plist.
615 2006-01-10 Kenichi Handa <handa@m17n.org>
617 * input.c (preedit_commit): For debugging, print only commiting
618 charactes. Don't set ic->candidate_show to 0.
619 (handle_key): Don't run branch-actions just by shifting to the
621 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
622 Reset vars and plist.
624 2006-01-07 Kenichi Handa <handa@m17n.org>
626 * input.c (load_branch): Confirm that maps is not NULL.
628 2006-01-05 Kenichi Handa <handa@m17n.org>
630 * input-gui.c (win_filter): Try to convert arg to key only when
633 * plist.c (read_integer_element): If '#' and '-' are followed by
634 non-integer-constituent, read them as a part of a symbol.
635 (read_symbol_element): New arg C.
636 (read_element): Adjust args to read_symbol_element.
638 * input.c (load_macros): On overwriting a macro, free the old
640 (minput__init): Store Mmap in load_im_info_keys.
641 (minput_get_title_icon): If the input method has no title, be sure
643 (minput_get_description): If the input method has no description,
644 be sure to return NULL.
645 (minput_get_variables): Fix documentation.
646 (handle_key): Pay attention to the case that key is Mnil.
647 (filter): Likewise. Fix handling of such symbol as S-A.
649 2005-12-22 Kenichi Handa <handa@m17n.org>
651 * Version 1.3.0 released.
653 2005-12-22 Kenichi Handa <handa@m17n.org>
655 * font-ft.c (ft_list): If the specified font has no property,
658 2005-12-20 Kenichi Handa <handa@m17n.org>
660 * character.c (mchar_get_prop): Check char_prop_list.
661 (mchar_put_prop, mchar_get_prop_table): Likewise.
663 2005-12-18 Kenichi Handa <handa@m17n.org>
665 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
666 file name sans language.
668 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
670 * input.c: Fix typo in comments.
672 2005-12-14 Kenichi Handa <handa@m17n.org>
674 * input.c (minput_get_title_icon): Check the default icon for the
677 2005-12-13 Kenichi Handa <handa@m17n.org>
679 * input.c (Mless_equal, Mgreater_equal): New variables.
680 (parse_expression, resolve_expression, parse_action_list)
681 (take_action_list): Handle the aboves.
682 (filter): Treat key S-X as X.
683 (minput__init): Initialize Mless_equal and Mgreater_equal.
684 (minput_get_title_icon): New function.
686 * m17n.h (minput_get_title_icon): Extern it.
688 * database.c (get_database_filename): Return a filename instead of
690 (load_database): Adjusted for the above change.
691 (mdatabase__load_for_keys): Likewise.
692 (mdatabase__find_file): New function.
694 * database.h (mdatabase__find_file): Extern it.
696 * font.h (mfont__resize): Delete extern.
698 * font.c (mfont__list): Check resize ratio.
699 (mfont__resize): Delete it.
700 (mfont_resize_ratio): Include the code of mfont__resize.
702 * font-ft.c (ft_open): Check resize ratio.
704 * m17n-X.c (xfont_open): Check resize ratio.
705 (xft_open): Likewise.
707 2005-12-07 Kenichi Handa <handa@m17n.org>
709 * input.c (take_action_list): If take_action_list return -1,
711 (handle_key): Likewise.
713 * face.c (mface__for_chars): When font is specified and layouter
714 is found for it, if the layouter doesn't support one of a
715 character, use a face sans layouter for it.
717 2005-12-06 Kenichi Handa <handa@m17n.org>
719 * fontset.c (mfont__lookup_fontset): If only a fallback font is
720 found, don't use it for more than one character.
722 2005-12-05 Kenichi Handa <handa@m17n.org>
724 * face.c (mface__realize): Set rfont->layouter to Mnil.
725 (mface__for_chars): Fix handling of layouter.
727 * character.h (mchar__define_prop): Extern it.
729 * database.c (update_database_list): Call mchar__define_prop if
732 * character.c (mchar__init): Don't call mchar_define_property.
733 Instead just initialize property keys.
734 (mchar__fini): Free char_prop_list only if it's not NULL.
735 (mchar__define_prop): New function.
736 (mchar_define_property): Call mchar__define_prop.
738 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
741 2005-12-02 Kenichi Handa <handa@m17n.org>
743 * language.c (mlang__init): Handle extra chars.
745 * m17n-gui.h (mfont_check): Adjust prototype.
747 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
748 (xfont_check_capability): New function.
749 (xft_driver): Specify xft_check_capability.
750 (xft_check_capability): New function.
752 * font-ft.c (M0_3): Delete it.
754 (ft_get_charmaps): Refer to M0.
755 (fc_parse_pattern): Fix previous change.
756 (ft_list_language): Check also extra chars.
757 (ft_check_otf): Define it even if HAVE_OTF is undef.
758 (ft_check_lang): Check the result of FcLangSetHasLang against
759 FcLangDifferentLang. Check also extra chars.
760 (ft_list_capability): Delete ifdef HAVE_OTF.
761 (ft_select): Likewise.
762 (ft_open): Improve debug information.
763 (ft_check_capability): New function.
764 (mfont__ft_driver): Specify ft_check_capability.
765 (mfont__ft_init): Initialize M0.
767 * fontset.c (get_font_from_group): New function.
768 (mfontset__get_font): New function.
770 * fontset.h (mfontset__get_font): Extern it.
772 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
773 (mfont__fini): Delete ifdef HAVE_OTF.
774 (free_font_capability): Likewise.
775 (mfont__get_capability): Likewise.
776 (mfont__check_capability): New function.
777 (mfont_check): Change the order of arguments. Use
780 * font.h (struct MFontDriver): New member check_capability.
781 (MFontCapability): Delete ifdef HAVE_OTF.
782 (mfont__check_capability): Extern it.
784 * face.c (mface__realize): Fix handling of FONT arg.
785 (mface__for_chars): Fix handling of explicitly specified font.
787 2005-11-25 Kenichi Handa <handa@m17n.org>
789 * font-flt.c (run_command): Print debug info for
792 * draw.c (layout_glyphs): Fix handling of left/right_padding.
794 * face.c (mface__for_chars): Check rfont before accessing the
797 2005-11-21 Kenichi Handa <handa@m17n.org>
799 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
802 * fontset.c (fontset_table): New variable.
803 (free_fontset): Call M17N_OBJECT_UNREGISTER.
804 (mfont__fontset_init): Add fontset_table as an object array.
805 (mfont__realize_fontset): Ref FONTSET.
806 (mfont__free_realized_fontset): Unref REALIZED->fontset.
807 (mfontset): Call M17N_OBJECT_REGISTER.
808 (mfontset_copy): Likewise.
810 * input.c (handle_key): For debugging, print information about
812 (filter): Add an alias for Meta and Alt modifiers.
813 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
815 (minput__init): Initialize them.
816 (parse_expression): New function.
817 (resolve_expression): New function.
818 (parse_action_list): Handle expressions by parse_expression.
819 (take_action_list): Handle expressions by resolve_expression.
820 (parse_nested_list_value): Fix previous change.
821 (resolve_command): Fix handling of the return value of
824 2005-11-18 Kenichi Handa <handa@m17n.org>
826 * font-ft.c (ft_check_otf, otf_script_list): Define only when
828 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
830 (ft_select): Likewise.
832 * font.c (mfont_list): Fix for the case that FONT is NULL.
833 (OTF_tag): Delete it.
834 (load_otf_script_list): Define only when HAVE_OTF is defined.
835 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
838 * draw.c (truncate_gstring): Be sure to truncate at
839 glapheme-cluster boundary.
841 2005-11-11 Kenichi Handa <handa@m17n.org>
843 * input.c (delete_surrounding_text): Clear cache if necessary.
845 2005-11-09 Kenichi Handa <handa@m17n.org>
847 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
848 glyph prev is also supported by the current flt.
850 2005-11-08 Kenichi Handa <handa@m17n.org>
852 * m17n-X.c (xft_render): Cancel previous change.
854 2005-11-07 Kenichi Handa <handa@m17n.org>
856 * input.c: Include <stdlib.h>.
857 (get_surrounding_text, delete_surrounding_text)
858 (get_preceding_char, get_following_char): New functions.
859 (integer_value): New arg surrounding. If it is nonzero, try to
860 get a surrounding character. Callers changed.
861 (take_action_list): Check `value' before setting an element.
862 (destroy_ic): Unref ic_info->preceding_text and
863 ic_info->following_text.
864 (minput__init): Initialize Minput_get_surrounding_text and
865 Minput_delete_surrounding_text.
866 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
868 (filter): Unref ic_info->preceding_text and
869 ic_info->following_text.
871 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
874 * input.h (MInputContextInfo): New members preceding_text and
877 2005-11-04 Kenichi Handa <handa@m17n.org>
879 * input.c (parse_nested_list_value): Fix handling of the global
881 (get_nested_list): Get global definitions by load_partial_im_info.
882 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
883 MInputCandidatesChanged.
884 (take_action_list): Likewise.
885 (reset_ic): Likewise.
886 (create_ic): Don't pay special attention to
887 Mcandidates_group_size.
888 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
889 (minput_set_variable): Get a definition of varible by
890 mplist_find_by_value, not mplist_get.
892 * m17n.h (enum MInputCandidatesChanged): New enum.
894 2005-11-01 Kenichi Handa <handa@m17n.org>
896 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
898 (mwin__destroy_window): If xft_draw's drawable is win, change it
899 to device->drawable before destroying win.
901 2005-10-31 Kenichi Handa <handa@m17n.org>
903 * input.c (load_im_info): Fix adding of state.
905 * m17n-core.c (m17n_fini_core): Fix reporting of module
908 * m17n.c (m17n_fini): Fix reporting of module finalization.
910 * m17n-gui.c (m17n_init_win): Fix reporting of module
913 2005-10-29 Kenichi Handa <handa@m17n.org>
915 * input.c (get_candidate_list): Fix the timing of referring plist.
917 2005-10-28 Kenichi Handa <handa@m17n.org>
919 * input.c (load_branch): Ignore an undefined map name.
920 (load_im_info): Set im_info->title from `name' only if it's not
922 (shift_state): Always update ic->status.
923 (adjust_candidates): Renamed from adjust_candidate_command.
924 Argument changed. Caller changed.
925 (get_candidate_list, regularize_action): New functions.
926 (take_action_list): Use them. On handling Munhandle, don't set
928 (handle_key): If KEY is not handled by MAP, and MAP has
929 branch_actions, perform them.
931 * database.c (mdatabase__fini): Free dir_info->filename;
933 2005-10-20 Kenichi Handa <handa@m17n.org>
935 * input.c (marker_code): Accept '@@'.
936 (integer_value): Handle '@@'.
937 (parse_action_list): Accept a symbol argument.
938 (take_action_list): Resolve the symbol argument. Handle the
941 2005-10-18 Kenichi Handa <handa@m17n.org>
943 * input.c: Include "charset.h".
944 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
946 (MIMState): New member (M17NObject control).
947 (lookup_nested_list, set_nested_list, parse_nested_list_value)
948 (get_nested_list, resolve_variable): New functions.
949 (integer_value): New arg (MPlist **value). Set it to the plist
950 element containing the value.
951 (resolve_command): New function.
952 (load_translation): New arg (MPlist *map_actions).
953 (load_branch): New args language and name. If `keylist' is a
954 symbol, resolved that as a command name.
955 (free_map): New arg top. Free map->map_actions only if top is
957 (free_state): New function.
958 (load_state): New arg name.
959 (im_info_list): New variable.
960 (free_im_info, get_im_info_by_tags): New functions.
961 (load_im_info): Arg key changed to plist. Handle `include'.
962 Return (MInputMethodInfo *).
963 (preedit_commit): Ref ic->candidate_list.
964 (get_select_charset, adjust_candidate_command): New functions.
965 (take_action_list): Handle `include'. Adjust candidate action
966 properly. Handle control variables `candidates-charset' and
967 `candidates-group-size'.
968 (open_im): Use get_im_info.
969 (create_ic): Get global variables.
970 (load_partial_im_info): New function.
971 (get_im_info): New function.
972 (check_command_keyseq, check_command_list, check_variable_list):
974 (minput__init): Don't handle M_database_hook and Mdetail_text.
975 Initialize M_candidates, Mcandidates_group_size,
977 (parse_variable_list, get_variable_list, parse_command_list)
978 (get_command_list): Delete them.
979 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
980 (minput__fini): Simply unref command_list and variable_list.
981 (minput_get_description): Adjusted for the new form of description.
982 (minput_get_commands): Use get_nested_list.
983 (minput_assign_command_keys): Likewise.
984 (minput_get_variables, minput_set_variable): Likewise.
986 * input.h (MInputMethodInfo): New members im and maps.
988 * database.h (M_database_hook): Delete extern.
989 (MDatabaseHookFunc): Delete extern.
990 (mdatabase__check): Extern it.
992 * database.c: Include <glob.h>.
993 (MAX_TIME): New macro.
994 (Masterisk): New variable.
995 (get_database_stream): Argument changed to (MDatabaseInfo *).
997 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
998 (find_database): New function.
999 (update_database_list): New function.
1000 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1001 calling update_database_list.
1002 (mdatabase__check): New function.
1003 (mdatabase_find): Use update_database and find_database. Don't
1004 handle MDatabaseHookFunc.
1005 (mdatabase_list): Call update_database at first.
1006 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1007 (MDatabaseList): New type.
1009 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1011 * m17n.h (Mdetail_text): Delete extern.
1013 * m17n-core.h (mplist_conc): Delete extern.
1015 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1017 (mplist_conc): Renamed to mplist__conc.
1018 (mplist__pop_unref): New function.
1020 2005-10-14 Kenichi Handa <handa@m17n.org>
1022 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1024 (read_element): If keys is an empty plist, return any element
1026 (dump_plist_element): Check if plist is nested.
1027 (mplist_conc): Always ref tail.
1028 (mplist_set): If key is a managing key, ref val in advance.
1030 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1031 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1032 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1035 * fontset.c (free_fontset): Unref fontset_list if necessary.
1036 (mfont__fontset_fini): Don't free fontset_list. Unref
1038 (mfont__realize_fontset): Initialize request.
1039 (mfontset): Ref default_fontset or fontset only if necessary.
1040 (mfontset_copy): Don't ref copy.
1042 * draw.c (render_glyphs): Check gend->type before checking
1045 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1046 unrefed plists to NULL.
1048 2005-10-04 Kenichi Handa <handa@m17n.org>
1050 * textprop.c (mtext_serialize): Be sure to make mt
1051 MTEXT_FORMAT_UTF_8 and NULL terminated.
1053 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1055 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1057 2005-10-03 Kenichi Handa <handa@m17n.org>
1059 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1060 is not at the beginning of line.
1062 2005-09-22 Kenichi Handa <handa@m17n.org>
1064 * input.c: Include <sys/stat.h> and <unistd.h>.
1065 (Minclude, Mcommit, Munhandle): New variables.
1066 (minput__init): Initialize them. Push only Mstate to
1067 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1068 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1070 (load_input_method): Handle "include" directive. If no states are
1072 (shift_state): If state_name is Mt, shift back to the previous
1073 state. Call preedit_commit to commit preedit text.
1074 (preedit_commit): New function.
1075 (take_action_list): Improve debug printing. Handle commit and
1077 (handle_key): Check the return value of take_action_list. Don't
1078 take branch_actions just after changing to the root map.
1079 (reset_ic): Reset all ic_info members.
1080 (filter): When a key is not handled, just move ic_info->keys
1081 instead fo calling reset_ic.
1082 (load_im_info): If key is not Mstate, push Mmap to
1084 (MDatabaseStatList): New type.
1085 (imdir_stat_list): New variable.
1086 (input_method_hook): Don't cancel the hook. Check the
1087 modification time of directories.
1088 (minput__fini): Free imdir_stat_list;
1090 * input.h (MInputContextInfo): New member prev_state.
1092 * m17n-core.h (mplist_conc): Extern it.
1094 * plist.c (mplist_conc): New function.
1096 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1098 * font.h (MRealizedFont): New member average_width.
1100 * font-ft.c (ft_open): Set rface->average_width.
1102 * font.c (xlfd_unparse_name): Print '*' before registry name.
1104 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1105 (xfont_open): Set rfont->average_width.
1106 (xft_open): Likewise.
1107 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1109 * internal-gui.h (struct MFrame): New member average_width.
1111 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1112 (mframe_get_prop): Return the average_width of a font.
1114 * face.c (mface__realize): Set rface->average_width.
1115 (mface__update_frame_face): Set frame->average_width.
1117 * face.h (MRealizedFace): New member average_width.
1119 2005-09-19 Kenichi Handa <handa@m17n.org>
1121 * font.c (xlfd_unparse_name): New arg full_xlfd.
1122 (mfont__encode_char): Use shortcut only for X core fonts.
1123 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1124 (mfont_put_prop): Handle `language' property.
1125 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1126 Print file can capability info too.
1128 * m17n-core.c (mdebug__output): New variable.
1129 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1130 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1131 (m17n_fini_core): Close mdebug__output if it's not stderr.
1133 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1134 (xfont_open): Handle baseline_offset.
1135 (xfont_find_metric): Likewise.
1136 (xfont_render): Likewise.
1137 (xft_open): Likewise.
1138 (xft_render): Likewise.
1140 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1141 (mdebug__output): Extern it.
1142 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1143 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1144 (MDEBUG_DUMP): New macro.
1145 (MDEBUG_PRINT_TIME): Print to medebug__output.
1147 * font.h (MRealizedFont): New member baseline_offset.
1149 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1151 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1152 (ft_list_family): Check alias.
1153 (ft_list_language): If language is "en", don't try to the second
1155 (ft_default_list): New variable.
1156 (ft_list_default): New function.
1157 (ft_select): If family is not specified, try only the default
1158 fonts. Treat the weights normal and medium same.
1159 (ft_open): Fix debug message. If registry is not specified, try
1160 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1161 (ft_find_metric): Likewise.
1162 (ft_render): Likewise.
1163 (ft_list): Fix debug message. Accept the registring iso8859-1.
1164 If family is not specified, try only the default fonts.
1166 * face.c (mface__realize): Fix logic of opening a font.
1168 2005-09-16 Kenichi Handa <handa@m17n.org>
1170 * face.c (mface__realize):
1172 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1175 * input.c (shift_state): Fix the condition of taking init actions.
1176 (take_action_list): Fix handling of pushback action.
1177 (handle_key): Don't change key while checking its alias.
1178 (minput__init): Initialize new variables.
1179 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1182 2005-09-12 Kenichi Handa <handa@m17n.org>
1184 * mtext.c (mtext__uppercase): Add proper open/close parens.
1185 (mtext_titlecase): Add proper casting.
1187 * input.c (parse_action_list): Handle the case that the arg is a
1188 key sequence (MText or MPlist).
1189 (take_action_list): Likewise.
1190 (shift_state): Shorter debug message.
1191 (handle_key): Terminate a debug message by "\n".
1192 (reset_ic): Don't take initial actions here.
1193 (minput_open_im): Print a debug message.
1194 (minput_close_im): Likewise.
1195 (minput_create_ic): Likewise.
1196 (minput_destroy_ic): Likewise.
1198 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1200 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1203 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1204 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1207 * character.c: Add Japanese documentation for
1208 mchar_get_prop_table ().
1210 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1212 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1213 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1214 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1216 (init_case_conversion): New function.
1217 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1218 (uppercase_precheck, lowercase_precheck, final_sigma)
1219 (after_soft_dotted, more_above, before_dot, after_i)
1220 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1222 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1224 * plist.c (read_mtext_element): Fix previous change.
1226 2005-09-05 Kenichi Handa <handa@m17n.org>
1228 * plist.c (read_mtext_element): Handle \uXXXX notation.
1230 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1231 (MTABLE_ALLOCA): Change the name of local variable.
1233 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1234 HAVE_FREETYPE are defined.
1236 * m17n-X.c: Check HAVE_X11.
1238 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1239 directory listing libraries.
1240 (noinst_PROGRAMS): Define it only in maintainer mode.
1242 2005-09-02 Kenichi Handa <handa@m17n.org>
1244 * m17n-gui.h (mdraw_line_break_option): Extern it.
1246 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1247 end of the first glyph.
1248 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1250 (mdraw_line_break_option): New variable.
1251 (mdraw_default_line_break): Use mtext_line_break.
1253 * mtext.h (wordseg_func_table): Don't extern it.
1254 (mtext__wseg_fini): Extern it.
1256 * mtext.c: Don't include word-thai.h.
1257 (wordseg_func_table): Delete this variable.
1258 (mtext__init): Don't initialize above. Don't call
1259 mtext__word_thai_init.
1260 (mtext__fini): Don't free wordseg_func_table. Call
1261 mtext__wseg_fini instead fo mtext__word_thai_fini.
1262 (MTextWordsegFunc): Don't typedef it.
1263 (mtext__word_segment): Moved to mtext-wseg.c.
1265 * m17n-core.h (enum MTextLineBreakOption): New enum.
1266 (mtext_line_break): Extern it.
1268 * mtext-wseg.c: New file.
1270 * mtext-lbrk.c: New file.
1272 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1273 add mtext-lbrk.c and mtext-wseg.c.
1275 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1276 the case that head is NULL.
1278 2005-09-01 Kenichi Handa <handa@m17n.org>
1280 * word-thai.c (wordseg_propertize): If the property value is nil,
1281 don't make the property no-merge.
1282 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1283 attention to the case that they are NULL.
1284 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1287 * character.c (mchar_get_prop_table): New function.
1289 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1291 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1292 (mchar_get_prop_table): Extern it.
1294 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1295 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1297 * internal.h (enum MTextCoverage): New enum.
1298 (MText): New member coverage.
1300 * mtext.c (FORMAT_COVERAGE): New macro.
1301 (insert): Copy mt2->coverage.
1302 (mtext__from_data): Initialize mt->coverage.
1303 (mtext__adjust_format): Update mt->coverage.
1304 (mtext): Initialize mt->coverage.
1305 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1306 Update mt->coverage if necessary.
1307 (mtext_duplicate): Copy mt->coverage.
1308 (mtext_insert, mtext_replace): New functions.
1309 (mtext_dup): Use mtext_duplicate.
1310 (mtext__word_segment): Don't set *from and *to if a word
1311 segmentation funcion is not found.
1312 (mtext_ins_char): Fix typo.
1314 2005-08-25 Kenichi Handa <handa@m17n.org>
1316 * font.h (MFont): New member for_full_width.
1318 * font.c (compare_font_score): Prefer a font of not
1321 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1322 registry charset of a font is one of CJK charsets.
1324 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1325 supports some of CJK.
1327 2005-08-24 Kenichi Handa <handa@m17n.org>
1329 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1331 * m17n-gui.c (null_device_open): Check Mresolution param and set
1334 * m17n-gd.c (device_open): Check Mresolution param and set
1337 * m17n-X.c (MWDevice): New member resy.
1338 (xfont_open): Set ascent, descent, and max_advance members of
1340 (xft_open): Likewise.
1341 (device_open): Compare also screen_num to find a device. Set
1342 device->resy and frame->dpi.
1344 * internal-gui.h (MFrame): New member dpi.
1346 * font.h (MRealizedFont): New member max_advance.
1348 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1349 (mfont__init): Don't initialize Mascent, Mdescent.
1350 (Mascent, Mdescent): Delete these variables.
1351 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1352 Mfont_descent instead of Mascent and Mdescent.
1353 (mfont_put_prop): Allow negative size.
1354 (mfont_find): Handle the case of spec->size < 0. Fix previous
1356 (mfont_list): Handle the case of spec->size < 0.
1357 (mfont_check): Likewise.
1359 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1360 (fc_get_pattern): Handle the case of font->size < 0.
1361 (ft_open): Set ascent, descent, and max_advance members of rfont.
1362 (ft_find_metric): Improve rounding.
1363 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1366 * face.c (mface__realize): Handle the case of font->size < 0.
1368 2005-08-22 Kenichi Handa <handa@m17n.org>
1370 * coding.c (MConverterStatus): Change the member buf to union.
1371 (mconv_buffer_converter): Add const to the arg buf.
1372 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1373 (mconv_decode): Adjusted for the change of MConverterStatus.
1374 (mconv_encode_range): Likewise.
1376 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1377 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1379 2005-08-20 Kenichi Handa <handa@m17n.org>
1381 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1382 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1384 * m17n-X.c (xfont_open): Set members ascent, descent, and
1385 max_advance of rfont.
1386 (xft_open): Likewise.
1388 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1390 (mfont__ft_parse_name): Add const to the arg name.
1392 * font.c (xlfd_parse_name): Add const to the arg name. Call
1393 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1394 (xlfd_unparse_name): Handle spacing.
1395 (mfont__init): Initialize new variables.
1396 (mfont__id): Handle spacing.
1397 (mfont__merge): Likewise.
1398 (mfont__set_spec): This function deleted.
1399 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1400 condition of calling mfont__ft_parse_name.
1401 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1402 (mfont_get_prop): Handle properties spacing, ascent, descent,
1404 (mfont_find): Return a realized font.
1405 (mfont_from_name): Add const to the arg name.
1407 * font.h (enum MFontProperty): New member MFONT_SPACING.
1408 (enum MFontSpacing): New enum.
1409 (MFont): New members spacing and max_advance.
1410 (mfont__ft_parse_name): Prototype adjusted.
1411 (mfont__set_spec): Extern deleted.
1412 (mfont__parse_name_into_font): Prototype adjusted.
1414 2005-08-19 Kenichi Handa <handa@m17n.org>
1416 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1418 * font.c (mfont_list): If FONT is null, use a temporary font.
1419 (mfont_parse_name): Add const to the arg name.
1421 2005-08-18 Kenichi Handa <handa@m17n.org>
1423 * word-thai.c: Surround code by #ifdef and #endif to escape from
1426 * font-ft.c: Mostly re-written.
1428 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1429 (FontLayoutCmd): Type of the member otf changed..
1430 (load_otf_command): Adjusted for the format change of otf command.
1431 (load_command): Likewise.
1432 (free_flt_command): Unref cmd->body.otf.
1433 (run_otf): Ajusted for the type change of otf_cmd.
1434 (run_command): Ajusted for the type change of otf_cmd. On
1435 debugging, print ctx->combining_code.
1436 (mfont__flt_run): Initialize ctx's members code_offset,
1437 combining_code, and left_padding to 0.
1439 * face.h (struct MRealizedFace): New member font.
1440 (mface__realize): Prototype adjusted.
1442 * face.c (find_realized_face): New arg font.
1443 (find_realized_face): Adjusted for the change of MFont.
1444 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1445 (mface__fini): Don't call mdebug__report_object.
1446 (mface__realize): New arg font.
1447 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1448 Optimize the latin case.
1449 (mface__free_realized): Free rface->font.
1450 (mface__update_frame_face): Adjusted for the change of mface__realize.
1451 (mface_equal): New function.
1453 * draw.c (Mcommon): New variable.
1454 (visual_order): Args to mfont__encode_char changed.
1455 (compose_glyph_string): Handle Mfont text property.
1456 (layout_glyphs): Adjusted for the change of MFont.
1457 (mdraw__init): Initialize Mcommon.
1458 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1460 * font.h (enum MFontType): Members completely changed.
1461 (enum MFontProperty): Move MFONT_SIZE to the tail.
1462 (enum MFontSource): New enum.
1463 (struct MFont): New members type, source, sizes, file, capability,
1465 (struct MRealizedFont): Type of member font changed. Members
1466 score, status, and encoding deleted.
1467 (MFontScore): New type.
1468 (MFontList): Member changed.
1469 (struct MFontDriver): New member has_char. Types of members
1471 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1472 (Mapple_roman): Extern them.
1473 (OTF_Tag): Typedefed if not HAVE_OTF.
1474 (enum MFontOpenTypeTable): New enum.
1475 (MFontCapability): New type.
1476 (mfont__ft_drive_otf): Prototype adjusted.
1477 (mfont__score): Extern deleted.
1478 (mfont__merge): Extern it.
1479 (mfont__has_char): Extern it.
1480 (mfont__encode_char): Prototype adjusted.
1481 (mfont__open): Extern it.
1482 (mfont__set_spec): Prototype adjusted.
1483 (mfont__get_capability): Extern it.
1485 * font.c: Include "fontset.h".
1486 (M_font_capability, M_font_list, M_font_list_len): New variables.
1487 (font_score_priority): Change order of initial elements.
1488 (font_score_shift_bits): Fix array size.
1489 (common_weight): Add "thin", "semibold", and "heavy".
1490 (common_stretch): Add "ultracondensed", "extracondensed",
1491 "extraexpanded", and "utltraexpand".
1492 (font_weight_regular, font_weight_normal, font_weight_medium): New
1494 (gen_font_name): This function deleted.
1495 (find_encoding): Set font->encoding.
1496 (OTF_tag): New function.
1497 (otf_script_list): New variable.
1498 (load_otf_script_list): New function.
1499 (find_script_from_otf_tag): New function.
1500 (xlfd_parse_name): Set font->type and font->source.
1501 (mfont__free_realized): Free chains rfonts.
1502 (font_score): Renamed from mfont__score.
1503 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1504 (Mapple_roman): New variables.
1505 (mfont__init): Initilize new variables. Initalize
1506 default_encoding.encoding_name and
1507 default_encoding.encoding_charset to Municode_full and
1508 mcharset__unicode. Use SAFE* macros for allocating filepath
1510 (mfont__fini): Free otf_script_list.
1511 (mfont__id): New function.
1512 (mfont__match_p): Check also capability member of MFont.
1513 (mfont__merge): New funciton.
1514 (mfont__set_spec_from_face): Set type and source members.
1515 (mfont__set_spec_from_plist): Set capability and type members.
1516 (mfont__select): Argument changed.
1517 (mfont__available): New function.
1518 (compare_font_score): New function.
1519 (mfont__list): New function.
1520 (mfont__open): Return a realized font.
1521 (mfont__resize): Adjusted for the change of MFont.
1522 (mfont__has_char): New function.
1523 (mfont__encode_char): Argument changed.
1524 (mfont__set_spec): Argument changed.
1525 (free_font_capability): New function.
1526 (mfont__get_capability): New function.
1527 (MFontfile): New variable.
1528 (mfont_get_prop): Adjusted for the change of MFont.
1529 (mfont_put_prop): Likewise.
1530 (mfont_set_selection_priority): Fix the way of setting
1531 font_score_priority[].
1532 (mfont_find): Use mfont__list instead of mfont__select.
1533 (mfont_resize_ratio): Adjusted for the change of MFont.
1534 (mfont_list): Use mfont__list.
1535 (mfont_check): New function.
1536 (font_score): Make it static.
1538 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1539 (mfont__lookup_fontset): Likewise.
1541 * fontset.c (struct MFontset): Delete member font_spec_list.
1542 (struct MRealizedFontset): Type of member spec changed. New
1544 (load_font_group): Arg spec_list deleted.
1545 (load_fontset_contents): Adjusted for the change of fontset_def.
1546 (free_fontset): Fix the way of freeing fontset elements.
1547 (realize_fontset_elements): Argument changed.
1548 (get_per_script): New function.
1549 (free_realized_fontset_elements): Fix the way of feeing rfontset
1551 (update_fontset_elements): Fix args to realize_fontset_elements.
1552 (mfont__realize_fontset): New arg spec.
1553 (try_font_list): New function.
1554 (try_font_group): New arg request. Use try_font_list.
1555 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1557 (mfontset): Adjusted for the change of MFontset.
1558 (mfontset_copy): Likewise. Don't share plists.
1559 (mfontset_modify_entry): Adjusted for the change of MFontset.
1560 (mfontset_lookup): Call get_per_script.
1561 (mdebug_dump_fontset): Print also the address of fonts.
1563 * input.c (shift_state): Don't reset ic_info->vars.
1564 (take_action_list): Call MDEBUG_PRINT fore calling
1567 * internal-gui.h (MFontDriver): Don't typedef it here.
1569 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1570 (MXFont): This type deleted.
1572 (struct _MFontX): New struct.
1573 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1574 (MDisplayInfo): Member base_font_list deleted.
1575 (DEFAULT_FONT): Definition changed.
1576 (FALLBACK_FONT): This maclr deleted.
1577 (free_display_info): Adjusted for the change of MDisplayInfo.
1578 (free_device): Argument to mfont__free_realized changed.
1579 (xfont_driver): Adjusted for the change of MFontDriver.
1580 (xfont_registry_list): Use MFontX instead of MXFont.
1581 (MRealizedFontX): Renamed from MXFontInfo.
1582 (xfont_select): Return the font found first.
1583 (close_xfont): Change MXFontInfo to MRealizedFontX.
1584 (xfont_open): Return the realized font.
1585 (xfont_find_metric): Get xfont from rfont->fontp.
1586 (xfont_has_char): New function.
1587 (xfont_encode_char): Adjusted for the argument change.
1588 (xfont_render): Get xfont from rfont->fontp.
1589 (xfont_list): Adjusted for the argument change.
1590 (MRealizedFontXft): Renamed from MXftFontInfo.
1591 (xft_driver): Ajusted for the change of MFontDriver.
1592 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1593 (xft_open_font): Argument changed.
1594 (xft_open): Argument changed. Return the realized font.
1595 (xft_find_metric): Get xft_font from rfont->fontp.
1596 (xft_has_char, xft_encode_char): New functions.
1597 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1598 font if not yet opened.
1599 (device_open): Don't set frame->font.
1601 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1603 (gd_font_open): New function.
1604 (gd_render): Don't use the local variable ft_info.
1605 (device_init): Adjusted for the change of gd_font_driver.
1607 * textprop.c (mtext__prop_init): Initialize text_property_table.
1608 Call M17N_OBJECT_ADD_ARRAY.
1609 (mtext__prop_fini): Don't call mdebug__report_object.
1611 * plist.c (mplist__init): Initialize plist_table.
1612 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1613 (mplist__fini): Don't call mdebug__report_object.
1615 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1616 (mtext__fini): Don't call mdebug__report_object.
1617 (MTEXT_FORMAT_UTF_16): Correct type.
1618 (mtext_data): New function.
1619 (mtext_text): Fix calculation of limit and args to
1622 * language.c: Include "plist.h".
1623 (M_script_lang_list): New variable.
1624 (mlang__init): Read languages and their information from m17n
1626 (mlanguage__list): New function.
1627 (Miso639_1, Miso639_2): New variables.
1629 * language.h (mlanguage__list): Extern it.
1631 * database.c (get_database_stream): Use SAFE_* macros for
1632 allocating and freeing path.
1633 (mdatabase__init): Likewise.
1635 * symbol.c (msymbol__fini): Don't free symbols here.
1636 (msymbol__free_table): New function.
1637 (msymbol_is_managing_key): New function.
1639 * symbol.h (msymbol__free_table): Extern it.
1640 (msymbol__list): Extern it.
1642 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1644 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1645 (struct _M17NObjectArray): New member name and next.
1646 (mdebug__add_object_array): Extern it.
1647 (M17N_OBJECT_ADD_ARRAY): New macro.
1648 (mdebug__report_object): Don't extern it.
1650 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1652 * m17n-gui.c (free_frame): Don't free frame->font.
1653 (null_device_fini): Fix code for freeing
1654 null_device.realized_font_list.
1655 (m17n_fini_win): Free interface.
1656 (mframe): Cast the return value of dlsym. Set frame->font here.
1657 (mframe_get_prop): Check frame->rface->rfont before accessing the
1660 * m17n-gui.h (Mfontfile): Extern it.
1661 (mfont_check): Extern it.
1662 (mface_equal): Extern it.
1664 * m17n-core.c: Include "symbol.h".
1665 (report_header_printed): This variable deleted.
1666 (object_array_root): New variable.
1667 (report_object_array): New function.
1668 (mdebug__report_object): This function deleted.
1669 (mdebug__add_object_array): New function.
1670 (m17n_init_core): Call mchartable_init () before mtext_init ().
1671 (m17n_fini_core): Call report_object_array (if necessary) and
1672 msymbol__free_atable at the end.
1674 * m17n-core.h (msymbol_is_managing_key): Extern it.
1675 (mtext_data): Extern it.
1676 (MTEXT_FORMAT_UTF_16): Correct type.
1677 (M17NLIB_MINOR_VERSION): Changed to 3.
1678 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1680 * chartab.c (mchartable__init): Initalize chartable_table.count.
1681 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1682 mdebug__report_object.
1684 2005-05-26 Kenichi Handa <handa@m17n.org>
1686 * m17n.h (Miso639_1, Miso639_2): Extern them.
1688 * symbol.h (msymbol__list): Extern it.
1690 * symbol.c (msymbol__list): New function.
1692 2005-05-19 Kenichi Handa <handa@m17n.org>
1694 * input-gui.c (minput__win_init): Don't change the value of
1697 2005-05-16 Kenichi Handa <handa@m17n.org>
1699 * m17n-core.c (m17n_object): Be sure to initialize all members.
1701 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1703 2005-05-09 Kenichi Handa <handa@m17n.org>
1705 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1707 2005-04-27 Kenichi Handa <handa@m17n.org>
1709 * language.c (mlang__init): Add "an" (Aragonese).
1711 * word-thai.c: Add support for libthai.
1712 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1713 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1715 * mtext.c: Include "word-thai.h" conditionaly.
1716 (mtext__init): Call mtext__word_thai_init conditionaly.
1717 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1719 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1720 not WORDCUT_LD_FLAGS.
1722 2005-04-19 Kenichi Handa <handa@m17n.org>
1724 * word-thai.c (wordseg_propertize): Always unref the attached
1726 (thai_wordseg): Don't unref the property.
1728 2005-04-18 Kenichi Handa <handa@m17n.org>
1730 * word-thai.c: Include stdlib.h.
1731 (wordseg_propertize): Add dummy function for the case that wordcut
1732 library doesn't exist.
1733 (wordseg_propertize): Fix for old wordcut library.
1735 2005-04-16 Kenichi Handa <handa@m17n.org>
1737 * word-thai.c: Include <stdio.h>.
1739 2005-04-15 Kenichi Handa <handa@m17n.org>
1741 * draw.c: Include mtext.h.
1742 (linebreak_table, M_break_at_space, M_break_at_word)
1743 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1744 (compose_glyph_string): Check POS before getting Mface text
1746 (truncate_gstring): Give correct TO arg to line_break function.
1747 (GET_LB_TYPE): New macro.
1748 (find_break_backward, find_break_forward): New functions.
1749 (mdraw__init): Initialize the above new variables.
1750 (mdraw__fini): Free linebreak_table.
1751 (mdraw_default_line_break): Use find_break_backward and
1754 * word-thai.c: New file.
1756 * word-thai.h: New file.
1758 * mtext.c: Include word-thai.h.
1759 (wordseg_func_table): New variable.
1760 (mtext__init): Initialize wordseg_func_table and call
1761 mtext__word_thai_init.
1762 (mtext__fini): Call mtext__word_thai_fini, free
1764 (MTextWordsegFunc): New type.
1765 (mtext__word_segment): New function.
1767 * mtext.h (wordseg_func_table): Extern it.
1768 (mtext__word_segment): Extern it.
1770 * m17n.c (m17n_init): Fix typo (== -> =).
1772 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1773 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1775 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1776 (MTEXTPROP_VAL): New macros.
1778 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1780 2005-04-07 Kenichi Handa <handa@m17n.org>
1782 * database.c (load_chartable): Fix pursing of symbol name.
1784 2005-03-24 Kenichi Handa <handa@m17n.org>
1786 * m17n.c (m17n_init): Fix typo (== -> =).
1788 2005-03-11 Kenichi Handa <handa@m17n.org>
1790 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1792 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1794 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1797 2005-03-09 handa <handa@m17n.org>
1799 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1800 calling m17n_init ().
1802 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1803 calling m17n_init_core ().
1805 2005-02-28 Kenichi Handa <handa@m17n.org>
1807 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1810 2005-02-17 Kenichi Handa <handa@m17n.org>
1812 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1813 (M_description, M_command, M_variable): New variables.
1814 (load_im_info_keys): New variables.
1815 (load_im_info, check_command_keyseq, get_description_advance)
1816 (parse_command_list, get_command_list, parse_variable_list)
1817 (get_variable_list, input_method_hook): New functions.
1818 (command_list, variable_list): New variables.
1819 (minput__init): Put input_method_hook to Minput_method.
1820 Initialize M_description, M_command, M_variable, Mdetail_text,
1821 load_im_info_keys, command_list, variable_list.
1822 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1823 (Mdetail_text): New variable.
1824 (minput_get_description, minput_get_commands)
1825 (minput_assign_command_keys, minput_get_variables)
1826 (minput_set_variable): New functions.
1828 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1829 (minput_assign_command_keys, minput_get_variables)
1830 (minput_set_variable): Extern them.
1832 * plist.c (UNGETC): Just decrement st->p.
1833 (read_mtext_element): New arg skip.
1834 (read_integer_element): Likewise.
1835 (read_symbol_element): Likewise.
1836 (read_element): New arg KEYS.
1837 (mplist__from_plist): Don't increment ref-count of NULL object.
1838 (mplist__from_file): New arg KEYS.
1839 (mplist_put): Don't increment ref-count of NULL object.
1840 (mplist_add): Likewise.
1841 (mplist_push): Likewise.
1842 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1844 * plist.h (mplist__from_file): Prototype adjusted.
1846 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1847 (get_database_stream): New function.
1848 (load_database): Use get_database_stream.
1849 (M_database_hook): New variable
1850 (mdatabase__init): Initialize M_database_hook.
1851 (mdatabase__load_for_keys): New function.
1852 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1854 (mdatabase_define): Free mdb->extra_info if necessary.
1856 * database.h (mdatabase__dir_list, M_database_hook)
1857 (mdatabase__load_for_keys): Extern them.
1858 (MDatabaseHookFunc): New type.
1860 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1862 2004-12-27 Kenichi Handa <handa@m17n.org>
1864 * Version 1.2.0 released.
1866 2004-12-27 Kenichi Handa <handa@m17n.org>
1868 * input.c (minput_filter): Don't reset ic->xxx_changed.
1870 * mtext.c (mtext_from_data): Fix documentation.
1872 2004-12-25 Kenichi Handa <handa@m17n.org>
1874 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1875 (M17NLIB_VERSION_NAME): Update to "1.2.".
1877 2004-12-24 Kenichi Handa <handa@m17n.org>
1879 * input.c (reset_ic): Set key_unhandled to 0.
1881 2004-12-21 Kenichi Handa <handa@m17n.org>
1883 * m17n-gui.h (mfont_from_spec): Delete extern.
1885 * input-gui.c (win_callback): Handle Minput_reset.
1886 (minput__win_init): Register reset_ic as a callback for
1889 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1890 changed. At first, shift to the initial state.
1891 (minput__init): Initialize Minput_reset. Register reset_ic as a
1892 callback for Minput_reset.
1893 (Minput_reset): New variable.
1894 (minput_filter): Always set ic->xxx_changed to 0.
1895 (minput_reset_ic): New function.
1896 (integer_value): Fix typo ('>' -> '<') and calculation of length
1899 * m17n-core.c (merror_code): Change type to `int'.
1901 * m17n-misc.h (merror_code): Adjust type.
1903 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1905 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1906 (mtext_change_prop): Delete extern.
1908 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1909 to `int'. Move the documents to m17n-core.h.
1911 2004-12-13 Kenichi Handa <handa@m17n.org>
1913 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1914 (MTextProperty): Document it.
1916 2004-12-09 Kenichi Handa <handa@m17n.org>
1918 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1920 2004-12-03 Kenichi Handa <handa@m17n.org>
1922 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1923 m17n__gui_initialized): New externs.
1925 * m17n-core.h (enum M17NStatus): New enum.
1926 (m17n_status): Extern it.
1928 * m17n-core.c (core_initialized): Delete this variable.
1929 (m17n__core_initialized, m17n__shell_initialized,
1930 m17n__gui_initialized): New variables.
1931 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1932 instead of core_initialized.
1933 (m17n_status): New function.
1935 * m17n.c (shell_initialized): Delete this variable.
1936 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1939 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1941 * m17n-gui.c (win_initialized): Delete this variable.
1942 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1943 instead of gui_initialized.
1945 2004-11-19 Kenichi Handa <handa@m17n.org>
1947 * input.c (reset_ic): Check if ic_info->state is NULL.
1948 (filter): If ic_info->state is NULL, return 0.
1949 (load_input_method): Don't unref `maps' it it's not created.
1951 2004-11-15 Kenichi Handa <handa@m17n.org>
1953 * input.c (find_candidates_group): If INDEX is -1, find the last
1955 (take_action_list): If the previous of the first candidate is
1956 requested, select the last candidate.
1958 2004-11-08 Kenichi Handa <handa@m17n.org>
1960 * m17n-X.c (device_open): Try at most 32 fonts to find a
1961 non-autoscaled font.
1963 * font.c (xlfd_parse_name): Fix previous change.
1965 2004-11-05 Kenichi Handa <handa@m17n.org>
1967 * font.c: (commont_style): Include dummy elements "slanted" and
1968 "rslanted" to prefer "o" to "r" if "i" is requested.
1970 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1972 2004-10-29 Kenichi Handa <handa@m17n.org>
1974 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1976 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1977 New members smallest and larger.
1978 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1979 (xfont_registry_list): Likewise.
1980 (xfont_select): Likewise.
1983 2004-10-28 Kenichi Handa <handa@m17n.org>
1985 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1986 font name comparison.
1987 (xfont_select): Fix logic for selecting a larger size font.
1989 2004-10-25 Kenichi Handa <handa@m17n.org>
1991 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1994 2004-10-22 Kenichi Handa <handa@m17n.org>
1996 * input.c (update_candidate): Renamed from udpate_candidate.
1997 (take_action_list): Show more debugging info on arithmetic commands.
1999 * m17n-X.c (device_open): Fix previous change.
2001 * draw.c (compose_glyph_string): Don't get face property at the
2004 2004-10-21 Kenichi Handa <handa@m17n.org>
2006 * draw.c (compose_glyph_string): Fix for the case of category
2009 2004-10-19 Kenichi Handa <handa@m17n.org>
2011 * input.c (mdebug_mask): New variable.
2012 (shift_state): Print debug information.
2013 (take_action_list): Likewise.
2014 (handle_key): Likewise.
2016 2004-10-14 Kenichi Handa <handa@m17n.org>
2018 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2020 2004-10-13 Kenichi Handa <handa@m17n.org>
2022 * m17n-X.c (device_open): Be sure to register at least one font
2025 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2026 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2028 2004-10-12 Kenichi Handa <handa@m17n.org>
2030 * draw.c (alloc_gstring): Fix previous change.
2032 * font-ft.c (ft_list_generic): Fix for the case of not
2035 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2037 * font.c (mfont_list): If no font is found, return NULL.
2038 (load_font_encoding_table): Put entries of nil registry first.
2039 (find_encoding): Adjust for the above change.
2041 2004-10-11 Kenichi Handa <handa@m17n.org>
2043 * m17n-gui.h (mfont_list): Adjust prototype.
2045 * m17n-X.c (xfont_list): New arg maxnum.
2047 * font.h (struct MFontDriver): Change prototype of <list>.
2049 * font-ft.c (fc_generic_family_list): Delete it.
2050 (Mserif, Msans_serif, Mmonospace): Delete them.
2051 (M_generic_family_info): New variable.
2052 (enum GenericFamilyType): New enum.
2053 (struct GenericFamilyInfo): New struct.
2054 (generic_family_table): New variable.
2055 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2057 (add_font_info): Get style here.
2058 (ft_list_family): Don't initialize fc_config here. Don't list
2060 (ft_list_generic): New function.
2061 (ft_select): Pay attention to generic familes here.
2062 (ft_open): Fix calculation of ascent and descent.
2063 (ft_list): Pay attention to generic families.
2064 (mfont__ft_init): Initialize M_generic_family_info,
2065 generic_family_table, and fc_config..
2066 (mfont__ft_fini): Finalize generic_family_table.
2068 * draw.c (compose_glyph_string): Use more constant font for
2069 glyphs. Adjust for the member change in MGlyph.
2070 (layout_glyph_string): Adjust for the member change in MGlyph.
2071 (alloc_gstring): Intilize scracth_glyph to avoid
2072 compose_glyph_string on it.
2073 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2074 (mdraw_coordinates_position): Fix previous change.
2076 * internal-gui.h (glyph_category): New enum.
2077 (MGlyph): Change type of <category> to enum glyph_category.
2079 * face.c (mface__realize): Delete args langauge and charset.
2080 (mface__for_chars): Fix for the case that glyphs have different
2082 (mface__update_frame_face): Adjust for mface__realize change.
2084 * face.h (mface__realize): Adjust prototype.
2086 2004-10-05 Kenichi Handa <handa@m17n.org>
2088 * language.c (mlang__init): Add Akan.
2090 2004-10-04 Kenichi Handa <handa@m17n.org>
2092 * font-ft.c (add_font_info): Add instead of push the element.
2093 (ft_list_family): For generic fonts, try all
2094 substituted. families.
2096 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2097 (run_rule): Don't update cluster range here.
2098 (run_command): Update cluster range on appending a glyph.
2099 (run_otf): Update cluster range for glyphs generated by OTF.
2101 2004-10-02 Kenichi Handa <handa@m17n.org>
2103 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2105 2004-09-30 Kenichi Handa <handa@m17n.org>
2107 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2109 2004-09-30 Kenichi Handa <handa@m17n.org>
2111 * font.h: Include <fontconfig/fontconfig.h>.
2112 (MFTInfo): New member langset.
2113 (mfont__encoding_list): Extern it.
2115 * font.c (mfont__encoding_list): New function.
2116 (mdebug_dump_font_list): New function.
2118 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2119 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2121 (ft_family_list): New variable.
2122 (set_font_info): New arg basep. Callers changed.
2123 (fc_list): Check the return value of FcPatternGetString.
2124 (add_font_info): New arg plist. Callers changed. Update
2126 (ft_list_family): New function (merged fc_list and ft_list_all).
2127 (ft_select): Use ft_list_family.
2128 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2130 (mfont__ft_init): Initialize above new variables.
2131 (mfont__ft_fini): Free ft_family_list.
2132 (STRDUP_LOWER): New macro.
2133 (set_font_info): Use STRDUP_LOWER.
2134 (ft_list_family): Avoid duplicate addition of font path. Use
2136 (fc_decode_prop): Fix typo.
2138 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2139 (xfont_registry_list): Change argument disp_info to frame.
2141 (xfont_list_all): New function.
2142 (xfont_list): If FONT is not NULL, check all fonts.
2144 2004-09-28 Kenichi Handa <handa@m17n.org>
2146 * m17n-X.c (MXFont, MXFontList): New types.
2147 (MDisplayInfo): Delete members font_registry_list,
2148 iso8859_1_family_list, iso10646_1_family_list, new members
2149 font_list, base_font_list.
2150 (free_display_info): Adusted for the change of MDisplayInfo.
2151 (xfont_driver): Initialize with xfont_list.
2152 (font_compare): New function.
2153 (build_font_list): Deleted.
2154 (xfont_registry_list): New function.
2155 (xfont_select): Use xfont_registry_list.
2156 (xfont_list): New function.
2157 (device_open): Adusted for the change of MDisplayInfo.
2159 * font-ft.c (add_font_info): New arg languages. Callers changed.
2160 (fc_list): Get languages from fonts..
2161 (ft_list_all): Renamed from ft_list. Callers changed.
2162 (ft_list): New function.
2163 (mfont__ft_driver): Initalize with ft_list.
2165 * font.c (mfont_list): New function.
2167 * font.h (struct MFontDriver): New member `list'.
2168 (MFTInfo): New member languages.
2170 * m17n-gui.h (mfont_list): Extern it.
2172 2004-09-27 Kenichi Handa <handa@m17n.org>
2174 * internal-gui.h (struct MGlyphString): Delete members mt,
2175 sub_width, sub_lbrearing, sub_rbearing, and region.
2177 * draw.c (MSubTextExtents): New type.
2178 (layout_glyphs): New arg extents. Set its members.
2179 (layout_glyph_string): Adjusted for the above change.
2180 (alloc_gstring): Don't set gstring->mt.
2181 (truncate_gstring): Call line_break function with mt instead of
2184 2004-09-22 Kenichi Handa <handa@m17n.org>
2186 * mtext.c (count_utf_16_chars): Count each code of invalid
2189 2004-09-19 Kenichi Handa <handa@m17n.org>
2191 * mtext.c (default_utf_16, default_utf_32): Rename them to
2192 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2195 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2198 2004-09-13 Kenichi Handa <handa@m17n.org>
2200 * draw.c (Mlatin): Don't declare it here.
2201 (visual_order): Fix reordering of combining characters.
2202 (compose_glyph_string): Fix detection of script.
2203 (layout_glyphs): Don't fix reordering of combining characters
2205 (layout_glyph_string): Pay attention to
2206 control->disable_overlapping_adjustment.
2207 (truncate_gstring): Include at least on character in a line.
2208 (get_gstring): Always scan one full line.
2209 (mdraw__init): Don't initialize Mlatin here.
2210 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2211 have a font, use ascent/descent of an ASCII font. Allow
2212 ink_array_return and logical_array_return to be NULL.
2213 (mdraw_coordinates_position): Fix iteration.
2215 * font-ft.c (MFTtoProp): Member completely changed.
2216 (ft_to_prop): Adjusted for the above change.
2217 (ft_to_prop_size): Likewise.
2218 (set_font_info): Adjusted for the change of MFTtoProp.
2219 (fc_generic_family_list): New variable.
2220 (fc_list): Add special handling of generic font names.
2221 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2222 Initialize fc_generic_family_list.
2223 (mfont__ft_fini): Don't free ft_to_prop. Free
2224 fc_generic_family_list.
2225 (FC_vs_M17N_font_prop): New type.
2226 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2227 (fc_decode_prop, fc_encode_prop): New functions.
2228 (mfont__ft_parse_name): Use fc_decode_prop.
2229 (mfont__ft_unparse_name): Use fc_encode_prop.
2231 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2232 (MWDevice): Add member realized_font_list.
2233 (free_display_info): Don't free disp_info->realized_font_list.
2234 (free_device): Free device->realized_fontset_list.
2235 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2236 (device_open): Don't initialize disp_info->realized_font_list.
2237 (device_open): Initialize device->realized_font_list and set it to
2238 frame->realized_font_list.
2240 * fontset.c (try_font_group): New function.
2241 (mfont__lookup_fontset): Use try_font_group.
2243 * font.c (common_weight): Change the order of "regular".
2245 * face.c (Mlatin): Don't make it static.
2246 (mface__realize): Be sure to set work_gstring.frame.
2247 (mface__for_chars): Likewise.
2249 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2252 * internal-gui.h (Mlatin): Extern it.
2254 * m17n-gui.h (MDrawControl): New member
2255 disable_overlapping_adjustment.
2257 2004-09-06 Kenichi Handa <handa@m17n.org>
2259 * font-flt.c (run_otf): Fix typo ('}'->']').
2261 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2262 (COMBINING_PRECOMPUTED_P): New macros.
2264 * draw.c (layout_glyphs): Handle precomputed combining code.
2266 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2267 precomupted combining code.
2269 2004-09-03 Kenichi Handa <handa@m17n.org>
2271 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2274 2004-08-27 Kenichi Handa <handa@m17n.org>
2276 * face.c (mface_put_prop): If the new value is the same as the
2277 current one, don't increment frame->tick.
2279 2004-08-25 Kenichi Handa <handa@m17n.org>
2281 * fontset.c (mfontset): Initialize font_spec_list member.
2282 (mfontset_copy): Load fontset if necessary.
2284 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2285 'metrics' to for C++.
2287 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2290 2004-08-16 Kenichi Handa <handa@m17n.org>
2292 * Version 1.1.0 released.
2294 2004-08-13 Kenichi Handa <handa@m17n.org>
2296 * language.c (mlang__init): Add Dhivehi.
2298 * m17n-gui.c (Mx, Mfreetype): Delete it.
2299 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2301 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2302 (mfont_resize_ratio): Extern it.
2303 (MDrawGlyphInfo): New member logical_width;
2304 (MDrawGlyph): New type.
2305 (mdraw_glyph_list): Prototype adjusted.
2307 * m17n-X.c (xfont_open): Set type and fontp members.
2308 (xft_open): Likewise.
2310 * internal-gui.h (Mx, Mfreetype): Delete extern.
2312 * font.h (struct MRealizedFont): New member type and fontp.
2314 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2315 (Mx, Mfreetype): Declare here.
2316 (Mxft): New variable.
2317 (mfont_resize_ratio): New function.
2319 * font-ft.c (ft_open): Set type and fontp members.
2321 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2324 2004-08-11 Kenichi Handa <handa@m17n.org>
2326 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2329 2004-08-06 Kenichi Handa <handa@m17n.org>
2331 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2334 * font-flt.c (run_otf): Print debugging information if necessary.
2336 2004-08-05 Kenichi Handa <handa@m17n.org>
2338 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2339 positioning_type 5 and 6. Switch simplified.
2341 2004-08-04 Kenichi Handa <handa@m17n.org>
2343 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2345 2004-08-02 Kenichi Handa <handa@m17n.org>
2347 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2348 set val to 1 even if it is greater than 1.
2350 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2352 2004-07-29 Kenichi Handa <handa@m17n.org>
2354 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2355 debugging information.
2357 * internal.h (MDEBUG_PRINT5): New macro.
2359 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2360 the previous one if the zero width glyph has left or right
2363 2004-07-26 Kenichi Handa <handa@m17n.org>
2365 * m17n-X.c (xft_render): Pay attention to members left_padding and
2366 right_padding of MGlyph.
2368 * draw.c (visual_order): Allocate one more elements for arrays as
2369 a workaround of fribidi bug.
2370 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2371 instead of MGlyph->bidi_sensitive.
2372 (layout_glyph_string): Pay attentinon to
2373 control->orientation_reversed when padding at the head or tail.
2374 Fix adjustment of space glyph width.
2375 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2378 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2379 instead of MGlyph->bidi_sensitive.
2381 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2383 2004-07-26 Kenichi Handa <handa@m17n.org>
2385 * draw.c (visual_order): Don't treat combined glyphs specially.
2386 (layout_glyphs): Don't get metrics glyphs that are already ready.
2387 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2388 width with the previous one.
2389 (draw_background): Fix bar cursor position on a r2l glyph.
2391 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2392 (run_rule): Fix place of updating cluster_begin_pos and
2393 cluster_end_pos here.
2394 (run_otf): Don't set left_padding.
2396 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2398 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2399 Fix handling of GPOS.
2400 (mfont__ft_drive_gpos): Delete this function.
2402 * font.h (mfont__ft_drive_otf): Renamed back from
2403 mfont__ft_drive_gsub.
2404 (mfont__ft_drive_gpos): Delete extern.
2406 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2407 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2409 2004-07-23 Kenichi Handa <handa@m17n.org>
2411 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2412 the same bidi level.
2414 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2416 2004-07-22 Kenichi Handa <handa@m17n.org>
2418 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2420 2004-07-20 Kenichi Handa <handa@m17n.org>
2422 * draw.c (render_glyphs): Fix checking of g->code validity.
2424 * face.c (mface__realize): Set g.type.
2426 2004-07-18 Kenichi Handa <handa@m17n.org>
2428 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2431 * m17n-gui.c (mframe): Print error message give by dlopen to
2434 2004-07-16 Kenichi Handa <handa@m17n.org>
2436 * draw.c (compose_glyph_string): Improve the way of deciding a
2437 script. For a character that doesn't have script property, use
2438 the last non-latin script.
2440 * font-ft.c (fc_list): Cancel previous change.
2441 (mfont__ft_init): Add more entries in ft_to_prop_name.
2443 2004-07-15 Kenichi Handa <handa@m17n.org>
2445 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2446 previous or next character glyphs.
2448 2004-07-14 Kenichi Handa <handa@m17n.org>
2450 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2451 of type GLYPH_SPACE.
2453 * fontset.c (mfont__lookup_fontset): If glyph type is
2454 GLYPH_SPACE, get codes for SPACE.
2456 * internal-gui.h (Mfont): Delete extern.
2458 * m17n-gui.h (Mfont): Delete duplicated extern.
2460 2004-07-13 Kenichi Handa <handa@m17n.org>
2462 * font-ft.c (DEVICE_DELTA): New macro.
2463 (adjust_anchor): New function.
2464 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2466 (mfont__ft_drive_gpos): New function.
2468 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2469 (FontLayoutContext): Delete member `rfont'.
2470 (run_otf): Set g->otf_cmd. Call
2471 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2472 only whne HAVE_OTF is defined.
2474 * fontset.c: Include "config.h".
2476 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2477 (MGlyph): New member otf_cmd.
2479 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2480 (mfont__ft_drive_gpos): Extern it.
2482 * face.c: Include "config.h".
2484 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2486 * input-gui.c: Include "config.h".
2488 * plist.c: Include "config.h".
2490 2004-07-06 Kenichi Handa <handa@m17n.org>
2492 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2493 internal-gui.h: Cancel previous changes.
2495 * m17n-gd.h: Delete it.
2497 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2498 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2499 @XML2_LD_FLAGS@ to above.
2500 (libm17n_la_LIBADD): Add -ldl.
2501 (libm17n_la_LDFLAGS): Add -export-dynamic.
2502 (X_LD_FLAGS): Fix the order of linking.
2503 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2504 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2505 (libm17n_X_la_LDFLAGS): Add -module.
2506 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2507 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2508 (libm17n_gd_la_LDFLAGS): Add -module.
2509 (include_HEADERS): Delete m17n-gd.h.
2511 2004-06-30 Kenichi Handa <handa@m17n.org>
2513 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2514 (MDeviceLibraryInterface): Delete it.
2515 (register_device_library): Delete it.
2516 (m17n__device_library_list): Renamed from device_library_list.
2518 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2519 (m17n_init_win): Adjust prototype.
2521 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2522 (m17n_init_gd): New function.
2524 * m17n-gd.h: New file.
2526 * m17n-X.h: Include <m17n-gui.h>.
2527 (m17n_init_X): Extern it.
2528 (M17N_INIT): Redefine it.
2530 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2531 (m17n_init_X): New function.
2533 * internal-gui.h (m17n__device_library_list): Extern it.
2534 (struct MDeviceDriver): New members initialized, init, and fini.
2536 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2538 (libm17n_X_la_LIBADD): Delete aboves.
2539 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2540 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2541 (libm17n_gd_la_LDFLAGS): Delete it.
2542 (include_HEADERS): Add m17n-gd.h.
2544 2004-06-25 Kenichi Handa <handa@m17n.org>
2546 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2547 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2549 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2551 * font-ft.c (fc_list): If FcFontList finds no font, try
2554 * draw.c (compose_glyph_string): Terminate the last loop after
2555 doing default combining if necessary.
2557 2004-06-24 Kenichi Handa <handa@m17n.org>
2559 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2561 * character.c (mchar_define_property): Add const to an arg.
2563 * charset.c (mchar_define_charset): Add const to an arg.
2565 * coding.c (MCodingSystem): Add const to an arg or decoder.
2566 (finish_decoding): Add const to an arg.
2567 (decode_coding_charset, decode_coding_utf_8)
2568 (decode_coding_utf_16, decode_coding_utf_32)
2569 (decode_coding_iso_2022, decode_coding_sjis)
2570 (mconv_define_coding): Likewise.
2572 * m17n-X.c (xft_find_metric): Delete unused variable.
2574 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2577 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2580 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2581 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2583 * mtext.h (mtext__from_data): Ajust prototype.
2585 2004-06-23 Kenichi Handa <handa@m17n.org>
2587 * draw.c (compose_glyph_string): Always get glyph codes by
2589 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2590 (mdraw_glyph_list): New function.
2592 * font-flt.c (mfont__flt_run): Be sure to call
2593 rfont->driver->encode_char.
2595 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2596 (ft_encode_char): Delete arg C.
2597 (ft_render): Don't call FT_Get_Char_Index.
2599 * font.c (mfont__encodable_p): Delete it.
2600 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2602 * font.h (struct MFontDriver): Delete arg C of encode_char.
2603 (mfont__encodable_p): Delete extern.
2605 * m17n-X.c (xfont_encode_char): Delete arg C.
2606 (xft_find_metric): Don't cal FT_Get_Char_Index.
2607 (xft_render): Likewise.
2609 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2611 (mdraw_glyph_list): Extern it.
2613 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2615 2004-06-22 Kenichi Handa <handa@m17n.org>
2617 * m17n-gui.h (mfontset_lookup): Extern it.
2619 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2621 * fontset.c (realize_fontset_elements)
2622 (free_realized_fontset_elements, update_fontset_elements): New
2624 (mfont__realize_fontset): Call realize_fontset_elements.
2625 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2626 (mfont__lookup_fontset): If a fontset was modified, update
2627 the realized fontset.
2628 (mfontset_modify_entry): Increment fontset->tick.
2629 (mfontset_lookup): New function.
2631 2004-06-21 Kenichi Handa <handa@m17n.org>
2633 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2635 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2636 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2637 length of source text 0.
2639 2004-06-21 Kenichi Handa <handa@m17n.org>
2641 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2642 (compare): Pay attention to format other than utf-8.
2643 (copy): Delete this function.
2644 (count_by_utf_8, count_by_utf_16, insert): New functions.
2645 (count_utf_16_chars): Fix handling of a surrogate pair.
2646 (find_char_forward, find_char_backward): Likewise.
2647 (mtext__from_data): Delete unnecessary check. Fix number of
2649 (mtext_from_data): Don't count items.
2650 (mtext_ref_char): Optimize the code.
2651 (mtext_set_char): Pay attention to format other than utf-8.
2652 (mtext_cat_char): Likewise.
2653 (mtext_dup): Don't call copy, instead do allocation here.
2654 (mtext_cat): Call insert instead of copy.
2655 (mtext_ncat): Likewise.
2656 (mtext_cpy): Delete character at first and call insert instead of
2658 (mtext_ncpy): Likewise.
2659 (mtext_copy): Likewise.
2660 (mtext_duplicate): Call insert instead of copy.
2661 (mtext_del): Pay attention to format other than utf-8.
2662 (mtext_ins): Simply call insert.
2663 (mtext_ins_char): Pay attention to format other than utf-8.
2664 (mtext_tok): Call insert instead of copy.
2665 (mtext_text): Call UNIT_BYTES.
2667 * textprop.c (mtext__adjust_plist_for_change): New function.
2669 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2670 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2671 (CHAR_UNITS_AT): Fix typo.
2672 (CHAR_UNITS_BY_HEAD): Fix typo.
2673 (STRING_CHAR_AND_UNITS): Fix typo.
2675 * internal.h (MTEXT_READ_ONLY_P): New macro.
2677 * mtext.h (mtext__replace): Delete the extern.
2678 (mtext__adjust_foramt): Adjust prototype.
2680 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2681 if possible. Otherwise make a copy of mmt.
2683 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2686 2004-06-18 Kenichi Handa <handa@m17n.org>
2688 * character.h (CHAR_STRING_UTF16): Fix syntax.
2690 2004-06-16 Kenichi Handa <handa@m17n.org>
2692 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2693 (libm17n_X_la_LIBADD): Delete it.
2694 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2696 * m17n-X.c (device_open): Add parens in `if' condition.
2698 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2699 (DEC_POSITION): Likewise.
2700 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2702 2004-06-15 Kenichi Handa <handa@m17n.org>
2704 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2707 * draw.c (compose_glyph_string): If langauge is specified, call
2708 mface__for_chars even if a text is all latin. Fix condition for
2709 setting non_ascii_found.
2711 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2713 * m17n.h (minput_char_to_key): Delete extern.
2715 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2717 * m17n-gui.c (null_device_open): Set several members of frame.
2719 2004-06-14 Kenichi Handa <handa@m17n.org>
2721 * m17n-gui.h (minput_event_to_key): Delete extern.
2723 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2725 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2727 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2729 2004-06-08 Kenichi Handa <handa@m17n.org>
2731 * character.c (mchar_put_prop): Don't increment the ref-count of
2734 2004-06-04 Kenichi Handa <handa@m17n.org>
2736 * m17n-core.c (mdebug__register_object): New function.
2737 (mdebug__unregister_object): Likewise.
2739 * internal.h (mdebug__register_object, mdebug__unregister_object):
2741 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2744 * charset.c (mcharset__load_from_database): Don't call
2745 mconv__register_charset_coding here.
2747 * coding.c (find_coding): Get a real name from an element of
2748 coding_definition_list.
2749 (mconv__register_charset_coding): Set the real name at the top of
2751 (mcoding__load_from_database): Likewise.
2752 (mconv_list_codings): Adjusted for the above change.
2754 2004-06-03 Kenichi Handa <handa@m17n.org>
2756 * coding.c (find_coding): Find by canonicalized name. Don't have
2757 to modify the element of coding_definition_list by
2759 (mconv__define_coding_from_charset): Delete it.
2760 (mconv__register_charset_coding): Canonicalize sym.
2761 (mcoding__load_from_database): Register plist modified by
2764 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2766 * font-ft.c (ft_open): Fix setting of rfont->descent.
2768 2004-06-02 Kenichi Handa <handa@m17n.org>
2770 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2771 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2772 (xlfd_unparse_name): Renamed from xfont_build_name.
2773 (mfont__init): Initialized Mfontconfig.
2774 (mfont__free_realized): Unconditionally unref rfont->info.
2775 (mfont__select): Free `this' if it's not best.
2776 (mfont__open): Don't check frame->realized_font_list.
2777 (mfont__parse_name_into_font): New function.
2778 (Mfontconfig): New variable.
2779 (mfont_from_name): Call mfont_parse_name.
2780 (mfont_name): Call mfont_unparse_name.
2781 (mdebug_dump_font): Likewise.
2783 * font.h (struct MFontDriver): Delete members parse_name and
2785 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2786 (mfont__parse_name_into_font): Extern it.
2788 * font-ft.c: Include "symbol.h".
2789 (close_ft): Unconditionally free filename and charmap_list of
2791 (ft_open): Duplicate base->filename. Increment ref-count of
2792 ft_info->charmap_list. Free ft_info->charmap_list and
2793 ft_info->filename on error.
2794 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2796 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2798 (enum xlfd_field_idx): Moved to font.c.
2799 (split_font_name, build_font_name): Likewise.
2800 (build_font_list): Call mfont__parse_name_info_font.
2801 (xfont_open): Call mfont__unparse_name. Free name.
2802 (xfont_parse_name, xfont_build_name): Moved to font.c
2803 (xft_select): Prototype deleted.
2804 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2805 Call mfont_pase_name.
2807 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2808 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2811 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2814 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2816 2004-06-01 Kenichi Handa <handa@m17n.org>
2818 * fontset.c (mfontset_modify_entry): Pay attention to the case
2819 that fontset->font_spec_list is NULL.
2821 2004-05-31 Kenichi Handa <handa@m17n.org>
2823 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2825 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2827 * font.c (mfont__select): Print score the a font for debugging.
2829 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2831 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2832 kanji_sym and kana_sym.
2834 2004-05-28 Kenichi Handa <handa@m17n.org>
2836 * Makefile.am (VINFO): New variable.
2837 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2838 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2840 2004-05-27 Kenichi Handa <handa@m17n.org>
2842 The following chanages are to make device dependent functions
2843 accessible only from MDeviceDriver structure, and to add GD and
2844 null device drivers. Font drivers get also device dependent.
2846 * m17n.c (m17n_init): Increament shell_initialized.
2847 (m17n_fini): Decremented shell_initialized.
2849 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2851 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2852 (Mwidget, Mcolormap, Mx): Extern them.
2854 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2855 (free_frame): Call frame->driver->close instead of
2857 (DLOPEN_SHLIB_EXT): New macro.
2858 (MDeviceLibraryInterface): New type.
2859 (device_library_list): New variable.
2860 (register_device_library): New function.
2861 (null_device): New variable.
2862 (null_device_close, null_device_get_prop)
2863 (null_device_realize_face, null_device_free_realized_face): New
2865 (null_driver): New variable.
2866 (null_device_init, null_device_fini, null_device_open): New
2868 (null_interface): New variable.
2869 (Mfreetype, Mdevice): Declare them.
2870 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2871 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2872 Mwin__Close_Device. Register drivers for Mx and Mgd.
2873 (m17n_fini_win): Decremented win_initialized. Call "fini"
2874 function of all opened devices. Don't call mwin__fini.
2875 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2877 (mframe): Handle Mdevice key of PLIST.
2878 (mframe_get_prop): Call frame->device->get_prop instead of
2879 mwin__device_get_prop.
2881 * m17n-gd.c: New file.
2883 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2884 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2886 * m17n-core.c (m17n_init_core): Increate core_initialized.
2887 (m17n_fini_core): Decremented core_initialized.
2889 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2890 (Mcolormap): Don't extern them here.
2892 * m17n-X.c (FRAME_DEVICE): New macro.
2893 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2894 (free_display_info): Use MPLIST_DO.
2895 (free_device): Free rface->info.
2896 (xft_close): Delete it.
2897 (device_init): Renamed from mwin__init.
2898 (device_fini): Renamed from mwin__fini.
2899 (device_open): Renamed from mwin__open_device.
2900 (x_driver): New variable.
2901 (MXFontInfo): Delete member frame, add member display.
2902 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2903 Don't declare them here.
2905 * internal-gui.h (MDeviceType): New enum.
2906 (MWDefice): Delete it.
2907 (struct MFrame): Change type of device to void *. New members
2908 device_type, driver, font_driver_list.
2909 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2910 (MDeviceDriver): New type.
2911 (Mx, Mgd, Mfreetype): Extern them.
2912 (mwin__XXX): Delete all of them.
2914 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2916 (win_destroy_ic): Likewise.
2917 (adjust_window_and_draw): Likewise.
2918 (win_callback): Likewise.
2919 (Mxim): Declare it here.
2920 (minput_event_to_key): Call M_CHECK_READABLE.
2922 * fontset.c (mfont__lookup_fontset): Delete local variable
2925 * font.h (struct MFontDriver): Delete member close, add members
2926 parse_name and build_name.
2927 (mfont__driver_list): Delete extern.
2928 (mfont__close): Delete extern.
2930 * font.c (mfont__init): Don't set mfont__driver_list.
2931 (mfont__fini): Don't unref mfont__driver_list.
2932 (mfont__select): Try font drivers in frame->font_driver_list. Set
2933 driver member of a realized font.
2934 (mfont__close): Delete it.
2935 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2936 functions of the default frame.
2938 * font-ft.c (close_ft): Check ft_info->ft_face and work
2940 (add_font_info): Allocate ft_info by M17N_OBJECT.
2941 (ft_close): Delete it.
2942 (mfont__ft_driver): Don't set ft_close.
2943 (ft_select): Increment ref-count of best_font.
2944 (ft_open): Decremented ref-count of base. On error, call
2945 FT_Done_Face and free ft_info.
2946 (ft_find_metric): Always use XXX_MONO in load_flags.
2947 (ft_render): Fix setting of width. Call
2948 frame->driver->draw_points instead of mwin__draw_points.
2949 (ft_to_prop): Don't set mfont__driver_list.
2950 (mfont__ft_fini): Just unref ft_info.
2952 * face.c (mface__init): Exchange foreground and background of
2953 mface__default. Call mface_put_prop to set hline of
2955 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2956 (mface__free_realized): Don't call mwin__free_realized_face.
2958 * draw.c (Mdepth): Don't declare it here.
2959 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2960 (render_glyphs, render_glyph_string): Likewise.
2961 (mdraw__init): Don't set Mdepth.
2962 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2964 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2966 (mdraw_text_items): Check FRAME is writable.
2967 (mdraw_per_char_extents): Implement body.
2969 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2971 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2972 (GUI_SOURCES): Delete it.
2973 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2974 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2975 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2976 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2977 (linkgui_LDADD): Set to libm17n-gui.la
2978 (linkgui_LDFLAGS): New target.
2979 (SRC): Include ${libm17n_gui_la_SOURCES} and
2980 ${libm17n_gd_la_SOURCES}.
2982 2004-05-24 Kenichi Handa <handa@m17n.org>
2984 * draw.c (draw_background): Don't draw background even if
2985 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2987 2004-05-22 Kenichi Handa <handa@m17n.org>
2989 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2991 2004-05-20 Kenichi Handa <handa@m17n.org>
2993 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2995 * m17n-gui.c: Include "plist.h".
2996 (mframe): If PLIST is NULL, initialize it to emply plist.
2998 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2999 (xft_driver): New variable.
3000 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3001 (xft_find_metric, xft_render): New function.
3002 (mwin__init): Adjusted for the new mfont__driver_list.
3003 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3004 generated face to PARAM.
3005 (mwin__realize_face): Fix setting of box colors. Don't call hook
3007 (mwin__draw_hline): New function.
3008 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3009 (mwin__xft_render): Delete these function.
3011 * internal-gui.h (struct MFrame): New member tick.
3012 (struct MGlyphString): New member tick.
3013 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3014 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3015 (mwin__xft_render): Delete extern.
3017 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3018 (mfontset): Always increment the reference count of returned
3021 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3022 (MFTInfo): Moved to font.h.
3023 (ft_iso8859_1_font_list): Delete this variable.
3024 (set_font_info): Don't set font->property[MFONT_TYPE].
3025 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3026 (add_font_info): Change type to void.
3027 (fc_list): Change anme from xft_list. Caller changed. Include
3028 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3029 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3030 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3031 (close_ft): Don't call mwin__xft_close. Unref
3032 ft_info->extra_info.
3033 (ft_open): Don't setup ft_info->fontname. Don't call
3035 (ft_find_metric): Don't call mwin__xft_get_metric.
3036 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3037 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3038 (mfont__ft_init): Adjusted for new mfont__driver_list.
3039 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3041 * font.c (mfont__driver_list): Make it MPlist.
3042 (mfont__init): Adjust initialization of mfont__driver_list.
3043 (mfont__fini): Free mfont__driver_list.
3044 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3045 (mfont__select): Adjusted for the new mfont__driver_list.
3047 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3048 (mfont__drirver_list): Adjust prototype.
3049 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3051 * face.h (struct MFace): Delete member realized_face_list, add
3053 (struct MRealizedFace): Delete member need_update
3054 andnofont_rface, add member non_ascii_list.
3055 (mface__update_frame_face): Extern it.
3057 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3059 (get_hline_create, get_box_create): New functions.
3060 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3062 (free_face): Cancep previous change. Free face->frame_list.
3063 (serialize_hline): Do nothing if hline->width is zero.
3064 (serialize_box): Do nothing if box->width is zero.
3065 (mface__init): Setup all properties of mface__default.
3066 (mface__fini): Free hline_prop_list and box_prop_list.
3067 (mface__realize): Cancel previous change. Update
3068 face->frame_list. Setup rface->non_ascii_list.
3069 (mface__for_chars): Update rface->non_ascii_list.
3070 (mface__free_realized): Free rface->non_ascii_list.
3071 (mface__update_frame_face): New function.
3072 (mface): Initialize face->frame_list.
3073 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3075 (mface_merge): Likewise.
3076 (mface_put_prop): If key is Mhline or Mbox, get value by
3077 get_hline_create or get_box_create respectively.
3078 (mface_put_prop): Update frame->tick and call
3079 mface__update_frame_face if necessary.
3080 (mface_update): Do nothing if func is noop_hook.
3082 * draw.c (render_glyphs): If a font is not found, use
3083 mwin__draw_empty_boxes.
3084 (alloc_gstring): Initialize gstring->tick.
3085 (get_gstring): Check gstring->tick.
3087 2004-05-17 Kenichi Handa <handa@m17n.org>
3089 * face.c (find_realized_face): Return value changed. If RFONT is
3090 NULL, avoid unnecessary checking.
3091 (free_face): Free face->realized_face_list.
3092 (mface__realize): Adjusted for the change of find_realized_face.
3093 If it returns a realized face that needs update, free it and
3094 realize a new one. Push a new realized face to
3095 frame->realized_face_list instead of appending.
3096 (mface__for_chars): Adjusted for the change of find_realized_face.
3097 Short cut if the required font is in rface->ascii_rface.
3098 (mface_put_prop): Free old value if necessary. Set need_update
3099 member of realized faces to 1.
3101 * face.h (struct MFace): Delete member tick, add member
3103 (struct MRealizedFace): Delete member tick, add member
3106 2004-05-13 Kenichi Handa <handa@m17n.org>
3108 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3110 2004-05-12 Kenichi Handa <handa@m17n.org>
3112 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3114 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3115 parse it XftNameParse.
3117 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3118 (all_fonts_scaned): New variable.
3119 (set_font_info): FAMILY may be Mnil.
3120 (add_font_info): Argument changed.
3121 (xft_list): Call add_font_info in it.
3122 (ft_list): Likewise.
3123 (ft_select): Make it work in the case family is Mnil.
3124 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3125 (mfont__ft_fini): Set all_fonts_scaned to 0.
3127 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3128 that is failed to open.
3130 2004-05-10 Kenichi Handa <handa@m17n.org>
3132 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3133 device's depth is 1 (i.e. monochrome).
3135 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3136 to work around the problem of libtool.
3138 * font-ft.c: Include <freetype/ftbdf.h>.
3139 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3141 (mfont__ft_init): Initialize them.
3142 (ft_iso8859_1_font_list): New variable.
3143 (set_font_info): Detect a font containing iso8859-1 glyphs and
3144 register it in ft_iso8859_1_font_list. If the font is not
3145 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3146 properties of the font from its properties.
3147 (add_font_list): If the font is not scalable, check if it is BDF
3148 or PCF font. If not, ignore it.
3149 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3150 registry is not iso8859-1.
3151 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3152 ft_iso8859_1_font_list.
3153 (ft_find_metric): If the font is not scalable, assume it as BDF
3154 or PCF, and get a metric from its properties.
3155 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3157 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3159 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3160 (libm17n_la_LDFLAGS): Delete it.
3161 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3162 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3164 2004-05-06 Kenichi Handa <handa@m17n.org>
3166 * draw.c (compose_glyph_string): Fix previous change.
3168 2004-04-30 Kenichi Handa <handa@m17n.org>
3170 * font-ft.c (ft_list): Delete unused variable `result'.
3171 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3173 2004-04-27 Kenichi Handa <handa@m17n.org>
3175 * m17n-X.c: Include config.h
3176 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3177 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3178 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3179 (FRAME_CMAP, FRAME_VISUAL): New macros.
3180 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3181 (xfont_driver): Make it static.
3182 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3183 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3184 info->xft_color_back.
3185 (MXftFontInfo) [HAVE_XFT2]: New type.
3186 (mwin__xft_close) [HAVE_XFT2]: New function.
3187 (mwin__xft_open) [HAVE_XFT2]: New function.
3188 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3189 (mwin__xft_render) [HAVE_XFT2]: New function.
3191 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3192 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3193 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3196 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3198 * font-ft.c: Don't include FT_FREETYPE_H here.
3199 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3200 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3201 (MFTInfo): New member charmap_index.
3202 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3203 (check_otf_filename): Renamed from check_filename. Return value
3205 (ft_set_property): This function deleted.
3206 (set_font_info): New function.
3207 (add_font_list): Argument changed. Add multiple fonts.
3208 (xft_list) [HAVE_XFT2]: New function.
3209 (ft_list) [not HAVE_XFT2]: New function.
3210 (ft_select): Add code for Xft.
3211 (close_ft): Likewise.
3212 (ft_open): Likewise.
3213 (ft_find_metric): Likewise.
3214 (ft_encode_char): Likewise.
3215 (ft_render): Likewise.
3217 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3219 2004-04-26 Kenichi Handa <handa@m17n.org>
3221 * textprop.c (mtext_attach_property): Declare the return type as
3224 2004-04-21 Kenichi Handa <handa@m17n.org>
3226 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3228 2004-04-09 Kenichi Handa <handa@m17n.org>
3230 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3232 (load_command): Setup above members.
3234 2004-04-05 Kenichi Handa <handa@m17n.org>
3236 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3238 2004-03-30 Kenichi Handa <handa@m17n.org>
3240 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3243 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3244 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3246 2004-03-29 Kenichi Handa <handa@m17n.org>
3248 * Version 1.0 Patch Level 2 released.
3250 2004-03-29 Kenichi Handa <handa@m17n.org>
3252 * charset.c (make_charset): Set charset->fully_loaded and
3253 charset->simple correctly. Don't try to get charset->min_char and
3254 charset->max_char for a charset of method subset and superset.
3255 Don't load a mapping file here.
3256 (mcharset__init): Set unified_max.
3257 (mcharset__load_from_database): Free a working plist.
3259 * coding.c (mcoding__fini): Free all malloced data.
3261 * input-gui.c (win_create_ic): Set control.as_image for preediting
3264 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3265 `count') to initialize the array.
3267 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3270 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3272 (mwin__create_window): Fix bug of setting a background pixel of a
3274 (mwin__adjust_window): Clear the window before drawing.
3276 * m17n-core.c (mdebug__report_object): Free array->objectes if
3278 (m17n_init_core): Don't set report_header_printed to 0 here.
3279 Fix debugging information.
3280 (m17n_fini_core): Set report_header_printed to 0 here.
3282 * m17n-core.h (mplist_deserialize): Extern it.
3284 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3286 * m17n.c (m17n_fini): Fix debugging information.
3288 * mtext.c (mtext__adjust_foramt): New function.
3290 * mtext.h (mtext__adjust_foramt): Extern it.
3292 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3294 * plist.h (mplist__deserialize): Don't extern it.
3296 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3297 elements of symbol_table to NULL. Report about created and freed
3298 symbols if MDEBUG_FINI is set.
3300 2004-03-22 Kenichi Handa <handa@m17n.org>
3302 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3304 * m17n.c (m17n_init): Fix the way of checking merror_code.
3306 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3308 2004-03-22 Kenichi Handa <handa@m17n.org>
3310 * fontset.c (realize_font_group): Adjust the font size by
3311 mfont__resize before selecting a font.
3313 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3315 2004-03-19 Kenichi Handa <handa@m17n.org>
3317 * Version 1.0 Patch Level 1 released.
3319 2004-03-19 Kenichi Handa <handa@m17n.org>
3321 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3323 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3325 2004-03-19 Kenichi Handa <handa@m17n.org>
3327 Re-apply the changes forgotten in the released version.
3329 * charset.c (mcharset__load_from_database): Call
3330 mchar_define_charset.
3332 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3333 (mconv_encode_range): Put Mcoding text property.
3335 2004-03-18 Kenichi Handa <handa@m17n.org>
3337 * draw.c (Mdepth): New variable.
3338 (visual_order): Delete unused local var `pos'.
3339 (compose_glyph_string): Fix for the case that gstring->glyphs is
3340 realloced. Stop generating glyphs at TO. Fix handling of
3342 (layout_glyphs): Get metrics of all glyphs in advance. Set
3343 lbearing and rbearing of base of composition glyph correctly.
3344 Handle left-overhang glyphs correctly.
3345 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3347 (dump_combining_code): Change the defualt off_x character to ".".
3348 (mdraw__init): Initialize Mdepth.
3350 * face.c (work_gstring): New variable
3351 (mface__init): Initialize work_gstring.
3352 (mface__fini): Free work_gstring.glyphs.
3353 (mface__realize): Don't handle videomode property here. Adjusted
3354 for the change of mfont__get_metric.
3355 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3357 * face.h (enum face_gc): Moved to m17n-X.c.
3359 * font.h (struct MFontDriver): Arguments of find_metric changed.
3360 (mfont__select): Prototype adjusted.
3361 (mfont__get_metric): Likewise.
3362 (mfont__ft_drive_otf): Likewise.
3363 (mfont__flt_run): Likewise.
3365 * font.c (mfont__select): New argument layouter. If layouter is
3366 different in the registered font, make a new copy of realized
3368 (mfont__get_metric): Argument changed. Get metrics of multiple
3370 (mfont_find): Call mfont__select with layouter as Mnil.
3372 * font-flt.c (FontLayoutContext): New member rfont.
3373 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3374 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3376 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3378 (NUM_POINTS): New macro.
3379 (MPointTable): New type.
3380 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3381 (mfont__ft_drive_otf): New argument rfont.
3383 * fontset.c (realize_font_group): Adjusted for the changed of
3385 (check_fontset_element): This function deleted.
3387 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3388 off the parent window if the preedit text is zero length.
3390 * internal-gui.h (struct MFrame): New members foreground,
3391 background, videomode, font.
3392 (struct MGlyphString): New member anti_alias.
3393 (MDrawPoint): New type.
3394 (mwin__draw_bitmap): Prototype deleted.
3395 (mwin__draw_points): Prototype added.
3397 * m17n-gui.h (MDrawControl): New member anti_alias.
3399 * m17n-gui.c (free_frame): Free frame->font.
3400 (mframe): Set the fontset of frame->face to the default fontset.
3402 * m17n-X.c (RGB_GC): New type.
3403 (enum gc_index): Renamed from enum face_gc. Member names changed.
3405 (struct MWDevice): Members foreground and background deleted. New
3406 member scratch_gc, gc_list.
3407 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3408 (free_device): Free GCs in device->gc_list.
3409 (get_rgb_gc): New function.
3410 (get_gc): Renamed and argument changed from get_color.
3411 (get_gc_for_anti_alias): New function.
3412 (xfont_find_metric): Arguments changed. Get metrics of multiple
3414 (set_region): Argument changed. Caller changed.
3415 (xfont_render): Allways set a font in gc.
3416 (x_error_handler, x_io_error_handler): Define only if
3417 X_SET_ERROR_HANDLER is defined.
3418 (mwin__open_device): Create device->scratch_gc. Set members
3419 foreground, background, and videomode of frame. Call
3420 XSetErrorHandler and XSetIOErrorHandler only if
3421 X_SET_ERROR_HANDLER is defined.
3422 (struct gc_list): Deleted.
3423 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3424 (mwin__realize_face): Adjusted for the change of the format of
3425 rface->info and the charge of set_region.
3426 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3427 (mwin__draw_box): Likewise.
3428 (mwin__draw_bitmap): This function deleted.
3429 (mwin__draw_points): New function.
3430 (mwin__verify_region): Adjusted for the change of the format of
3431 rface->info and the charge of set_region.
3432 (mwin__create_window): Inherit backgound pixel from parent.
3433 (mwin__dump_gc): Adjusted for the change of the format of
3436 2004-03-16 Kenichi Handa <handa@m17n.org>
3438 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3440 * input.c (M_key_alias): New variable.
3441 (handle_key): Try M_key_alias property of a key too.
3442 (minput__init): Initialize M_key_alias. Give that property to
3443 symbols in one_char_symbol. Fix bug of initializing
3446 * draw.c (compose_glyph_string): Don't handle
3447 ignore_formatting_char here. Include formatting characters in the
3448 range processed by a FTL.
3449 (layout_glyph_string): Handle ignore_formatting_char here.
3451 2004-03-12 Kenichi Handa <handa@m17n.org>
3453 * input-gui.c (win_create_ic): Enable bidi in status control.
3455 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3457 2004-03-09 Kenichi Handa <handa@m17n.org>
3459 * input.c (load_input_method): If title is not specified, use the
3460 input method name as title.
3462 * m17n-X.c (get_color): Make it static.
3463 (xim_create_ic, xim_destroy_ic, x_error_handler)
3464 (x_io_error_handler): Likewise.
3466 2004-03-01 Kenichi Handa <handa@m17n.org>
3468 * Version 1.0 released.
3471 Copyright (C) 2003, 2004
3472 National Institute of Advanced Industrial Science and Technology (AIST)
3473 Registration Number H15PRO112
3475 This file is part of the m17n library.
3477 The m17n library is free software; you can redistribute it and/or
3478 modify it under the terms of the GNU Lesser General Public License
3479 as published by the Free Software Foundation; either version 2.1 of
3480 the License, or (at your option) any later version.
3482 The m17n library is distributed in the hope that it will be useful,
3483 but WITHOUT ANY WARRANTY; without even the implied warranty of
3484 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3485 Lesser General Public License for more details.
3487 You should have received a copy of the GNU Lesser General Public
3488 License along with the m17n library; if not, write to the Free
3489 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3490 Boston, MA 02110-1301, USA.