1 2006-10-02 Kenichi Handa <handa@m17n.org>
3 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
6 * font.c (xlfd_unparse_name): Adjusted for the change of
8 (font_score): Likewise.
9 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
11 * m17n-X.c (MFontX, _MFontX): Deleted.
12 (SET_SIZE, HAVE_SIZE): Deleted.
13 (free_display_info): Adjusted for the change of
14 disp_info->font_list format.
15 (xfont_registry_list): Likewise.
16 (xfont_open): Likewise.
17 (xfont_list): Likewise.
18 (xfont_encode_char): Ignore size to find a realized font.
19 (MRealizedFontXft): Change the order of members to make it
20 compatible with MRealizedFontFT.
22 2006-09-27 Kenichi Handa <handa@m17n.org>
24 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
25 (mfont_close): Add comments.
27 * mtext-lbrk.c (mtext_line_break): Add comment.
29 2006-09-26 Kenichi Handa <handa@m17n.org>
31 * input.c (minput_get_description): Handle description about
32 inclusion-only input methods.
34 2006-09-21 Kenichi Handa <handa@m17n.org>
36 * input.c (M_gettext): New variable.
37 (fully_initialize): Initialize M_gettext.
38 (check_description): New function.
39 (load_commands): Call check_description.
40 (config_all_commands): Be sure to unref pl.
41 (load_variables): Call check_description.
42 (config_all_variables): Be sure to unref pl.
43 (load_im_info): Call check_description.
45 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
47 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
48 and bind_textdomain_codeset.
50 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
52 2006-09-15 Kenichi Handa <handa@m17n.org>
54 * input.c (reload_im_info): Update custom and global info.
55 (init_ic_info): Fix previous change.
57 2006-09-14 Kenichi Handa <handa@m17n.org>
59 * database.c: Include <libgen.h>.
60 (mdatabase__lock): Make a directory if necessary.
62 * input.c (resolve_command): Adjusted for the format change of
63 configured_cmds member.
64 (load_commands, load_variables): Fix for errornous data handling.
65 (config_command, config_variable): New function.
66 (config_all_commands, config_all_variables): Renamed from
67 config_commands and config_variables. Utilize the above function.
68 (check_variable_value): Argument changed. Callers changed.
69 (load_im_info): Call config_all_commands and config_all_variables.
70 (init_ic_info): Adjusted for the format change of configured_vars
72 (minput__init): Initialize Mcustomized, Mconfigured, and
74 (Mcustomized, Mconfigured, Minherited): New variables.
75 (minput_get_command): Be sure to return NULL if an input method
77 (minput_get_variable): Be sure to return NULL if an input method
78 use no local variable.
79 (minput_config_command, minput_config_variable)
80 (minput_save_config): Adjusted for the format change of
81 configured_cmds and configured_vars members.
83 * plist.c (write_element): Delete superfluous ':'.
85 2006-09-13 Kenichi Handa <handa@m17n.org>
87 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
88 (minput_config_file): Extern it.
90 * draw.c (Minherited): Declaration moved to input.c.
91 (mdraw__init): Don't initialize Minherited here.
93 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
95 2006-09-07 Kenichi Handa <handa@m17n.org>
97 * textprop.c (mtext_serialize): Call mplist__serialize with the
100 * plist.h (mplist__serialize): Prototype adjusted.
101 (mplist__assq): Extern it.
103 * plist.c: Include <ctype.h>
104 (PUTC, PUTS): New macros.
105 (write_symbol): New function.
106 (write_element): New arg indent.
107 (dump_string, dump_plist_element): Delete them.
108 (mplist__from_string): New arg pretty.
109 (mplist__assq): New function.
110 (mdebug_dump_plist): Use write_element.
112 * mtext.c (mtext_cat_char): Allocate more memory.
113 (mdebug_dump_mtext): Don't escal a newline character.
115 * m17n.h (minput_get_command, minput_get_variable)
116 (minput_config_command, minput_config_variable)
117 (minput_save_config): Extern them.
119 * m17n-core.c: Include <string.h>.
120 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
121 use the stream stdout instead of a file of that name.
123 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
126 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
127 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
128 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
129 (MDEBUG_DUMP): Flush the stream.
131 * input.h (struct _MInputMethodInfo): Delete member im. New
132 members mdb, language, name, extra, cmds, configured_cmds,
133 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
134 (MInputContextInfo): New member tick.
136 * input.c: Big change to improve user-side input method
137 customization. Here, list just public API changes.
138 (minput_get_commands, minput_get_variables)
139 (minput_assign_command_keys, minput_set_variable): Label them
141 (minput_get_command, minput_get_variable)
142 (minput_config_command, minput_config_variable)
143 (minput_save_config): New functions.
145 * database.h (PATH_MAX): Define it if not yet defined.
146 (PATH_SEPARATOR): Likewise.
147 (enum MDatabaseStatus): New enum.
148 (struct MDatabaseInfo): Moved from database.c. New members status,
149 time, lock_file, and uniq_file.
150 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
151 (mdatabase__unlock): Extern them.
153 * database.c: Include <time.h>.
154 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
155 (GEN_PATH): Args changed. Callers changed.
156 (struct MDatabaseInfo): Moved to database.h.
157 (struct MDatabase, mdb_list): Deleted.
158 (mdatabase__list): New var.
159 (get_database_filename): Deleted. Callers changed to use
161 (find_file, get_database_file): New files.
162 (get_dir_info): Initialize new members of MDatabaseInfo.
163 (find_database): Arg chagnded. Callers changed.
164 (free_db_info, register_database, register_databases_in_files):
166 (update_database_list): Deleted.
167 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
168 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
169 (mdatabase__update): New function.
170 (mdatabase__check): Return value changed.
171 (mdatabase__file, mdatabase__lock, mdatabase__save)
172 (mdatabase__unlock): New functions.
174 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
176 * input.c (get_surrounding_text): Return -2 when surrounding text
178 (get_following_char): Likewise.
179 (get_preceding_char): Likewise.
180 (minput__callback): Return 0 if there is a callback function,
183 2006-08-17 Kenichi Handa <handa@m17n.org>
185 * input.c (reset_ic): Use shift_state to setup the current state.
187 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
189 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
190 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
191 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
193 2006-08-02 Kenichi Handa <handa@m17n.org>
195 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
197 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
199 * font-ft.c (ft_encapsulate): Add code for debugging.
200 (mfont__ft_drive_otf): Be sure to encode character before getting
203 2006-07-21 Kenichi Handa <handa@m17n.org>
205 * draw.c (mdraw_text_extents): Fix previous typo.
207 2006-07-19 Kenichi Handa <handa@m17n.org>
209 * draw.c (gstring_width): New arg lbearing.
210 (render_glyph_string): Adjusted for the change of gstring_width.
211 (mdraw_text_extents): Fix lbearing of ink and line metrics.
213 * m17n-core.h (Mlanguage): Extern it.
215 * m17n.h (Mlanguage): Extern deleted.
217 * mtext.c (mtext__init): Initialize Mlanguage.
218 (Mlanguage): Declaration moved from locale.c
220 * locale.c (mlocale__init): Don't initialize Mlanguage here.
221 (Mlanguage): Declaration moved to mtext.c.
223 * language.c (mlang__init): Don't initialize Mlanguage here.
225 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
227 2006-07-14 Kenichi Handa <handa@m17n.org>
229 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
230 (MRealizedFontFT): New member face_encapsulated.
231 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
232 (ft_gen_font): New function.
233 (ft_add_font): Use ft_gen_font.
234 (ft_list_script): Store lists in ft_script_list.
235 (ft_check_otf): New arg ft_face. Caller changed.
236 (ft_check_language): Likewise.
237 (ft_check_script): Likewise.
238 (ft_encapsulate, ft_close): New functions.
239 (mfont__ft_driver): Initialize members encapsulate and close.
240 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
242 * font.h (struct MRealizedFont): New member encapsulating.
243 (struct MFontDriver): New members encapsulate and close.
245 * font.c (mfont__match_p): If FONT is realized, check capability
246 by font drivers's check_capability method.
247 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
250 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
251 declarations of foundry and fam local vars.
252 (xft_driver): Make it static.
254 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
255 (mfont_close): Extern them.
257 * m17n-gd.c (device_open): Don't specify foundry and family of the
260 2006-07-11 Kenichi Handa <handa@m17n.org>
262 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
264 2006-07-13 Kenichi Handa <handa@m17n.org>
266 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
268 (ft_check_script): Delete unused var.
269 (ft_list_capability): Likewise.
271 * font.c (mfont__get_capability): Setup cap->otf.
272 (Motf): Make it global.
273 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
275 * font.h (MFontCapability): New member otf.
277 * language.c (mlang__fini): Delete unused vars.
279 * m17n-gui.h (Motf): Extern it.
281 * database.c (update_database_list): Delete unused vars.
283 2006-07-07 Kenichi Handa <handa@m17n.org>
285 * font-ft.c (DEVICE_DELTA): Fix typo.
287 2006-07-06 Kenichi Handa <handa@m17n.org>
289 * fontset.c (mfont__lookup_fontset): Don't ignore family and
292 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
294 * database.c: Update comments.
296 2006-07-05 Kenichi Handa <handa@m17n.org>
298 * database.c (PATH_MAX): Define it if not yet defined.
299 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
301 (get_database_filename): Use GEN_PATH.
302 (get_dir_info): Don't include the last '/' in directory name.
303 (register_database): New function.
304 (update_database_list): Use register_database. Search all
305 directories in mdatabase__dir_list for wildcard databases.
306 (mdatabase__init): Check "~/.m17n.d".
308 2006-07-03 Kenichi Handa <handa@m17n.org>
310 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
311 push reverse property.
313 * plist.c (dump_plist_element): Fix previous change.
315 2006-06-28 Kenichi Handa <handa@m17n.org>
317 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
320 * draw.c (MbidiNSM): New variable.
321 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
322 attention to bidi type NSM.
323 (mdraw__init): Initialize MbibiNSM.
325 * language.c (mscript__char_list): Fix finding a char-list element.
327 * plist.c (dump_string): Return number of printed characters.
328 (dump_plist_element): Print elements more compactly.
330 2006-06-23 Kenichi Handa <handa@m17n.org>
332 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
333 (include_HEADERS): Likewise.
335 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
337 * language.c: Update documentation.
339 2006-06-23 Kenichi Handa <handa@m17n.org>
341 * font-ft.c (struct MFontFT): Delete member lang.
342 (free_ft_info): Don't unref member lang. Destroy members langset
344 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
345 changed. Set members langset and charset.
346 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
348 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
350 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
351 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
352 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
353 characters at first. If it fails, try listing by language names.
354 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
355 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
356 change of MFontCapability.
357 (ft_list_capability): Likewise. Try listing by languages, then by
358 scripts. Check OTF at last.
359 (ft_check_script): New function.
360 (ft_select): Adjusted for the check of MFontCapability.
361 (ft_list_family_names): New function.
362 (ft_check_capability): If cap->script is not Mnil, call
364 (mfont__ft_driver): Initialize with ft_list_family_names.
366 * font.h (struct MFontDriver): New member list_fmaily_names.
367 (struct): Change member "MSymbol *lang" to "MSymbol language".
369 * font.c: Include "language.h".
370 (Motf): New variable.
371 (otf_script_list, load_otf_script_list): Delete it.
372 (find_script_from_otf_tag): Delete it.
373 (merge_capability): New function.
374 (mfont__init): Init Motf.
375 (mfont__fini): Don't unref otf_script_list.
376 (free_font_capability): Check cap->script_tag to determine if
377 OTF-related capability is set.
378 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
379 the change of type MFontCapability.
380 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
382 (mfont_list): Call merge_capability for LANGUAGE arg.
383 (mfont_list_family_names): New function.
385 * input-gui.c: Typo in comments fixed.
387 * input.c: Typo in comments fixed.
389 * language.h (mlanguage__list): Delete it.
390 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
393 * language.c: Include "mtext.h".
394 (M_script_lang_list): Delete it.
395 (language_list, script_list): New variables.
396 (load_lang_script_list, init_language_list, init_script_list): New
398 (mlang__init): Don't load language database here.
399 (mlang__fini): Unref language_list and script_list if not NULL.
400 (mlanguage__list): Delete it.
401 (mlanguage__info, mscript__info, mscript__char_list)
402 (mscript__otf_tag, mscript__from_otf_tag): New functions.
403 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
404 (mscript_list, mscript_language_list): New functions.
406 * m17n-gui.h (mfont_list_family_names): Extern it.
408 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
409 (mlanguage_text, mscript_list, mscript_language_list): Extern
412 2006-06-21 Kenichi Handa <handa@m17n.org>
414 * m17n-X.c (xfont_driver): Initialize with
415 xfont_list_family_names.
416 (xfont_list_family_names): New function.
417 (xft_driver): Initialize with NULL for list_family_names member.
418 (device_init): Set list_family_names member of xft_driver to that
421 2006-06-06 Kenichi Handa <handa@m17n.org>
423 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
425 2006-03-24 Kenichi Handa <handa@m17n.org>
427 * font-ft.c (ft_open): Improve debug message.
429 * fontset.c (mfontset__get_font): Fix for the case that no font in
430 per_script list is available.
432 2006-02-06 Kenichi Handa <handa@m17n.org>
434 * Version 1.3.3 released.
436 2006-02-22 Kenichi Handa <handa@m17n.org>
438 * textprop.c: Fix some typos in documentation.
440 * plist.c: Fix some typos in documentation.
442 * m17n-core.h: Fix some typos in documentation.
443 (M17NLIB_PATCH_LEVEL): Updated to 3.
444 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
446 * symbol.c: Fix some typos in documentation.
448 * mtext.c: Fix some typos in documentation.
450 * input.c: Fix several typos in documentation.
452 2006-02-06 Kenichi Handa <handa@m17n.org>
454 * Version 1.3.2 released.
456 2006-02-03 Kenichi Handa <handa@m17n.org>
458 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
459 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
461 * font.c (xlfd_parse_name): Fix handling of the name "nil".
463 * draw.c (layout_glyphs): Fix handling left_padding of
466 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
468 2006-02-02 Kenichi Handa <handa@m17n.org>
470 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
473 2006-01-25 Kenichi Handa <handa@m17n.org>
475 * input.c (resolve_expression): If the value of PLIST is a plist,
476 but the first element is not symbol, return 0.
478 2006-01-17 Kenichi Handa <handa@m17n.org>
480 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
481 HAVE_GD is 2 or the greater.
483 2006-01-16 Kenichi Handa <handa@m17n.org>
485 * Version 1.3.1 released.
487 2006-01-16 Kenichi Handa <handa@m17n.org>
489 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
490 simulating anti-aliasing.
492 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
493 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
495 2006-01-12 Kenichi Handa <handa@m17n.org>
497 * input.c (get_surrounding_text): Always pop ic->plist.
498 (reset_ic): Don't reset ic->plist.
500 2006-01-10 Kenichi Handa <handa@m17n.org>
502 * input.c (preedit_commit): For debugging, print only commiting
503 charactes. Don't set ic->candidate_show to 0.
504 (handle_key): Don't run branch-actions just by shifting to the
506 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
507 Reset vars and plist.
509 2006-01-07 Kenichi Handa <handa@m17n.org>
511 * input.c (load_branch): Confirm that maps is not NULL.
513 2006-01-05 Kenichi Handa <handa@m17n.org>
515 * input-gui.c (win_filter): Try to convert arg to key only when
518 * plist.c (read_integer_element): If '#' and '-' are followed by
519 non-integer-constituent, read them as a part of a symbol.
520 (read_symbol_element): New arg C.
521 (read_element): Adjust args to read_symbol_element.
523 * input.c (load_macros): On overwriting a macro, free the old
525 (minput__init): Store Mmap in load_im_info_keys.
526 (minput_get_title_icon): If the input method has no title, be sure
528 (minput_get_description): If the input method has no description,
529 be sure to return NULL.
530 (minput_get_variables): Fix documentation.
531 (handle_key): Pay attention to the case that key is Mnil.
532 (filter): Likewise. Fix handling of such symbol as S-A.
534 2005-12-22 Kenichi Handa <handa@m17n.org>
536 * Version 1.3.0 released.
538 2005-12-22 Kenichi Handa <handa@m17n.org>
540 * font-ft.c (ft_list): If the specified font has no property,
543 2005-12-20 Kenichi Handa <handa@m17n.org>
545 * character.c (mchar_get_prop): Check char_prop_list.
546 (mchar_put_prop, mchar_get_prop_table): Likewise.
548 2005-12-18 Kenichi Handa <handa@m17n.org>
550 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
551 file name sans language.
553 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
555 * input.c: Fix typo in comments.
557 2005-12-14 Kenichi Handa <handa@m17n.org>
559 * input.c (minput_get_title_icon): Check the default icon for the
562 2005-12-13 Kenichi Handa <handa@m17n.org>
564 * input.c (Mless_equal, Mgreater_equal): New variables.
565 (parse_expression, resolve_expression, parse_action_list)
566 (take_action_list): Handle the aboves.
567 (filter): Treat key S-X as X.
568 (minput__init): Initialize Mless_equal and Mgreater_equal.
569 (minput_get_title_icon): New function.
571 * m17n.h (minput_get_title_icon): Extern it.
573 * database.c (get_database_filename): Return a filename instead of
575 (load_database): Adjusted for the above change.
576 (mdatabase__load_for_keys): Likewise.
577 (mdatabase__find_file): New function.
579 * database.h (mdatabase__find_file): Extern it.
581 * font.h (mfont__resize): Delete extern.
583 * font.c (mfont__list): Check resize ratio.
584 (mfont__resize): Delete it.
585 (mfont_resize_ratio): Include the code of mfont__resize.
587 * font-ft.c (ft_open): Check resize ratio.
589 * m17n-X.c (xfont_open): Check resize ratio.
590 (xft_open): Likewise.
592 2005-12-07 Kenichi Handa <handa@m17n.org>
594 * input.c (take_action_list): If take_action_list return -1,
596 (handle_key): Likewise.
598 * face.c (mface__for_chars): When font is specified and layouter
599 is found for it, if the layouter doesn't support one of a
600 character, use a face sans layouter for it.
602 2005-12-06 Kenichi Handa <handa@m17n.org>
604 * fontset.c (mfont__lookup_fontset): If only a fallback font is
605 found, don't use it for more than one character.
607 2005-12-05 Kenichi Handa <handa@m17n.org>
609 * face.c (mface__realize): Set rfont->layouter to Mnil.
610 (mface__for_chars): Fix handling of layouter.
612 * character.h (mchar__define_prop): Extern it.
614 * database.c (update_database_list): Call mchar__define_prop if
617 * character.c (mchar__init): Don't call mchar_define_property.
618 Instead just initialize property keys.
619 (mchar__fini): Free char_prop_list only if it's not NULL.
620 (mchar__define_prop): New function.
621 (mchar_define_property): Call mchar__define_prop.
623 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
626 2005-12-02 Kenichi Handa <handa@m17n.org>
628 * language.c (mlang__init): Handle extra chars.
630 * m17n-gui.h (mfont_check): Adjust prototype.
632 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
633 (xfont_check_capability): New function.
634 (xft_driver): Specify xft_check_capability.
635 (xft_check_capability): New function.
637 * font-ft.c (M0_3): Delete it.
639 (ft_get_charmaps): Refer to M0.
640 (fc_parse_pattern): Fix previous change.
641 (ft_list_language): Check also extra chars.
642 (ft_check_otf): Define it even if HAVE_OTF is undef.
643 (ft_check_lang): Check the result of FcLangSetHasLang against
644 FcLangDifferentLang. Check also extra chars.
645 (ft_list_capability): Delete ifdef HAVE_OTF.
646 (ft_select): Likewise.
647 (ft_open): Improve debug information.
648 (ft_check_capability): New function.
649 (mfont__ft_driver): Specify ft_check_capability.
650 (mfont__ft_init): Initialize M0.
652 * fontset.c (get_font_from_group): New function.
653 (mfontset__get_font): New function.
655 * fontset.h (mfontset__get_font): Extern it.
657 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
658 (mfont__fini): Delete ifdef HAVE_OTF.
659 (free_font_capability): Likewise.
660 (mfont__get_capability): Likewise.
661 (mfont__check_capability): New function.
662 (mfont_check): Change the order of arguments. Use
665 * font.h (struct MFontDriver): New member check_capability.
666 (MFontCapability): Delete ifdef HAVE_OTF.
667 (mfont__check_capability): Extern it.
669 * face.c (mface__realize): Fix handling of FONT arg.
670 (mface__for_chars): Fix handling of explicitly specified font.
672 2005-11-25 Kenichi Handa <handa@m17n.org>
674 * font-flt.c (run_command): Print debug info for
677 * draw.c (layout_glyphs): Fix handling of left/right_padding.
679 * face.c (mface__for_chars): Check rfont before accessing the
682 2005-11-21 Kenichi Handa <handa@m17n.org>
684 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
687 * fontset.c (fontset_table): New variable.
688 (free_fontset): Call M17N_OBJECT_UNREGISTER.
689 (mfont__fontset_init): Add fontset_table as an object array.
690 (mfont__realize_fontset): Ref FONTSET.
691 (mfont__free_realized_fontset): Unref REALIZED->fontset.
692 (mfontset): Call M17N_OBJECT_REGISTER.
693 (mfontset_copy): Likewise.
695 * input.c (handle_key): For debugging, print information about
697 (filter): Add an alias for Meta and Alt modifiers.
698 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
700 (minput__init): Initialize them.
701 (parse_expression): New function.
702 (resolve_expression): New function.
703 (parse_action_list): Handle expressions by parse_expression.
704 (take_action_list): Handle expressions by resolve_expression.
705 (parse_nested_list_value): Fix previous change.
706 (resolve_command): Fix handling of the return value of
709 2005-11-18 Kenichi Handa <handa@m17n.org>
711 * font-ft.c (ft_check_otf, otf_script_list): Define only when
713 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
715 (ft_select): Likewise.
717 * font.c (mfont_list): Fix for the case that FONT is NULL.
718 (OTF_tag): Delete it.
719 (load_otf_script_list): Define only when HAVE_OTF is defined.
720 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
723 * draw.c (truncate_gstring): Be sure to truncate at
724 glapheme-cluster boundary.
726 2005-11-11 Kenichi Handa <handa@m17n.org>
728 * input.c (delete_surrounding_text): Clear cache if necessary.
730 2005-11-09 Kenichi Handa <handa@m17n.org>
732 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
733 glyph prev is also supported by the current flt.
735 2005-11-08 Kenichi Handa <handa@m17n.org>
737 * m17n-X.c (xft_render): Cancel previous change.
739 2005-11-07 Kenichi Handa <handa@m17n.org>
741 * input.c: Include <stdlib.h>.
742 (get_surrounding_text, delete_surrounding_text)
743 (get_preceding_char, get_following_char): New functions.
744 (integer_value): New arg surrounding. If it is nonzero, try to
745 get a surrounding character. Callers changed.
746 (take_action_list): Check `value' before setting an element.
747 (destroy_ic): Unref ic_info->preceding_text and
748 ic_info->following_text.
749 (minput__init): Initialize Minput_get_surrounding_text and
750 Minput_delete_surrounding_text.
751 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
753 (filter): Unref ic_info->preceding_text and
754 ic_info->following_text.
756 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
759 * input.h (MInputContextInfo): New members preceding_text and
762 2005-11-04 Kenichi Handa <handa@m17n.org>
764 * input.c (parse_nested_list_value): Fix handling of the global
766 (get_nested_list): Get global definitions by load_partial_im_info.
767 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
768 MInputCandidatesChanged.
769 (take_action_list): Likewise.
770 (reset_ic): Likewise.
771 (create_ic): Don't pay special attention to
772 Mcandidates_group_size.
773 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
774 (minput_set_variable): Get a definition of varible by
775 mplist_find_by_value, not mplist_get.
777 * m17n.h (enum MInputCandidatesChanged): New enum.
779 2005-11-01 Kenichi Handa <handa@m17n.org>
781 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
783 (mwin__destroy_window): If xft_draw's drawable is win, change it
784 to device->drawable before destroying win.
786 2005-10-31 Kenichi Handa <handa@m17n.org>
788 * input.c (load_im_info): Fix adding of state.
790 * m17n-core.c (m17n_fini_core): Fix reporting of module
793 * m17n.c (m17n_fini): Fix reporting of module finalization.
795 * m17n-gui.c (m17n_init_win): Fix reporting of module
798 2005-10-29 Kenichi Handa <handa@m17n.org>
800 * input.c (get_candidate_list): Fix the timing of referring plist.
802 2005-10-28 Kenichi Handa <handa@m17n.org>
804 * input.c (load_branch): Ignore an undefined map name.
805 (load_im_info): Set im_info->title from `name' only if it's not
807 (shift_state): Always update ic->status.
808 (adjust_candidates): Renamed from adjust_candidate_command.
809 Argument changed. Caller changed.
810 (get_candidate_list, regularize_action): New functions.
811 (take_action_list): Use them. On handling Munhandle, don't set
813 (handle_key): If KEY is not handled by MAP, and MAP has
814 branch_actions, perform them.
816 * database.c (mdatabase__fini): Free dir_info->filename;
818 2005-10-20 Kenichi Handa <handa@m17n.org>
820 * input.c (marker_code): Accept '@@'.
821 (integer_value): Handle '@@'.
822 (parse_action_list): Accept a symbol argument.
823 (take_action_list): Resolve the symbol argument. Handle the
826 2005-10-18 Kenichi Handa <handa@m17n.org>
828 * input.c: Include "charset.h".
829 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
831 (MIMState): New member (M17NObject control).
832 (lookup_nested_list, set_nested_list, parse_nested_list_value)
833 (get_nested_list, resolve_variable): New functions.
834 (integer_value): New arg (MPlist **value). Set it to the plist
835 element containing the value.
836 (resolve_command): New function.
837 (load_translation): New arg (MPlist *map_actions).
838 (load_branch): New args language and name. If `keylist' is a
839 symbol, resolved that as a command name.
840 (free_map): New arg top. Free map->map_actions only if top is
842 (free_state): New function.
843 (load_state): New arg name.
844 (im_info_list): New variable.
845 (free_im_info, get_im_info_by_tags): New functions.
846 (load_im_info): Arg key changed to plist. Handle `include'.
847 Return (MInputMethodInfo *).
848 (preedit_commit): Ref ic->candidate_list.
849 (get_select_charset, adjust_candidate_command): New functions.
850 (take_action_list): Handle `include'. Adjust candidate action
851 properly. Handle control variables `candidates-charset' and
852 `candidates-group-size'.
853 (open_im): Use get_im_info.
854 (create_ic): Get global variables.
855 (load_partial_im_info): New function.
856 (get_im_info): New function.
857 (check_command_keyseq, check_command_list, check_variable_list):
859 (minput__init): Don't handle M_database_hook and Mdetail_text.
860 Initialize M_candidates, Mcandidates_group_size,
862 (parse_variable_list, get_variable_list, parse_command_list)
863 (get_command_list): Delete them.
864 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
865 (minput__fini): Simply unref command_list and variable_list.
866 (minput_get_description): Adjusted for the new form of description.
867 (minput_get_commands): Use get_nested_list.
868 (minput_assign_command_keys): Likewise.
869 (minput_get_variables, minput_set_variable): Likewise.
871 * input.h (MInputMethodInfo): New members im and maps.
873 * database.h (M_database_hook): Delete extern.
874 (MDatabaseHookFunc): Delete extern.
875 (mdatabase__check): Extern it.
877 * database.c: Include <glob.h>.
878 (MAX_TIME): New macro.
879 (Masterisk): New variable.
880 (get_database_stream): Argument changed to (MDatabaseInfo *).
882 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
883 (find_database): New function.
884 (update_database_list): New function.
885 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
886 calling update_database_list.
887 (mdatabase__check): New function.
888 (mdatabase_find): Use update_database and find_database. Don't
889 handle MDatabaseHookFunc.
890 (mdatabase_list): Call update_database at first.
891 (mdatabase_define): Adjusted for the change of mdb->extra_info.
892 (MDatabaseList): New type.
894 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
896 * m17n.h (Mdetail_text): Delete extern.
898 * m17n-core.h (mplist_conc): Delete extern.
900 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
902 (mplist_conc): Renamed to mplist__conc.
903 (mplist__pop_unref): New function.
905 2005-10-14 Kenichi Handa <handa@m17n.org>
907 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
909 (read_element): If keys is an empty plist, return any element
911 (dump_plist_element): Check if plist is nested.
912 (mplist_conc): Always ref tail.
913 (mplist_set): If key is a managing key, ref val in advance.
915 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
916 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
917 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
920 * fontset.c (free_fontset): Unref fontset_list if necessary.
921 (mfont__fontset_fini): Don't free fontset_list. Unref
923 (mfont__realize_fontset): Initialize request.
924 (mfontset): Ref default_fontset or fontset only if necessary.
925 (mfontset_copy): Don't ref copy.
927 * draw.c (render_glyphs): Check gend->type before checking
930 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
931 unrefed plists to NULL.
933 2005-10-04 Kenichi Handa <handa@m17n.org>
935 * textprop.c (mtext_serialize): Be sure to make mt
936 MTEXT_FORMAT_UTF_8 and NULL terminated.
938 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
940 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
942 2005-10-03 Kenichi Handa <handa@m17n.org>
944 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
945 is not at the beginning of line.
947 2005-09-22 Kenichi Handa <handa@m17n.org>
949 * input.c: Include <sys/stat.h> and <unistd.h>.
950 (Minclude, Mcommit, Munhandle): New variables.
951 (minput__init): Initialize them. Push only Mstate to
952 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
953 (parse_action_list): Allow integer arg for undo. Handle Mcommit
955 (load_input_method): Handle "include" directive. If no states are
957 (shift_state): If state_name is Mt, shift back to the previous
958 state. Call preedit_commit to commit preedit text.
959 (preedit_commit): New function.
960 (take_action_list): Improve debug printing. Handle commit and
962 (handle_key): Check the return value of take_action_list. Don't
963 take branch_actions just after changing to the root map.
964 (reset_ic): Reset all ic_info members.
965 (filter): When a key is not handled, just move ic_info->keys
966 instead fo calling reset_ic.
967 (load_im_info): If key is not Mstate, push Mmap to
969 (MDatabaseStatList): New type.
970 (imdir_stat_list): New variable.
971 (input_method_hook): Don't cancel the hook. Check the
972 modification time of directories.
973 (minput__fini): Free imdir_stat_list;
975 * input.h (MInputContextInfo): New member prev_state.
977 * m17n-core.h (mplist_conc): Extern it.
979 * plist.c (mplist_conc): New function.
981 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
983 * font.h (MRealizedFont): New member average_width.
985 * font-ft.c (ft_open): Set rface->average_width.
987 * font.c (xlfd_unparse_name): Print '*' before registry name.
989 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
990 (xfont_open): Set rfont->average_width.
991 (xft_open): Likewise.
992 (device_open): Initialize disp_info->AVERAGE_WIDTH.
994 * internal-gui.h (struct MFrame): New member average_width.
996 * m17n-gui.c (mframe): Fix setting of frame->rfont.
997 (mframe_get_prop): Return the average_width of a font.
999 * face.c (mface__realize): Set rface->average_width.
1000 (mface__update_frame_face): Set frame->average_width.
1002 * face.h (MRealizedFace): New member average_width.
1004 2005-09-19 Kenichi Handa <handa@m17n.org>
1006 * font.c (xlfd_unparse_name): New arg full_xlfd.
1007 (mfont__encode_char): Use shortcut only for X core fonts.
1008 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1009 (mfont_put_prop): Handle `language' property.
1010 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1011 Print file can capability info too.
1013 * m17n-core.c (mdebug__output): New variable.
1014 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1015 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1016 (m17n_fini_core): Close mdebug__output if it's not stderr.
1018 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1019 (xfont_open): Handle baseline_offset.
1020 (xfont_find_metric): Likewise.
1021 (xfont_render): Likewise.
1022 (xft_open): Likewise.
1023 (xft_render): Likewise.
1025 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1026 (mdebug__output): Extern it.
1027 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1028 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1029 (MDEBUG_DUMP): New macro.
1030 (MDEBUG_PRINT_TIME): Print to medebug__output.
1032 * font.h (MRealizedFont): New member baseline_offset.
1034 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1036 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1037 (ft_list_family): Check alias.
1038 (ft_list_language): If language is "en", don't try to the second
1040 (ft_default_list): New variable.
1041 (ft_list_default): New function.
1042 (ft_select): If family is not specified, try only the default
1043 fonts. Treat the weights normal and medium same.
1044 (ft_open): Fix debug message. If registry is not specified, try
1045 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1046 (ft_find_metric): Likewise.
1047 (ft_render): Likewise.
1048 (ft_list): Fix debug message. Accept the registring iso8859-1.
1049 If family is not specified, try only the default fonts.
1051 * face.c (mface__realize): Fix logic of opening a font.
1053 2005-09-16 Kenichi Handa <handa@m17n.org>
1055 * face.c (mface__realize):
1057 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1060 * input.c (shift_state): Fix the condition of taking init actions.
1061 (take_action_list): Fix handling of pushback action.
1062 (handle_key): Don't change key while checking its alias.
1063 (minput__init): Initialize new variables.
1064 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1067 2005-09-12 Kenichi Handa <handa@m17n.org>
1069 * mtext.c (mtext__uppercase): Add proper open/close parens.
1070 (mtext_titlecase): Add proper casting.
1072 * input.c (parse_action_list): Handle the case that the arg is a
1073 key sequence (MText or MPlist).
1074 (take_action_list): Likewise.
1075 (shift_state): Shorter debug message.
1076 (handle_key): Terminate a debug message by "\n".
1077 (reset_ic): Don't take initial actions here.
1078 (minput_open_im): Print a debug message.
1079 (minput_close_im): Likewise.
1080 (minput_create_ic): Likewise.
1081 (minput_destroy_ic): Likewise.
1083 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1085 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1088 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1089 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1092 * character.c: Add Japanese documentation for
1093 mchar_get_prop_table ().
1095 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1097 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1098 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1099 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1101 (init_case_conversion): New function.
1102 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1103 (uppercase_precheck, lowercase_precheck, final_sigma)
1104 (after_soft_dotted, more_above, before_dot, after_i)
1105 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1107 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1109 * plist.c (read_mtext_element): Fix previous change.
1111 2005-09-05 Kenichi Handa <handa@m17n.org>
1113 * plist.c (read_mtext_element): Handle \uXXXX notation.
1115 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1116 (MTABLE_ALLOCA): Change the name of local variable.
1118 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1119 HAVE_FREETYPE are defined.
1121 * m17n-X.c: Check HAVE_X11.
1123 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1124 directory listing libraries.
1125 (noinst_PROGRAMS): Define it only in maintainer mode.
1127 2005-09-02 Kenichi Handa <handa@m17n.org>
1129 * m17n-gui.h (mdraw_line_break_option): Extern it.
1131 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1132 end of the first glyph.
1133 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1135 (mdraw_line_break_option): New variable.
1136 (mdraw_default_line_break): Use mtext_line_break.
1138 * mtext.h (wordseg_func_table): Don't extern it.
1139 (mtext__wseg_fini): Extern it.
1141 * mtext.c: Don't include word-thai.h.
1142 (wordseg_func_table): Delete this variable.
1143 (mtext__init): Don't initialize above. Don't call
1144 mtext__word_thai_init.
1145 (mtext__fini): Don't free wordseg_func_table. Call
1146 mtext__wseg_fini instead fo mtext__word_thai_fini.
1147 (MTextWordsegFunc): Don't typedef it.
1148 (mtext__word_segment): Moved to mtext-wseg.c.
1150 * m17n-core.h (enum MTextLineBreakOption): New enum.
1151 (mtext_line_break): Extern it.
1153 * mtext-wseg.c: New file.
1155 * mtext-lbrk.c: New file.
1157 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1158 add mtext-lbrk.c and mtext-wseg.c.
1160 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1161 the case that head is NULL.
1163 2005-09-01 Kenichi Handa <handa@m17n.org>
1165 * word-thai.c (wordseg_propertize): If the property value is nil,
1166 don't make the property no-merge.
1167 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1168 attention to the case that they are NULL.
1169 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1172 * character.c (mchar_get_prop_table): New function.
1174 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1176 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1177 (mchar_get_prop_table): Extern it.
1179 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1180 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1182 * internal.h (enum MTextCoverage): New enum.
1183 (MText): New member coverage.
1185 * mtext.c (FORMAT_COVERAGE): New macro.
1186 (insert): Copy mt2->coverage.
1187 (mtext__from_data): Initialize mt->coverage.
1188 (mtext__adjust_format): Update mt->coverage.
1189 (mtext): Initialize mt->coverage.
1190 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1191 Update mt->coverage if necessary.
1192 (mtext_duplicate): Copy mt->coverage.
1193 (mtext_insert, mtext_replace): New functions.
1194 (mtext_dup): Use mtext_duplicate.
1195 (mtext__word_segment): Don't set *from and *to if a word
1196 segmentation funcion is not found.
1197 (mtext_ins_char): Fix typo.
1199 2005-08-25 Kenichi Handa <handa@m17n.org>
1201 * font.h (MFont): New member for_full_width.
1203 * font.c (compare_font_score): Prefer a font of not
1206 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1207 registry charset of a font is one of CJK charsets.
1209 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1210 supports some of CJK.
1212 2005-08-24 Kenichi Handa <handa@m17n.org>
1214 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1216 * m17n-gui.c (null_device_open): Check Mresolution param and set
1219 * m17n-gd.c (device_open): Check Mresolution param and set
1222 * m17n-X.c (MWDevice): New member resy.
1223 (xfont_open): Set ascent, descent, and max_advance members of
1225 (xft_open): Likewise.
1226 (device_open): Compare also screen_num to find a device. Set
1227 device->resy and frame->dpi.
1229 * internal-gui.h (MFrame): New member dpi.
1231 * font.h (MRealizedFont): New member max_advance.
1233 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1234 (mfont__init): Don't initialize Mascent, Mdescent.
1235 (Mascent, Mdescent): Delete these variables.
1236 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1237 Mfont_descent instead of Mascent and Mdescent.
1238 (mfont_put_prop): Allow negative size.
1239 (mfont_find): Handle the case of spec->size < 0. Fix previous
1241 (mfont_list): Handle the case of spec->size < 0.
1242 (mfont_check): Likewise.
1244 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1245 (fc_get_pattern): Handle the case of font->size < 0.
1246 (ft_open): Set ascent, descent, and max_advance members of rfont.
1247 (ft_find_metric): Improve rounding.
1248 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1251 * face.c (mface__realize): Handle the case of font->size < 0.
1253 2005-08-22 Kenichi Handa <handa@m17n.org>
1255 * coding.c (MConverterStatus): Change the member buf to union.
1256 (mconv_buffer_converter): Add const to the arg buf.
1257 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1258 (mconv_decode): Adjusted for the change of MConverterStatus.
1259 (mconv_encode_range): Likewise.
1261 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1262 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1264 2005-08-20 Kenichi Handa <handa@m17n.org>
1266 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1267 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1269 * m17n-X.c (xfont_open): Set members ascent, descent, and
1270 max_advance of rfont.
1271 (xft_open): Likewise.
1273 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1275 (mfont__ft_parse_name): Add const to the arg name.
1277 * font.c (xlfd_parse_name): Add const to the arg name. Call
1278 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1279 (xlfd_unparse_name): Handle spacing.
1280 (mfont__init): Initialize new variables.
1281 (mfont__id): Handle spacing.
1282 (mfont__merge): Likewise.
1283 (mfont__set_spec): This function deleted.
1284 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1285 condition of calling mfont__ft_parse_name.
1286 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1287 (mfont_get_prop): Handle properties spacing, ascent, descent,
1289 (mfont_find): Return a realized font.
1290 (mfont_from_name): Add const to the arg name.
1292 * font.h (enum MFontProperty): New member MFONT_SPACING.
1293 (enum MFontSpacing): New enum.
1294 (MFont): New members spacing and max_advance.
1295 (mfont__ft_parse_name): Prototype adjusted.
1296 (mfont__set_spec): Extern deleted.
1297 (mfont__parse_name_into_font): Prototype adjusted.
1299 2005-08-19 Kenichi Handa <handa@m17n.org>
1301 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1303 * font.c (mfont_list): If FONT is null, use a temporary font.
1304 (mfont_parse_name): Add const to the arg name.
1306 2005-08-18 Kenichi Handa <handa@m17n.org>
1308 * word-thai.c: Surround code by #ifdef and #endif to escape from
1311 * font-ft.c: Mostly re-written.
1313 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1314 (FontLayoutCmd): Type of the member otf changed..
1315 (load_otf_command): Adjusted for the format change of otf command.
1316 (load_command): Likewise.
1317 (free_flt_command): Unref cmd->body.otf.
1318 (run_otf): Ajusted for the type change of otf_cmd.
1319 (run_command): Ajusted for the type change of otf_cmd. On
1320 debugging, print ctx->combining_code.
1321 (mfont__flt_run): Initialize ctx's members code_offset,
1322 combining_code, and left_padding to 0.
1324 * face.h (struct MRealizedFace): New member font.
1325 (mface__realize): Prototype adjusted.
1327 * face.c (find_realized_face): New arg font.
1328 (find_realized_face): Adjusted for the change of MFont.
1329 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1330 (mface__fini): Don't call mdebug__report_object.
1331 (mface__realize): New arg font.
1332 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1333 Optimize the latin case.
1334 (mface__free_realized): Free rface->font.
1335 (mface__update_frame_face): Adjusted for the change of mface__realize.
1336 (mface_equal): New function.
1338 * draw.c (Mcommon): New variable.
1339 (visual_order): Args to mfont__encode_char changed.
1340 (compose_glyph_string): Handle Mfont text property.
1341 (layout_glyphs): Adjusted for the change of MFont.
1342 (mdraw__init): Initialize Mcommon.
1343 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1345 * font.h (enum MFontType): Members completely changed.
1346 (enum MFontProperty): Move MFONT_SIZE to the tail.
1347 (enum MFontSource): New enum.
1348 (struct MFont): New members type, source, sizes, file, capability,
1350 (struct MRealizedFont): Type of member font changed. Members
1351 score, status, and encoding deleted.
1352 (MFontScore): New type.
1353 (MFontList): Member changed.
1354 (struct MFontDriver): New member has_char. Types of members
1356 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1357 (Mapple_roman): Extern them.
1358 (OTF_Tag): Typedefed if not HAVE_OTF.
1359 (enum MFontOpenTypeTable): New enum.
1360 (MFontCapability): New type.
1361 (mfont__ft_drive_otf): Prototype adjusted.
1362 (mfont__score): Extern deleted.
1363 (mfont__merge): Extern it.
1364 (mfont__has_char): Extern it.
1365 (mfont__encode_char): Prototype adjusted.
1366 (mfont__open): Extern it.
1367 (mfont__set_spec): Prototype adjusted.
1368 (mfont__get_capability): Extern it.
1370 * font.c: Include "fontset.h".
1371 (M_font_capability, M_font_list, M_font_list_len): New variables.
1372 (font_score_priority): Change order of initial elements.
1373 (font_score_shift_bits): Fix array size.
1374 (common_weight): Add "thin", "semibold", and "heavy".
1375 (common_stretch): Add "ultracondensed", "extracondensed",
1376 "extraexpanded", and "utltraexpand".
1377 (font_weight_regular, font_weight_normal, font_weight_medium): New
1379 (gen_font_name): This function deleted.
1380 (find_encoding): Set font->encoding.
1381 (OTF_tag): New function.
1382 (otf_script_list): New variable.
1383 (load_otf_script_list): New function.
1384 (find_script_from_otf_tag): New function.
1385 (xlfd_parse_name): Set font->type and font->source.
1386 (mfont__free_realized): Free chains rfonts.
1387 (font_score): Renamed from mfont__score.
1388 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1389 (Mapple_roman): New variables.
1390 (mfont__init): Initilize new variables. Initalize
1391 default_encoding.encoding_name and
1392 default_encoding.encoding_charset to Municode_full and
1393 mcharset__unicode. Use SAFE* macros for allocating filepath
1395 (mfont__fini): Free otf_script_list.
1396 (mfont__id): New function.
1397 (mfont__match_p): Check also capability member of MFont.
1398 (mfont__merge): New funciton.
1399 (mfont__set_spec_from_face): Set type and source members.
1400 (mfont__set_spec_from_plist): Set capability and type members.
1401 (mfont__select): Argument changed.
1402 (mfont__available): New function.
1403 (compare_font_score): New function.
1404 (mfont__list): New function.
1405 (mfont__open): Return a realized font.
1406 (mfont__resize): Adjusted for the change of MFont.
1407 (mfont__has_char): New function.
1408 (mfont__encode_char): Argument changed.
1409 (mfont__set_spec): Argument changed.
1410 (free_font_capability): New function.
1411 (mfont__get_capability): New function.
1412 (MFontfile): New variable.
1413 (mfont_get_prop): Adjusted for the change of MFont.
1414 (mfont_put_prop): Likewise.
1415 (mfont_set_selection_priority): Fix the way of setting
1416 font_score_priority[].
1417 (mfont_find): Use mfont__list instead of mfont__select.
1418 (mfont_resize_ratio): Adjusted for the change of MFont.
1419 (mfont_list): Use mfont__list.
1420 (mfont_check): New function.
1421 (font_score): Make it static.
1423 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1424 (mfont__lookup_fontset): Likewise.
1426 * fontset.c (struct MFontset): Delete member font_spec_list.
1427 (struct MRealizedFontset): Type of member spec changed. New
1429 (load_font_group): Arg spec_list deleted.
1430 (load_fontset_contents): Adjusted for the change of fontset_def.
1431 (free_fontset): Fix the way of freeing fontset elements.
1432 (realize_fontset_elements): Argument changed.
1433 (get_per_script): New function.
1434 (free_realized_fontset_elements): Fix the way of feeing rfontset
1436 (update_fontset_elements): Fix args to realize_fontset_elements.
1437 (mfont__realize_fontset): New arg spec.
1438 (try_font_list): New function.
1439 (try_font_group): New arg request. Use try_font_list.
1440 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1442 (mfontset): Adjusted for the change of MFontset.
1443 (mfontset_copy): Likewise. Don't share plists.
1444 (mfontset_modify_entry): Adjusted for the change of MFontset.
1445 (mfontset_lookup): Call get_per_script.
1446 (mdebug_dump_fontset): Print also the address of fonts.
1448 * input.c (shift_state): Don't reset ic_info->vars.
1449 (take_action_list): Call MDEBUG_PRINT fore calling
1452 * internal-gui.h (MFontDriver): Don't typedef it here.
1454 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1455 (MXFont): This type deleted.
1457 (struct _MFontX): New struct.
1458 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1459 (MDisplayInfo): Member base_font_list deleted.
1460 (DEFAULT_FONT): Definition changed.
1461 (FALLBACK_FONT): This maclr deleted.
1462 (free_display_info): Adjusted for the change of MDisplayInfo.
1463 (free_device): Argument to mfont__free_realized changed.
1464 (xfont_driver): Adjusted for the change of MFontDriver.
1465 (xfont_registry_list): Use MFontX instead of MXFont.
1466 (MRealizedFontX): Renamed from MXFontInfo.
1467 (xfont_select): Return the font found first.
1468 (close_xfont): Change MXFontInfo to MRealizedFontX.
1469 (xfont_open): Return the realized font.
1470 (xfont_find_metric): Get xfont from rfont->fontp.
1471 (xfont_has_char): New function.
1472 (xfont_encode_char): Adjusted for the argument change.
1473 (xfont_render): Get xfont from rfont->fontp.
1474 (xfont_list): Adjusted for the argument change.
1475 (MRealizedFontXft): Renamed from MXftFontInfo.
1476 (xft_driver): Ajusted for the change of MFontDriver.
1477 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1478 (xft_open_font): Argument changed.
1479 (xft_open): Argument changed. Return the realized font.
1480 (xft_find_metric): Get xft_font from rfont->fontp.
1481 (xft_has_char, xft_encode_char): New functions.
1482 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1483 font if not yet opened.
1484 (device_open): Don't set frame->font.
1486 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1488 (gd_font_open): New function.
1489 (gd_render): Don't use the local variable ft_info.
1490 (device_init): Adjusted for the change of gd_font_driver.
1492 * textprop.c (mtext__prop_init): Initialize text_property_table.
1493 Call M17N_OBJECT_ADD_ARRAY.
1494 (mtext__prop_fini): Don't call mdebug__report_object.
1496 * plist.c (mplist__init): Initialize plist_table.
1497 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1498 (mplist__fini): Don't call mdebug__report_object.
1500 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1501 (mtext__fini): Don't call mdebug__report_object.
1502 (MTEXT_FORMAT_UTF_16): Correct type.
1503 (mtext_data): New function.
1504 (mtext_text): Fix calculation of limit and args to
1507 * language.c: Include "plist.h".
1508 (M_script_lang_list): New variable.
1509 (mlang__init): Read languages and their information from m17n
1511 (mlanguage__list): New function.
1512 (Miso639_1, Miso639_2): New variables.
1514 * language.h (mlanguage__list): Extern it.
1516 * database.c (get_database_stream): Use SAFE_* macros for
1517 allocating and freeing path.
1518 (mdatabase__init): Likewise.
1520 * symbol.c (msymbol__fini): Don't free symbols here.
1521 (msymbol__free_table): New function.
1522 (msymbol_is_managing_key): New function.
1524 * symbol.h (msymbol__free_table): Extern it.
1525 (msymbol__list): Extern it.
1527 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1529 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1530 (struct _M17NObjectArray): New member name and next.
1531 (mdebug__add_object_array): Extern it.
1532 (M17N_OBJECT_ADD_ARRAY): New macro.
1533 (mdebug__report_object): Don't extern it.
1535 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1537 * m17n-gui.c (free_frame): Don't free frame->font.
1538 (null_device_fini): Fix code for freeing
1539 null_device.realized_font_list.
1540 (m17n_fini_win): Free interface.
1541 (mframe): Cast the return value of dlsym. Set frame->font here.
1542 (mframe_get_prop): Check frame->rface->rfont before accessing the
1545 * m17n-gui.h (Mfontfile): Extern it.
1546 (mfont_check): Extern it.
1547 (mface_equal): Extern it.
1549 * m17n-core.c: Include "symbol.h".
1550 (report_header_printed): This variable deleted.
1551 (object_array_root): New variable.
1552 (report_object_array): New function.
1553 (mdebug__report_object): This function deleted.
1554 (mdebug__add_object_array): New function.
1555 (m17n_init_core): Call mchartable_init () before mtext_init ().
1556 (m17n_fini_core): Call report_object_array (if necessary) and
1557 msymbol__free_atable at the end.
1559 * m17n-core.h (msymbol_is_managing_key): Extern it.
1560 (mtext_data): Extern it.
1561 (MTEXT_FORMAT_UTF_16): Correct type.
1562 (M17NLIB_MINOR_VERSION): Changed to 3.
1563 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1565 * chartab.c (mchartable__init): Initalize chartable_table.count.
1566 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1567 mdebug__report_object.
1569 2005-05-26 Kenichi Handa <handa@m17n.org>
1571 * m17n.h (Miso639_1, Miso639_2): Extern them.
1573 * symbol.h (msymbol__list): Extern it.
1575 * symbol.c (msymbol__list): New function.
1577 2005-05-19 Kenichi Handa <handa@m17n.org>
1579 * input-gui.c (minput__win_init): Don't change the value of
1582 2005-05-16 Kenichi Handa <handa@m17n.org>
1584 * m17n-core.c (m17n_object): Be sure to initialize all members.
1586 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1588 2005-05-09 Kenichi Handa <handa@m17n.org>
1590 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1592 2005-04-27 Kenichi Handa <handa@m17n.org>
1594 * language.c (mlang__init): Add "an" (Aragonese).
1596 * word-thai.c: Add support for libthai.
1597 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1598 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1600 * mtext.c: Include "word-thai.h" conditionaly.
1601 (mtext__init): Call mtext__word_thai_init conditionaly.
1602 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1604 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1605 not WORDCUT_LD_FLAGS.
1607 2005-04-19 Kenichi Handa <handa@m17n.org>
1609 * word-thai.c (wordseg_propertize): Always unref the attached
1611 (thai_wordseg): Don't unref the property.
1613 2005-04-18 Kenichi Handa <handa@m17n.org>
1615 * word-thai.c: Include stdlib.h.
1616 (wordseg_propertize): Add dummy function for the case that wordcut
1617 library doesn't exist.
1618 (wordseg_propertize): Fix for old wordcut library.
1620 2005-04-16 Kenichi Handa <handa@m17n.org>
1622 * word-thai.c: Include <stdio.h>.
1624 2005-04-15 Kenichi Handa <handa@m17n.org>
1626 * draw.c: Include mtext.h.
1627 (linebreak_table, M_break_at_space, M_break_at_word)
1628 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1629 (compose_glyph_string): Check POS before getting Mface text
1631 (truncate_gstring): Give correct TO arg to line_break function.
1632 (GET_LB_TYPE): New macro.
1633 (find_break_backward, find_break_forward): New functions.
1634 (mdraw__init): Initialize the above new variables.
1635 (mdraw__fini): Free linebreak_table.
1636 (mdraw_default_line_break): Use find_break_backward and
1639 * word-thai.c: New file.
1641 * word-thai.h: New file.
1643 * mtext.c: Include word-thai.h.
1644 (wordseg_func_table): New variable.
1645 (mtext__init): Initialize wordseg_func_table and call
1646 mtext__word_thai_init.
1647 (mtext__fini): Call mtext__word_thai_fini, free
1649 (MTextWordsegFunc): New type.
1650 (mtext__word_segment): New function.
1652 * mtext.h (wordseg_func_table): Extern it.
1653 (mtext__word_segment): Extern it.
1655 * m17n.c (m17n_init): Fix typo (== -> =).
1657 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1658 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1660 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1661 (MTEXTPROP_VAL): New macros.
1663 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1665 2005-04-07 Kenichi Handa <handa@m17n.org>
1667 * database.c (load_chartable): Fix pursing of symbol name.
1669 2005-03-24 Kenichi Handa <handa@m17n.org>
1671 * m17n.c (m17n_init): Fix typo (== -> =).
1673 2005-03-11 Kenichi Handa <handa@m17n.org>
1675 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1677 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1679 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1682 2005-03-09 handa <handa@m17n.org>
1684 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1685 calling m17n_init ().
1687 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1688 calling m17n_init_core ().
1690 2005-02-28 Kenichi Handa <handa@m17n.org>
1692 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1695 2005-02-17 Kenichi Handa <handa@m17n.org>
1697 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1698 (M_description, M_command, M_variable): New variables.
1699 (load_im_info_keys): New variables.
1700 (load_im_info, check_command_keyseq, get_description_advance)
1701 (parse_command_list, get_command_list, parse_variable_list)
1702 (get_variable_list, input_method_hook): New functions.
1703 (command_list, variable_list): New variables.
1704 (minput__init): Put input_method_hook to Minput_method.
1705 Initialize M_description, M_command, M_variable, Mdetail_text,
1706 load_im_info_keys, command_list, variable_list.
1707 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1708 (Mdetail_text): New variable.
1709 (minput_get_description, minput_get_commands)
1710 (minput_assign_command_keys, minput_get_variables)
1711 (minput_set_variable): New functions.
1713 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1714 (minput_assign_command_keys, minput_get_variables)
1715 (minput_set_variable): Extern them.
1717 * plist.c (UNGETC): Just decrement st->p.
1718 (read_mtext_element): New arg skip.
1719 (read_integer_element): Likewise.
1720 (read_symbol_element): Likewise.
1721 (read_element): New arg KEYS.
1722 (mplist__from_plist): Don't increment ref-count of NULL object.
1723 (mplist__from_file): New arg KEYS.
1724 (mplist_put): Don't increment ref-count of NULL object.
1725 (mplist_add): Likewise.
1726 (mplist_push): Likewise.
1727 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1729 * plist.h (mplist__from_file): Prototype adjusted.
1731 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1732 (get_database_stream): New function.
1733 (load_database): Use get_database_stream.
1734 (M_database_hook): New variable
1735 (mdatabase__init): Initialize M_database_hook.
1736 (mdatabase__load_for_keys): New function.
1737 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1739 (mdatabase_define): Free mdb->extra_info if necessary.
1741 * database.h (mdatabase__dir_list, M_database_hook)
1742 (mdatabase__load_for_keys): Extern them.
1743 (MDatabaseHookFunc): New type.
1745 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1747 2004-12-27 Kenichi Handa <handa@m17n.org>
1749 * Version 1.2.0 released.
1751 2004-12-27 Kenichi Handa <handa@m17n.org>
1753 * input.c (minput_filter): Don't reset ic->xxx_changed.
1755 * mtext.c (mtext_from_data): Fix documentation.
1757 2004-12-25 Kenichi Handa <handa@m17n.org>
1759 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1760 (M17NLIB_VERSION_NAME): Update to "1.2.".
1762 2004-12-24 Kenichi Handa <handa@m17n.org>
1764 * input.c (reset_ic): Set key_unhandled to 0.
1766 2004-12-21 Kenichi Handa <handa@m17n.org>
1768 * m17n-gui.h (mfont_from_spec): Delete extern.
1770 * input-gui.c (win_callback): Handle Minput_reset.
1771 (minput__win_init): Register reset_ic as a callback for
1774 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1775 changed. At first, shift to the initial state.
1776 (minput__init): Initialize Minput_reset. Register reset_ic as a
1777 callback for Minput_reset.
1778 (Minput_reset): New variable.
1779 (minput_filter): Always set ic->xxx_changed to 0.
1780 (minput_reset_ic): New function.
1781 (integer_value): Fix typo ('>' -> '<') and calculation of length
1784 * m17n-core.c (merror_code): Change type to `int'.
1786 * m17n-misc.h (merror_code): Adjust type.
1788 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1790 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1791 (mtext_change_prop): Delete extern.
1793 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1794 to `int'. Move the documents to m17n-core.h.
1796 2004-12-13 Kenichi Handa <handa@m17n.org>
1798 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1799 (MTextProperty): Document it.
1801 2004-12-09 Kenichi Handa <handa@m17n.org>
1803 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1805 2004-12-03 Kenichi Handa <handa@m17n.org>
1807 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1808 m17n__gui_initialized): New externs.
1810 * m17n-core.h (enum M17NStatus): New enum.
1811 (m17n_status): Extern it.
1813 * m17n-core.c (core_initialized): Delete this variable.
1814 (m17n__core_initialized, m17n__shell_initialized,
1815 m17n__gui_initialized): New variables.
1816 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1817 instead of core_initialized.
1818 (m17n_status): New function.
1820 * m17n.c (shell_initialized): Delete this variable.
1821 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1824 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1826 * m17n-gui.c (win_initialized): Delete this variable.
1827 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1828 instead of gui_initialized.
1830 2004-11-19 Kenichi Handa <handa@m17n.org>
1832 * input.c (reset_ic): Check if ic_info->state is NULL.
1833 (filter): If ic_info->state is NULL, return 0.
1834 (load_input_method): Don't unref `maps' it it's not created.
1836 2004-11-15 Kenichi Handa <handa@m17n.org>
1838 * input.c (find_candidates_group): If INDEX is -1, find the last
1840 (take_action_list): If the previous of the first candidate is
1841 requested, select the last candidate.
1843 2004-11-08 Kenichi Handa <handa@m17n.org>
1845 * m17n-X.c (device_open): Try at most 32 fonts to find a
1846 non-autoscaled font.
1848 * font.c (xlfd_parse_name): Fix previous change.
1850 2004-11-05 Kenichi Handa <handa@m17n.org>
1852 * font.c: (commont_style): Include dummy elements "slanted" and
1853 "rslanted" to prefer "o" to "r" if "i" is requested.
1855 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1857 2004-10-29 Kenichi Handa <handa@m17n.org>
1859 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1861 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1862 New members smallest and larger.
1863 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1864 (xfont_registry_list): Likewise.
1865 (xfont_select): Likewise.
1868 2004-10-28 Kenichi Handa <handa@m17n.org>
1870 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1871 font name comparison.
1872 (xfont_select): Fix logic for selecting a larger size font.
1874 2004-10-25 Kenichi Handa <handa@m17n.org>
1876 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1879 2004-10-22 Kenichi Handa <handa@m17n.org>
1881 * input.c (update_candidate): Renamed from udpate_candidate.
1882 (take_action_list): Show more debugging info on arithmetic commands.
1884 * m17n-X.c (device_open): Fix previous change.
1886 * draw.c (compose_glyph_string): Don't get face property at the
1889 2004-10-21 Kenichi Handa <handa@m17n.org>
1891 * draw.c (compose_glyph_string): Fix for the case of category
1894 2004-10-19 Kenichi Handa <handa@m17n.org>
1896 * input.c (mdebug_mask): New variable.
1897 (shift_state): Print debug information.
1898 (take_action_list): Likewise.
1899 (handle_key): Likewise.
1901 2004-10-14 Kenichi Handa <handa@m17n.org>
1903 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1905 2004-10-13 Kenichi Handa <handa@m17n.org>
1907 * m17n-X.c (device_open): Be sure to register at least one font
1910 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1911 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1913 2004-10-12 Kenichi Handa <handa@m17n.org>
1915 * draw.c (alloc_gstring): Fix previous change.
1917 * font-ft.c (ft_list_generic): Fix for the case of not
1920 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1922 * font.c (mfont_list): If no font is found, return NULL.
1923 (load_font_encoding_table): Put entries of nil registry first.
1924 (find_encoding): Adjust for the above change.
1926 2004-10-11 Kenichi Handa <handa@m17n.org>
1928 * m17n-gui.h (mfont_list): Adjust prototype.
1930 * m17n-X.c (xfont_list): New arg maxnum.
1932 * font.h (struct MFontDriver): Change prototype of <list>.
1934 * font-ft.c (fc_generic_family_list): Delete it.
1935 (Mserif, Msans_serif, Mmonospace): Delete them.
1936 (M_generic_family_info): New variable.
1937 (enum GenericFamilyType): New enum.
1938 (struct GenericFamilyInfo): New struct.
1939 (generic_family_table): New variable.
1940 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1942 (add_font_info): Get style here.
1943 (ft_list_family): Don't initialize fc_config here. Don't list
1945 (ft_list_generic): New function.
1946 (ft_select): Pay attention to generic familes here.
1947 (ft_open): Fix calculation of ascent and descent.
1948 (ft_list): Pay attention to generic families.
1949 (mfont__ft_init): Initialize M_generic_family_info,
1950 generic_family_table, and fc_config..
1951 (mfont__ft_fini): Finalize generic_family_table.
1953 * draw.c (compose_glyph_string): Use more constant font for
1954 glyphs. Adjust for the member change in MGlyph.
1955 (layout_glyph_string): Adjust for the member change in MGlyph.
1956 (alloc_gstring): Intilize scracth_glyph to avoid
1957 compose_glyph_string on it.
1958 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1959 (mdraw_coordinates_position): Fix previous change.
1961 * internal-gui.h (glyph_category): New enum.
1962 (MGlyph): Change type of <category> to enum glyph_category.
1964 * face.c (mface__realize): Delete args langauge and charset.
1965 (mface__for_chars): Fix for the case that glyphs have different
1967 (mface__update_frame_face): Adjust for mface__realize change.
1969 * face.h (mface__realize): Adjust prototype.
1971 2004-10-05 Kenichi Handa <handa@m17n.org>
1973 * language.c (mlang__init): Add Akan.
1975 2004-10-04 Kenichi Handa <handa@m17n.org>
1977 * font-ft.c (add_font_info): Add instead of push the element.
1978 (ft_list_family): For generic fonts, try all
1979 substituted. families.
1981 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1982 (run_rule): Don't update cluster range here.
1983 (run_command): Update cluster range on appending a glyph.
1984 (run_otf): Update cluster range for glyphs generated by OTF.
1986 2004-10-02 Kenichi Handa <handa@m17n.org>
1988 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1990 2004-09-30 Kenichi Handa <handa@m17n.org>
1992 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1994 2004-09-30 Kenichi Handa <handa@m17n.org>
1996 * font.h: Include <fontconfig/fontconfig.h>.
1997 (MFTInfo): New member langset.
1998 (mfont__encoding_list): Extern it.
2000 * font.c (mfont__encoding_list): New function.
2001 (mdebug_dump_font_list): New function.
2003 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2004 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2006 (ft_family_list): New variable.
2007 (set_font_info): New arg basep. Callers changed.
2008 (fc_list): Check the return value of FcPatternGetString.
2009 (add_font_info): New arg plist. Callers changed. Update
2011 (ft_list_family): New function (merged fc_list and ft_list_all).
2012 (ft_select): Use ft_list_family.
2013 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2015 (mfont__ft_init): Initialize above new variables.
2016 (mfont__ft_fini): Free ft_family_list.
2017 (STRDUP_LOWER): New macro.
2018 (set_font_info): Use STRDUP_LOWER.
2019 (ft_list_family): Avoid duplicate addition of font path. Use
2021 (fc_decode_prop): Fix typo.
2023 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2024 (xfont_registry_list): Change argument disp_info to frame.
2026 (xfont_list_all): New function.
2027 (xfont_list): If FONT is not NULL, check all fonts.
2029 2004-09-28 Kenichi Handa <handa@m17n.org>
2031 * m17n-X.c (MXFont, MXFontList): New types.
2032 (MDisplayInfo): Delete members font_registry_list,
2033 iso8859_1_family_list, iso10646_1_family_list, new members
2034 font_list, base_font_list.
2035 (free_display_info): Adusted for the change of MDisplayInfo.
2036 (xfont_driver): Initialize with xfont_list.
2037 (font_compare): New function.
2038 (build_font_list): Deleted.
2039 (xfont_registry_list): New function.
2040 (xfont_select): Use xfont_registry_list.
2041 (xfont_list): New function.
2042 (device_open): Adusted for the change of MDisplayInfo.
2044 * font-ft.c (add_font_info): New arg languages. Callers changed.
2045 (fc_list): Get languages from fonts..
2046 (ft_list_all): Renamed from ft_list. Callers changed.
2047 (ft_list): New function.
2048 (mfont__ft_driver): Initalize with ft_list.
2050 * font.c (mfont_list): New function.
2052 * font.h (struct MFontDriver): New member `list'.
2053 (MFTInfo): New member languages.
2055 * m17n-gui.h (mfont_list): Extern it.
2057 2004-09-27 Kenichi Handa <handa@m17n.org>
2059 * internal-gui.h (struct MGlyphString): Delete members mt,
2060 sub_width, sub_lbrearing, sub_rbearing, and region.
2062 * draw.c (MSubTextExtents): New type.
2063 (layout_glyphs): New arg extents. Set its members.
2064 (layout_glyph_string): Adjusted for the above change.
2065 (alloc_gstring): Don't set gstring->mt.
2066 (truncate_gstring): Call line_break function with mt instead of
2069 2004-09-22 Kenichi Handa <handa@m17n.org>
2071 * mtext.c (count_utf_16_chars): Count each code of invalid
2074 2004-09-19 Kenichi Handa <handa@m17n.org>
2076 * mtext.c (default_utf_16, default_utf_32): Rename them to
2077 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2080 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2083 2004-09-13 Kenichi Handa <handa@m17n.org>
2085 * draw.c (Mlatin): Don't declare it here.
2086 (visual_order): Fix reordering of combining characters.
2087 (compose_glyph_string): Fix detection of script.
2088 (layout_glyphs): Don't fix reordering of combining characters
2090 (layout_glyph_string): Pay attention to
2091 control->disable_overlapping_adjustment.
2092 (truncate_gstring): Include at least on character in a line.
2093 (get_gstring): Always scan one full line.
2094 (mdraw__init): Don't initialize Mlatin here.
2095 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2096 have a font, use ascent/descent of an ASCII font. Allow
2097 ink_array_return and logical_array_return to be NULL.
2098 (mdraw_coordinates_position): Fix iteration.
2100 * font-ft.c (MFTtoProp): Member completely changed.
2101 (ft_to_prop): Adjusted for the above change.
2102 (ft_to_prop_size): Likewise.
2103 (set_font_info): Adjusted for the change of MFTtoProp.
2104 (fc_generic_family_list): New variable.
2105 (fc_list): Add special handling of generic font names.
2106 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2107 Initialize fc_generic_family_list.
2108 (mfont__ft_fini): Don't free ft_to_prop. Free
2109 fc_generic_family_list.
2110 (FC_vs_M17N_font_prop): New type.
2111 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2112 (fc_decode_prop, fc_encode_prop): New functions.
2113 (mfont__ft_parse_name): Use fc_decode_prop.
2114 (mfont__ft_unparse_name): Use fc_encode_prop.
2116 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2117 (MWDevice): Add member realized_font_list.
2118 (free_display_info): Don't free disp_info->realized_font_list.
2119 (free_device): Free device->realized_fontset_list.
2120 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2121 (device_open): Don't initialize disp_info->realized_font_list.
2122 (device_open): Initialize device->realized_font_list and set it to
2123 frame->realized_font_list.
2125 * fontset.c (try_font_group): New function.
2126 (mfont__lookup_fontset): Use try_font_group.
2128 * font.c (common_weight): Change the order of "regular".
2130 * face.c (Mlatin): Don't make it static.
2131 (mface__realize): Be sure to set work_gstring.frame.
2132 (mface__for_chars): Likewise.
2134 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2137 * internal-gui.h (Mlatin): Extern it.
2139 * m17n-gui.h (MDrawControl): New member
2140 disable_overlapping_adjustment.
2142 2004-09-06 Kenichi Handa <handa@m17n.org>
2144 * font-flt.c (run_otf): Fix typo ('}'->']').
2146 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2147 (COMBINING_PRECOMPUTED_P): New macros.
2149 * draw.c (layout_glyphs): Handle precomputed combining code.
2151 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2152 precomupted combining code.
2154 2004-09-03 Kenichi Handa <handa@m17n.org>
2156 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2159 2004-08-27 Kenichi Handa <handa@m17n.org>
2161 * face.c (mface_put_prop): If the new value is the same as the
2162 current one, don't increment frame->tick.
2164 2004-08-25 Kenichi Handa <handa@m17n.org>
2166 * fontset.c (mfontset): Initialize font_spec_list member.
2167 (mfontset_copy): Load fontset if necessary.
2169 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2170 'metrics' to for C++.
2172 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2175 2004-08-16 Kenichi Handa <handa@m17n.org>
2177 * Version 1.1.0 released.
2179 2004-08-13 Kenichi Handa <handa@m17n.org>
2181 * language.c (mlang__init): Add Dhivehi.
2183 * m17n-gui.c (Mx, Mfreetype): Delete it.
2184 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2186 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2187 (mfont_resize_ratio): Extern it.
2188 (MDrawGlyphInfo): New member logical_width;
2189 (MDrawGlyph): New type.
2190 (mdraw_glyph_list): Prototype adjusted.
2192 * m17n-X.c (xfont_open): Set type and fontp members.
2193 (xft_open): Likewise.
2195 * internal-gui.h (Mx, Mfreetype): Delete extern.
2197 * font.h (struct MRealizedFont): New member type and fontp.
2199 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2200 (Mx, Mfreetype): Declare here.
2201 (Mxft): New variable.
2202 (mfont_resize_ratio): New function.
2204 * font-ft.c (ft_open): Set type and fontp members.
2206 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2209 2004-08-11 Kenichi Handa <handa@m17n.org>
2211 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2214 2004-08-06 Kenichi Handa <handa@m17n.org>
2216 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2219 * font-flt.c (run_otf): Print debugging information if necessary.
2221 2004-08-05 Kenichi Handa <handa@m17n.org>
2223 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2224 positioning_type 5 and 6. Switch simplified.
2226 2004-08-04 Kenichi Handa <handa@m17n.org>
2228 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2230 2004-08-02 Kenichi Handa <handa@m17n.org>
2232 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2233 set val to 1 even if it is greater than 1.
2235 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2237 2004-07-29 Kenichi Handa <handa@m17n.org>
2239 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2240 debugging information.
2242 * internal.h (MDEBUG_PRINT5): New macro.
2244 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2245 the previous one if the zero width glyph has left or right
2248 2004-07-26 Kenichi Handa <handa@m17n.org>
2250 * m17n-X.c (xft_render): Pay attention to members left_padding and
2251 right_padding of MGlyph.
2253 * draw.c (visual_order): Allocate one more elements for arrays as
2254 a workaround of fribidi bug.
2255 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2256 instead of MGlyph->bidi_sensitive.
2257 (layout_glyph_string): Pay attentinon to
2258 control->orientation_reversed when padding at the head or tail.
2259 Fix adjustment of space glyph width.
2260 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2263 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2264 instead of MGlyph->bidi_sensitive.
2266 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2268 2004-07-26 Kenichi Handa <handa@m17n.org>
2270 * draw.c (visual_order): Don't treat combined glyphs specially.
2271 (layout_glyphs): Don't get metrics glyphs that are already ready.
2272 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2273 width with the previous one.
2274 (draw_background): Fix bar cursor position on a r2l glyph.
2276 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2277 (run_rule): Fix place of updating cluster_begin_pos and
2278 cluster_end_pos here.
2279 (run_otf): Don't set left_padding.
2281 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2283 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2284 Fix handling of GPOS.
2285 (mfont__ft_drive_gpos): Delete this function.
2287 * font.h (mfont__ft_drive_otf): Renamed back from
2288 mfont__ft_drive_gsub.
2289 (mfont__ft_drive_gpos): Delete extern.
2291 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2292 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2294 2004-07-23 Kenichi Handa <handa@m17n.org>
2296 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2297 the same bidi level.
2299 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2301 2004-07-22 Kenichi Handa <handa@m17n.org>
2303 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2305 2004-07-20 Kenichi Handa <handa@m17n.org>
2307 * draw.c (render_glyphs): Fix checking of g->code validity.
2309 * face.c (mface__realize): Set g.type.
2311 2004-07-18 Kenichi Handa <handa@m17n.org>
2313 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2316 * m17n-gui.c (mframe): Print error message give by dlopen to
2319 2004-07-16 Kenichi Handa <handa@m17n.org>
2321 * draw.c (compose_glyph_string): Improve the way of deciding a
2322 script. For a character that doesn't have script property, use
2323 the last non-latin script.
2325 * font-ft.c (fc_list): Cancel previous change.
2326 (mfont__ft_init): Add more entries in ft_to_prop_name.
2328 2004-07-15 Kenichi Handa <handa@m17n.org>
2330 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2331 previous or next character glyphs.
2333 2004-07-14 Kenichi Handa <handa@m17n.org>
2335 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2336 of type GLYPH_SPACE.
2338 * fontset.c (mfont__lookup_fontset): If glyph type is
2339 GLYPH_SPACE, get codes for SPACE.
2341 * internal-gui.h (Mfont): Delete extern.
2343 * m17n-gui.h (Mfont): Delete duplicated extern.
2345 2004-07-13 Kenichi Handa <handa@m17n.org>
2347 * font-ft.c (DEVICE_DELTA): New macro.
2348 (adjust_anchor): New function.
2349 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2351 (mfont__ft_drive_gpos): New function.
2353 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2354 (FontLayoutContext): Delete member `rfont'.
2355 (run_otf): Set g->otf_cmd. Call
2356 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2357 only whne HAVE_OTF is defined.
2359 * fontset.c: Include "config.h".
2361 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2362 (MGlyph): New member otf_cmd.
2364 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2365 (mfont__ft_drive_gpos): Extern it.
2367 * face.c: Include "config.h".
2369 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2371 * input-gui.c: Include "config.h".
2373 * plist.c: Include "config.h".
2375 2004-07-06 Kenichi Handa <handa@m17n.org>
2377 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2378 internal-gui.h: Cancel previous changes.
2380 * m17n-gd.h: Delete it.
2382 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2383 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2384 @XML2_LD_FLAGS@ to above.
2385 (libm17n_la_LIBADD): Add -ldl.
2386 (libm17n_la_LDFLAGS): Add -export-dynamic.
2387 (X_LD_FLAGS): Fix the order of linking.
2388 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2389 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2390 (libm17n_X_la_LDFLAGS): Add -module.
2391 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2392 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2393 (libm17n_gd_la_LDFLAGS): Add -module.
2394 (include_HEADERS): Delete m17n-gd.h.
2396 2004-06-30 Kenichi Handa <handa@m17n.org>
2398 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2399 (MDeviceLibraryInterface): Delete it.
2400 (register_device_library): Delete it.
2401 (m17n__device_library_list): Renamed from device_library_list.
2403 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2404 (m17n_init_win): Adjust prototype.
2406 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2407 (m17n_init_gd): New function.
2409 * m17n-gd.h: New file.
2411 * m17n-X.h: Include <m17n-gui.h>.
2412 (m17n_init_X): Extern it.
2413 (M17N_INIT): Redefine it.
2415 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2416 (m17n_init_X): New function.
2418 * internal-gui.h (m17n__device_library_list): Extern it.
2419 (struct MDeviceDriver): New members initialized, init, and fini.
2421 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2423 (libm17n_X_la_LIBADD): Delete aboves.
2424 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2425 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2426 (libm17n_gd_la_LDFLAGS): Delete it.
2427 (include_HEADERS): Add m17n-gd.h.
2429 2004-06-25 Kenichi Handa <handa@m17n.org>
2431 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2432 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2434 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2436 * font-ft.c (fc_list): If FcFontList finds no font, try
2439 * draw.c (compose_glyph_string): Terminate the last loop after
2440 doing default combining if necessary.
2442 2004-06-24 Kenichi Handa <handa@m17n.org>
2444 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2446 * character.c (mchar_define_property): Add const to an arg.
2448 * charset.c (mchar_define_charset): Add const to an arg.
2450 * coding.c (MCodingSystem): Add const to an arg or decoder.
2451 (finish_decoding): Add const to an arg.
2452 (decode_coding_charset, decode_coding_utf_8)
2453 (decode_coding_utf_16, decode_coding_utf_32)
2454 (decode_coding_iso_2022, decode_coding_sjis)
2455 (mconv_define_coding): Likewise.
2457 * m17n-X.c (xft_find_metric): Delete unused variable.
2459 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2462 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2465 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2466 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2468 * mtext.h (mtext__from_data): Ajust prototype.
2470 2004-06-23 Kenichi Handa <handa@m17n.org>
2472 * draw.c (compose_glyph_string): Always get glyph codes by
2474 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2475 (mdraw_glyph_list): New function.
2477 * font-flt.c (mfont__flt_run): Be sure to call
2478 rfont->driver->encode_char.
2480 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2481 (ft_encode_char): Delete arg C.
2482 (ft_render): Don't call FT_Get_Char_Index.
2484 * font.c (mfont__encodable_p): Delete it.
2485 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2487 * font.h (struct MFontDriver): Delete arg C of encode_char.
2488 (mfont__encodable_p): Delete extern.
2490 * m17n-X.c (xfont_encode_char): Delete arg C.
2491 (xft_find_metric): Don't cal FT_Get_Char_Index.
2492 (xft_render): Likewise.
2494 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2496 (mdraw_glyph_list): Extern it.
2498 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2500 2004-06-22 Kenichi Handa <handa@m17n.org>
2502 * m17n-gui.h (mfontset_lookup): Extern it.
2504 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2506 * fontset.c (realize_fontset_elements)
2507 (free_realized_fontset_elements, update_fontset_elements): New
2509 (mfont__realize_fontset): Call realize_fontset_elements.
2510 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2511 (mfont__lookup_fontset): If a fontset was modified, update
2512 the realized fontset.
2513 (mfontset_modify_entry): Increment fontset->tick.
2514 (mfontset_lookup): New function.
2516 2004-06-21 Kenichi Handa <handa@m17n.org>
2518 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2520 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2521 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2522 length of source text 0.
2524 2004-06-21 Kenichi Handa <handa@m17n.org>
2526 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2527 (compare): Pay attention to format other than utf-8.
2528 (copy): Delete this function.
2529 (count_by_utf_8, count_by_utf_16, insert): New functions.
2530 (count_utf_16_chars): Fix handling of a surrogate pair.
2531 (find_char_forward, find_char_backward): Likewise.
2532 (mtext__from_data): Delete unnecessary check. Fix number of
2534 (mtext_from_data): Don't count items.
2535 (mtext_ref_char): Optimize the code.
2536 (mtext_set_char): Pay attention to format other than utf-8.
2537 (mtext_cat_char): Likewise.
2538 (mtext_dup): Don't call copy, instead do allocation here.
2539 (mtext_cat): Call insert instead of copy.
2540 (mtext_ncat): Likewise.
2541 (mtext_cpy): Delete character at first and call insert instead of
2543 (mtext_ncpy): Likewise.
2544 (mtext_copy): Likewise.
2545 (mtext_duplicate): Call insert instead of copy.
2546 (mtext_del): Pay attention to format other than utf-8.
2547 (mtext_ins): Simply call insert.
2548 (mtext_ins_char): Pay attention to format other than utf-8.
2549 (mtext_tok): Call insert instead of copy.
2550 (mtext_text): Call UNIT_BYTES.
2552 * textprop.c (mtext__adjust_plist_for_change): New function.
2554 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2555 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2556 (CHAR_UNITS_AT): Fix typo.
2557 (CHAR_UNITS_BY_HEAD): Fix typo.
2558 (STRING_CHAR_AND_UNITS): Fix typo.
2560 * internal.h (MTEXT_READ_ONLY_P): New macro.
2562 * mtext.h (mtext__replace): Delete the extern.
2563 (mtext__adjust_foramt): Adjust prototype.
2565 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2566 if possible. Otherwise make a copy of mmt.
2568 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2571 2004-06-18 Kenichi Handa <handa@m17n.org>
2573 * character.h (CHAR_STRING_UTF16): Fix syntax.
2575 2004-06-16 Kenichi Handa <handa@m17n.org>
2577 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2578 (libm17n_X_la_LIBADD): Delete it.
2579 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2581 * m17n-X.c (device_open): Add parens in `if' condition.
2583 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2584 (DEC_POSITION): Likewise.
2585 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2587 2004-06-15 Kenichi Handa <handa@m17n.org>
2589 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2592 * draw.c (compose_glyph_string): If langauge is specified, call
2593 mface__for_chars even if a text is all latin. Fix condition for
2594 setting non_ascii_found.
2596 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2598 * m17n.h (minput_char_to_key): Delete extern.
2600 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2602 * m17n-gui.c (null_device_open): Set several members of frame.
2604 2004-06-14 Kenichi Handa <handa@m17n.org>
2606 * m17n-gui.h (minput_event_to_key): Delete extern.
2608 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2610 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2612 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2614 2004-06-08 Kenichi Handa <handa@m17n.org>
2616 * character.c (mchar_put_prop): Don't increment the ref-count of
2619 2004-06-04 Kenichi Handa <handa@m17n.org>
2621 * m17n-core.c (mdebug__register_object): New function.
2622 (mdebug__unregister_object): Likewise.
2624 * internal.h (mdebug__register_object, mdebug__unregister_object):
2626 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2629 * charset.c (mcharset__load_from_database): Don't call
2630 mconv__register_charset_coding here.
2632 * coding.c (find_coding): Get a real name from an element of
2633 coding_definition_list.
2634 (mconv__register_charset_coding): Set the real name at the top of
2636 (mcoding__load_from_database): Likewise.
2637 (mconv_list_codings): Adjusted for the above change.
2639 2004-06-03 Kenichi Handa <handa@m17n.org>
2641 * coding.c (find_coding): Find by canonicalized name. Don't have
2642 to modify the element of coding_definition_list by
2644 (mconv__define_coding_from_charset): Delete it.
2645 (mconv__register_charset_coding): Canonicalize sym.
2646 (mcoding__load_from_database): Register plist modified by
2649 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2651 * font-ft.c (ft_open): Fix setting of rfont->descent.
2653 2004-06-02 Kenichi Handa <handa@m17n.org>
2655 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2656 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2657 (xlfd_unparse_name): Renamed from xfont_build_name.
2658 (mfont__init): Initialized Mfontconfig.
2659 (mfont__free_realized): Unconditionally unref rfont->info.
2660 (mfont__select): Free `this' if it's not best.
2661 (mfont__open): Don't check frame->realized_font_list.
2662 (mfont__parse_name_into_font): New function.
2663 (Mfontconfig): New variable.
2664 (mfont_from_name): Call mfont_parse_name.
2665 (mfont_name): Call mfont_unparse_name.
2666 (mdebug_dump_font): Likewise.
2668 * font.h (struct MFontDriver): Delete members parse_name and
2670 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2671 (mfont__parse_name_into_font): Extern it.
2673 * font-ft.c: Include "symbol.h".
2674 (close_ft): Unconditionally free filename and charmap_list of
2676 (ft_open): Duplicate base->filename. Increment ref-count of
2677 ft_info->charmap_list. Free ft_info->charmap_list and
2678 ft_info->filename on error.
2679 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2681 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2683 (enum xlfd_field_idx): Moved to font.c.
2684 (split_font_name, build_font_name): Likewise.
2685 (build_font_list): Call mfont__parse_name_info_font.
2686 (xfont_open): Call mfont__unparse_name. Free name.
2687 (xfont_parse_name, xfont_build_name): Moved to font.c
2688 (xft_select): Prototype deleted.
2689 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2690 Call mfont_pase_name.
2692 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2693 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2696 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2699 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2701 2004-06-01 Kenichi Handa <handa@m17n.org>
2703 * fontset.c (mfontset_modify_entry): Pay attention to the case
2704 that fontset->font_spec_list is NULL.
2706 2004-05-31 Kenichi Handa <handa@m17n.org>
2708 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2710 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2712 * font.c (mfont__select): Print score the a font for debugging.
2714 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2716 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2717 kanji_sym and kana_sym.
2719 2004-05-28 Kenichi Handa <handa@m17n.org>
2721 * Makefile.am (VINFO): New variable.
2722 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2723 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2725 2004-05-27 Kenichi Handa <handa@m17n.org>
2727 The following chanages are to make device dependent functions
2728 accessible only from MDeviceDriver structure, and to add GD and
2729 null device drivers. Font drivers get also device dependent.
2731 * m17n.c (m17n_init): Increament shell_initialized.
2732 (m17n_fini): Decremented shell_initialized.
2734 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2736 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2737 (Mwidget, Mcolormap, Mx): Extern them.
2739 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2740 (free_frame): Call frame->driver->close instead of
2742 (DLOPEN_SHLIB_EXT): New macro.
2743 (MDeviceLibraryInterface): New type.
2744 (device_library_list): New variable.
2745 (register_device_library): New function.
2746 (null_device): New variable.
2747 (null_device_close, null_device_get_prop)
2748 (null_device_realize_face, null_device_free_realized_face): New
2750 (null_driver): New variable.
2751 (null_device_init, null_device_fini, null_device_open): New
2753 (null_interface): New variable.
2754 (Mfreetype, Mdevice): Declare them.
2755 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2756 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2757 Mwin__Close_Device. Register drivers for Mx and Mgd.
2758 (m17n_fini_win): Decremented win_initialized. Call "fini"
2759 function of all opened devices. Don't call mwin__fini.
2760 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2762 (mframe): Handle Mdevice key of PLIST.
2763 (mframe_get_prop): Call frame->device->get_prop instead of
2764 mwin__device_get_prop.
2766 * m17n-gd.c: New file.
2768 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2769 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2771 * m17n-core.c (m17n_init_core): Increate core_initialized.
2772 (m17n_fini_core): Decremented core_initialized.
2774 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2775 (Mcolormap): Don't extern them here.
2777 * m17n-X.c (FRAME_DEVICE): New macro.
2778 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2779 (free_display_info): Use MPLIST_DO.
2780 (free_device): Free rface->info.
2781 (xft_close): Delete it.
2782 (device_init): Renamed from mwin__init.
2783 (device_fini): Renamed from mwin__fini.
2784 (device_open): Renamed from mwin__open_device.
2785 (x_driver): New variable.
2786 (MXFontInfo): Delete member frame, add member display.
2787 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2788 Don't declare them here.
2790 * internal-gui.h (MDeviceType): New enum.
2791 (MWDefice): Delete it.
2792 (struct MFrame): Change type of device to void *. New members
2793 device_type, driver, font_driver_list.
2794 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2795 (MDeviceDriver): New type.
2796 (Mx, Mgd, Mfreetype): Extern them.
2797 (mwin__XXX): Delete all of them.
2799 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2801 (win_destroy_ic): Likewise.
2802 (adjust_window_and_draw): Likewise.
2803 (win_callback): Likewise.
2804 (Mxim): Declare it here.
2805 (minput_event_to_key): Call M_CHECK_READABLE.
2807 * fontset.c (mfont__lookup_fontset): Delete local variable
2810 * font.h (struct MFontDriver): Delete member close, add members
2811 parse_name and build_name.
2812 (mfont__driver_list): Delete extern.
2813 (mfont__close): Delete extern.
2815 * font.c (mfont__init): Don't set mfont__driver_list.
2816 (mfont__fini): Don't unref mfont__driver_list.
2817 (mfont__select): Try font drivers in frame->font_driver_list. Set
2818 driver member of a realized font.
2819 (mfont__close): Delete it.
2820 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2821 functions of the default frame.
2823 * font-ft.c (close_ft): Check ft_info->ft_face and work
2825 (add_font_info): Allocate ft_info by M17N_OBJECT.
2826 (ft_close): Delete it.
2827 (mfont__ft_driver): Don't set ft_close.
2828 (ft_select): Increment ref-count of best_font.
2829 (ft_open): Decremented ref-count of base. On error, call
2830 FT_Done_Face and free ft_info.
2831 (ft_find_metric): Always use XXX_MONO in load_flags.
2832 (ft_render): Fix setting of width. Call
2833 frame->driver->draw_points instead of mwin__draw_points.
2834 (ft_to_prop): Don't set mfont__driver_list.
2835 (mfont__ft_fini): Just unref ft_info.
2837 * face.c (mface__init): Exchange foreground and background of
2838 mface__default. Call mface_put_prop to set hline of
2840 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2841 (mface__free_realized): Don't call mwin__free_realized_face.
2843 * draw.c (Mdepth): Don't declare it here.
2844 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2845 (render_glyphs, render_glyph_string): Likewise.
2846 (mdraw__init): Don't set Mdepth.
2847 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2849 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2851 (mdraw_text_items): Check FRAME is writable.
2852 (mdraw_per_char_extents): Implement body.
2854 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2856 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2857 (GUI_SOURCES): Delete it.
2858 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2859 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2860 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2861 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2862 (linkgui_LDADD): Set to libm17n-gui.la
2863 (linkgui_LDFLAGS): New target.
2864 (SRC): Include ${libm17n_gui_la_SOURCES} and
2865 ${libm17n_gd_la_SOURCES}.
2867 2004-05-24 Kenichi Handa <handa@m17n.org>
2869 * draw.c (draw_background): Don't draw background even if
2870 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2872 2004-05-22 Kenichi Handa <handa@m17n.org>
2874 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2876 2004-05-20 Kenichi Handa <handa@m17n.org>
2878 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2880 * m17n-gui.c: Include "plist.h".
2881 (mframe): If PLIST is NULL, initialize it to emply plist.
2883 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2884 (xft_driver): New variable.
2885 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2886 (xft_find_metric, xft_render): New function.
2887 (mwin__init): Adjusted for the new mfont__driver_list.
2888 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2889 generated face to PARAM.
2890 (mwin__realize_face): Fix setting of box colors. Don't call hook
2892 (mwin__draw_hline): New function.
2893 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2894 (mwin__xft_render): Delete these function.
2896 * internal-gui.h (struct MFrame): New member tick.
2897 (struct MGlyphString): New member tick.
2898 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2899 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2900 (mwin__xft_render): Delete extern.
2902 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2903 (mfontset): Always increment the reference count of returned
2906 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2907 (MFTInfo): Moved to font.h.
2908 (ft_iso8859_1_font_list): Delete this variable.
2909 (set_font_info): Don't set font->property[MFONT_TYPE].
2910 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2911 (add_font_info): Change type to void.
2912 (fc_list): Change anme from xft_list. Caller changed. Include
2913 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2914 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2915 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2916 (close_ft): Don't call mwin__xft_close. Unref
2917 ft_info->extra_info.
2918 (ft_open): Don't setup ft_info->fontname. Don't call
2920 (ft_find_metric): Don't call mwin__xft_get_metric.
2921 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2922 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2923 (mfont__ft_init): Adjusted for new mfont__driver_list.
2924 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2926 * font.c (mfont__driver_list): Make it MPlist.
2927 (mfont__init): Adjust initialization of mfont__driver_list.
2928 (mfont__fini): Free mfont__driver_list.
2929 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2930 (mfont__select): Adjusted for the new mfont__driver_list.
2932 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2933 (mfont__drirver_list): Adjust prototype.
2934 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2936 * face.h (struct MFace): Delete member realized_face_list, add
2938 (struct MRealizedFace): Delete member need_update
2939 andnofont_rface, add member non_ascii_list.
2940 (mface__update_frame_face): Extern it.
2942 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2944 (get_hline_create, get_box_create): New functions.
2945 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2947 (free_face): Cancep previous change. Free face->frame_list.
2948 (serialize_hline): Do nothing if hline->width is zero.
2949 (serialize_box): Do nothing if box->width is zero.
2950 (mface__init): Setup all properties of mface__default.
2951 (mface__fini): Free hline_prop_list and box_prop_list.
2952 (mface__realize): Cancel previous change. Update
2953 face->frame_list. Setup rface->non_ascii_list.
2954 (mface__for_chars): Update rface->non_ascii_list.
2955 (mface__free_realized): Free rface->non_ascii_list.
2956 (mface__update_frame_face): New function.
2957 (mface): Initialize face->frame_list.
2958 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2960 (mface_merge): Likewise.
2961 (mface_put_prop): If key is Mhline or Mbox, get value by
2962 get_hline_create or get_box_create respectively.
2963 (mface_put_prop): Update frame->tick and call
2964 mface__update_frame_face if necessary.
2965 (mface_update): Do nothing if func is noop_hook.
2967 * draw.c (render_glyphs): If a font is not found, use
2968 mwin__draw_empty_boxes.
2969 (alloc_gstring): Initialize gstring->tick.
2970 (get_gstring): Check gstring->tick.
2972 2004-05-17 Kenichi Handa <handa@m17n.org>
2974 * face.c (find_realized_face): Return value changed. If RFONT is
2975 NULL, avoid unnecessary checking.
2976 (free_face): Free face->realized_face_list.
2977 (mface__realize): Adjusted for the change of find_realized_face.
2978 If it returns a realized face that needs update, free it and
2979 realize a new one. Push a new realized face to
2980 frame->realized_face_list instead of appending.
2981 (mface__for_chars): Adjusted for the change of find_realized_face.
2982 Short cut if the required font is in rface->ascii_rface.
2983 (mface_put_prop): Free old value if necessary. Set need_update
2984 member of realized faces to 1.
2986 * face.h (struct MFace): Delete member tick, add member
2988 (struct MRealizedFace): Delete member tick, add member
2991 2004-05-13 Kenichi Handa <handa@m17n.org>
2993 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2995 2004-05-12 Kenichi Handa <handa@m17n.org>
2997 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2999 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3000 parse it XftNameParse.
3002 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3003 (all_fonts_scaned): New variable.
3004 (set_font_info): FAMILY may be Mnil.
3005 (add_font_info): Argument changed.
3006 (xft_list): Call add_font_info in it.
3007 (ft_list): Likewise.
3008 (ft_select): Make it work in the case family is Mnil.
3009 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3010 (mfont__ft_fini): Set all_fonts_scaned to 0.
3012 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3013 that is failed to open.
3015 2004-05-10 Kenichi Handa <handa@m17n.org>
3017 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3018 device's depth is 1 (i.e. monochrome).
3020 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3021 to work around the problem of libtool.
3023 * font-ft.c: Include <freetype/ftbdf.h>.
3024 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3026 (mfont__ft_init): Initialize them.
3027 (ft_iso8859_1_font_list): New variable.
3028 (set_font_info): Detect a font containing iso8859-1 glyphs and
3029 register it in ft_iso8859_1_font_list. If the font is not
3030 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3031 properties of the font from its properties.
3032 (add_font_list): If the font is not scalable, check if it is BDF
3033 or PCF font. If not, ignore it.
3034 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3035 registry is not iso8859-1.
3036 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3037 ft_iso8859_1_font_list.
3038 (ft_find_metric): If the font is not scalable, assume it as BDF
3039 or PCF, and get a metric from its properties.
3040 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3042 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3044 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3045 (libm17n_la_LDFLAGS): Delete it.
3046 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3047 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3049 2004-05-06 Kenichi Handa <handa@m17n.org>
3051 * draw.c (compose_glyph_string): Fix previous change.
3053 2004-04-30 Kenichi Handa <handa@m17n.org>
3055 * font-ft.c (ft_list): Delete unused variable `result'.
3056 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3058 2004-04-27 Kenichi Handa <handa@m17n.org>
3060 * m17n-X.c: Include config.h
3061 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3062 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3063 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3064 (FRAME_CMAP, FRAME_VISUAL): New macros.
3065 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3066 (xfont_driver): Make it static.
3067 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3068 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3069 info->xft_color_back.
3070 (MXftFontInfo) [HAVE_XFT2]: New type.
3071 (mwin__xft_close) [HAVE_XFT2]: New function.
3072 (mwin__xft_open) [HAVE_XFT2]: New function.
3073 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3074 (mwin__xft_render) [HAVE_XFT2]: New function.
3076 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3077 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3078 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3081 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3083 * font-ft.c: Don't include FT_FREETYPE_H here.
3084 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3085 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3086 (MFTInfo): New member charmap_index.
3087 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3088 (check_otf_filename): Renamed from check_filename. Return value
3090 (ft_set_property): This function deleted.
3091 (set_font_info): New function.
3092 (add_font_list): Argument changed. Add multiple fonts.
3093 (xft_list) [HAVE_XFT2]: New function.
3094 (ft_list) [not HAVE_XFT2]: New function.
3095 (ft_select): Add code for Xft.
3096 (close_ft): Likewise.
3097 (ft_open): Likewise.
3098 (ft_find_metric): Likewise.
3099 (ft_encode_char): Likewise.
3100 (ft_render): Likewise.
3102 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3104 2004-04-26 Kenichi Handa <handa@m17n.org>
3106 * textprop.c (mtext_attach_property): Declare the return type as
3109 2004-04-21 Kenichi Handa <handa@m17n.org>
3111 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3113 2004-04-09 Kenichi Handa <handa@m17n.org>
3115 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3117 (load_command): Setup above members.
3119 2004-04-05 Kenichi Handa <handa@m17n.org>
3121 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3123 2004-03-30 Kenichi Handa <handa@m17n.org>
3125 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3128 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3129 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3131 2004-03-29 Kenichi Handa <handa@m17n.org>
3133 * Version 1.0 Patch Level 2 released.
3135 2004-03-29 Kenichi Handa <handa@m17n.org>
3137 * charset.c (make_charset): Set charset->fully_loaded and
3138 charset->simple correctly. Don't try to get charset->min_char and
3139 charset->max_char for a charset of method subset and superset.
3140 Don't load a mapping file here.
3141 (mcharset__init): Set unified_max.
3142 (mcharset__load_from_database): Free a working plist.
3144 * coding.c (mcoding__fini): Free all malloced data.
3146 * input-gui.c (win_create_ic): Set control.as_image for preediting
3149 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3150 `count') to initialize the array.
3152 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3155 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3157 (mwin__create_window): Fix bug of setting a background pixel of a
3159 (mwin__adjust_window): Clear the window before drawing.
3161 * m17n-core.c (mdebug__report_object): Free array->objectes if
3163 (m17n_init_core): Don't set report_header_printed to 0 here.
3164 Fix debugging information.
3165 (m17n_fini_core): Set report_header_printed to 0 here.
3167 * m17n-core.h (mplist_deserialize): Extern it.
3169 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3171 * m17n.c (m17n_fini): Fix debugging information.
3173 * mtext.c (mtext__adjust_foramt): New function.
3175 * mtext.h (mtext__adjust_foramt): Extern it.
3177 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3179 * plist.h (mplist__deserialize): Don't extern it.
3181 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3182 elements of symbol_table to NULL. Report about created and freed
3183 symbols if MDEBUG_FINI is set.
3185 2004-03-22 Kenichi Handa <handa@m17n.org>
3187 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3189 * m17n.c (m17n_init): Fix the way of checking merror_code.
3191 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3193 2004-03-22 Kenichi Handa <handa@m17n.org>
3195 * fontset.c (realize_font_group): Adjust the font size by
3196 mfont__resize before selecting a font.
3198 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3200 2004-03-19 Kenichi Handa <handa@m17n.org>
3202 * Version 1.0 Patch Level 1 released.
3204 2004-03-19 Kenichi Handa <handa@m17n.org>
3206 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3208 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3210 2004-03-19 Kenichi Handa <handa@m17n.org>
3212 Re-apply the changes forgotten in the released version.
3214 * charset.c (mcharset__load_from_database): Call
3215 mchar_define_charset.
3217 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3218 (mconv_encode_range): Put Mcoding text property.
3220 2004-03-18 Kenichi Handa <handa@m17n.org>
3222 * draw.c (Mdepth): New variable.
3223 (visual_order): Delete unused local var `pos'.
3224 (compose_glyph_string): Fix for the case that gstring->glyphs is
3225 realloced. Stop generating glyphs at TO. Fix handling of
3227 (layout_glyphs): Get metrics of all glyphs in advance. Set
3228 lbearing and rbearing of base of composition glyph correctly.
3229 Handle left-overhang glyphs correctly.
3230 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3232 (dump_combining_code): Change the defualt off_x character to ".".
3233 (mdraw__init): Initialize Mdepth.
3235 * face.c (work_gstring): New variable
3236 (mface__init): Initialize work_gstring.
3237 (mface__fini): Free work_gstring.glyphs.
3238 (mface__realize): Don't handle videomode property here. Adjusted
3239 for the change of mfont__get_metric.
3240 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3242 * face.h (enum face_gc): Moved to m17n-X.c.
3244 * font.h (struct MFontDriver): Arguments of find_metric changed.
3245 (mfont__select): Prototype adjusted.
3246 (mfont__get_metric): Likewise.
3247 (mfont__ft_drive_otf): Likewise.
3248 (mfont__flt_run): Likewise.
3250 * font.c (mfont__select): New argument layouter. If layouter is
3251 different in the registered font, make a new copy of realized
3253 (mfont__get_metric): Argument changed. Get metrics of multiple
3255 (mfont_find): Call mfont__select with layouter as Mnil.
3257 * font-flt.c (FontLayoutContext): New member rfont.
3258 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3259 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3261 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3263 (NUM_POINTS): New macro.
3264 (MPointTable): New type.
3265 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3266 (mfont__ft_drive_otf): New argument rfont.
3268 * fontset.c (realize_font_group): Adjusted for the changed of
3270 (check_fontset_element): This function deleted.
3272 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3273 off the parent window if the preedit text is zero length.
3275 * internal-gui.h (struct MFrame): New members foreground,
3276 background, videomode, font.
3277 (struct MGlyphString): New member anti_alias.
3278 (MDrawPoint): New type.
3279 (mwin__draw_bitmap): Prototype deleted.
3280 (mwin__draw_points): Prototype added.
3282 * m17n-gui.h (MDrawControl): New member anti_alias.
3284 * m17n-gui.c (free_frame): Free frame->font.
3285 (mframe): Set the fontset of frame->face to the default fontset.
3287 * m17n-X.c (RGB_GC): New type.
3288 (enum gc_index): Renamed from enum face_gc. Member names changed.
3290 (struct MWDevice): Members foreground and background deleted. New
3291 member scratch_gc, gc_list.
3292 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3293 (free_device): Free GCs in device->gc_list.
3294 (get_rgb_gc): New function.
3295 (get_gc): Renamed and argument changed from get_color.
3296 (get_gc_for_anti_alias): New function.
3297 (xfont_find_metric): Arguments changed. Get metrics of multiple
3299 (set_region): Argument changed. Caller changed.
3300 (xfont_render): Allways set a font in gc.
3301 (x_error_handler, x_io_error_handler): Define only if
3302 X_SET_ERROR_HANDLER is defined.
3303 (mwin__open_device): Create device->scratch_gc. Set members
3304 foreground, background, and videomode of frame. Call
3305 XSetErrorHandler and XSetIOErrorHandler only if
3306 X_SET_ERROR_HANDLER is defined.
3307 (struct gc_list): Deleted.
3308 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3309 (mwin__realize_face): Adjusted for the change of the format of
3310 rface->info and the charge of set_region.
3311 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3312 (mwin__draw_box): Likewise.
3313 (mwin__draw_bitmap): This function deleted.
3314 (mwin__draw_points): New function.
3315 (mwin__verify_region): Adjusted for the change of the format of
3316 rface->info and the charge of set_region.
3317 (mwin__create_window): Inherit backgound pixel from parent.
3318 (mwin__dump_gc): Adjusted for the change of the format of
3321 2004-03-16 Kenichi Handa <handa@m17n.org>
3323 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3325 * input.c (M_key_alias): New variable.
3326 (handle_key): Try M_key_alias property of a key too.
3327 (minput__init): Initialize M_key_alias. Give that property to
3328 symbols in one_char_symbol. Fix bug of initializing
3331 * draw.c (compose_glyph_string): Don't handle
3332 ignore_formatting_char here. Include formatting characters in the
3333 range processed by a FTL.
3334 (layout_glyph_string): Handle ignore_formatting_char here.
3336 2004-03-12 Kenichi Handa <handa@m17n.org>
3338 * input-gui.c (win_create_ic): Enable bidi in status control.
3340 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3342 2004-03-09 Kenichi Handa <handa@m17n.org>
3344 * input.c (load_input_method): If title is not specified, use the
3345 input method name as title.
3347 * m17n-X.c (get_color): Make it static.
3348 (xim_create_ic, xim_destroy_ic, x_error_handler)
3349 (x_io_error_handler): Likewise.
3351 2004-03-01 Kenichi Handa <handa@m17n.org>
3353 * Version 1.0 released.
3356 Copyright (C) 2003, 2004
3357 National Institute of Advanced Industrial Science and Technology (AIST)
3358 Registration Number H15PRO112
3360 This file is part of the m17n library.
3362 The m17n library is free software; you can redistribute it and/or
3363 modify it under the terms of the GNU Lesser General Public License
3364 as published by the Free Software Foundation; either version 2.1 of
3365 the License, or (at your option) any later version.
3367 The m17n library is distributed in the hope that it will be useful,
3368 but WITHOUT ANY WARRANTY; without even the implied warranty of
3369 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3370 Lesser General Public License for more details.
3372 You should have received a copy of the GNU Lesser General Public
3373 License along with the m17n library; if not, write to the Free
3374 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA