1 2007-02-23 Kenichi Handa <handa@m17n.org>
3 * input.c (Mpop): New variable.
4 (fully_initialize): Initialize Mpop.
5 (parse_action_list): Handle Mpop.
6 (take_action_list): Likewise.
7 (handle_key): When a key is unhandled, shift to the initial state
8 only if the current state has no branch action.
10 2007-02-12 Kenichi Handa <handa@m17n.org>
12 * input.c (get_preceding_char): Unref mt if necessary.
13 (get_following_char): Likewise.
14 (parse_action_list): Fix handling of `insert' action as
16 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
17 (take_action_list): Check invalid candidate list.
19 2007-02-06 Kenichi Handa <handa@m17n.org>
21 * input.c (integer_value): Check also ic->produced for @-N.
23 2007-01-26 Kenichi Handa <handa@m17n.org>
25 * database.c (mdatabase__update): Check mdatabase__dir_list from
28 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
30 2007-01-12 Kenichi Handa <handa@m17n.org>
32 * input.c (handle_key): Handle a branch action of the initial
35 2007-01-10 Kenichi Handa <handa@m17n.org>
37 * m17n-gd.c (gd_render): Delete superfluous line.
39 2006-12-26 Kenichi Handa <handa@m17n.org>
41 * m17n.h (minput_callback): Extern it.
43 * input.h (minput__callback): Delte extern.
45 * input.c (get_surrounding_text): Adjusted for the change of
46 minput__callback to minput_callback.
47 (delete_surrounding_text): Likewise.
48 (minput_create_ic): Likewise.
49 (minput_destroy_ic): Likewise.
50 (minput_filter): Likewise.
51 (minput_set_spot): Likewise.
52 (minput_toggle): Likewise.
53 (minput_reset_ic): Likewise.
55 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
56 and ic->candidate_to to 0.
57 (minput_callback): Renamed from minput__callback.
59 * input-gui.c (win_callback): Adjusted for the change of
60 minput__callback to minput_callback.
62 2006-12-15 Kenichi Handa <handa@m17n.org>
64 * font-ft.c (ft_add_font): Fix typo.
66 2006-12-06 Kenichi Handa <handa@m17n.org>
68 * Version 1.3.4 released.
70 2006-11-16 Kenichi Handa <handa@m17n.org>
72 * input.c (parse_action_list): Allow (undo 0).
73 (adjust_markers): New function.
74 (preedit_insert, preedit_delete): Call adjust_markers.
75 (preedit_replace): New function.
76 (update_candidate): Call preedit_replace instead of preedit_insert
78 (filter): When ic_info->commit_key_head is nonzero, shift input
79 event keys even if there's no committed text.
81 2006-11-10 Kenichi Handa <handa@m17n.org>
83 * input.h (MInputContextInfo): New member commit_key_head.
85 * input.c (preedit_commit): Update ic_info->commit_key_head.
86 (take_action_list): Reset ic_info->commit_key_head on Mundo.
87 (filter): When committed, shift keys by ic_info->commit_key_head.
89 2006-10-30 Kenichi Handa <handa@m17n.org>
91 * input.c (preedit_delete): Fix typo.
92 (take_action_list): Print more debugging information. Allow
93 variable in arg of 'select' and `pushback'.
95 * database.c (gen_database_name): Don't put extra space.
96 (load_database): Print debugging information.
97 (register_databases_in_files): New arg headlen. Callers changed.
98 (mdatabase__load_for_keys): Shorten debugging information.
99 (mdatabase_load): Don't print debugging information here.
101 2006-10-27 Kenichi Handa <handa@m17n.org>
103 * input.c (marker_code): New arg surrounding. Callers changed.
104 (surrounding_pos): Check if name[0] == '@'.
105 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
106 (take_action_list): Likewise.
107 (get_preceding_char): If POS is zero, always call
108 get_surrounding_text.
110 2006-10-19 Kenichi Handa <handa@m17n.org>
112 * input.c (load_variables): Fix setting of `global'.
114 2006-10-16 Kenichi Handa <handa@m17n.org>
116 * draw.c (draw_background): Be sure to set *to_x.
117 (render_glyph_string): If from == to, just return.
119 2006-10-18 Kenichi Handa <handa@m17n.org>
121 * database.c (get_dir_info): Return NULL if the directory name is
123 (register_databases_in_files): Call register_database with
125 (mdatabase__update): Fix logic. Call register_database with
127 (mdatabase_define): Call register_database with
130 * input.c (delete_surrounding_text): Be sure to set members
131 preceding_text and following_text to NULL.
132 (shift_state): Save variable values in ic_info->vars_saved.
133 (preedit_commit): Don't print debug information here. Don't
134 change ic_info->keys here.
135 (get_candidate_list): Don't ref plist.
136 (take_action_list): Don't unref return value of
137 get_candidate_list. For undo, reset ic->produced and recover
138 ic_info->vars. Be sure to set ic->candidate_list to NULL after
140 (init_ic_info): Set ic_info->vars_saved.
141 (fini_ic_info): Unref ic_info->vars_saved.
142 (re_init_ic): Be sure to set ic->candidate_list to NULL after
144 (filter): Be sure to set members preceding_text and following_text
145 to NULL. Print debug information about produced text. Delete
146 processed keys from ic_info->keys.
148 * input.h (MInputContextInfo): New member vars_saved.
150 2006-10-16 Kenichi Handa <handa@m17n.org>
152 * database.c (mdatabase__update): Fix the way to get db_info.
154 2006-10-02 Kenichi Handa <handa@m17n.org>
156 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
157 `size' changed to 24.
159 * font.c (xlfd_unparse_name): Adjusted for the change of
161 (font_score): Likewise.
162 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
164 * m17n-X.c (MFontX, _MFontX): Deleted.
165 (SET_SIZE, HAVE_SIZE): Deleted.
166 (free_display_info): Adjusted for the change of
167 disp_info->font_list format.
168 (xfont_registry_list): Likewise.
169 (xfont_open): Likewise.
170 (xfont_list): Likewise.
171 (xfont_encode_char): Ignore size to find a realized font.
172 (MRealizedFontXft): Change the order of members to make it
173 compatible with MRealizedFontFT.
175 2006-09-27 Kenichi Handa <handa@m17n.org>
177 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
178 (mfont_close): Add comments.
180 * mtext-lbrk.c (mtext_line_break): Add comment.
182 2006-09-26 Kenichi Handa <handa@m17n.org>
184 * input.c (minput_get_description): Handle description about
185 inclusion-only input methods.
187 2006-09-21 Kenichi Handa <handa@m17n.org>
189 * input.c (M_gettext): New variable.
190 (fully_initialize): Initialize M_gettext.
191 (check_description): New function.
192 (load_commands): Call check_description.
193 (config_all_commands): Be sure to unref pl.
194 (load_variables): Call check_description.
195 (config_all_variables): Be sure to unref pl.
196 (load_im_info): Call check_description.
198 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
200 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
201 and bind_textdomain_codeset.
203 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
205 2006-09-15 Kenichi Handa <handa@m17n.org>
207 * input.c (reload_im_info): Update custom and global info.
208 (init_ic_info): Fix previous change.
210 2006-09-14 Kenichi Handa <handa@m17n.org>
212 * database.c: Include <libgen.h>.
213 (mdatabase__lock): Make a directory if necessary.
215 * input.c (resolve_command): Adjusted for the format change of
216 configured_cmds member.
217 (load_commands, load_variables): Fix for errornous data handling.
218 (config_command, config_variable): New function.
219 (config_all_commands, config_all_variables): Renamed from
220 config_commands and config_variables. Utilize the above function.
221 (check_variable_value): Argument changed. Callers changed.
222 (load_im_info): Call config_all_commands and config_all_variables.
223 (init_ic_info): Adjusted for the format change of configured_vars
225 (minput__init): Initialize Mcustomized, Mconfigured, and
227 (Mcustomized, Mconfigured, Minherited): New variables.
228 (minput_get_command): Be sure to return NULL if an input method
229 use no local command.
230 (minput_get_variable): Be sure to return NULL if an input method
231 use no local variable.
232 (minput_config_command, minput_config_variable)
233 (minput_save_config): Adjusted for the format change of
234 configured_cmds and configured_vars members.
236 * plist.c (write_element): Delete superfluous ':'.
238 2006-09-13 Kenichi Handa <handa@m17n.org>
240 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
241 (minput_config_file): Extern it.
243 * draw.c (Minherited): Declaration moved to input.c.
244 (mdraw__init): Don't initialize Minherited here.
246 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
248 2006-09-07 Kenichi Handa <handa@m17n.org>
250 * textprop.c (mtext_serialize): Call mplist__serialize with the
253 * plist.h (mplist__serialize): Prototype adjusted.
254 (mplist__assq): Extern it.
256 * plist.c: Include <ctype.h>
257 (PUTC, PUTS): New macros.
258 (write_symbol): New function.
259 (write_element): New arg indent.
260 (dump_string, dump_plist_element): Delete them.
261 (mplist__from_string): New arg pretty.
262 (mplist__assq): New function.
263 (mdebug_dump_plist): Use write_element.
265 * mtext.c (mtext_cat_char): Allocate more memory.
266 (mdebug_dump_mtext): Don't escal a newline character.
268 * m17n.h (minput_get_command, minput_get_variable)
269 (minput_config_command, minput_config_variable)
270 (minput_save_config): Extern them.
272 * m17n-core.c: Include <string.h>.
273 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
274 use the stream stdout instead of a file of that name.
276 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
279 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
280 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
281 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
282 (MDEBUG_DUMP): Flush the stream.
284 * input.h (struct _MInputMethodInfo): Delete member im. New
285 members mdb, language, name, extra, cmds, configured_cmds,
286 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
287 (MInputContextInfo): New member tick.
289 * input.c: Big change to improve user-side input method
290 customization. Here, list just public API changes.
291 (minput_get_commands, minput_get_variables)
292 (minput_assign_command_keys, minput_set_variable): Label them
294 (minput_get_command, minput_get_variable)
295 (minput_config_command, minput_config_variable)
296 (minput_save_config): New functions.
298 * database.h (PATH_MAX): Define it if not yet defined.
299 (PATH_SEPARATOR): Likewise.
300 (enum MDatabaseStatus): New enum.
301 (struct MDatabaseInfo): Moved from database.c. New members status,
302 time, lock_file, and uniq_file.
303 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
304 (mdatabase__unlock): Extern them.
306 * database.c: Include <time.h>.
307 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
308 (GEN_PATH): Args changed. Callers changed.
309 (struct MDatabaseInfo): Moved to database.h.
310 (struct MDatabase, mdb_list): Deleted.
311 (mdatabase__list): New var.
312 (get_database_filename): Deleted. Callers changed to use
314 (find_file, get_database_file): New files.
315 (get_dir_info): Initialize new members of MDatabaseInfo.
316 (find_database): Arg chagnded. Callers changed.
317 (free_db_info, register_database, register_databases_in_files):
319 (update_database_list): Deleted.
320 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
321 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
322 (mdatabase__update): New function.
323 (mdatabase__check): Return value changed.
324 (mdatabase__file, mdatabase__lock, mdatabase__save)
325 (mdatabase__unlock): New functions.
327 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
329 * input.c (get_surrounding_text): Return -2 when surrounding text
331 (get_following_char): Likewise.
332 (get_preceding_char): Likewise.
333 (minput__callback): Return 0 if there is a callback function,
336 2006-08-17 Kenichi Handa <handa@m17n.org>
338 * input.c (reset_ic): Use shift_state to setup the current state.
340 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
342 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
343 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
344 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
346 2006-08-02 Kenichi Handa <handa@m17n.org>
348 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
350 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
352 * font-ft.c (ft_encapsulate): Add code for debugging.
353 (mfont__ft_drive_otf): Be sure to encode character before getting
356 2006-07-21 Kenichi Handa <handa@m17n.org>
358 * draw.c (mdraw_text_extents): Fix previous typo.
360 2006-07-19 Kenichi Handa <handa@m17n.org>
362 * draw.c (gstring_width): New arg lbearing.
363 (render_glyph_string): Adjusted for the change of gstring_width.
364 (mdraw_text_extents): Fix lbearing of ink and line metrics.
366 * m17n-core.h (Mlanguage): Extern it.
368 * m17n.h (Mlanguage): Extern deleted.
370 * mtext.c (mtext__init): Initialize Mlanguage.
371 (Mlanguage): Declaration moved from locale.c
373 * locale.c (mlocale__init): Don't initialize Mlanguage here.
374 (Mlanguage): Declaration moved to mtext.c.
376 * language.c (mlang__init): Don't initialize Mlanguage here.
378 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
380 2006-07-14 Kenichi Handa <handa@m17n.org>
382 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
383 (MRealizedFontFT): New member face_encapsulated.
384 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
385 (ft_gen_font): New function.
386 (ft_add_font): Use ft_gen_font.
387 (ft_list_script): Store lists in ft_script_list.
388 (ft_check_otf): New arg ft_face. Caller changed.
389 (ft_check_language): Likewise.
390 (ft_check_script): Likewise.
391 (ft_encapsulate, ft_close): New functions.
392 (mfont__ft_driver): Initialize members encapsulate and close.
393 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
395 * font.h (struct MRealizedFont): New member encapsulating.
396 (struct MFontDriver): New members encapsulate and close.
398 * font.c (mfont__match_p): If FONT is realized, check capability
399 by font drivers's check_capability method.
400 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
403 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
404 declarations of foundry and fam local vars.
405 (xft_driver): Make it static.
407 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
408 (mfont_close): Extern them.
410 * m17n-gd.c (device_open): Don't specify foundry and family of the
413 2006-07-11 Kenichi Handa <handa@m17n.org>
415 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
417 2006-07-13 Kenichi Handa <handa@m17n.org>
419 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
421 (ft_check_script): Delete unused var.
422 (ft_list_capability): Likewise.
424 * font.c (mfont__get_capability): Setup cap->otf.
425 (Motf): Make it global.
426 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
428 * font.h (MFontCapability): New member otf.
430 * language.c (mlang__fini): Delete unused vars.
432 * m17n-gui.h (Motf): Extern it.
434 * database.c (update_database_list): Delete unused vars.
436 2006-07-07 Kenichi Handa <handa@m17n.org>
438 * font-ft.c (DEVICE_DELTA): Fix typo.
440 2006-07-06 Kenichi Handa <handa@m17n.org>
442 * fontset.c (mfont__lookup_fontset): Don't ignore family and
445 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
447 * database.c: Update comments.
449 2006-07-05 Kenichi Handa <handa@m17n.org>
451 * database.c (PATH_MAX): Define it if not yet defined.
452 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
454 (get_database_filename): Use GEN_PATH.
455 (get_dir_info): Don't include the last '/' in directory name.
456 (register_database): New function.
457 (update_database_list): Use register_database. Search all
458 directories in mdatabase__dir_list for wildcard databases.
459 (mdatabase__init): Check "~/.m17n.d".
461 2006-07-03 Kenichi Handa <handa@m17n.org>
463 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
464 push reverse property.
466 * plist.c (dump_plist_element): Fix previous change.
468 2006-06-28 Kenichi Handa <handa@m17n.org>
470 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
473 * draw.c (MbidiNSM): New variable.
474 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
475 attention to bidi type NSM.
476 (mdraw__init): Initialize MbibiNSM.
478 * language.c (mscript__char_list): Fix finding a char-list element.
480 * plist.c (dump_string): Return number of printed characters.
481 (dump_plist_element): Print elements more compactly.
483 2006-06-23 Kenichi Handa <handa@m17n.org>
485 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
486 (include_HEADERS): Likewise.
488 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
490 * language.c: Update documentation.
492 2006-06-23 Kenichi Handa <handa@m17n.org>
494 * font-ft.c (struct MFontFT): Delete member lang.
495 (free_ft_info): Don't unref member lang. Destroy members langset
497 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
498 changed. Set members langset and charset.
499 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
501 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
503 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
504 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
505 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
506 characters at first. If it fails, try listing by language names.
507 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
508 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
509 change of MFontCapability.
510 (ft_list_capability): Likewise. Try listing by languages, then by
511 scripts. Check OTF at last.
512 (ft_check_script): New function.
513 (ft_select): Adjusted for the check of MFontCapability.
514 (ft_list_family_names): New function.
515 (ft_check_capability): If cap->script is not Mnil, call
517 (mfont__ft_driver): Initialize with ft_list_family_names.
519 * font.h (struct MFontDriver): New member list_fmaily_names.
520 (struct): Change member "MSymbol *lang" to "MSymbol language".
522 * font.c: Include "language.h".
523 (Motf): New variable.
524 (otf_script_list, load_otf_script_list): Delete it.
525 (find_script_from_otf_tag): Delete it.
526 (merge_capability): New function.
527 (mfont__init): Init Motf.
528 (mfont__fini): Don't unref otf_script_list.
529 (free_font_capability): Check cap->script_tag to determine if
530 OTF-related capability is set.
531 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
532 the change of type MFontCapability.
533 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
535 (mfont_list): Call merge_capability for LANGUAGE arg.
536 (mfont_list_family_names): New function.
538 * input-gui.c: Typo in comments fixed.
540 * input.c: Typo in comments fixed.
542 * language.h (mlanguage__list): Delete it.
543 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
546 * language.c: Include "mtext.h".
547 (M_script_lang_list): Delete it.
548 (language_list, script_list): New variables.
549 (load_lang_script_list, init_language_list, init_script_list): New
551 (mlang__init): Don't load language database here.
552 (mlang__fini): Unref language_list and script_list if not NULL.
553 (mlanguage__list): Delete it.
554 (mlanguage__info, mscript__info, mscript__char_list)
555 (mscript__otf_tag, mscript__from_otf_tag): New functions.
556 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
557 (mscript_list, mscript_language_list): New functions.
559 * m17n-gui.h (mfont_list_family_names): Extern it.
561 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
562 (mlanguage_text, mscript_list, mscript_language_list): Extern
565 2006-06-21 Kenichi Handa <handa@m17n.org>
567 * m17n-X.c (xfont_driver): Initialize with
568 xfont_list_family_names.
569 (xfont_list_family_names): New function.
570 (xft_driver): Initialize with NULL for list_family_names member.
571 (device_init): Set list_family_names member of xft_driver to that
574 2006-06-06 Kenichi Handa <handa@m17n.org>
576 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
578 2006-03-24 Kenichi Handa <handa@m17n.org>
580 * font-ft.c (ft_open): Improve debug message.
582 * fontset.c (mfontset__get_font): Fix for the case that no font in
583 per_script list is available.
585 2006-02-06 Kenichi Handa <handa@m17n.org>
587 * Version 1.3.3 released.
589 2006-02-22 Kenichi Handa <handa@m17n.org>
591 * textprop.c: Fix some typos in documentation.
593 * plist.c: Fix some typos in documentation.
595 * m17n-core.h: Fix some typos in documentation.
596 (M17NLIB_PATCH_LEVEL): Updated to 3.
597 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
599 * symbol.c: Fix some typos in documentation.
601 * mtext.c: Fix some typos in documentation.
603 * input.c: Fix several typos in documentation.
605 2006-02-06 Kenichi Handa <handa@m17n.org>
607 * Version 1.3.2 released.
609 2006-02-03 Kenichi Handa <handa@m17n.org>
611 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
612 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
614 * font.c (xlfd_parse_name): Fix handling of the name "nil".
616 * draw.c (layout_glyphs): Fix handling left_padding of
619 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
621 2006-02-02 Kenichi Handa <handa@m17n.org>
623 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
626 2006-01-25 Kenichi Handa <handa@m17n.org>
628 * input.c (resolve_expression): If the value of PLIST is a plist,
629 but the first element is not symbol, return 0.
631 2006-01-17 Kenichi Handa <handa@m17n.org>
633 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
634 HAVE_GD is 2 or the greater.
636 2006-01-16 Kenichi Handa <handa@m17n.org>
638 * Version 1.3.1 released.
640 2006-01-16 Kenichi Handa <handa@m17n.org>
642 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
643 simulating anti-aliasing.
645 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
646 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
648 2006-01-12 Kenichi Handa <handa@m17n.org>
650 * input.c (get_surrounding_text): Always pop ic->plist.
651 (reset_ic): Don't reset ic->plist.
653 2006-01-10 Kenichi Handa <handa@m17n.org>
655 * input.c (preedit_commit): For debugging, print only commiting
656 charactes. Don't set ic->candidate_show to 0.
657 (handle_key): Don't run branch-actions just by shifting to the
659 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
660 Reset vars and plist.
662 2006-01-07 Kenichi Handa <handa@m17n.org>
664 * input.c (load_branch): Confirm that maps is not NULL.
666 2006-01-05 Kenichi Handa <handa@m17n.org>
668 * input-gui.c (win_filter): Try to convert arg to key only when
671 * plist.c (read_integer_element): If '#' and '-' are followed by
672 non-integer-constituent, read them as a part of a symbol.
673 (read_symbol_element): New arg C.
674 (read_element): Adjust args to read_symbol_element.
676 * input.c (load_macros): On overwriting a macro, free the old
678 (minput__init): Store Mmap in load_im_info_keys.
679 (minput_get_title_icon): If the input method has no title, be sure
681 (minput_get_description): If the input method has no description,
682 be sure to return NULL.
683 (minput_get_variables): Fix documentation.
684 (handle_key): Pay attention to the case that key is Mnil.
685 (filter): Likewise. Fix handling of such symbol as S-A.
687 2005-12-22 Kenichi Handa <handa@m17n.org>
689 * Version 1.3.0 released.
691 2005-12-22 Kenichi Handa <handa@m17n.org>
693 * font-ft.c (ft_list): If the specified font has no property,
696 2005-12-20 Kenichi Handa <handa@m17n.org>
698 * character.c (mchar_get_prop): Check char_prop_list.
699 (mchar_put_prop, mchar_get_prop_table): Likewise.
701 2005-12-18 Kenichi Handa <handa@m17n.org>
703 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
704 file name sans language.
706 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
708 * input.c: Fix typo in comments.
710 2005-12-14 Kenichi Handa <handa@m17n.org>
712 * input.c (minput_get_title_icon): Check the default icon for the
715 2005-12-13 Kenichi Handa <handa@m17n.org>
717 * input.c (Mless_equal, Mgreater_equal): New variables.
718 (parse_expression, resolve_expression, parse_action_list)
719 (take_action_list): Handle the aboves.
720 (filter): Treat key S-X as X.
721 (minput__init): Initialize Mless_equal and Mgreater_equal.
722 (minput_get_title_icon): New function.
724 * m17n.h (minput_get_title_icon): Extern it.
726 * database.c (get_database_filename): Return a filename instead of
728 (load_database): Adjusted for the above change.
729 (mdatabase__load_for_keys): Likewise.
730 (mdatabase__find_file): New function.
732 * database.h (mdatabase__find_file): Extern it.
734 * font.h (mfont__resize): Delete extern.
736 * font.c (mfont__list): Check resize ratio.
737 (mfont__resize): Delete it.
738 (mfont_resize_ratio): Include the code of mfont__resize.
740 * font-ft.c (ft_open): Check resize ratio.
742 * m17n-X.c (xfont_open): Check resize ratio.
743 (xft_open): Likewise.
745 2005-12-07 Kenichi Handa <handa@m17n.org>
747 * input.c (take_action_list): If take_action_list return -1,
749 (handle_key): Likewise.
751 * face.c (mface__for_chars): When font is specified and layouter
752 is found for it, if the layouter doesn't support one of a
753 character, use a face sans layouter for it.
755 2005-12-06 Kenichi Handa <handa@m17n.org>
757 * fontset.c (mfont__lookup_fontset): If only a fallback font is
758 found, don't use it for more than one character.
760 2005-12-05 Kenichi Handa <handa@m17n.org>
762 * face.c (mface__realize): Set rfont->layouter to Mnil.
763 (mface__for_chars): Fix handling of layouter.
765 * character.h (mchar__define_prop): Extern it.
767 * database.c (update_database_list): Call mchar__define_prop if
770 * character.c (mchar__init): Don't call mchar_define_property.
771 Instead just initialize property keys.
772 (mchar__fini): Free char_prop_list only if it's not NULL.
773 (mchar__define_prop): New function.
774 (mchar_define_property): Call mchar__define_prop.
776 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
779 2005-12-02 Kenichi Handa <handa@m17n.org>
781 * language.c (mlang__init): Handle extra chars.
783 * m17n-gui.h (mfont_check): Adjust prototype.
785 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
786 (xfont_check_capability): New function.
787 (xft_driver): Specify xft_check_capability.
788 (xft_check_capability): New function.
790 * font-ft.c (M0_3): Delete it.
792 (ft_get_charmaps): Refer to M0.
793 (fc_parse_pattern): Fix previous change.
794 (ft_list_language): Check also extra chars.
795 (ft_check_otf): Define it even if HAVE_OTF is undef.
796 (ft_check_lang): Check the result of FcLangSetHasLang against
797 FcLangDifferentLang. Check also extra chars.
798 (ft_list_capability): Delete ifdef HAVE_OTF.
799 (ft_select): Likewise.
800 (ft_open): Improve debug information.
801 (ft_check_capability): New function.
802 (mfont__ft_driver): Specify ft_check_capability.
803 (mfont__ft_init): Initialize M0.
805 * fontset.c (get_font_from_group): New function.
806 (mfontset__get_font): New function.
808 * fontset.h (mfontset__get_font): Extern it.
810 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
811 (mfont__fini): Delete ifdef HAVE_OTF.
812 (free_font_capability): Likewise.
813 (mfont__get_capability): Likewise.
814 (mfont__check_capability): New function.
815 (mfont_check): Change the order of arguments. Use
818 * font.h (struct MFontDriver): New member check_capability.
819 (MFontCapability): Delete ifdef HAVE_OTF.
820 (mfont__check_capability): Extern it.
822 * face.c (mface__realize): Fix handling of FONT arg.
823 (mface__for_chars): Fix handling of explicitly specified font.
825 2005-11-25 Kenichi Handa <handa@m17n.org>
827 * font-flt.c (run_command): Print debug info for
830 * draw.c (layout_glyphs): Fix handling of left/right_padding.
832 * face.c (mface__for_chars): Check rfont before accessing the
835 2005-11-21 Kenichi Handa <handa@m17n.org>
837 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
840 * fontset.c (fontset_table): New variable.
841 (free_fontset): Call M17N_OBJECT_UNREGISTER.
842 (mfont__fontset_init): Add fontset_table as an object array.
843 (mfont__realize_fontset): Ref FONTSET.
844 (mfont__free_realized_fontset): Unref REALIZED->fontset.
845 (mfontset): Call M17N_OBJECT_REGISTER.
846 (mfontset_copy): Likewise.
848 * input.c (handle_key): For debugging, print information about
850 (filter): Add an alias for Meta and Alt modifiers.
851 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
853 (minput__init): Initialize them.
854 (parse_expression): New function.
855 (resolve_expression): New function.
856 (parse_action_list): Handle expressions by parse_expression.
857 (take_action_list): Handle expressions by resolve_expression.
858 (parse_nested_list_value): Fix previous change.
859 (resolve_command): Fix handling of the return value of
862 2005-11-18 Kenichi Handa <handa@m17n.org>
864 * font-ft.c (ft_check_otf, otf_script_list): Define only when
866 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
868 (ft_select): Likewise.
870 * font.c (mfont_list): Fix for the case that FONT is NULL.
871 (OTF_tag): Delete it.
872 (load_otf_script_list): Define only when HAVE_OTF is defined.
873 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
876 * draw.c (truncate_gstring): Be sure to truncate at
877 glapheme-cluster boundary.
879 2005-11-11 Kenichi Handa <handa@m17n.org>
881 * input.c (delete_surrounding_text): Clear cache if necessary.
883 2005-11-09 Kenichi Handa <handa@m17n.org>
885 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
886 glyph prev is also supported by the current flt.
888 2005-11-08 Kenichi Handa <handa@m17n.org>
890 * m17n-X.c (xft_render): Cancel previous change.
892 2005-11-07 Kenichi Handa <handa@m17n.org>
894 * input.c: Include <stdlib.h>.
895 (get_surrounding_text, delete_surrounding_text)
896 (get_preceding_char, get_following_char): New functions.
897 (integer_value): New arg surrounding. If it is nonzero, try to
898 get a surrounding character. Callers changed.
899 (take_action_list): Check `value' before setting an element.
900 (destroy_ic): Unref ic_info->preceding_text and
901 ic_info->following_text.
902 (minput__init): Initialize Minput_get_surrounding_text and
903 Minput_delete_surrounding_text.
904 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
906 (filter): Unref ic_info->preceding_text and
907 ic_info->following_text.
909 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
912 * input.h (MInputContextInfo): New members preceding_text and
915 2005-11-04 Kenichi Handa <handa@m17n.org>
917 * input.c (parse_nested_list_value): Fix handling of the global
919 (get_nested_list): Get global definitions by load_partial_im_info.
920 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
921 MInputCandidatesChanged.
922 (take_action_list): Likewise.
923 (reset_ic): Likewise.
924 (create_ic): Don't pay special attention to
925 Mcandidates_group_size.
926 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
927 (minput_set_variable): Get a definition of varible by
928 mplist_find_by_value, not mplist_get.
930 * m17n.h (enum MInputCandidatesChanged): New enum.
932 2005-11-01 Kenichi Handa <handa@m17n.org>
934 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
936 (mwin__destroy_window): If xft_draw's drawable is win, change it
937 to device->drawable before destroying win.
939 2005-10-31 Kenichi Handa <handa@m17n.org>
941 * input.c (load_im_info): Fix adding of state.
943 * m17n-core.c (m17n_fini_core): Fix reporting of module
946 * m17n.c (m17n_fini): Fix reporting of module finalization.
948 * m17n-gui.c (m17n_init_win): Fix reporting of module
951 2005-10-29 Kenichi Handa <handa@m17n.org>
953 * input.c (get_candidate_list): Fix the timing of referring plist.
955 2005-10-28 Kenichi Handa <handa@m17n.org>
957 * input.c (load_branch): Ignore an undefined map name.
958 (load_im_info): Set im_info->title from `name' only if it's not
960 (shift_state): Always update ic->status.
961 (adjust_candidates): Renamed from adjust_candidate_command.
962 Argument changed. Caller changed.
963 (get_candidate_list, regularize_action): New functions.
964 (take_action_list): Use them. On handling Munhandle, don't set
966 (handle_key): If KEY is not handled by MAP, and MAP has
967 branch_actions, perform them.
969 * database.c (mdatabase__fini): Free dir_info->filename;
971 2005-10-20 Kenichi Handa <handa@m17n.org>
973 * input.c (marker_code): Accept '@@'.
974 (integer_value): Handle '@@'.
975 (parse_action_list): Accept a symbol argument.
976 (take_action_list): Resolve the symbol argument. Handle the
979 2005-10-18 Kenichi Handa <handa@m17n.org>
981 * input.c: Include "charset.h".
982 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
984 (MIMState): New member (M17NObject control).
985 (lookup_nested_list, set_nested_list, parse_nested_list_value)
986 (get_nested_list, resolve_variable): New functions.
987 (integer_value): New arg (MPlist **value). Set it to the plist
988 element containing the value.
989 (resolve_command): New function.
990 (load_translation): New arg (MPlist *map_actions).
991 (load_branch): New args language and name. If `keylist' is a
992 symbol, resolved that as a command name.
993 (free_map): New arg top. Free map->map_actions only if top is
995 (free_state): New function.
996 (load_state): New arg name.
997 (im_info_list): New variable.
998 (free_im_info, get_im_info_by_tags): New functions.
999 (load_im_info): Arg key changed to plist. Handle `include'.
1000 Return (MInputMethodInfo *).
1001 (preedit_commit): Ref ic->candidate_list.
1002 (get_select_charset, adjust_candidate_command): New functions.
1003 (take_action_list): Handle `include'. Adjust candidate action
1004 properly. Handle control variables `candidates-charset' and
1005 `candidates-group-size'.
1006 (open_im): Use get_im_info.
1007 (create_ic): Get global variables.
1008 (load_partial_im_info): New function.
1009 (get_im_info): New function.
1010 (check_command_keyseq, check_command_list, check_variable_list):
1012 (minput__init): Don't handle M_database_hook and Mdetail_text.
1013 Initialize M_candidates, Mcandidates_group_size,
1014 Mcandidates_charset.
1015 (parse_variable_list, get_variable_list, parse_command_list)
1016 (get_command_list): Delete them.
1017 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1018 (minput__fini): Simply unref command_list and variable_list.
1019 (minput_get_description): Adjusted for the new form of description.
1020 (minput_get_commands): Use get_nested_list.
1021 (minput_assign_command_keys): Likewise.
1022 (minput_get_variables, minput_set_variable): Likewise.
1024 * input.h (MInputMethodInfo): New members im and maps.
1026 * database.h (M_database_hook): Delete extern.
1027 (MDatabaseHookFunc): Delete extern.
1028 (mdatabase__check): Extern it.
1030 * database.c: Include <glob.h>.
1031 (MAX_TIME): New macro.
1032 (Masterisk): New variable.
1033 (get_database_stream): Argument changed to (MDatabaseInfo *).
1035 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1036 (find_database): New function.
1037 (update_database_list): New function.
1038 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1039 calling update_database_list.
1040 (mdatabase__check): New function.
1041 (mdatabase_find): Use update_database and find_database. Don't
1042 handle MDatabaseHookFunc.
1043 (mdatabase_list): Call update_database at first.
1044 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1045 (MDatabaseList): New type.
1047 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1049 * m17n.h (Mdetail_text): Delete extern.
1051 * m17n-core.h (mplist_conc): Delete extern.
1053 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1055 (mplist_conc): Renamed to mplist__conc.
1056 (mplist__pop_unref): New function.
1058 2005-10-14 Kenichi Handa <handa@m17n.org>
1060 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1062 (read_element): If keys is an empty plist, return any element
1064 (dump_plist_element): Check if plist is nested.
1065 (mplist_conc): Always ref tail.
1066 (mplist_set): If key is a managing key, ref val in advance.
1068 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1069 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1070 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1073 * fontset.c (free_fontset): Unref fontset_list if necessary.
1074 (mfont__fontset_fini): Don't free fontset_list. Unref
1076 (mfont__realize_fontset): Initialize request.
1077 (mfontset): Ref default_fontset or fontset only if necessary.
1078 (mfontset_copy): Don't ref copy.
1080 * draw.c (render_glyphs): Check gend->type before checking
1083 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1084 unrefed plists to NULL.
1086 2005-10-04 Kenichi Handa <handa@m17n.org>
1088 * textprop.c (mtext_serialize): Be sure to make mt
1089 MTEXT_FORMAT_UTF_8 and NULL terminated.
1091 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1093 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1095 2005-10-03 Kenichi Handa <handa@m17n.org>
1097 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1098 is not at the beginning of line.
1100 2005-09-22 Kenichi Handa <handa@m17n.org>
1102 * input.c: Include <sys/stat.h> and <unistd.h>.
1103 (Minclude, Mcommit, Munhandle): New variables.
1104 (minput__init): Initialize them. Push only Mstate to
1105 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1106 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1108 (load_input_method): Handle "include" directive. If no states are
1110 (shift_state): If state_name is Mt, shift back to the previous
1111 state. Call preedit_commit to commit preedit text.
1112 (preedit_commit): New function.
1113 (take_action_list): Improve debug printing. Handle commit and
1115 (handle_key): Check the return value of take_action_list. Don't
1116 take branch_actions just after changing to the root map.
1117 (reset_ic): Reset all ic_info members.
1118 (filter): When a key is not handled, just move ic_info->keys
1119 instead fo calling reset_ic.
1120 (load_im_info): If key is not Mstate, push Mmap to
1122 (MDatabaseStatList): New type.
1123 (imdir_stat_list): New variable.
1124 (input_method_hook): Don't cancel the hook. Check the
1125 modification time of directories.
1126 (minput__fini): Free imdir_stat_list;
1128 * input.h (MInputContextInfo): New member prev_state.
1130 * m17n-core.h (mplist_conc): Extern it.
1132 * plist.c (mplist_conc): New function.
1134 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1136 * font.h (MRealizedFont): New member average_width.
1138 * font-ft.c (ft_open): Set rface->average_width.
1140 * font.c (xlfd_unparse_name): Print '*' before registry name.
1142 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1143 (xfont_open): Set rfont->average_width.
1144 (xft_open): Likewise.
1145 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1147 * internal-gui.h (struct MFrame): New member average_width.
1149 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1150 (mframe_get_prop): Return the average_width of a font.
1152 * face.c (mface__realize): Set rface->average_width.
1153 (mface__update_frame_face): Set frame->average_width.
1155 * face.h (MRealizedFace): New member average_width.
1157 2005-09-19 Kenichi Handa <handa@m17n.org>
1159 * font.c (xlfd_unparse_name): New arg full_xlfd.
1160 (mfont__encode_char): Use shortcut only for X core fonts.
1161 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1162 (mfont_put_prop): Handle `language' property.
1163 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1164 Print file can capability info too.
1166 * m17n-core.c (mdebug__output): New variable.
1167 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1168 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1169 (m17n_fini_core): Close mdebug__output if it's not stderr.
1171 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1172 (xfont_open): Handle baseline_offset.
1173 (xfont_find_metric): Likewise.
1174 (xfont_render): Likewise.
1175 (xft_open): Likewise.
1176 (xft_render): Likewise.
1178 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1179 (mdebug__output): Extern it.
1180 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1181 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1182 (MDEBUG_DUMP): New macro.
1183 (MDEBUG_PRINT_TIME): Print to medebug__output.
1185 * font.h (MRealizedFont): New member baseline_offset.
1187 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1189 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1190 (ft_list_family): Check alias.
1191 (ft_list_language): If language is "en", don't try to the second
1193 (ft_default_list): New variable.
1194 (ft_list_default): New function.
1195 (ft_select): If family is not specified, try only the default
1196 fonts. Treat the weights normal and medium same.
1197 (ft_open): Fix debug message. If registry is not specified, try
1198 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1199 (ft_find_metric): Likewise.
1200 (ft_render): Likewise.
1201 (ft_list): Fix debug message. Accept the registring iso8859-1.
1202 If family is not specified, try only the default fonts.
1204 * face.c (mface__realize): Fix logic of opening a font.
1206 2005-09-16 Kenichi Handa <handa@m17n.org>
1208 * face.c (mface__realize):
1210 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1213 * input.c (shift_state): Fix the condition of taking init actions.
1214 (take_action_list): Fix handling of pushback action.
1215 (handle_key): Don't change key while checking its alias.
1216 (minput__init): Initialize new variables.
1217 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1220 2005-09-12 Kenichi Handa <handa@m17n.org>
1222 * mtext.c (mtext__uppercase): Add proper open/close parens.
1223 (mtext_titlecase): Add proper casting.
1225 * input.c (parse_action_list): Handle the case that the arg is a
1226 key sequence (MText or MPlist).
1227 (take_action_list): Likewise.
1228 (shift_state): Shorter debug message.
1229 (handle_key): Terminate a debug message by "\n".
1230 (reset_ic): Don't take initial actions here.
1231 (minput_open_im): Print a debug message.
1232 (minput_close_im): Likewise.
1233 (minput_create_ic): Likewise.
1234 (minput_destroy_ic): Likewise.
1236 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1238 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1241 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1242 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1245 * character.c: Add Japanese documentation for
1246 mchar_get_prop_table ().
1248 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1250 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1251 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1252 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1254 (init_case_conversion): New function.
1255 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1256 (uppercase_precheck, lowercase_precheck, final_sigma)
1257 (after_soft_dotted, more_above, before_dot, after_i)
1258 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1260 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1262 * plist.c (read_mtext_element): Fix previous change.
1264 2005-09-05 Kenichi Handa <handa@m17n.org>
1266 * plist.c (read_mtext_element): Handle \uXXXX notation.
1268 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1269 (MTABLE_ALLOCA): Change the name of local variable.
1271 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1272 HAVE_FREETYPE are defined.
1274 * m17n-X.c: Check HAVE_X11.
1276 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1277 directory listing libraries.
1278 (noinst_PROGRAMS): Define it only in maintainer mode.
1280 2005-09-02 Kenichi Handa <handa@m17n.org>
1282 * m17n-gui.h (mdraw_line_break_option): Extern it.
1284 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1285 end of the first glyph.
1286 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1288 (mdraw_line_break_option): New variable.
1289 (mdraw_default_line_break): Use mtext_line_break.
1291 * mtext.h (wordseg_func_table): Don't extern it.
1292 (mtext__wseg_fini): Extern it.
1294 * mtext.c: Don't include word-thai.h.
1295 (wordseg_func_table): Delete this variable.
1296 (mtext__init): Don't initialize above. Don't call
1297 mtext__word_thai_init.
1298 (mtext__fini): Don't free wordseg_func_table. Call
1299 mtext__wseg_fini instead fo mtext__word_thai_fini.
1300 (MTextWordsegFunc): Don't typedef it.
1301 (mtext__word_segment): Moved to mtext-wseg.c.
1303 * m17n-core.h (enum MTextLineBreakOption): New enum.
1304 (mtext_line_break): Extern it.
1306 * mtext-wseg.c: New file.
1308 * mtext-lbrk.c: New file.
1310 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1311 add mtext-lbrk.c and mtext-wseg.c.
1313 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1314 the case that head is NULL.
1316 2005-09-01 Kenichi Handa <handa@m17n.org>
1318 * word-thai.c (wordseg_propertize): If the property value is nil,
1319 don't make the property no-merge.
1320 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1321 attention to the case that they are NULL.
1322 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1325 * character.c (mchar_get_prop_table): New function.
1327 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1329 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1330 (mchar_get_prop_table): Extern it.
1332 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1333 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1335 * internal.h (enum MTextCoverage): New enum.
1336 (MText): New member coverage.
1338 * mtext.c (FORMAT_COVERAGE): New macro.
1339 (insert): Copy mt2->coverage.
1340 (mtext__from_data): Initialize mt->coverage.
1341 (mtext__adjust_format): Update mt->coverage.
1342 (mtext): Initialize mt->coverage.
1343 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1344 Update mt->coverage if necessary.
1345 (mtext_duplicate): Copy mt->coverage.
1346 (mtext_insert, mtext_replace): New functions.
1347 (mtext_dup): Use mtext_duplicate.
1348 (mtext__word_segment): Don't set *from and *to if a word
1349 segmentation funcion is not found.
1350 (mtext_ins_char): Fix typo.
1352 2005-08-25 Kenichi Handa <handa@m17n.org>
1354 * font.h (MFont): New member for_full_width.
1356 * font.c (compare_font_score): Prefer a font of not
1359 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1360 registry charset of a font is one of CJK charsets.
1362 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1363 supports some of CJK.
1365 2005-08-24 Kenichi Handa <handa@m17n.org>
1367 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1369 * m17n-gui.c (null_device_open): Check Mresolution param and set
1372 * m17n-gd.c (device_open): Check Mresolution param and set
1375 * m17n-X.c (MWDevice): New member resy.
1376 (xfont_open): Set ascent, descent, and max_advance members of
1378 (xft_open): Likewise.
1379 (device_open): Compare also screen_num to find a device. Set
1380 device->resy and frame->dpi.
1382 * internal-gui.h (MFrame): New member dpi.
1384 * font.h (MRealizedFont): New member max_advance.
1386 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1387 (mfont__init): Don't initialize Mascent, Mdescent.
1388 (Mascent, Mdescent): Delete these variables.
1389 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1390 Mfont_descent instead of Mascent and Mdescent.
1391 (mfont_put_prop): Allow negative size.
1392 (mfont_find): Handle the case of spec->size < 0. Fix previous
1394 (mfont_list): Handle the case of spec->size < 0.
1395 (mfont_check): Likewise.
1397 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1398 (fc_get_pattern): Handle the case of font->size < 0.
1399 (ft_open): Set ascent, descent, and max_advance members of rfont.
1400 (ft_find_metric): Improve rounding.
1401 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1404 * face.c (mface__realize): Handle the case of font->size < 0.
1406 2005-08-22 Kenichi Handa <handa@m17n.org>
1408 * coding.c (MConverterStatus): Change the member buf to union.
1409 (mconv_buffer_converter): Add const to the arg buf.
1410 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1411 (mconv_decode): Adjusted for the change of MConverterStatus.
1412 (mconv_encode_range): Likewise.
1414 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1415 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1417 2005-08-20 Kenichi Handa <handa@m17n.org>
1419 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1420 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1422 * m17n-X.c (xfont_open): Set members ascent, descent, and
1423 max_advance of rfont.
1424 (xft_open): Likewise.
1426 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1428 (mfont__ft_parse_name): Add const to the arg name.
1430 * font.c (xlfd_parse_name): Add const to the arg name. Call
1431 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1432 (xlfd_unparse_name): Handle spacing.
1433 (mfont__init): Initialize new variables.
1434 (mfont__id): Handle spacing.
1435 (mfont__merge): Likewise.
1436 (mfont__set_spec): This function deleted.
1437 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1438 condition of calling mfont__ft_parse_name.
1439 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1440 (mfont_get_prop): Handle properties spacing, ascent, descent,
1442 (mfont_find): Return a realized font.
1443 (mfont_from_name): Add const to the arg name.
1445 * font.h (enum MFontProperty): New member MFONT_SPACING.
1446 (enum MFontSpacing): New enum.
1447 (MFont): New members spacing and max_advance.
1448 (mfont__ft_parse_name): Prototype adjusted.
1449 (mfont__set_spec): Extern deleted.
1450 (mfont__parse_name_into_font): Prototype adjusted.
1452 2005-08-19 Kenichi Handa <handa@m17n.org>
1454 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1456 * font.c (mfont_list): If FONT is null, use a temporary font.
1457 (mfont_parse_name): Add const to the arg name.
1459 2005-08-18 Kenichi Handa <handa@m17n.org>
1461 * word-thai.c: Surround code by #ifdef and #endif to escape from
1464 * font-ft.c: Mostly re-written.
1466 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1467 (FontLayoutCmd): Type of the member otf changed..
1468 (load_otf_command): Adjusted for the format change of otf command.
1469 (load_command): Likewise.
1470 (free_flt_command): Unref cmd->body.otf.
1471 (run_otf): Ajusted for the type change of otf_cmd.
1472 (run_command): Ajusted for the type change of otf_cmd. On
1473 debugging, print ctx->combining_code.
1474 (mfont__flt_run): Initialize ctx's members code_offset,
1475 combining_code, and left_padding to 0.
1477 * face.h (struct MRealizedFace): New member font.
1478 (mface__realize): Prototype adjusted.
1480 * face.c (find_realized_face): New arg font.
1481 (find_realized_face): Adjusted for the change of MFont.
1482 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1483 (mface__fini): Don't call mdebug__report_object.
1484 (mface__realize): New arg font.
1485 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1486 Optimize the latin case.
1487 (mface__free_realized): Free rface->font.
1488 (mface__update_frame_face): Adjusted for the change of mface__realize.
1489 (mface_equal): New function.
1491 * draw.c (Mcommon): New variable.
1492 (visual_order): Args to mfont__encode_char changed.
1493 (compose_glyph_string): Handle Mfont text property.
1494 (layout_glyphs): Adjusted for the change of MFont.
1495 (mdraw__init): Initialize Mcommon.
1496 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1498 * font.h (enum MFontType): Members completely changed.
1499 (enum MFontProperty): Move MFONT_SIZE to the tail.
1500 (enum MFontSource): New enum.
1501 (struct MFont): New members type, source, sizes, file, capability,
1503 (struct MRealizedFont): Type of member font changed. Members
1504 score, status, and encoding deleted.
1505 (MFontScore): New type.
1506 (MFontList): Member changed.
1507 (struct MFontDriver): New member has_char. Types of members
1509 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1510 (Mapple_roman): Extern them.
1511 (OTF_Tag): Typedefed if not HAVE_OTF.
1512 (enum MFontOpenTypeTable): New enum.
1513 (MFontCapability): New type.
1514 (mfont__ft_drive_otf): Prototype adjusted.
1515 (mfont__score): Extern deleted.
1516 (mfont__merge): Extern it.
1517 (mfont__has_char): Extern it.
1518 (mfont__encode_char): Prototype adjusted.
1519 (mfont__open): Extern it.
1520 (mfont__set_spec): Prototype adjusted.
1521 (mfont__get_capability): Extern it.
1523 * font.c: Include "fontset.h".
1524 (M_font_capability, M_font_list, M_font_list_len): New variables.
1525 (font_score_priority): Change order of initial elements.
1526 (font_score_shift_bits): Fix array size.
1527 (common_weight): Add "thin", "semibold", and "heavy".
1528 (common_stretch): Add "ultracondensed", "extracondensed",
1529 "extraexpanded", and "utltraexpand".
1530 (font_weight_regular, font_weight_normal, font_weight_medium): New
1532 (gen_font_name): This function deleted.
1533 (find_encoding): Set font->encoding.
1534 (OTF_tag): New function.
1535 (otf_script_list): New variable.
1536 (load_otf_script_list): New function.
1537 (find_script_from_otf_tag): New function.
1538 (xlfd_parse_name): Set font->type and font->source.
1539 (mfont__free_realized): Free chains rfonts.
1540 (font_score): Renamed from mfont__score.
1541 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1542 (Mapple_roman): New variables.
1543 (mfont__init): Initilize new variables. Initalize
1544 default_encoding.encoding_name and
1545 default_encoding.encoding_charset to Municode_full and
1546 mcharset__unicode. Use SAFE* macros for allocating filepath
1548 (mfont__fini): Free otf_script_list.
1549 (mfont__id): New function.
1550 (mfont__match_p): Check also capability member of MFont.
1551 (mfont__merge): New funciton.
1552 (mfont__set_spec_from_face): Set type and source members.
1553 (mfont__set_spec_from_plist): Set capability and type members.
1554 (mfont__select): Argument changed.
1555 (mfont__available): New function.
1556 (compare_font_score): New function.
1557 (mfont__list): New function.
1558 (mfont__open): Return a realized font.
1559 (mfont__resize): Adjusted for the change of MFont.
1560 (mfont__has_char): New function.
1561 (mfont__encode_char): Argument changed.
1562 (mfont__set_spec): Argument changed.
1563 (free_font_capability): New function.
1564 (mfont__get_capability): New function.
1565 (MFontfile): New variable.
1566 (mfont_get_prop): Adjusted for the change of MFont.
1567 (mfont_put_prop): Likewise.
1568 (mfont_set_selection_priority): Fix the way of setting
1569 font_score_priority[].
1570 (mfont_find): Use mfont__list instead of mfont__select.
1571 (mfont_resize_ratio): Adjusted for the change of MFont.
1572 (mfont_list): Use mfont__list.
1573 (mfont_check): New function.
1574 (font_score): Make it static.
1576 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1577 (mfont__lookup_fontset): Likewise.
1579 * fontset.c (struct MFontset): Delete member font_spec_list.
1580 (struct MRealizedFontset): Type of member spec changed. New
1582 (load_font_group): Arg spec_list deleted.
1583 (load_fontset_contents): Adjusted for the change of fontset_def.
1584 (free_fontset): Fix the way of freeing fontset elements.
1585 (realize_fontset_elements): Argument changed.
1586 (get_per_script): New function.
1587 (free_realized_fontset_elements): Fix the way of feeing rfontset
1589 (update_fontset_elements): Fix args to realize_fontset_elements.
1590 (mfont__realize_fontset): New arg spec.
1591 (try_font_list): New function.
1592 (try_font_group): New arg request. Use try_font_list.
1593 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1595 (mfontset): Adjusted for the change of MFontset.
1596 (mfontset_copy): Likewise. Don't share plists.
1597 (mfontset_modify_entry): Adjusted for the change of MFontset.
1598 (mfontset_lookup): Call get_per_script.
1599 (mdebug_dump_fontset): Print also the address of fonts.
1601 * input.c (shift_state): Don't reset ic_info->vars.
1602 (take_action_list): Call MDEBUG_PRINT fore calling
1605 * internal-gui.h (MFontDriver): Don't typedef it here.
1607 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1608 (MXFont): This type deleted.
1610 (struct _MFontX): New struct.
1611 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1612 (MDisplayInfo): Member base_font_list deleted.
1613 (DEFAULT_FONT): Definition changed.
1614 (FALLBACK_FONT): This maclr deleted.
1615 (free_display_info): Adjusted for the change of MDisplayInfo.
1616 (free_device): Argument to mfont__free_realized changed.
1617 (xfont_driver): Adjusted for the change of MFontDriver.
1618 (xfont_registry_list): Use MFontX instead of MXFont.
1619 (MRealizedFontX): Renamed from MXFontInfo.
1620 (xfont_select): Return the font found first.
1621 (close_xfont): Change MXFontInfo to MRealizedFontX.
1622 (xfont_open): Return the realized font.
1623 (xfont_find_metric): Get xfont from rfont->fontp.
1624 (xfont_has_char): New function.
1625 (xfont_encode_char): Adjusted for the argument change.
1626 (xfont_render): Get xfont from rfont->fontp.
1627 (xfont_list): Adjusted for the argument change.
1628 (MRealizedFontXft): Renamed from MXftFontInfo.
1629 (xft_driver): Ajusted for the change of MFontDriver.
1630 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1631 (xft_open_font): Argument changed.
1632 (xft_open): Argument changed. Return the realized font.
1633 (xft_find_metric): Get xft_font from rfont->fontp.
1634 (xft_has_char, xft_encode_char): New functions.
1635 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1636 font if not yet opened.
1637 (device_open): Don't set frame->font.
1639 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1641 (gd_font_open): New function.
1642 (gd_render): Don't use the local variable ft_info.
1643 (device_init): Adjusted for the change of gd_font_driver.
1645 * textprop.c (mtext__prop_init): Initialize text_property_table.
1646 Call M17N_OBJECT_ADD_ARRAY.
1647 (mtext__prop_fini): Don't call mdebug__report_object.
1649 * plist.c (mplist__init): Initialize plist_table.
1650 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1651 (mplist__fini): Don't call mdebug__report_object.
1653 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1654 (mtext__fini): Don't call mdebug__report_object.
1655 (MTEXT_FORMAT_UTF_16): Correct type.
1656 (mtext_data): New function.
1657 (mtext_text): Fix calculation of limit and args to
1660 * language.c: Include "plist.h".
1661 (M_script_lang_list): New variable.
1662 (mlang__init): Read languages and their information from m17n
1664 (mlanguage__list): New function.
1665 (Miso639_1, Miso639_2): New variables.
1667 * language.h (mlanguage__list): Extern it.
1669 * database.c (get_database_stream): Use SAFE_* macros for
1670 allocating and freeing path.
1671 (mdatabase__init): Likewise.
1673 * symbol.c (msymbol__fini): Don't free symbols here.
1674 (msymbol__free_table): New function.
1675 (msymbol_is_managing_key): New function.
1677 * symbol.h (msymbol__free_table): Extern it.
1678 (msymbol__list): Extern it.
1680 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1682 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1683 (struct _M17NObjectArray): New member name and next.
1684 (mdebug__add_object_array): Extern it.
1685 (M17N_OBJECT_ADD_ARRAY): New macro.
1686 (mdebug__report_object): Don't extern it.
1688 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1690 * m17n-gui.c (free_frame): Don't free frame->font.
1691 (null_device_fini): Fix code for freeing
1692 null_device.realized_font_list.
1693 (m17n_fini_win): Free interface.
1694 (mframe): Cast the return value of dlsym. Set frame->font here.
1695 (mframe_get_prop): Check frame->rface->rfont before accessing the
1698 * m17n-gui.h (Mfontfile): Extern it.
1699 (mfont_check): Extern it.
1700 (mface_equal): Extern it.
1702 * m17n-core.c: Include "symbol.h".
1703 (report_header_printed): This variable deleted.
1704 (object_array_root): New variable.
1705 (report_object_array): New function.
1706 (mdebug__report_object): This function deleted.
1707 (mdebug__add_object_array): New function.
1708 (m17n_init_core): Call mchartable_init () before mtext_init ().
1709 (m17n_fini_core): Call report_object_array (if necessary) and
1710 msymbol__free_atable at the end.
1712 * m17n-core.h (msymbol_is_managing_key): Extern it.
1713 (mtext_data): Extern it.
1714 (MTEXT_FORMAT_UTF_16): Correct type.
1715 (M17NLIB_MINOR_VERSION): Changed to 3.
1716 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1718 * chartab.c (mchartable__init): Initalize chartable_table.count.
1719 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1720 mdebug__report_object.
1722 2005-05-26 Kenichi Handa <handa@m17n.org>
1724 * m17n.h (Miso639_1, Miso639_2): Extern them.
1726 * symbol.h (msymbol__list): Extern it.
1728 * symbol.c (msymbol__list): New function.
1730 2005-05-19 Kenichi Handa <handa@m17n.org>
1732 * input-gui.c (minput__win_init): Don't change the value of
1735 2005-05-16 Kenichi Handa <handa@m17n.org>
1737 * m17n-core.c (m17n_object): Be sure to initialize all members.
1739 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1741 2005-05-09 Kenichi Handa <handa@m17n.org>
1743 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1745 2005-04-27 Kenichi Handa <handa@m17n.org>
1747 * language.c (mlang__init): Add "an" (Aragonese).
1749 * word-thai.c: Add support for libthai.
1750 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1751 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1753 * mtext.c: Include "word-thai.h" conditionaly.
1754 (mtext__init): Call mtext__word_thai_init conditionaly.
1755 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1757 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1758 not WORDCUT_LD_FLAGS.
1760 2005-04-19 Kenichi Handa <handa@m17n.org>
1762 * word-thai.c (wordseg_propertize): Always unref the attached
1764 (thai_wordseg): Don't unref the property.
1766 2005-04-18 Kenichi Handa <handa@m17n.org>
1768 * word-thai.c: Include stdlib.h.
1769 (wordseg_propertize): Add dummy function for the case that wordcut
1770 library doesn't exist.
1771 (wordseg_propertize): Fix for old wordcut library.
1773 2005-04-16 Kenichi Handa <handa@m17n.org>
1775 * word-thai.c: Include <stdio.h>.
1777 2005-04-15 Kenichi Handa <handa@m17n.org>
1779 * draw.c: Include mtext.h.
1780 (linebreak_table, M_break_at_space, M_break_at_word)
1781 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1782 (compose_glyph_string): Check POS before getting Mface text
1784 (truncate_gstring): Give correct TO arg to line_break function.
1785 (GET_LB_TYPE): New macro.
1786 (find_break_backward, find_break_forward): New functions.
1787 (mdraw__init): Initialize the above new variables.
1788 (mdraw__fini): Free linebreak_table.
1789 (mdraw_default_line_break): Use find_break_backward and
1792 * word-thai.c: New file.
1794 * word-thai.h: New file.
1796 * mtext.c: Include word-thai.h.
1797 (wordseg_func_table): New variable.
1798 (mtext__init): Initialize wordseg_func_table and call
1799 mtext__word_thai_init.
1800 (mtext__fini): Call mtext__word_thai_fini, free
1802 (MTextWordsegFunc): New type.
1803 (mtext__word_segment): New function.
1805 * mtext.h (wordseg_func_table): Extern it.
1806 (mtext__word_segment): Extern it.
1808 * m17n.c (m17n_init): Fix typo (== -> =).
1810 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1811 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1813 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1814 (MTEXTPROP_VAL): New macros.
1816 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1818 2005-04-07 Kenichi Handa <handa@m17n.org>
1820 * database.c (load_chartable): Fix pursing of symbol name.
1822 2005-03-24 Kenichi Handa <handa@m17n.org>
1824 * m17n.c (m17n_init): Fix typo (== -> =).
1826 2005-03-11 Kenichi Handa <handa@m17n.org>
1828 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1830 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1832 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1835 2005-03-09 handa <handa@m17n.org>
1837 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1838 calling m17n_init ().
1840 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1841 calling m17n_init_core ().
1843 2005-02-28 Kenichi Handa <handa@m17n.org>
1845 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1848 2005-02-17 Kenichi Handa <handa@m17n.org>
1850 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1851 (M_description, M_command, M_variable): New variables.
1852 (load_im_info_keys): New variables.
1853 (load_im_info, check_command_keyseq, get_description_advance)
1854 (parse_command_list, get_command_list, parse_variable_list)
1855 (get_variable_list, input_method_hook): New functions.
1856 (command_list, variable_list): New variables.
1857 (minput__init): Put input_method_hook to Minput_method.
1858 Initialize M_description, M_command, M_variable, Mdetail_text,
1859 load_im_info_keys, command_list, variable_list.
1860 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1861 (Mdetail_text): New variable.
1862 (minput_get_description, minput_get_commands)
1863 (minput_assign_command_keys, minput_get_variables)
1864 (minput_set_variable): New functions.
1866 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1867 (minput_assign_command_keys, minput_get_variables)
1868 (minput_set_variable): Extern them.
1870 * plist.c (UNGETC): Just decrement st->p.
1871 (read_mtext_element): New arg skip.
1872 (read_integer_element): Likewise.
1873 (read_symbol_element): Likewise.
1874 (read_element): New arg KEYS.
1875 (mplist__from_plist): Don't increment ref-count of NULL object.
1876 (mplist__from_file): New arg KEYS.
1877 (mplist_put): Don't increment ref-count of NULL object.
1878 (mplist_add): Likewise.
1879 (mplist_push): Likewise.
1880 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1882 * plist.h (mplist__from_file): Prototype adjusted.
1884 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1885 (get_database_stream): New function.
1886 (load_database): Use get_database_stream.
1887 (M_database_hook): New variable
1888 (mdatabase__init): Initialize M_database_hook.
1889 (mdatabase__load_for_keys): New function.
1890 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1892 (mdatabase_define): Free mdb->extra_info if necessary.
1894 * database.h (mdatabase__dir_list, M_database_hook)
1895 (mdatabase__load_for_keys): Extern them.
1896 (MDatabaseHookFunc): New type.
1898 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1900 2004-12-27 Kenichi Handa <handa@m17n.org>
1902 * Version 1.2.0 released.
1904 2004-12-27 Kenichi Handa <handa@m17n.org>
1906 * input.c (minput_filter): Don't reset ic->xxx_changed.
1908 * mtext.c (mtext_from_data): Fix documentation.
1910 2004-12-25 Kenichi Handa <handa@m17n.org>
1912 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1913 (M17NLIB_VERSION_NAME): Update to "1.2.".
1915 2004-12-24 Kenichi Handa <handa@m17n.org>
1917 * input.c (reset_ic): Set key_unhandled to 0.
1919 2004-12-21 Kenichi Handa <handa@m17n.org>
1921 * m17n-gui.h (mfont_from_spec): Delete extern.
1923 * input-gui.c (win_callback): Handle Minput_reset.
1924 (minput__win_init): Register reset_ic as a callback for
1927 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1928 changed. At first, shift to the initial state.
1929 (minput__init): Initialize Minput_reset. Register reset_ic as a
1930 callback for Minput_reset.
1931 (Minput_reset): New variable.
1932 (minput_filter): Always set ic->xxx_changed to 0.
1933 (minput_reset_ic): New function.
1934 (integer_value): Fix typo ('>' -> '<') and calculation of length
1937 * m17n-core.c (merror_code): Change type to `int'.
1939 * m17n-misc.h (merror_code): Adjust type.
1941 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1943 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1944 (mtext_change_prop): Delete extern.
1946 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1947 to `int'. Move the documents to m17n-core.h.
1949 2004-12-13 Kenichi Handa <handa@m17n.org>
1951 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1952 (MTextProperty): Document it.
1954 2004-12-09 Kenichi Handa <handa@m17n.org>
1956 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1958 2004-12-03 Kenichi Handa <handa@m17n.org>
1960 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1961 m17n__gui_initialized): New externs.
1963 * m17n-core.h (enum M17NStatus): New enum.
1964 (m17n_status): Extern it.
1966 * m17n-core.c (core_initialized): Delete this variable.
1967 (m17n__core_initialized, m17n__shell_initialized,
1968 m17n__gui_initialized): New variables.
1969 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1970 instead of core_initialized.
1971 (m17n_status): New function.
1973 * m17n.c (shell_initialized): Delete this variable.
1974 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1977 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1979 * m17n-gui.c (win_initialized): Delete this variable.
1980 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1981 instead of gui_initialized.
1983 2004-11-19 Kenichi Handa <handa@m17n.org>
1985 * input.c (reset_ic): Check if ic_info->state is NULL.
1986 (filter): If ic_info->state is NULL, return 0.
1987 (load_input_method): Don't unref `maps' it it's not created.
1989 2004-11-15 Kenichi Handa <handa@m17n.org>
1991 * input.c (find_candidates_group): If INDEX is -1, find the last
1993 (take_action_list): If the previous of the first candidate is
1994 requested, select the last candidate.
1996 2004-11-08 Kenichi Handa <handa@m17n.org>
1998 * m17n-X.c (device_open): Try at most 32 fonts to find a
1999 non-autoscaled font.
2001 * font.c (xlfd_parse_name): Fix previous change.
2003 2004-11-05 Kenichi Handa <handa@m17n.org>
2005 * font.c: (commont_style): Include dummy elements "slanted" and
2006 "rslanted" to prefer "o" to "r" if "i" is requested.
2008 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2010 2004-10-29 Kenichi Handa <handa@m17n.org>
2012 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2014 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2015 New members smallest and larger.
2016 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2017 (xfont_registry_list): Likewise.
2018 (xfont_select): Likewise.
2021 2004-10-28 Kenichi Handa <handa@m17n.org>
2023 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2024 font name comparison.
2025 (xfont_select): Fix logic for selecting a larger size font.
2027 2004-10-25 Kenichi Handa <handa@m17n.org>
2029 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2032 2004-10-22 Kenichi Handa <handa@m17n.org>
2034 * input.c (update_candidate): Renamed from udpate_candidate.
2035 (take_action_list): Show more debugging info on arithmetic commands.
2037 * m17n-X.c (device_open): Fix previous change.
2039 * draw.c (compose_glyph_string): Don't get face property at the
2042 2004-10-21 Kenichi Handa <handa@m17n.org>
2044 * draw.c (compose_glyph_string): Fix for the case of category
2047 2004-10-19 Kenichi Handa <handa@m17n.org>
2049 * input.c (mdebug_mask): New variable.
2050 (shift_state): Print debug information.
2051 (take_action_list): Likewise.
2052 (handle_key): Likewise.
2054 2004-10-14 Kenichi Handa <handa@m17n.org>
2056 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2058 2004-10-13 Kenichi Handa <handa@m17n.org>
2060 * m17n-X.c (device_open): Be sure to register at least one font
2063 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2064 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2066 2004-10-12 Kenichi Handa <handa@m17n.org>
2068 * draw.c (alloc_gstring): Fix previous change.
2070 * font-ft.c (ft_list_generic): Fix for the case of not
2073 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2075 * font.c (mfont_list): If no font is found, return NULL.
2076 (load_font_encoding_table): Put entries of nil registry first.
2077 (find_encoding): Adjust for the above change.
2079 2004-10-11 Kenichi Handa <handa@m17n.org>
2081 * m17n-gui.h (mfont_list): Adjust prototype.
2083 * m17n-X.c (xfont_list): New arg maxnum.
2085 * font.h (struct MFontDriver): Change prototype of <list>.
2087 * font-ft.c (fc_generic_family_list): Delete it.
2088 (Mserif, Msans_serif, Mmonospace): Delete them.
2089 (M_generic_family_info): New variable.
2090 (enum GenericFamilyType): New enum.
2091 (struct GenericFamilyInfo): New struct.
2092 (generic_family_table): New variable.
2093 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2095 (add_font_info): Get style here.
2096 (ft_list_family): Don't initialize fc_config here. Don't list
2098 (ft_list_generic): New function.
2099 (ft_select): Pay attention to generic familes here.
2100 (ft_open): Fix calculation of ascent and descent.
2101 (ft_list): Pay attention to generic families.
2102 (mfont__ft_init): Initialize M_generic_family_info,
2103 generic_family_table, and fc_config..
2104 (mfont__ft_fini): Finalize generic_family_table.
2106 * draw.c (compose_glyph_string): Use more constant font for
2107 glyphs. Adjust for the member change in MGlyph.
2108 (layout_glyph_string): Adjust for the member change in MGlyph.
2109 (alloc_gstring): Intilize scracth_glyph to avoid
2110 compose_glyph_string on it.
2111 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2112 (mdraw_coordinates_position): Fix previous change.
2114 * internal-gui.h (glyph_category): New enum.
2115 (MGlyph): Change type of <category> to enum glyph_category.
2117 * face.c (mface__realize): Delete args langauge and charset.
2118 (mface__for_chars): Fix for the case that glyphs have different
2120 (mface__update_frame_face): Adjust for mface__realize change.
2122 * face.h (mface__realize): Adjust prototype.
2124 2004-10-05 Kenichi Handa <handa@m17n.org>
2126 * language.c (mlang__init): Add Akan.
2128 2004-10-04 Kenichi Handa <handa@m17n.org>
2130 * font-ft.c (add_font_info): Add instead of push the element.
2131 (ft_list_family): For generic fonts, try all
2132 substituted. families.
2134 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2135 (run_rule): Don't update cluster range here.
2136 (run_command): Update cluster range on appending a glyph.
2137 (run_otf): Update cluster range for glyphs generated by OTF.
2139 2004-10-02 Kenichi Handa <handa@m17n.org>
2141 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2143 2004-09-30 Kenichi Handa <handa@m17n.org>
2145 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2147 2004-09-30 Kenichi Handa <handa@m17n.org>
2149 * font.h: Include <fontconfig/fontconfig.h>.
2150 (MFTInfo): New member langset.
2151 (mfont__encoding_list): Extern it.
2153 * font.c (mfont__encoding_list): New function.
2154 (mdebug_dump_font_list): New function.
2156 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2157 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2159 (ft_family_list): New variable.
2160 (set_font_info): New arg basep. Callers changed.
2161 (fc_list): Check the return value of FcPatternGetString.
2162 (add_font_info): New arg plist. Callers changed. Update
2164 (ft_list_family): New function (merged fc_list and ft_list_all).
2165 (ft_select): Use ft_list_family.
2166 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2168 (mfont__ft_init): Initialize above new variables.
2169 (mfont__ft_fini): Free ft_family_list.
2170 (STRDUP_LOWER): New macro.
2171 (set_font_info): Use STRDUP_LOWER.
2172 (ft_list_family): Avoid duplicate addition of font path. Use
2174 (fc_decode_prop): Fix typo.
2176 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2177 (xfont_registry_list): Change argument disp_info to frame.
2179 (xfont_list_all): New function.
2180 (xfont_list): If FONT is not NULL, check all fonts.
2182 2004-09-28 Kenichi Handa <handa@m17n.org>
2184 * m17n-X.c (MXFont, MXFontList): New types.
2185 (MDisplayInfo): Delete members font_registry_list,
2186 iso8859_1_family_list, iso10646_1_family_list, new members
2187 font_list, base_font_list.
2188 (free_display_info): Adusted for the change of MDisplayInfo.
2189 (xfont_driver): Initialize with xfont_list.
2190 (font_compare): New function.
2191 (build_font_list): Deleted.
2192 (xfont_registry_list): New function.
2193 (xfont_select): Use xfont_registry_list.
2194 (xfont_list): New function.
2195 (device_open): Adusted for the change of MDisplayInfo.
2197 * font-ft.c (add_font_info): New arg languages. Callers changed.
2198 (fc_list): Get languages from fonts..
2199 (ft_list_all): Renamed from ft_list. Callers changed.
2200 (ft_list): New function.
2201 (mfont__ft_driver): Initalize with ft_list.
2203 * font.c (mfont_list): New function.
2205 * font.h (struct MFontDriver): New member `list'.
2206 (MFTInfo): New member languages.
2208 * m17n-gui.h (mfont_list): Extern it.
2210 2004-09-27 Kenichi Handa <handa@m17n.org>
2212 * internal-gui.h (struct MGlyphString): Delete members mt,
2213 sub_width, sub_lbrearing, sub_rbearing, and region.
2215 * draw.c (MSubTextExtents): New type.
2216 (layout_glyphs): New arg extents. Set its members.
2217 (layout_glyph_string): Adjusted for the above change.
2218 (alloc_gstring): Don't set gstring->mt.
2219 (truncate_gstring): Call line_break function with mt instead of
2222 2004-09-22 Kenichi Handa <handa@m17n.org>
2224 * mtext.c (count_utf_16_chars): Count each code of invalid
2227 2004-09-19 Kenichi Handa <handa@m17n.org>
2229 * mtext.c (default_utf_16, default_utf_32): Rename them to
2230 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2233 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2236 2004-09-13 Kenichi Handa <handa@m17n.org>
2238 * draw.c (Mlatin): Don't declare it here.
2239 (visual_order): Fix reordering of combining characters.
2240 (compose_glyph_string): Fix detection of script.
2241 (layout_glyphs): Don't fix reordering of combining characters
2243 (layout_glyph_string): Pay attention to
2244 control->disable_overlapping_adjustment.
2245 (truncate_gstring): Include at least on character in a line.
2246 (get_gstring): Always scan one full line.
2247 (mdraw__init): Don't initialize Mlatin here.
2248 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2249 have a font, use ascent/descent of an ASCII font. Allow
2250 ink_array_return and logical_array_return to be NULL.
2251 (mdraw_coordinates_position): Fix iteration.
2253 * font-ft.c (MFTtoProp): Member completely changed.
2254 (ft_to_prop): Adjusted for the above change.
2255 (ft_to_prop_size): Likewise.
2256 (set_font_info): Adjusted for the change of MFTtoProp.
2257 (fc_generic_family_list): New variable.
2258 (fc_list): Add special handling of generic font names.
2259 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2260 Initialize fc_generic_family_list.
2261 (mfont__ft_fini): Don't free ft_to_prop. Free
2262 fc_generic_family_list.
2263 (FC_vs_M17N_font_prop): New type.
2264 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2265 (fc_decode_prop, fc_encode_prop): New functions.
2266 (mfont__ft_parse_name): Use fc_decode_prop.
2267 (mfont__ft_unparse_name): Use fc_encode_prop.
2269 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2270 (MWDevice): Add member realized_font_list.
2271 (free_display_info): Don't free disp_info->realized_font_list.
2272 (free_device): Free device->realized_fontset_list.
2273 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2274 (device_open): Don't initialize disp_info->realized_font_list.
2275 (device_open): Initialize device->realized_font_list and set it to
2276 frame->realized_font_list.
2278 * fontset.c (try_font_group): New function.
2279 (mfont__lookup_fontset): Use try_font_group.
2281 * font.c (common_weight): Change the order of "regular".
2283 * face.c (Mlatin): Don't make it static.
2284 (mface__realize): Be sure to set work_gstring.frame.
2285 (mface__for_chars): Likewise.
2287 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2290 * internal-gui.h (Mlatin): Extern it.
2292 * m17n-gui.h (MDrawControl): New member
2293 disable_overlapping_adjustment.
2295 2004-09-06 Kenichi Handa <handa@m17n.org>
2297 * font-flt.c (run_otf): Fix typo ('}'->']').
2299 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2300 (COMBINING_PRECOMPUTED_P): New macros.
2302 * draw.c (layout_glyphs): Handle precomputed combining code.
2304 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2305 precomupted combining code.
2307 2004-09-03 Kenichi Handa <handa@m17n.org>
2309 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2312 2004-08-27 Kenichi Handa <handa@m17n.org>
2314 * face.c (mface_put_prop): If the new value is the same as the
2315 current one, don't increment frame->tick.
2317 2004-08-25 Kenichi Handa <handa@m17n.org>
2319 * fontset.c (mfontset): Initialize font_spec_list member.
2320 (mfontset_copy): Load fontset if necessary.
2322 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2323 'metrics' to for C++.
2325 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2328 2004-08-16 Kenichi Handa <handa@m17n.org>
2330 * Version 1.1.0 released.
2332 2004-08-13 Kenichi Handa <handa@m17n.org>
2334 * language.c (mlang__init): Add Dhivehi.
2336 * m17n-gui.c (Mx, Mfreetype): Delete it.
2337 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2339 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2340 (mfont_resize_ratio): Extern it.
2341 (MDrawGlyphInfo): New member logical_width;
2342 (MDrawGlyph): New type.
2343 (mdraw_glyph_list): Prototype adjusted.
2345 * m17n-X.c (xfont_open): Set type and fontp members.
2346 (xft_open): Likewise.
2348 * internal-gui.h (Mx, Mfreetype): Delete extern.
2350 * font.h (struct MRealizedFont): New member type and fontp.
2352 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2353 (Mx, Mfreetype): Declare here.
2354 (Mxft): New variable.
2355 (mfont_resize_ratio): New function.
2357 * font-ft.c (ft_open): Set type and fontp members.
2359 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2362 2004-08-11 Kenichi Handa <handa@m17n.org>
2364 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2367 2004-08-06 Kenichi Handa <handa@m17n.org>
2369 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2372 * font-flt.c (run_otf): Print debugging information if necessary.
2374 2004-08-05 Kenichi Handa <handa@m17n.org>
2376 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2377 positioning_type 5 and 6. Switch simplified.
2379 2004-08-04 Kenichi Handa <handa@m17n.org>
2381 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2383 2004-08-02 Kenichi Handa <handa@m17n.org>
2385 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2386 set val to 1 even if it is greater than 1.
2388 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2390 2004-07-29 Kenichi Handa <handa@m17n.org>
2392 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2393 debugging information.
2395 * internal.h (MDEBUG_PRINT5): New macro.
2397 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2398 the previous one if the zero width glyph has left or right
2401 2004-07-26 Kenichi Handa <handa@m17n.org>
2403 * m17n-X.c (xft_render): Pay attention to members left_padding and
2404 right_padding of MGlyph.
2406 * draw.c (visual_order): Allocate one more elements for arrays as
2407 a workaround of fribidi bug.
2408 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2409 instead of MGlyph->bidi_sensitive.
2410 (layout_glyph_string): Pay attentinon to
2411 control->orientation_reversed when padding at the head or tail.
2412 Fix adjustment of space glyph width.
2413 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2416 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2417 instead of MGlyph->bidi_sensitive.
2419 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2421 2004-07-26 Kenichi Handa <handa@m17n.org>
2423 * draw.c (visual_order): Don't treat combined glyphs specially.
2424 (layout_glyphs): Don't get metrics glyphs that are already ready.
2425 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2426 width with the previous one.
2427 (draw_background): Fix bar cursor position on a r2l glyph.
2429 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2430 (run_rule): Fix place of updating cluster_begin_pos and
2431 cluster_end_pos here.
2432 (run_otf): Don't set left_padding.
2434 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2436 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2437 Fix handling of GPOS.
2438 (mfont__ft_drive_gpos): Delete this function.
2440 * font.h (mfont__ft_drive_otf): Renamed back from
2441 mfont__ft_drive_gsub.
2442 (mfont__ft_drive_gpos): Delete extern.
2444 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2445 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2447 2004-07-23 Kenichi Handa <handa@m17n.org>
2449 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2450 the same bidi level.
2452 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2454 2004-07-22 Kenichi Handa <handa@m17n.org>
2456 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2458 2004-07-20 Kenichi Handa <handa@m17n.org>
2460 * draw.c (render_glyphs): Fix checking of g->code validity.
2462 * face.c (mface__realize): Set g.type.
2464 2004-07-18 Kenichi Handa <handa@m17n.org>
2466 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2469 * m17n-gui.c (mframe): Print error message give by dlopen to
2472 2004-07-16 Kenichi Handa <handa@m17n.org>
2474 * draw.c (compose_glyph_string): Improve the way of deciding a
2475 script. For a character that doesn't have script property, use
2476 the last non-latin script.
2478 * font-ft.c (fc_list): Cancel previous change.
2479 (mfont__ft_init): Add more entries in ft_to_prop_name.
2481 2004-07-15 Kenichi Handa <handa@m17n.org>
2483 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2484 previous or next character glyphs.
2486 2004-07-14 Kenichi Handa <handa@m17n.org>
2488 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2489 of type GLYPH_SPACE.
2491 * fontset.c (mfont__lookup_fontset): If glyph type is
2492 GLYPH_SPACE, get codes for SPACE.
2494 * internal-gui.h (Mfont): Delete extern.
2496 * m17n-gui.h (Mfont): Delete duplicated extern.
2498 2004-07-13 Kenichi Handa <handa@m17n.org>
2500 * font-ft.c (DEVICE_DELTA): New macro.
2501 (adjust_anchor): New function.
2502 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2504 (mfont__ft_drive_gpos): New function.
2506 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2507 (FontLayoutContext): Delete member `rfont'.
2508 (run_otf): Set g->otf_cmd. Call
2509 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2510 only whne HAVE_OTF is defined.
2512 * fontset.c: Include "config.h".
2514 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2515 (MGlyph): New member otf_cmd.
2517 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2518 (mfont__ft_drive_gpos): Extern it.
2520 * face.c: Include "config.h".
2522 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2524 * input-gui.c: Include "config.h".
2526 * plist.c: Include "config.h".
2528 2004-07-06 Kenichi Handa <handa@m17n.org>
2530 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2531 internal-gui.h: Cancel previous changes.
2533 * m17n-gd.h: Delete it.
2535 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2536 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2537 @XML2_LD_FLAGS@ to above.
2538 (libm17n_la_LIBADD): Add -ldl.
2539 (libm17n_la_LDFLAGS): Add -export-dynamic.
2540 (X_LD_FLAGS): Fix the order of linking.
2541 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2542 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2543 (libm17n_X_la_LDFLAGS): Add -module.
2544 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2545 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2546 (libm17n_gd_la_LDFLAGS): Add -module.
2547 (include_HEADERS): Delete m17n-gd.h.
2549 2004-06-30 Kenichi Handa <handa@m17n.org>
2551 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2552 (MDeviceLibraryInterface): Delete it.
2553 (register_device_library): Delete it.
2554 (m17n__device_library_list): Renamed from device_library_list.
2556 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2557 (m17n_init_win): Adjust prototype.
2559 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2560 (m17n_init_gd): New function.
2562 * m17n-gd.h: New file.
2564 * m17n-X.h: Include <m17n-gui.h>.
2565 (m17n_init_X): Extern it.
2566 (M17N_INIT): Redefine it.
2568 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2569 (m17n_init_X): New function.
2571 * internal-gui.h (m17n__device_library_list): Extern it.
2572 (struct MDeviceDriver): New members initialized, init, and fini.
2574 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2576 (libm17n_X_la_LIBADD): Delete aboves.
2577 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2578 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2579 (libm17n_gd_la_LDFLAGS): Delete it.
2580 (include_HEADERS): Add m17n-gd.h.
2582 2004-06-25 Kenichi Handa <handa@m17n.org>
2584 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2585 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2587 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2589 * font-ft.c (fc_list): If FcFontList finds no font, try
2592 * draw.c (compose_glyph_string): Terminate the last loop after
2593 doing default combining if necessary.
2595 2004-06-24 Kenichi Handa <handa@m17n.org>
2597 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2599 * character.c (mchar_define_property): Add const to an arg.
2601 * charset.c (mchar_define_charset): Add const to an arg.
2603 * coding.c (MCodingSystem): Add const to an arg or decoder.
2604 (finish_decoding): Add const to an arg.
2605 (decode_coding_charset, decode_coding_utf_8)
2606 (decode_coding_utf_16, decode_coding_utf_32)
2607 (decode_coding_iso_2022, decode_coding_sjis)
2608 (mconv_define_coding): Likewise.
2610 * m17n-X.c (xft_find_metric): Delete unused variable.
2612 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2615 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2618 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2619 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2621 * mtext.h (mtext__from_data): Ajust prototype.
2623 2004-06-23 Kenichi Handa <handa@m17n.org>
2625 * draw.c (compose_glyph_string): Always get glyph codes by
2627 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2628 (mdraw_glyph_list): New function.
2630 * font-flt.c (mfont__flt_run): Be sure to call
2631 rfont->driver->encode_char.
2633 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2634 (ft_encode_char): Delete arg C.
2635 (ft_render): Don't call FT_Get_Char_Index.
2637 * font.c (mfont__encodable_p): Delete it.
2638 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2640 * font.h (struct MFontDriver): Delete arg C of encode_char.
2641 (mfont__encodable_p): Delete extern.
2643 * m17n-X.c (xfont_encode_char): Delete arg C.
2644 (xft_find_metric): Don't cal FT_Get_Char_Index.
2645 (xft_render): Likewise.
2647 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2649 (mdraw_glyph_list): Extern it.
2651 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2653 2004-06-22 Kenichi Handa <handa@m17n.org>
2655 * m17n-gui.h (mfontset_lookup): Extern it.
2657 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2659 * fontset.c (realize_fontset_elements)
2660 (free_realized_fontset_elements, update_fontset_elements): New
2662 (mfont__realize_fontset): Call realize_fontset_elements.
2663 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2664 (mfont__lookup_fontset): If a fontset was modified, update
2665 the realized fontset.
2666 (mfontset_modify_entry): Increment fontset->tick.
2667 (mfontset_lookup): New function.
2669 2004-06-21 Kenichi Handa <handa@m17n.org>
2671 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2673 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2674 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2675 length of source text 0.
2677 2004-06-21 Kenichi Handa <handa@m17n.org>
2679 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2680 (compare): Pay attention to format other than utf-8.
2681 (copy): Delete this function.
2682 (count_by_utf_8, count_by_utf_16, insert): New functions.
2683 (count_utf_16_chars): Fix handling of a surrogate pair.
2684 (find_char_forward, find_char_backward): Likewise.
2685 (mtext__from_data): Delete unnecessary check. Fix number of
2687 (mtext_from_data): Don't count items.
2688 (mtext_ref_char): Optimize the code.
2689 (mtext_set_char): Pay attention to format other than utf-8.
2690 (mtext_cat_char): Likewise.
2691 (mtext_dup): Don't call copy, instead do allocation here.
2692 (mtext_cat): Call insert instead of copy.
2693 (mtext_ncat): Likewise.
2694 (mtext_cpy): Delete character at first and call insert instead of
2696 (mtext_ncpy): Likewise.
2697 (mtext_copy): Likewise.
2698 (mtext_duplicate): Call insert instead of copy.
2699 (mtext_del): Pay attention to format other than utf-8.
2700 (mtext_ins): Simply call insert.
2701 (mtext_ins_char): Pay attention to format other than utf-8.
2702 (mtext_tok): Call insert instead of copy.
2703 (mtext_text): Call UNIT_BYTES.
2705 * textprop.c (mtext__adjust_plist_for_change): New function.
2707 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2708 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2709 (CHAR_UNITS_AT): Fix typo.
2710 (CHAR_UNITS_BY_HEAD): Fix typo.
2711 (STRING_CHAR_AND_UNITS): Fix typo.
2713 * internal.h (MTEXT_READ_ONLY_P): New macro.
2715 * mtext.h (mtext__replace): Delete the extern.
2716 (mtext__adjust_foramt): Adjust prototype.
2718 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2719 if possible. Otherwise make a copy of mmt.
2721 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2724 2004-06-18 Kenichi Handa <handa@m17n.org>
2726 * character.h (CHAR_STRING_UTF16): Fix syntax.
2728 2004-06-16 Kenichi Handa <handa@m17n.org>
2730 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2731 (libm17n_X_la_LIBADD): Delete it.
2732 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2734 * m17n-X.c (device_open): Add parens in `if' condition.
2736 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2737 (DEC_POSITION): Likewise.
2738 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2740 2004-06-15 Kenichi Handa <handa@m17n.org>
2742 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2745 * draw.c (compose_glyph_string): If langauge is specified, call
2746 mface__for_chars even if a text is all latin. Fix condition for
2747 setting non_ascii_found.
2749 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2751 * m17n.h (minput_char_to_key): Delete extern.
2753 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2755 * m17n-gui.c (null_device_open): Set several members of frame.
2757 2004-06-14 Kenichi Handa <handa@m17n.org>
2759 * m17n-gui.h (minput_event_to_key): Delete extern.
2761 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2763 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2765 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2767 2004-06-08 Kenichi Handa <handa@m17n.org>
2769 * character.c (mchar_put_prop): Don't increment the ref-count of
2772 2004-06-04 Kenichi Handa <handa@m17n.org>
2774 * m17n-core.c (mdebug__register_object): New function.
2775 (mdebug__unregister_object): Likewise.
2777 * internal.h (mdebug__register_object, mdebug__unregister_object):
2779 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2782 * charset.c (mcharset__load_from_database): Don't call
2783 mconv__register_charset_coding here.
2785 * coding.c (find_coding): Get a real name from an element of
2786 coding_definition_list.
2787 (mconv__register_charset_coding): Set the real name at the top of
2789 (mcoding__load_from_database): Likewise.
2790 (mconv_list_codings): Adjusted for the above change.
2792 2004-06-03 Kenichi Handa <handa@m17n.org>
2794 * coding.c (find_coding): Find by canonicalized name. Don't have
2795 to modify the element of coding_definition_list by
2797 (mconv__define_coding_from_charset): Delete it.
2798 (mconv__register_charset_coding): Canonicalize sym.
2799 (mcoding__load_from_database): Register plist modified by
2802 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2804 * font-ft.c (ft_open): Fix setting of rfont->descent.
2806 2004-06-02 Kenichi Handa <handa@m17n.org>
2808 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2809 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2810 (xlfd_unparse_name): Renamed from xfont_build_name.
2811 (mfont__init): Initialized Mfontconfig.
2812 (mfont__free_realized): Unconditionally unref rfont->info.
2813 (mfont__select): Free `this' if it's not best.
2814 (mfont__open): Don't check frame->realized_font_list.
2815 (mfont__parse_name_into_font): New function.
2816 (Mfontconfig): New variable.
2817 (mfont_from_name): Call mfont_parse_name.
2818 (mfont_name): Call mfont_unparse_name.
2819 (mdebug_dump_font): Likewise.
2821 * font.h (struct MFontDriver): Delete members parse_name and
2823 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2824 (mfont__parse_name_into_font): Extern it.
2826 * font-ft.c: Include "symbol.h".
2827 (close_ft): Unconditionally free filename and charmap_list of
2829 (ft_open): Duplicate base->filename. Increment ref-count of
2830 ft_info->charmap_list. Free ft_info->charmap_list and
2831 ft_info->filename on error.
2832 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2834 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2836 (enum xlfd_field_idx): Moved to font.c.
2837 (split_font_name, build_font_name): Likewise.
2838 (build_font_list): Call mfont__parse_name_info_font.
2839 (xfont_open): Call mfont__unparse_name. Free name.
2840 (xfont_parse_name, xfont_build_name): Moved to font.c
2841 (xft_select): Prototype deleted.
2842 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2843 Call mfont_pase_name.
2845 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2846 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2849 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2852 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2854 2004-06-01 Kenichi Handa <handa@m17n.org>
2856 * fontset.c (mfontset_modify_entry): Pay attention to the case
2857 that fontset->font_spec_list is NULL.
2859 2004-05-31 Kenichi Handa <handa@m17n.org>
2861 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2863 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2865 * font.c (mfont__select): Print score the a font for debugging.
2867 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2869 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2870 kanji_sym and kana_sym.
2872 2004-05-28 Kenichi Handa <handa@m17n.org>
2874 * Makefile.am (VINFO): New variable.
2875 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2876 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2878 2004-05-27 Kenichi Handa <handa@m17n.org>
2880 The following chanages are to make device dependent functions
2881 accessible only from MDeviceDriver structure, and to add GD and
2882 null device drivers. Font drivers get also device dependent.
2884 * m17n.c (m17n_init): Increament shell_initialized.
2885 (m17n_fini): Decremented shell_initialized.
2887 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2889 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2890 (Mwidget, Mcolormap, Mx): Extern them.
2892 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2893 (free_frame): Call frame->driver->close instead of
2895 (DLOPEN_SHLIB_EXT): New macro.
2896 (MDeviceLibraryInterface): New type.
2897 (device_library_list): New variable.
2898 (register_device_library): New function.
2899 (null_device): New variable.
2900 (null_device_close, null_device_get_prop)
2901 (null_device_realize_face, null_device_free_realized_face): New
2903 (null_driver): New variable.
2904 (null_device_init, null_device_fini, null_device_open): New
2906 (null_interface): New variable.
2907 (Mfreetype, Mdevice): Declare them.
2908 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2909 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2910 Mwin__Close_Device. Register drivers for Mx and Mgd.
2911 (m17n_fini_win): Decremented win_initialized. Call "fini"
2912 function of all opened devices. Don't call mwin__fini.
2913 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2915 (mframe): Handle Mdevice key of PLIST.
2916 (mframe_get_prop): Call frame->device->get_prop instead of
2917 mwin__device_get_prop.
2919 * m17n-gd.c: New file.
2921 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2922 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2924 * m17n-core.c (m17n_init_core): Increate core_initialized.
2925 (m17n_fini_core): Decremented core_initialized.
2927 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2928 (Mcolormap): Don't extern them here.
2930 * m17n-X.c (FRAME_DEVICE): New macro.
2931 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2932 (free_display_info): Use MPLIST_DO.
2933 (free_device): Free rface->info.
2934 (xft_close): Delete it.
2935 (device_init): Renamed from mwin__init.
2936 (device_fini): Renamed from mwin__fini.
2937 (device_open): Renamed from mwin__open_device.
2938 (x_driver): New variable.
2939 (MXFontInfo): Delete member frame, add member display.
2940 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2941 Don't declare them here.
2943 * internal-gui.h (MDeviceType): New enum.
2944 (MWDefice): Delete it.
2945 (struct MFrame): Change type of device to void *. New members
2946 device_type, driver, font_driver_list.
2947 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2948 (MDeviceDriver): New type.
2949 (Mx, Mgd, Mfreetype): Extern them.
2950 (mwin__XXX): Delete all of them.
2952 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2954 (win_destroy_ic): Likewise.
2955 (adjust_window_and_draw): Likewise.
2956 (win_callback): Likewise.
2957 (Mxim): Declare it here.
2958 (minput_event_to_key): Call M_CHECK_READABLE.
2960 * fontset.c (mfont__lookup_fontset): Delete local variable
2963 * font.h (struct MFontDriver): Delete member close, add members
2964 parse_name and build_name.
2965 (mfont__driver_list): Delete extern.
2966 (mfont__close): Delete extern.
2968 * font.c (mfont__init): Don't set mfont__driver_list.
2969 (mfont__fini): Don't unref mfont__driver_list.
2970 (mfont__select): Try font drivers in frame->font_driver_list. Set
2971 driver member of a realized font.
2972 (mfont__close): Delete it.
2973 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2974 functions of the default frame.
2976 * font-ft.c (close_ft): Check ft_info->ft_face and work
2978 (add_font_info): Allocate ft_info by M17N_OBJECT.
2979 (ft_close): Delete it.
2980 (mfont__ft_driver): Don't set ft_close.
2981 (ft_select): Increment ref-count of best_font.
2982 (ft_open): Decremented ref-count of base. On error, call
2983 FT_Done_Face and free ft_info.
2984 (ft_find_metric): Always use XXX_MONO in load_flags.
2985 (ft_render): Fix setting of width. Call
2986 frame->driver->draw_points instead of mwin__draw_points.
2987 (ft_to_prop): Don't set mfont__driver_list.
2988 (mfont__ft_fini): Just unref ft_info.
2990 * face.c (mface__init): Exchange foreground and background of
2991 mface__default. Call mface_put_prop to set hline of
2993 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2994 (mface__free_realized): Don't call mwin__free_realized_face.
2996 * draw.c (Mdepth): Don't declare it here.
2997 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2998 (render_glyphs, render_glyph_string): Likewise.
2999 (mdraw__init): Don't set Mdepth.
3000 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3002 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3004 (mdraw_text_items): Check FRAME is writable.
3005 (mdraw_per_char_extents): Implement body.
3007 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3009 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3010 (GUI_SOURCES): Delete it.
3011 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3012 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3013 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3014 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3015 (linkgui_LDADD): Set to libm17n-gui.la
3016 (linkgui_LDFLAGS): New target.
3017 (SRC): Include ${libm17n_gui_la_SOURCES} and
3018 ${libm17n_gd_la_SOURCES}.
3020 2004-05-24 Kenichi Handa <handa@m17n.org>
3022 * draw.c (draw_background): Don't draw background even if
3023 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3025 2004-05-22 Kenichi Handa <handa@m17n.org>
3027 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3029 2004-05-20 Kenichi Handa <handa@m17n.org>
3031 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3033 * m17n-gui.c: Include "plist.h".
3034 (mframe): If PLIST is NULL, initialize it to emply plist.
3036 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3037 (xft_driver): New variable.
3038 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3039 (xft_find_metric, xft_render): New function.
3040 (mwin__init): Adjusted for the new mfont__driver_list.
3041 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3042 generated face to PARAM.
3043 (mwin__realize_face): Fix setting of box colors. Don't call hook
3045 (mwin__draw_hline): New function.
3046 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3047 (mwin__xft_render): Delete these function.
3049 * internal-gui.h (struct MFrame): New member tick.
3050 (struct MGlyphString): New member tick.
3051 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3052 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3053 (mwin__xft_render): Delete extern.
3055 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3056 (mfontset): Always increment the reference count of returned
3059 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3060 (MFTInfo): Moved to font.h.
3061 (ft_iso8859_1_font_list): Delete this variable.
3062 (set_font_info): Don't set font->property[MFONT_TYPE].
3063 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3064 (add_font_info): Change type to void.
3065 (fc_list): Change anme from xft_list. Caller changed. Include
3066 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3067 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3068 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3069 (close_ft): Don't call mwin__xft_close. Unref
3070 ft_info->extra_info.
3071 (ft_open): Don't setup ft_info->fontname. Don't call
3073 (ft_find_metric): Don't call mwin__xft_get_metric.
3074 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3075 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3076 (mfont__ft_init): Adjusted for new mfont__driver_list.
3077 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3079 * font.c (mfont__driver_list): Make it MPlist.
3080 (mfont__init): Adjust initialization of mfont__driver_list.
3081 (mfont__fini): Free mfont__driver_list.
3082 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3083 (mfont__select): Adjusted for the new mfont__driver_list.
3085 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3086 (mfont__drirver_list): Adjust prototype.
3087 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3089 * face.h (struct MFace): Delete member realized_face_list, add
3091 (struct MRealizedFace): Delete member need_update
3092 andnofont_rface, add member non_ascii_list.
3093 (mface__update_frame_face): Extern it.
3095 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3097 (get_hline_create, get_box_create): New functions.
3098 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3100 (free_face): Cancep previous change. Free face->frame_list.
3101 (serialize_hline): Do nothing if hline->width is zero.
3102 (serialize_box): Do nothing if box->width is zero.
3103 (mface__init): Setup all properties of mface__default.
3104 (mface__fini): Free hline_prop_list and box_prop_list.
3105 (mface__realize): Cancel previous change. Update
3106 face->frame_list. Setup rface->non_ascii_list.
3107 (mface__for_chars): Update rface->non_ascii_list.
3108 (mface__free_realized): Free rface->non_ascii_list.
3109 (mface__update_frame_face): New function.
3110 (mface): Initialize face->frame_list.
3111 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3113 (mface_merge): Likewise.
3114 (mface_put_prop): If key is Mhline or Mbox, get value by
3115 get_hline_create or get_box_create respectively.
3116 (mface_put_prop): Update frame->tick and call
3117 mface__update_frame_face if necessary.
3118 (mface_update): Do nothing if func is noop_hook.
3120 * draw.c (render_glyphs): If a font is not found, use
3121 mwin__draw_empty_boxes.
3122 (alloc_gstring): Initialize gstring->tick.
3123 (get_gstring): Check gstring->tick.
3125 2004-05-17 Kenichi Handa <handa@m17n.org>
3127 * face.c (find_realized_face): Return value changed. If RFONT is
3128 NULL, avoid unnecessary checking.
3129 (free_face): Free face->realized_face_list.
3130 (mface__realize): Adjusted for the change of find_realized_face.
3131 If it returns a realized face that needs update, free it and
3132 realize a new one. Push a new realized face to
3133 frame->realized_face_list instead of appending.
3134 (mface__for_chars): Adjusted for the change of find_realized_face.
3135 Short cut if the required font is in rface->ascii_rface.
3136 (mface_put_prop): Free old value if necessary. Set need_update
3137 member of realized faces to 1.
3139 * face.h (struct MFace): Delete member tick, add member
3141 (struct MRealizedFace): Delete member tick, add member
3144 2004-05-13 Kenichi Handa <handa@m17n.org>
3146 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3148 2004-05-12 Kenichi Handa <handa@m17n.org>
3150 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3152 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3153 parse it XftNameParse.
3155 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3156 (all_fonts_scaned): New variable.
3157 (set_font_info): FAMILY may be Mnil.
3158 (add_font_info): Argument changed.
3159 (xft_list): Call add_font_info in it.
3160 (ft_list): Likewise.
3161 (ft_select): Make it work in the case family is Mnil.
3162 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3163 (mfont__ft_fini): Set all_fonts_scaned to 0.
3165 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3166 that is failed to open.
3168 2004-05-10 Kenichi Handa <handa@m17n.org>
3170 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3171 device's depth is 1 (i.e. monochrome).
3173 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3174 to work around the problem of libtool.
3176 * font-ft.c: Include <freetype/ftbdf.h>.
3177 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3179 (mfont__ft_init): Initialize them.
3180 (ft_iso8859_1_font_list): New variable.
3181 (set_font_info): Detect a font containing iso8859-1 glyphs and
3182 register it in ft_iso8859_1_font_list. If the font is not
3183 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3184 properties of the font from its properties.
3185 (add_font_list): If the font is not scalable, check if it is BDF
3186 or PCF font. If not, ignore it.
3187 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3188 registry is not iso8859-1.
3189 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3190 ft_iso8859_1_font_list.
3191 (ft_find_metric): If the font is not scalable, assume it as BDF
3192 or PCF, and get a metric from its properties.
3193 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3195 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3197 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3198 (libm17n_la_LDFLAGS): Delete it.
3199 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3200 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3202 2004-05-06 Kenichi Handa <handa@m17n.org>
3204 * draw.c (compose_glyph_string): Fix previous change.
3206 2004-04-30 Kenichi Handa <handa@m17n.org>
3208 * font-ft.c (ft_list): Delete unused variable `result'.
3209 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3211 2004-04-27 Kenichi Handa <handa@m17n.org>
3213 * m17n-X.c: Include config.h
3214 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3215 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3216 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3217 (FRAME_CMAP, FRAME_VISUAL): New macros.
3218 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3219 (xfont_driver): Make it static.
3220 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3221 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3222 info->xft_color_back.
3223 (MXftFontInfo) [HAVE_XFT2]: New type.
3224 (mwin__xft_close) [HAVE_XFT2]: New function.
3225 (mwin__xft_open) [HAVE_XFT2]: New function.
3226 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3227 (mwin__xft_render) [HAVE_XFT2]: New function.
3229 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3230 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3231 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3234 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3236 * font-ft.c: Don't include FT_FREETYPE_H here.
3237 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3238 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3239 (MFTInfo): New member charmap_index.
3240 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3241 (check_otf_filename): Renamed from check_filename. Return value
3243 (ft_set_property): This function deleted.
3244 (set_font_info): New function.
3245 (add_font_list): Argument changed. Add multiple fonts.
3246 (xft_list) [HAVE_XFT2]: New function.
3247 (ft_list) [not HAVE_XFT2]: New function.
3248 (ft_select): Add code for Xft.
3249 (close_ft): Likewise.
3250 (ft_open): Likewise.
3251 (ft_find_metric): Likewise.
3252 (ft_encode_char): Likewise.
3253 (ft_render): Likewise.
3255 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3257 2004-04-26 Kenichi Handa <handa@m17n.org>
3259 * textprop.c (mtext_attach_property): Declare the return type as
3262 2004-04-21 Kenichi Handa <handa@m17n.org>
3264 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3266 2004-04-09 Kenichi Handa <handa@m17n.org>
3268 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3270 (load_command): Setup above members.
3272 2004-04-05 Kenichi Handa <handa@m17n.org>
3274 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3276 2004-03-30 Kenichi Handa <handa@m17n.org>
3278 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3281 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3282 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3284 2004-03-29 Kenichi Handa <handa@m17n.org>
3286 * Version 1.0 Patch Level 2 released.
3288 2004-03-29 Kenichi Handa <handa@m17n.org>
3290 * charset.c (make_charset): Set charset->fully_loaded and
3291 charset->simple correctly. Don't try to get charset->min_char and
3292 charset->max_char for a charset of method subset and superset.
3293 Don't load a mapping file here.
3294 (mcharset__init): Set unified_max.
3295 (mcharset__load_from_database): Free a working plist.
3297 * coding.c (mcoding__fini): Free all malloced data.
3299 * input-gui.c (win_create_ic): Set control.as_image for preediting
3302 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3303 `count') to initialize the array.
3305 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3308 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3310 (mwin__create_window): Fix bug of setting a background pixel of a
3312 (mwin__adjust_window): Clear the window before drawing.
3314 * m17n-core.c (mdebug__report_object): Free array->objectes if
3316 (m17n_init_core): Don't set report_header_printed to 0 here.
3317 Fix debugging information.
3318 (m17n_fini_core): Set report_header_printed to 0 here.
3320 * m17n-core.h (mplist_deserialize): Extern it.
3322 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3324 * m17n.c (m17n_fini): Fix debugging information.
3326 * mtext.c (mtext__adjust_foramt): New function.
3328 * mtext.h (mtext__adjust_foramt): Extern it.
3330 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3332 * plist.h (mplist__deserialize): Don't extern it.
3334 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3335 elements of symbol_table to NULL. Report about created and freed
3336 symbols if MDEBUG_FINI is set.
3338 2004-03-22 Kenichi Handa <handa@m17n.org>
3340 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3342 * m17n.c (m17n_init): Fix the way of checking merror_code.
3344 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3346 2004-03-22 Kenichi Handa <handa@m17n.org>
3348 * fontset.c (realize_font_group): Adjust the font size by
3349 mfont__resize before selecting a font.
3351 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3353 2004-03-19 Kenichi Handa <handa@m17n.org>
3355 * Version 1.0 Patch Level 1 released.
3357 2004-03-19 Kenichi Handa <handa@m17n.org>
3359 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3361 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3363 2004-03-19 Kenichi Handa <handa@m17n.org>
3365 Re-apply the changes forgotten in the released version.
3367 * charset.c (mcharset__load_from_database): Call
3368 mchar_define_charset.
3370 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3371 (mconv_encode_range): Put Mcoding text property.
3373 2004-03-18 Kenichi Handa <handa@m17n.org>
3375 * draw.c (Mdepth): New variable.
3376 (visual_order): Delete unused local var `pos'.
3377 (compose_glyph_string): Fix for the case that gstring->glyphs is
3378 realloced. Stop generating glyphs at TO. Fix handling of
3380 (layout_glyphs): Get metrics of all glyphs in advance. Set
3381 lbearing and rbearing of base of composition glyph correctly.
3382 Handle left-overhang glyphs correctly.
3383 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3385 (dump_combining_code): Change the defualt off_x character to ".".
3386 (mdraw__init): Initialize Mdepth.
3388 * face.c (work_gstring): New variable
3389 (mface__init): Initialize work_gstring.
3390 (mface__fini): Free work_gstring.glyphs.
3391 (mface__realize): Don't handle videomode property here. Adjusted
3392 for the change of mfont__get_metric.
3393 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3395 * face.h (enum face_gc): Moved to m17n-X.c.
3397 * font.h (struct MFontDriver): Arguments of find_metric changed.
3398 (mfont__select): Prototype adjusted.
3399 (mfont__get_metric): Likewise.
3400 (mfont__ft_drive_otf): Likewise.
3401 (mfont__flt_run): Likewise.
3403 * font.c (mfont__select): New argument layouter. If layouter is
3404 different in the registered font, make a new copy of realized
3406 (mfont__get_metric): Argument changed. Get metrics of multiple
3408 (mfont_find): Call mfont__select with layouter as Mnil.
3410 * font-flt.c (FontLayoutContext): New member rfont.
3411 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3412 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3414 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3416 (NUM_POINTS): New macro.
3417 (MPointTable): New type.
3418 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3419 (mfont__ft_drive_otf): New argument rfont.
3421 * fontset.c (realize_font_group): Adjusted for the changed of
3423 (check_fontset_element): This function deleted.
3425 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3426 off the parent window if the preedit text is zero length.
3428 * internal-gui.h (struct MFrame): New members foreground,
3429 background, videomode, font.
3430 (struct MGlyphString): New member anti_alias.
3431 (MDrawPoint): New type.
3432 (mwin__draw_bitmap): Prototype deleted.
3433 (mwin__draw_points): Prototype added.
3435 * m17n-gui.h (MDrawControl): New member anti_alias.
3437 * m17n-gui.c (free_frame): Free frame->font.
3438 (mframe): Set the fontset of frame->face to the default fontset.
3440 * m17n-X.c (RGB_GC): New type.
3441 (enum gc_index): Renamed from enum face_gc. Member names changed.
3443 (struct MWDevice): Members foreground and background deleted. New
3444 member scratch_gc, gc_list.
3445 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3446 (free_device): Free GCs in device->gc_list.
3447 (get_rgb_gc): New function.
3448 (get_gc): Renamed and argument changed from get_color.
3449 (get_gc_for_anti_alias): New function.
3450 (xfont_find_metric): Arguments changed. Get metrics of multiple
3452 (set_region): Argument changed. Caller changed.
3453 (xfont_render): Allways set a font in gc.
3454 (x_error_handler, x_io_error_handler): Define only if
3455 X_SET_ERROR_HANDLER is defined.
3456 (mwin__open_device): Create device->scratch_gc. Set members
3457 foreground, background, and videomode of frame. Call
3458 XSetErrorHandler and XSetIOErrorHandler only if
3459 X_SET_ERROR_HANDLER is defined.
3460 (struct gc_list): Deleted.
3461 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3462 (mwin__realize_face): Adjusted for the change of the format of
3463 rface->info and the charge of set_region.
3464 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3465 (mwin__draw_box): Likewise.
3466 (mwin__draw_bitmap): This function deleted.
3467 (mwin__draw_points): New function.
3468 (mwin__verify_region): Adjusted for the change of the format of
3469 rface->info and the charge of set_region.
3470 (mwin__create_window): Inherit backgound pixel from parent.
3471 (mwin__dump_gc): Adjusted for the change of the format of
3474 2004-03-16 Kenichi Handa <handa@m17n.org>
3476 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3478 * input.c (M_key_alias): New variable.
3479 (handle_key): Try M_key_alias property of a key too.
3480 (minput__init): Initialize M_key_alias. Give that property to
3481 symbols in one_char_symbol. Fix bug of initializing
3484 * draw.c (compose_glyph_string): Don't handle
3485 ignore_formatting_char here. Include formatting characters in the
3486 range processed by a FTL.
3487 (layout_glyph_string): Handle ignore_formatting_char here.
3489 2004-03-12 Kenichi Handa <handa@m17n.org>
3491 * input-gui.c (win_create_ic): Enable bidi in status control.
3493 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3495 2004-03-09 Kenichi Handa <handa@m17n.org>
3497 * input.c (load_input_method): If title is not specified, use the
3498 input method name as title.
3500 * m17n-X.c (get_color): Make it static.
3501 (xim_create_ic, xim_destroy_ic, x_error_handler)
3502 (x_io_error_handler): Likewise.
3504 2004-03-01 Kenichi Handa <handa@m17n.org>
3506 * Version 1.0 released.
3509 Copyright (C) 2003, 2004
3510 National Institute of Advanced Industrial Science and Technology (AIST)
3511 Registration Number H15PRO112
3513 This file is part of the m17n library.
3515 The m17n library is free software; you can redistribute it and/or
3516 modify it under the terms of the GNU Lesser General Public License
3517 as published by the Free Software Foundation; either version 2.1 of
3518 the License, or (at your option) any later version.
3520 The m17n library is distributed in the hope that it will be useful,
3521 but WITHOUT ANY WARRANTY; without even the implied warranty of
3522 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3523 Lesser General Public License for more details.
3525 You should have received a copy of the GNU Lesser General Public
3526 License along with the m17n library; if not, write to the Free
3527 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3528 Boston, MA 02110-1301, USA.