1 2007-06-11 Kenichi Handa <handa@m17n.org>
3 * coding.c (mcoding__load_from_database): Add aliases in
4 coding_definition_list.
6 2007-06-10 Kenichi Handa <handa@m17n.org>
8 * language.c (mlanguage_name_list): Fix previous change.
10 2007-06-08 Kenichi Handa <handa@m17n.org>
12 * input.c (update_candidate): Copy candidate_list earlier.
13 (re_init_ic): Provide pseudo initialize state if none.
15 2007-06-05 Kenichi Handa <handa@m17n.org>
17 * input.c (preedit_insert): Print debug information.
19 * database.c (expand_wildcard_database): New function.
20 (mdatabase_list): Fix handling of wildcard database.
22 * language.c (load_lang_name): New function.
23 (mlang__fini): Cancel the last two changes.
24 (mlanguage_name_list): New arg script and territories. Use
27 * m17n.h (mlangauge_name_list): Adjusted.
29 2007-06-04 Kenichi Handa <handa@m17n.org>
31 * input.c (open_im): Check if the input method has at least one
34 2007-06-01 Kenichi Handa <handa@m17n.org>
36 * input.c (shift_state): Change the format of debug print.
37 (preedit_commit): New arg need_prefix. Caller changed.
38 (update_candidate): Copy candidate_list.
39 (take_action_list): Likewise.
40 (handle_key): Change the format of debug print.
42 * font-flt.c (load_flt): Ignore unknown directives.
44 2007-05-25 Kenichi Handa <handa@m17n.org>
46 * m17n-core.c (mdebug__unregister_object): Small optimization.
48 * database.c (find_file): Merged into get_database_file.
49 (get_database_file): New arg result. Caller changed.
50 (mdatabase__check): Fix the logic.
52 2007-05-24 Kenichi Handa <handa@m17n.org>
54 * database.c (find_database): If unprocessed wildcard database is
55 found, register database filed and recursively call find_database.
56 (free_db_info): Unref db_info->properties.
57 (register_database): New arg properties. Delete code for
58 initializing mdatabase__list.
59 (register_databases_in_files): Argument changed. Caller changed.
60 (mdatabase__update): Don't list files by glob here.
61 (mdatabase_list): If unprocessed wildcard database is found,
62 register database filed and recursively call mdatabase_list.
64 * database.h (enum MDatabaseStatus): New enum
65 MDB_STATUS_AUTO_WILDCARD.
67 * input.c (load_branch): Fix previous change.
68 (update_global_info): If the global database is not found, return -1.
70 2007-05-23 Kenichi Handa <handa@m17n.org>
72 * database.c (Mversion): New variable.
73 (mdatabase__init): Initialize it.
74 (register_database): New arg properties. Caller changed.
75 (register_databases_in_files): Don't check version here.
76 (mdatabase__update): Likewise.
78 * database.h (MDatabaseInfo): New member properties.
80 2007-05-21 Kenichi Handa <handa@m17n.org>
82 * language.c: Include <ctype.h>
83 (mlanguage__info): Use strncasecmp (not memcmp).
84 (mlanguage_name): Downcase language name for backward
87 * input.c (filter): Don't check Mlanguage property of
90 2007-05-18 Kenichi Handa <handa@m17n.org>
92 * language.c (mlanguage_name): Fix it to handle M-text English
95 * input.c (config_command): Set NAME before using it.
96 (load_branch): Try to resolve a map name by variables.
98 2007-05-17 Kenichi Handa <handa@m17n.org>
100 * language.c (mlang__fini): Fix previous change.
102 2007-05-16 Kenichi Handa <handa@m17n.org>
104 * plist.c (free_plist): Cancel the last change.
105 (write_element): Check if PLIST is nested.
106 (mplist__from_plist): Label a plist as nested if appropriate.
107 (mplist__from_alist): Label a plist as nested.
108 (mplist__conc): Check the value of PL before referring it. Label
109 a plist as nested if appropriate.
110 (mplist_copy): Label a plist as nested if appropriate.
111 (mplist_put_func): Return Mnil if KEY is a managing key.
112 (mplist_push): Label a plist as nested if appropriate.
114 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
117 * language.c (mlang__fini): Unref each element of langname_list.
119 2007-05-14 Kenichi Handa <handa@m17n.org>
121 * language.c: Include <string.h> and <locale.h>.
122 (langname_list): New variable.
123 (load_lang_script_list): Exclude invalid list elements.
124 (mlang__init): Initialize langname_list.
125 (mlang__fini): Unref langname_list.
126 (mlanguage__info): Adjusted for the change of English
127 name (symbol->M-text).
128 (mlanguage_name): Label it as obsolete.
129 (mlanguage_name_list): New function.
131 * m17n.h (mlanguage_name_list): Extern it.
133 * locale.c (make_locale): Fix setting of members of locale.
135 * plist.c (free_plist): Unref also nested plist.
137 2007-05-11 Kenichi Handa <handa@m17n.org>
139 * coding.c (mconv_reset_converter): Set internal->used to 0.
141 2007-05-08 Kenichi Handa <handa@m17n.org>
143 * input.c (check_description): Force copying the translated text.
145 2007-05-02 Kenichi Handa <handa@m17n.org>
147 * input.c (minput_save_config): Unref unnecessary plist. Use
148 free_im_list to free im_config_list.
150 2007-04-20 Kenichi Handa <handa@m17n.org>
152 * input.c (config_command): Fix previous change again.
153 (config_variable): Likewise.
154 (minput_config_command): Fix for the case of setting back to
156 (minput_config_variable): Likewise.
157 (minput_save_config): Include nil as documentation of customized
160 2007-04-05 Kenichi Handa <handa@m17n.org>
162 * input.c (config_command): Fix previous change.
163 (config_variable): Likewise.
165 * plist.c (mplist_get_func): Fix for backward compatiblity.
167 2007-04-04 Kenichi Handa <handa@m17n.org>
169 * input.c (minput_get_command, minput_config_command): Fix example
172 2007-03-29 Kenichi Handa <handa@m17n.org>
174 These changes are to avoid unsafe casting of a function pointer.
176 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
177 (struct MFace): New member hook.
179 * face.c (serialize_face): Adjusted for the change of MFace.
180 (deserialize_face): Likewise.
181 (mface__init): Likewise. Use msymbol_put_func.
182 (mface__realize): Adjusted for the change of MFace. Avoid
184 (mface_get_prop): Adjusted for the change of MFace.
185 (mface_put_prop): Likewise.
186 (mface_get_hook): New function.
187 (mface_put_hook): New function.
188 (mface_update): Adjusted for the change of MFace.
190 * input-gui.c (win_callback): Use mplsit_get_func.
191 (minput__win_init): Use mplsit_put_func.
193 * input.c (take_action_list): Use mplist_get_func.
194 (init_ic_info): Likewise.
195 (fini_ic_info): Likewise.
196 (minput_callback): Likewise.
197 (minput__init): Use mplist_put_func.
199 * language.c (mlang__init): Use msymbol_put_func.
201 * m17n-core.h (M17NFunc): New function type.
202 (M17N_FUNC): New macro.
203 (msymbol_put_func, msymbol_get_func): Extern them.
204 (mplist_put_func, mplist_get_func): Extern them.
206 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
208 * m17n-gui.c (mframe): Add a proper casting.
210 * plist.h (struct MPlist): Make the member val a union.
211 (MPLIST_VAL): Adjusted for the above change.
212 (MPLIST_FUNC): New macro.
213 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
215 * plist.c (mplist_put_func, mplist_get_func): New functions.
217 * symbol.c (msymbol__fini): Use MPLIST_VAL.
218 (msymbol_put_func, msymbol_get_func): New functions.
220 * textprop.c (mtext_serialize): Use msymbol_get_func.
221 (mtext_deserialize): Likewise.
223 2007-03-28 Kenichi Handa <handa@m17n.org>
225 * input.c (get_candidate_list): Avoid unnecessary unref.
227 2007-03-23 Kenichi Handa <handa@m17n.org>
229 * database.c (mdatabase__update): Unref plist at the tail.
231 2007-03-21 Kenichi Handa <handa@m17n.org>
233 * input.c (update_custom_info): Fix for the case "name == Mnil &&
235 (config_command): Fix for the case that configuration is
237 (config_variable): Likewise.
238 (minput_config_command): If keyseqlist is an empty list, cancel
240 (minput_config_variable) If value is an empty list, cancel the
242 (minput_save_config): Handle cancellation of config and customize
245 2007-03-15 Kenichi Handa <handa@m17n.org>
247 * input.c (minput_config_variable): Check custom->vars (not
250 2007-03-01 Kenichi Handa <handa@m17n.org>
252 * input.c (reload_im_info): Setup cmds, vars, and title of
254 (check_variable_value): Fix the return value.
256 * database.c (mdatabase__check): If necessary, update database and
259 2007-02-28 Kenichi Handa <handa@m17n.org>
261 * database.c (get_dir_info): Set dir_info->status to
263 (check_version): New function.
264 (register_database): Don't call find_database.
265 (register_databases_in_files): Don't register a database of
267 (mdatabase__update): Likewise. Avoid unnecessary scanning.
269 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
270 and MDB_STATUS_OUTDATED.
272 * font.h (struct MFont): Types of members type, source, and
273 spacing changed to unsigned.
275 * internal-gui.h (struct): Types of members category and type
278 * internal.h (struct MText): Types of members format and coverage
281 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
282 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
284 2007-02-23 Kenichi Handa <handa@m17n.org>
286 * input.c (Mpop): New variable.
287 (fully_initialize): Initialize Mpop.
288 (parse_action_list): Handle Mpop.
289 (take_action_list): Likewise.
290 (handle_key): When a key is unhandled, shift to the initial state
291 only if the current state has no branch action.
293 2007-02-12 Kenichi Handa <handa@m17n.org>
295 * input.c (get_preceding_char): Unref mt if necessary.
296 (get_following_char): Likewise.
297 (parse_action_list): Fix handling of `insert' action as
299 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
300 (take_action_list): Check invalid candidate list.
302 2007-02-06 Kenichi Handa <handa@m17n.org>
304 * input.c (integer_value): Check also ic->produced for @-N.
306 2007-01-26 Kenichi Handa <handa@m17n.org>
308 * database.c (mdatabase__update): Check mdatabase__dir_list from
311 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
313 2007-01-12 Kenichi Handa <handa@m17n.org>
315 * input.c (handle_key): Handle a branch action of the initial
318 2007-01-10 Kenichi Handa <handa@m17n.org>
320 * m17n-gd.c (gd_render): Delete superfluous line.
322 2006-12-26 Kenichi Handa <handa@m17n.org>
324 * m17n.h (minput_callback): Extern it.
326 * input.h (minput__callback): Delte extern.
328 * input.c (get_surrounding_text): Adjusted for the change of
329 minput__callback to minput_callback.
330 (delete_surrounding_text): Likewise.
331 (minput_create_ic): Likewise.
332 (minput_destroy_ic): Likewise.
333 (minput_filter): Likewise.
334 (minput_set_spot): Likewise.
335 (minput_toggle): Likewise.
336 (minput_reset_ic): Likewise.
338 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
339 and ic->candidate_to to 0.
340 (minput_callback): Renamed from minput__callback.
342 * input-gui.c (win_callback): Adjusted for the change of
343 minput__callback to minput_callback.
345 2006-12-15 Kenichi Handa <handa@m17n.org>
347 * font-ft.c (ft_add_font): Fix typo.
349 2006-12-06 Kenichi Handa <handa@m17n.org>
351 * Version 1.3.4 released.
353 2006-11-16 Kenichi Handa <handa@m17n.org>
355 * input.c (parse_action_list): Allow (undo 0).
356 (adjust_markers): New function.
357 (preedit_insert, preedit_delete): Call adjust_markers.
358 (preedit_replace): New function.
359 (update_candidate): Call preedit_replace instead of preedit_insert
361 (filter): When ic_info->commit_key_head is nonzero, shift input
362 event keys even if there's no committed text.
364 2006-11-10 Kenichi Handa <handa@m17n.org>
366 * input.h (MInputContextInfo): New member commit_key_head.
368 * input.c (preedit_commit): Update ic_info->commit_key_head.
369 (take_action_list): Reset ic_info->commit_key_head on Mundo.
370 (filter): When committed, shift keys by ic_info->commit_key_head.
372 2006-10-30 Kenichi Handa <handa@m17n.org>
374 * input.c (preedit_delete): Fix typo.
375 (take_action_list): Print more debugging information. Allow
376 variable in arg of 'select' and `pushback'.
378 * database.c (gen_database_name): Don't put extra space.
379 (load_database): Print debugging information.
380 (register_databases_in_files): New arg headlen. Callers changed.
381 (mdatabase__load_for_keys): Shorten debugging information.
382 (mdatabase_load): Don't print debugging information here.
384 2006-10-27 Kenichi Handa <handa@m17n.org>
386 * input.c (marker_code): New arg surrounding. Callers changed.
387 (surrounding_pos): Check if name[0] == '@'.
388 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
389 (take_action_list): Likewise.
390 (get_preceding_char): If POS is zero, always call
391 get_surrounding_text.
393 2006-10-19 Kenichi Handa <handa@m17n.org>
395 * input.c (load_variables): Fix setting of `global'.
397 2006-10-16 Kenichi Handa <handa@m17n.org>
399 * draw.c (draw_background): Be sure to set *to_x.
400 (render_glyph_string): If from == to, just return.
402 2006-10-18 Kenichi Handa <handa@m17n.org>
404 * database.c (get_dir_info): Return NULL if the directory name is
406 (register_databases_in_files): Call register_database with
408 (mdatabase__update): Fix logic. Call register_database with
410 (mdatabase_define): Call register_database with
413 * input.c (delete_surrounding_text): Be sure to set members
414 preceding_text and following_text to NULL.
415 (shift_state): Save variable values in ic_info->vars_saved.
416 (preedit_commit): Don't print debug information here. Don't
417 change ic_info->keys here.
418 (get_candidate_list): Don't ref plist.
419 (take_action_list): Don't unref return value of
420 get_candidate_list. For undo, reset ic->produced and recover
421 ic_info->vars. Be sure to set ic->candidate_list to NULL after
423 (init_ic_info): Set ic_info->vars_saved.
424 (fini_ic_info): Unref ic_info->vars_saved.
425 (re_init_ic): Be sure to set ic->candidate_list to NULL after
427 (filter): Be sure to set members preceding_text and following_text
428 to NULL. Print debug information about produced text. Delete
429 processed keys from ic_info->keys.
431 * input.h (MInputContextInfo): New member vars_saved.
433 2006-10-16 Kenichi Handa <handa@m17n.org>
435 * database.c (mdatabase__update): Fix the way to get db_info.
437 2006-10-02 Kenichi Handa <handa@m17n.org>
439 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
440 `size' changed to 24.
442 * font.c (xlfd_unparse_name): Adjusted for the change of
444 (font_score): Likewise.
445 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
447 * m17n-X.c (MFontX, _MFontX): Deleted.
448 (SET_SIZE, HAVE_SIZE): Deleted.
449 (free_display_info): Adjusted for the change of
450 disp_info->font_list format.
451 (xfont_registry_list): Likewise.
452 (xfont_open): Likewise.
453 (xfont_list): Likewise.
454 (xfont_encode_char): Ignore size to find a realized font.
455 (MRealizedFontXft): Change the order of members to make it
456 compatible with MRealizedFontFT.
458 2006-09-27 Kenichi Handa <handa@m17n.org>
460 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
461 (mfont_close): Add comments.
463 * mtext-lbrk.c (mtext_line_break): Add comment.
465 2006-09-26 Kenichi Handa <handa@m17n.org>
467 * input.c (minput_get_description): Handle description about
468 inclusion-only input methods.
470 2006-09-21 Kenichi Handa <handa@m17n.org>
472 * input.c (M_gettext): New variable.
473 (fully_initialize): Initialize M_gettext.
474 (check_description): New function.
475 (load_commands): Call check_description.
476 (config_all_commands): Be sure to unref pl.
477 (load_variables): Call check_description.
478 (config_all_variables): Be sure to unref pl.
479 (load_im_info): Call check_description.
481 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
483 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
484 and bind_textdomain_codeset.
486 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
488 2006-09-15 Kenichi Handa <handa@m17n.org>
490 * input.c (reload_im_info): Update custom and global info.
491 (init_ic_info): Fix previous change.
493 2006-09-14 Kenichi Handa <handa@m17n.org>
495 * database.c: Include <libgen.h>.
496 (mdatabase__lock): Make a directory if necessary.
498 * input.c (resolve_command): Adjusted for the format change of
499 configured_cmds member.
500 (load_commands, load_variables): Fix for errornous data handling.
501 (config_command, config_variable): New function.
502 (config_all_commands, config_all_variables): Renamed from
503 config_commands and config_variables. Utilize the above function.
504 (check_variable_value): Argument changed. Callers changed.
505 (load_im_info): Call config_all_commands and config_all_variables.
506 (init_ic_info): Adjusted for the format change of configured_vars
508 (minput__init): Initialize Mcustomized, Mconfigured, and
510 (Mcustomized, Mconfigured, Minherited): New variables.
511 (minput_get_command): Be sure to return NULL if an input method
512 use no local command.
513 (minput_get_variable): Be sure to return NULL if an input method
514 use no local variable.
515 (minput_config_command, minput_config_variable)
516 (minput_save_config): Adjusted for the format change of
517 configured_cmds and configured_vars members.
519 * plist.c (write_element): Delete superfluous ':'.
521 2006-09-13 Kenichi Handa <handa@m17n.org>
523 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
524 (minput_config_file): Extern it.
526 * draw.c (Minherited): Declaration moved to input.c.
527 (mdraw__init): Don't initialize Minherited here.
529 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
531 2006-09-07 Kenichi Handa <handa@m17n.org>
533 * textprop.c (mtext_serialize): Call mplist__serialize with the
536 * plist.h (mplist__serialize): Prototype adjusted.
537 (mplist__assq): Extern it.
539 * plist.c: Include <ctype.h>
540 (PUTC, PUTS): New macros.
541 (write_symbol): New function.
542 (write_element): New arg indent.
543 (dump_string, dump_plist_element): Delete them.
544 (mplist__from_string): New arg pretty.
545 (mplist__assq): New function.
546 (mdebug_dump_plist): Use write_element.
548 * mtext.c (mtext_cat_char): Allocate more memory.
549 (mdebug_dump_mtext): Don't escal a newline character.
551 * m17n.h (minput_get_command, minput_get_variable)
552 (minput_config_command, minput_config_variable)
553 (minput_save_config): Extern them.
555 * m17n-core.c: Include <string.h>.
556 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
557 use the stream stdout instead of a file of that name.
559 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
562 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
563 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
564 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
565 (MDEBUG_DUMP): Flush the stream.
567 * input.h (struct _MInputMethodInfo): Delete member im. New
568 members mdb, language, name, extra, cmds, configured_cmds,
569 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
570 (MInputContextInfo): New member tick.
572 * input.c: Big change to improve user-side input method
573 customization. Here, list just public API changes.
574 (minput_get_commands, minput_get_variables)
575 (minput_assign_command_keys, minput_set_variable): Label them
577 (minput_get_command, minput_get_variable)
578 (minput_config_command, minput_config_variable)
579 (minput_save_config): New functions.
581 * database.h (PATH_MAX): Define it if not yet defined.
582 (PATH_SEPARATOR): Likewise.
583 (enum MDatabaseStatus): New enum.
584 (struct MDatabaseInfo): Moved from database.c. New members status,
585 time, lock_file, and uniq_file.
586 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
587 (mdatabase__unlock): Extern them.
589 * database.c: Include <time.h>.
590 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
591 (GEN_PATH): Args changed. Callers changed.
592 (struct MDatabaseInfo): Moved to database.h.
593 (struct MDatabase, mdb_list): Deleted.
594 (mdatabase__list): New var.
595 (get_database_filename): Deleted. Callers changed to use
597 (find_file, get_database_file): New files.
598 (get_dir_info): Initialize new members of MDatabaseInfo.
599 (find_database): Arg chagnded. Callers changed.
600 (free_db_info, register_database, register_databases_in_files):
602 (update_database_list): Deleted.
603 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
604 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
605 (mdatabase__update): New function.
606 (mdatabase__check): Return value changed.
607 (mdatabase__file, mdatabase__lock, mdatabase__save)
608 (mdatabase__unlock): New functions.
610 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
612 * input.c (get_surrounding_text): Return -2 when surrounding text
614 (get_following_char): Likewise.
615 (get_preceding_char): Likewise.
616 (minput__callback): Return 0 if there is a callback function,
619 2006-08-17 Kenichi Handa <handa@m17n.org>
621 * input.c (reset_ic): Use shift_state to setup the current state.
623 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
625 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
626 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
627 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
629 2006-08-02 Kenichi Handa <handa@m17n.org>
631 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
633 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
635 * font-ft.c (ft_encapsulate): Add code for debugging.
636 (mfont__ft_drive_otf): Be sure to encode character before getting
639 2006-07-21 Kenichi Handa <handa@m17n.org>
641 * draw.c (mdraw_text_extents): Fix previous typo.
643 2006-07-19 Kenichi Handa <handa@m17n.org>
645 * draw.c (gstring_width): New arg lbearing.
646 (render_glyph_string): Adjusted for the change of gstring_width.
647 (mdraw_text_extents): Fix lbearing of ink and line metrics.
649 * m17n-core.h (Mlanguage): Extern it.
651 * m17n.h (Mlanguage): Extern deleted.
653 * mtext.c (mtext__init): Initialize Mlanguage.
654 (Mlanguage): Declaration moved from locale.c
656 * locale.c (mlocale__init): Don't initialize Mlanguage here.
657 (Mlanguage): Declaration moved to mtext.c.
659 * language.c (mlang__init): Don't initialize Mlanguage here.
661 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
663 2006-07-14 Kenichi Handa <handa@m17n.org>
665 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
666 (MRealizedFontFT): New member face_encapsulated.
667 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
668 (ft_gen_font): New function.
669 (ft_add_font): Use ft_gen_font.
670 (ft_list_script): Store lists in ft_script_list.
671 (ft_check_otf): New arg ft_face. Caller changed.
672 (ft_check_language): Likewise.
673 (ft_check_script): Likewise.
674 (ft_encapsulate, ft_close): New functions.
675 (mfont__ft_driver): Initialize members encapsulate and close.
676 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
678 * font.h (struct MRealizedFont): New member encapsulating.
679 (struct MFontDriver): New members encapsulate and close.
681 * font.c (mfont__match_p): If FONT is realized, check capability
682 by font drivers's check_capability method.
683 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
686 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
687 declarations of foundry and fam local vars.
688 (xft_driver): Make it static.
690 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
691 (mfont_close): Extern them.
693 * m17n-gd.c (device_open): Don't specify foundry and family of the
696 2006-07-11 Kenichi Handa <handa@m17n.org>
698 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
700 2006-07-13 Kenichi Handa <handa@m17n.org>
702 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
704 (ft_check_script): Delete unused var.
705 (ft_list_capability): Likewise.
707 * font.c (mfont__get_capability): Setup cap->otf.
708 (Motf): Make it global.
709 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
711 * font.h (MFontCapability): New member otf.
713 * language.c (mlang__fini): Delete unused vars.
715 * m17n-gui.h (Motf): Extern it.
717 * database.c (update_database_list): Delete unused vars.
719 2006-07-07 Kenichi Handa <handa@m17n.org>
721 * font-ft.c (DEVICE_DELTA): Fix typo.
723 2006-07-06 Kenichi Handa <handa@m17n.org>
725 * fontset.c (mfont__lookup_fontset): Don't ignore family and
728 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
730 * database.c: Update comments.
732 2006-07-05 Kenichi Handa <handa@m17n.org>
734 * database.c (PATH_MAX): Define it if not yet defined.
735 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
737 (get_database_filename): Use GEN_PATH.
738 (get_dir_info): Don't include the last '/' in directory name.
739 (register_database): New function.
740 (update_database_list): Use register_database. Search all
741 directories in mdatabase__dir_list for wildcard databases.
742 (mdatabase__init): Check "~/.m17n.d".
744 2006-07-03 Kenichi Handa <handa@m17n.org>
746 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
747 push reverse property.
749 * plist.c (dump_plist_element): Fix previous change.
751 2006-06-28 Kenichi Handa <handa@m17n.org>
753 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
756 * draw.c (MbidiNSM): New variable.
757 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
758 attention to bidi type NSM.
759 (mdraw__init): Initialize MbibiNSM.
761 * language.c (mscript__char_list): Fix finding a char-list element.
763 * plist.c (dump_string): Return number of printed characters.
764 (dump_plist_element): Print elements more compactly.
766 2006-06-23 Kenichi Handa <handa@m17n.org>
768 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
769 (include_HEADERS): Likewise.
771 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
773 * language.c: Update documentation.
775 2006-06-23 Kenichi Handa <handa@m17n.org>
777 * font-ft.c (struct MFontFT): Delete member lang.
778 (free_ft_info): Don't unref member lang. Destroy members langset
780 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
781 changed. Set members langset and charset.
782 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
784 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
786 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
787 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
788 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
789 characters at first. If it fails, try listing by language names.
790 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
791 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
792 change of MFontCapability.
793 (ft_list_capability): Likewise. Try listing by languages, then by
794 scripts. Check OTF at last.
795 (ft_check_script): New function.
796 (ft_select): Adjusted for the check of MFontCapability.
797 (ft_list_family_names): New function.
798 (ft_check_capability): If cap->script is not Mnil, call
800 (mfont__ft_driver): Initialize with ft_list_family_names.
802 * font.h (struct MFontDriver): New member list_fmaily_names.
803 (struct): Change member "MSymbol *lang" to "MSymbol language".
805 * font.c: Include "language.h".
806 (Motf): New variable.
807 (otf_script_list, load_otf_script_list): Delete it.
808 (find_script_from_otf_tag): Delete it.
809 (merge_capability): New function.
810 (mfont__init): Init Motf.
811 (mfont__fini): Don't unref otf_script_list.
812 (free_font_capability): Check cap->script_tag to determine if
813 OTF-related capability is set.
814 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
815 the change of type MFontCapability.
816 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
818 (mfont_list): Call merge_capability for LANGUAGE arg.
819 (mfont_list_family_names): New function.
821 * input-gui.c: Typo in comments fixed.
823 * input.c: Typo in comments fixed.
825 * language.h (mlanguage__list): Delete it.
826 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
829 * language.c: Include "mtext.h".
830 (M_script_lang_list): Delete it.
831 (language_list, script_list): New variables.
832 (load_lang_script_list, init_language_list, init_script_list): New
834 (mlang__init): Don't load language database here.
835 (mlang__fini): Unref language_list and script_list if not NULL.
836 (mlanguage__list): Delete it.
837 (mlanguage__info, mscript__info, mscript__char_list)
838 (mscript__otf_tag, mscript__from_otf_tag): New functions.
839 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
840 (mscript_list, mscript_language_list): New functions.
842 * m17n-gui.h (mfont_list_family_names): Extern it.
844 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
845 (mlanguage_text, mscript_list, mscript_language_list): Extern
848 2006-06-21 Kenichi Handa <handa@m17n.org>
850 * m17n-X.c (xfont_driver): Initialize with
851 xfont_list_family_names.
852 (xfont_list_family_names): New function.
853 (xft_driver): Initialize with NULL for list_family_names member.
854 (device_init): Set list_family_names member of xft_driver to that
857 2006-06-06 Kenichi Handa <handa@m17n.org>
859 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
861 2006-03-24 Kenichi Handa <handa@m17n.org>
863 * font-ft.c (ft_open): Improve debug message.
865 * fontset.c (mfontset__get_font): Fix for the case that no font in
866 per_script list is available.
868 2006-02-06 Kenichi Handa <handa@m17n.org>
870 * Version 1.3.3 released.
872 2006-02-22 Kenichi Handa <handa@m17n.org>
874 * textprop.c: Fix some typos in documentation.
876 * plist.c: Fix some typos in documentation.
878 * m17n-core.h: Fix some typos in documentation.
879 (M17NLIB_PATCH_LEVEL): Updated to 3.
880 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
882 * symbol.c: Fix some typos in documentation.
884 * mtext.c: Fix some typos in documentation.
886 * input.c: Fix several typos in documentation.
888 2006-02-06 Kenichi Handa <handa@m17n.org>
890 * Version 1.3.2 released.
892 2006-02-03 Kenichi Handa <handa@m17n.org>
894 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
895 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
897 * font.c (xlfd_parse_name): Fix handling of the name "nil".
899 * draw.c (layout_glyphs): Fix handling left_padding of
902 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
904 2006-02-02 Kenichi Handa <handa@m17n.org>
906 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
909 2006-01-25 Kenichi Handa <handa@m17n.org>
911 * input.c (resolve_expression): If the value of PLIST is a plist,
912 but the first element is not symbol, return 0.
914 2006-01-17 Kenichi Handa <handa@m17n.org>
916 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
917 HAVE_GD is 2 or the greater.
919 2006-01-16 Kenichi Handa <handa@m17n.org>
921 * Version 1.3.1 released.
923 2006-01-16 Kenichi Handa <handa@m17n.org>
925 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
926 simulating anti-aliasing.
928 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
929 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
931 2006-01-12 Kenichi Handa <handa@m17n.org>
933 * input.c (get_surrounding_text): Always pop ic->plist.
934 (reset_ic): Don't reset ic->plist.
936 2006-01-10 Kenichi Handa <handa@m17n.org>
938 * input.c (preedit_commit): For debugging, print only commiting
939 charactes. Don't set ic->candidate_show to 0.
940 (handle_key): Don't run branch-actions just by shifting to the
942 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
943 Reset vars and plist.
945 2006-01-07 Kenichi Handa <handa@m17n.org>
947 * input.c (load_branch): Confirm that maps is not NULL.
949 2006-01-05 Kenichi Handa <handa@m17n.org>
951 * input-gui.c (win_filter): Try to convert arg to key only when
954 * plist.c (read_integer_element): If '#' and '-' are followed by
955 non-integer-constituent, read them as a part of a symbol.
956 (read_symbol_element): New arg C.
957 (read_element): Adjust args to read_symbol_element.
959 * input.c (load_macros): On overwriting a macro, free the old
961 (minput__init): Store Mmap in load_im_info_keys.
962 (minput_get_title_icon): If the input method has no title, be sure
964 (minput_get_description): If the input method has no description,
965 be sure to return NULL.
966 (minput_get_variables): Fix documentation.
967 (handle_key): Pay attention to the case that key is Mnil.
968 (filter): Likewise. Fix handling of such symbol as S-A.
970 2005-12-22 Kenichi Handa <handa@m17n.org>
972 * Version 1.3.0 released.
974 2005-12-22 Kenichi Handa <handa@m17n.org>
976 * font-ft.c (ft_list): If the specified font has no property,
979 2005-12-20 Kenichi Handa <handa@m17n.org>
981 * character.c (mchar_get_prop): Check char_prop_list.
982 (mchar_put_prop, mchar_get_prop_table): Likewise.
984 2005-12-18 Kenichi Handa <handa@m17n.org>
986 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
987 file name sans language.
989 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
991 * input.c: Fix typo in comments.
993 2005-12-14 Kenichi Handa <handa@m17n.org>
995 * input.c (minput_get_title_icon): Check the default icon for the
998 2005-12-13 Kenichi Handa <handa@m17n.org>
1000 * input.c (Mless_equal, Mgreater_equal): New variables.
1001 (parse_expression, resolve_expression, parse_action_list)
1002 (take_action_list): Handle the aboves.
1003 (filter): Treat key S-X as X.
1004 (minput__init): Initialize Mless_equal and Mgreater_equal.
1005 (minput_get_title_icon): New function.
1007 * m17n.h (minput_get_title_icon): Extern it.
1009 * database.c (get_database_filename): Return a filename instead of
1011 (load_database): Adjusted for the above change.
1012 (mdatabase__load_for_keys): Likewise.
1013 (mdatabase__find_file): New function.
1015 * database.h (mdatabase__find_file): Extern it.
1017 * font.h (mfont__resize): Delete extern.
1019 * font.c (mfont__list): Check resize ratio.
1020 (mfont__resize): Delete it.
1021 (mfont_resize_ratio): Include the code of mfont__resize.
1023 * font-ft.c (ft_open): Check resize ratio.
1025 * m17n-X.c (xfont_open): Check resize ratio.
1026 (xft_open): Likewise.
1028 2005-12-07 Kenichi Handa <handa@m17n.org>
1030 * input.c (take_action_list): If take_action_list return -1,
1032 (handle_key): Likewise.
1034 * face.c (mface__for_chars): When font is specified and layouter
1035 is found for it, if the layouter doesn't support one of a
1036 character, use a face sans layouter for it.
1038 2005-12-06 Kenichi Handa <handa@m17n.org>
1040 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1041 found, don't use it for more than one character.
1043 2005-12-05 Kenichi Handa <handa@m17n.org>
1045 * face.c (mface__realize): Set rfont->layouter to Mnil.
1046 (mface__for_chars): Fix handling of layouter.
1048 * character.h (mchar__define_prop): Extern it.
1050 * database.c (update_database_list): Call mchar__define_prop if
1053 * character.c (mchar__init): Don't call mchar_define_property.
1054 Instead just initialize property keys.
1055 (mchar__fini): Free char_prop_list only if it's not NULL.
1056 (mchar__define_prop): New function.
1057 (mchar_define_property): Call mchar__define_prop.
1059 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1062 2005-12-02 Kenichi Handa <handa@m17n.org>
1064 * language.c (mlang__init): Handle extra chars.
1066 * m17n-gui.h (mfont_check): Adjust prototype.
1068 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1069 (xfont_check_capability): New function.
1070 (xft_driver): Specify xft_check_capability.
1071 (xft_check_capability): New function.
1073 * font-ft.c (M0_3): Delete it.
1075 (ft_get_charmaps): Refer to M0.
1076 (fc_parse_pattern): Fix previous change.
1077 (ft_list_language): Check also extra chars.
1078 (ft_check_otf): Define it even if HAVE_OTF is undef.
1079 (ft_check_lang): Check the result of FcLangSetHasLang against
1080 FcLangDifferentLang. Check also extra chars.
1081 (ft_list_capability): Delete ifdef HAVE_OTF.
1082 (ft_select): Likewise.
1083 (ft_open): Improve debug information.
1084 (ft_check_capability): New function.
1085 (mfont__ft_driver): Specify ft_check_capability.
1086 (mfont__ft_init): Initialize M0.
1088 * fontset.c (get_font_from_group): New function.
1089 (mfontset__get_font): New function.
1091 * fontset.h (mfontset__get_font): Extern it.
1093 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1094 (mfont__fini): Delete ifdef HAVE_OTF.
1095 (free_font_capability): Likewise.
1096 (mfont__get_capability): Likewise.
1097 (mfont__check_capability): New function.
1098 (mfont_check): Change the order of arguments. Use
1101 * font.h (struct MFontDriver): New member check_capability.
1102 (MFontCapability): Delete ifdef HAVE_OTF.
1103 (mfont__check_capability): Extern it.
1105 * face.c (mface__realize): Fix handling of FONT arg.
1106 (mface__for_chars): Fix handling of explicitly specified font.
1108 2005-11-25 Kenichi Handa <handa@m17n.org>
1110 * font-flt.c (run_command): Print debug info for
1113 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1115 * face.c (mface__for_chars): Check rfont before accessing the
1118 2005-11-21 Kenichi Handa <handa@m17n.org>
1120 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1123 * fontset.c (fontset_table): New variable.
1124 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1125 (mfont__fontset_init): Add fontset_table as an object array.
1126 (mfont__realize_fontset): Ref FONTSET.
1127 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1128 (mfontset): Call M17N_OBJECT_REGISTER.
1129 (mfontset_copy): Likewise.
1131 * input.c (handle_key): For debugging, print information about
1133 (filter): Add an alias for Meta and Alt modifiers.
1134 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1136 (minput__init): Initialize them.
1137 (parse_expression): New function.
1138 (resolve_expression): New function.
1139 (parse_action_list): Handle expressions by parse_expression.
1140 (take_action_list): Handle expressions by resolve_expression.
1141 (parse_nested_list_value): Fix previous change.
1142 (resolve_command): Fix handling of the return value of
1145 2005-11-18 Kenichi Handa <handa@m17n.org>
1147 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1148 HAVE_OTF is defined.
1149 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1151 (ft_select): Likewise.
1153 * font.c (mfont_list): Fix for the case that FONT is NULL.
1154 (OTF_tag): Delete it.
1155 (load_otf_script_list): Define only when HAVE_OTF is defined.
1156 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1159 * draw.c (truncate_gstring): Be sure to truncate at
1160 glapheme-cluster boundary.
1162 2005-11-11 Kenichi Handa <handa@m17n.org>
1164 * input.c (delete_surrounding_text): Clear cache if necessary.
1166 2005-11-09 Kenichi Handa <handa@m17n.org>
1168 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1169 glyph prev is also supported by the current flt.
1171 2005-11-08 Kenichi Handa <handa@m17n.org>
1173 * m17n-X.c (xft_render): Cancel previous change.
1175 2005-11-07 Kenichi Handa <handa@m17n.org>
1177 * input.c: Include <stdlib.h>.
1178 (get_surrounding_text, delete_surrounding_text)
1179 (get_preceding_char, get_following_char): New functions.
1180 (integer_value): New arg surrounding. If it is nonzero, try to
1181 get a surrounding character. Callers changed.
1182 (take_action_list): Check `value' before setting an element.
1183 (destroy_ic): Unref ic_info->preceding_text and
1184 ic_info->following_text.
1185 (minput__init): Initialize Minput_get_surrounding_text and
1186 Minput_delete_surrounding_text.
1187 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1189 (filter): Unref ic_info->preceding_text and
1190 ic_info->following_text.
1192 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1195 * input.h (MInputContextInfo): New members preceding_text and
1198 2005-11-04 Kenichi Handa <handa@m17n.org>
1200 * input.c (parse_nested_list_value): Fix handling of the global
1202 (get_nested_list): Get global definitions by load_partial_im_info.
1203 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1204 MInputCandidatesChanged.
1205 (take_action_list): Likewise.
1206 (reset_ic): Likewise.
1207 (create_ic): Don't pay special attention to
1208 Mcandidates_group_size.
1209 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1210 (minput_set_variable): Get a definition of varible by
1211 mplist_find_by_value, not mplist_get.
1213 * m17n.h (enum MInputCandidatesChanged): New enum.
1215 2005-11-01 Kenichi Handa <handa@m17n.org>
1217 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1219 (mwin__destroy_window): If xft_draw's drawable is win, change it
1220 to device->drawable before destroying win.
1222 2005-10-31 Kenichi Handa <handa@m17n.org>
1224 * input.c (load_im_info): Fix adding of state.
1226 * m17n-core.c (m17n_fini_core): Fix reporting of module
1229 * m17n.c (m17n_fini): Fix reporting of module finalization.
1231 * m17n-gui.c (m17n_init_win): Fix reporting of module
1234 2005-10-29 Kenichi Handa <handa@m17n.org>
1236 * input.c (get_candidate_list): Fix the timing of referring plist.
1238 2005-10-28 Kenichi Handa <handa@m17n.org>
1240 * input.c (load_branch): Ignore an undefined map name.
1241 (load_im_info): Set im_info->title from `name' only if it's not
1243 (shift_state): Always update ic->status.
1244 (adjust_candidates): Renamed from adjust_candidate_command.
1245 Argument changed. Caller changed.
1246 (get_candidate_list, regularize_action): New functions.
1247 (take_action_list): Use them. On handling Munhandle, don't set
1249 (handle_key): If KEY is not handled by MAP, and MAP has
1250 branch_actions, perform them.
1252 * database.c (mdatabase__fini): Free dir_info->filename;
1254 2005-10-20 Kenichi Handa <handa@m17n.org>
1256 * input.c (marker_code): Accept '@@'.
1257 (integer_value): Handle '@@'.
1258 (parse_action_list): Accept a symbol argument.
1259 (take_action_list): Resolve the symbol argument. Handle the
1262 2005-10-18 Kenichi Handa <handa@m17n.org>
1264 * input.c: Include "charset.h".
1265 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1267 (MIMState): New member (M17NObject control).
1268 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1269 (get_nested_list, resolve_variable): New functions.
1270 (integer_value): New arg (MPlist **value). Set it to the plist
1271 element containing the value.
1272 (resolve_command): New function.
1273 (load_translation): New arg (MPlist *map_actions).
1274 (load_branch): New args language and name. If `keylist' is a
1275 symbol, resolved that as a command name.
1276 (free_map): New arg top. Free map->map_actions only if top is
1278 (free_state): New function.
1279 (load_state): New arg name.
1280 (im_info_list): New variable.
1281 (free_im_info, get_im_info_by_tags): New functions.
1282 (load_im_info): Arg key changed to plist. Handle `include'.
1283 Return (MInputMethodInfo *).
1284 (preedit_commit): Ref ic->candidate_list.
1285 (get_select_charset, adjust_candidate_command): New functions.
1286 (take_action_list): Handle `include'. Adjust candidate action
1287 properly. Handle control variables `candidates-charset' and
1288 `candidates-group-size'.
1289 (open_im): Use get_im_info.
1290 (create_ic): Get global variables.
1291 (load_partial_im_info): New function.
1292 (get_im_info): New function.
1293 (check_command_keyseq, check_command_list, check_variable_list):
1295 (minput__init): Don't handle M_database_hook and Mdetail_text.
1296 Initialize M_candidates, Mcandidates_group_size,
1297 Mcandidates_charset.
1298 (parse_variable_list, get_variable_list, parse_command_list)
1299 (get_command_list): Delete them.
1300 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1301 (minput__fini): Simply unref command_list and variable_list.
1302 (minput_get_description): Adjusted for the new form of description.
1303 (minput_get_commands): Use get_nested_list.
1304 (minput_assign_command_keys): Likewise.
1305 (minput_get_variables, minput_set_variable): Likewise.
1307 * input.h (MInputMethodInfo): New members im and maps.
1309 * database.h (M_database_hook): Delete extern.
1310 (MDatabaseHookFunc): Delete extern.
1311 (mdatabase__check): Extern it.
1313 * database.c: Include <glob.h>.
1314 (MAX_TIME): New macro.
1315 (Masterisk): New variable.
1316 (get_database_stream): Argument changed to (MDatabaseInfo *).
1318 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1319 (find_database): New function.
1320 (update_database_list): New function.
1321 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1322 calling update_database_list.
1323 (mdatabase__check): New function.
1324 (mdatabase_find): Use update_database and find_database. Don't
1325 handle MDatabaseHookFunc.
1326 (mdatabase_list): Call update_database at first.
1327 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1328 (MDatabaseList): New type.
1330 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1332 * m17n.h (Mdetail_text): Delete extern.
1334 * m17n-core.h (mplist_conc): Delete extern.
1336 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1338 (mplist_conc): Renamed to mplist__conc.
1339 (mplist__pop_unref): New function.
1341 2005-10-14 Kenichi Handa <handa@m17n.org>
1343 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1345 (read_element): If keys is an empty plist, return any element
1347 (dump_plist_element): Check if plist is nested.
1348 (mplist_conc): Always ref tail.
1349 (mplist_set): If key is a managing key, ref val in advance.
1351 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1352 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1353 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1356 * fontset.c (free_fontset): Unref fontset_list if necessary.
1357 (mfont__fontset_fini): Don't free fontset_list. Unref
1359 (mfont__realize_fontset): Initialize request.
1360 (mfontset): Ref default_fontset or fontset only if necessary.
1361 (mfontset_copy): Don't ref copy.
1363 * draw.c (render_glyphs): Check gend->type before checking
1366 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1367 unrefed plists to NULL.
1369 2005-10-04 Kenichi Handa <handa@m17n.org>
1371 * textprop.c (mtext_serialize): Be sure to make mt
1372 MTEXT_FORMAT_UTF_8 and NULL terminated.
1374 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1376 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1378 2005-10-03 Kenichi Handa <handa@m17n.org>
1380 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1381 is not at the beginning of line.
1383 2005-09-22 Kenichi Handa <handa@m17n.org>
1385 * input.c: Include <sys/stat.h> and <unistd.h>.
1386 (Minclude, Mcommit, Munhandle): New variables.
1387 (minput__init): Initialize them. Push only Mstate to
1388 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1389 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1391 (load_input_method): Handle "include" directive. If no states are
1393 (shift_state): If state_name is Mt, shift back to the previous
1394 state. Call preedit_commit to commit preedit text.
1395 (preedit_commit): New function.
1396 (take_action_list): Improve debug printing. Handle commit and
1398 (handle_key): Check the return value of take_action_list. Don't
1399 take branch_actions just after changing to the root map.
1400 (reset_ic): Reset all ic_info members.
1401 (filter): When a key is not handled, just move ic_info->keys
1402 instead fo calling reset_ic.
1403 (load_im_info): If key is not Mstate, push Mmap to
1405 (MDatabaseStatList): New type.
1406 (imdir_stat_list): New variable.
1407 (input_method_hook): Don't cancel the hook. Check the
1408 modification time of directories.
1409 (minput__fini): Free imdir_stat_list;
1411 * input.h (MInputContextInfo): New member prev_state.
1413 * m17n-core.h (mplist_conc): Extern it.
1415 * plist.c (mplist_conc): New function.
1417 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1419 * font.h (MRealizedFont): New member average_width.
1421 * font-ft.c (ft_open): Set rface->average_width.
1423 * font.c (xlfd_unparse_name): Print '*' before registry name.
1425 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1426 (xfont_open): Set rfont->average_width.
1427 (xft_open): Likewise.
1428 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1430 * internal-gui.h (struct MFrame): New member average_width.
1432 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1433 (mframe_get_prop): Return the average_width of a font.
1435 * face.c (mface__realize): Set rface->average_width.
1436 (mface__update_frame_face): Set frame->average_width.
1438 * face.h (MRealizedFace): New member average_width.
1440 2005-09-19 Kenichi Handa <handa@m17n.org>
1442 * font.c (xlfd_unparse_name): New arg full_xlfd.
1443 (mfont__encode_char): Use shortcut only for X core fonts.
1444 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1445 (mfont_put_prop): Handle `language' property.
1446 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1447 Print file can capability info too.
1449 * m17n-core.c (mdebug__output): New variable.
1450 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1451 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1452 (m17n_fini_core): Close mdebug__output if it's not stderr.
1454 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1455 (xfont_open): Handle baseline_offset.
1456 (xfont_find_metric): Likewise.
1457 (xfont_render): Likewise.
1458 (xft_open): Likewise.
1459 (xft_render): Likewise.
1461 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1462 (mdebug__output): Extern it.
1463 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1464 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1465 (MDEBUG_DUMP): New macro.
1466 (MDEBUG_PRINT_TIME): Print to medebug__output.
1468 * font.h (MRealizedFont): New member baseline_offset.
1470 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1472 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1473 (ft_list_family): Check alias.
1474 (ft_list_language): If language is "en", don't try to the second
1476 (ft_default_list): New variable.
1477 (ft_list_default): New function.
1478 (ft_select): If family is not specified, try only the default
1479 fonts. Treat the weights normal and medium same.
1480 (ft_open): Fix debug message. If registry is not specified, try
1481 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1482 (ft_find_metric): Likewise.
1483 (ft_render): Likewise.
1484 (ft_list): Fix debug message. Accept the registring iso8859-1.
1485 If family is not specified, try only the default fonts.
1487 * face.c (mface__realize): Fix logic of opening a font.
1489 2005-09-16 Kenichi Handa <handa@m17n.org>
1491 * face.c (mface__realize):
1493 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1496 * input.c (shift_state): Fix the condition of taking init actions.
1497 (take_action_list): Fix handling of pushback action.
1498 (handle_key): Don't change key while checking its alias.
1499 (minput__init): Initialize new variables.
1500 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1503 2005-09-12 Kenichi Handa <handa@m17n.org>
1505 * mtext.c (mtext__uppercase): Add proper open/close parens.
1506 (mtext_titlecase): Add proper casting.
1508 * input.c (parse_action_list): Handle the case that the arg is a
1509 key sequence (MText or MPlist).
1510 (take_action_list): Likewise.
1511 (shift_state): Shorter debug message.
1512 (handle_key): Terminate a debug message by "\n".
1513 (reset_ic): Don't take initial actions here.
1514 (minput_open_im): Print a debug message.
1515 (minput_close_im): Likewise.
1516 (minput_create_ic): Likewise.
1517 (minput_destroy_ic): Likewise.
1519 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1521 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1524 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1525 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1528 * character.c: Add Japanese documentation for
1529 mchar_get_prop_table ().
1531 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1533 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1534 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1535 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1537 (init_case_conversion): New function.
1538 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1539 (uppercase_precheck, lowercase_precheck, final_sigma)
1540 (after_soft_dotted, more_above, before_dot, after_i)
1541 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1543 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1545 * plist.c (read_mtext_element): Fix previous change.
1547 2005-09-05 Kenichi Handa <handa@m17n.org>
1549 * plist.c (read_mtext_element): Handle \uXXXX notation.
1551 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1552 (MTABLE_ALLOCA): Change the name of local variable.
1554 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1555 HAVE_FREETYPE are defined.
1557 * m17n-X.c: Check HAVE_X11.
1559 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1560 directory listing libraries.
1561 (noinst_PROGRAMS): Define it only in maintainer mode.
1563 2005-09-02 Kenichi Handa <handa@m17n.org>
1565 * m17n-gui.h (mdraw_line_break_option): Extern it.
1567 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1568 end of the first glyph.
1569 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1571 (mdraw_line_break_option): New variable.
1572 (mdraw_default_line_break): Use mtext_line_break.
1574 * mtext.h (wordseg_func_table): Don't extern it.
1575 (mtext__wseg_fini): Extern it.
1577 * mtext.c: Don't include word-thai.h.
1578 (wordseg_func_table): Delete this variable.
1579 (mtext__init): Don't initialize above. Don't call
1580 mtext__word_thai_init.
1581 (mtext__fini): Don't free wordseg_func_table. Call
1582 mtext__wseg_fini instead fo mtext__word_thai_fini.
1583 (MTextWordsegFunc): Don't typedef it.
1584 (mtext__word_segment): Moved to mtext-wseg.c.
1586 * m17n-core.h (enum MTextLineBreakOption): New enum.
1587 (mtext_line_break): Extern it.
1589 * mtext-wseg.c: New file.
1591 * mtext-lbrk.c: New file.
1593 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1594 add mtext-lbrk.c and mtext-wseg.c.
1596 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1597 the case that head is NULL.
1599 2005-09-01 Kenichi Handa <handa@m17n.org>
1601 * word-thai.c (wordseg_propertize): If the property value is nil,
1602 don't make the property no-merge.
1603 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1604 attention to the case that they are NULL.
1605 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1608 * character.c (mchar_get_prop_table): New function.
1610 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1612 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1613 (mchar_get_prop_table): Extern it.
1615 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1616 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1618 * internal.h (enum MTextCoverage): New enum.
1619 (MText): New member coverage.
1621 * mtext.c (FORMAT_COVERAGE): New macro.
1622 (insert): Copy mt2->coverage.
1623 (mtext__from_data): Initialize mt->coverage.
1624 (mtext__adjust_format): Update mt->coverage.
1625 (mtext): Initialize mt->coverage.
1626 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1627 Update mt->coverage if necessary.
1628 (mtext_duplicate): Copy mt->coverage.
1629 (mtext_insert, mtext_replace): New functions.
1630 (mtext_dup): Use mtext_duplicate.
1631 (mtext__word_segment): Don't set *from and *to if a word
1632 segmentation funcion is not found.
1633 (mtext_ins_char): Fix typo.
1635 2005-08-25 Kenichi Handa <handa@m17n.org>
1637 * font.h (MFont): New member for_full_width.
1639 * font.c (compare_font_score): Prefer a font of not
1642 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1643 registry charset of a font is one of CJK charsets.
1645 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1646 supports some of CJK.
1648 2005-08-24 Kenichi Handa <handa@m17n.org>
1650 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1652 * m17n-gui.c (null_device_open): Check Mresolution param and set
1655 * m17n-gd.c (device_open): Check Mresolution param and set
1658 * m17n-X.c (MWDevice): New member resy.
1659 (xfont_open): Set ascent, descent, and max_advance members of
1661 (xft_open): Likewise.
1662 (device_open): Compare also screen_num to find a device. Set
1663 device->resy and frame->dpi.
1665 * internal-gui.h (MFrame): New member dpi.
1667 * font.h (MRealizedFont): New member max_advance.
1669 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1670 (mfont__init): Don't initialize Mascent, Mdescent.
1671 (Mascent, Mdescent): Delete these variables.
1672 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1673 Mfont_descent instead of Mascent and Mdescent.
1674 (mfont_put_prop): Allow negative size.
1675 (mfont_find): Handle the case of spec->size < 0. Fix previous
1677 (mfont_list): Handle the case of spec->size < 0.
1678 (mfont_check): Likewise.
1680 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1681 (fc_get_pattern): Handle the case of font->size < 0.
1682 (ft_open): Set ascent, descent, and max_advance members of rfont.
1683 (ft_find_metric): Improve rounding.
1684 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1687 * face.c (mface__realize): Handle the case of font->size < 0.
1689 2005-08-22 Kenichi Handa <handa@m17n.org>
1691 * coding.c (MConverterStatus): Change the member buf to union.
1692 (mconv_buffer_converter): Add const to the arg buf.
1693 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1694 (mconv_decode): Adjusted for the change of MConverterStatus.
1695 (mconv_encode_range): Likewise.
1697 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1698 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1700 2005-08-20 Kenichi Handa <handa@m17n.org>
1702 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1703 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1705 * m17n-X.c (xfont_open): Set members ascent, descent, and
1706 max_advance of rfont.
1707 (xft_open): Likewise.
1709 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1711 (mfont__ft_parse_name): Add const to the arg name.
1713 * font.c (xlfd_parse_name): Add const to the arg name. Call
1714 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1715 (xlfd_unparse_name): Handle spacing.
1716 (mfont__init): Initialize new variables.
1717 (mfont__id): Handle spacing.
1718 (mfont__merge): Likewise.
1719 (mfont__set_spec): This function deleted.
1720 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1721 condition of calling mfont__ft_parse_name.
1722 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1723 (mfont_get_prop): Handle properties spacing, ascent, descent,
1725 (mfont_find): Return a realized font.
1726 (mfont_from_name): Add const to the arg name.
1728 * font.h (enum MFontProperty): New member MFONT_SPACING.
1729 (enum MFontSpacing): New enum.
1730 (MFont): New members spacing and max_advance.
1731 (mfont__ft_parse_name): Prototype adjusted.
1732 (mfont__set_spec): Extern deleted.
1733 (mfont__parse_name_into_font): Prototype adjusted.
1735 2005-08-19 Kenichi Handa <handa@m17n.org>
1737 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1739 * font.c (mfont_list): If FONT is null, use a temporary font.
1740 (mfont_parse_name): Add const to the arg name.
1742 2005-08-18 Kenichi Handa <handa@m17n.org>
1744 * word-thai.c: Surround code by #ifdef and #endif to escape from
1747 * font-ft.c: Mostly re-written.
1749 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1750 (FontLayoutCmd): Type of the member otf changed..
1751 (load_otf_command): Adjusted for the format change of otf command.
1752 (load_command): Likewise.
1753 (free_flt_command): Unref cmd->body.otf.
1754 (run_otf): Ajusted for the type change of otf_cmd.
1755 (run_command): Ajusted for the type change of otf_cmd. On
1756 debugging, print ctx->combining_code.
1757 (mfont__flt_run): Initialize ctx's members code_offset,
1758 combining_code, and left_padding to 0.
1760 * face.h (struct MRealizedFace): New member font.
1761 (mface__realize): Prototype adjusted.
1763 * face.c (find_realized_face): New arg font.
1764 (find_realized_face): Adjusted for the change of MFont.
1765 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1766 (mface__fini): Don't call mdebug__report_object.
1767 (mface__realize): New arg font.
1768 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1769 Optimize the latin case.
1770 (mface__free_realized): Free rface->font.
1771 (mface__update_frame_face): Adjusted for the change of mface__realize.
1772 (mface_equal): New function.
1774 * draw.c (Mcommon): New variable.
1775 (visual_order): Args to mfont__encode_char changed.
1776 (compose_glyph_string): Handle Mfont text property.
1777 (layout_glyphs): Adjusted for the change of MFont.
1778 (mdraw__init): Initialize Mcommon.
1779 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1781 * font.h (enum MFontType): Members completely changed.
1782 (enum MFontProperty): Move MFONT_SIZE to the tail.
1783 (enum MFontSource): New enum.
1784 (struct MFont): New members type, source, sizes, file, capability,
1786 (struct MRealizedFont): Type of member font changed. Members
1787 score, status, and encoding deleted.
1788 (MFontScore): New type.
1789 (MFontList): Member changed.
1790 (struct MFontDriver): New member has_char. Types of members
1792 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1793 (Mapple_roman): Extern them.
1794 (OTF_Tag): Typedefed if not HAVE_OTF.
1795 (enum MFontOpenTypeTable): New enum.
1796 (MFontCapability): New type.
1797 (mfont__ft_drive_otf): Prototype adjusted.
1798 (mfont__score): Extern deleted.
1799 (mfont__merge): Extern it.
1800 (mfont__has_char): Extern it.
1801 (mfont__encode_char): Prototype adjusted.
1802 (mfont__open): Extern it.
1803 (mfont__set_spec): Prototype adjusted.
1804 (mfont__get_capability): Extern it.
1806 * font.c: Include "fontset.h".
1807 (M_font_capability, M_font_list, M_font_list_len): New variables.
1808 (font_score_priority): Change order of initial elements.
1809 (font_score_shift_bits): Fix array size.
1810 (common_weight): Add "thin", "semibold", and "heavy".
1811 (common_stretch): Add "ultracondensed", "extracondensed",
1812 "extraexpanded", and "utltraexpand".
1813 (font_weight_regular, font_weight_normal, font_weight_medium): New
1815 (gen_font_name): This function deleted.
1816 (find_encoding): Set font->encoding.
1817 (OTF_tag): New function.
1818 (otf_script_list): New variable.
1819 (load_otf_script_list): New function.
1820 (find_script_from_otf_tag): New function.
1821 (xlfd_parse_name): Set font->type and font->source.
1822 (mfont__free_realized): Free chains rfonts.
1823 (font_score): Renamed from mfont__score.
1824 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1825 (Mapple_roman): New variables.
1826 (mfont__init): Initilize new variables. Initalize
1827 default_encoding.encoding_name and
1828 default_encoding.encoding_charset to Municode_full and
1829 mcharset__unicode. Use SAFE* macros for allocating filepath
1831 (mfont__fini): Free otf_script_list.
1832 (mfont__id): New function.
1833 (mfont__match_p): Check also capability member of MFont.
1834 (mfont__merge): New funciton.
1835 (mfont__set_spec_from_face): Set type and source members.
1836 (mfont__set_spec_from_plist): Set capability and type members.
1837 (mfont__select): Argument changed.
1838 (mfont__available): New function.
1839 (compare_font_score): New function.
1840 (mfont__list): New function.
1841 (mfont__open): Return a realized font.
1842 (mfont__resize): Adjusted for the change of MFont.
1843 (mfont__has_char): New function.
1844 (mfont__encode_char): Argument changed.
1845 (mfont__set_spec): Argument changed.
1846 (free_font_capability): New function.
1847 (mfont__get_capability): New function.
1848 (MFontfile): New variable.
1849 (mfont_get_prop): Adjusted for the change of MFont.
1850 (mfont_put_prop): Likewise.
1851 (mfont_set_selection_priority): Fix the way of setting
1852 font_score_priority[].
1853 (mfont_find): Use mfont__list instead of mfont__select.
1854 (mfont_resize_ratio): Adjusted for the change of MFont.
1855 (mfont_list): Use mfont__list.
1856 (mfont_check): New function.
1857 (font_score): Make it static.
1859 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1860 (mfont__lookup_fontset): Likewise.
1862 * fontset.c (struct MFontset): Delete member font_spec_list.
1863 (struct MRealizedFontset): Type of member spec changed. New
1865 (load_font_group): Arg spec_list deleted.
1866 (load_fontset_contents): Adjusted for the change of fontset_def.
1867 (free_fontset): Fix the way of freeing fontset elements.
1868 (realize_fontset_elements): Argument changed.
1869 (get_per_script): New function.
1870 (free_realized_fontset_elements): Fix the way of feeing rfontset
1872 (update_fontset_elements): Fix args to realize_fontset_elements.
1873 (mfont__realize_fontset): New arg spec.
1874 (try_font_list): New function.
1875 (try_font_group): New arg request. Use try_font_list.
1876 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1878 (mfontset): Adjusted for the change of MFontset.
1879 (mfontset_copy): Likewise. Don't share plists.
1880 (mfontset_modify_entry): Adjusted for the change of MFontset.
1881 (mfontset_lookup): Call get_per_script.
1882 (mdebug_dump_fontset): Print also the address of fonts.
1884 * input.c (shift_state): Don't reset ic_info->vars.
1885 (take_action_list): Call MDEBUG_PRINT fore calling
1888 * internal-gui.h (MFontDriver): Don't typedef it here.
1890 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1891 (MXFont): This type deleted.
1893 (struct _MFontX): New struct.
1894 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1895 (MDisplayInfo): Member base_font_list deleted.
1896 (DEFAULT_FONT): Definition changed.
1897 (FALLBACK_FONT): This maclr deleted.
1898 (free_display_info): Adjusted for the change of MDisplayInfo.
1899 (free_device): Argument to mfont__free_realized changed.
1900 (xfont_driver): Adjusted for the change of MFontDriver.
1901 (xfont_registry_list): Use MFontX instead of MXFont.
1902 (MRealizedFontX): Renamed from MXFontInfo.
1903 (xfont_select): Return the font found first.
1904 (close_xfont): Change MXFontInfo to MRealizedFontX.
1905 (xfont_open): Return the realized font.
1906 (xfont_find_metric): Get xfont from rfont->fontp.
1907 (xfont_has_char): New function.
1908 (xfont_encode_char): Adjusted for the argument change.
1909 (xfont_render): Get xfont from rfont->fontp.
1910 (xfont_list): Adjusted for the argument change.
1911 (MRealizedFontXft): Renamed from MXftFontInfo.
1912 (xft_driver): Ajusted for the change of MFontDriver.
1913 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1914 (xft_open_font): Argument changed.
1915 (xft_open): Argument changed. Return the realized font.
1916 (xft_find_metric): Get xft_font from rfont->fontp.
1917 (xft_has_char, xft_encode_char): New functions.
1918 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1919 font if not yet opened.
1920 (device_open): Don't set frame->font.
1922 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1924 (gd_font_open): New function.
1925 (gd_render): Don't use the local variable ft_info.
1926 (device_init): Adjusted for the change of gd_font_driver.
1928 * textprop.c (mtext__prop_init): Initialize text_property_table.
1929 Call M17N_OBJECT_ADD_ARRAY.
1930 (mtext__prop_fini): Don't call mdebug__report_object.
1932 * plist.c (mplist__init): Initialize plist_table.
1933 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1934 (mplist__fini): Don't call mdebug__report_object.
1936 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1937 (mtext__fini): Don't call mdebug__report_object.
1938 (MTEXT_FORMAT_UTF_16): Correct type.
1939 (mtext_data): New function.
1940 (mtext_text): Fix calculation of limit and args to
1943 * language.c: Include "plist.h".
1944 (M_script_lang_list): New variable.
1945 (mlang__init): Read languages and their information from m17n
1947 (mlanguage__list): New function.
1948 (Miso639_1, Miso639_2): New variables.
1950 * language.h (mlanguage__list): Extern it.
1952 * database.c (get_database_stream): Use SAFE_* macros for
1953 allocating and freeing path.
1954 (mdatabase__init): Likewise.
1956 * symbol.c (msymbol__fini): Don't free symbols here.
1957 (msymbol__free_table): New function.
1958 (msymbol_is_managing_key): New function.
1960 * symbol.h (msymbol__free_table): Extern it.
1961 (msymbol__list): Extern it.
1963 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1965 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1966 (struct _M17NObjectArray): New member name and next.
1967 (mdebug__add_object_array): Extern it.
1968 (M17N_OBJECT_ADD_ARRAY): New macro.
1969 (mdebug__report_object): Don't extern it.
1971 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1973 * m17n-gui.c (free_frame): Don't free frame->font.
1974 (null_device_fini): Fix code for freeing
1975 null_device.realized_font_list.
1976 (m17n_fini_win): Free interface.
1977 (mframe): Cast the return value of dlsym. Set frame->font here.
1978 (mframe_get_prop): Check frame->rface->rfont before accessing the
1981 * m17n-gui.h (Mfontfile): Extern it.
1982 (mfont_check): Extern it.
1983 (mface_equal): Extern it.
1985 * m17n-core.c: Include "symbol.h".
1986 (report_header_printed): This variable deleted.
1987 (object_array_root): New variable.
1988 (report_object_array): New function.
1989 (mdebug__report_object): This function deleted.
1990 (mdebug__add_object_array): New function.
1991 (m17n_init_core): Call mchartable_init () before mtext_init ().
1992 (m17n_fini_core): Call report_object_array (if necessary) and
1993 msymbol__free_atable at the end.
1995 * m17n-core.h (msymbol_is_managing_key): Extern it.
1996 (mtext_data): Extern it.
1997 (MTEXT_FORMAT_UTF_16): Correct type.
1998 (M17NLIB_MINOR_VERSION): Changed to 3.
1999 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2001 * chartab.c (mchartable__init): Initalize chartable_table.count.
2002 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2003 mdebug__report_object.
2005 2005-05-26 Kenichi Handa <handa@m17n.org>
2007 * m17n.h (Miso639_1, Miso639_2): Extern them.
2009 * symbol.h (msymbol__list): Extern it.
2011 * symbol.c (msymbol__list): New function.
2013 2005-05-19 Kenichi Handa <handa@m17n.org>
2015 * input-gui.c (minput__win_init): Don't change the value of
2018 2005-05-16 Kenichi Handa <handa@m17n.org>
2020 * m17n-core.c (m17n_object): Be sure to initialize all members.
2022 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2024 2005-05-09 Kenichi Handa <handa@m17n.org>
2026 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2028 2005-04-27 Kenichi Handa <handa@m17n.org>
2030 * language.c (mlang__init): Add "an" (Aragonese).
2032 * word-thai.c: Add support for libthai.
2033 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2034 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2036 * mtext.c: Include "word-thai.h" conditionaly.
2037 (mtext__init): Call mtext__word_thai_init conditionaly.
2038 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2040 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2041 not WORDCUT_LD_FLAGS.
2043 2005-04-19 Kenichi Handa <handa@m17n.org>
2045 * word-thai.c (wordseg_propertize): Always unref the attached
2047 (thai_wordseg): Don't unref the property.
2049 2005-04-18 Kenichi Handa <handa@m17n.org>
2051 * word-thai.c: Include stdlib.h.
2052 (wordseg_propertize): Add dummy function for the case that wordcut
2053 library doesn't exist.
2054 (wordseg_propertize): Fix for old wordcut library.
2056 2005-04-16 Kenichi Handa <handa@m17n.org>
2058 * word-thai.c: Include <stdio.h>.
2060 2005-04-15 Kenichi Handa <handa@m17n.org>
2062 * draw.c: Include mtext.h.
2063 (linebreak_table, M_break_at_space, M_break_at_word)
2064 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2065 (compose_glyph_string): Check POS before getting Mface text
2067 (truncate_gstring): Give correct TO arg to line_break function.
2068 (GET_LB_TYPE): New macro.
2069 (find_break_backward, find_break_forward): New functions.
2070 (mdraw__init): Initialize the above new variables.
2071 (mdraw__fini): Free linebreak_table.
2072 (mdraw_default_line_break): Use find_break_backward and
2075 * word-thai.c: New file.
2077 * word-thai.h: New file.
2079 * mtext.c: Include word-thai.h.
2080 (wordseg_func_table): New variable.
2081 (mtext__init): Initialize wordseg_func_table and call
2082 mtext__word_thai_init.
2083 (mtext__fini): Call mtext__word_thai_fini, free
2085 (MTextWordsegFunc): New type.
2086 (mtext__word_segment): New function.
2088 * mtext.h (wordseg_func_table): Extern it.
2089 (mtext__word_segment): Extern it.
2091 * m17n.c (m17n_init): Fix typo (== -> =).
2093 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2094 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2096 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2097 (MTEXTPROP_VAL): New macros.
2099 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2101 2005-04-07 Kenichi Handa <handa@m17n.org>
2103 * database.c (load_chartable): Fix pursing of symbol name.
2105 2005-03-24 Kenichi Handa <handa@m17n.org>
2107 * m17n.c (m17n_init): Fix typo (== -> =).
2109 2005-03-11 Kenichi Handa <handa@m17n.org>
2111 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2113 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2115 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2118 2005-03-09 handa <handa@m17n.org>
2120 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2121 calling m17n_init ().
2123 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2124 calling m17n_init_core ().
2126 2005-02-28 Kenichi Handa <handa@m17n.org>
2128 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2131 2005-02-17 Kenichi Handa <handa@m17n.org>
2133 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2134 (M_description, M_command, M_variable): New variables.
2135 (load_im_info_keys): New variables.
2136 (load_im_info, check_command_keyseq, get_description_advance)
2137 (parse_command_list, get_command_list, parse_variable_list)
2138 (get_variable_list, input_method_hook): New functions.
2139 (command_list, variable_list): New variables.
2140 (minput__init): Put input_method_hook to Minput_method.
2141 Initialize M_description, M_command, M_variable, Mdetail_text,
2142 load_im_info_keys, command_list, variable_list.
2143 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2144 (Mdetail_text): New variable.
2145 (minput_get_description, minput_get_commands)
2146 (minput_assign_command_keys, minput_get_variables)
2147 (minput_set_variable): New functions.
2149 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2150 (minput_assign_command_keys, minput_get_variables)
2151 (minput_set_variable): Extern them.
2153 * plist.c (UNGETC): Just decrement st->p.
2154 (read_mtext_element): New arg skip.
2155 (read_integer_element): Likewise.
2156 (read_symbol_element): Likewise.
2157 (read_element): New arg KEYS.
2158 (mplist__from_plist): Don't increment ref-count of NULL object.
2159 (mplist__from_file): New arg KEYS.
2160 (mplist_put): Don't increment ref-count of NULL object.
2161 (mplist_add): Likewise.
2162 (mplist_push): Likewise.
2163 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2165 * plist.h (mplist__from_file): Prototype adjusted.
2167 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2168 (get_database_stream): New function.
2169 (load_database): Use get_database_stream.
2170 (M_database_hook): New variable
2171 (mdatabase__init): Initialize M_database_hook.
2172 (mdatabase__load_for_keys): New function.
2173 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2175 (mdatabase_define): Free mdb->extra_info if necessary.
2177 * database.h (mdatabase__dir_list, M_database_hook)
2178 (mdatabase__load_for_keys): Extern them.
2179 (MDatabaseHookFunc): New type.
2181 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2183 2004-12-27 Kenichi Handa <handa@m17n.org>
2185 * Version 1.2.0 released.
2187 2004-12-27 Kenichi Handa <handa@m17n.org>
2189 * input.c (minput_filter): Don't reset ic->xxx_changed.
2191 * mtext.c (mtext_from_data): Fix documentation.
2193 2004-12-25 Kenichi Handa <handa@m17n.org>
2195 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2196 (M17NLIB_VERSION_NAME): Update to "1.2.".
2198 2004-12-24 Kenichi Handa <handa@m17n.org>
2200 * input.c (reset_ic): Set key_unhandled to 0.
2202 2004-12-21 Kenichi Handa <handa@m17n.org>
2204 * m17n-gui.h (mfont_from_spec): Delete extern.
2206 * input-gui.c (win_callback): Handle Minput_reset.
2207 (minput__win_init): Register reset_ic as a callback for
2210 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2211 changed. At first, shift to the initial state.
2212 (minput__init): Initialize Minput_reset. Register reset_ic as a
2213 callback for Minput_reset.
2214 (Minput_reset): New variable.
2215 (minput_filter): Always set ic->xxx_changed to 0.
2216 (minput_reset_ic): New function.
2217 (integer_value): Fix typo ('>' -> '<') and calculation of length
2220 * m17n-core.c (merror_code): Change type to `int'.
2222 * m17n-misc.h (merror_code): Adjust type.
2224 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2226 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2227 (mtext_change_prop): Delete extern.
2229 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2230 to `int'. Move the documents to m17n-core.h.
2232 2004-12-13 Kenichi Handa <handa@m17n.org>
2234 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2235 (MTextProperty): Document it.
2237 2004-12-09 Kenichi Handa <handa@m17n.org>
2239 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2241 2004-12-03 Kenichi Handa <handa@m17n.org>
2243 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2244 m17n__gui_initialized): New externs.
2246 * m17n-core.h (enum M17NStatus): New enum.
2247 (m17n_status): Extern it.
2249 * m17n-core.c (core_initialized): Delete this variable.
2250 (m17n__core_initialized, m17n__shell_initialized,
2251 m17n__gui_initialized): New variables.
2252 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2253 instead of core_initialized.
2254 (m17n_status): New function.
2256 * m17n.c (shell_initialized): Delete this variable.
2257 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2260 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2262 * m17n-gui.c (win_initialized): Delete this variable.
2263 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2264 instead of gui_initialized.
2266 2004-11-19 Kenichi Handa <handa@m17n.org>
2268 * input.c (reset_ic): Check if ic_info->state is NULL.
2269 (filter): If ic_info->state is NULL, return 0.
2270 (load_input_method): Don't unref `maps' it it's not created.
2272 2004-11-15 Kenichi Handa <handa@m17n.org>
2274 * input.c (find_candidates_group): If INDEX is -1, find the last
2276 (take_action_list): If the previous of the first candidate is
2277 requested, select the last candidate.
2279 2004-11-08 Kenichi Handa <handa@m17n.org>
2281 * m17n-X.c (device_open): Try at most 32 fonts to find a
2282 non-autoscaled font.
2284 * font.c (xlfd_parse_name): Fix previous change.
2286 2004-11-05 Kenichi Handa <handa@m17n.org>
2288 * font.c: (commont_style): Include dummy elements "slanted" and
2289 "rslanted" to prefer "o" to "r" if "i" is requested.
2291 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2293 2004-10-29 Kenichi Handa <handa@m17n.org>
2295 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2297 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2298 New members smallest and larger.
2299 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2300 (xfont_registry_list): Likewise.
2301 (xfont_select): Likewise.
2304 2004-10-28 Kenichi Handa <handa@m17n.org>
2306 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2307 font name comparison.
2308 (xfont_select): Fix logic for selecting a larger size font.
2310 2004-10-25 Kenichi Handa <handa@m17n.org>
2312 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2315 2004-10-22 Kenichi Handa <handa@m17n.org>
2317 * input.c (update_candidate): Renamed from udpate_candidate.
2318 (take_action_list): Show more debugging info on arithmetic commands.
2320 * m17n-X.c (device_open): Fix previous change.
2322 * draw.c (compose_glyph_string): Don't get face property at the
2325 2004-10-21 Kenichi Handa <handa@m17n.org>
2327 * draw.c (compose_glyph_string): Fix for the case of category
2330 2004-10-19 Kenichi Handa <handa@m17n.org>
2332 * input.c (mdebug_mask): New variable.
2333 (shift_state): Print debug information.
2334 (take_action_list): Likewise.
2335 (handle_key): Likewise.
2337 2004-10-14 Kenichi Handa <handa@m17n.org>
2339 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2341 2004-10-13 Kenichi Handa <handa@m17n.org>
2343 * m17n-X.c (device_open): Be sure to register at least one font
2346 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2347 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2349 2004-10-12 Kenichi Handa <handa@m17n.org>
2351 * draw.c (alloc_gstring): Fix previous change.
2353 * font-ft.c (ft_list_generic): Fix for the case of not
2356 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2358 * font.c (mfont_list): If no font is found, return NULL.
2359 (load_font_encoding_table): Put entries of nil registry first.
2360 (find_encoding): Adjust for the above change.
2362 2004-10-11 Kenichi Handa <handa@m17n.org>
2364 * m17n-gui.h (mfont_list): Adjust prototype.
2366 * m17n-X.c (xfont_list): New arg maxnum.
2368 * font.h (struct MFontDriver): Change prototype of <list>.
2370 * font-ft.c (fc_generic_family_list): Delete it.
2371 (Mserif, Msans_serif, Mmonospace): Delete them.
2372 (M_generic_family_info): New variable.
2373 (enum GenericFamilyType): New enum.
2374 (struct GenericFamilyInfo): New struct.
2375 (generic_family_table): New variable.
2376 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2378 (add_font_info): Get style here.
2379 (ft_list_family): Don't initialize fc_config here. Don't list
2381 (ft_list_generic): New function.
2382 (ft_select): Pay attention to generic familes here.
2383 (ft_open): Fix calculation of ascent and descent.
2384 (ft_list): Pay attention to generic families.
2385 (mfont__ft_init): Initialize M_generic_family_info,
2386 generic_family_table, and fc_config..
2387 (mfont__ft_fini): Finalize generic_family_table.
2389 * draw.c (compose_glyph_string): Use more constant font for
2390 glyphs. Adjust for the member change in MGlyph.
2391 (layout_glyph_string): Adjust for the member change in MGlyph.
2392 (alloc_gstring): Intilize scracth_glyph to avoid
2393 compose_glyph_string on it.
2394 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2395 (mdraw_coordinates_position): Fix previous change.
2397 * internal-gui.h (glyph_category): New enum.
2398 (MGlyph): Change type of <category> to enum glyph_category.
2400 * face.c (mface__realize): Delete args langauge and charset.
2401 (mface__for_chars): Fix for the case that glyphs have different
2403 (mface__update_frame_face): Adjust for mface__realize change.
2405 * face.h (mface__realize): Adjust prototype.
2407 2004-10-05 Kenichi Handa <handa@m17n.org>
2409 * language.c (mlang__init): Add Akan.
2411 2004-10-04 Kenichi Handa <handa@m17n.org>
2413 * font-ft.c (add_font_info): Add instead of push the element.
2414 (ft_list_family): For generic fonts, try all
2415 substituted. families.
2417 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2418 (run_rule): Don't update cluster range here.
2419 (run_command): Update cluster range on appending a glyph.
2420 (run_otf): Update cluster range for glyphs generated by OTF.
2422 2004-10-02 Kenichi Handa <handa@m17n.org>
2424 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2426 2004-09-30 Kenichi Handa <handa@m17n.org>
2428 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2430 2004-09-30 Kenichi Handa <handa@m17n.org>
2432 * font.h: Include <fontconfig/fontconfig.h>.
2433 (MFTInfo): New member langset.
2434 (mfont__encoding_list): Extern it.
2436 * font.c (mfont__encoding_list): New function.
2437 (mdebug_dump_font_list): New function.
2439 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2440 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2442 (ft_family_list): New variable.
2443 (set_font_info): New arg basep. Callers changed.
2444 (fc_list): Check the return value of FcPatternGetString.
2445 (add_font_info): New arg plist. Callers changed. Update
2447 (ft_list_family): New function (merged fc_list and ft_list_all).
2448 (ft_select): Use ft_list_family.
2449 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2451 (mfont__ft_init): Initialize above new variables.
2452 (mfont__ft_fini): Free ft_family_list.
2453 (STRDUP_LOWER): New macro.
2454 (set_font_info): Use STRDUP_LOWER.
2455 (ft_list_family): Avoid duplicate addition of font path. Use
2457 (fc_decode_prop): Fix typo.
2459 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2460 (xfont_registry_list): Change argument disp_info to frame.
2462 (xfont_list_all): New function.
2463 (xfont_list): If FONT is not NULL, check all fonts.
2465 2004-09-28 Kenichi Handa <handa@m17n.org>
2467 * m17n-X.c (MXFont, MXFontList): New types.
2468 (MDisplayInfo): Delete members font_registry_list,
2469 iso8859_1_family_list, iso10646_1_family_list, new members
2470 font_list, base_font_list.
2471 (free_display_info): Adusted for the change of MDisplayInfo.
2472 (xfont_driver): Initialize with xfont_list.
2473 (font_compare): New function.
2474 (build_font_list): Deleted.
2475 (xfont_registry_list): New function.
2476 (xfont_select): Use xfont_registry_list.
2477 (xfont_list): New function.
2478 (device_open): Adusted for the change of MDisplayInfo.
2480 * font-ft.c (add_font_info): New arg languages. Callers changed.
2481 (fc_list): Get languages from fonts..
2482 (ft_list_all): Renamed from ft_list. Callers changed.
2483 (ft_list): New function.
2484 (mfont__ft_driver): Initalize with ft_list.
2486 * font.c (mfont_list): New function.
2488 * font.h (struct MFontDriver): New member `list'.
2489 (MFTInfo): New member languages.
2491 * m17n-gui.h (mfont_list): Extern it.
2493 2004-09-27 Kenichi Handa <handa@m17n.org>
2495 * internal-gui.h (struct MGlyphString): Delete members mt,
2496 sub_width, sub_lbrearing, sub_rbearing, and region.
2498 * draw.c (MSubTextExtents): New type.
2499 (layout_glyphs): New arg extents. Set its members.
2500 (layout_glyph_string): Adjusted for the above change.
2501 (alloc_gstring): Don't set gstring->mt.
2502 (truncate_gstring): Call line_break function with mt instead of
2505 2004-09-22 Kenichi Handa <handa@m17n.org>
2507 * mtext.c (count_utf_16_chars): Count each code of invalid
2510 2004-09-19 Kenichi Handa <handa@m17n.org>
2512 * mtext.c (default_utf_16, default_utf_32): Rename them to
2513 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2516 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2519 2004-09-13 Kenichi Handa <handa@m17n.org>
2521 * draw.c (Mlatin): Don't declare it here.
2522 (visual_order): Fix reordering of combining characters.
2523 (compose_glyph_string): Fix detection of script.
2524 (layout_glyphs): Don't fix reordering of combining characters
2526 (layout_glyph_string): Pay attention to
2527 control->disable_overlapping_adjustment.
2528 (truncate_gstring): Include at least on character in a line.
2529 (get_gstring): Always scan one full line.
2530 (mdraw__init): Don't initialize Mlatin here.
2531 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2532 have a font, use ascent/descent of an ASCII font. Allow
2533 ink_array_return and logical_array_return to be NULL.
2534 (mdraw_coordinates_position): Fix iteration.
2536 * font-ft.c (MFTtoProp): Member completely changed.
2537 (ft_to_prop): Adjusted for the above change.
2538 (ft_to_prop_size): Likewise.
2539 (set_font_info): Adjusted for the change of MFTtoProp.
2540 (fc_generic_family_list): New variable.
2541 (fc_list): Add special handling of generic font names.
2542 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2543 Initialize fc_generic_family_list.
2544 (mfont__ft_fini): Don't free ft_to_prop. Free
2545 fc_generic_family_list.
2546 (FC_vs_M17N_font_prop): New type.
2547 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2548 (fc_decode_prop, fc_encode_prop): New functions.
2549 (mfont__ft_parse_name): Use fc_decode_prop.
2550 (mfont__ft_unparse_name): Use fc_encode_prop.
2552 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2553 (MWDevice): Add member realized_font_list.
2554 (free_display_info): Don't free disp_info->realized_font_list.
2555 (free_device): Free device->realized_fontset_list.
2556 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2557 (device_open): Don't initialize disp_info->realized_font_list.
2558 (device_open): Initialize device->realized_font_list and set it to
2559 frame->realized_font_list.
2561 * fontset.c (try_font_group): New function.
2562 (mfont__lookup_fontset): Use try_font_group.
2564 * font.c (common_weight): Change the order of "regular".
2566 * face.c (Mlatin): Don't make it static.
2567 (mface__realize): Be sure to set work_gstring.frame.
2568 (mface__for_chars): Likewise.
2570 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2573 * internal-gui.h (Mlatin): Extern it.
2575 * m17n-gui.h (MDrawControl): New member
2576 disable_overlapping_adjustment.
2578 2004-09-06 Kenichi Handa <handa@m17n.org>
2580 * font-flt.c (run_otf): Fix typo ('}'->']').
2582 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2583 (COMBINING_PRECOMPUTED_P): New macros.
2585 * draw.c (layout_glyphs): Handle precomputed combining code.
2587 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2588 precomupted combining code.
2590 2004-09-03 Kenichi Handa <handa@m17n.org>
2592 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2595 2004-08-27 Kenichi Handa <handa@m17n.org>
2597 * face.c (mface_put_prop): If the new value is the same as the
2598 current one, don't increment frame->tick.
2600 2004-08-25 Kenichi Handa <handa@m17n.org>
2602 * fontset.c (mfontset): Initialize font_spec_list member.
2603 (mfontset_copy): Load fontset if necessary.
2605 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2606 'metrics' to for C++.
2608 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2611 2004-08-16 Kenichi Handa <handa@m17n.org>
2613 * Version 1.1.0 released.
2615 2004-08-13 Kenichi Handa <handa@m17n.org>
2617 * language.c (mlang__init): Add Dhivehi.
2619 * m17n-gui.c (Mx, Mfreetype): Delete it.
2620 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2622 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2623 (mfont_resize_ratio): Extern it.
2624 (MDrawGlyphInfo): New member logical_width;
2625 (MDrawGlyph): New type.
2626 (mdraw_glyph_list): Prototype adjusted.
2628 * m17n-X.c (xfont_open): Set type and fontp members.
2629 (xft_open): Likewise.
2631 * internal-gui.h (Mx, Mfreetype): Delete extern.
2633 * font.h (struct MRealizedFont): New member type and fontp.
2635 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2636 (Mx, Mfreetype): Declare here.
2637 (Mxft): New variable.
2638 (mfont_resize_ratio): New function.
2640 * font-ft.c (ft_open): Set type and fontp members.
2642 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2645 2004-08-11 Kenichi Handa <handa@m17n.org>
2647 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2650 2004-08-06 Kenichi Handa <handa@m17n.org>
2652 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2655 * font-flt.c (run_otf): Print debugging information if necessary.
2657 2004-08-05 Kenichi Handa <handa@m17n.org>
2659 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2660 positioning_type 5 and 6. Switch simplified.
2662 2004-08-04 Kenichi Handa <handa@m17n.org>
2664 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2666 2004-08-02 Kenichi Handa <handa@m17n.org>
2668 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2669 set val to 1 even if it is greater than 1.
2671 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2673 2004-07-29 Kenichi Handa <handa@m17n.org>
2675 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2676 debugging information.
2678 * internal.h (MDEBUG_PRINT5): New macro.
2680 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2681 the previous one if the zero width glyph has left or right
2684 2004-07-26 Kenichi Handa <handa@m17n.org>
2686 * m17n-X.c (xft_render): Pay attention to members left_padding and
2687 right_padding of MGlyph.
2689 * draw.c (visual_order): Allocate one more elements for arrays as
2690 a workaround of fribidi bug.
2691 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2692 instead of MGlyph->bidi_sensitive.
2693 (layout_glyph_string): Pay attentinon to
2694 control->orientation_reversed when padding at the head or tail.
2695 Fix adjustment of space glyph width.
2696 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2699 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2700 instead of MGlyph->bidi_sensitive.
2702 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2704 2004-07-26 Kenichi Handa <handa@m17n.org>
2706 * draw.c (visual_order): Don't treat combined glyphs specially.
2707 (layout_glyphs): Don't get metrics glyphs that are already ready.
2708 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2709 width with the previous one.
2710 (draw_background): Fix bar cursor position on a r2l glyph.
2712 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2713 (run_rule): Fix place of updating cluster_begin_pos and
2714 cluster_end_pos here.
2715 (run_otf): Don't set left_padding.
2717 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2719 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2720 Fix handling of GPOS.
2721 (mfont__ft_drive_gpos): Delete this function.
2723 * font.h (mfont__ft_drive_otf): Renamed back from
2724 mfont__ft_drive_gsub.
2725 (mfont__ft_drive_gpos): Delete extern.
2727 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2728 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2730 2004-07-23 Kenichi Handa <handa@m17n.org>
2732 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2733 the same bidi level.
2735 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2737 2004-07-22 Kenichi Handa <handa@m17n.org>
2739 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2741 2004-07-20 Kenichi Handa <handa@m17n.org>
2743 * draw.c (render_glyphs): Fix checking of g->code validity.
2745 * face.c (mface__realize): Set g.type.
2747 2004-07-18 Kenichi Handa <handa@m17n.org>
2749 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2752 * m17n-gui.c (mframe): Print error message give by dlopen to
2755 2004-07-16 Kenichi Handa <handa@m17n.org>
2757 * draw.c (compose_glyph_string): Improve the way of deciding a
2758 script. For a character that doesn't have script property, use
2759 the last non-latin script.
2761 * font-ft.c (fc_list): Cancel previous change.
2762 (mfont__ft_init): Add more entries in ft_to_prop_name.
2764 2004-07-15 Kenichi Handa <handa@m17n.org>
2766 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2767 previous or next character glyphs.
2769 2004-07-14 Kenichi Handa <handa@m17n.org>
2771 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2772 of type GLYPH_SPACE.
2774 * fontset.c (mfont__lookup_fontset): If glyph type is
2775 GLYPH_SPACE, get codes for SPACE.
2777 * internal-gui.h (Mfont): Delete extern.
2779 * m17n-gui.h (Mfont): Delete duplicated extern.
2781 2004-07-13 Kenichi Handa <handa@m17n.org>
2783 * font-ft.c (DEVICE_DELTA): New macro.
2784 (adjust_anchor): New function.
2785 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2787 (mfont__ft_drive_gpos): New function.
2789 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2790 (FontLayoutContext): Delete member `rfont'.
2791 (run_otf): Set g->otf_cmd. Call
2792 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2793 only whne HAVE_OTF is defined.
2795 * fontset.c: Include "config.h".
2797 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2798 (MGlyph): New member otf_cmd.
2800 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2801 (mfont__ft_drive_gpos): Extern it.
2803 * face.c: Include "config.h".
2805 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2807 * input-gui.c: Include "config.h".
2809 * plist.c: Include "config.h".
2811 2004-07-06 Kenichi Handa <handa@m17n.org>
2813 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2814 internal-gui.h: Cancel previous changes.
2816 * m17n-gd.h: Delete it.
2818 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2819 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2820 @XML2_LD_FLAGS@ to above.
2821 (libm17n_la_LIBADD): Add -ldl.
2822 (libm17n_la_LDFLAGS): Add -export-dynamic.
2823 (X_LD_FLAGS): Fix the order of linking.
2824 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2825 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2826 (libm17n_X_la_LDFLAGS): Add -module.
2827 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2828 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2829 (libm17n_gd_la_LDFLAGS): Add -module.
2830 (include_HEADERS): Delete m17n-gd.h.
2832 2004-06-30 Kenichi Handa <handa@m17n.org>
2834 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2835 (MDeviceLibraryInterface): Delete it.
2836 (register_device_library): Delete it.
2837 (m17n__device_library_list): Renamed from device_library_list.
2839 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2840 (m17n_init_win): Adjust prototype.
2842 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2843 (m17n_init_gd): New function.
2845 * m17n-gd.h: New file.
2847 * m17n-X.h: Include <m17n-gui.h>.
2848 (m17n_init_X): Extern it.
2849 (M17N_INIT): Redefine it.
2851 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2852 (m17n_init_X): New function.
2854 * internal-gui.h (m17n__device_library_list): Extern it.
2855 (struct MDeviceDriver): New members initialized, init, and fini.
2857 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2859 (libm17n_X_la_LIBADD): Delete aboves.
2860 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2861 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2862 (libm17n_gd_la_LDFLAGS): Delete it.
2863 (include_HEADERS): Add m17n-gd.h.
2865 2004-06-25 Kenichi Handa <handa@m17n.org>
2867 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2868 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2870 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2872 * font-ft.c (fc_list): If FcFontList finds no font, try
2875 * draw.c (compose_glyph_string): Terminate the last loop after
2876 doing default combining if necessary.
2878 2004-06-24 Kenichi Handa <handa@m17n.org>
2880 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2882 * character.c (mchar_define_property): Add const to an arg.
2884 * charset.c (mchar_define_charset): Add const to an arg.
2886 * coding.c (MCodingSystem): Add const to an arg or decoder.
2887 (finish_decoding): Add const to an arg.
2888 (decode_coding_charset, decode_coding_utf_8)
2889 (decode_coding_utf_16, decode_coding_utf_32)
2890 (decode_coding_iso_2022, decode_coding_sjis)
2891 (mconv_define_coding): Likewise.
2893 * m17n-X.c (xft_find_metric): Delete unused variable.
2895 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2898 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2901 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2902 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2904 * mtext.h (mtext__from_data): Ajust prototype.
2906 2004-06-23 Kenichi Handa <handa@m17n.org>
2908 * draw.c (compose_glyph_string): Always get glyph codes by
2910 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2911 (mdraw_glyph_list): New function.
2913 * font-flt.c (mfont__flt_run): Be sure to call
2914 rfont->driver->encode_char.
2916 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2917 (ft_encode_char): Delete arg C.
2918 (ft_render): Don't call FT_Get_Char_Index.
2920 * font.c (mfont__encodable_p): Delete it.
2921 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2923 * font.h (struct MFontDriver): Delete arg C of encode_char.
2924 (mfont__encodable_p): Delete extern.
2926 * m17n-X.c (xfont_encode_char): Delete arg C.
2927 (xft_find_metric): Don't cal FT_Get_Char_Index.
2928 (xft_render): Likewise.
2930 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2932 (mdraw_glyph_list): Extern it.
2934 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2936 2004-06-22 Kenichi Handa <handa@m17n.org>
2938 * m17n-gui.h (mfontset_lookup): Extern it.
2940 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2942 * fontset.c (realize_fontset_elements)
2943 (free_realized_fontset_elements, update_fontset_elements): New
2945 (mfont__realize_fontset): Call realize_fontset_elements.
2946 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2947 (mfont__lookup_fontset): If a fontset was modified, update
2948 the realized fontset.
2949 (mfontset_modify_entry): Increment fontset->tick.
2950 (mfontset_lookup): New function.
2952 2004-06-21 Kenichi Handa <handa@m17n.org>
2954 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2956 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2957 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2958 length of source text 0.
2960 2004-06-21 Kenichi Handa <handa@m17n.org>
2962 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2963 (compare): Pay attention to format other than utf-8.
2964 (copy): Delete this function.
2965 (count_by_utf_8, count_by_utf_16, insert): New functions.
2966 (count_utf_16_chars): Fix handling of a surrogate pair.
2967 (find_char_forward, find_char_backward): Likewise.
2968 (mtext__from_data): Delete unnecessary check. Fix number of
2970 (mtext_from_data): Don't count items.
2971 (mtext_ref_char): Optimize the code.
2972 (mtext_set_char): Pay attention to format other than utf-8.
2973 (mtext_cat_char): Likewise.
2974 (mtext_dup): Don't call copy, instead do allocation here.
2975 (mtext_cat): Call insert instead of copy.
2976 (mtext_ncat): Likewise.
2977 (mtext_cpy): Delete character at first and call insert instead of
2979 (mtext_ncpy): Likewise.
2980 (mtext_copy): Likewise.
2981 (mtext_duplicate): Call insert instead of copy.
2982 (mtext_del): Pay attention to format other than utf-8.
2983 (mtext_ins): Simply call insert.
2984 (mtext_ins_char): Pay attention to format other than utf-8.
2985 (mtext_tok): Call insert instead of copy.
2986 (mtext_text): Call UNIT_BYTES.
2988 * textprop.c (mtext__adjust_plist_for_change): New function.
2990 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2991 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2992 (CHAR_UNITS_AT): Fix typo.
2993 (CHAR_UNITS_BY_HEAD): Fix typo.
2994 (STRING_CHAR_AND_UNITS): Fix typo.
2996 * internal.h (MTEXT_READ_ONLY_P): New macro.
2998 * mtext.h (mtext__replace): Delete the extern.
2999 (mtext__adjust_foramt): Adjust prototype.
3001 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3002 if possible. Otherwise make a copy of mmt.
3004 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3007 2004-06-18 Kenichi Handa <handa@m17n.org>
3009 * character.h (CHAR_STRING_UTF16): Fix syntax.
3011 2004-06-16 Kenichi Handa <handa@m17n.org>
3013 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3014 (libm17n_X_la_LIBADD): Delete it.
3015 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3017 * m17n-X.c (device_open): Add parens in `if' condition.
3019 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3020 (DEC_POSITION): Likewise.
3021 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3023 2004-06-15 Kenichi Handa <handa@m17n.org>
3025 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3028 * draw.c (compose_glyph_string): If langauge is specified, call
3029 mface__for_chars even if a text is all latin. Fix condition for
3030 setting non_ascii_found.
3032 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3034 * m17n.h (minput_char_to_key): Delete extern.
3036 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3038 * m17n-gui.c (null_device_open): Set several members of frame.
3040 2004-06-14 Kenichi Handa <handa@m17n.org>
3042 * m17n-gui.h (minput_event_to_key): Delete extern.
3044 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3046 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3048 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3050 2004-06-08 Kenichi Handa <handa@m17n.org>
3052 * character.c (mchar_put_prop): Don't increment the ref-count of
3055 2004-06-04 Kenichi Handa <handa@m17n.org>
3057 * m17n-core.c (mdebug__register_object): New function.
3058 (mdebug__unregister_object): Likewise.
3060 * internal.h (mdebug__register_object, mdebug__unregister_object):
3062 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3065 * charset.c (mcharset__load_from_database): Don't call
3066 mconv__register_charset_coding here.
3068 * coding.c (find_coding): Get a real name from an element of
3069 coding_definition_list.
3070 (mconv__register_charset_coding): Set the real name at the top of
3072 (mcoding__load_from_database): Likewise.
3073 (mconv_list_codings): Adjusted for the above change.
3075 2004-06-03 Kenichi Handa <handa@m17n.org>
3077 * coding.c (find_coding): Find by canonicalized name. Don't have
3078 to modify the element of coding_definition_list by
3080 (mconv__define_coding_from_charset): Delete it.
3081 (mconv__register_charset_coding): Canonicalize sym.
3082 (mcoding__load_from_database): Register plist modified by
3085 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3087 * font-ft.c (ft_open): Fix setting of rfont->descent.
3089 2004-06-02 Kenichi Handa <handa@m17n.org>
3091 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3092 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3093 (xlfd_unparse_name): Renamed from xfont_build_name.
3094 (mfont__init): Initialized Mfontconfig.
3095 (mfont__free_realized): Unconditionally unref rfont->info.
3096 (mfont__select): Free `this' if it's not best.
3097 (mfont__open): Don't check frame->realized_font_list.
3098 (mfont__parse_name_into_font): New function.
3099 (Mfontconfig): New variable.
3100 (mfont_from_name): Call mfont_parse_name.
3101 (mfont_name): Call mfont_unparse_name.
3102 (mdebug_dump_font): Likewise.
3104 * font.h (struct MFontDriver): Delete members parse_name and
3106 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3107 (mfont__parse_name_into_font): Extern it.
3109 * font-ft.c: Include "symbol.h".
3110 (close_ft): Unconditionally free filename and charmap_list of
3112 (ft_open): Duplicate base->filename. Increment ref-count of
3113 ft_info->charmap_list. Free ft_info->charmap_list and
3114 ft_info->filename on error.
3115 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3117 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3119 (enum xlfd_field_idx): Moved to font.c.
3120 (split_font_name, build_font_name): Likewise.
3121 (build_font_list): Call mfont__parse_name_info_font.
3122 (xfont_open): Call mfont__unparse_name. Free name.
3123 (xfont_parse_name, xfont_build_name): Moved to font.c
3124 (xft_select): Prototype deleted.
3125 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3126 Call mfont_pase_name.
3128 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3129 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3132 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3135 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3137 2004-06-01 Kenichi Handa <handa@m17n.org>
3139 * fontset.c (mfontset_modify_entry): Pay attention to the case
3140 that fontset->font_spec_list is NULL.
3142 2004-05-31 Kenichi Handa <handa@m17n.org>
3144 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3146 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3148 * font.c (mfont__select): Print score the a font for debugging.
3150 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3152 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3153 kanji_sym and kana_sym.
3155 2004-05-28 Kenichi Handa <handa@m17n.org>
3157 * Makefile.am (VINFO): New variable.
3158 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3159 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3161 2004-05-27 Kenichi Handa <handa@m17n.org>
3163 The following chanages are to make device dependent functions
3164 accessible only from MDeviceDriver structure, and to add GD and
3165 null device drivers. Font drivers get also device dependent.
3167 * m17n.c (m17n_init): Increament shell_initialized.
3168 (m17n_fini): Decremented shell_initialized.
3170 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3172 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3173 (Mwidget, Mcolormap, Mx): Extern them.
3175 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3176 (free_frame): Call frame->driver->close instead of
3178 (DLOPEN_SHLIB_EXT): New macro.
3179 (MDeviceLibraryInterface): New type.
3180 (device_library_list): New variable.
3181 (register_device_library): New function.
3182 (null_device): New variable.
3183 (null_device_close, null_device_get_prop)
3184 (null_device_realize_face, null_device_free_realized_face): New
3186 (null_driver): New variable.
3187 (null_device_init, null_device_fini, null_device_open): New
3189 (null_interface): New variable.
3190 (Mfreetype, Mdevice): Declare them.
3191 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3192 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3193 Mwin__Close_Device. Register drivers for Mx and Mgd.
3194 (m17n_fini_win): Decremented win_initialized. Call "fini"
3195 function of all opened devices. Don't call mwin__fini.
3196 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3198 (mframe): Handle Mdevice key of PLIST.
3199 (mframe_get_prop): Call frame->device->get_prop instead of
3200 mwin__device_get_prop.
3202 * m17n-gd.c: New file.
3204 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3205 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3207 * m17n-core.c (m17n_init_core): Increate core_initialized.
3208 (m17n_fini_core): Decremented core_initialized.
3210 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3211 (Mcolormap): Don't extern them here.
3213 * m17n-X.c (FRAME_DEVICE): New macro.
3214 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3215 (free_display_info): Use MPLIST_DO.
3216 (free_device): Free rface->info.
3217 (xft_close): Delete it.
3218 (device_init): Renamed from mwin__init.
3219 (device_fini): Renamed from mwin__fini.
3220 (device_open): Renamed from mwin__open_device.
3221 (x_driver): New variable.
3222 (MXFontInfo): Delete member frame, add member display.
3223 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3224 Don't declare them here.
3226 * internal-gui.h (MDeviceType): New enum.
3227 (MWDefice): Delete it.
3228 (struct MFrame): Change type of device to void *. New members
3229 device_type, driver, font_driver_list.
3230 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3231 (MDeviceDriver): New type.
3232 (Mx, Mgd, Mfreetype): Extern them.
3233 (mwin__XXX): Delete all of them.
3235 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3237 (win_destroy_ic): Likewise.
3238 (adjust_window_and_draw): Likewise.
3239 (win_callback): Likewise.
3240 (Mxim): Declare it here.
3241 (minput_event_to_key): Call M_CHECK_READABLE.
3243 * fontset.c (mfont__lookup_fontset): Delete local variable
3246 * font.h (struct MFontDriver): Delete member close, add members
3247 parse_name and build_name.
3248 (mfont__driver_list): Delete extern.
3249 (mfont__close): Delete extern.
3251 * font.c (mfont__init): Don't set mfont__driver_list.
3252 (mfont__fini): Don't unref mfont__driver_list.
3253 (mfont__select): Try font drivers in frame->font_driver_list. Set
3254 driver member of a realized font.
3255 (mfont__close): Delete it.
3256 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3257 functions of the default frame.
3259 * font-ft.c (close_ft): Check ft_info->ft_face and work
3261 (add_font_info): Allocate ft_info by M17N_OBJECT.
3262 (ft_close): Delete it.
3263 (mfont__ft_driver): Don't set ft_close.
3264 (ft_select): Increment ref-count of best_font.
3265 (ft_open): Decremented ref-count of base. On error, call
3266 FT_Done_Face and free ft_info.
3267 (ft_find_metric): Always use XXX_MONO in load_flags.
3268 (ft_render): Fix setting of width. Call
3269 frame->driver->draw_points instead of mwin__draw_points.
3270 (ft_to_prop): Don't set mfont__driver_list.
3271 (mfont__ft_fini): Just unref ft_info.
3273 * face.c (mface__init): Exchange foreground and background of
3274 mface__default. Call mface_put_prop to set hline of
3276 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3277 (mface__free_realized): Don't call mwin__free_realized_face.
3279 * draw.c (Mdepth): Don't declare it here.
3280 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3281 (render_glyphs, render_glyph_string): Likewise.
3282 (mdraw__init): Don't set Mdepth.
3283 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3285 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3287 (mdraw_text_items): Check FRAME is writable.
3288 (mdraw_per_char_extents): Implement body.
3290 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3292 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3293 (GUI_SOURCES): Delete it.
3294 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3295 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3296 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3297 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3298 (linkgui_LDADD): Set to libm17n-gui.la
3299 (linkgui_LDFLAGS): New target.
3300 (SRC): Include ${libm17n_gui_la_SOURCES} and
3301 ${libm17n_gd_la_SOURCES}.
3303 2004-05-24 Kenichi Handa <handa@m17n.org>
3305 * draw.c (draw_background): Don't draw background even if
3306 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3308 2004-05-22 Kenichi Handa <handa@m17n.org>
3310 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3312 2004-05-20 Kenichi Handa <handa@m17n.org>
3314 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3316 * m17n-gui.c: Include "plist.h".
3317 (mframe): If PLIST is NULL, initialize it to emply plist.
3319 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3320 (xft_driver): New variable.
3321 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3322 (xft_find_metric, xft_render): New function.
3323 (mwin__init): Adjusted for the new mfont__driver_list.
3324 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3325 generated face to PARAM.
3326 (mwin__realize_face): Fix setting of box colors. Don't call hook
3328 (mwin__draw_hline): New function.
3329 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3330 (mwin__xft_render): Delete these function.
3332 * internal-gui.h (struct MFrame): New member tick.
3333 (struct MGlyphString): New member tick.
3334 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3335 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3336 (mwin__xft_render): Delete extern.
3338 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3339 (mfontset): Always increment the reference count of returned
3342 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3343 (MFTInfo): Moved to font.h.
3344 (ft_iso8859_1_font_list): Delete this variable.
3345 (set_font_info): Don't set font->property[MFONT_TYPE].
3346 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3347 (add_font_info): Change type to void.
3348 (fc_list): Change anme from xft_list. Caller changed. Include
3349 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3350 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3351 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3352 (close_ft): Don't call mwin__xft_close. Unref
3353 ft_info->extra_info.
3354 (ft_open): Don't setup ft_info->fontname. Don't call
3356 (ft_find_metric): Don't call mwin__xft_get_metric.
3357 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3358 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3359 (mfont__ft_init): Adjusted for new mfont__driver_list.
3360 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3362 * font.c (mfont__driver_list): Make it MPlist.
3363 (mfont__init): Adjust initialization of mfont__driver_list.
3364 (mfont__fini): Free mfont__driver_list.
3365 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3366 (mfont__select): Adjusted for the new mfont__driver_list.
3368 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3369 (mfont__drirver_list): Adjust prototype.
3370 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3372 * face.h (struct MFace): Delete member realized_face_list, add
3374 (struct MRealizedFace): Delete member need_update
3375 andnofont_rface, add member non_ascii_list.
3376 (mface__update_frame_face): Extern it.
3378 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3380 (get_hline_create, get_box_create): New functions.
3381 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3383 (free_face): Cancep previous change. Free face->frame_list.
3384 (serialize_hline): Do nothing if hline->width is zero.
3385 (serialize_box): Do nothing if box->width is zero.
3386 (mface__init): Setup all properties of mface__default.
3387 (mface__fini): Free hline_prop_list and box_prop_list.
3388 (mface__realize): Cancel previous change. Update
3389 face->frame_list. Setup rface->non_ascii_list.
3390 (mface__for_chars): Update rface->non_ascii_list.
3391 (mface__free_realized): Free rface->non_ascii_list.
3392 (mface__update_frame_face): New function.
3393 (mface): Initialize face->frame_list.
3394 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3396 (mface_merge): Likewise.
3397 (mface_put_prop): If key is Mhline or Mbox, get value by
3398 get_hline_create or get_box_create respectively.
3399 (mface_put_prop): Update frame->tick and call
3400 mface__update_frame_face if necessary.
3401 (mface_update): Do nothing if func is noop_hook.
3403 * draw.c (render_glyphs): If a font is not found, use
3404 mwin__draw_empty_boxes.
3405 (alloc_gstring): Initialize gstring->tick.
3406 (get_gstring): Check gstring->tick.
3408 2004-05-17 Kenichi Handa <handa@m17n.org>
3410 * face.c (find_realized_face): Return value changed. If RFONT is
3411 NULL, avoid unnecessary checking.
3412 (free_face): Free face->realized_face_list.
3413 (mface__realize): Adjusted for the change of find_realized_face.
3414 If it returns a realized face that needs update, free it and
3415 realize a new one. Push a new realized face to
3416 frame->realized_face_list instead of appending.
3417 (mface__for_chars): Adjusted for the change of find_realized_face.
3418 Short cut if the required font is in rface->ascii_rface.
3419 (mface_put_prop): Free old value if necessary. Set need_update
3420 member of realized faces to 1.
3422 * face.h (struct MFace): Delete member tick, add member
3424 (struct MRealizedFace): Delete member tick, add member
3427 2004-05-13 Kenichi Handa <handa@m17n.org>
3429 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3431 2004-05-12 Kenichi Handa <handa@m17n.org>
3433 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3435 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3436 parse it XftNameParse.
3438 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3439 (all_fonts_scaned): New variable.
3440 (set_font_info): FAMILY may be Mnil.
3441 (add_font_info): Argument changed.
3442 (xft_list): Call add_font_info in it.
3443 (ft_list): Likewise.
3444 (ft_select): Make it work in the case family is Mnil.
3445 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3446 (mfont__ft_fini): Set all_fonts_scaned to 0.
3448 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3449 that is failed to open.
3451 2004-05-10 Kenichi Handa <handa@m17n.org>
3453 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3454 device's depth is 1 (i.e. monochrome).
3456 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3457 to work around the problem of libtool.
3459 * font-ft.c: Include <freetype/ftbdf.h>.
3460 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3462 (mfont__ft_init): Initialize them.
3463 (ft_iso8859_1_font_list): New variable.
3464 (set_font_info): Detect a font containing iso8859-1 glyphs and
3465 register it in ft_iso8859_1_font_list. If the font is not
3466 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3467 properties of the font from its properties.
3468 (add_font_list): If the font is not scalable, check if it is BDF
3469 or PCF font. If not, ignore it.
3470 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3471 registry is not iso8859-1.
3472 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3473 ft_iso8859_1_font_list.
3474 (ft_find_metric): If the font is not scalable, assume it as BDF
3475 or PCF, and get a metric from its properties.
3476 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3478 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3480 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3481 (libm17n_la_LDFLAGS): Delete it.
3482 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3483 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3485 2004-05-06 Kenichi Handa <handa@m17n.org>
3487 * draw.c (compose_glyph_string): Fix previous change.
3489 2004-04-30 Kenichi Handa <handa@m17n.org>
3491 * font-ft.c (ft_list): Delete unused variable `result'.
3492 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3494 2004-04-27 Kenichi Handa <handa@m17n.org>
3496 * m17n-X.c: Include config.h
3497 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3498 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3499 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3500 (FRAME_CMAP, FRAME_VISUAL): New macros.
3501 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3502 (xfont_driver): Make it static.
3503 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3504 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3505 info->xft_color_back.
3506 (MXftFontInfo) [HAVE_XFT2]: New type.
3507 (mwin__xft_close) [HAVE_XFT2]: New function.
3508 (mwin__xft_open) [HAVE_XFT2]: New function.
3509 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3510 (mwin__xft_render) [HAVE_XFT2]: New function.
3512 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3513 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3514 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3517 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3519 * font-ft.c: Don't include FT_FREETYPE_H here.
3520 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3521 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3522 (MFTInfo): New member charmap_index.
3523 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3524 (check_otf_filename): Renamed from check_filename. Return value
3526 (ft_set_property): This function deleted.
3527 (set_font_info): New function.
3528 (add_font_list): Argument changed. Add multiple fonts.
3529 (xft_list) [HAVE_XFT2]: New function.
3530 (ft_list) [not HAVE_XFT2]: New function.
3531 (ft_select): Add code for Xft.
3532 (close_ft): Likewise.
3533 (ft_open): Likewise.
3534 (ft_find_metric): Likewise.
3535 (ft_encode_char): Likewise.
3536 (ft_render): Likewise.
3538 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3540 2004-04-26 Kenichi Handa <handa@m17n.org>
3542 * textprop.c (mtext_attach_property): Declare the return type as
3545 2004-04-21 Kenichi Handa <handa@m17n.org>
3547 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3549 2004-04-09 Kenichi Handa <handa@m17n.org>
3551 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3553 (load_command): Setup above members.
3555 2004-04-05 Kenichi Handa <handa@m17n.org>
3557 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3559 2004-03-30 Kenichi Handa <handa@m17n.org>
3561 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3564 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3565 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3567 2004-03-29 Kenichi Handa <handa@m17n.org>
3569 * Version 1.0 Patch Level 2 released.
3571 2004-03-29 Kenichi Handa <handa@m17n.org>
3573 * charset.c (make_charset): Set charset->fully_loaded and
3574 charset->simple correctly. Don't try to get charset->min_char and
3575 charset->max_char for a charset of method subset and superset.
3576 Don't load a mapping file here.
3577 (mcharset__init): Set unified_max.
3578 (mcharset__load_from_database): Free a working plist.
3580 * coding.c (mcoding__fini): Free all malloced data.
3582 * input-gui.c (win_create_ic): Set control.as_image for preediting
3585 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3586 `count') to initialize the array.
3588 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3591 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3593 (mwin__create_window): Fix bug of setting a background pixel of a
3595 (mwin__adjust_window): Clear the window before drawing.
3597 * m17n-core.c (mdebug__report_object): Free array->objectes if
3599 (m17n_init_core): Don't set report_header_printed to 0 here.
3600 Fix debugging information.
3601 (m17n_fini_core): Set report_header_printed to 0 here.
3603 * m17n-core.h (mplist_deserialize): Extern it.
3605 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3607 * m17n.c (m17n_fini): Fix debugging information.
3609 * mtext.c (mtext__adjust_foramt): New function.
3611 * mtext.h (mtext__adjust_foramt): Extern it.
3613 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3615 * plist.h (mplist__deserialize): Don't extern it.
3617 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3618 elements of symbol_table to NULL. Report about created and freed
3619 symbols if MDEBUG_FINI is set.
3621 2004-03-22 Kenichi Handa <handa@m17n.org>
3623 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3625 * m17n.c (m17n_init): Fix the way of checking merror_code.
3627 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3629 2004-03-22 Kenichi Handa <handa@m17n.org>
3631 * fontset.c (realize_font_group): Adjust the font size by
3632 mfont__resize before selecting a font.
3634 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3636 2004-03-19 Kenichi Handa <handa@m17n.org>
3638 * Version 1.0 Patch Level 1 released.
3640 2004-03-19 Kenichi Handa <handa@m17n.org>
3642 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3644 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3646 2004-03-19 Kenichi Handa <handa@m17n.org>
3648 Re-apply the changes forgotten in the released version.
3650 * charset.c (mcharset__load_from_database): Call
3651 mchar_define_charset.
3653 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3654 (mconv_encode_range): Put Mcoding text property.
3656 2004-03-18 Kenichi Handa <handa@m17n.org>
3658 * draw.c (Mdepth): New variable.
3659 (visual_order): Delete unused local var `pos'.
3660 (compose_glyph_string): Fix for the case that gstring->glyphs is
3661 realloced. Stop generating glyphs at TO. Fix handling of
3663 (layout_glyphs): Get metrics of all glyphs in advance. Set
3664 lbearing and rbearing of base of composition glyph correctly.
3665 Handle left-overhang glyphs correctly.
3666 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3668 (dump_combining_code): Change the defualt off_x character to ".".
3669 (mdraw__init): Initialize Mdepth.
3671 * face.c (work_gstring): New variable
3672 (mface__init): Initialize work_gstring.
3673 (mface__fini): Free work_gstring.glyphs.
3674 (mface__realize): Don't handle videomode property here. Adjusted
3675 for the change of mfont__get_metric.
3676 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3678 * face.h (enum face_gc): Moved to m17n-X.c.
3680 * font.h (struct MFontDriver): Arguments of find_metric changed.
3681 (mfont__select): Prototype adjusted.
3682 (mfont__get_metric): Likewise.
3683 (mfont__ft_drive_otf): Likewise.
3684 (mfont__flt_run): Likewise.
3686 * font.c (mfont__select): New argument layouter. If layouter is
3687 different in the registered font, make a new copy of realized
3689 (mfont__get_metric): Argument changed. Get metrics of multiple
3691 (mfont_find): Call mfont__select with layouter as Mnil.
3693 * font-flt.c (FontLayoutContext): New member rfont.
3694 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3695 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3697 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3699 (NUM_POINTS): New macro.
3700 (MPointTable): New type.
3701 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3702 (mfont__ft_drive_otf): New argument rfont.
3704 * fontset.c (realize_font_group): Adjusted for the changed of
3706 (check_fontset_element): This function deleted.
3708 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3709 off the parent window if the preedit text is zero length.
3711 * internal-gui.h (struct MFrame): New members foreground,
3712 background, videomode, font.
3713 (struct MGlyphString): New member anti_alias.
3714 (MDrawPoint): New type.
3715 (mwin__draw_bitmap): Prototype deleted.
3716 (mwin__draw_points): Prototype added.
3718 * m17n-gui.h (MDrawControl): New member anti_alias.
3720 * m17n-gui.c (free_frame): Free frame->font.
3721 (mframe): Set the fontset of frame->face to the default fontset.
3723 * m17n-X.c (RGB_GC): New type.
3724 (enum gc_index): Renamed from enum face_gc. Member names changed.
3726 (struct MWDevice): Members foreground and background deleted. New
3727 member scratch_gc, gc_list.
3728 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3729 (free_device): Free GCs in device->gc_list.
3730 (get_rgb_gc): New function.
3731 (get_gc): Renamed and argument changed from get_color.
3732 (get_gc_for_anti_alias): New function.
3733 (xfont_find_metric): Arguments changed. Get metrics of multiple
3735 (set_region): Argument changed. Caller changed.
3736 (xfont_render): Allways set a font in gc.
3737 (x_error_handler, x_io_error_handler): Define only if
3738 X_SET_ERROR_HANDLER is defined.
3739 (mwin__open_device): Create device->scratch_gc. Set members
3740 foreground, background, and videomode of frame. Call
3741 XSetErrorHandler and XSetIOErrorHandler only if
3742 X_SET_ERROR_HANDLER is defined.
3743 (struct gc_list): Deleted.
3744 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3745 (mwin__realize_face): Adjusted for the change of the format of
3746 rface->info and the charge of set_region.
3747 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3748 (mwin__draw_box): Likewise.
3749 (mwin__draw_bitmap): This function deleted.
3750 (mwin__draw_points): New function.
3751 (mwin__verify_region): Adjusted for the change of the format of
3752 rface->info and the charge of set_region.
3753 (mwin__create_window): Inherit backgound pixel from parent.
3754 (mwin__dump_gc): Adjusted for the change of the format of
3757 2004-03-16 Kenichi Handa <handa@m17n.org>
3759 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3761 * input.c (M_key_alias): New variable.
3762 (handle_key): Try M_key_alias property of a key too.
3763 (minput__init): Initialize M_key_alias. Give that property to
3764 symbols in one_char_symbol. Fix bug of initializing
3767 * draw.c (compose_glyph_string): Don't handle
3768 ignore_formatting_char here. Include formatting characters in the
3769 range processed by a FTL.
3770 (layout_glyph_string): Handle ignore_formatting_char here.
3772 2004-03-12 Kenichi Handa <handa@m17n.org>
3774 * input-gui.c (win_create_ic): Enable bidi in status control.
3776 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3778 2004-03-09 Kenichi Handa <handa@m17n.org>
3780 * input.c (load_input_method): If title is not specified, use the
3781 input method name as title.
3783 * m17n-X.c (get_color): Make it static.
3784 (xim_create_ic, xim_destroy_ic, x_error_handler)
3785 (x_io_error_handler): Likewise.
3787 2004-03-01 Kenichi Handa <handa@m17n.org>
3789 * Version 1.0 released.
3792 Copyright (C) 2003, 2004
3793 National Institute of Advanced Industrial Science and Technology (AIST)
3794 Registration Number H15PRO112
3796 This file is part of the m17n library.
3798 The m17n library is free software; you can redistribute it and/or
3799 modify it under the terms of the GNU Lesser General Public License
3800 as published by the Free Software Foundation; either version 2.1 of
3801 the License, or (at your option) any later version.
3803 The m17n library is distributed in the hope that it will be useful,
3804 but WITHOUT ANY WARRANTY; without even the implied warranty of
3805 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3806 Lesser General Public License for more details.
3808 You should have received a copy of the GNU Lesser General Public
3809 License along with the m17n library; if not, write to the Free
3810 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3811 Boston, MA 02110-1301, USA.