1 2006-11-10 Kenichi Handa <handa@m17n.org>
3 * input.c (preedit_commit): Update ic_info->commit_key_head.
4 (take_action_list): Reset ic_info->commit_key_head on Mundo.
5 (filter): When committed, shift keys by ic_info->commit_key_head.
7 2006-10-27 Kenichi Handa <handa@m17n.org>
9 * input.c (marker_code): New arg surrounding. Callers changed.
10 (surrounding_pos): Check if name[0] == '@'.
11 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
12 (take_action_list): Likewise.
13 (get_preceding_char): If POS is zero, always call
16 2006-10-19 Kenichi Handa <handa@m17n.org>
18 * input.c (load_variables): Fix setting of `global'.
20 2006-10-16 Kenichi Handa <handa@m17n.org>
22 * draw.c (draw_background): Be sure to set *to_x.
23 (render_glyph_string): If from == to, just return.
25 2006-10-18 Kenichi Handa <handa@m17n.org>
27 * database.c (get_dir_info): Return NULL if the directory name is
29 (register_databases_in_files): Call register_database with
31 (mdatabase__update): Fix logic. Call register_database with
33 (mdatabase_define): Call register_database with
36 * input.c (delete_surrounding_text): Be sure to set members
37 preceding_text and following_text to NULL.
38 (shift_state): Save variable values in ic_info->vars_saved.
39 (preedit_commit): Don't print debug information here. Don't
40 change ic_info->keys here.
41 (get_candidate_list): Don't ref plist.
42 (take_action_list): Don't unref return value of
43 get_candidate_list. For undo, reset ic->produced and recover
44 ic_info->vars. Be sure to set ic->candidate_list to NULL after
46 (init_ic_info): Set ic_info->vars_saved.
47 (fini_ic_info): Unref ic_info->vars_saved.
48 (re_init_ic): Be sure to set ic->candidate_list to NULL after
50 (filter): Be sure to set members preceding_text and following_text
51 to NULL. Print debug information about produced text. Delete
52 processed keys from ic_info->keys.
54 * input.h (MInputContextInfo): New member vars_saved.
56 2006-10-16 Kenichi Handa <handa@m17n.org>
58 * database.c (mdatabase__update): Fix the way to get db_info.
60 2006-10-02 Kenichi Handa <handa@m17n.org>
62 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
65 * font.c (xlfd_unparse_name): Adjusted for the change of
67 (font_score): Likewise.
68 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
70 * m17n-X.c (MFontX, _MFontX): Deleted.
71 (SET_SIZE, HAVE_SIZE): Deleted.
72 (free_display_info): Adjusted for the change of
73 disp_info->font_list format.
74 (xfont_registry_list): Likewise.
75 (xfont_open): Likewise.
76 (xfont_list): Likewise.
77 (xfont_encode_char): Ignore size to find a realized font.
78 (MRealizedFontXft): Change the order of members to make it
79 compatible with MRealizedFontFT.
81 2006-09-27 Kenichi Handa <handa@m17n.org>
83 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
84 (mfont_close): Add comments.
86 * mtext-lbrk.c (mtext_line_break): Add comment.
88 2006-09-26 Kenichi Handa <handa@m17n.org>
90 * input.c (minput_get_description): Handle description about
91 inclusion-only input methods.
93 2006-09-21 Kenichi Handa <handa@m17n.org>
95 * input.c (M_gettext): New variable.
96 (fully_initialize): Initialize M_gettext.
97 (check_description): New function.
98 (load_commands): Call check_description.
99 (config_all_commands): Be sure to unref pl.
100 (load_variables): Call check_description.
101 (config_all_variables): Be sure to unref pl.
102 (load_im_info): Call check_description.
104 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
106 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
107 and bind_textdomain_codeset.
109 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
111 2006-09-15 Kenichi Handa <handa@m17n.org>
113 * input.c (reload_im_info): Update custom and global info.
114 (init_ic_info): Fix previous change.
116 2006-09-14 Kenichi Handa <handa@m17n.org>
118 * database.c: Include <libgen.h>.
119 (mdatabase__lock): Make a directory if necessary.
121 * input.c (resolve_command): Adjusted for the format change of
122 configured_cmds member.
123 (load_commands, load_variables): Fix for errornous data handling.
124 (config_command, config_variable): New function.
125 (config_all_commands, config_all_variables): Renamed from
126 config_commands and config_variables. Utilize the above function.
127 (check_variable_value): Argument changed. Callers changed.
128 (load_im_info): Call config_all_commands and config_all_variables.
129 (init_ic_info): Adjusted for the format change of configured_vars
131 (minput__init): Initialize Mcustomized, Mconfigured, and
133 (Mcustomized, Mconfigured, Minherited): New variables.
134 (minput_get_command): Be sure to return NULL if an input method
135 use no local command.
136 (minput_get_variable): Be sure to return NULL if an input method
137 use no local variable.
138 (minput_config_command, minput_config_variable)
139 (minput_save_config): Adjusted for the format change of
140 configured_cmds and configured_vars members.
142 * plist.c (write_element): Delete superfluous ':'.
144 2006-09-13 Kenichi Handa <handa@m17n.org>
146 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
147 (minput_config_file): Extern it.
149 * draw.c (Minherited): Declaration moved to input.c.
150 (mdraw__init): Don't initialize Minherited here.
152 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
154 2006-09-07 Kenichi Handa <handa@m17n.org>
156 * textprop.c (mtext_serialize): Call mplist__serialize with the
159 * plist.h (mplist__serialize): Prototype adjusted.
160 (mplist__assq): Extern it.
162 * plist.c: Include <ctype.h>
163 (PUTC, PUTS): New macros.
164 (write_symbol): New function.
165 (write_element): New arg indent.
166 (dump_string, dump_plist_element): Delete them.
167 (mplist__from_string): New arg pretty.
168 (mplist__assq): New function.
169 (mdebug_dump_plist): Use write_element.
171 * mtext.c (mtext_cat_char): Allocate more memory.
172 (mdebug_dump_mtext): Don't escal a newline character.
174 * m17n.h (minput_get_command, minput_get_variable)
175 (minput_config_command, minput_config_variable)
176 (minput_save_config): Extern them.
178 * m17n-core.c: Include <string.h>.
179 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
180 use the stream stdout instead of a file of that name.
182 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
185 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
186 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
187 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
188 (MDEBUG_DUMP): Flush the stream.
190 * input.h (struct _MInputMethodInfo): Delete member im. New
191 members mdb, language, name, extra, cmds, configured_cmds,
192 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
193 (MInputContextInfo): New member tick.
195 * input.c: Big change to improve user-side input method
196 customization. Here, list just public API changes.
197 (minput_get_commands, minput_get_variables)
198 (minput_assign_command_keys, minput_set_variable): Label them
200 (minput_get_command, minput_get_variable)
201 (minput_config_command, minput_config_variable)
202 (minput_save_config): New functions.
204 * database.h (PATH_MAX): Define it if not yet defined.
205 (PATH_SEPARATOR): Likewise.
206 (enum MDatabaseStatus): New enum.
207 (struct MDatabaseInfo): Moved from database.c. New members status,
208 time, lock_file, and uniq_file.
209 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
210 (mdatabase__unlock): Extern them.
212 * database.c: Include <time.h>.
213 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
214 (GEN_PATH): Args changed. Callers changed.
215 (struct MDatabaseInfo): Moved to database.h.
216 (struct MDatabase, mdb_list): Deleted.
217 (mdatabase__list): New var.
218 (get_database_filename): Deleted. Callers changed to use
220 (find_file, get_database_file): New files.
221 (get_dir_info): Initialize new members of MDatabaseInfo.
222 (find_database): Arg chagnded. Callers changed.
223 (free_db_info, register_database, register_databases_in_files):
225 (update_database_list): Deleted.
226 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
227 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
228 (mdatabase__update): New function.
229 (mdatabase__check): Return value changed.
230 (mdatabase__file, mdatabase__lock, mdatabase__save)
231 (mdatabase__unlock): New functions.
233 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
235 * input.c (get_surrounding_text): Return -2 when surrounding text
237 (get_following_char): Likewise.
238 (get_preceding_char): Likewise.
239 (minput__callback): Return 0 if there is a callback function,
242 2006-08-17 Kenichi Handa <handa@m17n.org>
244 * input.c (reset_ic): Use shift_state to setup the current state.
246 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
248 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
249 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
250 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
252 2006-08-02 Kenichi Handa <handa@m17n.org>
254 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
256 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
258 * font-ft.c (ft_encapsulate): Add code for debugging.
259 (mfont__ft_drive_otf): Be sure to encode character before getting
262 2006-07-21 Kenichi Handa <handa@m17n.org>
264 * draw.c (mdraw_text_extents): Fix previous typo.
266 2006-07-19 Kenichi Handa <handa@m17n.org>
268 * draw.c (gstring_width): New arg lbearing.
269 (render_glyph_string): Adjusted for the change of gstring_width.
270 (mdraw_text_extents): Fix lbearing of ink and line metrics.
272 * m17n-core.h (Mlanguage): Extern it.
274 * m17n.h (Mlanguage): Extern deleted.
276 * mtext.c (mtext__init): Initialize Mlanguage.
277 (Mlanguage): Declaration moved from locale.c
279 * locale.c (mlocale__init): Don't initialize Mlanguage here.
280 (Mlanguage): Declaration moved to mtext.c.
282 * language.c (mlang__init): Don't initialize Mlanguage here.
284 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
286 2006-07-14 Kenichi Handa <handa@m17n.org>
288 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
289 (MRealizedFontFT): New member face_encapsulated.
290 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
291 (ft_gen_font): New function.
292 (ft_add_font): Use ft_gen_font.
293 (ft_list_script): Store lists in ft_script_list.
294 (ft_check_otf): New arg ft_face. Caller changed.
295 (ft_check_language): Likewise.
296 (ft_check_script): Likewise.
297 (ft_encapsulate, ft_close): New functions.
298 (mfont__ft_driver): Initialize members encapsulate and close.
299 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
301 * font.h (struct MRealizedFont): New member encapsulating.
302 (struct MFontDriver): New members encapsulate and close.
304 * font.c (mfont__match_p): If FONT is realized, check capability
305 by font drivers's check_capability method.
306 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
309 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
310 declarations of foundry and fam local vars.
311 (xft_driver): Make it static.
313 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
314 (mfont_close): Extern them.
316 * m17n-gd.c (device_open): Don't specify foundry and family of the
319 2006-07-11 Kenichi Handa <handa@m17n.org>
321 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
323 2006-07-13 Kenichi Handa <handa@m17n.org>
325 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
327 (ft_check_script): Delete unused var.
328 (ft_list_capability): Likewise.
330 * font.c (mfont__get_capability): Setup cap->otf.
331 (Motf): Make it global.
332 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
334 * font.h (MFontCapability): New member otf.
336 * language.c (mlang__fini): Delete unused vars.
338 * m17n-gui.h (Motf): Extern it.
340 * database.c (update_database_list): Delete unused vars.
342 2006-07-07 Kenichi Handa <handa@m17n.org>
344 * font-ft.c (DEVICE_DELTA): Fix typo.
346 2006-07-06 Kenichi Handa <handa@m17n.org>
348 * fontset.c (mfont__lookup_fontset): Don't ignore family and
351 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
353 * database.c: Update comments.
355 2006-07-05 Kenichi Handa <handa@m17n.org>
357 * database.c (PATH_MAX): Define it if not yet defined.
358 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
360 (get_database_filename): Use GEN_PATH.
361 (get_dir_info): Don't include the last '/' in directory name.
362 (register_database): New function.
363 (update_database_list): Use register_database. Search all
364 directories in mdatabase__dir_list for wildcard databases.
365 (mdatabase__init): Check "~/.m17n.d".
367 2006-07-03 Kenichi Handa <handa@m17n.org>
369 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
370 push reverse property.
372 * plist.c (dump_plist_element): Fix previous change.
374 2006-06-28 Kenichi Handa <handa@m17n.org>
376 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
379 * draw.c (MbidiNSM): New variable.
380 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
381 attention to bidi type NSM.
382 (mdraw__init): Initialize MbibiNSM.
384 * language.c (mscript__char_list): Fix finding a char-list element.
386 * plist.c (dump_string): Return number of printed characters.
387 (dump_plist_element): Print elements more compactly.
389 2006-06-23 Kenichi Handa <handa@m17n.org>
391 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
392 (include_HEADERS): Likewise.
394 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
396 * language.c: Update documentation.
398 2006-06-23 Kenichi Handa <handa@m17n.org>
400 * font-ft.c (struct MFontFT): Delete member lang.
401 (free_ft_info): Don't unref member lang. Destroy members langset
403 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
404 changed. Set members langset and charset.
405 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
407 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
409 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
410 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
411 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
412 characters at first. If it fails, try listing by language names.
413 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
414 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
415 change of MFontCapability.
416 (ft_list_capability): Likewise. Try listing by languages, then by
417 scripts. Check OTF at last.
418 (ft_check_script): New function.
419 (ft_select): Adjusted for the check of MFontCapability.
420 (ft_list_family_names): New function.
421 (ft_check_capability): If cap->script is not Mnil, call
423 (mfont__ft_driver): Initialize with ft_list_family_names.
425 * font.h (struct MFontDriver): New member list_fmaily_names.
426 (struct): Change member "MSymbol *lang" to "MSymbol language".
428 * font.c: Include "language.h".
429 (Motf): New variable.
430 (otf_script_list, load_otf_script_list): Delete it.
431 (find_script_from_otf_tag): Delete it.
432 (merge_capability): New function.
433 (mfont__init): Init Motf.
434 (mfont__fini): Don't unref otf_script_list.
435 (free_font_capability): Check cap->script_tag to determine if
436 OTF-related capability is set.
437 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
438 the change of type MFontCapability.
439 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
441 (mfont_list): Call merge_capability for LANGUAGE arg.
442 (mfont_list_family_names): New function.
444 * input-gui.c: Typo in comments fixed.
446 * input.c: Typo in comments fixed.
448 * language.h (mlanguage__list): Delete it.
449 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
452 * language.c: Include "mtext.h".
453 (M_script_lang_list): Delete it.
454 (language_list, script_list): New variables.
455 (load_lang_script_list, init_language_list, init_script_list): New
457 (mlang__init): Don't load language database here.
458 (mlang__fini): Unref language_list and script_list if not NULL.
459 (mlanguage__list): Delete it.
460 (mlanguage__info, mscript__info, mscript__char_list)
461 (mscript__otf_tag, mscript__from_otf_tag): New functions.
462 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
463 (mscript_list, mscript_language_list): New functions.
465 * m17n-gui.h (mfont_list_family_names): Extern it.
467 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
468 (mlanguage_text, mscript_list, mscript_language_list): Extern
471 2006-06-21 Kenichi Handa <handa@m17n.org>
473 * m17n-X.c (xfont_driver): Initialize with
474 xfont_list_family_names.
475 (xfont_list_family_names): New function.
476 (xft_driver): Initialize with NULL for list_family_names member.
477 (device_init): Set list_family_names member of xft_driver to that
480 2006-06-06 Kenichi Handa <handa@m17n.org>
482 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
484 2006-03-24 Kenichi Handa <handa@m17n.org>
486 * font-ft.c (ft_open): Improve debug message.
488 * fontset.c (mfontset__get_font): Fix for the case that no font in
489 per_script list is available.
491 2006-02-06 Kenichi Handa <handa@m17n.org>
493 * Version 1.3.3 released.
495 2006-02-22 Kenichi Handa <handa@m17n.org>
497 * textprop.c: Fix some typos in documentation.
499 * plist.c: Fix some typos in documentation.
501 * m17n-core.h: Fix some typos in documentation.
502 (M17NLIB_PATCH_LEVEL): Updated to 3.
503 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
505 * symbol.c: Fix some typos in documentation.
507 * mtext.c: Fix some typos in documentation.
509 * input.c: Fix several typos in documentation.
511 2006-02-06 Kenichi Handa <handa@m17n.org>
513 * Version 1.3.2 released.
515 2006-02-03 Kenichi Handa <handa@m17n.org>
517 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
518 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
520 * font.c (xlfd_parse_name): Fix handling of the name "nil".
522 * draw.c (layout_glyphs): Fix handling left_padding of
525 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
527 2006-02-02 Kenichi Handa <handa@m17n.org>
529 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
532 2006-01-25 Kenichi Handa <handa@m17n.org>
534 * input.c (resolve_expression): If the value of PLIST is a plist,
535 but the first element is not symbol, return 0.
537 2006-01-17 Kenichi Handa <handa@m17n.org>
539 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
540 HAVE_GD is 2 or the greater.
542 2006-01-16 Kenichi Handa <handa@m17n.org>
544 * Version 1.3.1 released.
546 2006-01-16 Kenichi Handa <handa@m17n.org>
548 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
549 simulating anti-aliasing.
551 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
552 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
554 2006-01-12 Kenichi Handa <handa@m17n.org>
556 * input.c (get_surrounding_text): Always pop ic->plist.
557 (reset_ic): Don't reset ic->plist.
559 2006-01-10 Kenichi Handa <handa@m17n.org>
561 * input.c (preedit_commit): For debugging, print only commiting
562 charactes. Don't set ic->candidate_show to 0.
563 (handle_key): Don't run branch-actions just by shifting to the
565 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
566 Reset vars and plist.
568 2006-01-07 Kenichi Handa <handa@m17n.org>
570 * input.c (load_branch): Confirm that maps is not NULL.
572 2006-01-05 Kenichi Handa <handa@m17n.org>
574 * input-gui.c (win_filter): Try to convert arg to key only when
577 * plist.c (read_integer_element): If '#' and '-' are followed by
578 non-integer-constituent, read them as a part of a symbol.
579 (read_symbol_element): New arg C.
580 (read_element): Adjust args to read_symbol_element.
582 * input.c (load_macros): On overwriting a macro, free the old
584 (minput__init): Store Mmap in load_im_info_keys.
585 (minput_get_title_icon): If the input method has no title, be sure
587 (minput_get_description): If the input method has no description,
588 be sure to return NULL.
589 (minput_get_variables): Fix documentation.
590 (handle_key): Pay attention to the case that key is Mnil.
591 (filter): Likewise. Fix handling of such symbol as S-A.
593 2005-12-22 Kenichi Handa <handa@m17n.org>
595 * Version 1.3.0 released.
597 2005-12-22 Kenichi Handa <handa@m17n.org>
599 * font-ft.c (ft_list): If the specified font has no property,
602 2005-12-20 Kenichi Handa <handa@m17n.org>
604 * character.c (mchar_get_prop): Check char_prop_list.
605 (mchar_put_prop, mchar_get_prop_table): Likewise.
607 2005-12-18 Kenichi Handa <handa@m17n.org>
609 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
610 file name sans language.
612 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
614 * input.c: Fix typo in comments.
616 2005-12-14 Kenichi Handa <handa@m17n.org>
618 * input.c (minput_get_title_icon): Check the default icon for the
621 2005-12-13 Kenichi Handa <handa@m17n.org>
623 * input.c (Mless_equal, Mgreater_equal): New variables.
624 (parse_expression, resolve_expression, parse_action_list)
625 (take_action_list): Handle the aboves.
626 (filter): Treat key S-X as X.
627 (minput__init): Initialize Mless_equal and Mgreater_equal.
628 (minput_get_title_icon): New function.
630 * m17n.h (minput_get_title_icon): Extern it.
632 * database.c (get_database_filename): Return a filename instead of
634 (load_database): Adjusted for the above change.
635 (mdatabase__load_for_keys): Likewise.
636 (mdatabase__find_file): New function.
638 * database.h (mdatabase__find_file): Extern it.
640 * font.h (mfont__resize): Delete extern.
642 * font.c (mfont__list): Check resize ratio.
643 (mfont__resize): Delete it.
644 (mfont_resize_ratio): Include the code of mfont__resize.
646 * font-ft.c (ft_open): Check resize ratio.
648 * m17n-X.c (xfont_open): Check resize ratio.
649 (xft_open): Likewise.
651 2005-12-07 Kenichi Handa <handa@m17n.org>
653 * input.c (take_action_list): If take_action_list return -1,
655 (handle_key): Likewise.
657 * face.c (mface__for_chars): When font is specified and layouter
658 is found for it, if the layouter doesn't support one of a
659 character, use a face sans layouter for it.
661 2005-12-06 Kenichi Handa <handa@m17n.org>
663 * fontset.c (mfont__lookup_fontset): If only a fallback font is
664 found, don't use it for more than one character.
666 2005-12-05 Kenichi Handa <handa@m17n.org>
668 * face.c (mface__realize): Set rfont->layouter to Mnil.
669 (mface__for_chars): Fix handling of layouter.
671 * character.h (mchar__define_prop): Extern it.
673 * database.c (update_database_list): Call mchar__define_prop if
676 * character.c (mchar__init): Don't call mchar_define_property.
677 Instead just initialize property keys.
678 (mchar__fini): Free char_prop_list only if it's not NULL.
679 (mchar__define_prop): New function.
680 (mchar_define_property): Call mchar__define_prop.
682 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
685 2005-12-02 Kenichi Handa <handa@m17n.org>
687 * language.c (mlang__init): Handle extra chars.
689 * m17n-gui.h (mfont_check): Adjust prototype.
691 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
692 (xfont_check_capability): New function.
693 (xft_driver): Specify xft_check_capability.
694 (xft_check_capability): New function.
696 * font-ft.c (M0_3): Delete it.
698 (ft_get_charmaps): Refer to M0.
699 (fc_parse_pattern): Fix previous change.
700 (ft_list_language): Check also extra chars.
701 (ft_check_otf): Define it even if HAVE_OTF is undef.
702 (ft_check_lang): Check the result of FcLangSetHasLang against
703 FcLangDifferentLang. Check also extra chars.
704 (ft_list_capability): Delete ifdef HAVE_OTF.
705 (ft_select): Likewise.
706 (ft_open): Improve debug information.
707 (ft_check_capability): New function.
708 (mfont__ft_driver): Specify ft_check_capability.
709 (mfont__ft_init): Initialize M0.
711 * fontset.c (get_font_from_group): New function.
712 (mfontset__get_font): New function.
714 * fontset.h (mfontset__get_font): Extern it.
716 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
717 (mfont__fini): Delete ifdef HAVE_OTF.
718 (free_font_capability): Likewise.
719 (mfont__get_capability): Likewise.
720 (mfont__check_capability): New function.
721 (mfont_check): Change the order of arguments. Use
724 * font.h (struct MFontDriver): New member check_capability.
725 (MFontCapability): Delete ifdef HAVE_OTF.
726 (mfont__check_capability): Extern it.
728 * face.c (mface__realize): Fix handling of FONT arg.
729 (mface__for_chars): Fix handling of explicitly specified font.
731 2005-11-25 Kenichi Handa <handa@m17n.org>
733 * font-flt.c (run_command): Print debug info for
736 * draw.c (layout_glyphs): Fix handling of left/right_padding.
738 * face.c (mface__for_chars): Check rfont before accessing the
741 2005-11-21 Kenichi Handa <handa@m17n.org>
743 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
746 * fontset.c (fontset_table): New variable.
747 (free_fontset): Call M17N_OBJECT_UNREGISTER.
748 (mfont__fontset_init): Add fontset_table as an object array.
749 (mfont__realize_fontset): Ref FONTSET.
750 (mfont__free_realized_fontset): Unref REALIZED->fontset.
751 (mfontset): Call M17N_OBJECT_REGISTER.
752 (mfontset_copy): Likewise.
754 * input.c (handle_key): For debugging, print information about
756 (filter): Add an alias for Meta and Alt modifiers.
757 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
759 (minput__init): Initialize them.
760 (parse_expression): New function.
761 (resolve_expression): New function.
762 (parse_action_list): Handle expressions by parse_expression.
763 (take_action_list): Handle expressions by resolve_expression.
764 (parse_nested_list_value): Fix previous change.
765 (resolve_command): Fix handling of the return value of
768 2005-11-18 Kenichi Handa <handa@m17n.org>
770 * font-ft.c (ft_check_otf, otf_script_list): Define only when
772 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
774 (ft_select): Likewise.
776 * font.c (mfont_list): Fix for the case that FONT is NULL.
777 (OTF_tag): Delete it.
778 (load_otf_script_list): Define only when HAVE_OTF is defined.
779 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
782 * draw.c (truncate_gstring): Be sure to truncate at
783 glapheme-cluster boundary.
785 2005-11-11 Kenichi Handa <handa@m17n.org>
787 * input.c (delete_surrounding_text): Clear cache if necessary.
789 2005-11-09 Kenichi Handa <handa@m17n.org>
791 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
792 glyph prev is also supported by the current flt.
794 2005-11-08 Kenichi Handa <handa@m17n.org>
796 * m17n-X.c (xft_render): Cancel previous change.
798 2005-11-07 Kenichi Handa <handa@m17n.org>
800 * input.c: Include <stdlib.h>.
801 (get_surrounding_text, delete_surrounding_text)
802 (get_preceding_char, get_following_char): New functions.
803 (integer_value): New arg surrounding. If it is nonzero, try to
804 get a surrounding character. Callers changed.
805 (take_action_list): Check `value' before setting an element.
806 (destroy_ic): Unref ic_info->preceding_text and
807 ic_info->following_text.
808 (minput__init): Initialize Minput_get_surrounding_text and
809 Minput_delete_surrounding_text.
810 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
812 (filter): Unref ic_info->preceding_text and
813 ic_info->following_text.
815 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
818 * input.h (MInputContextInfo): New members preceding_text and
821 2005-11-04 Kenichi Handa <handa@m17n.org>
823 * input.c (parse_nested_list_value): Fix handling of the global
825 (get_nested_list): Get global definitions by load_partial_im_info.
826 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
827 MInputCandidatesChanged.
828 (take_action_list): Likewise.
829 (reset_ic): Likewise.
830 (create_ic): Don't pay special attention to
831 Mcandidates_group_size.
832 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
833 (minput_set_variable): Get a definition of varible by
834 mplist_find_by_value, not mplist_get.
836 * m17n.h (enum MInputCandidatesChanged): New enum.
838 2005-11-01 Kenichi Handa <handa@m17n.org>
840 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
842 (mwin__destroy_window): If xft_draw's drawable is win, change it
843 to device->drawable before destroying win.
845 2005-10-31 Kenichi Handa <handa@m17n.org>
847 * input.c (load_im_info): Fix adding of state.
849 * m17n-core.c (m17n_fini_core): Fix reporting of module
852 * m17n.c (m17n_fini): Fix reporting of module finalization.
854 * m17n-gui.c (m17n_init_win): Fix reporting of module
857 2005-10-29 Kenichi Handa <handa@m17n.org>
859 * input.c (get_candidate_list): Fix the timing of referring plist.
861 2005-10-28 Kenichi Handa <handa@m17n.org>
863 * input.c (load_branch): Ignore an undefined map name.
864 (load_im_info): Set im_info->title from `name' only if it's not
866 (shift_state): Always update ic->status.
867 (adjust_candidates): Renamed from adjust_candidate_command.
868 Argument changed. Caller changed.
869 (get_candidate_list, regularize_action): New functions.
870 (take_action_list): Use them. On handling Munhandle, don't set
872 (handle_key): If KEY is not handled by MAP, and MAP has
873 branch_actions, perform them.
875 * database.c (mdatabase__fini): Free dir_info->filename;
877 2005-10-20 Kenichi Handa <handa@m17n.org>
879 * input.c (marker_code): Accept '@@'.
880 (integer_value): Handle '@@'.
881 (parse_action_list): Accept a symbol argument.
882 (take_action_list): Resolve the symbol argument. Handle the
885 2005-10-18 Kenichi Handa <handa@m17n.org>
887 * input.c: Include "charset.h".
888 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
890 (MIMState): New member (M17NObject control).
891 (lookup_nested_list, set_nested_list, parse_nested_list_value)
892 (get_nested_list, resolve_variable): New functions.
893 (integer_value): New arg (MPlist **value). Set it to the plist
894 element containing the value.
895 (resolve_command): New function.
896 (load_translation): New arg (MPlist *map_actions).
897 (load_branch): New args language and name. If `keylist' is a
898 symbol, resolved that as a command name.
899 (free_map): New arg top. Free map->map_actions only if top is
901 (free_state): New function.
902 (load_state): New arg name.
903 (im_info_list): New variable.
904 (free_im_info, get_im_info_by_tags): New functions.
905 (load_im_info): Arg key changed to plist. Handle `include'.
906 Return (MInputMethodInfo *).
907 (preedit_commit): Ref ic->candidate_list.
908 (get_select_charset, adjust_candidate_command): New functions.
909 (take_action_list): Handle `include'. Adjust candidate action
910 properly. Handle control variables `candidates-charset' and
911 `candidates-group-size'.
912 (open_im): Use get_im_info.
913 (create_ic): Get global variables.
914 (load_partial_im_info): New function.
915 (get_im_info): New function.
916 (check_command_keyseq, check_command_list, check_variable_list):
918 (minput__init): Don't handle M_database_hook and Mdetail_text.
919 Initialize M_candidates, Mcandidates_group_size,
921 (parse_variable_list, get_variable_list, parse_command_list)
922 (get_command_list): Delete them.
923 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
924 (minput__fini): Simply unref command_list and variable_list.
925 (minput_get_description): Adjusted for the new form of description.
926 (minput_get_commands): Use get_nested_list.
927 (minput_assign_command_keys): Likewise.
928 (minput_get_variables, minput_set_variable): Likewise.
930 * input.h (MInputMethodInfo): New members im and maps.
932 * database.h (M_database_hook): Delete extern.
933 (MDatabaseHookFunc): Delete extern.
934 (mdatabase__check): Extern it.
936 * database.c: Include <glob.h>.
937 (MAX_TIME): New macro.
938 (Masterisk): New variable.
939 (get_database_stream): Argument changed to (MDatabaseInfo *).
941 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
942 (find_database): New function.
943 (update_database_list): New function.
944 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
945 calling update_database_list.
946 (mdatabase__check): New function.
947 (mdatabase_find): Use update_database and find_database. Don't
948 handle MDatabaseHookFunc.
949 (mdatabase_list): Call update_database at first.
950 (mdatabase_define): Adjusted for the change of mdb->extra_info.
951 (MDatabaseList): New type.
953 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
955 * m17n.h (Mdetail_text): Delete extern.
957 * m17n-core.h (mplist_conc): Delete extern.
959 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
961 (mplist_conc): Renamed to mplist__conc.
962 (mplist__pop_unref): New function.
964 2005-10-14 Kenichi Handa <handa@m17n.org>
966 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
968 (read_element): If keys is an empty plist, return any element
970 (dump_plist_element): Check if plist is nested.
971 (mplist_conc): Always ref tail.
972 (mplist_set): If key is a managing key, ref val in advance.
974 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
975 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
976 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
979 * fontset.c (free_fontset): Unref fontset_list if necessary.
980 (mfont__fontset_fini): Don't free fontset_list. Unref
982 (mfont__realize_fontset): Initialize request.
983 (mfontset): Ref default_fontset or fontset only if necessary.
984 (mfontset_copy): Don't ref copy.
986 * draw.c (render_glyphs): Check gend->type before checking
989 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
990 unrefed plists to NULL.
992 2005-10-04 Kenichi Handa <handa@m17n.org>
994 * textprop.c (mtext_serialize): Be sure to make mt
995 MTEXT_FORMAT_UTF_8 and NULL terminated.
997 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
999 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1001 2005-10-03 Kenichi Handa <handa@m17n.org>
1003 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1004 is not at the beginning of line.
1006 2005-09-22 Kenichi Handa <handa@m17n.org>
1008 * input.c: Include <sys/stat.h> and <unistd.h>.
1009 (Minclude, Mcommit, Munhandle): New variables.
1010 (minput__init): Initialize them. Push only Mstate to
1011 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1012 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1014 (load_input_method): Handle "include" directive. If no states are
1016 (shift_state): If state_name is Mt, shift back to the previous
1017 state. Call preedit_commit to commit preedit text.
1018 (preedit_commit): New function.
1019 (take_action_list): Improve debug printing. Handle commit and
1021 (handle_key): Check the return value of take_action_list. Don't
1022 take branch_actions just after changing to the root map.
1023 (reset_ic): Reset all ic_info members.
1024 (filter): When a key is not handled, just move ic_info->keys
1025 instead fo calling reset_ic.
1026 (load_im_info): If key is not Mstate, push Mmap to
1028 (MDatabaseStatList): New type.
1029 (imdir_stat_list): New variable.
1030 (input_method_hook): Don't cancel the hook. Check the
1031 modification time of directories.
1032 (minput__fini): Free imdir_stat_list;
1034 * input.h (MInputContextInfo): New member prev_state.
1036 * m17n-core.h (mplist_conc): Extern it.
1038 * plist.c (mplist_conc): New function.
1040 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1042 * font.h (MRealizedFont): New member average_width.
1044 * font-ft.c (ft_open): Set rface->average_width.
1046 * font.c (xlfd_unparse_name): Print '*' before registry name.
1048 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1049 (xfont_open): Set rfont->average_width.
1050 (xft_open): Likewise.
1051 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1053 * internal-gui.h (struct MFrame): New member average_width.
1055 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1056 (mframe_get_prop): Return the average_width of a font.
1058 * face.c (mface__realize): Set rface->average_width.
1059 (mface__update_frame_face): Set frame->average_width.
1061 * face.h (MRealizedFace): New member average_width.
1063 2005-09-19 Kenichi Handa <handa@m17n.org>
1065 * font.c (xlfd_unparse_name): New arg full_xlfd.
1066 (mfont__encode_char): Use shortcut only for X core fonts.
1067 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1068 (mfont_put_prop): Handle `language' property.
1069 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1070 Print file can capability info too.
1072 * m17n-core.c (mdebug__output): New variable.
1073 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1074 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1075 (m17n_fini_core): Close mdebug__output if it's not stderr.
1077 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1078 (xfont_open): Handle baseline_offset.
1079 (xfont_find_metric): Likewise.
1080 (xfont_render): Likewise.
1081 (xft_open): Likewise.
1082 (xft_render): Likewise.
1084 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1085 (mdebug__output): Extern it.
1086 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1087 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1088 (MDEBUG_DUMP): New macro.
1089 (MDEBUG_PRINT_TIME): Print to medebug__output.
1091 * font.h (MRealizedFont): New member baseline_offset.
1093 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1095 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1096 (ft_list_family): Check alias.
1097 (ft_list_language): If language is "en", don't try to the second
1099 (ft_default_list): New variable.
1100 (ft_list_default): New function.
1101 (ft_select): If family is not specified, try only the default
1102 fonts. Treat the weights normal and medium same.
1103 (ft_open): Fix debug message. If registry is not specified, try
1104 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1105 (ft_find_metric): Likewise.
1106 (ft_render): Likewise.
1107 (ft_list): Fix debug message. Accept the registring iso8859-1.
1108 If family is not specified, try only the default fonts.
1110 * face.c (mface__realize): Fix logic of opening a font.
1112 2005-09-16 Kenichi Handa <handa@m17n.org>
1114 * face.c (mface__realize):
1116 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1119 * input.c (shift_state): Fix the condition of taking init actions.
1120 (take_action_list): Fix handling of pushback action.
1121 (handle_key): Don't change key while checking its alias.
1122 (minput__init): Initialize new variables.
1123 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1126 2005-09-12 Kenichi Handa <handa@m17n.org>
1128 * mtext.c (mtext__uppercase): Add proper open/close parens.
1129 (mtext_titlecase): Add proper casting.
1131 * input.c (parse_action_list): Handle the case that the arg is a
1132 key sequence (MText or MPlist).
1133 (take_action_list): Likewise.
1134 (shift_state): Shorter debug message.
1135 (handle_key): Terminate a debug message by "\n".
1136 (reset_ic): Don't take initial actions here.
1137 (minput_open_im): Print a debug message.
1138 (minput_close_im): Likewise.
1139 (minput_create_ic): Likewise.
1140 (minput_destroy_ic): Likewise.
1142 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1144 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1147 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1148 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1151 * character.c: Add Japanese documentation for
1152 mchar_get_prop_table ().
1154 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1156 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1157 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1158 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1160 (init_case_conversion): New function.
1161 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1162 (uppercase_precheck, lowercase_precheck, final_sigma)
1163 (after_soft_dotted, more_above, before_dot, after_i)
1164 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1166 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1168 * plist.c (read_mtext_element): Fix previous change.
1170 2005-09-05 Kenichi Handa <handa@m17n.org>
1172 * plist.c (read_mtext_element): Handle \uXXXX notation.
1174 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1175 (MTABLE_ALLOCA): Change the name of local variable.
1177 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1178 HAVE_FREETYPE are defined.
1180 * m17n-X.c: Check HAVE_X11.
1182 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1183 directory listing libraries.
1184 (noinst_PROGRAMS): Define it only in maintainer mode.
1186 2005-09-02 Kenichi Handa <handa@m17n.org>
1188 * m17n-gui.h (mdraw_line_break_option): Extern it.
1190 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1191 end of the first glyph.
1192 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1194 (mdraw_line_break_option): New variable.
1195 (mdraw_default_line_break): Use mtext_line_break.
1197 * mtext.h (wordseg_func_table): Don't extern it.
1198 (mtext__wseg_fini): Extern it.
1200 * mtext.c: Don't include word-thai.h.
1201 (wordseg_func_table): Delete this variable.
1202 (mtext__init): Don't initialize above. Don't call
1203 mtext__word_thai_init.
1204 (mtext__fini): Don't free wordseg_func_table. Call
1205 mtext__wseg_fini instead fo mtext__word_thai_fini.
1206 (MTextWordsegFunc): Don't typedef it.
1207 (mtext__word_segment): Moved to mtext-wseg.c.
1209 * m17n-core.h (enum MTextLineBreakOption): New enum.
1210 (mtext_line_break): Extern it.
1212 * mtext-wseg.c: New file.
1214 * mtext-lbrk.c: New file.
1216 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1217 add mtext-lbrk.c and mtext-wseg.c.
1219 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1220 the case that head is NULL.
1222 2005-09-01 Kenichi Handa <handa@m17n.org>
1224 * word-thai.c (wordseg_propertize): If the property value is nil,
1225 don't make the property no-merge.
1226 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1227 attention to the case that they are NULL.
1228 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1231 * character.c (mchar_get_prop_table): New function.
1233 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1235 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1236 (mchar_get_prop_table): Extern it.
1238 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1239 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1241 * internal.h (enum MTextCoverage): New enum.
1242 (MText): New member coverage.
1244 * mtext.c (FORMAT_COVERAGE): New macro.
1245 (insert): Copy mt2->coverage.
1246 (mtext__from_data): Initialize mt->coverage.
1247 (mtext__adjust_format): Update mt->coverage.
1248 (mtext): Initialize mt->coverage.
1249 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1250 Update mt->coverage if necessary.
1251 (mtext_duplicate): Copy mt->coverage.
1252 (mtext_insert, mtext_replace): New functions.
1253 (mtext_dup): Use mtext_duplicate.
1254 (mtext__word_segment): Don't set *from and *to if a word
1255 segmentation funcion is not found.
1256 (mtext_ins_char): Fix typo.
1258 2005-08-25 Kenichi Handa <handa@m17n.org>
1260 * font.h (MFont): New member for_full_width.
1262 * font.c (compare_font_score): Prefer a font of not
1265 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1266 registry charset of a font is one of CJK charsets.
1268 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1269 supports some of CJK.
1271 2005-08-24 Kenichi Handa <handa@m17n.org>
1273 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1275 * m17n-gui.c (null_device_open): Check Mresolution param and set
1278 * m17n-gd.c (device_open): Check Mresolution param and set
1281 * m17n-X.c (MWDevice): New member resy.
1282 (xfont_open): Set ascent, descent, and max_advance members of
1284 (xft_open): Likewise.
1285 (device_open): Compare also screen_num to find a device. Set
1286 device->resy and frame->dpi.
1288 * internal-gui.h (MFrame): New member dpi.
1290 * font.h (MRealizedFont): New member max_advance.
1292 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1293 (mfont__init): Don't initialize Mascent, Mdescent.
1294 (Mascent, Mdescent): Delete these variables.
1295 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1296 Mfont_descent instead of Mascent and Mdescent.
1297 (mfont_put_prop): Allow negative size.
1298 (mfont_find): Handle the case of spec->size < 0. Fix previous
1300 (mfont_list): Handle the case of spec->size < 0.
1301 (mfont_check): Likewise.
1303 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1304 (fc_get_pattern): Handle the case of font->size < 0.
1305 (ft_open): Set ascent, descent, and max_advance members of rfont.
1306 (ft_find_metric): Improve rounding.
1307 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1310 * face.c (mface__realize): Handle the case of font->size < 0.
1312 2005-08-22 Kenichi Handa <handa@m17n.org>
1314 * coding.c (MConverterStatus): Change the member buf to union.
1315 (mconv_buffer_converter): Add const to the arg buf.
1316 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1317 (mconv_decode): Adjusted for the change of MConverterStatus.
1318 (mconv_encode_range): Likewise.
1320 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1321 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1323 2005-08-20 Kenichi Handa <handa@m17n.org>
1325 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1326 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1328 * m17n-X.c (xfont_open): Set members ascent, descent, and
1329 max_advance of rfont.
1330 (xft_open): Likewise.
1332 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1334 (mfont__ft_parse_name): Add const to the arg name.
1336 * font.c (xlfd_parse_name): Add const to the arg name. Call
1337 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1338 (xlfd_unparse_name): Handle spacing.
1339 (mfont__init): Initialize new variables.
1340 (mfont__id): Handle spacing.
1341 (mfont__merge): Likewise.
1342 (mfont__set_spec): This function deleted.
1343 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1344 condition of calling mfont__ft_parse_name.
1345 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1346 (mfont_get_prop): Handle properties spacing, ascent, descent,
1348 (mfont_find): Return a realized font.
1349 (mfont_from_name): Add const to the arg name.
1351 * font.h (enum MFontProperty): New member MFONT_SPACING.
1352 (enum MFontSpacing): New enum.
1353 (MFont): New members spacing and max_advance.
1354 (mfont__ft_parse_name): Prototype adjusted.
1355 (mfont__set_spec): Extern deleted.
1356 (mfont__parse_name_into_font): Prototype adjusted.
1358 2005-08-19 Kenichi Handa <handa@m17n.org>
1360 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1362 * font.c (mfont_list): If FONT is null, use a temporary font.
1363 (mfont_parse_name): Add const to the arg name.
1365 2005-08-18 Kenichi Handa <handa@m17n.org>
1367 * word-thai.c: Surround code by #ifdef and #endif to escape from
1370 * font-ft.c: Mostly re-written.
1372 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1373 (FontLayoutCmd): Type of the member otf changed..
1374 (load_otf_command): Adjusted for the format change of otf command.
1375 (load_command): Likewise.
1376 (free_flt_command): Unref cmd->body.otf.
1377 (run_otf): Ajusted for the type change of otf_cmd.
1378 (run_command): Ajusted for the type change of otf_cmd. On
1379 debugging, print ctx->combining_code.
1380 (mfont__flt_run): Initialize ctx's members code_offset,
1381 combining_code, and left_padding to 0.
1383 * face.h (struct MRealizedFace): New member font.
1384 (mface__realize): Prototype adjusted.
1386 * face.c (find_realized_face): New arg font.
1387 (find_realized_face): Adjusted for the change of MFont.
1388 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1389 (mface__fini): Don't call mdebug__report_object.
1390 (mface__realize): New arg font.
1391 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1392 Optimize the latin case.
1393 (mface__free_realized): Free rface->font.
1394 (mface__update_frame_face): Adjusted for the change of mface__realize.
1395 (mface_equal): New function.
1397 * draw.c (Mcommon): New variable.
1398 (visual_order): Args to mfont__encode_char changed.
1399 (compose_glyph_string): Handle Mfont text property.
1400 (layout_glyphs): Adjusted for the change of MFont.
1401 (mdraw__init): Initialize Mcommon.
1402 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1404 * font.h (enum MFontType): Members completely changed.
1405 (enum MFontProperty): Move MFONT_SIZE to the tail.
1406 (enum MFontSource): New enum.
1407 (struct MFont): New members type, source, sizes, file, capability,
1409 (struct MRealizedFont): Type of member font changed. Members
1410 score, status, and encoding deleted.
1411 (MFontScore): New type.
1412 (MFontList): Member changed.
1413 (struct MFontDriver): New member has_char. Types of members
1415 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1416 (Mapple_roman): Extern them.
1417 (OTF_Tag): Typedefed if not HAVE_OTF.
1418 (enum MFontOpenTypeTable): New enum.
1419 (MFontCapability): New type.
1420 (mfont__ft_drive_otf): Prototype adjusted.
1421 (mfont__score): Extern deleted.
1422 (mfont__merge): Extern it.
1423 (mfont__has_char): Extern it.
1424 (mfont__encode_char): Prototype adjusted.
1425 (mfont__open): Extern it.
1426 (mfont__set_spec): Prototype adjusted.
1427 (mfont__get_capability): Extern it.
1429 * font.c: Include "fontset.h".
1430 (M_font_capability, M_font_list, M_font_list_len): New variables.
1431 (font_score_priority): Change order of initial elements.
1432 (font_score_shift_bits): Fix array size.
1433 (common_weight): Add "thin", "semibold", and "heavy".
1434 (common_stretch): Add "ultracondensed", "extracondensed",
1435 "extraexpanded", and "utltraexpand".
1436 (font_weight_regular, font_weight_normal, font_weight_medium): New
1438 (gen_font_name): This function deleted.
1439 (find_encoding): Set font->encoding.
1440 (OTF_tag): New function.
1441 (otf_script_list): New variable.
1442 (load_otf_script_list): New function.
1443 (find_script_from_otf_tag): New function.
1444 (xlfd_parse_name): Set font->type and font->source.
1445 (mfont__free_realized): Free chains rfonts.
1446 (font_score): Renamed from mfont__score.
1447 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1448 (Mapple_roman): New variables.
1449 (mfont__init): Initilize new variables. Initalize
1450 default_encoding.encoding_name and
1451 default_encoding.encoding_charset to Municode_full and
1452 mcharset__unicode. Use SAFE* macros for allocating filepath
1454 (mfont__fini): Free otf_script_list.
1455 (mfont__id): New function.
1456 (mfont__match_p): Check also capability member of MFont.
1457 (mfont__merge): New funciton.
1458 (mfont__set_spec_from_face): Set type and source members.
1459 (mfont__set_spec_from_plist): Set capability and type members.
1460 (mfont__select): Argument changed.
1461 (mfont__available): New function.
1462 (compare_font_score): New function.
1463 (mfont__list): New function.
1464 (mfont__open): Return a realized font.
1465 (mfont__resize): Adjusted for the change of MFont.
1466 (mfont__has_char): New function.
1467 (mfont__encode_char): Argument changed.
1468 (mfont__set_spec): Argument changed.
1469 (free_font_capability): New function.
1470 (mfont__get_capability): New function.
1471 (MFontfile): New variable.
1472 (mfont_get_prop): Adjusted for the change of MFont.
1473 (mfont_put_prop): Likewise.
1474 (mfont_set_selection_priority): Fix the way of setting
1475 font_score_priority[].
1476 (mfont_find): Use mfont__list instead of mfont__select.
1477 (mfont_resize_ratio): Adjusted for the change of MFont.
1478 (mfont_list): Use mfont__list.
1479 (mfont_check): New function.
1480 (font_score): Make it static.
1482 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1483 (mfont__lookup_fontset): Likewise.
1485 * fontset.c (struct MFontset): Delete member font_spec_list.
1486 (struct MRealizedFontset): Type of member spec changed. New
1488 (load_font_group): Arg spec_list deleted.
1489 (load_fontset_contents): Adjusted for the change of fontset_def.
1490 (free_fontset): Fix the way of freeing fontset elements.
1491 (realize_fontset_elements): Argument changed.
1492 (get_per_script): New function.
1493 (free_realized_fontset_elements): Fix the way of feeing rfontset
1495 (update_fontset_elements): Fix args to realize_fontset_elements.
1496 (mfont__realize_fontset): New arg spec.
1497 (try_font_list): New function.
1498 (try_font_group): New arg request. Use try_font_list.
1499 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1501 (mfontset): Adjusted for the change of MFontset.
1502 (mfontset_copy): Likewise. Don't share plists.
1503 (mfontset_modify_entry): Adjusted for the change of MFontset.
1504 (mfontset_lookup): Call get_per_script.
1505 (mdebug_dump_fontset): Print also the address of fonts.
1507 * input.c (shift_state): Don't reset ic_info->vars.
1508 (take_action_list): Call MDEBUG_PRINT fore calling
1511 * internal-gui.h (MFontDriver): Don't typedef it here.
1513 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1514 (MXFont): This type deleted.
1516 (struct _MFontX): New struct.
1517 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1518 (MDisplayInfo): Member base_font_list deleted.
1519 (DEFAULT_FONT): Definition changed.
1520 (FALLBACK_FONT): This maclr deleted.
1521 (free_display_info): Adjusted for the change of MDisplayInfo.
1522 (free_device): Argument to mfont__free_realized changed.
1523 (xfont_driver): Adjusted for the change of MFontDriver.
1524 (xfont_registry_list): Use MFontX instead of MXFont.
1525 (MRealizedFontX): Renamed from MXFontInfo.
1526 (xfont_select): Return the font found first.
1527 (close_xfont): Change MXFontInfo to MRealizedFontX.
1528 (xfont_open): Return the realized font.
1529 (xfont_find_metric): Get xfont from rfont->fontp.
1530 (xfont_has_char): New function.
1531 (xfont_encode_char): Adjusted for the argument change.
1532 (xfont_render): Get xfont from rfont->fontp.
1533 (xfont_list): Adjusted for the argument change.
1534 (MRealizedFontXft): Renamed from MXftFontInfo.
1535 (xft_driver): Ajusted for the change of MFontDriver.
1536 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1537 (xft_open_font): Argument changed.
1538 (xft_open): Argument changed. Return the realized font.
1539 (xft_find_metric): Get xft_font from rfont->fontp.
1540 (xft_has_char, xft_encode_char): New functions.
1541 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1542 font if not yet opened.
1543 (device_open): Don't set frame->font.
1545 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1547 (gd_font_open): New function.
1548 (gd_render): Don't use the local variable ft_info.
1549 (device_init): Adjusted for the change of gd_font_driver.
1551 * textprop.c (mtext__prop_init): Initialize text_property_table.
1552 Call M17N_OBJECT_ADD_ARRAY.
1553 (mtext__prop_fini): Don't call mdebug__report_object.
1555 * plist.c (mplist__init): Initialize plist_table.
1556 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1557 (mplist__fini): Don't call mdebug__report_object.
1559 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1560 (mtext__fini): Don't call mdebug__report_object.
1561 (MTEXT_FORMAT_UTF_16): Correct type.
1562 (mtext_data): New function.
1563 (mtext_text): Fix calculation of limit and args to
1566 * language.c: Include "plist.h".
1567 (M_script_lang_list): New variable.
1568 (mlang__init): Read languages and their information from m17n
1570 (mlanguage__list): New function.
1571 (Miso639_1, Miso639_2): New variables.
1573 * language.h (mlanguage__list): Extern it.
1575 * database.c (get_database_stream): Use SAFE_* macros for
1576 allocating and freeing path.
1577 (mdatabase__init): Likewise.
1579 * symbol.c (msymbol__fini): Don't free symbols here.
1580 (msymbol__free_table): New function.
1581 (msymbol_is_managing_key): New function.
1583 * symbol.h (msymbol__free_table): Extern it.
1584 (msymbol__list): Extern it.
1586 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1588 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1589 (struct _M17NObjectArray): New member name and next.
1590 (mdebug__add_object_array): Extern it.
1591 (M17N_OBJECT_ADD_ARRAY): New macro.
1592 (mdebug__report_object): Don't extern it.
1594 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1596 * m17n-gui.c (free_frame): Don't free frame->font.
1597 (null_device_fini): Fix code for freeing
1598 null_device.realized_font_list.
1599 (m17n_fini_win): Free interface.
1600 (mframe): Cast the return value of dlsym. Set frame->font here.
1601 (mframe_get_prop): Check frame->rface->rfont before accessing the
1604 * m17n-gui.h (Mfontfile): Extern it.
1605 (mfont_check): Extern it.
1606 (mface_equal): Extern it.
1608 * m17n-core.c: Include "symbol.h".
1609 (report_header_printed): This variable deleted.
1610 (object_array_root): New variable.
1611 (report_object_array): New function.
1612 (mdebug__report_object): This function deleted.
1613 (mdebug__add_object_array): New function.
1614 (m17n_init_core): Call mchartable_init () before mtext_init ().
1615 (m17n_fini_core): Call report_object_array (if necessary) and
1616 msymbol__free_atable at the end.
1618 * m17n-core.h (msymbol_is_managing_key): Extern it.
1619 (mtext_data): Extern it.
1620 (MTEXT_FORMAT_UTF_16): Correct type.
1621 (M17NLIB_MINOR_VERSION): Changed to 3.
1622 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1624 * chartab.c (mchartable__init): Initalize chartable_table.count.
1625 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1626 mdebug__report_object.
1628 2005-05-26 Kenichi Handa <handa@m17n.org>
1630 * m17n.h (Miso639_1, Miso639_2): Extern them.
1632 * symbol.h (msymbol__list): Extern it.
1634 * symbol.c (msymbol__list): New function.
1636 2005-05-19 Kenichi Handa <handa@m17n.org>
1638 * input-gui.c (minput__win_init): Don't change the value of
1641 2005-05-16 Kenichi Handa <handa@m17n.org>
1643 * m17n-core.c (m17n_object): Be sure to initialize all members.
1645 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1647 2005-05-09 Kenichi Handa <handa@m17n.org>
1649 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1651 2005-04-27 Kenichi Handa <handa@m17n.org>
1653 * language.c (mlang__init): Add "an" (Aragonese).
1655 * word-thai.c: Add support for libthai.
1656 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1657 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1659 * mtext.c: Include "word-thai.h" conditionaly.
1660 (mtext__init): Call mtext__word_thai_init conditionaly.
1661 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1663 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1664 not WORDCUT_LD_FLAGS.
1666 2005-04-19 Kenichi Handa <handa@m17n.org>
1668 * word-thai.c (wordseg_propertize): Always unref the attached
1670 (thai_wordseg): Don't unref the property.
1672 2005-04-18 Kenichi Handa <handa@m17n.org>
1674 * word-thai.c: Include stdlib.h.
1675 (wordseg_propertize): Add dummy function for the case that wordcut
1676 library doesn't exist.
1677 (wordseg_propertize): Fix for old wordcut library.
1679 2005-04-16 Kenichi Handa <handa@m17n.org>
1681 * word-thai.c: Include <stdio.h>.
1683 2005-04-15 Kenichi Handa <handa@m17n.org>
1685 * draw.c: Include mtext.h.
1686 (linebreak_table, M_break_at_space, M_break_at_word)
1687 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1688 (compose_glyph_string): Check POS before getting Mface text
1690 (truncate_gstring): Give correct TO arg to line_break function.
1691 (GET_LB_TYPE): New macro.
1692 (find_break_backward, find_break_forward): New functions.
1693 (mdraw__init): Initialize the above new variables.
1694 (mdraw__fini): Free linebreak_table.
1695 (mdraw_default_line_break): Use find_break_backward and
1698 * word-thai.c: New file.
1700 * word-thai.h: New file.
1702 * mtext.c: Include word-thai.h.
1703 (wordseg_func_table): New variable.
1704 (mtext__init): Initialize wordseg_func_table and call
1705 mtext__word_thai_init.
1706 (mtext__fini): Call mtext__word_thai_fini, free
1708 (MTextWordsegFunc): New type.
1709 (mtext__word_segment): New function.
1711 * mtext.h (wordseg_func_table): Extern it.
1712 (mtext__word_segment): Extern it.
1714 * m17n.c (m17n_init): Fix typo (== -> =).
1716 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1717 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1719 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1720 (MTEXTPROP_VAL): New macros.
1722 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1724 2005-04-07 Kenichi Handa <handa@m17n.org>
1726 * database.c (load_chartable): Fix pursing of symbol name.
1728 2005-03-24 Kenichi Handa <handa@m17n.org>
1730 * m17n.c (m17n_init): Fix typo (== -> =).
1732 2005-03-11 Kenichi Handa <handa@m17n.org>
1734 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1736 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1738 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1741 2005-03-09 handa <handa@m17n.org>
1743 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1744 calling m17n_init ().
1746 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1747 calling m17n_init_core ().
1749 2005-02-28 Kenichi Handa <handa@m17n.org>
1751 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1754 2005-02-17 Kenichi Handa <handa@m17n.org>
1756 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1757 (M_description, M_command, M_variable): New variables.
1758 (load_im_info_keys): New variables.
1759 (load_im_info, check_command_keyseq, get_description_advance)
1760 (parse_command_list, get_command_list, parse_variable_list)
1761 (get_variable_list, input_method_hook): New functions.
1762 (command_list, variable_list): New variables.
1763 (minput__init): Put input_method_hook to Minput_method.
1764 Initialize M_description, M_command, M_variable, Mdetail_text,
1765 load_im_info_keys, command_list, variable_list.
1766 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1767 (Mdetail_text): New variable.
1768 (minput_get_description, minput_get_commands)
1769 (minput_assign_command_keys, minput_get_variables)
1770 (minput_set_variable): New functions.
1772 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1773 (minput_assign_command_keys, minput_get_variables)
1774 (minput_set_variable): Extern them.
1776 * plist.c (UNGETC): Just decrement st->p.
1777 (read_mtext_element): New arg skip.
1778 (read_integer_element): Likewise.
1779 (read_symbol_element): Likewise.
1780 (read_element): New arg KEYS.
1781 (mplist__from_plist): Don't increment ref-count of NULL object.
1782 (mplist__from_file): New arg KEYS.
1783 (mplist_put): Don't increment ref-count of NULL object.
1784 (mplist_add): Likewise.
1785 (mplist_push): Likewise.
1786 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1788 * plist.h (mplist__from_file): Prototype adjusted.
1790 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1791 (get_database_stream): New function.
1792 (load_database): Use get_database_stream.
1793 (M_database_hook): New variable
1794 (mdatabase__init): Initialize M_database_hook.
1795 (mdatabase__load_for_keys): New function.
1796 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1798 (mdatabase_define): Free mdb->extra_info if necessary.
1800 * database.h (mdatabase__dir_list, M_database_hook)
1801 (mdatabase__load_for_keys): Extern them.
1802 (MDatabaseHookFunc): New type.
1804 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1806 2004-12-27 Kenichi Handa <handa@m17n.org>
1808 * Version 1.2.0 released.
1810 2004-12-27 Kenichi Handa <handa@m17n.org>
1812 * input.c (minput_filter): Don't reset ic->xxx_changed.
1814 * mtext.c (mtext_from_data): Fix documentation.
1816 2004-12-25 Kenichi Handa <handa@m17n.org>
1818 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1819 (M17NLIB_VERSION_NAME): Update to "1.2.".
1821 2004-12-24 Kenichi Handa <handa@m17n.org>
1823 * input.c (reset_ic): Set key_unhandled to 0.
1825 2004-12-21 Kenichi Handa <handa@m17n.org>
1827 * m17n-gui.h (mfont_from_spec): Delete extern.
1829 * input-gui.c (win_callback): Handle Minput_reset.
1830 (minput__win_init): Register reset_ic as a callback for
1833 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1834 changed. At first, shift to the initial state.
1835 (minput__init): Initialize Minput_reset. Register reset_ic as a
1836 callback for Minput_reset.
1837 (Minput_reset): New variable.
1838 (minput_filter): Always set ic->xxx_changed to 0.
1839 (minput_reset_ic): New function.
1840 (integer_value): Fix typo ('>' -> '<') and calculation of length
1843 * m17n-core.c (merror_code): Change type to `int'.
1845 * m17n-misc.h (merror_code): Adjust type.
1847 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1849 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1850 (mtext_change_prop): Delete extern.
1852 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1853 to `int'. Move the documents to m17n-core.h.
1855 2004-12-13 Kenichi Handa <handa@m17n.org>
1857 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1858 (MTextProperty): Document it.
1860 2004-12-09 Kenichi Handa <handa@m17n.org>
1862 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1864 2004-12-03 Kenichi Handa <handa@m17n.org>
1866 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1867 m17n__gui_initialized): New externs.
1869 * m17n-core.h (enum M17NStatus): New enum.
1870 (m17n_status): Extern it.
1872 * m17n-core.c (core_initialized): Delete this variable.
1873 (m17n__core_initialized, m17n__shell_initialized,
1874 m17n__gui_initialized): New variables.
1875 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1876 instead of core_initialized.
1877 (m17n_status): New function.
1879 * m17n.c (shell_initialized): Delete this variable.
1880 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1883 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1885 * m17n-gui.c (win_initialized): Delete this variable.
1886 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1887 instead of gui_initialized.
1889 2004-11-19 Kenichi Handa <handa@m17n.org>
1891 * input.c (reset_ic): Check if ic_info->state is NULL.
1892 (filter): If ic_info->state is NULL, return 0.
1893 (load_input_method): Don't unref `maps' it it's not created.
1895 2004-11-15 Kenichi Handa <handa@m17n.org>
1897 * input.c (find_candidates_group): If INDEX is -1, find the last
1899 (take_action_list): If the previous of the first candidate is
1900 requested, select the last candidate.
1902 2004-11-08 Kenichi Handa <handa@m17n.org>
1904 * m17n-X.c (device_open): Try at most 32 fonts to find a
1905 non-autoscaled font.
1907 * font.c (xlfd_parse_name): Fix previous change.
1909 2004-11-05 Kenichi Handa <handa@m17n.org>
1911 * font.c: (commont_style): Include dummy elements "slanted" and
1912 "rslanted" to prefer "o" to "r" if "i" is requested.
1914 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1916 2004-10-29 Kenichi Handa <handa@m17n.org>
1918 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1920 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1921 New members smallest and larger.
1922 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1923 (xfont_registry_list): Likewise.
1924 (xfont_select): Likewise.
1927 2004-10-28 Kenichi Handa <handa@m17n.org>
1929 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1930 font name comparison.
1931 (xfont_select): Fix logic for selecting a larger size font.
1933 2004-10-25 Kenichi Handa <handa@m17n.org>
1935 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1938 2004-10-22 Kenichi Handa <handa@m17n.org>
1940 * input.c (update_candidate): Renamed from udpate_candidate.
1941 (take_action_list): Show more debugging info on arithmetic commands.
1943 * m17n-X.c (device_open): Fix previous change.
1945 * draw.c (compose_glyph_string): Don't get face property at the
1948 2004-10-21 Kenichi Handa <handa@m17n.org>
1950 * draw.c (compose_glyph_string): Fix for the case of category
1953 2004-10-19 Kenichi Handa <handa@m17n.org>
1955 * input.c (mdebug_mask): New variable.
1956 (shift_state): Print debug information.
1957 (take_action_list): Likewise.
1958 (handle_key): Likewise.
1960 2004-10-14 Kenichi Handa <handa@m17n.org>
1962 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1964 2004-10-13 Kenichi Handa <handa@m17n.org>
1966 * m17n-X.c (device_open): Be sure to register at least one font
1969 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1970 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1972 2004-10-12 Kenichi Handa <handa@m17n.org>
1974 * draw.c (alloc_gstring): Fix previous change.
1976 * font-ft.c (ft_list_generic): Fix for the case of not
1979 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1981 * font.c (mfont_list): If no font is found, return NULL.
1982 (load_font_encoding_table): Put entries of nil registry first.
1983 (find_encoding): Adjust for the above change.
1985 2004-10-11 Kenichi Handa <handa@m17n.org>
1987 * m17n-gui.h (mfont_list): Adjust prototype.
1989 * m17n-X.c (xfont_list): New arg maxnum.
1991 * font.h (struct MFontDriver): Change prototype of <list>.
1993 * font-ft.c (fc_generic_family_list): Delete it.
1994 (Mserif, Msans_serif, Mmonospace): Delete them.
1995 (M_generic_family_info): New variable.
1996 (enum GenericFamilyType): New enum.
1997 (struct GenericFamilyInfo): New struct.
1998 (generic_family_table): New variable.
1999 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2001 (add_font_info): Get style here.
2002 (ft_list_family): Don't initialize fc_config here. Don't list
2004 (ft_list_generic): New function.
2005 (ft_select): Pay attention to generic familes here.
2006 (ft_open): Fix calculation of ascent and descent.
2007 (ft_list): Pay attention to generic families.
2008 (mfont__ft_init): Initialize M_generic_family_info,
2009 generic_family_table, and fc_config..
2010 (mfont__ft_fini): Finalize generic_family_table.
2012 * draw.c (compose_glyph_string): Use more constant font for
2013 glyphs. Adjust for the member change in MGlyph.
2014 (layout_glyph_string): Adjust for the member change in MGlyph.
2015 (alloc_gstring): Intilize scracth_glyph to avoid
2016 compose_glyph_string on it.
2017 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2018 (mdraw_coordinates_position): Fix previous change.
2020 * internal-gui.h (glyph_category): New enum.
2021 (MGlyph): Change type of <category> to enum glyph_category.
2023 * face.c (mface__realize): Delete args langauge and charset.
2024 (mface__for_chars): Fix for the case that glyphs have different
2026 (mface__update_frame_face): Adjust for mface__realize change.
2028 * face.h (mface__realize): Adjust prototype.
2030 2004-10-05 Kenichi Handa <handa@m17n.org>
2032 * language.c (mlang__init): Add Akan.
2034 2004-10-04 Kenichi Handa <handa@m17n.org>
2036 * font-ft.c (add_font_info): Add instead of push the element.
2037 (ft_list_family): For generic fonts, try all
2038 substituted. families.
2040 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2041 (run_rule): Don't update cluster range here.
2042 (run_command): Update cluster range on appending a glyph.
2043 (run_otf): Update cluster range for glyphs generated by OTF.
2045 2004-10-02 Kenichi Handa <handa@m17n.org>
2047 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2049 2004-09-30 Kenichi Handa <handa@m17n.org>
2051 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2053 2004-09-30 Kenichi Handa <handa@m17n.org>
2055 * font.h: Include <fontconfig/fontconfig.h>.
2056 (MFTInfo): New member langset.
2057 (mfont__encoding_list): Extern it.
2059 * font.c (mfont__encoding_list): New function.
2060 (mdebug_dump_font_list): New function.
2062 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2063 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2065 (ft_family_list): New variable.
2066 (set_font_info): New arg basep. Callers changed.
2067 (fc_list): Check the return value of FcPatternGetString.
2068 (add_font_info): New arg plist. Callers changed. Update
2070 (ft_list_family): New function (merged fc_list and ft_list_all).
2071 (ft_select): Use ft_list_family.
2072 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2074 (mfont__ft_init): Initialize above new variables.
2075 (mfont__ft_fini): Free ft_family_list.
2076 (STRDUP_LOWER): New macro.
2077 (set_font_info): Use STRDUP_LOWER.
2078 (ft_list_family): Avoid duplicate addition of font path. Use
2080 (fc_decode_prop): Fix typo.
2082 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2083 (xfont_registry_list): Change argument disp_info to frame.
2085 (xfont_list_all): New function.
2086 (xfont_list): If FONT is not NULL, check all fonts.
2088 2004-09-28 Kenichi Handa <handa@m17n.org>
2090 * m17n-X.c (MXFont, MXFontList): New types.
2091 (MDisplayInfo): Delete members font_registry_list,
2092 iso8859_1_family_list, iso10646_1_family_list, new members
2093 font_list, base_font_list.
2094 (free_display_info): Adusted for the change of MDisplayInfo.
2095 (xfont_driver): Initialize with xfont_list.
2096 (font_compare): New function.
2097 (build_font_list): Deleted.
2098 (xfont_registry_list): New function.
2099 (xfont_select): Use xfont_registry_list.
2100 (xfont_list): New function.
2101 (device_open): Adusted for the change of MDisplayInfo.
2103 * font-ft.c (add_font_info): New arg languages. Callers changed.
2104 (fc_list): Get languages from fonts..
2105 (ft_list_all): Renamed from ft_list. Callers changed.
2106 (ft_list): New function.
2107 (mfont__ft_driver): Initalize with ft_list.
2109 * font.c (mfont_list): New function.
2111 * font.h (struct MFontDriver): New member `list'.
2112 (MFTInfo): New member languages.
2114 * m17n-gui.h (mfont_list): Extern it.
2116 2004-09-27 Kenichi Handa <handa@m17n.org>
2118 * internal-gui.h (struct MGlyphString): Delete members mt,
2119 sub_width, sub_lbrearing, sub_rbearing, and region.
2121 * draw.c (MSubTextExtents): New type.
2122 (layout_glyphs): New arg extents. Set its members.
2123 (layout_glyph_string): Adjusted for the above change.
2124 (alloc_gstring): Don't set gstring->mt.
2125 (truncate_gstring): Call line_break function with mt instead of
2128 2004-09-22 Kenichi Handa <handa@m17n.org>
2130 * mtext.c (count_utf_16_chars): Count each code of invalid
2133 2004-09-19 Kenichi Handa <handa@m17n.org>
2135 * mtext.c (default_utf_16, default_utf_32): Rename them to
2136 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2139 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2142 2004-09-13 Kenichi Handa <handa@m17n.org>
2144 * draw.c (Mlatin): Don't declare it here.
2145 (visual_order): Fix reordering of combining characters.
2146 (compose_glyph_string): Fix detection of script.
2147 (layout_glyphs): Don't fix reordering of combining characters
2149 (layout_glyph_string): Pay attention to
2150 control->disable_overlapping_adjustment.
2151 (truncate_gstring): Include at least on character in a line.
2152 (get_gstring): Always scan one full line.
2153 (mdraw__init): Don't initialize Mlatin here.
2154 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2155 have a font, use ascent/descent of an ASCII font. Allow
2156 ink_array_return and logical_array_return to be NULL.
2157 (mdraw_coordinates_position): Fix iteration.
2159 * font-ft.c (MFTtoProp): Member completely changed.
2160 (ft_to_prop): Adjusted for the above change.
2161 (ft_to_prop_size): Likewise.
2162 (set_font_info): Adjusted for the change of MFTtoProp.
2163 (fc_generic_family_list): New variable.
2164 (fc_list): Add special handling of generic font names.
2165 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2166 Initialize fc_generic_family_list.
2167 (mfont__ft_fini): Don't free ft_to_prop. Free
2168 fc_generic_family_list.
2169 (FC_vs_M17N_font_prop): New type.
2170 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2171 (fc_decode_prop, fc_encode_prop): New functions.
2172 (mfont__ft_parse_name): Use fc_decode_prop.
2173 (mfont__ft_unparse_name): Use fc_encode_prop.
2175 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2176 (MWDevice): Add member realized_font_list.
2177 (free_display_info): Don't free disp_info->realized_font_list.
2178 (free_device): Free device->realized_fontset_list.
2179 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2180 (device_open): Don't initialize disp_info->realized_font_list.
2181 (device_open): Initialize device->realized_font_list and set it to
2182 frame->realized_font_list.
2184 * fontset.c (try_font_group): New function.
2185 (mfont__lookup_fontset): Use try_font_group.
2187 * font.c (common_weight): Change the order of "regular".
2189 * face.c (Mlatin): Don't make it static.
2190 (mface__realize): Be sure to set work_gstring.frame.
2191 (mface__for_chars): Likewise.
2193 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2196 * internal-gui.h (Mlatin): Extern it.
2198 * m17n-gui.h (MDrawControl): New member
2199 disable_overlapping_adjustment.
2201 2004-09-06 Kenichi Handa <handa@m17n.org>
2203 * font-flt.c (run_otf): Fix typo ('}'->']').
2205 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2206 (COMBINING_PRECOMPUTED_P): New macros.
2208 * draw.c (layout_glyphs): Handle precomputed combining code.
2210 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2211 precomupted combining code.
2213 2004-09-03 Kenichi Handa <handa@m17n.org>
2215 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2218 2004-08-27 Kenichi Handa <handa@m17n.org>
2220 * face.c (mface_put_prop): If the new value is the same as the
2221 current one, don't increment frame->tick.
2223 2004-08-25 Kenichi Handa <handa@m17n.org>
2225 * fontset.c (mfontset): Initialize font_spec_list member.
2226 (mfontset_copy): Load fontset if necessary.
2228 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2229 'metrics' to for C++.
2231 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2234 2004-08-16 Kenichi Handa <handa@m17n.org>
2236 * Version 1.1.0 released.
2238 2004-08-13 Kenichi Handa <handa@m17n.org>
2240 * language.c (mlang__init): Add Dhivehi.
2242 * m17n-gui.c (Mx, Mfreetype): Delete it.
2243 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2245 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2246 (mfont_resize_ratio): Extern it.
2247 (MDrawGlyphInfo): New member logical_width;
2248 (MDrawGlyph): New type.
2249 (mdraw_glyph_list): Prototype adjusted.
2251 * m17n-X.c (xfont_open): Set type and fontp members.
2252 (xft_open): Likewise.
2254 * internal-gui.h (Mx, Mfreetype): Delete extern.
2256 * font.h (struct MRealizedFont): New member type and fontp.
2258 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2259 (Mx, Mfreetype): Declare here.
2260 (Mxft): New variable.
2261 (mfont_resize_ratio): New function.
2263 * font-ft.c (ft_open): Set type and fontp members.
2265 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2268 2004-08-11 Kenichi Handa <handa@m17n.org>
2270 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2273 2004-08-06 Kenichi Handa <handa@m17n.org>
2275 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2278 * font-flt.c (run_otf): Print debugging information if necessary.
2280 2004-08-05 Kenichi Handa <handa@m17n.org>
2282 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2283 positioning_type 5 and 6. Switch simplified.
2285 2004-08-04 Kenichi Handa <handa@m17n.org>
2287 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2289 2004-08-02 Kenichi Handa <handa@m17n.org>
2291 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2292 set val to 1 even if it is greater than 1.
2294 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2296 2004-07-29 Kenichi Handa <handa@m17n.org>
2298 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2299 debugging information.
2301 * internal.h (MDEBUG_PRINT5): New macro.
2303 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2304 the previous one if the zero width glyph has left or right
2307 2004-07-26 Kenichi Handa <handa@m17n.org>
2309 * m17n-X.c (xft_render): Pay attention to members left_padding and
2310 right_padding of MGlyph.
2312 * draw.c (visual_order): Allocate one more elements for arrays as
2313 a workaround of fribidi bug.
2314 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2315 instead of MGlyph->bidi_sensitive.
2316 (layout_glyph_string): Pay attentinon to
2317 control->orientation_reversed when padding at the head or tail.
2318 Fix adjustment of space glyph width.
2319 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2322 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2323 instead of MGlyph->bidi_sensitive.
2325 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2327 2004-07-26 Kenichi Handa <handa@m17n.org>
2329 * draw.c (visual_order): Don't treat combined glyphs specially.
2330 (layout_glyphs): Don't get metrics glyphs that are already ready.
2331 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2332 width with the previous one.
2333 (draw_background): Fix bar cursor position on a r2l glyph.
2335 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2336 (run_rule): Fix place of updating cluster_begin_pos and
2337 cluster_end_pos here.
2338 (run_otf): Don't set left_padding.
2340 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2342 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2343 Fix handling of GPOS.
2344 (mfont__ft_drive_gpos): Delete this function.
2346 * font.h (mfont__ft_drive_otf): Renamed back from
2347 mfont__ft_drive_gsub.
2348 (mfont__ft_drive_gpos): Delete extern.
2350 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2351 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2353 2004-07-23 Kenichi Handa <handa@m17n.org>
2355 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2356 the same bidi level.
2358 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2360 2004-07-22 Kenichi Handa <handa@m17n.org>
2362 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2364 2004-07-20 Kenichi Handa <handa@m17n.org>
2366 * draw.c (render_glyphs): Fix checking of g->code validity.
2368 * face.c (mface__realize): Set g.type.
2370 2004-07-18 Kenichi Handa <handa@m17n.org>
2372 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2375 * m17n-gui.c (mframe): Print error message give by dlopen to
2378 2004-07-16 Kenichi Handa <handa@m17n.org>
2380 * draw.c (compose_glyph_string): Improve the way of deciding a
2381 script. For a character that doesn't have script property, use
2382 the last non-latin script.
2384 * font-ft.c (fc_list): Cancel previous change.
2385 (mfont__ft_init): Add more entries in ft_to_prop_name.
2387 2004-07-15 Kenichi Handa <handa@m17n.org>
2389 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2390 previous or next character glyphs.
2392 2004-07-14 Kenichi Handa <handa@m17n.org>
2394 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2395 of type GLYPH_SPACE.
2397 * fontset.c (mfont__lookup_fontset): If glyph type is
2398 GLYPH_SPACE, get codes for SPACE.
2400 * internal-gui.h (Mfont): Delete extern.
2402 * m17n-gui.h (Mfont): Delete duplicated extern.
2404 2004-07-13 Kenichi Handa <handa@m17n.org>
2406 * font-ft.c (DEVICE_DELTA): New macro.
2407 (adjust_anchor): New function.
2408 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2410 (mfont__ft_drive_gpos): New function.
2412 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2413 (FontLayoutContext): Delete member `rfont'.
2414 (run_otf): Set g->otf_cmd. Call
2415 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2416 only whne HAVE_OTF is defined.
2418 * fontset.c: Include "config.h".
2420 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2421 (MGlyph): New member otf_cmd.
2423 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2424 (mfont__ft_drive_gpos): Extern it.
2426 * face.c: Include "config.h".
2428 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2430 * input-gui.c: Include "config.h".
2432 * plist.c: Include "config.h".
2434 2004-07-06 Kenichi Handa <handa@m17n.org>
2436 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2437 internal-gui.h: Cancel previous changes.
2439 * m17n-gd.h: Delete it.
2441 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2442 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2443 @XML2_LD_FLAGS@ to above.
2444 (libm17n_la_LIBADD): Add -ldl.
2445 (libm17n_la_LDFLAGS): Add -export-dynamic.
2446 (X_LD_FLAGS): Fix the order of linking.
2447 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2448 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2449 (libm17n_X_la_LDFLAGS): Add -module.
2450 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2451 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2452 (libm17n_gd_la_LDFLAGS): Add -module.
2453 (include_HEADERS): Delete m17n-gd.h.
2455 2004-06-30 Kenichi Handa <handa@m17n.org>
2457 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2458 (MDeviceLibraryInterface): Delete it.
2459 (register_device_library): Delete it.
2460 (m17n__device_library_list): Renamed from device_library_list.
2462 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2463 (m17n_init_win): Adjust prototype.
2465 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2466 (m17n_init_gd): New function.
2468 * m17n-gd.h: New file.
2470 * m17n-X.h: Include <m17n-gui.h>.
2471 (m17n_init_X): Extern it.
2472 (M17N_INIT): Redefine it.
2474 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2475 (m17n_init_X): New function.
2477 * internal-gui.h (m17n__device_library_list): Extern it.
2478 (struct MDeviceDriver): New members initialized, init, and fini.
2480 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2482 (libm17n_X_la_LIBADD): Delete aboves.
2483 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2484 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2485 (libm17n_gd_la_LDFLAGS): Delete it.
2486 (include_HEADERS): Add m17n-gd.h.
2488 2004-06-25 Kenichi Handa <handa@m17n.org>
2490 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2491 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2493 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2495 * font-ft.c (fc_list): If FcFontList finds no font, try
2498 * draw.c (compose_glyph_string): Terminate the last loop after
2499 doing default combining if necessary.
2501 2004-06-24 Kenichi Handa <handa@m17n.org>
2503 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2505 * character.c (mchar_define_property): Add const to an arg.
2507 * charset.c (mchar_define_charset): Add const to an arg.
2509 * coding.c (MCodingSystem): Add const to an arg or decoder.
2510 (finish_decoding): Add const to an arg.
2511 (decode_coding_charset, decode_coding_utf_8)
2512 (decode_coding_utf_16, decode_coding_utf_32)
2513 (decode_coding_iso_2022, decode_coding_sjis)
2514 (mconv_define_coding): Likewise.
2516 * m17n-X.c (xft_find_metric): Delete unused variable.
2518 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2521 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2524 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2525 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2527 * mtext.h (mtext__from_data): Ajust prototype.
2529 2004-06-23 Kenichi Handa <handa@m17n.org>
2531 * draw.c (compose_glyph_string): Always get glyph codes by
2533 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2534 (mdraw_glyph_list): New function.
2536 * font-flt.c (mfont__flt_run): Be sure to call
2537 rfont->driver->encode_char.
2539 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2540 (ft_encode_char): Delete arg C.
2541 (ft_render): Don't call FT_Get_Char_Index.
2543 * font.c (mfont__encodable_p): Delete it.
2544 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2546 * font.h (struct MFontDriver): Delete arg C of encode_char.
2547 (mfont__encodable_p): Delete extern.
2549 * m17n-X.c (xfont_encode_char): Delete arg C.
2550 (xft_find_metric): Don't cal FT_Get_Char_Index.
2551 (xft_render): Likewise.
2553 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2555 (mdraw_glyph_list): Extern it.
2557 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2559 2004-06-22 Kenichi Handa <handa@m17n.org>
2561 * m17n-gui.h (mfontset_lookup): Extern it.
2563 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2565 * fontset.c (realize_fontset_elements)
2566 (free_realized_fontset_elements, update_fontset_elements): New
2568 (mfont__realize_fontset): Call realize_fontset_elements.
2569 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2570 (mfont__lookup_fontset): If a fontset was modified, update
2571 the realized fontset.
2572 (mfontset_modify_entry): Increment fontset->tick.
2573 (mfontset_lookup): New function.
2575 2004-06-21 Kenichi Handa <handa@m17n.org>
2577 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2579 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2580 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2581 length of source text 0.
2583 2004-06-21 Kenichi Handa <handa@m17n.org>
2585 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2586 (compare): Pay attention to format other than utf-8.
2587 (copy): Delete this function.
2588 (count_by_utf_8, count_by_utf_16, insert): New functions.
2589 (count_utf_16_chars): Fix handling of a surrogate pair.
2590 (find_char_forward, find_char_backward): Likewise.
2591 (mtext__from_data): Delete unnecessary check. Fix number of
2593 (mtext_from_data): Don't count items.
2594 (mtext_ref_char): Optimize the code.
2595 (mtext_set_char): Pay attention to format other than utf-8.
2596 (mtext_cat_char): Likewise.
2597 (mtext_dup): Don't call copy, instead do allocation here.
2598 (mtext_cat): Call insert instead of copy.
2599 (mtext_ncat): Likewise.
2600 (mtext_cpy): Delete character at first and call insert instead of
2602 (mtext_ncpy): Likewise.
2603 (mtext_copy): Likewise.
2604 (mtext_duplicate): Call insert instead of copy.
2605 (mtext_del): Pay attention to format other than utf-8.
2606 (mtext_ins): Simply call insert.
2607 (mtext_ins_char): Pay attention to format other than utf-8.
2608 (mtext_tok): Call insert instead of copy.
2609 (mtext_text): Call UNIT_BYTES.
2611 * textprop.c (mtext__adjust_plist_for_change): New function.
2613 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2614 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2615 (CHAR_UNITS_AT): Fix typo.
2616 (CHAR_UNITS_BY_HEAD): Fix typo.
2617 (STRING_CHAR_AND_UNITS): Fix typo.
2619 * internal.h (MTEXT_READ_ONLY_P): New macro.
2621 * mtext.h (mtext__replace): Delete the extern.
2622 (mtext__adjust_foramt): Adjust prototype.
2624 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2625 if possible. Otherwise make a copy of mmt.
2627 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2630 2004-06-18 Kenichi Handa <handa@m17n.org>
2632 * character.h (CHAR_STRING_UTF16): Fix syntax.
2634 2004-06-16 Kenichi Handa <handa@m17n.org>
2636 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2637 (libm17n_X_la_LIBADD): Delete it.
2638 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2640 * m17n-X.c (device_open): Add parens in `if' condition.
2642 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2643 (DEC_POSITION): Likewise.
2644 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2646 2004-06-15 Kenichi Handa <handa@m17n.org>
2648 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2651 * draw.c (compose_glyph_string): If langauge is specified, call
2652 mface__for_chars even if a text is all latin. Fix condition for
2653 setting non_ascii_found.
2655 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2657 * m17n.h (minput_char_to_key): Delete extern.
2659 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2661 * m17n-gui.c (null_device_open): Set several members of frame.
2663 2004-06-14 Kenichi Handa <handa@m17n.org>
2665 * m17n-gui.h (minput_event_to_key): Delete extern.
2667 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2669 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2671 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2673 2004-06-08 Kenichi Handa <handa@m17n.org>
2675 * character.c (mchar_put_prop): Don't increment the ref-count of
2678 2004-06-04 Kenichi Handa <handa@m17n.org>
2680 * m17n-core.c (mdebug__register_object): New function.
2681 (mdebug__unregister_object): Likewise.
2683 * internal.h (mdebug__register_object, mdebug__unregister_object):
2685 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2688 * charset.c (mcharset__load_from_database): Don't call
2689 mconv__register_charset_coding here.
2691 * coding.c (find_coding): Get a real name from an element of
2692 coding_definition_list.
2693 (mconv__register_charset_coding): Set the real name at the top of
2695 (mcoding__load_from_database): Likewise.
2696 (mconv_list_codings): Adjusted for the above change.
2698 2004-06-03 Kenichi Handa <handa@m17n.org>
2700 * coding.c (find_coding): Find by canonicalized name. Don't have
2701 to modify the element of coding_definition_list by
2703 (mconv__define_coding_from_charset): Delete it.
2704 (mconv__register_charset_coding): Canonicalize sym.
2705 (mcoding__load_from_database): Register plist modified by
2708 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2710 * font-ft.c (ft_open): Fix setting of rfont->descent.
2712 2004-06-02 Kenichi Handa <handa@m17n.org>
2714 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2715 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2716 (xlfd_unparse_name): Renamed from xfont_build_name.
2717 (mfont__init): Initialized Mfontconfig.
2718 (mfont__free_realized): Unconditionally unref rfont->info.
2719 (mfont__select): Free `this' if it's not best.
2720 (mfont__open): Don't check frame->realized_font_list.
2721 (mfont__parse_name_into_font): New function.
2722 (Mfontconfig): New variable.
2723 (mfont_from_name): Call mfont_parse_name.
2724 (mfont_name): Call mfont_unparse_name.
2725 (mdebug_dump_font): Likewise.
2727 * font.h (struct MFontDriver): Delete members parse_name and
2729 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2730 (mfont__parse_name_into_font): Extern it.
2732 * font-ft.c: Include "symbol.h".
2733 (close_ft): Unconditionally free filename and charmap_list of
2735 (ft_open): Duplicate base->filename. Increment ref-count of
2736 ft_info->charmap_list. Free ft_info->charmap_list and
2737 ft_info->filename on error.
2738 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2740 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2742 (enum xlfd_field_idx): Moved to font.c.
2743 (split_font_name, build_font_name): Likewise.
2744 (build_font_list): Call mfont__parse_name_info_font.
2745 (xfont_open): Call mfont__unparse_name. Free name.
2746 (xfont_parse_name, xfont_build_name): Moved to font.c
2747 (xft_select): Prototype deleted.
2748 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2749 Call mfont_pase_name.
2751 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2752 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2755 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2758 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2760 2004-06-01 Kenichi Handa <handa@m17n.org>
2762 * fontset.c (mfontset_modify_entry): Pay attention to the case
2763 that fontset->font_spec_list is NULL.
2765 2004-05-31 Kenichi Handa <handa@m17n.org>
2767 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2769 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2771 * font.c (mfont__select): Print score the a font for debugging.
2773 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2775 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2776 kanji_sym and kana_sym.
2778 2004-05-28 Kenichi Handa <handa@m17n.org>
2780 * Makefile.am (VINFO): New variable.
2781 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2782 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2784 2004-05-27 Kenichi Handa <handa@m17n.org>
2786 The following chanages are to make device dependent functions
2787 accessible only from MDeviceDriver structure, and to add GD and
2788 null device drivers. Font drivers get also device dependent.
2790 * m17n.c (m17n_init): Increament shell_initialized.
2791 (m17n_fini): Decremented shell_initialized.
2793 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2795 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2796 (Mwidget, Mcolormap, Mx): Extern them.
2798 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2799 (free_frame): Call frame->driver->close instead of
2801 (DLOPEN_SHLIB_EXT): New macro.
2802 (MDeviceLibraryInterface): New type.
2803 (device_library_list): New variable.
2804 (register_device_library): New function.
2805 (null_device): New variable.
2806 (null_device_close, null_device_get_prop)
2807 (null_device_realize_face, null_device_free_realized_face): New
2809 (null_driver): New variable.
2810 (null_device_init, null_device_fini, null_device_open): New
2812 (null_interface): New variable.
2813 (Mfreetype, Mdevice): Declare them.
2814 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2815 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2816 Mwin__Close_Device. Register drivers for Mx and Mgd.
2817 (m17n_fini_win): Decremented win_initialized. Call "fini"
2818 function of all opened devices. Don't call mwin__fini.
2819 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2821 (mframe): Handle Mdevice key of PLIST.
2822 (mframe_get_prop): Call frame->device->get_prop instead of
2823 mwin__device_get_prop.
2825 * m17n-gd.c: New file.
2827 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2828 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2830 * m17n-core.c (m17n_init_core): Increate core_initialized.
2831 (m17n_fini_core): Decremented core_initialized.
2833 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2834 (Mcolormap): Don't extern them here.
2836 * m17n-X.c (FRAME_DEVICE): New macro.
2837 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2838 (free_display_info): Use MPLIST_DO.
2839 (free_device): Free rface->info.
2840 (xft_close): Delete it.
2841 (device_init): Renamed from mwin__init.
2842 (device_fini): Renamed from mwin__fini.
2843 (device_open): Renamed from mwin__open_device.
2844 (x_driver): New variable.
2845 (MXFontInfo): Delete member frame, add member display.
2846 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2847 Don't declare them here.
2849 * internal-gui.h (MDeviceType): New enum.
2850 (MWDefice): Delete it.
2851 (struct MFrame): Change type of device to void *. New members
2852 device_type, driver, font_driver_list.
2853 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2854 (MDeviceDriver): New type.
2855 (Mx, Mgd, Mfreetype): Extern them.
2856 (mwin__XXX): Delete all of them.
2858 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2860 (win_destroy_ic): Likewise.
2861 (adjust_window_and_draw): Likewise.
2862 (win_callback): Likewise.
2863 (Mxim): Declare it here.
2864 (minput_event_to_key): Call M_CHECK_READABLE.
2866 * fontset.c (mfont__lookup_fontset): Delete local variable
2869 * font.h (struct MFontDriver): Delete member close, add members
2870 parse_name and build_name.
2871 (mfont__driver_list): Delete extern.
2872 (mfont__close): Delete extern.
2874 * font.c (mfont__init): Don't set mfont__driver_list.
2875 (mfont__fini): Don't unref mfont__driver_list.
2876 (mfont__select): Try font drivers in frame->font_driver_list. Set
2877 driver member of a realized font.
2878 (mfont__close): Delete it.
2879 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2880 functions of the default frame.
2882 * font-ft.c (close_ft): Check ft_info->ft_face and work
2884 (add_font_info): Allocate ft_info by M17N_OBJECT.
2885 (ft_close): Delete it.
2886 (mfont__ft_driver): Don't set ft_close.
2887 (ft_select): Increment ref-count of best_font.
2888 (ft_open): Decremented ref-count of base. On error, call
2889 FT_Done_Face and free ft_info.
2890 (ft_find_metric): Always use XXX_MONO in load_flags.
2891 (ft_render): Fix setting of width. Call
2892 frame->driver->draw_points instead of mwin__draw_points.
2893 (ft_to_prop): Don't set mfont__driver_list.
2894 (mfont__ft_fini): Just unref ft_info.
2896 * face.c (mface__init): Exchange foreground and background of
2897 mface__default. Call mface_put_prop to set hline of
2899 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2900 (mface__free_realized): Don't call mwin__free_realized_face.
2902 * draw.c (Mdepth): Don't declare it here.
2903 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2904 (render_glyphs, render_glyph_string): Likewise.
2905 (mdraw__init): Don't set Mdepth.
2906 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2908 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2910 (mdraw_text_items): Check FRAME is writable.
2911 (mdraw_per_char_extents): Implement body.
2913 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2915 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2916 (GUI_SOURCES): Delete it.
2917 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2918 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2919 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2920 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2921 (linkgui_LDADD): Set to libm17n-gui.la
2922 (linkgui_LDFLAGS): New target.
2923 (SRC): Include ${libm17n_gui_la_SOURCES} and
2924 ${libm17n_gd_la_SOURCES}.
2926 2004-05-24 Kenichi Handa <handa@m17n.org>
2928 * draw.c (draw_background): Don't draw background even if
2929 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2931 2004-05-22 Kenichi Handa <handa@m17n.org>
2933 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2935 2004-05-20 Kenichi Handa <handa@m17n.org>
2937 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2939 * m17n-gui.c: Include "plist.h".
2940 (mframe): If PLIST is NULL, initialize it to emply plist.
2942 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2943 (xft_driver): New variable.
2944 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2945 (xft_find_metric, xft_render): New function.
2946 (mwin__init): Adjusted for the new mfont__driver_list.
2947 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2948 generated face to PARAM.
2949 (mwin__realize_face): Fix setting of box colors. Don't call hook
2951 (mwin__draw_hline): New function.
2952 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2953 (mwin__xft_render): Delete these function.
2955 * internal-gui.h (struct MFrame): New member tick.
2956 (struct MGlyphString): New member tick.
2957 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2958 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2959 (mwin__xft_render): Delete extern.
2961 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2962 (mfontset): Always increment the reference count of returned
2965 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2966 (MFTInfo): Moved to font.h.
2967 (ft_iso8859_1_font_list): Delete this variable.
2968 (set_font_info): Don't set font->property[MFONT_TYPE].
2969 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2970 (add_font_info): Change type to void.
2971 (fc_list): Change anme from xft_list. Caller changed. Include
2972 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2973 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2974 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2975 (close_ft): Don't call mwin__xft_close. Unref
2976 ft_info->extra_info.
2977 (ft_open): Don't setup ft_info->fontname. Don't call
2979 (ft_find_metric): Don't call mwin__xft_get_metric.
2980 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2981 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2982 (mfont__ft_init): Adjusted for new mfont__driver_list.
2983 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2985 * font.c (mfont__driver_list): Make it MPlist.
2986 (mfont__init): Adjust initialization of mfont__driver_list.
2987 (mfont__fini): Free mfont__driver_list.
2988 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2989 (mfont__select): Adjusted for the new mfont__driver_list.
2991 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2992 (mfont__drirver_list): Adjust prototype.
2993 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2995 * face.h (struct MFace): Delete member realized_face_list, add
2997 (struct MRealizedFace): Delete member need_update
2998 andnofont_rface, add member non_ascii_list.
2999 (mface__update_frame_face): Extern it.
3001 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3003 (get_hline_create, get_box_create): New functions.
3004 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3006 (free_face): Cancep previous change. Free face->frame_list.
3007 (serialize_hline): Do nothing if hline->width is zero.
3008 (serialize_box): Do nothing if box->width is zero.
3009 (mface__init): Setup all properties of mface__default.
3010 (mface__fini): Free hline_prop_list and box_prop_list.
3011 (mface__realize): Cancel previous change. Update
3012 face->frame_list. Setup rface->non_ascii_list.
3013 (mface__for_chars): Update rface->non_ascii_list.
3014 (mface__free_realized): Free rface->non_ascii_list.
3015 (mface__update_frame_face): New function.
3016 (mface): Initialize face->frame_list.
3017 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3019 (mface_merge): Likewise.
3020 (mface_put_prop): If key is Mhline or Mbox, get value by
3021 get_hline_create or get_box_create respectively.
3022 (mface_put_prop): Update frame->tick and call
3023 mface__update_frame_face if necessary.
3024 (mface_update): Do nothing if func is noop_hook.
3026 * draw.c (render_glyphs): If a font is not found, use
3027 mwin__draw_empty_boxes.
3028 (alloc_gstring): Initialize gstring->tick.
3029 (get_gstring): Check gstring->tick.
3031 2004-05-17 Kenichi Handa <handa@m17n.org>
3033 * face.c (find_realized_face): Return value changed. If RFONT is
3034 NULL, avoid unnecessary checking.
3035 (free_face): Free face->realized_face_list.
3036 (mface__realize): Adjusted for the change of find_realized_face.
3037 If it returns a realized face that needs update, free it and
3038 realize a new one. Push a new realized face to
3039 frame->realized_face_list instead of appending.
3040 (mface__for_chars): Adjusted for the change of find_realized_face.
3041 Short cut if the required font is in rface->ascii_rface.
3042 (mface_put_prop): Free old value if necessary. Set need_update
3043 member of realized faces to 1.
3045 * face.h (struct MFace): Delete member tick, add member
3047 (struct MRealizedFace): Delete member tick, add member
3050 2004-05-13 Kenichi Handa <handa@m17n.org>
3052 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3054 2004-05-12 Kenichi Handa <handa@m17n.org>
3056 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3058 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3059 parse it XftNameParse.
3061 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3062 (all_fonts_scaned): New variable.
3063 (set_font_info): FAMILY may be Mnil.
3064 (add_font_info): Argument changed.
3065 (xft_list): Call add_font_info in it.
3066 (ft_list): Likewise.
3067 (ft_select): Make it work in the case family is Mnil.
3068 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3069 (mfont__ft_fini): Set all_fonts_scaned to 0.
3071 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3072 that is failed to open.
3074 2004-05-10 Kenichi Handa <handa@m17n.org>
3076 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3077 device's depth is 1 (i.e. monochrome).
3079 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3080 to work around the problem of libtool.
3082 * font-ft.c: Include <freetype/ftbdf.h>.
3083 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3085 (mfont__ft_init): Initialize them.
3086 (ft_iso8859_1_font_list): New variable.
3087 (set_font_info): Detect a font containing iso8859-1 glyphs and
3088 register it in ft_iso8859_1_font_list. If the font is not
3089 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3090 properties of the font from its properties.
3091 (add_font_list): If the font is not scalable, check if it is BDF
3092 or PCF font. If not, ignore it.
3093 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3094 registry is not iso8859-1.
3095 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3096 ft_iso8859_1_font_list.
3097 (ft_find_metric): If the font is not scalable, assume it as BDF
3098 or PCF, and get a metric from its properties.
3099 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3101 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3103 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3104 (libm17n_la_LDFLAGS): Delete it.
3105 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3106 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3108 2004-05-06 Kenichi Handa <handa@m17n.org>
3110 * draw.c (compose_glyph_string): Fix previous change.
3112 2004-04-30 Kenichi Handa <handa@m17n.org>
3114 * font-ft.c (ft_list): Delete unused variable `result'.
3115 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3117 2004-04-27 Kenichi Handa <handa@m17n.org>
3119 * m17n-X.c: Include config.h
3120 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3121 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3122 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3123 (FRAME_CMAP, FRAME_VISUAL): New macros.
3124 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3125 (xfont_driver): Make it static.
3126 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3127 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3128 info->xft_color_back.
3129 (MXftFontInfo) [HAVE_XFT2]: New type.
3130 (mwin__xft_close) [HAVE_XFT2]: New function.
3131 (mwin__xft_open) [HAVE_XFT2]: New function.
3132 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3133 (mwin__xft_render) [HAVE_XFT2]: New function.
3135 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3136 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3137 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3140 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3142 * font-ft.c: Don't include FT_FREETYPE_H here.
3143 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3144 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3145 (MFTInfo): New member charmap_index.
3146 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3147 (check_otf_filename): Renamed from check_filename. Return value
3149 (ft_set_property): This function deleted.
3150 (set_font_info): New function.
3151 (add_font_list): Argument changed. Add multiple fonts.
3152 (xft_list) [HAVE_XFT2]: New function.
3153 (ft_list) [not HAVE_XFT2]: New function.
3154 (ft_select): Add code for Xft.
3155 (close_ft): Likewise.
3156 (ft_open): Likewise.
3157 (ft_find_metric): Likewise.
3158 (ft_encode_char): Likewise.
3159 (ft_render): Likewise.
3161 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3163 2004-04-26 Kenichi Handa <handa@m17n.org>
3165 * textprop.c (mtext_attach_property): Declare the return type as
3168 2004-04-21 Kenichi Handa <handa@m17n.org>
3170 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3172 2004-04-09 Kenichi Handa <handa@m17n.org>
3174 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3176 (load_command): Setup above members.
3178 2004-04-05 Kenichi Handa <handa@m17n.org>
3180 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3182 2004-03-30 Kenichi Handa <handa@m17n.org>
3184 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3187 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3188 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3190 2004-03-29 Kenichi Handa <handa@m17n.org>
3192 * Version 1.0 Patch Level 2 released.
3194 2004-03-29 Kenichi Handa <handa@m17n.org>
3196 * charset.c (make_charset): Set charset->fully_loaded and
3197 charset->simple correctly. Don't try to get charset->min_char and
3198 charset->max_char for a charset of method subset and superset.
3199 Don't load a mapping file here.
3200 (mcharset__init): Set unified_max.
3201 (mcharset__load_from_database): Free a working plist.
3203 * coding.c (mcoding__fini): Free all malloced data.
3205 * input-gui.c (win_create_ic): Set control.as_image for preediting
3208 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3209 `count') to initialize the array.
3211 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3214 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3216 (mwin__create_window): Fix bug of setting a background pixel of a
3218 (mwin__adjust_window): Clear the window before drawing.
3220 * m17n-core.c (mdebug__report_object): Free array->objectes if
3222 (m17n_init_core): Don't set report_header_printed to 0 here.
3223 Fix debugging information.
3224 (m17n_fini_core): Set report_header_printed to 0 here.
3226 * m17n-core.h (mplist_deserialize): Extern it.
3228 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3230 * m17n.c (m17n_fini): Fix debugging information.
3232 * mtext.c (mtext__adjust_foramt): New function.
3234 * mtext.h (mtext__adjust_foramt): Extern it.
3236 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3238 * plist.h (mplist__deserialize): Don't extern it.
3240 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3241 elements of symbol_table to NULL. Report about created and freed
3242 symbols if MDEBUG_FINI is set.
3244 2004-03-22 Kenichi Handa <handa@m17n.org>
3246 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3248 * m17n.c (m17n_init): Fix the way of checking merror_code.
3250 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3252 2004-03-22 Kenichi Handa <handa@m17n.org>
3254 * fontset.c (realize_font_group): Adjust the font size by
3255 mfont__resize before selecting a font.
3257 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3259 2004-03-19 Kenichi Handa <handa@m17n.org>
3261 * Version 1.0 Patch Level 1 released.
3263 2004-03-19 Kenichi Handa <handa@m17n.org>
3265 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3267 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3269 2004-03-19 Kenichi Handa <handa@m17n.org>
3271 Re-apply the changes forgotten in the released version.
3273 * charset.c (mcharset__load_from_database): Call
3274 mchar_define_charset.
3276 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3277 (mconv_encode_range): Put Mcoding text property.
3279 2004-03-18 Kenichi Handa <handa@m17n.org>
3281 * draw.c (Mdepth): New variable.
3282 (visual_order): Delete unused local var `pos'.
3283 (compose_glyph_string): Fix for the case that gstring->glyphs is
3284 realloced. Stop generating glyphs at TO. Fix handling of
3286 (layout_glyphs): Get metrics of all glyphs in advance. Set
3287 lbearing and rbearing of base of composition glyph correctly.
3288 Handle left-overhang glyphs correctly.
3289 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3291 (dump_combining_code): Change the defualt off_x character to ".".
3292 (mdraw__init): Initialize Mdepth.
3294 * face.c (work_gstring): New variable
3295 (mface__init): Initialize work_gstring.
3296 (mface__fini): Free work_gstring.glyphs.
3297 (mface__realize): Don't handle videomode property here. Adjusted
3298 for the change of mfont__get_metric.
3299 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3301 * face.h (enum face_gc): Moved to m17n-X.c.
3303 * font.h (struct MFontDriver): Arguments of find_metric changed.
3304 (mfont__select): Prototype adjusted.
3305 (mfont__get_metric): Likewise.
3306 (mfont__ft_drive_otf): Likewise.
3307 (mfont__flt_run): Likewise.
3309 * font.c (mfont__select): New argument layouter. If layouter is
3310 different in the registered font, make a new copy of realized
3312 (mfont__get_metric): Argument changed. Get metrics of multiple
3314 (mfont_find): Call mfont__select with layouter as Mnil.
3316 * font-flt.c (FontLayoutContext): New member rfont.
3317 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3318 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3320 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3322 (NUM_POINTS): New macro.
3323 (MPointTable): New type.
3324 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3325 (mfont__ft_drive_otf): New argument rfont.
3327 * fontset.c (realize_font_group): Adjusted for the changed of
3329 (check_fontset_element): This function deleted.
3331 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3332 off the parent window if the preedit text is zero length.
3334 * internal-gui.h (struct MFrame): New members foreground,
3335 background, videomode, font.
3336 (struct MGlyphString): New member anti_alias.
3337 (MDrawPoint): New type.
3338 (mwin__draw_bitmap): Prototype deleted.
3339 (mwin__draw_points): Prototype added.
3341 * m17n-gui.h (MDrawControl): New member anti_alias.
3343 * m17n-gui.c (free_frame): Free frame->font.
3344 (mframe): Set the fontset of frame->face to the default fontset.
3346 * m17n-X.c (RGB_GC): New type.
3347 (enum gc_index): Renamed from enum face_gc. Member names changed.
3349 (struct MWDevice): Members foreground and background deleted. New
3350 member scratch_gc, gc_list.
3351 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3352 (free_device): Free GCs in device->gc_list.
3353 (get_rgb_gc): New function.
3354 (get_gc): Renamed and argument changed from get_color.
3355 (get_gc_for_anti_alias): New function.
3356 (xfont_find_metric): Arguments changed. Get metrics of multiple
3358 (set_region): Argument changed. Caller changed.
3359 (xfont_render): Allways set a font in gc.
3360 (x_error_handler, x_io_error_handler): Define only if
3361 X_SET_ERROR_HANDLER is defined.
3362 (mwin__open_device): Create device->scratch_gc. Set members
3363 foreground, background, and videomode of frame. Call
3364 XSetErrorHandler and XSetIOErrorHandler only if
3365 X_SET_ERROR_HANDLER is defined.
3366 (struct gc_list): Deleted.
3367 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3368 (mwin__realize_face): Adjusted for the change of the format of
3369 rface->info and the charge of set_region.
3370 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3371 (mwin__draw_box): Likewise.
3372 (mwin__draw_bitmap): This function deleted.
3373 (mwin__draw_points): New function.
3374 (mwin__verify_region): Adjusted for the change of the format of
3375 rface->info and the charge of set_region.
3376 (mwin__create_window): Inherit backgound pixel from parent.
3377 (mwin__dump_gc): Adjusted for the change of the format of
3380 2004-03-16 Kenichi Handa <handa@m17n.org>
3382 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3384 * input.c (M_key_alias): New variable.
3385 (handle_key): Try M_key_alias property of a key too.
3386 (minput__init): Initialize M_key_alias. Give that property to
3387 symbols in one_char_symbol. Fix bug of initializing
3390 * draw.c (compose_glyph_string): Don't handle
3391 ignore_formatting_char here. Include formatting characters in the
3392 range processed by a FTL.
3393 (layout_glyph_string): Handle ignore_formatting_char here.
3395 2004-03-12 Kenichi Handa <handa@m17n.org>
3397 * input-gui.c (win_create_ic): Enable bidi in status control.
3399 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3401 2004-03-09 Kenichi Handa <handa@m17n.org>
3403 * input.c (load_input_method): If title is not specified, use the
3404 input method name as title.
3406 * m17n-X.c (get_color): Make it static.
3407 (xim_create_ic, xim_destroy_ic, x_error_handler)
3408 (x_io_error_handler): Likewise.
3410 2004-03-01 Kenichi Handa <handa@m17n.org>
3412 * Version 1.0 released.
3415 Copyright (C) 2003, 2004
3416 National Institute of Advanced Industrial Science and Technology (AIST)
3417 Registration Number H15PRO112
3419 This file is part of the m17n library.
3421 The m17n library is free software; you can redistribute it and/or
3422 modify it under the terms of the GNU Lesser General Public License
3423 as published by the Free Software Foundation; either version 2.1 of
3424 the License, or (at your option) any later version.
3426 The m17n library is distributed in the hope that it will be useful,
3427 but WITHOUT ANY WARRANTY; without even the implied warranty of
3428 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3429 Lesser General Public License for more details.
3431 You should have received a copy of the GNU Lesser General Public
3432 License along with the m17n library; if not, write to the Free
3433 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA