1 2007-03-21 Kenichi Handa <handa@m17n.org>
3 * input.c (update_custom_info): Fix for the case "name == Mnil &&
5 (reload_im_info): Fix for the case that no title is specified.
6 (config_command): Fix for the case that configuration is
8 (check_variable_value): Fix return value.
9 (minput_config_command): If keyseqlist is an empty list, cancel
11 (minput_config_variable) If value is an empty list, cancel the
13 (minput_save_config): Handle cancellation of config and customize
16 2007-03-15 Kenichi Handa <handa@m17n.org>
18 * input.c (minput_config_variable): Check custom->vars (not
21 2007-03-01 Kenichi Handa <handa@m17n.org>
23 * input.c (reload_im_info): Setup cmds, vars, and title of
25 (check_variable_value): Fix the return value.
27 * database.c (mdatabase__check): If necessary, update database and
30 2007-02-28 Kenichi Handa <handa@m17n.org>
32 * database.c (get_dir_info): Set dir_info->status to
34 (check_version): New function.
35 (register_database): Don't call find_database.
36 (register_databases_in_files): Don't register a database of
38 (mdatabase__update): Likewise. Avoid unnecessary scanning.
40 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
41 and MDB_STATUS_OUTDATED.
43 * font.h (struct MFont): Types of members type, source, and
44 spacing changed to unsigned.
46 * internal-gui.h (struct): Types of members category and type
49 * internal.h (struct MText): Types of members format and coverage
52 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
53 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
55 2007-02-23 Kenichi Handa <handa@m17n.org>
57 * input.c (Mpop): New variable.
58 (fully_initialize): Initialize Mpop.
59 (parse_action_list): Handle Mpop.
60 (take_action_list): Likewise.
61 (handle_key): When a key is unhandled, shift to the initial state
62 only if the current state has no branch action.
65 2007-02-12 Kenichi Handa <handa@m17n.org>
67 * input.c (get_preceding_char): Unref mt if necessary.
68 (get_following_char): Likewise.
69 (parse_action_list): Fix handling of `insert' action as
71 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
72 (take_action_list): Check invalid candidate list.
74 2007-02-06 Kenichi Handa <handa@m17n.org>
76 * input.c (integer_value): Check also ic->produced for @-N.
78 2007-01-26 Kenichi Handa <handa@m17n.org>
80 * database.c (mdatabase__update): Check mdatabase__dir_list from
83 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
85 2007-01-12 Kenichi Handa <handa@m17n.org>
87 * input.c (handle_key): Handle a branch action of the initial
90 2007-01-10 Kenichi Handa <handa@m17n.org>
92 * m17n-gd.c (gd_render): Delete superfluous line.
94 2006-12-26 Kenichi Handa <handa@m17n.org>
96 * m17n.h (minput_callback): Extern it.
98 * input.h (minput__callback): Delte extern.
100 * input.c (get_surrounding_text): Adjusted for the change of
101 minput__callback to minput_callback.
102 (delete_surrounding_text): Likewise.
103 (minput_create_ic): Likewise.
104 (minput_destroy_ic): Likewise.
105 (minput_filter): Likewise.
106 (minput_set_spot): Likewise.
107 (minput_toggle): Likewise.
108 (minput_reset_ic): Likewise.
110 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
111 and ic->candidate_to to 0.
112 (minput_callback): Renamed from minput__callback.
114 * input-gui.c (win_callback): Adjusted for the change of
115 minput__callback to minput_callback.
117 2006-12-15 Kenichi Handa <handa@m17n.org>
119 * font-ft.c (ft_add_font): Fix typo.
121 2006-12-06 Kenichi Handa <handa@m17n.org>
123 * Version 1.3.4 released.
125 2006-11-16 Kenichi Handa <handa@m17n.org>
127 * input.c (parse_action_list): Allow (undo 0).
128 (adjust_markers): New function.
129 (preedit_insert, preedit_delete): Call adjust_markers.
130 (preedit_replace): New function.
131 (update_candidate): Call preedit_replace instead of preedit_insert
133 (filter): When ic_info->commit_key_head is nonzero, shift input
134 event keys even if there's no committed text.
136 2006-11-10 Kenichi Handa <handa@m17n.org>
138 * input.h (MInputContextInfo): New member commit_key_head.
140 * input.c (preedit_commit): Update ic_info->commit_key_head.
141 (take_action_list): Reset ic_info->commit_key_head on Mundo.
142 (filter): When committed, shift keys by ic_info->commit_key_head.
144 2006-10-30 Kenichi Handa <handa@m17n.org>
146 * input.c (preedit_delete): Fix typo.
147 (take_action_list): Print more debugging information. Allow
148 variable in arg of 'select' and `pushback'.
150 * database.c (gen_database_name): Don't put extra space.
151 (load_database): Print debugging information.
152 (register_databases_in_files): New arg headlen. Callers changed.
153 (mdatabase__load_for_keys): Shorten debugging information.
154 (mdatabase_load): Don't print debugging information here.
156 2006-10-27 Kenichi Handa <handa@m17n.org>
158 * input.c (marker_code): New arg surrounding. Callers changed.
159 (surrounding_pos): Check if name[0] == '@'.
160 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
161 (take_action_list): Likewise.
162 (get_preceding_char): If POS is zero, always call
163 get_surrounding_text.
165 2006-10-19 Kenichi Handa <handa@m17n.org>
167 * input.c (load_variables): Fix setting of `global'.
169 2006-10-16 Kenichi Handa <handa@m17n.org>
171 * draw.c (draw_background): Be sure to set *to_x.
172 (render_glyph_string): If from == to, just return.
174 2006-10-18 Kenichi Handa <handa@m17n.org>
176 * database.c (get_dir_info): Return NULL if the directory name is
178 (register_databases_in_files): Call register_database with
180 (mdatabase__update): Fix logic. Call register_database with
182 (mdatabase_define): Call register_database with
185 * input.c (delete_surrounding_text): Be sure to set members
186 preceding_text and following_text to NULL.
187 (shift_state): Save variable values in ic_info->vars_saved.
188 (preedit_commit): Don't print debug information here. Don't
189 change ic_info->keys here.
190 (get_candidate_list): Don't ref plist.
191 (take_action_list): Don't unref return value of
192 get_candidate_list. For undo, reset ic->produced and recover
193 ic_info->vars. Be sure to set ic->candidate_list to NULL after
195 (init_ic_info): Set ic_info->vars_saved.
196 (fini_ic_info): Unref ic_info->vars_saved.
197 (re_init_ic): Be sure to set ic->candidate_list to NULL after
199 (filter): Be sure to set members preceding_text and following_text
200 to NULL. Print debug information about produced text. Delete
201 processed keys from ic_info->keys.
203 * input.h (MInputContextInfo): New member vars_saved.
205 2006-10-16 Kenichi Handa <handa@m17n.org>
207 * database.c (mdatabase__update): Fix the way to get db_info.
209 2006-10-02 Kenichi Handa <handa@m17n.org>
211 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
212 `size' changed to 24.
214 * font.c (xlfd_unparse_name): Adjusted for the change of
216 (font_score): Likewise.
217 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
219 * m17n-X.c (MFontX, _MFontX): Deleted.
220 (SET_SIZE, HAVE_SIZE): Deleted.
221 (free_display_info): Adjusted for the change of
222 disp_info->font_list format.
223 (xfont_registry_list): Likewise.
224 (xfont_open): Likewise.
225 (xfont_list): Likewise.
226 (xfont_encode_char): Ignore size to find a realized font.
227 (MRealizedFontXft): Change the order of members to make it
228 compatible with MRealizedFontFT.
230 2006-09-27 Kenichi Handa <handa@m17n.org>
232 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
233 (mfont_close): Add comments.
235 * mtext-lbrk.c (mtext_line_break): Add comment.
237 2006-09-26 Kenichi Handa <handa@m17n.org>
239 * input.c (minput_get_description): Handle description about
240 inclusion-only input methods.
242 2006-09-21 Kenichi Handa <handa@m17n.org>
244 * input.c (M_gettext): New variable.
245 (fully_initialize): Initialize M_gettext.
246 (check_description): New function.
247 (load_commands): Call check_description.
248 (config_all_commands): Be sure to unref pl.
249 (load_variables): Call check_description.
250 (config_all_variables): Be sure to unref pl.
251 (load_im_info): Call check_description.
253 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
255 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
256 and bind_textdomain_codeset.
258 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
260 2006-09-15 Kenichi Handa <handa@m17n.org>
262 * input.c (reload_im_info): Update custom and global info.
263 (init_ic_info): Fix previous change.
265 2006-09-14 Kenichi Handa <handa@m17n.org>
267 * database.c: Include <libgen.h>.
268 (mdatabase__lock): Make a directory if necessary.
270 * input.c (resolve_command): Adjusted for the format change of
271 configured_cmds member.
272 (load_commands, load_variables): Fix for errornous data handling.
273 (config_command, config_variable): New function.
274 (config_all_commands, config_all_variables): Renamed from
275 config_commands and config_variables. Utilize the above function.
276 (check_variable_value): Argument changed. Callers changed.
277 (load_im_info): Call config_all_commands and config_all_variables.
278 (init_ic_info): Adjusted for the format change of configured_vars
280 (minput__init): Initialize Mcustomized, Mconfigured, and
282 (Mcustomized, Mconfigured, Minherited): New variables.
283 (minput_get_command): Be sure to return NULL if an input method
284 use no local command.
285 (minput_get_variable): Be sure to return NULL if an input method
286 use no local variable.
287 (minput_config_command, minput_config_variable)
288 (minput_save_config): Adjusted for the format change of
289 configured_cmds and configured_vars members.
291 * plist.c (write_element): Delete superfluous ':'.
293 2006-09-13 Kenichi Handa <handa@m17n.org>
295 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
296 (minput_config_file): Extern it.
298 * draw.c (Minherited): Declaration moved to input.c.
299 (mdraw__init): Don't initialize Minherited here.
301 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
303 2006-09-07 Kenichi Handa <handa@m17n.org>
305 * textprop.c (mtext_serialize): Call mplist__serialize with the
308 * plist.h (mplist__serialize): Prototype adjusted.
309 (mplist__assq): Extern it.
311 * plist.c: Include <ctype.h>
312 (PUTC, PUTS): New macros.
313 (write_symbol): New function.
314 (write_element): New arg indent.
315 (dump_string, dump_plist_element): Delete them.
316 (mplist__from_string): New arg pretty.
317 (mplist__assq): New function.
318 (mdebug_dump_plist): Use write_element.
320 * mtext.c (mtext_cat_char): Allocate more memory.
321 (mdebug_dump_mtext): Don't escal a newline character.
323 * m17n.h (minput_get_command, minput_get_variable)
324 (minput_config_command, minput_config_variable)
325 (minput_save_config): Extern them.
327 * m17n-core.c: Include <string.h>.
328 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
329 use the stream stdout instead of a file of that name.
331 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
334 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
335 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
336 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
337 (MDEBUG_DUMP): Flush the stream.
339 * input.h (struct _MInputMethodInfo): Delete member im. New
340 members mdb, language, name, extra, cmds, configured_cmds,
341 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
342 (MInputContextInfo): New member tick.
344 * input.c: Big change to improve user-side input method
345 customization. Here, list just public API changes.
346 (minput_get_commands, minput_get_variables)
347 (minput_assign_command_keys, minput_set_variable): Label them
349 (minput_get_command, minput_get_variable)
350 (minput_config_command, minput_config_variable)
351 (minput_save_config): New functions.
353 * database.h (PATH_MAX): Define it if not yet defined.
354 (PATH_SEPARATOR): Likewise.
355 (enum MDatabaseStatus): New enum.
356 (struct MDatabaseInfo): Moved from database.c. New members status,
357 time, lock_file, and uniq_file.
358 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
359 (mdatabase__unlock): Extern them.
361 * database.c: Include <time.h>.
362 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
363 (GEN_PATH): Args changed. Callers changed.
364 (struct MDatabaseInfo): Moved to database.h.
365 (struct MDatabase, mdb_list): Deleted.
366 (mdatabase__list): New var.
367 (get_database_filename): Deleted. Callers changed to use
369 (find_file, get_database_file): New files.
370 (get_dir_info): Initialize new members of MDatabaseInfo.
371 (find_database): Arg chagnded. Callers changed.
372 (free_db_info, register_database, register_databases_in_files):
374 (update_database_list): Deleted.
375 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
376 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
377 (mdatabase__update): New function.
378 (mdatabase__check): Return value changed.
379 (mdatabase__file, mdatabase__lock, mdatabase__save)
380 (mdatabase__unlock): New functions.
382 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
384 * input.c (get_surrounding_text): Return -2 when surrounding text
386 (get_following_char): Likewise.
387 (get_preceding_char): Likewise.
388 (minput__callback): Return 0 if there is a callback function,
391 2006-08-17 Kenichi Handa <handa@m17n.org>
393 * input.c (reset_ic): Use shift_state to setup the current state.
395 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
397 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
398 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
399 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
401 2006-08-02 Kenichi Handa <handa@m17n.org>
403 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
405 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
407 * font-ft.c (ft_encapsulate): Add code for debugging.
408 (mfont__ft_drive_otf): Be sure to encode character before getting
411 2006-07-21 Kenichi Handa <handa@m17n.org>
413 * draw.c (mdraw_text_extents): Fix previous typo.
415 2006-07-19 Kenichi Handa <handa@m17n.org>
417 * draw.c (gstring_width): New arg lbearing.
418 (render_glyph_string): Adjusted for the change of gstring_width.
419 (mdraw_text_extents): Fix lbearing of ink and line metrics.
421 * m17n-core.h (Mlanguage): Extern it.
423 * m17n.h (Mlanguage): Extern deleted.
425 * mtext.c (mtext__init): Initialize Mlanguage.
426 (Mlanguage): Declaration moved from locale.c
428 * locale.c (mlocale__init): Don't initialize Mlanguage here.
429 (Mlanguage): Declaration moved to mtext.c.
431 * language.c (mlang__init): Don't initialize Mlanguage here.
433 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
435 2006-07-14 Kenichi Handa <handa@m17n.org>
437 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
438 (MRealizedFontFT): New member face_encapsulated.
439 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
440 (ft_gen_font): New function.
441 (ft_add_font): Use ft_gen_font.
442 (ft_list_script): Store lists in ft_script_list.
443 (ft_check_otf): New arg ft_face. Caller changed.
444 (ft_check_language): Likewise.
445 (ft_check_script): Likewise.
446 (ft_encapsulate, ft_close): New functions.
447 (mfont__ft_driver): Initialize members encapsulate and close.
448 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
450 * font.h (struct MRealizedFont): New member encapsulating.
451 (struct MFontDriver): New members encapsulate and close.
453 * font.c (mfont__match_p): If FONT is realized, check capability
454 by font drivers's check_capability method.
455 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
458 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
459 declarations of foundry and fam local vars.
460 (xft_driver): Make it static.
462 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
463 (mfont_close): Extern them.
465 * m17n-gd.c (device_open): Don't specify foundry and family of the
468 2006-07-11 Kenichi Handa <handa@m17n.org>
470 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
472 2006-07-13 Kenichi Handa <handa@m17n.org>
474 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
476 (ft_check_script): Delete unused var.
477 (ft_list_capability): Likewise.
479 * font.c (mfont__get_capability): Setup cap->otf.
480 (Motf): Make it global.
481 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
483 * font.h (MFontCapability): New member otf.
485 * language.c (mlang__fini): Delete unused vars.
487 * m17n-gui.h (Motf): Extern it.
489 * database.c (update_database_list): Delete unused vars.
491 2006-07-07 Kenichi Handa <handa@m17n.org>
493 * font-ft.c (DEVICE_DELTA): Fix typo.
495 2006-07-06 Kenichi Handa <handa@m17n.org>
497 * fontset.c (mfont__lookup_fontset): Don't ignore family and
500 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
502 * database.c: Update comments.
504 2006-07-05 Kenichi Handa <handa@m17n.org>
506 * database.c (PATH_MAX): Define it if not yet defined.
507 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
509 (get_database_filename): Use GEN_PATH.
510 (get_dir_info): Don't include the last '/' in directory name.
511 (register_database): New function.
512 (update_database_list): Use register_database. Search all
513 directories in mdatabase__dir_list for wildcard databases.
514 (mdatabase__init): Check "~/.m17n.d".
516 2006-07-03 Kenichi Handa <handa@m17n.org>
518 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
519 push reverse property.
521 * plist.c (dump_plist_element): Fix previous change.
523 2006-06-28 Kenichi Handa <handa@m17n.org>
525 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
528 * draw.c (MbidiNSM): New variable.
529 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
530 attention to bidi type NSM.
531 (mdraw__init): Initialize MbibiNSM.
533 * language.c (mscript__char_list): Fix finding a char-list element.
535 * plist.c (dump_string): Return number of printed characters.
536 (dump_plist_element): Print elements more compactly.
538 2006-06-23 Kenichi Handa <handa@m17n.org>
540 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
541 (include_HEADERS): Likewise.
543 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
545 * language.c: Update documentation.
547 2006-06-23 Kenichi Handa <handa@m17n.org>
549 * font-ft.c (struct MFontFT): Delete member lang.
550 (free_ft_info): Don't unref member lang. Destroy members langset
552 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
553 changed. Set members langset and charset.
554 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
556 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
558 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
559 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
560 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
561 characters at first. If it fails, try listing by language names.
562 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
563 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
564 change of MFontCapability.
565 (ft_list_capability): Likewise. Try listing by languages, then by
566 scripts. Check OTF at last.
567 (ft_check_script): New function.
568 (ft_select): Adjusted for the check of MFontCapability.
569 (ft_list_family_names): New function.
570 (ft_check_capability): If cap->script is not Mnil, call
572 (mfont__ft_driver): Initialize with ft_list_family_names.
574 * font.h (struct MFontDriver): New member list_fmaily_names.
575 (struct): Change member "MSymbol *lang" to "MSymbol language".
577 * font.c: Include "language.h".
578 (Motf): New variable.
579 (otf_script_list, load_otf_script_list): Delete it.
580 (find_script_from_otf_tag): Delete it.
581 (merge_capability): New function.
582 (mfont__init): Init Motf.
583 (mfont__fini): Don't unref otf_script_list.
584 (free_font_capability): Check cap->script_tag to determine if
585 OTF-related capability is set.
586 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
587 the change of type MFontCapability.
588 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
590 (mfont_list): Call merge_capability for LANGUAGE arg.
591 (mfont_list_family_names): New function.
593 * input-gui.c: Typo in comments fixed.
595 * input.c: Typo in comments fixed.
597 * language.h (mlanguage__list): Delete it.
598 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
601 * language.c: Include "mtext.h".
602 (M_script_lang_list): Delete it.
603 (language_list, script_list): New variables.
604 (load_lang_script_list, init_language_list, init_script_list): New
606 (mlang__init): Don't load language database here.
607 (mlang__fini): Unref language_list and script_list if not NULL.
608 (mlanguage__list): Delete it.
609 (mlanguage__info, mscript__info, mscript__char_list)
610 (mscript__otf_tag, mscript__from_otf_tag): New functions.
611 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
612 (mscript_list, mscript_language_list): New functions.
614 * m17n-gui.h (mfont_list_family_names): Extern it.
616 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
617 (mlanguage_text, mscript_list, mscript_language_list): Extern
620 2006-06-21 Kenichi Handa <handa@m17n.org>
622 * m17n-X.c (xfont_driver): Initialize with
623 xfont_list_family_names.
624 (xfont_list_family_names): New function.
625 (xft_driver): Initialize with NULL for list_family_names member.
626 (device_init): Set list_family_names member of xft_driver to that
629 2006-06-06 Kenichi Handa <handa@m17n.org>
631 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
633 2006-03-24 Kenichi Handa <handa@m17n.org>
635 * font-ft.c (ft_open): Improve debug message.
637 * fontset.c (mfontset__get_font): Fix for the case that no font in
638 per_script list is available.
640 2006-02-06 Kenichi Handa <handa@m17n.org>
642 * Version 1.3.3 released.
644 2006-02-22 Kenichi Handa <handa@m17n.org>
646 * textprop.c: Fix some typos in documentation.
648 * plist.c: Fix some typos in documentation.
650 * m17n-core.h: Fix some typos in documentation.
651 (M17NLIB_PATCH_LEVEL): Updated to 3.
652 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
654 * symbol.c: Fix some typos in documentation.
656 * mtext.c: Fix some typos in documentation.
658 * input.c: Fix several typos in documentation.
660 2006-02-06 Kenichi Handa <handa@m17n.org>
662 * Version 1.3.2 released.
664 2006-02-03 Kenichi Handa <handa@m17n.org>
666 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
667 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
669 * font.c (xlfd_parse_name): Fix handling of the name "nil".
671 * draw.c (layout_glyphs): Fix handling left_padding of
674 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
676 2006-02-02 Kenichi Handa <handa@m17n.org>
678 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
681 2006-01-25 Kenichi Handa <handa@m17n.org>
683 * input.c (resolve_expression): If the value of PLIST is a plist,
684 but the first element is not symbol, return 0.
686 2006-01-17 Kenichi Handa <handa@m17n.org>
688 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
689 HAVE_GD is 2 or the greater.
691 2006-01-16 Kenichi Handa <handa@m17n.org>
693 * Version 1.3.1 released.
695 2006-01-16 Kenichi Handa <handa@m17n.org>
697 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
698 simulating anti-aliasing.
700 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
701 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
703 2006-01-12 Kenichi Handa <handa@m17n.org>
705 * input.c (get_surrounding_text): Always pop ic->plist.
706 (reset_ic): Don't reset ic->plist.
708 2006-01-10 Kenichi Handa <handa@m17n.org>
710 * input.c (preedit_commit): For debugging, print only commiting
711 charactes. Don't set ic->candidate_show to 0.
712 (handle_key): Don't run branch-actions just by shifting to the
714 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
715 Reset vars and plist.
717 2006-01-07 Kenichi Handa <handa@m17n.org>
719 * input.c (load_branch): Confirm that maps is not NULL.
721 2006-01-05 Kenichi Handa <handa@m17n.org>
723 * input-gui.c (win_filter): Try to convert arg to key only when
726 * plist.c (read_integer_element): If '#' and '-' are followed by
727 non-integer-constituent, read them as a part of a symbol.
728 (read_symbol_element): New arg C.
729 (read_element): Adjust args to read_symbol_element.
731 * input.c (load_macros): On overwriting a macro, free the old
733 (minput__init): Store Mmap in load_im_info_keys.
734 (minput_get_title_icon): If the input method has no title, be sure
736 (minput_get_description): If the input method has no description,
737 be sure to return NULL.
738 (minput_get_variables): Fix documentation.
739 (handle_key): Pay attention to the case that key is Mnil.
740 (filter): Likewise. Fix handling of such symbol as S-A.
742 2005-12-22 Kenichi Handa <handa@m17n.org>
744 * Version 1.3.0 released.
746 2005-12-22 Kenichi Handa <handa@m17n.org>
748 * font-ft.c (ft_list): If the specified font has no property,
751 2005-12-20 Kenichi Handa <handa@m17n.org>
753 * character.c (mchar_get_prop): Check char_prop_list.
754 (mchar_put_prop, mchar_get_prop_table): Likewise.
756 2005-12-18 Kenichi Handa <handa@m17n.org>
758 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
759 file name sans language.
761 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
763 * input.c: Fix typo in comments.
765 2005-12-14 Kenichi Handa <handa@m17n.org>
767 * input.c (minput_get_title_icon): Check the default icon for the
770 2005-12-13 Kenichi Handa <handa@m17n.org>
772 * input.c (Mless_equal, Mgreater_equal): New variables.
773 (parse_expression, resolve_expression, parse_action_list)
774 (take_action_list): Handle the aboves.
775 (filter): Treat key S-X as X.
776 (minput__init): Initialize Mless_equal and Mgreater_equal.
777 (minput_get_title_icon): New function.
779 * m17n.h (minput_get_title_icon): Extern it.
781 * database.c (get_database_filename): Return a filename instead of
783 (load_database): Adjusted for the above change.
784 (mdatabase__load_for_keys): Likewise.
785 (mdatabase__find_file): New function.
787 * database.h (mdatabase__find_file): Extern it.
789 * font.h (mfont__resize): Delete extern.
791 * font.c (mfont__list): Check resize ratio.
792 (mfont__resize): Delete it.
793 (mfont_resize_ratio): Include the code of mfont__resize.
795 * font-ft.c (ft_open): Check resize ratio.
797 * m17n-X.c (xfont_open): Check resize ratio.
798 (xft_open): Likewise.
800 2005-12-07 Kenichi Handa <handa@m17n.org>
802 * input.c (take_action_list): If take_action_list return -1,
804 (handle_key): Likewise.
806 * face.c (mface__for_chars): When font is specified and layouter
807 is found for it, if the layouter doesn't support one of a
808 character, use a face sans layouter for it.
810 2005-12-06 Kenichi Handa <handa@m17n.org>
812 * fontset.c (mfont__lookup_fontset): If only a fallback font is
813 found, don't use it for more than one character.
815 2005-12-05 Kenichi Handa <handa@m17n.org>
817 * face.c (mface__realize): Set rfont->layouter to Mnil.
818 (mface__for_chars): Fix handling of layouter.
820 * character.h (mchar__define_prop): Extern it.
822 * database.c (update_database_list): Call mchar__define_prop if
825 * character.c (mchar__init): Don't call mchar_define_property.
826 Instead just initialize property keys.
827 (mchar__fini): Free char_prop_list only if it's not NULL.
828 (mchar__define_prop): New function.
829 (mchar_define_property): Call mchar__define_prop.
831 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
834 2005-12-02 Kenichi Handa <handa@m17n.org>
836 * language.c (mlang__init): Handle extra chars.
838 * m17n-gui.h (mfont_check): Adjust prototype.
840 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
841 (xfont_check_capability): New function.
842 (xft_driver): Specify xft_check_capability.
843 (xft_check_capability): New function.
845 * font-ft.c (M0_3): Delete it.
847 (ft_get_charmaps): Refer to M0.
848 (fc_parse_pattern): Fix previous change.
849 (ft_list_language): Check also extra chars.
850 (ft_check_otf): Define it even if HAVE_OTF is undef.
851 (ft_check_lang): Check the result of FcLangSetHasLang against
852 FcLangDifferentLang. Check also extra chars.
853 (ft_list_capability): Delete ifdef HAVE_OTF.
854 (ft_select): Likewise.
855 (ft_open): Improve debug information.
856 (ft_check_capability): New function.
857 (mfont__ft_driver): Specify ft_check_capability.
858 (mfont__ft_init): Initialize M0.
860 * fontset.c (get_font_from_group): New function.
861 (mfontset__get_font): New function.
863 * fontset.h (mfontset__get_font): Extern it.
865 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
866 (mfont__fini): Delete ifdef HAVE_OTF.
867 (free_font_capability): Likewise.
868 (mfont__get_capability): Likewise.
869 (mfont__check_capability): New function.
870 (mfont_check): Change the order of arguments. Use
873 * font.h (struct MFontDriver): New member check_capability.
874 (MFontCapability): Delete ifdef HAVE_OTF.
875 (mfont__check_capability): Extern it.
877 * face.c (mface__realize): Fix handling of FONT arg.
878 (mface__for_chars): Fix handling of explicitly specified font.
880 2005-11-25 Kenichi Handa <handa@m17n.org>
882 * font-flt.c (run_command): Print debug info for
885 * draw.c (layout_glyphs): Fix handling of left/right_padding.
887 * face.c (mface__for_chars): Check rfont before accessing the
890 2005-11-21 Kenichi Handa <handa@m17n.org>
892 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
895 * fontset.c (fontset_table): New variable.
896 (free_fontset): Call M17N_OBJECT_UNREGISTER.
897 (mfont__fontset_init): Add fontset_table as an object array.
898 (mfont__realize_fontset): Ref FONTSET.
899 (mfont__free_realized_fontset): Unref REALIZED->fontset.
900 (mfontset): Call M17N_OBJECT_REGISTER.
901 (mfontset_copy): Likewise.
903 * input.c (handle_key): For debugging, print information about
905 (filter): Add an alias for Meta and Alt modifiers.
906 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
908 (minput__init): Initialize them.
909 (parse_expression): New function.
910 (resolve_expression): New function.
911 (parse_action_list): Handle expressions by parse_expression.
912 (take_action_list): Handle expressions by resolve_expression.
913 (parse_nested_list_value): Fix previous change.
914 (resolve_command): Fix handling of the return value of
917 2005-11-18 Kenichi Handa <handa@m17n.org>
919 * font-ft.c (ft_check_otf, otf_script_list): Define only when
921 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
923 (ft_select): Likewise.
925 * font.c (mfont_list): Fix for the case that FONT is NULL.
926 (OTF_tag): Delete it.
927 (load_otf_script_list): Define only when HAVE_OTF is defined.
928 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
931 * draw.c (truncate_gstring): Be sure to truncate at
932 glapheme-cluster boundary.
934 2005-11-11 Kenichi Handa <handa@m17n.org>
936 * input.c (delete_surrounding_text): Clear cache if necessary.
938 2005-11-09 Kenichi Handa <handa@m17n.org>
940 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
941 glyph prev is also supported by the current flt.
943 2005-11-08 Kenichi Handa <handa@m17n.org>
945 * m17n-X.c (xft_render): Cancel previous change.
947 2005-11-07 Kenichi Handa <handa@m17n.org>
949 * input.c: Include <stdlib.h>.
950 (get_surrounding_text, delete_surrounding_text)
951 (get_preceding_char, get_following_char): New functions.
952 (integer_value): New arg surrounding. If it is nonzero, try to
953 get a surrounding character. Callers changed.
954 (take_action_list): Check `value' before setting an element.
955 (destroy_ic): Unref ic_info->preceding_text and
956 ic_info->following_text.
957 (minput__init): Initialize Minput_get_surrounding_text and
958 Minput_delete_surrounding_text.
959 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
961 (filter): Unref ic_info->preceding_text and
962 ic_info->following_text.
964 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
967 * input.h (MInputContextInfo): New members preceding_text and
970 2005-11-04 Kenichi Handa <handa@m17n.org>
972 * input.c (parse_nested_list_value): Fix handling of the global
974 (get_nested_list): Get global definitions by load_partial_im_info.
975 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
976 MInputCandidatesChanged.
977 (take_action_list): Likewise.
978 (reset_ic): Likewise.
979 (create_ic): Don't pay special attention to
980 Mcandidates_group_size.
981 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
982 (minput_set_variable): Get a definition of varible by
983 mplist_find_by_value, not mplist_get.
985 * m17n.h (enum MInputCandidatesChanged): New enum.
987 2005-11-01 Kenichi Handa <handa@m17n.org>
989 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
991 (mwin__destroy_window): If xft_draw's drawable is win, change it
992 to device->drawable before destroying win.
994 2005-10-31 Kenichi Handa <handa@m17n.org>
996 * input.c (load_im_info): Fix adding of state.
998 * m17n-core.c (m17n_fini_core): Fix reporting of module
1001 * m17n.c (m17n_fini): Fix reporting of module finalization.
1003 * m17n-gui.c (m17n_init_win): Fix reporting of module
1006 2005-10-29 Kenichi Handa <handa@m17n.org>
1008 * input.c (get_candidate_list): Fix the timing of referring plist.
1010 2005-10-28 Kenichi Handa <handa@m17n.org>
1012 * input.c (load_branch): Ignore an undefined map name.
1013 (load_im_info): Set im_info->title from `name' only if it's not
1015 (shift_state): Always update ic->status.
1016 (adjust_candidates): Renamed from adjust_candidate_command.
1017 Argument changed. Caller changed.
1018 (get_candidate_list, regularize_action): New functions.
1019 (take_action_list): Use them. On handling Munhandle, don't set
1021 (handle_key): If KEY is not handled by MAP, and MAP has
1022 branch_actions, perform them.
1024 * database.c (mdatabase__fini): Free dir_info->filename;
1026 2005-10-20 Kenichi Handa <handa@m17n.org>
1028 * input.c (marker_code): Accept '@@'.
1029 (integer_value): Handle '@@'.
1030 (parse_action_list): Accept a symbol argument.
1031 (take_action_list): Resolve the symbol argument. Handle the
1034 2005-10-18 Kenichi Handa <handa@m17n.org>
1036 * input.c: Include "charset.h".
1037 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1039 (MIMState): New member (M17NObject control).
1040 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1041 (get_nested_list, resolve_variable): New functions.
1042 (integer_value): New arg (MPlist **value). Set it to the plist
1043 element containing the value.
1044 (resolve_command): New function.
1045 (load_translation): New arg (MPlist *map_actions).
1046 (load_branch): New args language and name. If `keylist' is a
1047 symbol, resolved that as a command name.
1048 (free_map): New arg top. Free map->map_actions only if top is
1050 (free_state): New function.
1051 (load_state): New arg name.
1052 (im_info_list): New variable.
1053 (free_im_info, get_im_info_by_tags): New functions.
1054 (load_im_info): Arg key changed to plist. Handle `include'.
1055 Return (MInputMethodInfo *).
1056 (preedit_commit): Ref ic->candidate_list.
1057 (get_select_charset, adjust_candidate_command): New functions.
1058 (take_action_list): Handle `include'. Adjust candidate action
1059 properly. Handle control variables `candidates-charset' and
1060 `candidates-group-size'.
1061 (open_im): Use get_im_info.
1062 (create_ic): Get global variables.
1063 (load_partial_im_info): New function.
1064 (get_im_info): New function.
1065 (check_command_keyseq, check_command_list, check_variable_list):
1067 (minput__init): Don't handle M_database_hook and Mdetail_text.
1068 Initialize M_candidates, Mcandidates_group_size,
1069 Mcandidates_charset.
1070 (parse_variable_list, get_variable_list, parse_command_list)
1071 (get_command_list): Delete them.
1072 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1073 (minput__fini): Simply unref command_list and variable_list.
1074 (minput_get_description): Adjusted for the new form of description.
1075 (minput_get_commands): Use get_nested_list.
1076 (minput_assign_command_keys): Likewise.
1077 (minput_get_variables, minput_set_variable): Likewise.
1079 * input.h (MInputMethodInfo): New members im and maps.
1081 * database.h (M_database_hook): Delete extern.
1082 (MDatabaseHookFunc): Delete extern.
1083 (mdatabase__check): Extern it.
1085 * database.c: Include <glob.h>.
1086 (MAX_TIME): New macro.
1087 (Masterisk): New variable.
1088 (get_database_stream): Argument changed to (MDatabaseInfo *).
1090 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1091 (find_database): New function.
1092 (update_database_list): New function.
1093 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1094 calling update_database_list.
1095 (mdatabase__check): New function.
1096 (mdatabase_find): Use update_database and find_database. Don't
1097 handle MDatabaseHookFunc.
1098 (mdatabase_list): Call update_database at first.
1099 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1100 (MDatabaseList): New type.
1102 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1104 * m17n.h (Mdetail_text): Delete extern.
1106 * m17n-core.h (mplist_conc): Delete extern.
1108 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1110 (mplist_conc): Renamed to mplist__conc.
1111 (mplist__pop_unref): New function.
1113 2005-10-14 Kenichi Handa <handa@m17n.org>
1115 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1117 (read_element): If keys is an empty plist, return any element
1119 (dump_plist_element): Check if plist is nested.
1120 (mplist_conc): Always ref tail.
1121 (mplist_set): If key is a managing key, ref val in advance.
1123 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1124 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1125 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1128 * fontset.c (free_fontset): Unref fontset_list if necessary.
1129 (mfont__fontset_fini): Don't free fontset_list. Unref
1131 (mfont__realize_fontset): Initialize request.
1132 (mfontset): Ref default_fontset or fontset only if necessary.
1133 (mfontset_copy): Don't ref copy.
1135 * draw.c (render_glyphs): Check gend->type before checking
1138 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1139 unrefed plists to NULL.
1141 2005-10-04 Kenichi Handa <handa@m17n.org>
1143 * textprop.c (mtext_serialize): Be sure to make mt
1144 MTEXT_FORMAT_UTF_8 and NULL terminated.
1146 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1148 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1150 2005-10-03 Kenichi Handa <handa@m17n.org>
1152 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1153 is not at the beginning of line.
1155 2005-09-22 Kenichi Handa <handa@m17n.org>
1157 * input.c: Include <sys/stat.h> and <unistd.h>.
1158 (Minclude, Mcommit, Munhandle): New variables.
1159 (minput__init): Initialize them. Push only Mstate to
1160 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1161 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1163 (load_input_method): Handle "include" directive. If no states are
1165 (shift_state): If state_name is Mt, shift back to the previous
1166 state. Call preedit_commit to commit preedit text.
1167 (preedit_commit): New function.
1168 (take_action_list): Improve debug printing. Handle commit and
1170 (handle_key): Check the return value of take_action_list. Don't
1171 take branch_actions just after changing to the root map.
1172 (reset_ic): Reset all ic_info members.
1173 (filter): When a key is not handled, just move ic_info->keys
1174 instead fo calling reset_ic.
1175 (load_im_info): If key is not Mstate, push Mmap to
1177 (MDatabaseStatList): New type.
1178 (imdir_stat_list): New variable.
1179 (input_method_hook): Don't cancel the hook. Check the
1180 modification time of directories.
1181 (minput__fini): Free imdir_stat_list;
1183 * input.h (MInputContextInfo): New member prev_state.
1185 * m17n-core.h (mplist_conc): Extern it.
1187 * plist.c (mplist_conc): New function.
1189 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1191 * font.h (MRealizedFont): New member average_width.
1193 * font-ft.c (ft_open): Set rface->average_width.
1195 * font.c (xlfd_unparse_name): Print '*' before registry name.
1197 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1198 (xfont_open): Set rfont->average_width.
1199 (xft_open): Likewise.
1200 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1202 * internal-gui.h (struct MFrame): New member average_width.
1204 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1205 (mframe_get_prop): Return the average_width of a font.
1207 * face.c (mface__realize): Set rface->average_width.
1208 (mface__update_frame_face): Set frame->average_width.
1210 * face.h (MRealizedFace): New member average_width.
1212 2005-09-19 Kenichi Handa <handa@m17n.org>
1214 * font.c (xlfd_unparse_name): New arg full_xlfd.
1215 (mfont__encode_char): Use shortcut only for X core fonts.
1216 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1217 (mfont_put_prop): Handle `language' property.
1218 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1219 Print file can capability info too.
1221 * m17n-core.c (mdebug__output): New variable.
1222 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1223 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1224 (m17n_fini_core): Close mdebug__output if it's not stderr.
1226 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1227 (xfont_open): Handle baseline_offset.
1228 (xfont_find_metric): Likewise.
1229 (xfont_render): Likewise.
1230 (xft_open): Likewise.
1231 (xft_render): Likewise.
1233 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1234 (mdebug__output): Extern it.
1235 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1236 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1237 (MDEBUG_DUMP): New macro.
1238 (MDEBUG_PRINT_TIME): Print to medebug__output.
1240 * font.h (MRealizedFont): New member baseline_offset.
1242 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1244 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1245 (ft_list_family): Check alias.
1246 (ft_list_language): If language is "en", don't try to the second
1248 (ft_default_list): New variable.
1249 (ft_list_default): New function.
1250 (ft_select): If family is not specified, try only the default
1251 fonts. Treat the weights normal and medium same.
1252 (ft_open): Fix debug message. If registry is not specified, try
1253 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1254 (ft_find_metric): Likewise.
1255 (ft_render): Likewise.
1256 (ft_list): Fix debug message. Accept the registring iso8859-1.
1257 If family is not specified, try only the default fonts.
1259 * face.c (mface__realize): Fix logic of opening a font.
1261 2005-09-16 Kenichi Handa <handa@m17n.org>
1263 * face.c (mface__realize):
1265 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1268 * input.c (shift_state): Fix the condition of taking init actions.
1269 (take_action_list): Fix handling of pushback action.
1270 (handle_key): Don't change key while checking its alias.
1271 (minput__init): Initialize new variables.
1272 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1275 2005-09-12 Kenichi Handa <handa@m17n.org>
1277 * mtext.c (mtext__uppercase): Add proper open/close parens.
1278 (mtext_titlecase): Add proper casting.
1280 * input.c (parse_action_list): Handle the case that the arg is a
1281 key sequence (MText or MPlist).
1282 (take_action_list): Likewise.
1283 (shift_state): Shorter debug message.
1284 (handle_key): Terminate a debug message by "\n".
1285 (reset_ic): Don't take initial actions here.
1286 (minput_open_im): Print a debug message.
1287 (minput_close_im): Likewise.
1288 (minput_create_ic): Likewise.
1289 (minput_destroy_ic): Likewise.
1291 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1293 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1296 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1297 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1300 * character.c: Add Japanese documentation for
1301 mchar_get_prop_table ().
1303 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1305 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1306 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1307 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1309 (init_case_conversion): New function.
1310 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1311 (uppercase_precheck, lowercase_precheck, final_sigma)
1312 (after_soft_dotted, more_above, before_dot, after_i)
1313 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1315 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1317 * plist.c (read_mtext_element): Fix previous change.
1319 2005-09-05 Kenichi Handa <handa@m17n.org>
1321 * plist.c (read_mtext_element): Handle \uXXXX notation.
1323 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1324 (MTABLE_ALLOCA): Change the name of local variable.
1326 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1327 HAVE_FREETYPE are defined.
1329 * m17n-X.c: Check HAVE_X11.
1331 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1332 directory listing libraries.
1333 (noinst_PROGRAMS): Define it only in maintainer mode.
1335 2005-09-02 Kenichi Handa <handa@m17n.org>
1337 * m17n-gui.h (mdraw_line_break_option): Extern it.
1339 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1340 end of the first glyph.
1341 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1343 (mdraw_line_break_option): New variable.
1344 (mdraw_default_line_break): Use mtext_line_break.
1346 * mtext.h (wordseg_func_table): Don't extern it.
1347 (mtext__wseg_fini): Extern it.
1349 * mtext.c: Don't include word-thai.h.
1350 (wordseg_func_table): Delete this variable.
1351 (mtext__init): Don't initialize above. Don't call
1352 mtext__word_thai_init.
1353 (mtext__fini): Don't free wordseg_func_table. Call
1354 mtext__wseg_fini instead fo mtext__word_thai_fini.
1355 (MTextWordsegFunc): Don't typedef it.
1356 (mtext__word_segment): Moved to mtext-wseg.c.
1358 * m17n-core.h (enum MTextLineBreakOption): New enum.
1359 (mtext_line_break): Extern it.
1361 * mtext-wseg.c: New file.
1363 * mtext-lbrk.c: New file.
1365 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1366 add mtext-lbrk.c and mtext-wseg.c.
1368 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1369 the case that head is NULL.
1371 2005-09-01 Kenichi Handa <handa@m17n.org>
1373 * word-thai.c (wordseg_propertize): If the property value is nil,
1374 don't make the property no-merge.
1375 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1376 attention to the case that they are NULL.
1377 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1380 * character.c (mchar_get_prop_table): New function.
1382 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1384 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1385 (mchar_get_prop_table): Extern it.
1387 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1388 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1390 * internal.h (enum MTextCoverage): New enum.
1391 (MText): New member coverage.
1393 * mtext.c (FORMAT_COVERAGE): New macro.
1394 (insert): Copy mt2->coverage.
1395 (mtext__from_data): Initialize mt->coverage.
1396 (mtext__adjust_format): Update mt->coverage.
1397 (mtext): Initialize mt->coverage.
1398 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1399 Update mt->coverage if necessary.
1400 (mtext_duplicate): Copy mt->coverage.
1401 (mtext_insert, mtext_replace): New functions.
1402 (mtext_dup): Use mtext_duplicate.
1403 (mtext__word_segment): Don't set *from and *to if a word
1404 segmentation funcion is not found.
1405 (mtext_ins_char): Fix typo.
1407 2005-08-25 Kenichi Handa <handa@m17n.org>
1409 * font.h (MFont): New member for_full_width.
1411 * font.c (compare_font_score): Prefer a font of not
1414 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1415 registry charset of a font is one of CJK charsets.
1417 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1418 supports some of CJK.
1420 2005-08-24 Kenichi Handa <handa@m17n.org>
1422 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1424 * m17n-gui.c (null_device_open): Check Mresolution param and set
1427 * m17n-gd.c (device_open): Check Mresolution param and set
1430 * m17n-X.c (MWDevice): New member resy.
1431 (xfont_open): Set ascent, descent, and max_advance members of
1433 (xft_open): Likewise.
1434 (device_open): Compare also screen_num to find a device. Set
1435 device->resy and frame->dpi.
1437 * internal-gui.h (MFrame): New member dpi.
1439 * font.h (MRealizedFont): New member max_advance.
1441 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1442 (mfont__init): Don't initialize Mascent, Mdescent.
1443 (Mascent, Mdescent): Delete these variables.
1444 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1445 Mfont_descent instead of Mascent and Mdescent.
1446 (mfont_put_prop): Allow negative size.
1447 (mfont_find): Handle the case of spec->size < 0. Fix previous
1449 (mfont_list): Handle the case of spec->size < 0.
1450 (mfont_check): Likewise.
1452 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1453 (fc_get_pattern): Handle the case of font->size < 0.
1454 (ft_open): Set ascent, descent, and max_advance members of rfont.
1455 (ft_find_metric): Improve rounding.
1456 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1459 * face.c (mface__realize): Handle the case of font->size < 0.
1461 2005-08-22 Kenichi Handa <handa@m17n.org>
1463 * coding.c (MConverterStatus): Change the member buf to union.
1464 (mconv_buffer_converter): Add const to the arg buf.
1465 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1466 (mconv_decode): Adjusted for the change of MConverterStatus.
1467 (mconv_encode_range): Likewise.
1469 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1470 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1472 2005-08-20 Kenichi Handa <handa@m17n.org>
1474 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1475 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1477 * m17n-X.c (xfont_open): Set members ascent, descent, and
1478 max_advance of rfont.
1479 (xft_open): Likewise.
1481 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1483 (mfont__ft_parse_name): Add const to the arg name.
1485 * font.c (xlfd_parse_name): Add const to the arg name. Call
1486 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1487 (xlfd_unparse_name): Handle spacing.
1488 (mfont__init): Initialize new variables.
1489 (mfont__id): Handle spacing.
1490 (mfont__merge): Likewise.
1491 (mfont__set_spec): This function deleted.
1492 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1493 condition of calling mfont__ft_parse_name.
1494 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1495 (mfont_get_prop): Handle properties spacing, ascent, descent,
1497 (mfont_find): Return a realized font.
1498 (mfont_from_name): Add const to the arg name.
1500 * font.h (enum MFontProperty): New member MFONT_SPACING.
1501 (enum MFontSpacing): New enum.
1502 (MFont): New members spacing and max_advance.
1503 (mfont__ft_parse_name): Prototype adjusted.
1504 (mfont__set_spec): Extern deleted.
1505 (mfont__parse_name_into_font): Prototype adjusted.
1507 2005-08-19 Kenichi Handa <handa@m17n.org>
1509 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1511 * font.c (mfont_list): If FONT is null, use a temporary font.
1512 (mfont_parse_name): Add const to the arg name.
1514 2005-08-18 Kenichi Handa <handa@m17n.org>
1516 * word-thai.c: Surround code by #ifdef and #endif to escape from
1519 * font-ft.c: Mostly re-written.
1521 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1522 (FontLayoutCmd): Type of the member otf changed..
1523 (load_otf_command): Adjusted for the format change of otf command.
1524 (load_command): Likewise.
1525 (free_flt_command): Unref cmd->body.otf.
1526 (run_otf): Ajusted for the type change of otf_cmd.
1527 (run_command): Ajusted for the type change of otf_cmd. On
1528 debugging, print ctx->combining_code.
1529 (mfont__flt_run): Initialize ctx's members code_offset,
1530 combining_code, and left_padding to 0.
1532 * face.h (struct MRealizedFace): New member font.
1533 (mface__realize): Prototype adjusted.
1535 * face.c (find_realized_face): New arg font.
1536 (find_realized_face): Adjusted for the change of MFont.
1537 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1538 (mface__fini): Don't call mdebug__report_object.
1539 (mface__realize): New arg font.
1540 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1541 Optimize the latin case.
1542 (mface__free_realized): Free rface->font.
1543 (mface__update_frame_face): Adjusted for the change of mface__realize.
1544 (mface_equal): New function.
1546 * draw.c (Mcommon): New variable.
1547 (visual_order): Args to mfont__encode_char changed.
1548 (compose_glyph_string): Handle Mfont text property.
1549 (layout_glyphs): Adjusted for the change of MFont.
1550 (mdraw__init): Initialize Mcommon.
1551 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1553 * font.h (enum MFontType): Members completely changed.
1554 (enum MFontProperty): Move MFONT_SIZE to the tail.
1555 (enum MFontSource): New enum.
1556 (struct MFont): New members type, source, sizes, file, capability,
1558 (struct MRealizedFont): Type of member font changed. Members
1559 score, status, and encoding deleted.
1560 (MFontScore): New type.
1561 (MFontList): Member changed.
1562 (struct MFontDriver): New member has_char. Types of members
1564 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1565 (Mapple_roman): Extern them.
1566 (OTF_Tag): Typedefed if not HAVE_OTF.
1567 (enum MFontOpenTypeTable): New enum.
1568 (MFontCapability): New type.
1569 (mfont__ft_drive_otf): Prototype adjusted.
1570 (mfont__score): Extern deleted.
1571 (mfont__merge): Extern it.
1572 (mfont__has_char): Extern it.
1573 (mfont__encode_char): Prototype adjusted.
1574 (mfont__open): Extern it.
1575 (mfont__set_spec): Prototype adjusted.
1576 (mfont__get_capability): Extern it.
1578 * font.c: Include "fontset.h".
1579 (M_font_capability, M_font_list, M_font_list_len): New variables.
1580 (font_score_priority): Change order of initial elements.
1581 (font_score_shift_bits): Fix array size.
1582 (common_weight): Add "thin", "semibold", and "heavy".
1583 (common_stretch): Add "ultracondensed", "extracondensed",
1584 "extraexpanded", and "utltraexpand".
1585 (font_weight_regular, font_weight_normal, font_weight_medium): New
1587 (gen_font_name): This function deleted.
1588 (find_encoding): Set font->encoding.
1589 (OTF_tag): New function.
1590 (otf_script_list): New variable.
1591 (load_otf_script_list): New function.
1592 (find_script_from_otf_tag): New function.
1593 (xlfd_parse_name): Set font->type and font->source.
1594 (mfont__free_realized): Free chains rfonts.
1595 (font_score): Renamed from mfont__score.
1596 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1597 (Mapple_roman): New variables.
1598 (mfont__init): Initilize new variables. Initalize
1599 default_encoding.encoding_name and
1600 default_encoding.encoding_charset to Municode_full and
1601 mcharset__unicode. Use SAFE* macros for allocating filepath
1603 (mfont__fini): Free otf_script_list.
1604 (mfont__id): New function.
1605 (mfont__match_p): Check also capability member of MFont.
1606 (mfont__merge): New funciton.
1607 (mfont__set_spec_from_face): Set type and source members.
1608 (mfont__set_spec_from_plist): Set capability and type members.
1609 (mfont__select): Argument changed.
1610 (mfont__available): New function.
1611 (compare_font_score): New function.
1612 (mfont__list): New function.
1613 (mfont__open): Return a realized font.
1614 (mfont__resize): Adjusted for the change of MFont.
1615 (mfont__has_char): New function.
1616 (mfont__encode_char): Argument changed.
1617 (mfont__set_spec): Argument changed.
1618 (free_font_capability): New function.
1619 (mfont__get_capability): New function.
1620 (MFontfile): New variable.
1621 (mfont_get_prop): Adjusted for the change of MFont.
1622 (mfont_put_prop): Likewise.
1623 (mfont_set_selection_priority): Fix the way of setting
1624 font_score_priority[].
1625 (mfont_find): Use mfont__list instead of mfont__select.
1626 (mfont_resize_ratio): Adjusted for the change of MFont.
1627 (mfont_list): Use mfont__list.
1628 (mfont_check): New function.
1629 (font_score): Make it static.
1631 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1632 (mfont__lookup_fontset): Likewise.
1634 * fontset.c (struct MFontset): Delete member font_spec_list.
1635 (struct MRealizedFontset): Type of member spec changed. New
1637 (load_font_group): Arg spec_list deleted.
1638 (load_fontset_contents): Adjusted for the change of fontset_def.
1639 (free_fontset): Fix the way of freeing fontset elements.
1640 (realize_fontset_elements): Argument changed.
1641 (get_per_script): New function.
1642 (free_realized_fontset_elements): Fix the way of feeing rfontset
1644 (update_fontset_elements): Fix args to realize_fontset_elements.
1645 (mfont__realize_fontset): New arg spec.
1646 (try_font_list): New function.
1647 (try_font_group): New arg request. Use try_font_list.
1648 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1650 (mfontset): Adjusted for the change of MFontset.
1651 (mfontset_copy): Likewise. Don't share plists.
1652 (mfontset_modify_entry): Adjusted for the change of MFontset.
1653 (mfontset_lookup): Call get_per_script.
1654 (mdebug_dump_fontset): Print also the address of fonts.
1656 * input.c (shift_state): Don't reset ic_info->vars.
1657 (take_action_list): Call MDEBUG_PRINT fore calling
1660 * internal-gui.h (MFontDriver): Don't typedef it here.
1662 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1663 (MXFont): This type deleted.
1665 (struct _MFontX): New struct.
1666 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1667 (MDisplayInfo): Member base_font_list deleted.
1668 (DEFAULT_FONT): Definition changed.
1669 (FALLBACK_FONT): This maclr deleted.
1670 (free_display_info): Adjusted for the change of MDisplayInfo.
1671 (free_device): Argument to mfont__free_realized changed.
1672 (xfont_driver): Adjusted for the change of MFontDriver.
1673 (xfont_registry_list): Use MFontX instead of MXFont.
1674 (MRealizedFontX): Renamed from MXFontInfo.
1675 (xfont_select): Return the font found first.
1676 (close_xfont): Change MXFontInfo to MRealizedFontX.
1677 (xfont_open): Return the realized font.
1678 (xfont_find_metric): Get xfont from rfont->fontp.
1679 (xfont_has_char): New function.
1680 (xfont_encode_char): Adjusted for the argument change.
1681 (xfont_render): Get xfont from rfont->fontp.
1682 (xfont_list): Adjusted for the argument change.
1683 (MRealizedFontXft): Renamed from MXftFontInfo.
1684 (xft_driver): Ajusted for the change of MFontDriver.
1685 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1686 (xft_open_font): Argument changed.
1687 (xft_open): Argument changed. Return the realized font.
1688 (xft_find_metric): Get xft_font from rfont->fontp.
1689 (xft_has_char, xft_encode_char): New functions.
1690 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1691 font if not yet opened.
1692 (device_open): Don't set frame->font.
1694 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1696 (gd_font_open): New function.
1697 (gd_render): Don't use the local variable ft_info.
1698 (device_init): Adjusted for the change of gd_font_driver.
1700 * textprop.c (mtext__prop_init): Initialize text_property_table.
1701 Call M17N_OBJECT_ADD_ARRAY.
1702 (mtext__prop_fini): Don't call mdebug__report_object.
1704 * plist.c (mplist__init): Initialize plist_table.
1705 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1706 (mplist__fini): Don't call mdebug__report_object.
1708 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1709 (mtext__fini): Don't call mdebug__report_object.
1710 (MTEXT_FORMAT_UTF_16): Correct type.
1711 (mtext_data): New function.
1712 (mtext_text): Fix calculation of limit and args to
1715 * language.c: Include "plist.h".
1716 (M_script_lang_list): New variable.
1717 (mlang__init): Read languages and their information from m17n
1719 (mlanguage__list): New function.
1720 (Miso639_1, Miso639_2): New variables.
1722 * language.h (mlanguage__list): Extern it.
1724 * database.c (get_database_stream): Use SAFE_* macros for
1725 allocating and freeing path.
1726 (mdatabase__init): Likewise.
1728 * symbol.c (msymbol__fini): Don't free symbols here.
1729 (msymbol__free_table): New function.
1730 (msymbol_is_managing_key): New function.
1732 * symbol.h (msymbol__free_table): Extern it.
1733 (msymbol__list): Extern it.
1735 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1737 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1738 (struct _M17NObjectArray): New member name and next.
1739 (mdebug__add_object_array): Extern it.
1740 (M17N_OBJECT_ADD_ARRAY): New macro.
1741 (mdebug__report_object): Don't extern it.
1743 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1745 * m17n-gui.c (free_frame): Don't free frame->font.
1746 (null_device_fini): Fix code for freeing
1747 null_device.realized_font_list.
1748 (m17n_fini_win): Free interface.
1749 (mframe): Cast the return value of dlsym. Set frame->font here.
1750 (mframe_get_prop): Check frame->rface->rfont before accessing the
1753 * m17n-gui.h (Mfontfile): Extern it.
1754 (mfont_check): Extern it.
1755 (mface_equal): Extern it.
1757 * m17n-core.c: Include "symbol.h".
1758 (report_header_printed): This variable deleted.
1759 (object_array_root): New variable.
1760 (report_object_array): New function.
1761 (mdebug__report_object): This function deleted.
1762 (mdebug__add_object_array): New function.
1763 (m17n_init_core): Call mchartable_init () before mtext_init ().
1764 (m17n_fini_core): Call report_object_array (if necessary) and
1765 msymbol__free_atable at the end.
1767 * m17n-core.h (msymbol_is_managing_key): Extern it.
1768 (mtext_data): Extern it.
1769 (MTEXT_FORMAT_UTF_16): Correct type.
1770 (M17NLIB_MINOR_VERSION): Changed to 3.
1771 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1773 * chartab.c (mchartable__init): Initalize chartable_table.count.
1774 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1775 mdebug__report_object.
1777 2005-05-26 Kenichi Handa <handa@m17n.org>
1779 * m17n.h (Miso639_1, Miso639_2): Extern them.
1781 * symbol.h (msymbol__list): Extern it.
1783 * symbol.c (msymbol__list): New function.
1785 2005-05-19 Kenichi Handa <handa@m17n.org>
1787 * input-gui.c (minput__win_init): Don't change the value of
1790 2005-05-16 Kenichi Handa <handa@m17n.org>
1792 * m17n-core.c (m17n_object): Be sure to initialize all members.
1794 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1796 2005-05-09 Kenichi Handa <handa@m17n.org>
1798 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1800 2005-04-27 Kenichi Handa <handa@m17n.org>
1802 * language.c (mlang__init): Add "an" (Aragonese).
1804 * word-thai.c: Add support for libthai.
1805 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1806 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1808 * mtext.c: Include "word-thai.h" conditionaly.
1809 (mtext__init): Call mtext__word_thai_init conditionaly.
1810 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1812 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1813 not WORDCUT_LD_FLAGS.
1815 2005-04-19 Kenichi Handa <handa@m17n.org>
1817 * word-thai.c (wordseg_propertize): Always unref the attached
1819 (thai_wordseg): Don't unref the property.
1821 2005-04-18 Kenichi Handa <handa@m17n.org>
1823 * word-thai.c: Include stdlib.h.
1824 (wordseg_propertize): Add dummy function for the case that wordcut
1825 library doesn't exist.
1826 (wordseg_propertize): Fix for old wordcut library.
1828 2005-04-16 Kenichi Handa <handa@m17n.org>
1830 * word-thai.c: Include <stdio.h>.
1832 2005-04-15 Kenichi Handa <handa@m17n.org>
1834 * draw.c: Include mtext.h.
1835 (linebreak_table, M_break_at_space, M_break_at_word)
1836 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1837 (compose_glyph_string): Check POS before getting Mface text
1839 (truncate_gstring): Give correct TO arg to line_break function.
1840 (GET_LB_TYPE): New macro.
1841 (find_break_backward, find_break_forward): New functions.
1842 (mdraw__init): Initialize the above new variables.
1843 (mdraw__fini): Free linebreak_table.
1844 (mdraw_default_line_break): Use find_break_backward and
1847 * word-thai.c: New file.
1849 * word-thai.h: New file.
1851 * mtext.c: Include word-thai.h.
1852 (wordseg_func_table): New variable.
1853 (mtext__init): Initialize wordseg_func_table and call
1854 mtext__word_thai_init.
1855 (mtext__fini): Call mtext__word_thai_fini, free
1857 (MTextWordsegFunc): New type.
1858 (mtext__word_segment): New function.
1860 * mtext.h (wordseg_func_table): Extern it.
1861 (mtext__word_segment): Extern it.
1863 * m17n.c (m17n_init): Fix typo (== -> =).
1865 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1866 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1868 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1869 (MTEXTPROP_VAL): New macros.
1871 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1873 2005-04-07 Kenichi Handa <handa@m17n.org>
1875 * database.c (load_chartable): Fix pursing of symbol name.
1877 2005-03-24 Kenichi Handa <handa@m17n.org>
1879 * m17n.c (m17n_init): Fix typo (== -> =).
1881 2005-03-11 Kenichi Handa <handa@m17n.org>
1883 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1885 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1887 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1890 2005-03-09 handa <handa@m17n.org>
1892 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1893 calling m17n_init ().
1895 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1896 calling m17n_init_core ().
1898 2005-02-28 Kenichi Handa <handa@m17n.org>
1900 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1903 2005-02-17 Kenichi Handa <handa@m17n.org>
1905 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1906 (M_description, M_command, M_variable): New variables.
1907 (load_im_info_keys): New variables.
1908 (load_im_info, check_command_keyseq, get_description_advance)
1909 (parse_command_list, get_command_list, parse_variable_list)
1910 (get_variable_list, input_method_hook): New functions.
1911 (command_list, variable_list): New variables.
1912 (minput__init): Put input_method_hook to Minput_method.
1913 Initialize M_description, M_command, M_variable, Mdetail_text,
1914 load_im_info_keys, command_list, variable_list.
1915 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1916 (Mdetail_text): New variable.
1917 (minput_get_description, minput_get_commands)
1918 (minput_assign_command_keys, minput_get_variables)
1919 (minput_set_variable): New functions.
1921 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1922 (minput_assign_command_keys, minput_get_variables)
1923 (minput_set_variable): Extern them.
1925 * plist.c (UNGETC): Just decrement st->p.
1926 (read_mtext_element): New arg skip.
1927 (read_integer_element): Likewise.
1928 (read_symbol_element): Likewise.
1929 (read_element): New arg KEYS.
1930 (mplist__from_plist): Don't increment ref-count of NULL object.
1931 (mplist__from_file): New arg KEYS.
1932 (mplist_put): Don't increment ref-count of NULL object.
1933 (mplist_add): Likewise.
1934 (mplist_push): Likewise.
1935 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1937 * plist.h (mplist__from_file): Prototype adjusted.
1939 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1940 (get_database_stream): New function.
1941 (load_database): Use get_database_stream.
1942 (M_database_hook): New variable
1943 (mdatabase__init): Initialize M_database_hook.
1944 (mdatabase__load_for_keys): New function.
1945 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1947 (mdatabase_define): Free mdb->extra_info if necessary.
1949 * database.h (mdatabase__dir_list, M_database_hook)
1950 (mdatabase__load_for_keys): Extern them.
1951 (MDatabaseHookFunc): New type.
1953 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1955 2004-12-27 Kenichi Handa <handa@m17n.org>
1957 * Version 1.2.0 released.
1959 2004-12-27 Kenichi Handa <handa@m17n.org>
1961 * input.c (minput_filter): Don't reset ic->xxx_changed.
1963 * mtext.c (mtext_from_data): Fix documentation.
1965 2004-12-25 Kenichi Handa <handa@m17n.org>
1967 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1968 (M17NLIB_VERSION_NAME): Update to "1.2.".
1970 2004-12-24 Kenichi Handa <handa@m17n.org>
1972 * input.c (reset_ic): Set key_unhandled to 0.
1974 2004-12-21 Kenichi Handa <handa@m17n.org>
1976 * m17n-gui.h (mfont_from_spec): Delete extern.
1978 * input-gui.c (win_callback): Handle Minput_reset.
1979 (minput__win_init): Register reset_ic as a callback for
1982 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1983 changed. At first, shift to the initial state.
1984 (minput__init): Initialize Minput_reset. Register reset_ic as a
1985 callback for Minput_reset.
1986 (Minput_reset): New variable.
1987 (minput_filter): Always set ic->xxx_changed to 0.
1988 (minput_reset_ic): New function.
1989 (integer_value): Fix typo ('>' -> '<') and calculation of length
1992 * m17n-core.c (merror_code): Change type to `int'.
1994 * m17n-misc.h (merror_code): Adjust type.
1996 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1998 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1999 (mtext_change_prop): Delete extern.
2001 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2002 to `int'. Move the documents to m17n-core.h.
2004 2004-12-13 Kenichi Handa <handa@m17n.org>
2006 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2007 (MTextProperty): Document it.
2009 2004-12-09 Kenichi Handa <handa@m17n.org>
2011 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2013 2004-12-03 Kenichi Handa <handa@m17n.org>
2015 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2016 m17n__gui_initialized): New externs.
2018 * m17n-core.h (enum M17NStatus): New enum.
2019 (m17n_status): Extern it.
2021 * m17n-core.c (core_initialized): Delete this variable.
2022 (m17n__core_initialized, m17n__shell_initialized,
2023 m17n__gui_initialized): New variables.
2024 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2025 instead of core_initialized.
2026 (m17n_status): New function.
2028 * m17n.c (shell_initialized): Delete this variable.
2029 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2032 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2034 * m17n-gui.c (win_initialized): Delete this variable.
2035 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2036 instead of gui_initialized.
2038 2004-11-19 Kenichi Handa <handa@m17n.org>
2040 * input.c (reset_ic): Check if ic_info->state is NULL.
2041 (filter): If ic_info->state is NULL, return 0.
2042 (load_input_method): Don't unref `maps' it it's not created.
2044 2004-11-15 Kenichi Handa <handa@m17n.org>
2046 * input.c (find_candidates_group): If INDEX is -1, find the last
2048 (take_action_list): If the previous of the first candidate is
2049 requested, select the last candidate.
2051 2004-11-08 Kenichi Handa <handa@m17n.org>
2053 * m17n-X.c (device_open): Try at most 32 fonts to find a
2054 non-autoscaled font.
2056 * font.c (xlfd_parse_name): Fix previous change.
2058 2004-11-05 Kenichi Handa <handa@m17n.org>
2060 * font.c: (commont_style): Include dummy elements "slanted" and
2061 "rslanted" to prefer "o" to "r" if "i" is requested.
2063 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2065 2004-10-29 Kenichi Handa <handa@m17n.org>
2067 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2069 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2070 New members smallest and larger.
2071 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2072 (xfont_registry_list): Likewise.
2073 (xfont_select): Likewise.
2076 2004-10-28 Kenichi Handa <handa@m17n.org>
2078 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2079 font name comparison.
2080 (xfont_select): Fix logic for selecting a larger size font.
2082 2004-10-25 Kenichi Handa <handa@m17n.org>
2084 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2087 2004-10-22 Kenichi Handa <handa@m17n.org>
2089 * input.c (update_candidate): Renamed from udpate_candidate.
2090 (take_action_list): Show more debugging info on arithmetic commands.
2092 * m17n-X.c (device_open): Fix previous change.
2094 * draw.c (compose_glyph_string): Don't get face property at the
2097 2004-10-21 Kenichi Handa <handa@m17n.org>
2099 * draw.c (compose_glyph_string): Fix for the case of category
2102 2004-10-19 Kenichi Handa <handa@m17n.org>
2104 * input.c (mdebug_mask): New variable.
2105 (shift_state): Print debug information.
2106 (take_action_list): Likewise.
2107 (handle_key): Likewise.
2109 2004-10-14 Kenichi Handa <handa@m17n.org>
2111 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2113 2004-10-13 Kenichi Handa <handa@m17n.org>
2115 * m17n-X.c (device_open): Be sure to register at least one font
2118 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2119 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2121 2004-10-12 Kenichi Handa <handa@m17n.org>
2123 * draw.c (alloc_gstring): Fix previous change.
2125 * font-ft.c (ft_list_generic): Fix for the case of not
2128 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2130 * font.c (mfont_list): If no font is found, return NULL.
2131 (load_font_encoding_table): Put entries of nil registry first.
2132 (find_encoding): Adjust for the above change.
2134 2004-10-11 Kenichi Handa <handa@m17n.org>
2136 * m17n-gui.h (mfont_list): Adjust prototype.
2138 * m17n-X.c (xfont_list): New arg maxnum.
2140 * font.h (struct MFontDriver): Change prototype of <list>.
2142 * font-ft.c (fc_generic_family_list): Delete it.
2143 (Mserif, Msans_serif, Mmonospace): Delete them.
2144 (M_generic_family_info): New variable.
2145 (enum GenericFamilyType): New enum.
2146 (struct GenericFamilyInfo): New struct.
2147 (generic_family_table): New variable.
2148 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2150 (add_font_info): Get style here.
2151 (ft_list_family): Don't initialize fc_config here. Don't list
2153 (ft_list_generic): New function.
2154 (ft_select): Pay attention to generic familes here.
2155 (ft_open): Fix calculation of ascent and descent.
2156 (ft_list): Pay attention to generic families.
2157 (mfont__ft_init): Initialize M_generic_family_info,
2158 generic_family_table, and fc_config..
2159 (mfont__ft_fini): Finalize generic_family_table.
2161 * draw.c (compose_glyph_string): Use more constant font for
2162 glyphs. Adjust for the member change in MGlyph.
2163 (layout_glyph_string): Adjust for the member change in MGlyph.
2164 (alloc_gstring): Intilize scracth_glyph to avoid
2165 compose_glyph_string on it.
2166 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2167 (mdraw_coordinates_position): Fix previous change.
2169 * internal-gui.h (glyph_category): New enum.
2170 (MGlyph): Change type of <category> to enum glyph_category.
2172 * face.c (mface__realize): Delete args langauge and charset.
2173 (mface__for_chars): Fix for the case that glyphs have different
2175 (mface__update_frame_face): Adjust for mface__realize change.
2177 * face.h (mface__realize): Adjust prototype.
2179 2004-10-05 Kenichi Handa <handa@m17n.org>
2181 * language.c (mlang__init): Add Akan.
2183 2004-10-04 Kenichi Handa <handa@m17n.org>
2185 * font-ft.c (add_font_info): Add instead of push the element.
2186 (ft_list_family): For generic fonts, try all
2187 substituted. families.
2189 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2190 (run_rule): Don't update cluster range here.
2191 (run_command): Update cluster range on appending a glyph.
2192 (run_otf): Update cluster range for glyphs generated by OTF.
2194 2004-10-02 Kenichi Handa <handa@m17n.org>
2196 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2198 2004-09-30 Kenichi Handa <handa@m17n.org>
2200 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2202 2004-09-30 Kenichi Handa <handa@m17n.org>
2204 * font.h: Include <fontconfig/fontconfig.h>.
2205 (MFTInfo): New member langset.
2206 (mfont__encoding_list): Extern it.
2208 * font.c (mfont__encoding_list): New function.
2209 (mdebug_dump_font_list): New function.
2211 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2212 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2214 (ft_family_list): New variable.
2215 (set_font_info): New arg basep. Callers changed.
2216 (fc_list): Check the return value of FcPatternGetString.
2217 (add_font_info): New arg plist. Callers changed. Update
2219 (ft_list_family): New function (merged fc_list and ft_list_all).
2220 (ft_select): Use ft_list_family.
2221 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2223 (mfont__ft_init): Initialize above new variables.
2224 (mfont__ft_fini): Free ft_family_list.
2225 (STRDUP_LOWER): New macro.
2226 (set_font_info): Use STRDUP_LOWER.
2227 (ft_list_family): Avoid duplicate addition of font path. Use
2229 (fc_decode_prop): Fix typo.
2231 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2232 (xfont_registry_list): Change argument disp_info to frame.
2234 (xfont_list_all): New function.
2235 (xfont_list): If FONT is not NULL, check all fonts.
2237 2004-09-28 Kenichi Handa <handa@m17n.org>
2239 * m17n-X.c (MXFont, MXFontList): New types.
2240 (MDisplayInfo): Delete members font_registry_list,
2241 iso8859_1_family_list, iso10646_1_family_list, new members
2242 font_list, base_font_list.
2243 (free_display_info): Adusted for the change of MDisplayInfo.
2244 (xfont_driver): Initialize with xfont_list.
2245 (font_compare): New function.
2246 (build_font_list): Deleted.
2247 (xfont_registry_list): New function.
2248 (xfont_select): Use xfont_registry_list.
2249 (xfont_list): New function.
2250 (device_open): Adusted for the change of MDisplayInfo.
2252 * font-ft.c (add_font_info): New arg languages. Callers changed.
2253 (fc_list): Get languages from fonts..
2254 (ft_list_all): Renamed from ft_list. Callers changed.
2255 (ft_list): New function.
2256 (mfont__ft_driver): Initalize with ft_list.
2258 * font.c (mfont_list): New function.
2260 * font.h (struct MFontDriver): New member `list'.
2261 (MFTInfo): New member languages.
2263 * m17n-gui.h (mfont_list): Extern it.
2265 2004-09-27 Kenichi Handa <handa@m17n.org>
2267 * internal-gui.h (struct MGlyphString): Delete members mt,
2268 sub_width, sub_lbrearing, sub_rbearing, and region.
2270 * draw.c (MSubTextExtents): New type.
2271 (layout_glyphs): New arg extents. Set its members.
2272 (layout_glyph_string): Adjusted for the above change.
2273 (alloc_gstring): Don't set gstring->mt.
2274 (truncate_gstring): Call line_break function with mt instead of
2277 2004-09-22 Kenichi Handa <handa@m17n.org>
2279 * mtext.c (count_utf_16_chars): Count each code of invalid
2282 2004-09-19 Kenichi Handa <handa@m17n.org>
2284 * mtext.c (default_utf_16, default_utf_32): Rename them to
2285 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2288 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2291 2004-09-13 Kenichi Handa <handa@m17n.org>
2293 * draw.c (Mlatin): Don't declare it here.
2294 (visual_order): Fix reordering of combining characters.
2295 (compose_glyph_string): Fix detection of script.
2296 (layout_glyphs): Don't fix reordering of combining characters
2298 (layout_glyph_string): Pay attention to
2299 control->disable_overlapping_adjustment.
2300 (truncate_gstring): Include at least on character in a line.
2301 (get_gstring): Always scan one full line.
2302 (mdraw__init): Don't initialize Mlatin here.
2303 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2304 have a font, use ascent/descent of an ASCII font. Allow
2305 ink_array_return and logical_array_return to be NULL.
2306 (mdraw_coordinates_position): Fix iteration.
2308 * font-ft.c (MFTtoProp): Member completely changed.
2309 (ft_to_prop): Adjusted for the above change.
2310 (ft_to_prop_size): Likewise.
2311 (set_font_info): Adjusted for the change of MFTtoProp.
2312 (fc_generic_family_list): New variable.
2313 (fc_list): Add special handling of generic font names.
2314 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2315 Initialize fc_generic_family_list.
2316 (mfont__ft_fini): Don't free ft_to_prop. Free
2317 fc_generic_family_list.
2318 (FC_vs_M17N_font_prop): New type.
2319 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2320 (fc_decode_prop, fc_encode_prop): New functions.
2321 (mfont__ft_parse_name): Use fc_decode_prop.
2322 (mfont__ft_unparse_name): Use fc_encode_prop.
2324 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2325 (MWDevice): Add member realized_font_list.
2326 (free_display_info): Don't free disp_info->realized_font_list.
2327 (free_device): Free device->realized_fontset_list.
2328 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2329 (device_open): Don't initialize disp_info->realized_font_list.
2330 (device_open): Initialize device->realized_font_list and set it to
2331 frame->realized_font_list.
2333 * fontset.c (try_font_group): New function.
2334 (mfont__lookup_fontset): Use try_font_group.
2336 * font.c (common_weight): Change the order of "regular".
2338 * face.c (Mlatin): Don't make it static.
2339 (mface__realize): Be sure to set work_gstring.frame.
2340 (mface__for_chars): Likewise.
2342 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2345 * internal-gui.h (Mlatin): Extern it.
2347 * m17n-gui.h (MDrawControl): New member
2348 disable_overlapping_adjustment.
2350 2004-09-06 Kenichi Handa <handa@m17n.org>
2352 * font-flt.c (run_otf): Fix typo ('}'->']').
2354 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2355 (COMBINING_PRECOMPUTED_P): New macros.
2357 * draw.c (layout_glyphs): Handle precomputed combining code.
2359 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2360 precomupted combining code.
2362 2004-09-03 Kenichi Handa <handa@m17n.org>
2364 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2367 2004-08-27 Kenichi Handa <handa@m17n.org>
2369 * face.c (mface_put_prop): If the new value is the same as the
2370 current one, don't increment frame->tick.
2372 2004-08-25 Kenichi Handa <handa@m17n.org>
2374 * fontset.c (mfontset): Initialize font_spec_list member.
2375 (mfontset_copy): Load fontset if necessary.
2377 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2378 'metrics' to for C++.
2380 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2383 2004-08-16 Kenichi Handa <handa@m17n.org>
2385 * Version 1.1.0 released.
2387 2004-08-13 Kenichi Handa <handa@m17n.org>
2389 * language.c (mlang__init): Add Dhivehi.
2391 * m17n-gui.c (Mx, Mfreetype): Delete it.
2392 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2394 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2395 (mfont_resize_ratio): Extern it.
2396 (MDrawGlyphInfo): New member logical_width;
2397 (MDrawGlyph): New type.
2398 (mdraw_glyph_list): Prototype adjusted.
2400 * m17n-X.c (xfont_open): Set type and fontp members.
2401 (xft_open): Likewise.
2403 * internal-gui.h (Mx, Mfreetype): Delete extern.
2405 * font.h (struct MRealizedFont): New member type and fontp.
2407 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2408 (Mx, Mfreetype): Declare here.
2409 (Mxft): New variable.
2410 (mfont_resize_ratio): New function.
2412 * font-ft.c (ft_open): Set type and fontp members.
2414 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2417 2004-08-11 Kenichi Handa <handa@m17n.org>
2419 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2422 2004-08-06 Kenichi Handa <handa@m17n.org>
2424 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2427 * font-flt.c (run_otf): Print debugging information if necessary.
2429 2004-08-05 Kenichi Handa <handa@m17n.org>
2431 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2432 positioning_type 5 and 6. Switch simplified.
2434 2004-08-04 Kenichi Handa <handa@m17n.org>
2436 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2438 2004-08-02 Kenichi Handa <handa@m17n.org>
2440 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2441 set val to 1 even if it is greater than 1.
2443 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2445 2004-07-29 Kenichi Handa <handa@m17n.org>
2447 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2448 debugging information.
2450 * internal.h (MDEBUG_PRINT5): New macro.
2452 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2453 the previous one if the zero width glyph has left or right
2456 2004-07-26 Kenichi Handa <handa@m17n.org>
2458 * m17n-X.c (xft_render): Pay attention to members left_padding and
2459 right_padding of MGlyph.
2461 * draw.c (visual_order): Allocate one more elements for arrays as
2462 a workaround of fribidi bug.
2463 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2464 instead of MGlyph->bidi_sensitive.
2465 (layout_glyph_string): Pay attentinon to
2466 control->orientation_reversed when padding at the head or tail.
2467 Fix adjustment of space glyph width.
2468 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2471 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2472 instead of MGlyph->bidi_sensitive.
2474 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2476 2004-07-26 Kenichi Handa <handa@m17n.org>
2478 * draw.c (visual_order): Don't treat combined glyphs specially.
2479 (layout_glyphs): Don't get metrics glyphs that are already ready.
2480 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2481 width with the previous one.
2482 (draw_background): Fix bar cursor position on a r2l glyph.
2484 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2485 (run_rule): Fix place of updating cluster_begin_pos and
2486 cluster_end_pos here.
2487 (run_otf): Don't set left_padding.
2489 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2491 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2492 Fix handling of GPOS.
2493 (mfont__ft_drive_gpos): Delete this function.
2495 * font.h (mfont__ft_drive_otf): Renamed back from
2496 mfont__ft_drive_gsub.
2497 (mfont__ft_drive_gpos): Delete extern.
2499 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2500 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2502 2004-07-23 Kenichi Handa <handa@m17n.org>
2504 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2505 the same bidi level.
2507 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2509 2004-07-22 Kenichi Handa <handa@m17n.org>
2511 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2513 2004-07-20 Kenichi Handa <handa@m17n.org>
2515 * draw.c (render_glyphs): Fix checking of g->code validity.
2517 * face.c (mface__realize): Set g.type.
2519 2004-07-18 Kenichi Handa <handa@m17n.org>
2521 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2524 * m17n-gui.c (mframe): Print error message give by dlopen to
2527 2004-07-16 Kenichi Handa <handa@m17n.org>
2529 * draw.c (compose_glyph_string): Improve the way of deciding a
2530 script. For a character that doesn't have script property, use
2531 the last non-latin script.
2533 * font-ft.c (fc_list): Cancel previous change.
2534 (mfont__ft_init): Add more entries in ft_to_prop_name.
2536 2004-07-15 Kenichi Handa <handa@m17n.org>
2538 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2539 previous or next character glyphs.
2541 2004-07-14 Kenichi Handa <handa@m17n.org>
2543 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2544 of type GLYPH_SPACE.
2546 * fontset.c (mfont__lookup_fontset): If glyph type is
2547 GLYPH_SPACE, get codes for SPACE.
2549 * internal-gui.h (Mfont): Delete extern.
2551 * m17n-gui.h (Mfont): Delete duplicated extern.
2553 2004-07-13 Kenichi Handa <handa@m17n.org>
2555 * font-ft.c (DEVICE_DELTA): New macro.
2556 (adjust_anchor): New function.
2557 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2559 (mfont__ft_drive_gpos): New function.
2561 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2562 (FontLayoutContext): Delete member `rfont'.
2563 (run_otf): Set g->otf_cmd. Call
2564 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2565 only whne HAVE_OTF is defined.
2567 * fontset.c: Include "config.h".
2569 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2570 (MGlyph): New member otf_cmd.
2572 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2573 (mfont__ft_drive_gpos): Extern it.
2575 * face.c: Include "config.h".
2577 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2579 * input-gui.c: Include "config.h".
2581 * plist.c: Include "config.h".
2583 2004-07-06 Kenichi Handa <handa@m17n.org>
2585 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2586 internal-gui.h: Cancel previous changes.
2588 * m17n-gd.h: Delete it.
2590 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2591 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2592 @XML2_LD_FLAGS@ to above.
2593 (libm17n_la_LIBADD): Add -ldl.
2594 (libm17n_la_LDFLAGS): Add -export-dynamic.
2595 (X_LD_FLAGS): Fix the order of linking.
2596 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2597 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2598 (libm17n_X_la_LDFLAGS): Add -module.
2599 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2600 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2601 (libm17n_gd_la_LDFLAGS): Add -module.
2602 (include_HEADERS): Delete m17n-gd.h.
2604 2004-06-30 Kenichi Handa <handa@m17n.org>
2606 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2607 (MDeviceLibraryInterface): Delete it.
2608 (register_device_library): Delete it.
2609 (m17n__device_library_list): Renamed from device_library_list.
2611 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2612 (m17n_init_win): Adjust prototype.
2614 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2615 (m17n_init_gd): New function.
2617 * m17n-gd.h: New file.
2619 * m17n-X.h: Include <m17n-gui.h>.
2620 (m17n_init_X): Extern it.
2621 (M17N_INIT): Redefine it.
2623 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2624 (m17n_init_X): New function.
2626 * internal-gui.h (m17n__device_library_list): Extern it.
2627 (struct MDeviceDriver): New members initialized, init, and fini.
2629 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2631 (libm17n_X_la_LIBADD): Delete aboves.
2632 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2633 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2634 (libm17n_gd_la_LDFLAGS): Delete it.
2635 (include_HEADERS): Add m17n-gd.h.
2637 2004-06-25 Kenichi Handa <handa@m17n.org>
2639 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2640 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2642 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2644 * font-ft.c (fc_list): If FcFontList finds no font, try
2647 * draw.c (compose_glyph_string): Terminate the last loop after
2648 doing default combining if necessary.
2650 2004-06-24 Kenichi Handa <handa@m17n.org>
2652 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2654 * character.c (mchar_define_property): Add const to an arg.
2656 * charset.c (mchar_define_charset): Add const to an arg.
2658 * coding.c (MCodingSystem): Add const to an arg or decoder.
2659 (finish_decoding): Add const to an arg.
2660 (decode_coding_charset, decode_coding_utf_8)
2661 (decode_coding_utf_16, decode_coding_utf_32)
2662 (decode_coding_iso_2022, decode_coding_sjis)
2663 (mconv_define_coding): Likewise.
2665 * m17n-X.c (xft_find_metric): Delete unused variable.
2667 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2670 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2673 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2674 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2676 * mtext.h (mtext__from_data): Ajust prototype.
2678 2004-06-23 Kenichi Handa <handa@m17n.org>
2680 * draw.c (compose_glyph_string): Always get glyph codes by
2682 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2683 (mdraw_glyph_list): New function.
2685 * font-flt.c (mfont__flt_run): Be sure to call
2686 rfont->driver->encode_char.
2688 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2689 (ft_encode_char): Delete arg C.
2690 (ft_render): Don't call FT_Get_Char_Index.
2692 * font.c (mfont__encodable_p): Delete it.
2693 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2695 * font.h (struct MFontDriver): Delete arg C of encode_char.
2696 (mfont__encodable_p): Delete extern.
2698 * m17n-X.c (xfont_encode_char): Delete arg C.
2699 (xft_find_metric): Don't cal FT_Get_Char_Index.
2700 (xft_render): Likewise.
2702 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2704 (mdraw_glyph_list): Extern it.
2706 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2708 2004-06-22 Kenichi Handa <handa@m17n.org>
2710 * m17n-gui.h (mfontset_lookup): Extern it.
2712 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2714 * fontset.c (realize_fontset_elements)
2715 (free_realized_fontset_elements, update_fontset_elements): New
2717 (mfont__realize_fontset): Call realize_fontset_elements.
2718 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2719 (mfont__lookup_fontset): If a fontset was modified, update
2720 the realized fontset.
2721 (mfontset_modify_entry): Increment fontset->tick.
2722 (mfontset_lookup): New function.
2724 2004-06-21 Kenichi Handa <handa@m17n.org>
2726 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2728 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2729 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2730 length of source text 0.
2732 2004-06-21 Kenichi Handa <handa@m17n.org>
2734 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2735 (compare): Pay attention to format other than utf-8.
2736 (copy): Delete this function.
2737 (count_by_utf_8, count_by_utf_16, insert): New functions.
2738 (count_utf_16_chars): Fix handling of a surrogate pair.
2739 (find_char_forward, find_char_backward): Likewise.
2740 (mtext__from_data): Delete unnecessary check. Fix number of
2742 (mtext_from_data): Don't count items.
2743 (mtext_ref_char): Optimize the code.
2744 (mtext_set_char): Pay attention to format other than utf-8.
2745 (mtext_cat_char): Likewise.
2746 (mtext_dup): Don't call copy, instead do allocation here.
2747 (mtext_cat): Call insert instead of copy.
2748 (mtext_ncat): Likewise.
2749 (mtext_cpy): Delete character at first and call insert instead of
2751 (mtext_ncpy): Likewise.
2752 (mtext_copy): Likewise.
2753 (mtext_duplicate): Call insert instead of copy.
2754 (mtext_del): Pay attention to format other than utf-8.
2755 (mtext_ins): Simply call insert.
2756 (mtext_ins_char): Pay attention to format other than utf-8.
2757 (mtext_tok): Call insert instead of copy.
2758 (mtext_text): Call UNIT_BYTES.
2760 * textprop.c (mtext__adjust_plist_for_change): New function.
2762 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2763 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2764 (CHAR_UNITS_AT): Fix typo.
2765 (CHAR_UNITS_BY_HEAD): Fix typo.
2766 (STRING_CHAR_AND_UNITS): Fix typo.
2768 * internal.h (MTEXT_READ_ONLY_P): New macro.
2770 * mtext.h (mtext__replace): Delete the extern.
2771 (mtext__adjust_foramt): Adjust prototype.
2773 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2774 if possible. Otherwise make a copy of mmt.
2776 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2779 2004-06-18 Kenichi Handa <handa@m17n.org>
2781 * character.h (CHAR_STRING_UTF16): Fix syntax.
2783 2004-06-16 Kenichi Handa <handa@m17n.org>
2785 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2786 (libm17n_X_la_LIBADD): Delete it.
2787 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2789 * m17n-X.c (device_open): Add parens in `if' condition.
2791 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2792 (DEC_POSITION): Likewise.
2793 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2795 2004-06-15 Kenichi Handa <handa@m17n.org>
2797 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2800 * draw.c (compose_glyph_string): If langauge is specified, call
2801 mface__for_chars even if a text is all latin. Fix condition for
2802 setting non_ascii_found.
2804 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2806 * m17n.h (minput_char_to_key): Delete extern.
2808 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2810 * m17n-gui.c (null_device_open): Set several members of frame.
2812 2004-06-14 Kenichi Handa <handa@m17n.org>
2814 * m17n-gui.h (minput_event_to_key): Delete extern.
2816 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2818 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2820 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2822 2004-06-08 Kenichi Handa <handa@m17n.org>
2824 * character.c (mchar_put_prop): Don't increment the ref-count of
2827 2004-06-04 Kenichi Handa <handa@m17n.org>
2829 * m17n-core.c (mdebug__register_object): New function.
2830 (mdebug__unregister_object): Likewise.
2832 * internal.h (mdebug__register_object, mdebug__unregister_object):
2834 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2837 * charset.c (mcharset__load_from_database): Don't call
2838 mconv__register_charset_coding here.
2840 * coding.c (find_coding): Get a real name from an element of
2841 coding_definition_list.
2842 (mconv__register_charset_coding): Set the real name at the top of
2844 (mcoding__load_from_database): Likewise.
2845 (mconv_list_codings): Adjusted for the above change.
2847 2004-06-03 Kenichi Handa <handa@m17n.org>
2849 * coding.c (find_coding): Find by canonicalized name. Don't have
2850 to modify the element of coding_definition_list by
2852 (mconv__define_coding_from_charset): Delete it.
2853 (mconv__register_charset_coding): Canonicalize sym.
2854 (mcoding__load_from_database): Register plist modified by
2857 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2859 * font-ft.c (ft_open): Fix setting of rfont->descent.
2861 2004-06-02 Kenichi Handa <handa@m17n.org>
2863 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2864 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2865 (xlfd_unparse_name): Renamed from xfont_build_name.
2866 (mfont__init): Initialized Mfontconfig.
2867 (mfont__free_realized): Unconditionally unref rfont->info.
2868 (mfont__select): Free `this' if it's not best.
2869 (mfont__open): Don't check frame->realized_font_list.
2870 (mfont__parse_name_into_font): New function.
2871 (Mfontconfig): New variable.
2872 (mfont_from_name): Call mfont_parse_name.
2873 (mfont_name): Call mfont_unparse_name.
2874 (mdebug_dump_font): Likewise.
2876 * font.h (struct MFontDriver): Delete members parse_name and
2878 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2879 (mfont__parse_name_into_font): Extern it.
2881 * font-ft.c: Include "symbol.h".
2882 (close_ft): Unconditionally free filename and charmap_list of
2884 (ft_open): Duplicate base->filename. Increment ref-count of
2885 ft_info->charmap_list. Free ft_info->charmap_list and
2886 ft_info->filename on error.
2887 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2889 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2891 (enum xlfd_field_idx): Moved to font.c.
2892 (split_font_name, build_font_name): Likewise.
2893 (build_font_list): Call mfont__parse_name_info_font.
2894 (xfont_open): Call mfont__unparse_name. Free name.
2895 (xfont_parse_name, xfont_build_name): Moved to font.c
2896 (xft_select): Prototype deleted.
2897 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2898 Call mfont_pase_name.
2900 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2901 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2904 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2907 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2909 2004-06-01 Kenichi Handa <handa@m17n.org>
2911 * fontset.c (mfontset_modify_entry): Pay attention to the case
2912 that fontset->font_spec_list is NULL.
2914 2004-05-31 Kenichi Handa <handa@m17n.org>
2916 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2918 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2920 * font.c (mfont__select): Print score the a font for debugging.
2922 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2924 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2925 kanji_sym and kana_sym.
2927 2004-05-28 Kenichi Handa <handa@m17n.org>
2929 * Makefile.am (VINFO): New variable.
2930 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2931 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2933 2004-05-27 Kenichi Handa <handa@m17n.org>
2935 The following chanages are to make device dependent functions
2936 accessible only from MDeviceDriver structure, and to add GD and
2937 null device drivers. Font drivers get also device dependent.
2939 * m17n.c (m17n_init): Increament shell_initialized.
2940 (m17n_fini): Decremented shell_initialized.
2942 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2944 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2945 (Mwidget, Mcolormap, Mx): Extern them.
2947 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2948 (free_frame): Call frame->driver->close instead of
2950 (DLOPEN_SHLIB_EXT): New macro.
2951 (MDeviceLibraryInterface): New type.
2952 (device_library_list): New variable.
2953 (register_device_library): New function.
2954 (null_device): New variable.
2955 (null_device_close, null_device_get_prop)
2956 (null_device_realize_face, null_device_free_realized_face): New
2958 (null_driver): New variable.
2959 (null_device_init, null_device_fini, null_device_open): New
2961 (null_interface): New variable.
2962 (Mfreetype, Mdevice): Declare them.
2963 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2964 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2965 Mwin__Close_Device. Register drivers for Mx and Mgd.
2966 (m17n_fini_win): Decremented win_initialized. Call "fini"
2967 function of all opened devices. Don't call mwin__fini.
2968 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2970 (mframe): Handle Mdevice key of PLIST.
2971 (mframe_get_prop): Call frame->device->get_prop instead of
2972 mwin__device_get_prop.
2974 * m17n-gd.c: New file.
2976 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2977 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2979 * m17n-core.c (m17n_init_core): Increate core_initialized.
2980 (m17n_fini_core): Decremented core_initialized.
2982 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2983 (Mcolormap): Don't extern them here.
2985 * m17n-X.c (FRAME_DEVICE): New macro.
2986 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2987 (free_display_info): Use MPLIST_DO.
2988 (free_device): Free rface->info.
2989 (xft_close): Delete it.
2990 (device_init): Renamed from mwin__init.
2991 (device_fini): Renamed from mwin__fini.
2992 (device_open): Renamed from mwin__open_device.
2993 (x_driver): New variable.
2994 (MXFontInfo): Delete member frame, add member display.
2995 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2996 Don't declare them here.
2998 * internal-gui.h (MDeviceType): New enum.
2999 (MWDefice): Delete it.
3000 (struct MFrame): Change type of device to void *. New members
3001 device_type, driver, font_driver_list.
3002 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3003 (MDeviceDriver): New type.
3004 (Mx, Mgd, Mfreetype): Extern them.
3005 (mwin__XXX): Delete all of them.
3007 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3009 (win_destroy_ic): Likewise.
3010 (adjust_window_and_draw): Likewise.
3011 (win_callback): Likewise.
3012 (Mxim): Declare it here.
3013 (minput_event_to_key): Call M_CHECK_READABLE.
3015 * fontset.c (mfont__lookup_fontset): Delete local variable
3018 * font.h (struct MFontDriver): Delete member close, add members
3019 parse_name and build_name.
3020 (mfont__driver_list): Delete extern.
3021 (mfont__close): Delete extern.
3023 * font.c (mfont__init): Don't set mfont__driver_list.
3024 (mfont__fini): Don't unref mfont__driver_list.
3025 (mfont__select): Try font drivers in frame->font_driver_list. Set
3026 driver member of a realized font.
3027 (mfont__close): Delete it.
3028 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3029 functions of the default frame.
3031 * font-ft.c (close_ft): Check ft_info->ft_face and work
3033 (add_font_info): Allocate ft_info by M17N_OBJECT.
3034 (ft_close): Delete it.
3035 (mfont__ft_driver): Don't set ft_close.
3036 (ft_select): Increment ref-count of best_font.
3037 (ft_open): Decremented ref-count of base. On error, call
3038 FT_Done_Face and free ft_info.
3039 (ft_find_metric): Always use XXX_MONO in load_flags.
3040 (ft_render): Fix setting of width. Call
3041 frame->driver->draw_points instead of mwin__draw_points.
3042 (ft_to_prop): Don't set mfont__driver_list.
3043 (mfont__ft_fini): Just unref ft_info.
3045 * face.c (mface__init): Exchange foreground and background of
3046 mface__default. Call mface_put_prop to set hline of
3048 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3049 (mface__free_realized): Don't call mwin__free_realized_face.
3051 * draw.c (Mdepth): Don't declare it here.
3052 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3053 (render_glyphs, render_glyph_string): Likewise.
3054 (mdraw__init): Don't set Mdepth.
3055 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3057 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3059 (mdraw_text_items): Check FRAME is writable.
3060 (mdraw_per_char_extents): Implement body.
3062 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3064 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3065 (GUI_SOURCES): Delete it.
3066 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3067 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3068 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3069 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3070 (linkgui_LDADD): Set to libm17n-gui.la
3071 (linkgui_LDFLAGS): New target.
3072 (SRC): Include ${libm17n_gui_la_SOURCES} and
3073 ${libm17n_gd_la_SOURCES}.
3075 2004-05-24 Kenichi Handa <handa@m17n.org>
3077 * draw.c (draw_background): Don't draw background even if
3078 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3080 2004-05-22 Kenichi Handa <handa@m17n.org>
3082 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3084 2004-05-20 Kenichi Handa <handa@m17n.org>
3086 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3088 * m17n-gui.c: Include "plist.h".
3089 (mframe): If PLIST is NULL, initialize it to emply plist.
3091 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3092 (xft_driver): New variable.
3093 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3094 (xft_find_metric, xft_render): New function.
3095 (mwin__init): Adjusted for the new mfont__driver_list.
3096 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3097 generated face to PARAM.
3098 (mwin__realize_face): Fix setting of box colors. Don't call hook
3100 (mwin__draw_hline): New function.
3101 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3102 (mwin__xft_render): Delete these function.
3104 * internal-gui.h (struct MFrame): New member tick.
3105 (struct MGlyphString): New member tick.
3106 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3107 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3108 (mwin__xft_render): Delete extern.
3110 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3111 (mfontset): Always increment the reference count of returned
3114 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3115 (MFTInfo): Moved to font.h.
3116 (ft_iso8859_1_font_list): Delete this variable.
3117 (set_font_info): Don't set font->property[MFONT_TYPE].
3118 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3119 (add_font_info): Change type to void.
3120 (fc_list): Change anme from xft_list. Caller changed. Include
3121 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3122 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3123 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3124 (close_ft): Don't call mwin__xft_close. Unref
3125 ft_info->extra_info.
3126 (ft_open): Don't setup ft_info->fontname. Don't call
3128 (ft_find_metric): Don't call mwin__xft_get_metric.
3129 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3130 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3131 (mfont__ft_init): Adjusted for new mfont__driver_list.
3132 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3134 * font.c (mfont__driver_list): Make it MPlist.
3135 (mfont__init): Adjust initialization of mfont__driver_list.
3136 (mfont__fini): Free mfont__driver_list.
3137 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3138 (mfont__select): Adjusted for the new mfont__driver_list.
3140 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3141 (mfont__drirver_list): Adjust prototype.
3142 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3144 * face.h (struct MFace): Delete member realized_face_list, add
3146 (struct MRealizedFace): Delete member need_update
3147 andnofont_rface, add member non_ascii_list.
3148 (mface__update_frame_face): Extern it.
3150 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3152 (get_hline_create, get_box_create): New functions.
3153 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3155 (free_face): Cancep previous change. Free face->frame_list.
3156 (serialize_hline): Do nothing if hline->width is zero.
3157 (serialize_box): Do nothing if box->width is zero.
3158 (mface__init): Setup all properties of mface__default.
3159 (mface__fini): Free hline_prop_list and box_prop_list.
3160 (mface__realize): Cancel previous change. Update
3161 face->frame_list. Setup rface->non_ascii_list.
3162 (mface__for_chars): Update rface->non_ascii_list.
3163 (mface__free_realized): Free rface->non_ascii_list.
3164 (mface__update_frame_face): New function.
3165 (mface): Initialize face->frame_list.
3166 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3168 (mface_merge): Likewise.
3169 (mface_put_prop): If key is Mhline or Mbox, get value by
3170 get_hline_create or get_box_create respectively.
3171 (mface_put_prop): Update frame->tick and call
3172 mface__update_frame_face if necessary.
3173 (mface_update): Do nothing if func is noop_hook.
3175 * draw.c (render_glyphs): If a font is not found, use
3176 mwin__draw_empty_boxes.
3177 (alloc_gstring): Initialize gstring->tick.
3178 (get_gstring): Check gstring->tick.
3180 2004-05-17 Kenichi Handa <handa@m17n.org>
3182 * face.c (find_realized_face): Return value changed. If RFONT is
3183 NULL, avoid unnecessary checking.
3184 (free_face): Free face->realized_face_list.
3185 (mface__realize): Adjusted for the change of find_realized_face.
3186 If it returns a realized face that needs update, free it and
3187 realize a new one. Push a new realized face to
3188 frame->realized_face_list instead of appending.
3189 (mface__for_chars): Adjusted for the change of find_realized_face.
3190 Short cut if the required font is in rface->ascii_rface.
3191 (mface_put_prop): Free old value if necessary. Set need_update
3192 member of realized faces to 1.
3194 * face.h (struct MFace): Delete member tick, add member
3196 (struct MRealizedFace): Delete member tick, add member
3199 2004-05-13 Kenichi Handa <handa@m17n.org>
3201 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3203 2004-05-12 Kenichi Handa <handa@m17n.org>
3205 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3207 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3208 parse it XftNameParse.
3210 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3211 (all_fonts_scaned): New variable.
3212 (set_font_info): FAMILY may be Mnil.
3213 (add_font_info): Argument changed.
3214 (xft_list): Call add_font_info in it.
3215 (ft_list): Likewise.
3216 (ft_select): Make it work in the case family is Mnil.
3217 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3218 (mfont__ft_fini): Set all_fonts_scaned to 0.
3220 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3221 that is failed to open.
3223 2004-05-10 Kenichi Handa <handa@m17n.org>
3225 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3226 device's depth is 1 (i.e. monochrome).
3228 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3229 to work around the problem of libtool.
3231 * font-ft.c: Include <freetype/ftbdf.h>.
3232 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3234 (mfont__ft_init): Initialize them.
3235 (ft_iso8859_1_font_list): New variable.
3236 (set_font_info): Detect a font containing iso8859-1 glyphs and
3237 register it in ft_iso8859_1_font_list. If the font is not
3238 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3239 properties of the font from its properties.
3240 (add_font_list): If the font is not scalable, check if it is BDF
3241 or PCF font. If not, ignore it.
3242 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3243 registry is not iso8859-1.
3244 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3245 ft_iso8859_1_font_list.
3246 (ft_find_metric): If the font is not scalable, assume it as BDF
3247 or PCF, and get a metric from its properties.
3248 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3250 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3252 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3253 (libm17n_la_LDFLAGS): Delete it.
3254 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3255 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3257 2004-05-06 Kenichi Handa <handa@m17n.org>
3259 * draw.c (compose_glyph_string): Fix previous change.
3261 2004-04-30 Kenichi Handa <handa@m17n.org>
3263 * font-ft.c (ft_list): Delete unused variable `result'.
3264 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3266 2004-04-27 Kenichi Handa <handa@m17n.org>
3268 * m17n-X.c: Include config.h
3269 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3270 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3271 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3272 (FRAME_CMAP, FRAME_VISUAL): New macros.
3273 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3274 (xfont_driver): Make it static.
3275 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3276 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3277 info->xft_color_back.
3278 (MXftFontInfo) [HAVE_XFT2]: New type.
3279 (mwin__xft_close) [HAVE_XFT2]: New function.
3280 (mwin__xft_open) [HAVE_XFT2]: New function.
3281 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3282 (mwin__xft_render) [HAVE_XFT2]: New function.
3284 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3285 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3286 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3289 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3291 * font-ft.c: Don't include FT_FREETYPE_H here.
3292 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3293 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3294 (MFTInfo): New member charmap_index.
3295 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3296 (check_otf_filename): Renamed from check_filename. Return value
3298 (ft_set_property): This function deleted.
3299 (set_font_info): New function.
3300 (add_font_list): Argument changed. Add multiple fonts.
3301 (xft_list) [HAVE_XFT2]: New function.
3302 (ft_list) [not HAVE_XFT2]: New function.
3303 (ft_select): Add code for Xft.
3304 (close_ft): Likewise.
3305 (ft_open): Likewise.
3306 (ft_find_metric): Likewise.
3307 (ft_encode_char): Likewise.
3308 (ft_render): Likewise.
3310 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3312 2004-04-26 Kenichi Handa <handa@m17n.org>
3314 * textprop.c (mtext_attach_property): Declare the return type as
3317 2004-04-21 Kenichi Handa <handa@m17n.org>
3319 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3321 2004-04-09 Kenichi Handa <handa@m17n.org>
3323 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3325 (load_command): Setup above members.
3327 2004-04-05 Kenichi Handa <handa@m17n.org>
3329 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3331 2004-03-30 Kenichi Handa <handa@m17n.org>
3333 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3336 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3337 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3339 2004-03-29 Kenichi Handa <handa@m17n.org>
3341 * Version 1.0 Patch Level 2 released.
3343 2004-03-29 Kenichi Handa <handa@m17n.org>
3345 * charset.c (make_charset): Set charset->fully_loaded and
3346 charset->simple correctly. Don't try to get charset->min_char and
3347 charset->max_char for a charset of method subset and superset.
3348 Don't load a mapping file here.
3349 (mcharset__init): Set unified_max.
3350 (mcharset__load_from_database): Free a working plist.
3352 * coding.c (mcoding__fini): Free all malloced data.
3354 * input-gui.c (win_create_ic): Set control.as_image for preediting
3357 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3358 `count') to initialize the array.
3360 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3363 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3365 (mwin__create_window): Fix bug of setting a background pixel of a
3367 (mwin__adjust_window): Clear the window before drawing.
3369 * m17n-core.c (mdebug__report_object): Free array->objectes if
3371 (m17n_init_core): Don't set report_header_printed to 0 here.
3372 Fix debugging information.
3373 (m17n_fini_core): Set report_header_printed to 0 here.
3375 * m17n-core.h (mplist_deserialize): Extern it.
3377 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3379 * m17n.c (m17n_fini): Fix debugging information.
3381 * mtext.c (mtext__adjust_foramt): New function.
3383 * mtext.h (mtext__adjust_foramt): Extern it.
3385 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3387 * plist.h (mplist__deserialize): Don't extern it.
3389 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3390 elements of symbol_table to NULL. Report about created and freed
3391 symbols if MDEBUG_FINI is set.
3393 2004-03-22 Kenichi Handa <handa@m17n.org>
3395 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3397 * m17n.c (m17n_init): Fix the way of checking merror_code.
3399 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3401 2004-03-22 Kenichi Handa <handa@m17n.org>
3403 * fontset.c (realize_font_group): Adjust the font size by
3404 mfont__resize before selecting a font.
3406 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3408 2004-03-19 Kenichi Handa <handa@m17n.org>
3410 * Version 1.0 Patch Level 1 released.
3412 2004-03-19 Kenichi Handa <handa@m17n.org>
3414 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3416 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3418 2004-03-19 Kenichi Handa <handa@m17n.org>
3420 Re-apply the changes forgotten in the released version.
3422 * charset.c (mcharset__load_from_database): Call
3423 mchar_define_charset.
3425 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3426 (mconv_encode_range): Put Mcoding text property.
3428 2004-03-18 Kenichi Handa <handa@m17n.org>
3430 * draw.c (Mdepth): New variable.
3431 (visual_order): Delete unused local var `pos'.
3432 (compose_glyph_string): Fix for the case that gstring->glyphs is
3433 realloced. Stop generating glyphs at TO. Fix handling of
3435 (layout_glyphs): Get metrics of all glyphs in advance. Set
3436 lbearing and rbearing of base of composition glyph correctly.
3437 Handle left-overhang glyphs correctly.
3438 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3440 (dump_combining_code): Change the defualt off_x character to ".".
3441 (mdraw__init): Initialize Mdepth.
3443 * face.c (work_gstring): New variable
3444 (mface__init): Initialize work_gstring.
3445 (mface__fini): Free work_gstring.glyphs.
3446 (mface__realize): Don't handle videomode property here. Adjusted
3447 for the change of mfont__get_metric.
3448 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3450 * face.h (enum face_gc): Moved to m17n-X.c.
3452 * font.h (struct MFontDriver): Arguments of find_metric changed.
3453 (mfont__select): Prototype adjusted.
3454 (mfont__get_metric): Likewise.
3455 (mfont__ft_drive_otf): Likewise.
3456 (mfont__flt_run): Likewise.
3458 * font.c (mfont__select): New argument layouter. If layouter is
3459 different in the registered font, make a new copy of realized
3461 (mfont__get_metric): Argument changed. Get metrics of multiple
3463 (mfont_find): Call mfont__select with layouter as Mnil.
3465 * font-flt.c (FontLayoutContext): New member rfont.
3466 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3467 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3469 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3471 (NUM_POINTS): New macro.
3472 (MPointTable): New type.
3473 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3474 (mfont__ft_drive_otf): New argument rfont.
3476 * fontset.c (realize_font_group): Adjusted for the changed of
3478 (check_fontset_element): This function deleted.
3480 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3481 off the parent window if the preedit text is zero length.
3483 * internal-gui.h (struct MFrame): New members foreground,
3484 background, videomode, font.
3485 (struct MGlyphString): New member anti_alias.
3486 (MDrawPoint): New type.
3487 (mwin__draw_bitmap): Prototype deleted.
3488 (mwin__draw_points): Prototype added.
3490 * m17n-gui.h (MDrawControl): New member anti_alias.
3492 * m17n-gui.c (free_frame): Free frame->font.
3493 (mframe): Set the fontset of frame->face to the default fontset.
3495 * m17n-X.c (RGB_GC): New type.
3496 (enum gc_index): Renamed from enum face_gc. Member names changed.
3498 (struct MWDevice): Members foreground and background deleted. New
3499 member scratch_gc, gc_list.
3500 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3501 (free_device): Free GCs in device->gc_list.
3502 (get_rgb_gc): New function.
3503 (get_gc): Renamed and argument changed from get_color.
3504 (get_gc_for_anti_alias): New function.
3505 (xfont_find_metric): Arguments changed. Get metrics of multiple
3507 (set_region): Argument changed. Caller changed.
3508 (xfont_render): Allways set a font in gc.
3509 (x_error_handler, x_io_error_handler): Define only if
3510 X_SET_ERROR_HANDLER is defined.
3511 (mwin__open_device): Create device->scratch_gc. Set members
3512 foreground, background, and videomode of frame. Call
3513 XSetErrorHandler and XSetIOErrorHandler only if
3514 X_SET_ERROR_HANDLER is defined.
3515 (struct gc_list): Deleted.
3516 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3517 (mwin__realize_face): Adjusted for the change of the format of
3518 rface->info and the charge of set_region.
3519 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3520 (mwin__draw_box): Likewise.
3521 (mwin__draw_bitmap): This function deleted.
3522 (mwin__draw_points): New function.
3523 (mwin__verify_region): Adjusted for the change of the format of
3524 rface->info and the charge of set_region.
3525 (mwin__create_window): Inherit backgound pixel from parent.
3526 (mwin__dump_gc): Adjusted for the change of the format of
3529 2004-03-16 Kenichi Handa <handa@m17n.org>
3531 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3533 * input.c (M_key_alias): New variable.
3534 (handle_key): Try M_key_alias property of a key too.
3535 (minput__init): Initialize M_key_alias. Give that property to
3536 symbols in one_char_symbol. Fix bug of initializing
3539 * draw.c (compose_glyph_string): Don't handle
3540 ignore_formatting_char here. Include formatting characters in the
3541 range processed by a FTL.
3542 (layout_glyph_string): Handle ignore_formatting_char here.
3544 2004-03-12 Kenichi Handa <handa@m17n.org>
3546 * input-gui.c (win_create_ic): Enable bidi in status control.
3548 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3550 2004-03-09 Kenichi Handa <handa@m17n.org>
3552 * input.c (load_input_method): If title is not specified, use the
3553 input method name as title.
3555 * m17n-X.c (get_color): Make it static.
3556 (xim_create_ic, xim_destroy_ic, x_error_handler)
3557 (x_io_error_handler): Likewise.
3559 2004-03-01 Kenichi Handa <handa@m17n.org>
3561 * Version 1.0 released.
3564 Copyright (C) 2003, 2004
3565 National Institute of Advanced Industrial Science and Technology (AIST)
3566 Registration Number H15PRO112
3568 This file is part of the m17n library.
3570 The m17n library is free software; you can redistribute it and/or
3571 modify it under the terms of the GNU Lesser General Public License
3572 as published by the Free Software Foundation; either version 2.1 of
3573 the License, or (at your option) any later version.
3575 The m17n library is distributed in the hope that it will be useful,
3576 but WITHOUT ANY WARRANTY; without even the implied warranty of
3577 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3578 Lesser General Public License for more details.
3580 You should have received a copy of the GNU Lesser General Public
3581 License along with the m17n library; if not, write to the Free
3582 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3583 Boston, MA 02110-1301, USA.