1 2007-01-10 Kenichi Handa <handa@m17n.org>
3 * m17n-gd.c (gd_render): Delete superfluous line.
5 2006-12-26 Kenichi Handa <handa@m17n.org>
7 * m17n.h (minput_callback): Extern it.
9 * input.h (minput__callback): Delte extern.
11 * input.c (get_surrounding_text): Adjusted for the change of
12 minput__callback to minput_callback.
13 (delete_surrounding_text): Likewise.
14 (minput_create_ic): Likewise.
15 (minput_destroy_ic): Likewise.
16 (minput_filter): Likewise.
17 (minput_set_spot): Likewise.
18 (minput_toggle): Likewise.
19 (minput_reset_ic): Likewise.
21 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
22 and ic->candidate_to to 0.
23 (minput_callback): Renamed from minput__callback.
25 * input-gui.c (win_callback): Adjusted for the change of
26 minput__callback to minput_callback.
28 2006-12-15 Kenichi Handa <handa@m17n.org>
30 * font-ft.c (ft_add_font): Fix typo.
32 2006-12-06 Kenichi Handa <handa@m17n.org>
34 * Version 1.3.4 released.
36 2006-11-16 Kenichi Handa <handa@m17n.org>
38 * input.c (parse_action_list): Allow (undo 0).
39 (adjust_markers): New function.
40 (preedit_insert, preedit_delete): Call adjust_markers.
41 (preedit_replace): New function.
42 (update_candidate): Call preedit_replace instead of preedit_insert
44 (filter): When ic_info->commit_key_head is nonzero, shift input
45 event keys even if there's no committed text.
47 2006-11-10 Kenichi Handa <handa@m17n.org>
49 * input.h (MInputContextInfo): New member commit_key_head.
51 * input.c (preedit_commit): Update ic_info->commit_key_head.
52 (take_action_list): Reset ic_info->commit_key_head on Mundo.
53 (filter): When committed, shift keys by ic_info->commit_key_head.
55 2006-10-30 Kenichi Handa <handa@m17n.org>
57 * input.c (preedit_delete): Fix typo.
58 (take_action_list): Print more debugging information. Allow
59 variable in arg of 'select' and `pushback'.
61 * database.c (gen_database_name): Don't put extra space.
62 (load_database): Print debugging information.
63 (register_databases_in_files): New arg headlen. Callers changed.
64 (mdatabase__load_for_keys): Shorten debugging information.
65 (mdatabase_load): Don't print debugging information here.
67 2006-10-27 Kenichi Handa <handa@m17n.org>
69 * input.c (marker_code): New arg surrounding. Callers changed.
70 (surrounding_pos): Check if name[0] == '@'.
71 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
72 (take_action_list): Likewise.
73 (get_preceding_char): If POS is zero, always call
76 2006-10-19 Kenichi Handa <handa@m17n.org>
78 * input.c (load_variables): Fix setting of `global'.
80 2006-10-16 Kenichi Handa <handa@m17n.org>
82 * draw.c (draw_background): Be sure to set *to_x.
83 (render_glyph_string): If from == to, just return.
85 2006-10-18 Kenichi Handa <handa@m17n.org>
87 * database.c (get_dir_info): Return NULL if the directory name is
89 (register_databases_in_files): Call register_database with
91 (mdatabase__update): Fix logic. Call register_database with
93 (mdatabase_define): Call register_database with
96 * input.c (delete_surrounding_text): Be sure to set members
97 preceding_text and following_text to NULL.
98 (shift_state): Save variable values in ic_info->vars_saved.
99 (preedit_commit): Don't print debug information here. Don't
100 change ic_info->keys here.
101 (get_candidate_list): Don't ref plist.
102 (take_action_list): Don't unref return value of
103 get_candidate_list. For undo, reset ic->produced and recover
104 ic_info->vars. Be sure to set ic->candidate_list to NULL after
106 (init_ic_info): Set ic_info->vars_saved.
107 (fini_ic_info): Unref ic_info->vars_saved.
108 (re_init_ic): Be sure to set ic->candidate_list to NULL after
110 (filter): Be sure to set members preceding_text and following_text
111 to NULL. Print debug information about produced text. Delete
112 processed keys from ic_info->keys.
114 * input.h (MInputContextInfo): New member vars_saved.
116 2006-10-16 Kenichi Handa <handa@m17n.org>
118 * database.c (mdatabase__update): Fix the way to get db_info.
120 2006-10-02 Kenichi Handa <handa@m17n.org>
122 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
123 `size' changed to 24.
125 * font.c (xlfd_unparse_name): Adjusted for the change of
127 (font_score): Likewise.
128 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
130 * m17n-X.c (MFontX, _MFontX): Deleted.
131 (SET_SIZE, HAVE_SIZE): Deleted.
132 (free_display_info): Adjusted for the change of
133 disp_info->font_list format.
134 (xfont_registry_list): Likewise.
135 (xfont_open): Likewise.
136 (xfont_list): Likewise.
137 (xfont_encode_char): Ignore size to find a realized font.
138 (MRealizedFontXft): Change the order of members to make it
139 compatible with MRealizedFontFT.
141 2006-09-27 Kenichi Handa <handa@m17n.org>
143 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
144 (mfont_close): Add comments.
146 * mtext-lbrk.c (mtext_line_break): Add comment.
148 2006-09-26 Kenichi Handa <handa@m17n.org>
150 * input.c (minput_get_description): Handle description about
151 inclusion-only input methods.
153 2006-09-21 Kenichi Handa <handa@m17n.org>
155 * input.c (M_gettext): New variable.
156 (fully_initialize): Initialize M_gettext.
157 (check_description): New function.
158 (load_commands): Call check_description.
159 (config_all_commands): Be sure to unref pl.
160 (load_variables): Call check_description.
161 (config_all_variables): Be sure to unref pl.
162 (load_im_info): Call check_description.
164 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
166 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
167 and bind_textdomain_codeset.
169 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
171 2006-09-15 Kenichi Handa <handa@m17n.org>
173 * input.c (reload_im_info): Update custom and global info.
174 (init_ic_info): Fix previous change.
176 2006-09-14 Kenichi Handa <handa@m17n.org>
178 * database.c: Include <libgen.h>.
179 (mdatabase__lock): Make a directory if necessary.
181 * input.c (resolve_command): Adjusted for the format change of
182 configured_cmds member.
183 (load_commands, load_variables): Fix for errornous data handling.
184 (config_command, config_variable): New function.
185 (config_all_commands, config_all_variables): Renamed from
186 config_commands and config_variables. Utilize the above function.
187 (check_variable_value): Argument changed. Callers changed.
188 (load_im_info): Call config_all_commands and config_all_variables.
189 (init_ic_info): Adjusted for the format change of configured_vars
191 (minput__init): Initialize Mcustomized, Mconfigured, and
193 (Mcustomized, Mconfigured, Minherited): New variables.
194 (minput_get_command): Be sure to return NULL if an input method
195 use no local command.
196 (minput_get_variable): Be sure to return NULL if an input method
197 use no local variable.
198 (minput_config_command, minput_config_variable)
199 (minput_save_config): Adjusted for the format change of
200 configured_cmds and configured_vars members.
202 * plist.c (write_element): Delete superfluous ':'.
204 2006-09-13 Kenichi Handa <handa@m17n.org>
206 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
207 (minput_config_file): Extern it.
209 * draw.c (Minherited): Declaration moved to input.c.
210 (mdraw__init): Don't initialize Minherited here.
212 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
214 2006-09-07 Kenichi Handa <handa@m17n.org>
216 * textprop.c (mtext_serialize): Call mplist__serialize with the
219 * plist.h (mplist__serialize): Prototype adjusted.
220 (mplist__assq): Extern it.
222 * plist.c: Include <ctype.h>
223 (PUTC, PUTS): New macros.
224 (write_symbol): New function.
225 (write_element): New arg indent.
226 (dump_string, dump_plist_element): Delete them.
227 (mplist__from_string): New arg pretty.
228 (mplist__assq): New function.
229 (mdebug_dump_plist): Use write_element.
231 * mtext.c (mtext_cat_char): Allocate more memory.
232 (mdebug_dump_mtext): Don't escal a newline character.
234 * m17n.h (minput_get_command, minput_get_variable)
235 (minput_config_command, minput_config_variable)
236 (minput_save_config): Extern them.
238 * m17n-core.c: Include <string.h>.
239 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
240 use the stream stdout instead of a file of that name.
242 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
245 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
246 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
247 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
248 (MDEBUG_DUMP): Flush the stream.
250 * input.h (struct _MInputMethodInfo): Delete member im. New
251 members mdb, language, name, extra, cmds, configured_cmds,
252 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
253 (MInputContextInfo): New member tick.
255 * input.c: Big change to improve user-side input method
256 customization. Here, list just public API changes.
257 (minput_get_commands, minput_get_variables)
258 (minput_assign_command_keys, minput_set_variable): Label them
260 (minput_get_command, minput_get_variable)
261 (minput_config_command, minput_config_variable)
262 (minput_save_config): New functions.
264 * database.h (PATH_MAX): Define it if not yet defined.
265 (PATH_SEPARATOR): Likewise.
266 (enum MDatabaseStatus): New enum.
267 (struct MDatabaseInfo): Moved from database.c. New members status,
268 time, lock_file, and uniq_file.
269 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
270 (mdatabase__unlock): Extern them.
272 * database.c: Include <time.h>.
273 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
274 (GEN_PATH): Args changed. Callers changed.
275 (struct MDatabaseInfo): Moved to database.h.
276 (struct MDatabase, mdb_list): Deleted.
277 (mdatabase__list): New var.
278 (get_database_filename): Deleted. Callers changed to use
280 (find_file, get_database_file): New files.
281 (get_dir_info): Initialize new members of MDatabaseInfo.
282 (find_database): Arg chagnded. Callers changed.
283 (free_db_info, register_database, register_databases_in_files):
285 (update_database_list): Deleted.
286 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
287 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
288 (mdatabase__update): New function.
289 (mdatabase__check): Return value changed.
290 (mdatabase__file, mdatabase__lock, mdatabase__save)
291 (mdatabase__unlock): New functions.
293 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
295 * input.c (get_surrounding_text): Return -2 when surrounding text
297 (get_following_char): Likewise.
298 (get_preceding_char): Likewise.
299 (minput__callback): Return 0 if there is a callback function,
302 2006-08-17 Kenichi Handa <handa@m17n.org>
304 * input.c (reset_ic): Use shift_state to setup the current state.
306 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
308 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
309 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
310 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
312 2006-08-02 Kenichi Handa <handa@m17n.org>
314 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
316 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
318 * font-ft.c (ft_encapsulate): Add code for debugging.
319 (mfont__ft_drive_otf): Be sure to encode character before getting
322 2006-07-21 Kenichi Handa <handa@m17n.org>
324 * draw.c (mdraw_text_extents): Fix previous typo.
326 2006-07-19 Kenichi Handa <handa@m17n.org>
328 * draw.c (gstring_width): New arg lbearing.
329 (render_glyph_string): Adjusted for the change of gstring_width.
330 (mdraw_text_extents): Fix lbearing of ink and line metrics.
332 * m17n-core.h (Mlanguage): Extern it.
334 * m17n.h (Mlanguage): Extern deleted.
336 * mtext.c (mtext__init): Initialize Mlanguage.
337 (Mlanguage): Declaration moved from locale.c
339 * locale.c (mlocale__init): Don't initialize Mlanguage here.
340 (Mlanguage): Declaration moved to mtext.c.
342 * language.c (mlang__init): Don't initialize Mlanguage here.
344 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
346 2006-07-14 Kenichi Handa <handa@m17n.org>
348 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
349 (MRealizedFontFT): New member face_encapsulated.
350 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
351 (ft_gen_font): New function.
352 (ft_add_font): Use ft_gen_font.
353 (ft_list_script): Store lists in ft_script_list.
354 (ft_check_otf): New arg ft_face. Caller changed.
355 (ft_check_language): Likewise.
356 (ft_check_script): Likewise.
357 (ft_encapsulate, ft_close): New functions.
358 (mfont__ft_driver): Initialize members encapsulate and close.
359 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
361 * font.h (struct MRealizedFont): New member encapsulating.
362 (struct MFontDriver): New members encapsulate and close.
364 * font.c (mfont__match_p): If FONT is realized, check capability
365 by font drivers's check_capability method.
366 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
369 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
370 declarations of foundry and fam local vars.
371 (xft_driver): Make it static.
373 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
374 (mfont_close): Extern them.
376 * m17n-gd.c (device_open): Don't specify foundry and family of the
379 2006-07-11 Kenichi Handa <handa@m17n.org>
381 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
383 2006-07-13 Kenichi Handa <handa@m17n.org>
385 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
387 (ft_check_script): Delete unused var.
388 (ft_list_capability): Likewise.
390 * font.c (mfont__get_capability): Setup cap->otf.
391 (Motf): Make it global.
392 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
394 * font.h (MFontCapability): New member otf.
396 * language.c (mlang__fini): Delete unused vars.
398 * m17n-gui.h (Motf): Extern it.
400 * database.c (update_database_list): Delete unused vars.
402 2006-07-07 Kenichi Handa <handa@m17n.org>
404 * font-ft.c (DEVICE_DELTA): Fix typo.
406 2006-07-06 Kenichi Handa <handa@m17n.org>
408 * fontset.c (mfont__lookup_fontset): Don't ignore family and
411 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
413 * database.c: Update comments.
415 2006-07-05 Kenichi Handa <handa@m17n.org>
417 * database.c (PATH_MAX): Define it if not yet defined.
418 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
420 (get_database_filename): Use GEN_PATH.
421 (get_dir_info): Don't include the last '/' in directory name.
422 (register_database): New function.
423 (update_database_list): Use register_database. Search all
424 directories in mdatabase__dir_list for wildcard databases.
425 (mdatabase__init): Check "~/.m17n.d".
427 2006-07-03 Kenichi Handa <handa@m17n.org>
429 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
430 push reverse property.
432 * plist.c (dump_plist_element): Fix previous change.
434 2006-06-28 Kenichi Handa <handa@m17n.org>
436 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
439 * draw.c (MbidiNSM): New variable.
440 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
441 attention to bidi type NSM.
442 (mdraw__init): Initialize MbibiNSM.
444 * language.c (mscript__char_list): Fix finding a char-list element.
446 * plist.c (dump_string): Return number of printed characters.
447 (dump_plist_element): Print elements more compactly.
449 2006-06-23 Kenichi Handa <handa@m17n.org>
451 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
452 (include_HEADERS): Likewise.
454 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
456 * language.c: Update documentation.
458 2006-06-23 Kenichi Handa <handa@m17n.org>
460 * font-ft.c (struct MFontFT): Delete member lang.
461 (free_ft_info): Don't unref member lang. Destroy members langset
463 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
464 changed. Set members langset and charset.
465 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
467 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
469 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
470 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
471 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
472 characters at first. If it fails, try listing by language names.
473 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
474 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
475 change of MFontCapability.
476 (ft_list_capability): Likewise. Try listing by languages, then by
477 scripts. Check OTF at last.
478 (ft_check_script): New function.
479 (ft_select): Adjusted for the check of MFontCapability.
480 (ft_list_family_names): New function.
481 (ft_check_capability): If cap->script is not Mnil, call
483 (mfont__ft_driver): Initialize with ft_list_family_names.
485 * font.h (struct MFontDriver): New member list_fmaily_names.
486 (struct): Change member "MSymbol *lang" to "MSymbol language".
488 * font.c: Include "language.h".
489 (Motf): New variable.
490 (otf_script_list, load_otf_script_list): Delete it.
491 (find_script_from_otf_tag): Delete it.
492 (merge_capability): New function.
493 (mfont__init): Init Motf.
494 (mfont__fini): Don't unref otf_script_list.
495 (free_font_capability): Check cap->script_tag to determine if
496 OTF-related capability is set.
497 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
498 the change of type MFontCapability.
499 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
501 (mfont_list): Call merge_capability for LANGUAGE arg.
502 (mfont_list_family_names): New function.
504 * input-gui.c: Typo in comments fixed.
506 * input.c: Typo in comments fixed.
508 * language.h (mlanguage__list): Delete it.
509 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
512 * language.c: Include "mtext.h".
513 (M_script_lang_list): Delete it.
514 (language_list, script_list): New variables.
515 (load_lang_script_list, init_language_list, init_script_list): New
517 (mlang__init): Don't load language database here.
518 (mlang__fini): Unref language_list and script_list if not NULL.
519 (mlanguage__list): Delete it.
520 (mlanguage__info, mscript__info, mscript__char_list)
521 (mscript__otf_tag, mscript__from_otf_tag): New functions.
522 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
523 (mscript_list, mscript_language_list): New functions.
525 * m17n-gui.h (mfont_list_family_names): Extern it.
527 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
528 (mlanguage_text, mscript_list, mscript_language_list): Extern
531 2006-06-21 Kenichi Handa <handa@m17n.org>
533 * m17n-X.c (xfont_driver): Initialize with
534 xfont_list_family_names.
535 (xfont_list_family_names): New function.
536 (xft_driver): Initialize with NULL for list_family_names member.
537 (device_init): Set list_family_names member of xft_driver to that
540 2006-06-06 Kenichi Handa <handa@m17n.org>
542 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
544 2006-03-24 Kenichi Handa <handa@m17n.org>
546 * font-ft.c (ft_open): Improve debug message.
548 * fontset.c (mfontset__get_font): Fix for the case that no font in
549 per_script list is available.
551 2006-02-06 Kenichi Handa <handa@m17n.org>
553 * Version 1.3.3 released.
555 2006-02-22 Kenichi Handa <handa@m17n.org>
557 * textprop.c: Fix some typos in documentation.
559 * plist.c: Fix some typos in documentation.
561 * m17n-core.h: Fix some typos in documentation.
562 (M17NLIB_PATCH_LEVEL): Updated to 3.
563 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
565 * symbol.c: Fix some typos in documentation.
567 * mtext.c: Fix some typos in documentation.
569 * input.c: Fix several typos in documentation.
571 2006-02-06 Kenichi Handa <handa@m17n.org>
573 * Version 1.3.2 released.
575 2006-02-03 Kenichi Handa <handa@m17n.org>
577 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
578 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
580 * font.c (xlfd_parse_name): Fix handling of the name "nil".
582 * draw.c (layout_glyphs): Fix handling left_padding of
585 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
587 2006-02-02 Kenichi Handa <handa@m17n.org>
589 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
592 2006-01-25 Kenichi Handa <handa@m17n.org>
594 * input.c (resolve_expression): If the value of PLIST is a plist,
595 but the first element is not symbol, return 0.
597 2006-01-17 Kenichi Handa <handa@m17n.org>
599 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
600 HAVE_GD is 2 or the greater.
602 2006-01-16 Kenichi Handa <handa@m17n.org>
604 * Version 1.3.1 released.
606 2006-01-16 Kenichi Handa <handa@m17n.org>
608 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
609 simulating anti-aliasing.
611 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
612 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
614 2006-01-12 Kenichi Handa <handa@m17n.org>
616 * input.c (get_surrounding_text): Always pop ic->plist.
617 (reset_ic): Don't reset ic->plist.
619 2006-01-10 Kenichi Handa <handa@m17n.org>
621 * input.c (preedit_commit): For debugging, print only commiting
622 charactes. Don't set ic->candidate_show to 0.
623 (handle_key): Don't run branch-actions just by shifting to the
625 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
626 Reset vars and plist.
628 2006-01-07 Kenichi Handa <handa@m17n.org>
630 * input.c (load_branch): Confirm that maps is not NULL.
632 2006-01-05 Kenichi Handa <handa@m17n.org>
634 * input-gui.c (win_filter): Try to convert arg to key only when
637 * plist.c (read_integer_element): If '#' and '-' are followed by
638 non-integer-constituent, read them as a part of a symbol.
639 (read_symbol_element): New arg C.
640 (read_element): Adjust args to read_symbol_element.
642 * input.c (load_macros): On overwriting a macro, free the old
644 (minput__init): Store Mmap in load_im_info_keys.
645 (minput_get_title_icon): If the input method has no title, be sure
647 (minput_get_description): If the input method has no description,
648 be sure to return NULL.
649 (minput_get_variables): Fix documentation.
650 (handle_key): Pay attention to the case that key is Mnil.
651 (filter): Likewise. Fix handling of such symbol as S-A.
653 2005-12-22 Kenichi Handa <handa@m17n.org>
655 * Version 1.3.0 released.
657 2005-12-22 Kenichi Handa <handa@m17n.org>
659 * font-ft.c (ft_list): If the specified font has no property,
662 2005-12-20 Kenichi Handa <handa@m17n.org>
664 * character.c (mchar_get_prop): Check char_prop_list.
665 (mchar_put_prop, mchar_get_prop_table): Likewise.
667 2005-12-18 Kenichi Handa <handa@m17n.org>
669 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
670 file name sans language.
672 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
674 * input.c: Fix typo in comments.
676 2005-12-14 Kenichi Handa <handa@m17n.org>
678 * input.c (minput_get_title_icon): Check the default icon for the
681 2005-12-13 Kenichi Handa <handa@m17n.org>
683 * input.c (Mless_equal, Mgreater_equal): New variables.
684 (parse_expression, resolve_expression, parse_action_list)
685 (take_action_list): Handle the aboves.
686 (filter): Treat key S-X as X.
687 (minput__init): Initialize Mless_equal and Mgreater_equal.
688 (minput_get_title_icon): New function.
690 * m17n.h (minput_get_title_icon): Extern it.
692 * database.c (get_database_filename): Return a filename instead of
694 (load_database): Adjusted for the above change.
695 (mdatabase__load_for_keys): Likewise.
696 (mdatabase__find_file): New function.
698 * database.h (mdatabase__find_file): Extern it.
700 * font.h (mfont__resize): Delete extern.
702 * font.c (mfont__list): Check resize ratio.
703 (mfont__resize): Delete it.
704 (mfont_resize_ratio): Include the code of mfont__resize.
706 * font-ft.c (ft_open): Check resize ratio.
708 * m17n-X.c (xfont_open): Check resize ratio.
709 (xft_open): Likewise.
711 2005-12-07 Kenichi Handa <handa@m17n.org>
713 * input.c (take_action_list): If take_action_list return -1,
715 (handle_key): Likewise.
717 * face.c (mface__for_chars): When font is specified and layouter
718 is found for it, if the layouter doesn't support one of a
719 character, use a face sans layouter for it.
721 2005-12-06 Kenichi Handa <handa@m17n.org>
723 * fontset.c (mfont__lookup_fontset): If only a fallback font is
724 found, don't use it for more than one character.
726 2005-12-05 Kenichi Handa <handa@m17n.org>
728 * face.c (mface__realize): Set rfont->layouter to Mnil.
729 (mface__for_chars): Fix handling of layouter.
731 * character.h (mchar__define_prop): Extern it.
733 * database.c (update_database_list): Call mchar__define_prop if
736 * character.c (mchar__init): Don't call mchar_define_property.
737 Instead just initialize property keys.
738 (mchar__fini): Free char_prop_list only if it's not NULL.
739 (mchar__define_prop): New function.
740 (mchar_define_property): Call mchar__define_prop.
742 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
745 2005-12-02 Kenichi Handa <handa@m17n.org>
747 * language.c (mlang__init): Handle extra chars.
749 * m17n-gui.h (mfont_check): Adjust prototype.
751 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
752 (xfont_check_capability): New function.
753 (xft_driver): Specify xft_check_capability.
754 (xft_check_capability): New function.
756 * font-ft.c (M0_3): Delete it.
758 (ft_get_charmaps): Refer to M0.
759 (fc_parse_pattern): Fix previous change.
760 (ft_list_language): Check also extra chars.
761 (ft_check_otf): Define it even if HAVE_OTF is undef.
762 (ft_check_lang): Check the result of FcLangSetHasLang against
763 FcLangDifferentLang. Check also extra chars.
764 (ft_list_capability): Delete ifdef HAVE_OTF.
765 (ft_select): Likewise.
766 (ft_open): Improve debug information.
767 (ft_check_capability): New function.
768 (mfont__ft_driver): Specify ft_check_capability.
769 (mfont__ft_init): Initialize M0.
771 * fontset.c (get_font_from_group): New function.
772 (mfontset__get_font): New function.
774 * fontset.h (mfontset__get_font): Extern it.
776 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
777 (mfont__fini): Delete ifdef HAVE_OTF.
778 (free_font_capability): Likewise.
779 (mfont__get_capability): Likewise.
780 (mfont__check_capability): New function.
781 (mfont_check): Change the order of arguments. Use
784 * font.h (struct MFontDriver): New member check_capability.
785 (MFontCapability): Delete ifdef HAVE_OTF.
786 (mfont__check_capability): Extern it.
788 * face.c (mface__realize): Fix handling of FONT arg.
789 (mface__for_chars): Fix handling of explicitly specified font.
791 2005-11-25 Kenichi Handa <handa@m17n.org>
793 * font-flt.c (run_command): Print debug info for
796 * draw.c (layout_glyphs): Fix handling of left/right_padding.
798 * face.c (mface__for_chars): Check rfont before accessing the
801 2005-11-21 Kenichi Handa <handa@m17n.org>
803 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
806 * fontset.c (fontset_table): New variable.
807 (free_fontset): Call M17N_OBJECT_UNREGISTER.
808 (mfont__fontset_init): Add fontset_table as an object array.
809 (mfont__realize_fontset): Ref FONTSET.
810 (mfont__free_realized_fontset): Unref REALIZED->fontset.
811 (mfontset): Call M17N_OBJECT_REGISTER.
812 (mfontset_copy): Likewise.
814 * input.c (handle_key): For debugging, print information about
816 (filter): Add an alias for Meta and Alt modifiers.
817 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
819 (minput__init): Initialize them.
820 (parse_expression): New function.
821 (resolve_expression): New function.
822 (parse_action_list): Handle expressions by parse_expression.
823 (take_action_list): Handle expressions by resolve_expression.
824 (parse_nested_list_value): Fix previous change.
825 (resolve_command): Fix handling of the return value of
828 2005-11-18 Kenichi Handa <handa@m17n.org>
830 * font-ft.c (ft_check_otf, otf_script_list): Define only when
832 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
834 (ft_select): Likewise.
836 * font.c (mfont_list): Fix for the case that FONT is NULL.
837 (OTF_tag): Delete it.
838 (load_otf_script_list): Define only when HAVE_OTF is defined.
839 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
842 * draw.c (truncate_gstring): Be sure to truncate at
843 glapheme-cluster boundary.
845 2005-11-11 Kenichi Handa <handa@m17n.org>
847 * input.c (delete_surrounding_text): Clear cache if necessary.
849 2005-11-09 Kenichi Handa <handa@m17n.org>
851 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
852 glyph prev is also supported by the current flt.
854 2005-11-08 Kenichi Handa <handa@m17n.org>
856 * m17n-X.c (xft_render): Cancel previous change.
858 2005-11-07 Kenichi Handa <handa@m17n.org>
860 * input.c: Include <stdlib.h>.
861 (get_surrounding_text, delete_surrounding_text)
862 (get_preceding_char, get_following_char): New functions.
863 (integer_value): New arg surrounding. If it is nonzero, try to
864 get a surrounding character. Callers changed.
865 (take_action_list): Check `value' before setting an element.
866 (destroy_ic): Unref ic_info->preceding_text and
867 ic_info->following_text.
868 (minput__init): Initialize Minput_get_surrounding_text and
869 Minput_delete_surrounding_text.
870 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
872 (filter): Unref ic_info->preceding_text and
873 ic_info->following_text.
875 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
878 * input.h (MInputContextInfo): New members preceding_text and
881 2005-11-04 Kenichi Handa <handa@m17n.org>
883 * input.c (parse_nested_list_value): Fix handling of the global
885 (get_nested_list): Get global definitions by load_partial_im_info.
886 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
887 MInputCandidatesChanged.
888 (take_action_list): Likewise.
889 (reset_ic): Likewise.
890 (create_ic): Don't pay special attention to
891 Mcandidates_group_size.
892 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
893 (minput_set_variable): Get a definition of varible by
894 mplist_find_by_value, not mplist_get.
896 * m17n.h (enum MInputCandidatesChanged): New enum.
898 2005-11-01 Kenichi Handa <handa@m17n.org>
900 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
902 (mwin__destroy_window): If xft_draw's drawable is win, change it
903 to device->drawable before destroying win.
905 2005-10-31 Kenichi Handa <handa@m17n.org>
907 * input.c (load_im_info): Fix adding of state.
909 * m17n-core.c (m17n_fini_core): Fix reporting of module
912 * m17n.c (m17n_fini): Fix reporting of module finalization.
914 * m17n-gui.c (m17n_init_win): Fix reporting of module
917 2005-10-29 Kenichi Handa <handa@m17n.org>
919 * input.c (get_candidate_list): Fix the timing of referring plist.
921 2005-10-28 Kenichi Handa <handa@m17n.org>
923 * input.c (load_branch): Ignore an undefined map name.
924 (load_im_info): Set im_info->title from `name' only if it's not
926 (shift_state): Always update ic->status.
927 (adjust_candidates): Renamed from adjust_candidate_command.
928 Argument changed. Caller changed.
929 (get_candidate_list, regularize_action): New functions.
930 (take_action_list): Use them. On handling Munhandle, don't set
932 (handle_key): If KEY is not handled by MAP, and MAP has
933 branch_actions, perform them.
935 * database.c (mdatabase__fini): Free dir_info->filename;
937 2005-10-20 Kenichi Handa <handa@m17n.org>
939 * input.c (marker_code): Accept '@@'.
940 (integer_value): Handle '@@'.
941 (parse_action_list): Accept a symbol argument.
942 (take_action_list): Resolve the symbol argument. Handle the
945 2005-10-18 Kenichi Handa <handa@m17n.org>
947 * input.c: Include "charset.h".
948 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
950 (MIMState): New member (M17NObject control).
951 (lookup_nested_list, set_nested_list, parse_nested_list_value)
952 (get_nested_list, resolve_variable): New functions.
953 (integer_value): New arg (MPlist **value). Set it to the plist
954 element containing the value.
955 (resolve_command): New function.
956 (load_translation): New arg (MPlist *map_actions).
957 (load_branch): New args language and name. If `keylist' is a
958 symbol, resolved that as a command name.
959 (free_map): New arg top. Free map->map_actions only if top is
961 (free_state): New function.
962 (load_state): New arg name.
963 (im_info_list): New variable.
964 (free_im_info, get_im_info_by_tags): New functions.
965 (load_im_info): Arg key changed to plist. Handle `include'.
966 Return (MInputMethodInfo *).
967 (preedit_commit): Ref ic->candidate_list.
968 (get_select_charset, adjust_candidate_command): New functions.
969 (take_action_list): Handle `include'. Adjust candidate action
970 properly. Handle control variables `candidates-charset' and
971 `candidates-group-size'.
972 (open_im): Use get_im_info.
973 (create_ic): Get global variables.
974 (load_partial_im_info): New function.
975 (get_im_info): New function.
976 (check_command_keyseq, check_command_list, check_variable_list):
978 (minput__init): Don't handle M_database_hook and Mdetail_text.
979 Initialize M_candidates, Mcandidates_group_size,
981 (parse_variable_list, get_variable_list, parse_command_list)
982 (get_command_list): Delete them.
983 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
984 (minput__fini): Simply unref command_list and variable_list.
985 (minput_get_description): Adjusted for the new form of description.
986 (minput_get_commands): Use get_nested_list.
987 (minput_assign_command_keys): Likewise.
988 (minput_get_variables, minput_set_variable): Likewise.
990 * input.h (MInputMethodInfo): New members im and maps.
992 * database.h (M_database_hook): Delete extern.
993 (MDatabaseHookFunc): Delete extern.
994 (mdatabase__check): Extern it.
996 * database.c: Include <glob.h>.
997 (MAX_TIME): New macro.
998 (Masterisk): New variable.
999 (get_database_stream): Argument changed to (MDatabaseInfo *).
1001 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1002 (find_database): New function.
1003 (update_database_list): New function.
1004 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1005 calling update_database_list.
1006 (mdatabase__check): New function.
1007 (mdatabase_find): Use update_database and find_database. Don't
1008 handle MDatabaseHookFunc.
1009 (mdatabase_list): Call update_database at first.
1010 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1011 (MDatabaseList): New type.
1013 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1015 * m17n.h (Mdetail_text): Delete extern.
1017 * m17n-core.h (mplist_conc): Delete extern.
1019 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1021 (mplist_conc): Renamed to mplist__conc.
1022 (mplist__pop_unref): New function.
1024 2005-10-14 Kenichi Handa <handa@m17n.org>
1026 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1028 (read_element): If keys is an empty plist, return any element
1030 (dump_plist_element): Check if plist is nested.
1031 (mplist_conc): Always ref tail.
1032 (mplist_set): If key is a managing key, ref val in advance.
1034 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1035 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1036 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1039 * fontset.c (free_fontset): Unref fontset_list if necessary.
1040 (mfont__fontset_fini): Don't free fontset_list. Unref
1042 (mfont__realize_fontset): Initialize request.
1043 (mfontset): Ref default_fontset or fontset only if necessary.
1044 (mfontset_copy): Don't ref copy.
1046 * draw.c (render_glyphs): Check gend->type before checking
1049 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1050 unrefed plists to NULL.
1052 2005-10-04 Kenichi Handa <handa@m17n.org>
1054 * textprop.c (mtext_serialize): Be sure to make mt
1055 MTEXT_FORMAT_UTF_8 and NULL terminated.
1057 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1059 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1061 2005-10-03 Kenichi Handa <handa@m17n.org>
1063 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1064 is not at the beginning of line.
1066 2005-09-22 Kenichi Handa <handa@m17n.org>
1068 * input.c: Include <sys/stat.h> and <unistd.h>.
1069 (Minclude, Mcommit, Munhandle): New variables.
1070 (minput__init): Initialize them. Push only Mstate to
1071 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1072 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1074 (load_input_method): Handle "include" directive. If no states are
1076 (shift_state): If state_name is Mt, shift back to the previous
1077 state. Call preedit_commit to commit preedit text.
1078 (preedit_commit): New function.
1079 (take_action_list): Improve debug printing. Handle commit and
1081 (handle_key): Check the return value of take_action_list. Don't
1082 take branch_actions just after changing to the root map.
1083 (reset_ic): Reset all ic_info members.
1084 (filter): When a key is not handled, just move ic_info->keys
1085 instead fo calling reset_ic.
1086 (load_im_info): If key is not Mstate, push Mmap to
1088 (MDatabaseStatList): New type.
1089 (imdir_stat_list): New variable.
1090 (input_method_hook): Don't cancel the hook. Check the
1091 modification time of directories.
1092 (minput__fini): Free imdir_stat_list;
1094 * input.h (MInputContextInfo): New member prev_state.
1096 * m17n-core.h (mplist_conc): Extern it.
1098 * plist.c (mplist_conc): New function.
1100 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1102 * font.h (MRealizedFont): New member average_width.
1104 * font-ft.c (ft_open): Set rface->average_width.
1106 * font.c (xlfd_unparse_name): Print '*' before registry name.
1108 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1109 (xfont_open): Set rfont->average_width.
1110 (xft_open): Likewise.
1111 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1113 * internal-gui.h (struct MFrame): New member average_width.
1115 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1116 (mframe_get_prop): Return the average_width of a font.
1118 * face.c (mface__realize): Set rface->average_width.
1119 (mface__update_frame_face): Set frame->average_width.
1121 * face.h (MRealizedFace): New member average_width.
1123 2005-09-19 Kenichi Handa <handa@m17n.org>
1125 * font.c (xlfd_unparse_name): New arg full_xlfd.
1126 (mfont__encode_char): Use shortcut only for X core fonts.
1127 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1128 (mfont_put_prop): Handle `language' property.
1129 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1130 Print file can capability info too.
1132 * m17n-core.c (mdebug__output): New variable.
1133 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1134 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1135 (m17n_fini_core): Close mdebug__output if it's not stderr.
1137 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1138 (xfont_open): Handle baseline_offset.
1139 (xfont_find_metric): Likewise.
1140 (xfont_render): Likewise.
1141 (xft_open): Likewise.
1142 (xft_render): Likewise.
1144 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1145 (mdebug__output): Extern it.
1146 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1147 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1148 (MDEBUG_DUMP): New macro.
1149 (MDEBUG_PRINT_TIME): Print to medebug__output.
1151 * font.h (MRealizedFont): New member baseline_offset.
1153 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1155 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1156 (ft_list_family): Check alias.
1157 (ft_list_language): If language is "en", don't try to the second
1159 (ft_default_list): New variable.
1160 (ft_list_default): New function.
1161 (ft_select): If family is not specified, try only the default
1162 fonts. Treat the weights normal and medium same.
1163 (ft_open): Fix debug message. If registry is not specified, try
1164 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1165 (ft_find_metric): Likewise.
1166 (ft_render): Likewise.
1167 (ft_list): Fix debug message. Accept the registring iso8859-1.
1168 If family is not specified, try only the default fonts.
1170 * face.c (mface__realize): Fix logic of opening a font.
1172 2005-09-16 Kenichi Handa <handa@m17n.org>
1174 * face.c (mface__realize):
1176 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1179 * input.c (shift_state): Fix the condition of taking init actions.
1180 (take_action_list): Fix handling of pushback action.
1181 (handle_key): Don't change key while checking its alias.
1182 (minput__init): Initialize new variables.
1183 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1186 2005-09-12 Kenichi Handa <handa@m17n.org>
1188 * mtext.c (mtext__uppercase): Add proper open/close parens.
1189 (mtext_titlecase): Add proper casting.
1191 * input.c (parse_action_list): Handle the case that the arg is a
1192 key sequence (MText or MPlist).
1193 (take_action_list): Likewise.
1194 (shift_state): Shorter debug message.
1195 (handle_key): Terminate a debug message by "\n".
1196 (reset_ic): Don't take initial actions here.
1197 (minput_open_im): Print a debug message.
1198 (minput_close_im): Likewise.
1199 (minput_create_ic): Likewise.
1200 (minput_destroy_ic): Likewise.
1202 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1204 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1207 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1208 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1211 * character.c: Add Japanese documentation for
1212 mchar_get_prop_table ().
1214 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1216 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1217 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1218 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1220 (init_case_conversion): New function.
1221 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1222 (uppercase_precheck, lowercase_precheck, final_sigma)
1223 (after_soft_dotted, more_above, before_dot, after_i)
1224 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1226 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1228 * plist.c (read_mtext_element): Fix previous change.
1230 2005-09-05 Kenichi Handa <handa@m17n.org>
1232 * plist.c (read_mtext_element): Handle \uXXXX notation.
1234 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1235 (MTABLE_ALLOCA): Change the name of local variable.
1237 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1238 HAVE_FREETYPE are defined.
1240 * m17n-X.c: Check HAVE_X11.
1242 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1243 directory listing libraries.
1244 (noinst_PROGRAMS): Define it only in maintainer mode.
1246 2005-09-02 Kenichi Handa <handa@m17n.org>
1248 * m17n-gui.h (mdraw_line_break_option): Extern it.
1250 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1251 end of the first glyph.
1252 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1254 (mdraw_line_break_option): New variable.
1255 (mdraw_default_line_break): Use mtext_line_break.
1257 * mtext.h (wordseg_func_table): Don't extern it.
1258 (mtext__wseg_fini): Extern it.
1260 * mtext.c: Don't include word-thai.h.
1261 (wordseg_func_table): Delete this variable.
1262 (mtext__init): Don't initialize above. Don't call
1263 mtext__word_thai_init.
1264 (mtext__fini): Don't free wordseg_func_table. Call
1265 mtext__wseg_fini instead fo mtext__word_thai_fini.
1266 (MTextWordsegFunc): Don't typedef it.
1267 (mtext__word_segment): Moved to mtext-wseg.c.
1269 * m17n-core.h (enum MTextLineBreakOption): New enum.
1270 (mtext_line_break): Extern it.
1272 * mtext-wseg.c: New file.
1274 * mtext-lbrk.c: New file.
1276 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1277 add mtext-lbrk.c and mtext-wseg.c.
1279 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1280 the case that head is NULL.
1282 2005-09-01 Kenichi Handa <handa@m17n.org>
1284 * word-thai.c (wordseg_propertize): If the property value is nil,
1285 don't make the property no-merge.
1286 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1287 attention to the case that they are NULL.
1288 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1291 * character.c (mchar_get_prop_table): New function.
1293 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1295 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1296 (mchar_get_prop_table): Extern it.
1298 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1299 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1301 * internal.h (enum MTextCoverage): New enum.
1302 (MText): New member coverage.
1304 * mtext.c (FORMAT_COVERAGE): New macro.
1305 (insert): Copy mt2->coverage.
1306 (mtext__from_data): Initialize mt->coverage.
1307 (mtext__adjust_format): Update mt->coverage.
1308 (mtext): Initialize mt->coverage.
1309 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1310 Update mt->coverage if necessary.
1311 (mtext_duplicate): Copy mt->coverage.
1312 (mtext_insert, mtext_replace): New functions.
1313 (mtext_dup): Use mtext_duplicate.
1314 (mtext__word_segment): Don't set *from and *to if a word
1315 segmentation funcion is not found.
1316 (mtext_ins_char): Fix typo.
1318 2005-08-25 Kenichi Handa <handa@m17n.org>
1320 * font.h (MFont): New member for_full_width.
1322 * font.c (compare_font_score): Prefer a font of not
1325 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1326 registry charset of a font is one of CJK charsets.
1328 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1329 supports some of CJK.
1331 2005-08-24 Kenichi Handa <handa@m17n.org>
1333 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1335 * m17n-gui.c (null_device_open): Check Mresolution param and set
1338 * m17n-gd.c (device_open): Check Mresolution param and set
1341 * m17n-X.c (MWDevice): New member resy.
1342 (xfont_open): Set ascent, descent, and max_advance members of
1344 (xft_open): Likewise.
1345 (device_open): Compare also screen_num to find a device. Set
1346 device->resy and frame->dpi.
1348 * internal-gui.h (MFrame): New member dpi.
1350 * font.h (MRealizedFont): New member max_advance.
1352 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1353 (mfont__init): Don't initialize Mascent, Mdescent.
1354 (Mascent, Mdescent): Delete these variables.
1355 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1356 Mfont_descent instead of Mascent and Mdescent.
1357 (mfont_put_prop): Allow negative size.
1358 (mfont_find): Handle the case of spec->size < 0. Fix previous
1360 (mfont_list): Handle the case of spec->size < 0.
1361 (mfont_check): Likewise.
1363 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1364 (fc_get_pattern): Handle the case of font->size < 0.
1365 (ft_open): Set ascent, descent, and max_advance members of rfont.
1366 (ft_find_metric): Improve rounding.
1367 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1370 * face.c (mface__realize): Handle the case of font->size < 0.
1372 2005-08-22 Kenichi Handa <handa@m17n.org>
1374 * coding.c (MConverterStatus): Change the member buf to union.
1375 (mconv_buffer_converter): Add const to the arg buf.
1376 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1377 (mconv_decode): Adjusted for the change of MConverterStatus.
1378 (mconv_encode_range): Likewise.
1380 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1381 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1383 2005-08-20 Kenichi Handa <handa@m17n.org>
1385 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1386 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1388 * m17n-X.c (xfont_open): Set members ascent, descent, and
1389 max_advance of rfont.
1390 (xft_open): Likewise.
1392 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1394 (mfont__ft_parse_name): Add const to the arg name.
1396 * font.c (xlfd_parse_name): Add const to the arg name. Call
1397 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1398 (xlfd_unparse_name): Handle spacing.
1399 (mfont__init): Initialize new variables.
1400 (mfont__id): Handle spacing.
1401 (mfont__merge): Likewise.
1402 (mfont__set_spec): This function deleted.
1403 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1404 condition of calling mfont__ft_parse_name.
1405 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1406 (mfont_get_prop): Handle properties spacing, ascent, descent,
1408 (mfont_find): Return a realized font.
1409 (mfont_from_name): Add const to the arg name.
1411 * font.h (enum MFontProperty): New member MFONT_SPACING.
1412 (enum MFontSpacing): New enum.
1413 (MFont): New members spacing and max_advance.
1414 (mfont__ft_parse_name): Prototype adjusted.
1415 (mfont__set_spec): Extern deleted.
1416 (mfont__parse_name_into_font): Prototype adjusted.
1418 2005-08-19 Kenichi Handa <handa@m17n.org>
1420 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1422 * font.c (mfont_list): If FONT is null, use a temporary font.
1423 (mfont_parse_name): Add const to the arg name.
1425 2005-08-18 Kenichi Handa <handa@m17n.org>
1427 * word-thai.c: Surround code by #ifdef and #endif to escape from
1430 * font-ft.c: Mostly re-written.
1432 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1433 (FontLayoutCmd): Type of the member otf changed..
1434 (load_otf_command): Adjusted for the format change of otf command.
1435 (load_command): Likewise.
1436 (free_flt_command): Unref cmd->body.otf.
1437 (run_otf): Ajusted for the type change of otf_cmd.
1438 (run_command): Ajusted for the type change of otf_cmd. On
1439 debugging, print ctx->combining_code.
1440 (mfont__flt_run): Initialize ctx's members code_offset,
1441 combining_code, and left_padding to 0.
1443 * face.h (struct MRealizedFace): New member font.
1444 (mface__realize): Prototype adjusted.
1446 * face.c (find_realized_face): New arg font.
1447 (find_realized_face): Adjusted for the change of MFont.
1448 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1449 (mface__fini): Don't call mdebug__report_object.
1450 (mface__realize): New arg font.
1451 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1452 Optimize the latin case.
1453 (mface__free_realized): Free rface->font.
1454 (mface__update_frame_face): Adjusted for the change of mface__realize.
1455 (mface_equal): New function.
1457 * draw.c (Mcommon): New variable.
1458 (visual_order): Args to mfont__encode_char changed.
1459 (compose_glyph_string): Handle Mfont text property.
1460 (layout_glyphs): Adjusted for the change of MFont.
1461 (mdraw__init): Initialize Mcommon.
1462 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1464 * font.h (enum MFontType): Members completely changed.
1465 (enum MFontProperty): Move MFONT_SIZE to the tail.
1466 (enum MFontSource): New enum.
1467 (struct MFont): New members type, source, sizes, file, capability,
1469 (struct MRealizedFont): Type of member font changed. Members
1470 score, status, and encoding deleted.
1471 (MFontScore): New type.
1472 (MFontList): Member changed.
1473 (struct MFontDriver): New member has_char. Types of members
1475 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1476 (Mapple_roman): Extern them.
1477 (OTF_Tag): Typedefed if not HAVE_OTF.
1478 (enum MFontOpenTypeTable): New enum.
1479 (MFontCapability): New type.
1480 (mfont__ft_drive_otf): Prototype adjusted.
1481 (mfont__score): Extern deleted.
1482 (mfont__merge): Extern it.
1483 (mfont__has_char): Extern it.
1484 (mfont__encode_char): Prototype adjusted.
1485 (mfont__open): Extern it.
1486 (mfont__set_spec): Prototype adjusted.
1487 (mfont__get_capability): Extern it.
1489 * font.c: Include "fontset.h".
1490 (M_font_capability, M_font_list, M_font_list_len): New variables.
1491 (font_score_priority): Change order of initial elements.
1492 (font_score_shift_bits): Fix array size.
1493 (common_weight): Add "thin", "semibold", and "heavy".
1494 (common_stretch): Add "ultracondensed", "extracondensed",
1495 "extraexpanded", and "utltraexpand".
1496 (font_weight_regular, font_weight_normal, font_weight_medium): New
1498 (gen_font_name): This function deleted.
1499 (find_encoding): Set font->encoding.
1500 (OTF_tag): New function.
1501 (otf_script_list): New variable.
1502 (load_otf_script_list): New function.
1503 (find_script_from_otf_tag): New function.
1504 (xlfd_parse_name): Set font->type and font->source.
1505 (mfont__free_realized): Free chains rfonts.
1506 (font_score): Renamed from mfont__score.
1507 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1508 (Mapple_roman): New variables.
1509 (mfont__init): Initilize new variables. Initalize
1510 default_encoding.encoding_name and
1511 default_encoding.encoding_charset to Municode_full and
1512 mcharset__unicode. Use SAFE* macros for allocating filepath
1514 (mfont__fini): Free otf_script_list.
1515 (mfont__id): New function.
1516 (mfont__match_p): Check also capability member of MFont.
1517 (mfont__merge): New funciton.
1518 (mfont__set_spec_from_face): Set type and source members.
1519 (mfont__set_spec_from_plist): Set capability and type members.
1520 (mfont__select): Argument changed.
1521 (mfont__available): New function.
1522 (compare_font_score): New function.
1523 (mfont__list): New function.
1524 (mfont__open): Return a realized font.
1525 (mfont__resize): Adjusted for the change of MFont.
1526 (mfont__has_char): New function.
1527 (mfont__encode_char): Argument changed.
1528 (mfont__set_spec): Argument changed.
1529 (free_font_capability): New function.
1530 (mfont__get_capability): New function.
1531 (MFontfile): New variable.
1532 (mfont_get_prop): Adjusted for the change of MFont.
1533 (mfont_put_prop): Likewise.
1534 (mfont_set_selection_priority): Fix the way of setting
1535 font_score_priority[].
1536 (mfont_find): Use mfont__list instead of mfont__select.
1537 (mfont_resize_ratio): Adjusted for the change of MFont.
1538 (mfont_list): Use mfont__list.
1539 (mfont_check): New function.
1540 (font_score): Make it static.
1542 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1543 (mfont__lookup_fontset): Likewise.
1545 * fontset.c (struct MFontset): Delete member font_spec_list.
1546 (struct MRealizedFontset): Type of member spec changed. New
1548 (load_font_group): Arg spec_list deleted.
1549 (load_fontset_contents): Adjusted for the change of fontset_def.
1550 (free_fontset): Fix the way of freeing fontset elements.
1551 (realize_fontset_elements): Argument changed.
1552 (get_per_script): New function.
1553 (free_realized_fontset_elements): Fix the way of feeing rfontset
1555 (update_fontset_elements): Fix args to realize_fontset_elements.
1556 (mfont__realize_fontset): New arg spec.
1557 (try_font_list): New function.
1558 (try_font_group): New arg request. Use try_font_list.
1559 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1561 (mfontset): Adjusted for the change of MFontset.
1562 (mfontset_copy): Likewise. Don't share plists.
1563 (mfontset_modify_entry): Adjusted for the change of MFontset.
1564 (mfontset_lookup): Call get_per_script.
1565 (mdebug_dump_fontset): Print also the address of fonts.
1567 * input.c (shift_state): Don't reset ic_info->vars.
1568 (take_action_list): Call MDEBUG_PRINT fore calling
1571 * internal-gui.h (MFontDriver): Don't typedef it here.
1573 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1574 (MXFont): This type deleted.
1576 (struct _MFontX): New struct.
1577 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1578 (MDisplayInfo): Member base_font_list deleted.
1579 (DEFAULT_FONT): Definition changed.
1580 (FALLBACK_FONT): This maclr deleted.
1581 (free_display_info): Adjusted for the change of MDisplayInfo.
1582 (free_device): Argument to mfont__free_realized changed.
1583 (xfont_driver): Adjusted for the change of MFontDriver.
1584 (xfont_registry_list): Use MFontX instead of MXFont.
1585 (MRealizedFontX): Renamed from MXFontInfo.
1586 (xfont_select): Return the font found first.
1587 (close_xfont): Change MXFontInfo to MRealizedFontX.
1588 (xfont_open): Return the realized font.
1589 (xfont_find_metric): Get xfont from rfont->fontp.
1590 (xfont_has_char): New function.
1591 (xfont_encode_char): Adjusted for the argument change.
1592 (xfont_render): Get xfont from rfont->fontp.
1593 (xfont_list): Adjusted for the argument change.
1594 (MRealizedFontXft): Renamed from MXftFontInfo.
1595 (xft_driver): Ajusted for the change of MFontDriver.
1596 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1597 (xft_open_font): Argument changed.
1598 (xft_open): Argument changed. Return the realized font.
1599 (xft_find_metric): Get xft_font from rfont->fontp.
1600 (xft_has_char, xft_encode_char): New functions.
1601 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1602 font if not yet opened.
1603 (device_open): Don't set frame->font.
1605 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1607 (gd_font_open): New function.
1608 (gd_render): Don't use the local variable ft_info.
1609 (device_init): Adjusted for the change of gd_font_driver.
1611 * textprop.c (mtext__prop_init): Initialize text_property_table.
1612 Call M17N_OBJECT_ADD_ARRAY.
1613 (mtext__prop_fini): Don't call mdebug__report_object.
1615 * plist.c (mplist__init): Initialize plist_table.
1616 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1617 (mplist__fini): Don't call mdebug__report_object.
1619 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1620 (mtext__fini): Don't call mdebug__report_object.
1621 (MTEXT_FORMAT_UTF_16): Correct type.
1622 (mtext_data): New function.
1623 (mtext_text): Fix calculation of limit and args to
1626 * language.c: Include "plist.h".
1627 (M_script_lang_list): New variable.
1628 (mlang__init): Read languages and their information from m17n
1630 (mlanguage__list): New function.
1631 (Miso639_1, Miso639_2): New variables.
1633 * language.h (mlanguage__list): Extern it.
1635 * database.c (get_database_stream): Use SAFE_* macros for
1636 allocating and freeing path.
1637 (mdatabase__init): Likewise.
1639 * symbol.c (msymbol__fini): Don't free symbols here.
1640 (msymbol__free_table): New function.
1641 (msymbol_is_managing_key): New function.
1643 * symbol.h (msymbol__free_table): Extern it.
1644 (msymbol__list): Extern it.
1646 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1648 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1649 (struct _M17NObjectArray): New member name and next.
1650 (mdebug__add_object_array): Extern it.
1651 (M17N_OBJECT_ADD_ARRAY): New macro.
1652 (mdebug__report_object): Don't extern it.
1654 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1656 * m17n-gui.c (free_frame): Don't free frame->font.
1657 (null_device_fini): Fix code for freeing
1658 null_device.realized_font_list.
1659 (m17n_fini_win): Free interface.
1660 (mframe): Cast the return value of dlsym. Set frame->font here.
1661 (mframe_get_prop): Check frame->rface->rfont before accessing the
1664 * m17n-gui.h (Mfontfile): Extern it.
1665 (mfont_check): Extern it.
1666 (mface_equal): Extern it.
1668 * m17n-core.c: Include "symbol.h".
1669 (report_header_printed): This variable deleted.
1670 (object_array_root): New variable.
1671 (report_object_array): New function.
1672 (mdebug__report_object): This function deleted.
1673 (mdebug__add_object_array): New function.
1674 (m17n_init_core): Call mchartable_init () before mtext_init ().
1675 (m17n_fini_core): Call report_object_array (if necessary) and
1676 msymbol__free_atable at the end.
1678 * m17n-core.h (msymbol_is_managing_key): Extern it.
1679 (mtext_data): Extern it.
1680 (MTEXT_FORMAT_UTF_16): Correct type.
1681 (M17NLIB_MINOR_VERSION): Changed to 3.
1682 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1684 * chartab.c (mchartable__init): Initalize chartable_table.count.
1685 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1686 mdebug__report_object.
1688 2005-05-26 Kenichi Handa <handa@m17n.org>
1690 * m17n.h (Miso639_1, Miso639_2): Extern them.
1692 * symbol.h (msymbol__list): Extern it.
1694 * symbol.c (msymbol__list): New function.
1696 2005-05-19 Kenichi Handa <handa@m17n.org>
1698 * input-gui.c (minput__win_init): Don't change the value of
1701 2005-05-16 Kenichi Handa <handa@m17n.org>
1703 * m17n-core.c (m17n_object): Be sure to initialize all members.
1705 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1707 2005-05-09 Kenichi Handa <handa@m17n.org>
1709 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1711 2005-04-27 Kenichi Handa <handa@m17n.org>
1713 * language.c (mlang__init): Add "an" (Aragonese).
1715 * word-thai.c: Add support for libthai.
1716 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1717 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1719 * mtext.c: Include "word-thai.h" conditionaly.
1720 (mtext__init): Call mtext__word_thai_init conditionaly.
1721 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1723 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1724 not WORDCUT_LD_FLAGS.
1726 2005-04-19 Kenichi Handa <handa@m17n.org>
1728 * word-thai.c (wordseg_propertize): Always unref the attached
1730 (thai_wordseg): Don't unref the property.
1732 2005-04-18 Kenichi Handa <handa@m17n.org>
1734 * word-thai.c: Include stdlib.h.
1735 (wordseg_propertize): Add dummy function for the case that wordcut
1736 library doesn't exist.
1737 (wordseg_propertize): Fix for old wordcut library.
1739 2005-04-16 Kenichi Handa <handa@m17n.org>
1741 * word-thai.c: Include <stdio.h>.
1743 2005-04-15 Kenichi Handa <handa@m17n.org>
1745 * draw.c: Include mtext.h.
1746 (linebreak_table, M_break_at_space, M_break_at_word)
1747 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1748 (compose_glyph_string): Check POS before getting Mface text
1750 (truncate_gstring): Give correct TO arg to line_break function.
1751 (GET_LB_TYPE): New macro.
1752 (find_break_backward, find_break_forward): New functions.
1753 (mdraw__init): Initialize the above new variables.
1754 (mdraw__fini): Free linebreak_table.
1755 (mdraw_default_line_break): Use find_break_backward and
1758 * word-thai.c: New file.
1760 * word-thai.h: New file.
1762 * mtext.c: Include word-thai.h.
1763 (wordseg_func_table): New variable.
1764 (mtext__init): Initialize wordseg_func_table and call
1765 mtext__word_thai_init.
1766 (mtext__fini): Call mtext__word_thai_fini, free
1768 (MTextWordsegFunc): New type.
1769 (mtext__word_segment): New function.
1771 * mtext.h (wordseg_func_table): Extern it.
1772 (mtext__word_segment): Extern it.
1774 * m17n.c (m17n_init): Fix typo (== -> =).
1776 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1777 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1779 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1780 (MTEXTPROP_VAL): New macros.
1782 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1784 2005-04-07 Kenichi Handa <handa@m17n.org>
1786 * database.c (load_chartable): Fix pursing of symbol name.
1788 2005-03-24 Kenichi Handa <handa@m17n.org>
1790 * m17n.c (m17n_init): Fix typo (== -> =).
1792 2005-03-11 Kenichi Handa <handa@m17n.org>
1794 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1796 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1798 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1801 2005-03-09 handa <handa@m17n.org>
1803 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1804 calling m17n_init ().
1806 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1807 calling m17n_init_core ().
1809 2005-02-28 Kenichi Handa <handa@m17n.org>
1811 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1814 2005-02-17 Kenichi Handa <handa@m17n.org>
1816 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1817 (M_description, M_command, M_variable): New variables.
1818 (load_im_info_keys): New variables.
1819 (load_im_info, check_command_keyseq, get_description_advance)
1820 (parse_command_list, get_command_list, parse_variable_list)
1821 (get_variable_list, input_method_hook): New functions.
1822 (command_list, variable_list): New variables.
1823 (minput__init): Put input_method_hook to Minput_method.
1824 Initialize M_description, M_command, M_variable, Mdetail_text,
1825 load_im_info_keys, command_list, variable_list.
1826 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1827 (Mdetail_text): New variable.
1828 (minput_get_description, minput_get_commands)
1829 (minput_assign_command_keys, minput_get_variables)
1830 (minput_set_variable): New functions.
1832 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1833 (minput_assign_command_keys, minput_get_variables)
1834 (minput_set_variable): Extern them.
1836 * plist.c (UNGETC): Just decrement st->p.
1837 (read_mtext_element): New arg skip.
1838 (read_integer_element): Likewise.
1839 (read_symbol_element): Likewise.
1840 (read_element): New arg KEYS.
1841 (mplist__from_plist): Don't increment ref-count of NULL object.
1842 (mplist__from_file): New arg KEYS.
1843 (mplist_put): Don't increment ref-count of NULL object.
1844 (mplist_add): Likewise.
1845 (mplist_push): Likewise.
1846 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1848 * plist.h (mplist__from_file): Prototype adjusted.
1850 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1851 (get_database_stream): New function.
1852 (load_database): Use get_database_stream.
1853 (M_database_hook): New variable
1854 (mdatabase__init): Initialize M_database_hook.
1855 (mdatabase__load_for_keys): New function.
1856 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1858 (mdatabase_define): Free mdb->extra_info if necessary.
1860 * database.h (mdatabase__dir_list, M_database_hook)
1861 (mdatabase__load_for_keys): Extern them.
1862 (MDatabaseHookFunc): New type.
1864 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1866 2004-12-27 Kenichi Handa <handa@m17n.org>
1868 * Version 1.2.0 released.
1870 2004-12-27 Kenichi Handa <handa@m17n.org>
1872 * input.c (minput_filter): Don't reset ic->xxx_changed.
1874 * mtext.c (mtext_from_data): Fix documentation.
1876 2004-12-25 Kenichi Handa <handa@m17n.org>
1878 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1879 (M17NLIB_VERSION_NAME): Update to "1.2.".
1881 2004-12-24 Kenichi Handa <handa@m17n.org>
1883 * input.c (reset_ic): Set key_unhandled to 0.
1885 2004-12-21 Kenichi Handa <handa@m17n.org>
1887 * m17n-gui.h (mfont_from_spec): Delete extern.
1889 * input-gui.c (win_callback): Handle Minput_reset.
1890 (minput__win_init): Register reset_ic as a callback for
1893 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1894 changed. At first, shift to the initial state.
1895 (minput__init): Initialize Minput_reset. Register reset_ic as a
1896 callback for Minput_reset.
1897 (Minput_reset): New variable.
1898 (minput_filter): Always set ic->xxx_changed to 0.
1899 (minput_reset_ic): New function.
1900 (integer_value): Fix typo ('>' -> '<') and calculation of length
1903 * m17n-core.c (merror_code): Change type to `int'.
1905 * m17n-misc.h (merror_code): Adjust type.
1907 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1909 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1910 (mtext_change_prop): Delete extern.
1912 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1913 to `int'. Move the documents to m17n-core.h.
1915 2004-12-13 Kenichi Handa <handa@m17n.org>
1917 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1918 (MTextProperty): Document it.
1920 2004-12-09 Kenichi Handa <handa@m17n.org>
1922 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1924 2004-12-03 Kenichi Handa <handa@m17n.org>
1926 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1927 m17n__gui_initialized): New externs.
1929 * m17n-core.h (enum M17NStatus): New enum.
1930 (m17n_status): Extern it.
1932 * m17n-core.c (core_initialized): Delete this variable.
1933 (m17n__core_initialized, m17n__shell_initialized,
1934 m17n__gui_initialized): New variables.
1935 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1936 instead of core_initialized.
1937 (m17n_status): New function.
1939 * m17n.c (shell_initialized): Delete this variable.
1940 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1943 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1945 * m17n-gui.c (win_initialized): Delete this variable.
1946 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1947 instead of gui_initialized.
1949 2004-11-19 Kenichi Handa <handa@m17n.org>
1951 * input.c (reset_ic): Check if ic_info->state is NULL.
1952 (filter): If ic_info->state is NULL, return 0.
1953 (load_input_method): Don't unref `maps' it it's not created.
1955 2004-11-15 Kenichi Handa <handa@m17n.org>
1957 * input.c (find_candidates_group): If INDEX is -1, find the last
1959 (take_action_list): If the previous of the first candidate is
1960 requested, select the last candidate.
1962 2004-11-08 Kenichi Handa <handa@m17n.org>
1964 * m17n-X.c (device_open): Try at most 32 fonts to find a
1965 non-autoscaled font.
1967 * font.c (xlfd_parse_name): Fix previous change.
1969 2004-11-05 Kenichi Handa <handa@m17n.org>
1971 * font.c: (commont_style): Include dummy elements "slanted" and
1972 "rslanted" to prefer "o" to "r" if "i" is requested.
1974 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1976 2004-10-29 Kenichi Handa <handa@m17n.org>
1978 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1980 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1981 New members smallest and larger.
1982 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1983 (xfont_registry_list): Likewise.
1984 (xfont_select): Likewise.
1987 2004-10-28 Kenichi Handa <handa@m17n.org>
1989 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1990 font name comparison.
1991 (xfont_select): Fix logic for selecting a larger size font.
1993 2004-10-25 Kenichi Handa <handa@m17n.org>
1995 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1998 2004-10-22 Kenichi Handa <handa@m17n.org>
2000 * input.c (update_candidate): Renamed from udpate_candidate.
2001 (take_action_list): Show more debugging info on arithmetic commands.
2003 * m17n-X.c (device_open): Fix previous change.
2005 * draw.c (compose_glyph_string): Don't get face property at the
2008 2004-10-21 Kenichi Handa <handa@m17n.org>
2010 * draw.c (compose_glyph_string): Fix for the case of category
2013 2004-10-19 Kenichi Handa <handa@m17n.org>
2015 * input.c (mdebug_mask): New variable.
2016 (shift_state): Print debug information.
2017 (take_action_list): Likewise.
2018 (handle_key): Likewise.
2020 2004-10-14 Kenichi Handa <handa@m17n.org>
2022 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2024 2004-10-13 Kenichi Handa <handa@m17n.org>
2026 * m17n-X.c (device_open): Be sure to register at least one font
2029 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2030 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2032 2004-10-12 Kenichi Handa <handa@m17n.org>
2034 * draw.c (alloc_gstring): Fix previous change.
2036 * font-ft.c (ft_list_generic): Fix for the case of not
2039 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2041 * font.c (mfont_list): If no font is found, return NULL.
2042 (load_font_encoding_table): Put entries of nil registry first.
2043 (find_encoding): Adjust for the above change.
2045 2004-10-11 Kenichi Handa <handa@m17n.org>
2047 * m17n-gui.h (mfont_list): Adjust prototype.
2049 * m17n-X.c (xfont_list): New arg maxnum.
2051 * font.h (struct MFontDriver): Change prototype of <list>.
2053 * font-ft.c (fc_generic_family_list): Delete it.
2054 (Mserif, Msans_serif, Mmonospace): Delete them.
2055 (M_generic_family_info): New variable.
2056 (enum GenericFamilyType): New enum.
2057 (struct GenericFamilyInfo): New struct.
2058 (generic_family_table): New variable.
2059 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2061 (add_font_info): Get style here.
2062 (ft_list_family): Don't initialize fc_config here. Don't list
2064 (ft_list_generic): New function.
2065 (ft_select): Pay attention to generic familes here.
2066 (ft_open): Fix calculation of ascent and descent.
2067 (ft_list): Pay attention to generic families.
2068 (mfont__ft_init): Initialize M_generic_family_info,
2069 generic_family_table, and fc_config..
2070 (mfont__ft_fini): Finalize generic_family_table.
2072 * draw.c (compose_glyph_string): Use more constant font for
2073 glyphs. Adjust for the member change in MGlyph.
2074 (layout_glyph_string): Adjust for the member change in MGlyph.
2075 (alloc_gstring): Intilize scracth_glyph to avoid
2076 compose_glyph_string on it.
2077 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2078 (mdraw_coordinates_position): Fix previous change.
2080 * internal-gui.h (glyph_category): New enum.
2081 (MGlyph): Change type of <category> to enum glyph_category.
2083 * face.c (mface__realize): Delete args langauge and charset.
2084 (mface__for_chars): Fix for the case that glyphs have different
2086 (mface__update_frame_face): Adjust for mface__realize change.
2088 * face.h (mface__realize): Adjust prototype.
2090 2004-10-05 Kenichi Handa <handa@m17n.org>
2092 * language.c (mlang__init): Add Akan.
2094 2004-10-04 Kenichi Handa <handa@m17n.org>
2096 * font-ft.c (add_font_info): Add instead of push the element.
2097 (ft_list_family): For generic fonts, try all
2098 substituted. families.
2100 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2101 (run_rule): Don't update cluster range here.
2102 (run_command): Update cluster range on appending a glyph.
2103 (run_otf): Update cluster range for glyphs generated by OTF.
2105 2004-10-02 Kenichi Handa <handa@m17n.org>
2107 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2109 2004-09-30 Kenichi Handa <handa@m17n.org>
2111 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2113 2004-09-30 Kenichi Handa <handa@m17n.org>
2115 * font.h: Include <fontconfig/fontconfig.h>.
2116 (MFTInfo): New member langset.
2117 (mfont__encoding_list): Extern it.
2119 * font.c (mfont__encoding_list): New function.
2120 (mdebug_dump_font_list): New function.
2122 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2123 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2125 (ft_family_list): New variable.
2126 (set_font_info): New arg basep. Callers changed.
2127 (fc_list): Check the return value of FcPatternGetString.
2128 (add_font_info): New arg plist. Callers changed. Update
2130 (ft_list_family): New function (merged fc_list and ft_list_all).
2131 (ft_select): Use ft_list_family.
2132 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2134 (mfont__ft_init): Initialize above new variables.
2135 (mfont__ft_fini): Free ft_family_list.
2136 (STRDUP_LOWER): New macro.
2137 (set_font_info): Use STRDUP_LOWER.
2138 (ft_list_family): Avoid duplicate addition of font path. Use
2140 (fc_decode_prop): Fix typo.
2142 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2143 (xfont_registry_list): Change argument disp_info to frame.
2145 (xfont_list_all): New function.
2146 (xfont_list): If FONT is not NULL, check all fonts.
2148 2004-09-28 Kenichi Handa <handa@m17n.org>
2150 * m17n-X.c (MXFont, MXFontList): New types.
2151 (MDisplayInfo): Delete members font_registry_list,
2152 iso8859_1_family_list, iso10646_1_family_list, new members
2153 font_list, base_font_list.
2154 (free_display_info): Adusted for the change of MDisplayInfo.
2155 (xfont_driver): Initialize with xfont_list.
2156 (font_compare): New function.
2157 (build_font_list): Deleted.
2158 (xfont_registry_list): New function.
2159 (xfont_select): Use xfont_registry_list.
2160 (xfont_list): New function.
2161 (device_open): Adusted for the change of MDisplayInfo.
2163 * font-ft.c (add_font_info): New arg languages. Callers changed.
2164 (fc_list): Get languages from fonts..
2165 (ft_list_all): Renamed from ft_list. Callers changed.
2166 (ft_list): New function.
2167 (mfont__ft_driver): Initalize with ft_list.
2169 * font.c (mfont_list): New function.
2171 * font.h (struct MFontDriver): New member `list'.
2172 (MFTInfo): New member languages.
2174 * m17n-gui.h (mfont_list): Extern it.
2176 2004-09-27 Kenichi Handa <handa@m17n.org>
2178 * internal-gui.h (struct MGlyphString): Delete members mt,
2179 sub_width, sub_lbrearing, sub_rbearing, and region.
2181 * draw.c (MSubTextExtents): New type.
2182 (layout_glyphs): New arg extents. Set its members.
2183 (layout_glyph_string): Adjusted for the above change.
2184 (alloc_gstring): Don't set gstring->mt.
2185 (truncate_gstring): Call line_break function with mt instead of
2188 2004-09-22 Kenichi Handa <handa@m17n.org>
2190 * mtext.c (count_utf_16_chars): Count each code of invalid
2193 2004-09-19 Kenichi Handa <handa@m17n.org>
2195 * mtext.c (default_utf_16, default_utf_32): Rename them to
2196 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2199 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2202 2004-09-13 Kenichi Handa <handa@m17n.org>
2204 * draw.c (Mlatin): Don't declare it here.
2205 (visual_order): Fix reordering of combining characters.
2206 (compose_glyph_string): Fix detection of script.
2207 (layout_glyphs): Don't fix reordering of combining characters
2209 (layout_glyph_string): Pay attention to
2210 control->disable_overlapping_adjustment.
2211 (truncate_gstring): Include at least on character in a line.
2212 (get_gstring): Always scan one full line.
2213 (mdraw__init): Don't initialize Mlatin here.
2214 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2215 have a font, use ascent/descent of an ASCII font. Allow
2216 ink_array_return and logical_array_return to be NULL.
2217 (mdraw_coordinates_position): Fix iteration.
2219 * font-ft.c (MFTtoProp): Member completely changed.
2220 (ft_to_prop): Adjusted for the above change.
2221 (ft_to_prop_size): Likewise.
2222 (set_font_info): Adjusted for the change of MFTtoProp.
2223 (fc_generic_family_list): New variable.
2224 (fc_list): Add special handling of generic font names.
2225 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2226 Initialize fc_generic_family_list.
2227 (mfont__ft_fini): Don't free ft_to_prop. Free
2228 fc_generic_family_list.
2229 (FC_vs_M17N_font_prop): New type.
2230 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2231 (fc_decode_prop, fc_encode_prop): New functions.
2232 (mfont__ft_parse_name): Use fc_decode_prop.
2233 (mfont__ft_unparse_name): Use fc_encode_prop.
2235 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2236 (MWDevice): Add member realized_font_list.
2237 (free_display_info): Don't free disp_info->realized_font_list.
2238 (free_device): Free device->realized_fontset_list.
2239 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2240 (device_open): Don't initialize disp_info->realized_font_list.
2241 (device_open): Initialize device->realized_font_list and set it to
2242 frame->realized_font_list.
2244 * fontset.c (try_font_group): New function.
2245 (mfont__lookup_fontset): Use try_font_group.
2247 * font.c (common_weight): Change the order of "regular".
2249 * face.c (Mlatin): Don't make it static.
2250 (mface__realize): Be sure to set work_gstring.frame.
2251 (mface__for_chars): Likewise.
2253 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2256 * internal-gui.h (Mlatin): Extern it.
2258 * m17n-gui.h (MDrawControl): New member
2259 disable_overlapping_adjustment.
2261 2004-09-06 Kenichi Handa <handa@m17n.org>
2263 * font-flt.c (run_otf): Fix typo ('}'->']').
2265 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2266 (COMBINING_PRECOMPUTED_P): New macros.
2268 * draw.c (layout_glyphs): Handle precomputed combining code.
2270 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2271 precomupted combining code.
2273 2004-09-03 Kenichi Handa <handa@m17n.org>
2275 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2278 2004-08-27 Kenichi Handa <handa@m17n.org>
2280 * face.c (mface_put_prop): If the new value is the same as the
2281 current one, don't increment frame->tick.
2283 2004-08-25 Kenichi Handa <handa@m17n.org>
2285 * fontset.c (mfontset): Initialize font_spec_list member.
2286 (mfontset_copy): Load fontset if necessary.
2288 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2289 'metrics' to for C++.
2291 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2294 2004-08-16 Kenichi Handa <handa@m17n.org>
2296 * Version 1.1.0 released.
2298 2004-08-13 Kenichi Handa <handa@m17n.org>
2300 * language.c (mlang__init): Add Dhivehi.
2302 * m17n-gui.c (Mx, Mfreetype): Delete it.
2303 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2305 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2306 (mfont_resize_ratio): Extern it.
2307 (MDrawGlyphInfo): New member logical_width;
2308 (MDrawGlyph): New type.
2309 (mdraw_glyph_list): Prototype adjusted.
2311 * m17n-X.c (xfont_open): Set type and fontp members.
2312 (xft_open): Likewise.
2314 * internal-gui.h (Mx, Mfreetype): Delete extern.
2316 * font.h (struct MRealizedFont): New member type and fontp.
2318 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2319 (Mx, Mfreetype): Declare here.
2320 (Mxft): New variable.
2321 (mfont_resize_ratio): New function.
2323 * font-ft.c (ft_open): Set type and fontp members.
2325 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2328 2004-08-11 Kenichi Handa <handa@m17n.org>
2330 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2333 2004-08-06 Kenichi Handa <handa@m17n.org>
2335 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2338 * font-flt.c (run_otf): Print debugging information if necessary.
2340 2004-08-05 Kenichi Handa <handa@m17n.org>
2342 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2343 positioning_type 5 and 6. Switch simplified.
2345 2004-08-04 Kenichi Handa <handa@m17n.org>
2347 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2349 2004-08-02 Kenichi Handa <handa@m17n.org>
2351 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2352 set val to 1 even if it is greater than 1.
2354 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2356 2004-07-29 Kenichi Handa <handa@m17n.org>
2358 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2359 debugging information.
2361 * internal.h (MDEBUG_PRINT5): New macro.
2363 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2364 the previous one if the zero width glyph has left or right
2367 2004-07-26 Kenichi Handa <handa@m17n.org>
2369 * m17n-X.c (xft_render): Pay attention to members left_padding and
2370 right_padding of MGlyph.
2372 * draw.c (visual_order): Allocate one more elements for arrays as
2373 a workaround of fribidi bug.
2374 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2375 instead of MGlyph->bidi_sensitive.
2376 (layout_glyph_string): Pay attentinon to
2377 control->orientation_reversed when padding at the head or tail.
2378 Fix adjustment of space glyph width.
2379 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2382 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2383 instead of MGlyph->bidi_sensitive.
2385 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2387 2004-07-26 Kenichi Handa <handa@m17n.org>
2389 * draw.c (visual_order): Don't treat combined glyphs specially.
2390 (layout_glyphs): Don't get metrics glyphs that are already ready.
2391 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2392 width with the previous one.
2393 (draw_background): Fix bar cursor position on a r2l glyph.
2395 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2396 (run_rule): Fix place of updating cluster_begin_pos and
2397 cluster_end_pos here.
2398 (run_otf): Don't set left_padding.
2400 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2402 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2403 Fix handling of GPOS.
2404 (mfont__ft_drive_gpos): Delete this function.
2406 * font.h (mfont__ft_drive_otf): Renamed back from
2407 mfont__ft_drive_gsub.
2408 (mfont__ft_drive_gpos): Delete extern.
2410 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2411 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2413 2004-07-23 Kenichi Handa <handa@m17n.org>
2415 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2416 the same bidi level.
2418 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2420 2004-07-22 Kenichi Handa <handa@m17n.org>
2422 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2424 2004-07-20 Kenichi Handa <handa@m17n.org>
2426 * draw.c (render_glyphs): Fix checking of g->code validity.
2428 * face.c (mface__realize): Set g.type.
2430 2004-07-18 Kenichi Handa <handa@m17n.org>
2432 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2435 * m17n-gui.c (mframe): Print error message give by dlopen to
2438 2004-07-16 Kenichi Handa <handa@m17n.org>
2440 * draw.c (compose_glyph_string): Improve the way of deciding a
2441 script. For a character that doesn't have script property, use
2442 the last non-latin script.
2444 * font-ft.c (fc_list): Cancel previous change.
2445 (mfont__ft_init): Add more entries in ft_to_prop_name.
2447 2004-07-15 Kenichi Handa <handa@m17n.org>
2449 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2450 previous or next character glyphs.
2452 2004-07-14 Kenichi Handa <handa@m17n.org>
2454 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2455 of type GLYPH_SPACE.
2457 * fontset.c (mfont__lookup_fontset): If glyph type is
2458 GLYPH_SPACE, get codes for SPACE.
2460 * internal-gui.h (Mfont): Delete extern.
2462 * m17n-gui.h (Mfont): Delete duplicated extern.
2464 2004-07-13 Kenichi Handa <handa@m17n.org>
2466 * font-ft.c (DEVICE_DELTA): New macro.
2467 (adjust_anchor): New function.
2468 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2470 (mfont__ft_drive_gpos): New function.
2472 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2473 (FontLayoutContext): Delete member `rfont'.
2474 (run_otf): Set g->otf_cmd. Call
2475 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2476 only whne HAVE_OTF is defined.
2478 * fontset.c: Include "config.h".
2480 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2481 (MGlyph): New member otf_cmd.
2483 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2484 (mfont__ft_drive_gpos): Extern it.
2486 * face.c: Include "config.h".
2488 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2490 * input-gui.c: Include "config.h".
2492 * plist.c: Include "config.h".
2494 2004-07-06 Kenichi Handa <handa@m17n.org>
2496 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2497 internal-gui.h: Cancel previous changes.
2499 * m17n-gd.h: Delete it.
2501 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2502 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2503 @XML2_LD_FLAGS@ to above.
2504 (libm17n_la_LIBADD): Add -ldl.
2505 (libm17n_la_LDFLAGS): Add -export-dynamic.
2506 (X_LD_FLAGS): Fix the order of linking.
2507 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2508 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2509 (libm17n_X_la_LDFLAGS): Add -module.
2510 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2511 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2512 (libm17n_gd_la_LDFLAGS): Add -module.
2513 (include_HEADERS): Delete m17n-gd.h.
2515 2004-06-30 Kenichi Handa <handa@m17n.org>
2517 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2518 (MDeviceLibraryInterface): Delete it.
2519 (register_device_library): Delete it.
2520 (m17n__device_library_list): Renamed from device_library_list.
2522 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2523 (m17n_init_win): Adjust prototype.
2525 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2526 (m17n_init_gd): New function.
2528 * m17n-gd.h: New file.
2530 * m17n-X.h: Include <m17n-gui.h>.
2531 (m17n_init_X): Extern it.
2532 (M17N_INIT): Redefine it.
2534 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2535 (m17n_init_X): New function.
2537 * internal-gui.h (m17n__device_library_list): Extern it.
2538 (struct MDeviceDriver): New members initialized, init, and fini.
2540 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2542 (libm17n_X_la_LIBADD): Delete aboves.
2543 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2544 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2545 (libm17n_gd_la_LDFLAGS): Delete it.
2546 (include_HEADERS): Add m17n-gd.h.
2548 2004-06-25 Kenichi Handa <handa@m17n.org>
2550 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2551 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2553 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2555 * font-ft.c (fc_list): If FcFontList finds no font, try
2558 * draw.c (compose_glyph_string): Terminate the last loop after
2559 doing default combining if necessary.
2561 2004-06-24 Kenichi Handa <handa@m17n.org>
2563 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2565 * character.c (mchar_define_property): Add const to an arg.
2567 * charset.c (mchar_define_charset): Add const to an arg.
2569 * coding.c (MCodingSystem): Add const to an arg or decoder.
2570 (finish_decoding): Add const to an arg.
2571 (decode_coding_charset, decode_coding_utf_8)
2572 (decode_coding_utf_16, decode_coding_utf_32)
2573 (decode_coding_iso_2022, decode_coding_sjis)
2574 (mconv_define_coding): Likewise.
2576 * m17n-X.c (xft_find_metric): Delete unused variable.
2578 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2581 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2584 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2585 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2587 * mtext.h (mtext__from_data): Ajust prototype.
2589 2004-06-23 Kenichi Handa <handa@m17n.org>
2591 * draw.c (compose_glyph_string): Always get glyph codes by
2593 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2594 (mdraw_glyph_list): New function.
2596 * font-flt.c (mfont__flt_run): Be sure to call
2597 rfont->driver->encode_char.
2599 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2600 (ft_encode_char): Delete arg C.
2601 (ft_render): Don't call FT_Get_Char_Index.
2603 * font.c (mfont__encodable_p): Delete it.
2604 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2606 * font.h (struct MFontDriver): Delete arg C of encode_char.
2607 (mfont__encodable_p): Delete extern.
2609 * m17n-X.c (xfont_encode_char): Delete arg C.
2610 (xft_find_metric): Don't cal FT_Get_Char_Index.
2611 (xft_render): Likewise.
2613 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2615 (mdraw_glyph_list): Extern it.
2617 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2619 2004-06-22 Kenichi Handa <handa@m17n.org>
2621 * m17n-gui.h (mfontset_lookup): Extern it.
2623 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2625 * fontset.c (realize_fontset_elements)
2626 (free_realized_fontset_elements, update_fontset_elements): New
2628 (mfont__realize_fontset): Call realize_fontset_elements.
2629 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2630 (mfont__lookup_fontset): If a fontset was modified, update
2631 the realized fontset.
2632 (mfontset_modify_entry): Increment fontset->tick.
2633 (mfontset_lookup): New function.
2635 2004-06-21 Kenichi Handa <handa@m17n.org>
2637 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2639 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2640 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2641 length of source text 0.
2643 2004-06-21 Kenichi Handa <handa@m17n.org>
2645 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2646 (compare): Pay attention to format other than utf-8.
2647 (copy): Delete this function.
2648 (count_by_utf_8, count_by_utf_16, insert): New functions.
2649 (count_utf_16_chars): Fix handling of a surrogate pair.
2650 (find_char_forward, find_char_backward): Likewise.
2651 (mtext__from_data): Delete unnecessary check. Fix number of
2653 (mtext_from_data): Don't count items.
2654 (mtext_ref_char): Optimize the code.
2655 (mtext_set_char): Pay attention to format other than utf-8.
2656 (mtext_cat_char): Likewise.
2657 (mtext_dup): Don't call copy, instead do allocation here.
2658 (mtext_cat): Call insert instead of copy.
2659 (mtext_ncat): Likewise.
2660 (mtext_cpy): Delete character at first and call insert instead of
2662 (mtext_ncpy): Likewise.
2663 (mtext_copy): Likewise.
2664 (mtext_duplicate): Call insert instead of copy.
2665 (mtext_del): Pay attention to format other than utf-8.
2666 (mtext_ins): Simply call insert.
2667 (mtext_ins_char): Pay attention to format other than utf-8.
2668 (mtext_tok): Call insert instead of copy.
2669 (mtext_text): Call UNIT_BYTES.
2671 * textprop.c (mtext__adjust_plist_for_change): New function.
2673 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2674 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2675 (CHAR_UNITS_AT): Fix typo.
2676 (CHAR_UNITS_BY_HEAD): Fix typo.
2677 (STRING_CHAR_AND_UNITS): Fix typo.
2679 * internal.h (MTEXT_READ_ONLY_P): New macro.
2681 * mtext.h (mtext__replace): Delete the extern.
2682 (mtext__adjust_foramt): Adjust prototype.
2684 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2685 if possible. Otherwise make a copy of mmt.
2687 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2690 2004-06-18 Kenichi Handa <handa@m17n.org>
2692 * character.h (CHAR_STRING_UTF16): Fix syntax.
2694 2004-06-16 Kenichi Handa <handa@m17n.org>
2696 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2697 (libm17n_X_la_LIBADD): Delete it.
2698 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2700 * m17n-X.c (device_open): Add parens in `if' condition.
2702 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2703 (DEC_POSITION): Likewise.
2704 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2706 2004-06-15 Kenichi Handa <handa@m17n.org>
2708 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2711 * draw.c (compose_glyph_string): If langauge is specified, call
2712 mface__for_chars even if a text is all latin. Fix condition for
2713 setting non_ascii_found.
2715 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2717 * m17n.h (minput_char_to_key): Delete extern.
2719 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2721 * m17n-gui.c (null_device_open): Set several members of frame.
2723 2004-06-14 Kenichi Handa <handa@m17n.org>
2725 * m17n-gui.h (minput_event_to_key): Delete extern.
2727 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2729 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2731 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2733 2004-06-08 Kenichi Handa <handa@m17n.org>
2735 * character.c (mchar_put_prop): Don't increment the ref-count of
2738 2004-06-04 Kenichi Handa <handa@m17n.org>
2740 * m17n-core.c (mdebug__register_object): New function.
2741 (mdebug__unregister_object): Likewise.
2743 * internal.h (mdebug__register_object, mdebug__unregister_object):
2745 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2748 * charset.c (mcharset__load_from_database): Don't call
2749 mconv__register_charset_coding here.
2751 * coding.c (find_coding): Get a real name from an element of
2752 coding_definition_list.
2753 (mconv__register_charset_coding): Set the real name at the top of
2755 (mcoding__load_from_database): Likewise.
2756 (mconv_list_codings): Adjusted for the above change.
2758 2004-06-03 Kenichi Handa <handa@m17n.org>
2760 * coding.c (find_coding): Find by canonicalized name. Don't have
2761 to modify the element of coding_definition_list by
2763 (mconv__define_coding_from_charset): Delete it.
2764 (mconv__register_charset_coding): Canonicalize sym.
2765 (mcoding__load_from_database): Register plist modified by
2768 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2770 * font-ft.c (ft_open): Fix setting of rfont->descent.
2772 2004-06-02 Kenichi Handa <handa@m17n.org>
2774 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2775 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2776 (xlfd_unparse_name): Renamed from xfont_build_name.
2777 (mfont__init): Initialized Mfontconfig.
2778 (mfont__free_realized): Unconditionally unref rfont->info.
2779 (mfont__select): Free `this' if it's not best.
2780 (mfont__open): Don't check frame->realized_font_list.
2781 (mfont__parse_name_into_font): New function.
2782 (Mfontconfig): New variable.
2783 (mfont_from_name): Call mfont_parse_name.
2784 (mfont_name): Call mfont_unparse_name.
2785 (mdebug_dump_font): Likewise.
2787 * font.h (struct MFontDriver): Delete members parse_name and
2789 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2790 (mfont__parse_name_into_font): Extern it.
2792 * font-ft.c: Include "symbol.h".
2793 (close_ft): Unconditionally free filename and charmap_list of
2795 (ft_open): Duplicate base->filename. Increment ref-count of
2796 ft_info->charmap_list. Free ft_info->charmap_list and
2797 ft_info->filename on error.
2798 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2800 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2802 (enum xlfd_field_idx): Moved to font.c.
2803 (split_font_name, build_font_name): Likewise.
2804 (build_font_list): Call mfont__parse_name_info_font.
2805 (xfont_open): Call mfont__unparse_name. Free name.
2806 (xfont_parse_name, xfont_build_name): Moved to font.c
2807 (xft_select): Prototype deleted.
2808 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2809 Call mfont_pase_name.
2811 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2812 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2815 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2818 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2820 2004-06-01 Kenichi Handa <handa@m17n.org>
2822 * fontset.c (mfontset_modify_entry): Pay attention to the case
2823 that fontset->font_spec_list is NULL.
2825 2004-05-31 Kenichi Handa <handa@m17n.org>
2827 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2829 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2831 * font.c (mfont__select): Print score the a font for debugging.
2833 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2835 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2836 kanji_sym and kana_sym.
2838 2004-05-28 Kenichi Handa <handa@m17n.org>
2840 * Makefile.am (VINFO): New variable.
2841 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2842 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2844 2004-05-27 Kenichi Handa <handa@m17n.org>
2846 The following chanages are to make device dependent functions
2847 accessible only from MDeviceDriver structure, and to add GD and
2848 null device drivers. Font drivers get also device dependent.
2850 * m17n.c (m17n_init): Increament shell_initialized.
2851 (m17n_fini): Decremented shell_initialized.
2853 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2855 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2856 (Mwidget, Mcolormap, Mx): Extern them.
2858 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2859 (free_frame): Call frame->driver->close instead of
2861 (DLOPEN_SHLIB_EXT): New macro.
2862 (MDeviceLibraryInterface): New type.
2863 (device_library_list): New variable.
2864 (register_device_library): New function.
2865 (null_device): New variable.
2866 (null_device_close, null_device_get_prop)
2867 (null_device_realize_face, null_device_free_realized_face): New
2869 (null_driver): New variable.
2870 (null_device_init, null_device_fini, null_device_open): New
2872 (null_interface): New variable.
2873 (Mfreetype, Mdevice): Declare them.
2874 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2875 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2876 Mwin__Close_Device. Register drivers for Mx and Mgd.
2877 (m17n_fini_win): Decremented win_initialized. Call "fini"
2878 function of all opened devices. Don't call mwin__fini.
2879 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2881 (mframe): Handle Mdevice key of PLIST.
2882 (mframe_get_prop): Call frame->device->get_prop instead of
2883 mwin__device_get_prop.
2885 * m17n-gd.c: New file.
2887 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2888 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2890 * m17n-core.c (m17n_init_core): Increate core_initialized.
2891 (m17n_fini_core): Decremented core_initialized.
2893 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2894 (Mcolormap): Don't extern them here.
2896 * m17n-X.c (FRAME_DEVICE): New macro.
2897 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2898 (free_display_info): Use MPLIST_DO.
2899 (free_device): Free rface->info.
2900 (xft_close): Delete it.
2901 (device_init): Renamed from mwin__init.
2902 (device_fini): Renamed from mwin__fini.
2903 (device_open): Renamed from mwin__open_device.
2904 (x_driver): New variable.
2905 (MXFontInfo): Delete member frame, add member display.
2906 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2907 Don't declare them here.
2909 * internal-gui.h (MDeviceType): New enum.
2910 (MWDefice): Delete it.
2911 (struct MFrame): Change type of device to void *. New members
2912 device_type, driver, font_driver_list.
2913 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2914 (MDeviceDriver): New type.
2915 (Mx, Mgd, Mfreetype): Extern them.
2916 (mwin__XXX): Delete all of them.
2918 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2920 (win_destroy_ic): Likewise.
2921 (adjust_window_and_draw): Likewise.
2922 (win_callback): Likewise.
2923 (Mxim): Declare it here.
2924 (minput_event_to_key): Call M_CHECK_READABLE.
2926 * fontset.c (mfont__lookup_fontset): Delete local variable
2929 * font.h (struct MFontDriver): Delete member close, add members
2930 parse_name and build_name.
2931 (mfont__driver_list): Delete extern.
2932 (mfont__close): Delete extern.
2934 * font.c (mfont__init): Don't set mfont__driver_list.
2935 (mfont__fini): Don't unref mfont__driver_list.
2936 (mfont__select): Try font drivers in frame->font_driver_list. Set
2937 driver member of a realized font.
2938 (mfont__close): Delete it.
2939 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2940 functions of the default frame.
2942 * font-ft.c (close_ft): Check ft_info->ft_face and work
2944 (add_font_info): Allocate ft_info by M17N_OBJECT.
2945 (ft_close): Delete it.
2946 (mfont__ft_driver): Don't set ft_close.
2947 (ft_select): Increment ref-count of best_font.
2948 (ft_open): Decremented ref-count of base. On error, call
2949 FT_Done_Face and free ft_info.
2950 (ft_find_metric): Always use XXX_MONO in load_flags.
2951 (ft_render): Fix setting of width. Call
2952 frame->driver->draw_points instead of mwin__draw_points.
2953 (ft_to_prop): Don't set mfont__driver_list.
2954 (mfont__ft_fini): Just unref ft_info.
2956 * face.c (mface__init): Exchange foreground and background of
2957 mface__default. Call mface_put_prop to set hline of
2959 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2960 (mface__free_realized): Don't call mwin__free_realized_face.
2962 * draw.c (Mdepth): Don't declare it here.
2963 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2964 (render_glyphs, render_glyph_string): Likewise.
2965 (mdraw__init): Don't set Mdepth.
2966 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2968 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2970 (mdraw_text_items): Check FRAME is writable.
2971 (mdraw_per_char_extents): Implement body.
2973 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2975 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2976 (GUI_SOURCES): Delete it.
2977 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2978 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2979 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2980 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2981 (linkgui_LDADD): Set to libm17n-gui.la
2982 (linkgui_LDFLAGS): New target.
2983 (SRC): Include ${libm17n_gui_la_SOURCES} and
2984 ${libm17n_gd_la_SOURCES}.
2986 2004-05-24 Kenichi Handa <handa@m17n.org>
2988 * draw.c (draw_background): Don't draw background even if
2989 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2991 2004-05-22 Kenichi Handa <handa@m17n.org>
2993 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2995 2004-05-20 Kenichi Handa <handa@m17n.org>
2997 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2999 * m17n-gui.c: Include "plist.h".
3000 (mframe): If PLIST is NULL, initialize it to emply plist.
3002 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3003 (xft_driver): New variable.
3004 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3005 (xft_find_metric, xft_render): New function.
3006 (mwin__init): Adjusted for the new mfont__driver_list.
3007 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3008 generated face to PARAM.
3009 (mwin__realize_face): Fix setting of box colors. Don't call hook
3011 (mwin__draw_hline): New function.
3012 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3013 (mwin__xft_render): Delete these function.
3015 * internal-gui.h (struct MFrame): New member tick.
3016 (struct MGlyphString): New member tick.
3017 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3018 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3019 (mwin__xft_render): Delete extern.
3021 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3022 (mfontset): Always increment the reference count of returned
3025 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3026 (MFTInfo): Moved to font.h.
3027 (ft_iso8859_1_font_list): Delete this variable.
3028 (set_font_info): Don't set font->property[MFONT_TYPE].
3029 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3030 (add_font_info): Change type to void.
3031 (fc_list): Change anme from xft_list. Caller changed. Include
3032 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3033 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3034 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3035 (close_ft): Don't call mwin__xft_close. Unref
3036 ft_info->extra_info.
3037 (ft_open): Don't setup ft_info->fontname. Don't call
3039 (ft_find_metric): Don't call mwin__xft_get_metric.
3040 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3041 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3042 (mfont__ft_init): Adjusted for new mfont__driver_list.
3043 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3045 * font.c (mfont__driver_list): Make it MPlist.
3046 (mfont__init): Adjust initialization of mfont__driver_list.
3047 (mfont__fini): Free mfont__driver_list.
3048 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3049 (mfont__select): Adjusted for the new mfont__driver_list.
3051 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3052 (mfont__drirver_list): Adjust prototype.
3053 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3055 * face.h (struct MFace): Delete member realized_face_list, add
3057 (struct MRealizedFace): Delete member need_update
3058 andnofont_rface, add member non_ascii_list.
3059 (mface__update_frame_face): Extern it.
3061 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3063 (get_hline_create, get_box_create): New functions.
3064 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3066 (free_face): Cancep previous change. Free face->frame_list.
3067 (serialize_hline): Do nothing if hline->width is zero.
3068 (serialize_box): Do nothing if box->width is zero.
3069 (mface__init): Setup all properties of mface__default.
3070 (mface__fini): Free hline_prop_list and box_prop_list.
3071 (mface__realize): Cancel previous change. Update
3072 face->frame_list. Setup rface->non_ascii_list.
3073 (mface__for_chars): Update rface->non_ascii_list.
3074 (mface__free_realized): Free rface->non_ascii_list.
3075 (mface__update_frame_face): New function.
3076 (mface): Initialize face->frame_list.
3077 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3079 (mface_merge): Likewise.
3080 (mface_put_prop): If key is Mhline or Mbox, get value by
3081 get_hline_create or get_box_create respectively.
3082 (mface_put_prop): Update frame->tick and call
3083 mface__update_frame_face if necessary.
3084 (mface_update): Do nothing if func is noop_hook.
3086 * draw.c (render_glyphs): If a font is not found, use
3087 mwin__draw_empty_boxes.
3088 (alloc_gstring): Initialize gstring->tick.
3089 (get_gstring): Check gstring->tick.
3091 2004-05-17 Kenichi Handa <handa@m17n.org>
3093 * face.c (find_realized_face): Return value changed. If RFONT is
3094 NULL, avoid unnecessary checking.
3095 (free_face): Free face->realized_face_list.
3096 (mface__realize): Adjusted for the change of find_realized_face.
3097 If it returns a realized face that needs update, free it and
3098 realize a new one. Push a new realized face to
3099 frame->realized_face_list instead of appending.
3100 (mface__for_chars): Adjusted for the change of find_realized_face.
3101 Short cut if the required font is in rface->ascii_rface.
3102 (mface_put_prop): Free old value if necessary. Set need_update
3103 member of realized faces to 1.
3105 * face.h (struct MFace): Delete member tick, add member
3107 (struct MRealizedFace): Delete member tick, add member
3110 2004-05-13 Kenichi Handa <handa@m17n.org>
3112 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3114 2004-05-12 Kenichi Handa <handa@m17n.org>
3116 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3118 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3119 parse it XftNameParse.
3121 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3122 (all_fonts_scaned): New variable.
3123 (set_font_info): FAMILY may be Mnil.
3124 (add_font_info): Argument changed.
3125 (xft_list): Call add_font_info in it.
3126 (ft_list): Likewise.
3127 (ft_select): Make it work in the case family is Mnil.
3128 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3129 (mfont__ft_fini): Set all_fonts_scaned to 0.
3131 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3132 that is failed to open.
3134 2004-05-10 Kenichi Handa <handa@m17n.org>
3136 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3137 device's depth is 1 (i.e. monochrome).
3139 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3140 to work around the problem of libtool.
3142 * font-ft.c: Include <freetype/ftbdf.h>.
3143 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3145 (mfont__ft_init): Initialize them.
3146 (ft_iso8859_1_font_list): New variable.
3147 (set_font_info): Detect a font containing iso8859-1 glyphs and
3148 register it in ft_iso8859_1_font_list. If the font is not
3149 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3150 properties of the font from its properties.
3151 (add_font_list): If the font is not scalable, check if it is BDF
3152 or PCF font. If not, ignore it.
3153 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3154 registry is not iso8859-1.
3155 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3156 ft_iso8859_1_font_list.
3157 (ft_find_metric): If the font is not scalable, assume it as BDF
3158 or PCF, and get a metric from its properties.
3159 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3161 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3163 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3164 (libm17n_la_LDFLAGS): Delete it.
3165 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3166 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3168 2004-05-06 Kenichi Handa <handa@m17n.org>
3170 * draw.c (compose_glyph_string): Fix previous change.
3172 2004-04-30 Kenichi Handa <handa@m17n.org>
3174 * font-ft.c (ft_list): Delete unused variable `result'.
3175 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3177 2004-04-27 Kenichi Handa <handa@m17n.org>
3179 * m17n-X.c: Include config.h
3180 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3181 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3182 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3183 (FRAME_CMAP, FRAME_VISUAL): New macros.
3184 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3185 (xfont_driver): Make it static.
3186 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3187 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3188 info->xft_color_back.
3189 (MXftFontInfo) [HAVE_XFT2]: New type.
3190 (mwin__xft_close) [HAVE_XFT2]: New function.
3191 (mwin__xft_open) [HAVE_XFT2]: New function.
3192 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3193 (mwin__xft_render) [HAVE_XFT2]: New function.
3195 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3196 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3197 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3200 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3202 * font-ft.c: Don't include FT_FREETYPE_H here.
3203 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3204 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3205 (MFTInfo): New member charmap_index.
3206 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3207 (check_otf_filename): Renamed from check_filename. Return value
3209 (ft_set_property): This function deleted.
3210 (set_font_info): New function.
3211 (add_font_list): Argument changed. Add multiple fonts.
3212 (xft_list) [HAVE_XFT2]: New function.
3213 (ft_list) [not HAVE_XFT2]: New function.
3214 (ft_select): Add code for Xft.
3215 (close_ft): Likewise.
3216 (ft_open): Likewise.
3217 (ft_find_metric): Likewise.
3218 (ft_encode_char): Likewise.
3219 (ft_render): Likewise.
3221 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3223 2004-04-26 Kenichi Handa <handa@m17n.org>
3225 * textprop.c (mtext_attach_property): Declare the return type as
3228 2004-04-21 Kenichi Handa <handa@m17n.org>
3230 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3232 2004-04-09 Kenichi Handa <handa@m17n.org>
3234 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3236 (load_command): Setup above members.
3238 2004-04-05 Kenichi Handa <handa@m17n.org>
3240 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3242 2004-03-30 Kenichi Handa <handa@m17n.org>
3244 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3247 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3248 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3250 2004-03-29 Kenichi Handa <handa@m17n.org>
3252 * Version 1.0 Patch Level 2 released.
3254 2004-03-29 Kenichi Handa <handa@m17n.org>
3256 * charset.c (make_charset): Set charset->fully_loaded and
3257 charset->simple correctly. Don't try to get charset->min_char and
3258 charset->max_char for a charset of method subset and superset.
3259 Don't load a mapping file here.
3260 (mcharset__init): Set unified_max.
3261 (mcharset__load_from_database): Free a working plist.
3263 * coding.c (mcoding__fini): Free all malloced data.
3265 * input-gui.c (win_create_ic): Set control.as_image for preediting
3268 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3269 `count') to initialize the array.
3271 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3274 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3276 (mwin__create_window): Fix bug of setting a background pixel of a
3278 (mwin__adjust_window): Clear the window before drawing.
3280 * m17n-core.c (mdebug__report_object): Free array->objectes if
3282 (m17n_init_core): Don't set report_header_printed to 0 here.
3283 Fix debugging information.
3284 (m17n_fini_core): Set report_header_printed to 0 here.
3286 * m17n-core.h (mplist_deserialize): Extern it.
3288 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3290 * m17n.c (m17n_fini): Fix debugging information.
3292 * mtext.c (mtext__adjust_foramt): New function.
3294 * mtext.h (mtext__adjust_foramt): Extern it.
3296 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3298 * plist.h (mplist__deserialize): Don't extern it.
3300 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3301 elements of symbol_table to NULL. Report about created and freed
3302 symbols if MDEBUG_FINI is set.
3304 2004-03-22 Kenichi Handa <handa@m17n.org>
3306 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3308 * m17n.c (m17n_init): Fix the way of checking merror_code.
3310 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3312 2004-03-22 Kenichi Handa <handa@m17n.org>
3314 * fontset.c (realize_font_group): Adjust the font size by
3315 mfont__resize before selecting a font.
3317 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3319 2004-03-19 Kenichi Handa <handa@m17n.org>
3321 * Version 1.0 Patch Level 1 released.
3323 2004-03-19 Kenichi Handa <handa@m17n.org>
3325 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3327 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3329 2004-03-19 Kenichi Handa <handa@m17n.org>
3331 Re-apply the changes forgotten in the released version.
3333 * charset.c (mcharset__load_from_database): Call
3334 mchar_define_charset.
3336 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3337 (mconv_encode_range): Put Mcoding text property.
3339 2004-03-18 Kenichi Handa <handa@m17n.org>
3341 * draw.c (Mdepth): New variable.
3342 (visual_order): Delete unused local var `pos'.
3343 (compose_glyph_string): Fix for the case that gstring->glyphs is
3344 realloced. Stop generating glyphs at TO. Fix handling of
3346 (layout_glyphs): Get metrics of all glyphs in advance. Set
3347 lbearing and rbearing of base of composition glyph correctly.
3348 Handle left-overhang glyphs correctly.
3349 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3351 (dump_combining_code): Change the defualt off_x character to ".".
3352 (mdraw__init): Initialize Mdepth.
3354 * face.c (work_gstring): New variable
3355 (mface__init): Initialize work_gstring.
3356 (mface__fini): Free work_gstring.glyphs.
3357 (mface__realize): Don't handle videomode property here. Adjusted
3358 for the change of mfont__get_metric.
3359 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3361 * face.h (enum face_gc): Moved to m17n-X.c.
3363 * font.h (struct MFontDriver): Arguments of find_metric changed.
3364 (mfont__select): Prototype adjusted.
3365 (mfont__get_metric): Likewise.
3366 (mfont__ft_drive_otf): Likewise.
3367 (mfont__flt_run): Likewise.
3369 * font.c (mfont__select): New argument layouter. If layouter is
3370 different in the registered font, make a new copy of realized
3372 (mfont__get_metric): Argument changed. Get metrics of multiple
3374 (mfont_find): Call mfont__select with layouter as Mnil.
3376 * font-flt.c (FontLayoutContext): New member rfont.
3377 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3378 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3380 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3382 (NUM_POINTS): New macro.
3383 (MPointTable): New type.
3384 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3385 (mfont__ft_drive_otf): New argument rfont.
3387 * fontset.c (realize_font_group): Adjusted for the changed of
3389 (check_fontset_element): This function deleted.
3391 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3392 off the parent window if the preedit text is zero length.
3394 * internal-gui.h (struct MFrame): New members foreground,
3395 background, videomode, font.
3396 (struct MGlyphString): New member anti_alias.
3397 (MDrawPoint): New type.
3398 (mwin__draw_bitmap): Prototype deleted.
3399 (mwin__draw_points): Prototype added.
3401 * m17n-gui.h (MDrawControl): New member anti_alias.
3403 * m17n-gui.c (free_frame): Free frame->font.
3404 (mframe): Set the fontset of frame->face to the default fontset.
3406 * m17n-X.c (RGB_GC): New type.
3407 (enum gc_index): Renamed from enum face_gc. Member names changed.
3409 (struct MWDevice): Members foreground and background deleted. New
3410 member scratch_gc, gc_list.
3411 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3412 (free_device): Free GCs in device->gc_list.
3413 (get_rgb_gc): New function.
3414 (get_gc): Renamed and argument changed from get_color.
3415 (get_gc_for_anti_alias): New function.
3416 (xfont_find_metric): Arguments changed. Get metrics of multiple
3418 (set_region): Argument changed. Caller changed.
3419 (xfont_render): Allways set a font in gc.
3420 (x_error_handler, x_io_error_handler): Define only if
3421 X_SET_ERROR_HANDLER is defined.
3422 (mwin__open_device): Create device->scratch_gc. Set members
3423 foreground, background, and videomode of frame. Call
3424 XSetErrorHandler and XSetIOErrorHandler only if
3425 X_SET_ERROR_HANDLER is defined.
3426 (struct gc_list): Deleted.
3427 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3428 (mwin__realize_face): Adjusted for the change of the format of
3429 rface->info and the charge of set_region.
3430 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3431 (mwin__draw_box): Likewise.
3432 (mwin__draw_bitmap): This function deleted.
3433 (mwin__draw_points): New function.
3434 (mwin__verify_region): Adjusted for the change of the format of
3435 rface->info and the charge of set_region.
3436 (mwin__create_window): Inherit backgound pixel from parent.
3437 (mwin__dump_gc): Adjusted for the change of the format of
3440 2004-03-16 Kenichi Handa <handa@m17n.org>
3442 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3444 * input.c (M_key_alias): New variable.
3445 (handle_key): Try M_key_alias property of a key too.
3446 (minput__init): Initialize M_key_alias. Give that property to
3447 symbols in one_char_symbol. Fix bug of initializing
3450 * draw.c (compose_glyph_string): Don't handle
3451 ignore_formatting_char here. Include formatting characters in the
3452 range processed by a FTL.
3453 (layout_glyph_string): Handle ignore_formatting_char here.
3455 2004-03-12 Kenichi Handa <handa@m17n.org>
3457 * input-gui.c (win_create_ic): Enable bidi in status control.
3459 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3461 2004-03-09 Kenichi Handa <handa@m17n.org>
3463 * input.c (load_input_method): If title is not specified, use the
3464 input method name as title.
3466 * m17n-X.c (get_color): Make it static.
3467 (xim_create_ic, xim_destroy_ic, x_error_handler)
3468 (x_io_error_handler): Likewise.
3470 2004-03-01 Kenichi Handa <handa@m17n.org>
3472 * Version 1.0 released.
3475 Copyright (C) 2003, 2004
3476 National Institute of Advanced Industrial Science and Technology (AIST)
3477 Registration Number H15PRO112
3479 This file is part of the m17n library.
3481 The m17n library is free software; you can redistribute it and/or
3482 modify it under the terms of the GNU Lesser General Public License
3483 as published by the Free Software Foundation; either version 2.1 of
3484 the License, or (at your option) any later version.
3486 The m17n library is distributed in the hope that it will be useful,
3487 but WITHOUT ANY WARRANTY; without even the implied warranty of
3488 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3489 Lesser General Public License for more details.
3491 You should have received a copy of the GNU Lesser General Public
3492 License along with the m17n library; if not, write to the Free
3493 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3494 Boston, MA 02110-1301, USA.