1 2007-08-14 Kenichi Handa <handa@m17n.org>
3 * font-ft.c (mfont__ft_drive_otf): Fix arg to OTF_check_features.
5 2007-07-13 Kenichi Handa <handa@m17n.org>
7 * Version 1.4.0 released.
9 2007-07-12 Kenichi Handa <handa@m17n.org>
11 * input.c: Fix doxygen @ref commands.
13 2007-07-10 Kenichi Handa <handa@m17n.org>
15 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
17 2007-07-09 Kenichi Handa <handa@m17n.org>
19 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
21 * m17n.h: Include m17n-core.h if not yet done. Use macros
22 M17N_BEGIN_HEADER and M17N_END_HEADER.
24 * m17n-gui.h: Likewise.
26 * m17n-misc.h: Likewise.
28 2007-06-13 Kenichi Handa <handa@m17n.org>
30 * font-flt.c (load_command): Prepend "^" in the regular expression.
32 2007-06-11 Kenichi Handa <handa@m17n.org>
34 * language.c (mlanguage_name_list): Fix previous change.
36 * coding.c (mcoding__load_from_database): Add aliases in
37 coding_definition_list.
39 2007-06-10 Kenichi Handa <handa@m17n.org>
41 * language.c (mlanguage_name_list): Fix previous change.
43 2007-06-08 Kenichi Handa <handa@m17n.org>
45 * input.c (update_candidate): Copy candidate_list earlier.
46 (re_init_ic): Provide pseudo initialize state if none.
48 2007-06-05 Kenichi Handa <handa@m17n.org>
50 * input.c (preedit_insert): Print debug information.
52 * database.c (expand_wildcard_database): New function.
53 (mdatabase_list): Fix handling of wildcard database.
55 * language.c (load_lang_name): New function.
56 (mlang__fini): Cancel the last two changes.
57 (mlanguage_name_list): New arg script and territories. Use
60 * m17n.h (mlangauge_name_list): Adjusted.
62 2007-06-04 Kenichi Handa <handa@m17n.org>
64 * input.c (open_im): Check if the input method has at least one
67 2007-06-01 Kenichi Handa <handa@m17n.org>
69 * input.c (shift_state): Change the format of debug print.
70 (preedit_commit): New arg need_prefix. Caller changed.
71 (update_candidate): Copy candidate_list.
72 (take_action_list): Likewise.
73 (handle_key): Change the format of debug print.
75 * font-flt.c (load_flt): Ignore unknown directives.
77 2007-05-25 Kenichi Handa <handa@m17n.org>
79 * m17n-core.c (mdebug__unregister_object): Small optimization.
81 * database.c (find_file): Merged into get_database_file.
82 (get_database_file): New arg result. Caller changed.
83 (mdatabase__check): Fix the logic.
85 2007-05-24 Kenichi Handa <handa@m17n.org>
87 * database.c (find_database): If unprocessed wildcard database is
88 found, register database filed and recursively call find_database.
89 (free_db_info): Unref db_info->properties.
90 (register_database): New arg properties. Delete code for
91 initializing mdatabase__list.
92 (register_databases_in_files): Argument changed. Caller changed.
93 (mdatabase__update): Don't list files by glob here.
94 (mdatabase_list): If unprocessed wildcard database is found,
95 register database filed and recursively call mdatabase_list.
97 * database.h (enum MDatabaseStatus): New enum
98 MDB_STATUS_AUTO_WILDCARD.
100 * input.c (load_branch): Fix previous change.
101 (update_global_info): If the global database is not found, return -1.
103 2007-05-23 Kenichi Handa <handa@m17n.org>
105 * database.c (Mversion): New variable.
106 (mdatabase__init): Initialize it.
107 (register_database): New arg properties. Caller changed.
108 (register_databases_in_files): Don't check version here.
109 (mdatabase__update): Likewise.
111 * database.h (MDatabaseInfo): New member properties.
113 2007-05-21 Kenichi Handa <handa@m17n.org>
115 * language.c: Include <ctype.h>
116 (mlanguage__info): Use strncasecmp (not memcmp).
117 (mlanguage_name): Downcase language name for backward
120 * input.c (filter): Don't check Mlanguage property of
123 2007-05-18 Kenichi Handa <handa@m17n.org>
125 * language.c (mlanguage_name): Fix it to handle M-text English
128 * input.c (config_command): Set NAME before using it.
129 (load_branch): Try to resolve a map name by variables.
131 2007-05-17 Kenichi Handa <handa@m17n.org>
133 * language.c (mlang__fini): Fix previous change.
135 2007-05-16 Kenichi Handa <handa@m17n.org>
137 * plist.c (free_plist): Cancel the last change.
138 (write_element): Check if PLIST is nested.
139 (mplist__from_plist): Label a plist as nested if appropriate.
140 (mplist__from_alist): Label a plist as nested.
141 (mplist__conc): Check the value of PL before referring it. Label
142 a plist as nested if appropriate.
143 (mplist_copy): Label a plist as nested if appropriate.
144 (mplist_put_func): Return Mnil if KEY is a managing key.
145 (mplist_push): Label a plist as nested if appropriate.
147 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
150 * language.c (mlang__fini): Unref each element of langname_list.
152 2007-05-14 Kenichi Handa <handa@m17n.org>
154 * language.c: Include <string.h> and <locale.h>.
155 (langname_list): New variable.
156 (load_lang_script_list): Exclude invalid list elements.
157 (mlang__init): Initialize langname_list.
158 (mlang__fini): Unref langname_list.
159 (mlanguage__info): Adjusted for the change of English
160 name (symbol->M-text).
161 (mlanguage_name): Label it as obsolete.
162 (mlanguage_name_list): New function.
164 * m17n.h (mlanguage_name_list): Extern it.
166 * locale.c (make_locale): Fix setting of members of locale.
168 * plist.c (free_plist): Unref also nested plist.
170 2007-05-11 Kenichi Handa <handa@m17n.org>
172 * coding.c (mconv_reset_converter): Set internal->used to 0.
174 2007-05-08 Kenichi Handa <handa@m17n.org>
176 * input.c (check_description): Force copying the translated text.
178 2007-05-02 Kenichi Handa <handa@m17n.org>
180 * input.c (minput_save_config): Unref unnecessary plist. Use
181 free_im_list to free im_config_list.
183 2007-04-20 Kenichi Handa <handa@m17n.org>
185 * input.c (config_command): Fix previous change again.
186 (config_variable): Likewise.
187 (minput_config_command): Fix for the case of setting back to
189 (minput_config_variable): Likewise.
190 (minput_save_config): Include nil as documentation of customized
193 2007-04-05 Kenichi Handa <handa@m17n.org>
195 * input.c (config_command): Fix previous change.
196 (config_variable): Likewise.
198 * plist.c (mplist_get_func): Fix for backward compatiblity.
200 2007-04-04 Kenichi Handa <handa@m17n.org>
202 * input.c (minput_get_command, minput_config_command): Fix example
205 2007-03-29 Kenichi Handa <handa@m17n.org>
207 These changes are to avoid unsafe casting of a function pointer.
209 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
210 (struct MFace): New member hook.
212 * face.c (serialize_face): Adjusted for the change of MFace.
213 (deserialize_face): Likewise.
214 (mface__init): Likewise. Use msymbol_put_func.
215 (mface__realize): Adjusted for the change of MFace. Avoid
217 (mface_get_prop): Adjusted for the change of MFace.
218 (mface_put_prop): Likewise.
219 (mface_get_hook): New function.
220 (mface_put_hook): New function.
221 (mface_update): Adjusted for the change of MFace.
223 * input-gui.c (win_callback): Use mplsit_get_func.
224 (minput__win_init): Use mplsit_put_func.
226 * input.c (take_action_list): Use mplist_get_func.
227 (init_ic_info): Likewise.
228 (fini_ic_info): Likewise.
229 (minput_callback): Likewise.
230 (minput__init): Use mplist_put_func.
232 * language.c (mlang__init): Use msymbol_put_func.
234 * m17n-core.h (M17NFunc): New function type.
235 (M17N_FUNC): New macro.
236 (msymbol_put_func, msymbol_get_func): Extern them.
237 (mplist_put_func, mplist_get_func): Extern them.
239 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
241 * m17n-gui.c (mframe): Add a proper casting.
243 * plist.h (struct MPlist): Make the member val a union.
244 (MPLIST_VAL): Adjusted for the above change.
245 (MPLIST_FUNC): New macro.
246 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
248 * plist.c (mplist_put_func, mplist_get_func): New functions.
250 * symbol.c (msymbol__fini): Use MPLIST_VAL.
251 (msymbol_put_func, msymbol_get_func): New functions.
253 * textprop.c (mtext_serialize): Use msymbol_get_func.
254 (mtext_deserialize): Likewise.
256 2007-03-28 Kenichi Handa <handa@m17n.org>
258 * input.c (get_candidate_list): Avoid unnecessary unref.
260 2007-03-23 Kenichi Handa <handa@m17n.org>
262 * database.c (mdatabase__update): Unref plist at the tail.
264 2007-03-21 Kenichi Handa <handa@m17n.org>
266 * input.c (update_custom_info): Fix for the case "name == Mnil &&
268 (config_command): Fix for the case that configuration is
270 (config_variable): Likewise.
271 (minput_config_command): If keyseqlist is an empty list, cancel
273 (minput_config_variable) If value is an empty list, cancel the
275 (minput_save_config): Handle cancellation of config and customize
278 2007-03-15 Kenichi Handa <handa@m17n.org>
280 * input.c (minput_config_variable): Check custom->vars (not
283 2007-03-01 Kenichi Handa <handa@m17n.org>
285 * input.c (reload_im_info): Setup cmds, vars, and title of
287 (check_variable_value): Fix the return value.
289 * database.c (mdatabase__check): If necessary, update database and
292 2007-02-28 Kenichi Handa <handa@m17n.org>
294 * database.c (get_dir_info): Set dir_info->status to
296 (check_version): New function.
297 (register_database): Don't call find_database.
298 (register_databases_in_files): Don't register a database of
300 (mdatabase__update): Likewise. Avoid unnecessary scanning.
302 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
303 and MDB_STATUS_OUTDATED.
305 * font.h (struct MFont): Types of members type, source, and
306 spacing changed to unsigned.
308 * internal-gui.h (struct): Types of members category and type
311 * internal.h (struct MText): Types of members format and coverage
314 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
315 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
317 2007-02-23 Kenichi Handa <handa@m17n.org>
319 * input.c (Mpop): New variable.
320 (fully_initialize): Initialize Mpop.
321 (parse_action_list): Handle Mpop.
322 (take_action_list): Likewise.
323 (handle_key): When a key is unhandled, shift to the initial state
324 only if the current state has no branch action.
326 2007-02-12 Kenichi Handa <handa@m17n.org>
328 * input.c (get_preceding_char): Unref mt if necessary.
329 (get_following_char): Likewise.
330 (parse_action_list): Fix handling of `insert' action as
332 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
333 (take_action_list): Check invalid candidate list.
335 2007-02-06 Kenichi Handa <handa@m17n.org>
337 * input.c (integer_value): Check also ic->produced for @-N.
339 2007-01-26 Kenichi Handa <handa@m17n.org>
341 * database.c (mdatabase__update): Check mdatabase__dir_list from
344 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
346 2007-01-12 Kenichi Handa <handa@m17n.org>
348 * input.c (handle_key): Handle a branch action of the initial
351 2007-01-10 Kenichi Handa <handa@m17n.org>
353 * m17n-gd.c (gd_render): Delete superfluous line.
355 2006-12-26 Kenichi Handa <handa@m17n.org>
357 * m17n.h (minput_callback): Extern it.
359 * input.h (minput__callback): Delte extern.
361 * input.c (get_surrounding_text): Adjusted for the change of
362 minput__callback to minput_callback.
363 (delete_surrounding_text): Likewise.
364 (minput_create_ic): Likewise.
365 (minput_destroy_ic): Likewise.
366 (minput_filter): Likewise.
367 (minput_set_spot): Likewise.
368 (minput_toggle): Likewise.
369 (minput_reset_ic): Likewise.
371 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
372 and ic->candidate_to to 0.
373 (minput_callback): Renamed from minput__callback.
375 * input-gui.c (win_callback): Adjusted for the change of
376 minput__callback to minput_callback.
378 2006-12-15 Kenichi Handa <handa@m17n.org>
380 * font-ft.c (ft_add_font): Fix typo.
382 2006-12-06 Kenichi Handa <handa@m17n.org>
384 * Version 1.3.4 released.
386 2006-11-16 Kenichi Handa <handa@m17n.org>
388 * input.c (parse_action_list): Allow (undo 0).
389 (adjust_markers): New function.
390 (preedit_insert, preedit_delete): Call adjust_markers.
391 (preedit_replace): New function.
392 (update_candidate): Call preedit_replace instead of preedit_insert
394 (filter): When ic_info->commit_key_head is nonzero, shift input
395 event keys even if there's no committed text.
397 2006-11-10 Kenichi Handa <handa@m17n.org>
399 * input.h (MInputContextInfo): New member commit_key_head.
401 * input.c (preedit_commit): Update ic_info->commit_key_head.
402 (take_action_list): Reset ic_info->commit_key_head on Mundo.
403 (filter): When committed, shift keys by ic_info->commit_key_head.
405 2006-10-30 Kenichi Handa <handa@m17n.org>
407 * input.c (preedit_delete): Fix typo.
408 (take_action_list): Print more debugging information. Allow
409 variable in arg of 'select' and `pushback'.
411 * database.c (gen_database_name): Don't put extra space.
412 (load_database): Print debugging information.
413 (register_databases_in_files): New arg headlen. Callers changed.
414 (mdatabase__load_for_keys): Shorten debugging information.
415 (mdatabase_load): Don't print debugging information here.
417 2006-10-27 Kenichi Handa <handa@m17n.org>
419 * input.c (marker_code): New arg surrounding. Callers changed.
420 (surrounding_pos): Check if name[0] == '@'.
421 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
422 (take_action_list): Likewise.
423 (get_preceding_char): If POS is zero, always call
424 get_surrounding_text.
426 2006-10-19 Kenichi Handa <handa@m17n.org>
428 * input.c (load_variables): Fix setting of `global'.
430 2006-10-16 Kenichi Handa <handa@m17n.org>
432 * draw.c (draw_background): Be sure to set *to_x.
433 (render_glyph_string): If from == to, just return.
435 2006-10-18 Kenichi Handa <handa@m17n.org>
437 * database.c (get_dir_info): Return NULL if the directory name is
439 (register_databases_in_files): Call register_database with
441 (mdatabase__update): Fix logic. Call register_database with
443 (mdatabase_define): Call register_database with
446 * input.c (delete_surrounding_text): Be sure to set members
447 preceding_text and following_text to NULL.
448 (shift_state): Save variable values in ic_info->vars_saved.
449 (preedit_commit): Don't print debug information here. Don't
450 change ic_info->keys here.
451 (get_candidate_list): Don't ref plist.
452 (take_action_list): Don't unref return value of
453 get_candidate_list. For undo, reset ic->produced and recover
454 ic_info->vars. Be sure to set ic->candidate_list to NULL after
456 (init_ic_info): Set ic_info->vars_saved.
457 (fini_ic_info): Unref ic_info->vars_saved.
458 (re_init_ic): Be sure to set ic->candidate_list to NULL after
460 (filter): Be sure to set members preceding_text and following_text
461 to NULL. Print debug information about produced text. Delete
462 processed keys from ic_info->keys.
464 * input.h (MInputContextInfo): New member vars_saved.
466 2006-10-16 Kenichi Handa <handa@m17n.org>
468 * database.c (mdatabase__update): Fix the way to get db_info.
470 2006-10-02 Kenichi Handa <handa@m17n.org>
472 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
473 `size' changed to 24.
475 * font.c (xlfd_unparse_name): Adjusted for the change of
477 (font_score): Likewise.
478 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
480 * m17n-X.c (MFontX, _MFontX): Deleted.
481 (SET_SIZE, HAVE_SIZE): Deleted.
482 (free_display_info): Adjusted for the change of
483 disp_info->font_list format.
484 (xfont_registry_list): Likewise.
485 (xfont_open): Likewise.
486 (xfont_list): Likewise.
487 (xfont_encode_char): Ignore size to find a realized font.
488 (MRealizedFontXft): Change the order of members to make it
489 compatible with MRealizedFontFT.
491 2006-09-27 Kenichi Handa <handa@m17n.org>
493 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
494 (mfont_close): Add comments.
496 * mtext-lbrk.c (mtext_line_break): Add comment.
498 2006-09-26 Kenichi Handa <handa@m17n.org>
500 * input.c (minput_get_description): Handle description about
501 inclusion-only input methods.
503 2006-09-21 Kenichi Handa <handa@m17n.org>
505 * input.c (M_gettext): New variable.
506 (fully_initialize): Initialize M_gettext.
507 (check_description): New function.
508 (load_commands): Call check_description.
509 (config_all_commands): Be sure to unref pl.
510 (load_variables): Call check_description.
511 (config_all_variables): Be sure to unref pl.
512 (load_im_info): Call check_description.
514 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
516 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
517 and bind_textdomain_codeset.
519 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
521 2006-09-15 Kenichi Handa <handa@m17n.org>
523 * input.c (reload_im_info): Update custom and global info.
524 (init_ic_info): Fix previous change.
526 2006-09-14 Kenichi Handa <handa@m17n.org>
528 * database.c: Include <libgen.h>.
529 (mdatabase__lock): Make a directory if necessary.
531 * input.c (resolve_command): Adjusted for the format change of
532 configured_cmds member.
533 (load_commands, load_variables): Fix for errornous data handling.
534 (config_command, config_variable): New function.
535 (config_all_commands, config_all_variables): Renamed from
536 config_commands and config_variables. Utilize the above function.
537 (check_variable_value): Argument changed. Callers changed.
538 (load_im_info): Call config_all_commands and config_all_variables.
539 (init_ic_info): Adjusted for the format change of configured_vars
541 (minput__init): Initialize Mcustomized, Mconfigured, and
543 (Mcustomized, Mconfigured, Minherited): New variables.
544 (minput_get_command): Be sure to return NULL if an input method
545 use no local command.
546 (minput_get_variable): Be sure to return NULL if an input method
547 use no local variable.
548 (minput_config_command, minput_config_variable)
549 (minput_save_config): Adjusted for the format change of
550 configured_cmds and configured_vars members.
552 * plist.c (write_element): Delete superfluous ':'.
554 2006-09-13 Kenichi Handa <handa@m17n.org>
556 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
557 (minput_config_file): Extern it.
559 * draw.c (Minherited): Declaration moved to input.c.
560 (mdraw__init): Don't initialize Minherited here.
562 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
564 2006-09-07 Kenichi Handa <handa@m17n.org>
566 * textprop.c (mtext_serialize): Call mplist__serialize with the
569 * plist.h (mplist__serialize): Prototype adjusted.
570 (mplist__assq): Extern it.
572 * plist.c: Include <ctype.h>
573 (PUTC, PUTS): New macros.
574 (write_symbol): New function.
575 (write_element): New arg indent.
576 (dump_string, dump_plist_element): Delete them.
577 (mplist__from_string): New arg pretty.
578 (mplist__assq): New function.
579 (mdebug_dump_plist): Use write_element.
581 * mtext.c (mtext_cat_char): Allocate more memory.
582 (mdebug_dump_mtext): Don't escal a newline character.
584 * m17n.h (minput_get_command, minput_get_variable)
585 (minput_config_command, minput_config_variable)
586 (minput_save_config): Extern them.
588 * m17n-core.c: Include <string.h>.
589 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
590 use the stream stdout instead of a file of that name.
592 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
595 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
596 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
597 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
598 (MDEBUG_DUMP): Flush the stream.
600 * input.h (struct _MInputMethodInfo): Delete member im. New
601 members mdb, language, name, extra, cmds, configured_cmds,
602 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
603 (MInputContextInfo): New member tick.
605 * input.c: Big change to improve user-side input method
606 customization. Here, list just public API changes.
607 (minput_get_commands, minput_get_variables)
608 (minput_assign_command_keys, minput_set_variable): Label them
610 (minput_get_command, minput_get_variable)
611 (minput_config_command, minput_config_variable)
612 (minput_save_config): New functions.
614 * database.h (PATH_MAX): Define it if not yet defined.
615 (PATH_SEPARATOR): Likewise.
616 (enum MDatabaseStatus): New enum.
617 (struct MDatabaseInfo): Moved from database.c. New members status,
618 time, lock_file, and uniq_file.
619 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
620 (mdatabase__unlock): Extern them.
622 * database.c: Include <time.h>.
623 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
624 (GEN_PATH): Args changed. Callers changed.
625 (struct MDatabaseInfo): Moved to database.h.
626 (struct MDatabase, mdb_list): Deleted.
627 (mdatabase__list): New var.
628 (get_database_filename): Deleted. Callers changed to use
630 (find_file, get_database_file): New files.
631 (get_dir_info): Initialize new members of MDatabaseInfo.
632 (find_database): Arg chagnded. Callers changed.
633 (free_db_info, register_database, register_databases_in_files):
635 (update_database_list): Deleted.
636 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
637 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
638 (mdatabase__update): New function.
639 (mdatabase__check): Return value changed.
640 (mdatabase__file, mdatabase__lock, mdatabase__save)
641 (mdatabase__unlock): New functions.
643 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
645 * input.c (get_surrounding_text): Return -2 when surrounding text
647 (get_following_char): Likewise.
648 (get_preceding_char): Likewise.
649 (minput__callback): Return 0 if there is a callback function,
652 2006-08-17 Kenichi Handa <handa@m17n.org>
654 * input.c (reset_ic): Use shift_state to setup the current state.
656 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
658 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
659 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
660 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
662 2006-08-02 Kenichi Handa <handa@m17n.org>
664 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
666 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
668 * font-ft.c (ft_encapsulate): Add code for debugging.
669 (mfont__ft_drive_otf): Be sure to encode character before getting
672 2006-07-21 Kenichi Handa <handa@m17n.org>
674 * draw.c (mdraw_text_extents): Fix previous typo.
676 2006-07-19 Kenichi Handa <handa@m17n.org>
678 * draw.c (gstring_width): New arg lbearing.
679 (render_glyph_string): Adjusted for the change of gstring_width.
680 (mdraw_text_extents): Fix lbearing of ink and line metrics.
682 * m17n-core.h (Mlanguage): Extern it.
684 * m17n.h (Mlanguage): Extern deleted.
686 * mtext.c (mtext__init): Initialize Mlanguage.
687 (Mlanguage): Declaration moved from locale.c
689 * locale.c (mlocale__init): Don't initialize Mlanguage here.
690 (Mlanguage): Declaration moved to mtext.c.
692 * language.c (mlang__init): Don't initialize Mlanguage here.
694 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
696 2006-07-14 Kenichi Handa <handa@m17n.org>
698 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
699 (MRealizedFontFT): New member face_encapsulated.
700 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
701 (ft_gen_font): New function.
702 (ft_add_font): Use ft_gen_font.
703 (ft_list_script): Store lists in ft_script_list.
704 (ft_check_otf): New arg ft_face. Caller changed.
705 (ft_check_language): Likewise.
706 (ft_check_script): Likewise.
707 (ft_encapsulate, ft_close): New functions.
708 (mfont__ft_driver): Initialize members encapsulate and close.
709 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
711 * font.h (struct MRealizedFont): New member encapsulating.
712 (struct MFontDriver): New members encapsulate and close.
714 * font.c (mfont__match_p): If FONT is realized, check capability
715 by font drivers's check_capability method.
716 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
719 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
720 declarations of foundry and fam local vars.
721 (xft_driver): Make it static.
723 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
724 (mfont_close): Extern them.
726 * m17n-gd.c (device_open): Don't specify foundry and family of the
729 2006-07-11 Kenichi Handa <handa@m17n.org>
731 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
733 2006-07-13 Kenichi Handa <handa@m17n.org>
735 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
737 (ft_check_script): Delete unused var.
738 (ft_list_capability): Likewise.
740 * font.c (mfont__get_capability): Setup cap->otf.
741 (Motf): Make it global.
742 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
744 * font.h (MFontCapability): New member otf.
746 * language.c (mlang__fini): Delete unused vars.
748 * m17n-gui.h (Motf): Extern it.
750 * database.c (update_database_list): Delete unused vars.
752 2006-07-07 Kenichi Handa <handa@m17n.org>
754 * font-ft.c (DEVICE_DELTA): Fix typo.
756 2006-07-06 Kenichi Handa <handa@m17n.org>
758 * fontset.c (mfont__lookup_fontset): Don't ignore family and
761 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
763 * database.c: Update comments.
765 2006-07-05 Kenichi Handa <handa@m17n.org>
767 * database.c (PATH_MAX): Define it if not yet defined.
768 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
770 (get_database_filename): Use GEN_PATH.
771 (get_dir_info): Don't include the last '/' in directory name.
772 (register_database): New function.
773 (update_database_list): Use register_database. Search all
774 directories in mdatabase__dir_list for wildcard databases.
775 (mdatabase__init): Check "~/.m17n.d".
777 2006-07-03 Kenichi Handa <handa@m17n.org>
779 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
780 push reverse property.
782 * plist.c (dump_plist_element): Fix previous change.
784 2006-06-28 Kenichi Handa <handa@m17n.org>
786 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
789 * draw.c (MbidiNSM): New variable.
790 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
791 attention to bidi type NSM.
792 (mdraw__init): Initialize MbibiNSM.
794 * language.c (mscript__char_list): Fix finding a char-list element.
796 * plist.c (dump_string): Return number of printed characters.
797 (dump_plist_element): Print elements more compactly.
799 2006-06-23 Kenichi Handa <handa@m17n.org>
801 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
802 (include_HEADERS): Likewise.
804 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
806 * language.c: Update documentation.
808 2006-06-23 Kenichi Handa <handa@m17n.org>
810 * font-ft.c (struct MFontFT): Delete member lang.
811 (free_ft_info): Don't unref member lang. Destroy members langset
813 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
814 changed. Set members langset and charset.
815 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
817 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
819 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
820 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
821 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
822 characters at first. If it fails, try listing by language names.
823 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
824 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
825 change of MFontCapability.
826 (ft_list_capability): Likewise. Try listing by languages, then by
827 scripts. Check OTF at last.
828 (ft_check_script): New function.
829 (ft_select): Adjusted for the check of MFontCapability.
830 (ft_list_family_names): New function.
831 (ft_check_capability): If cap->script is not Mnil, call
833 (mfont__ft_driver): Initialize with ft_list_family_names.
835 * font.h (struct MFontDriver): New member list_fmaily_names.
836 (struct): Change member "MSymbol *lang" to "MSymbol language".
838 * font.c: Include "language.h".
839 (Motf): New variable.
840 (otf_script_list, load_otf_script_list): Delete it.
841 (find_script_from_otf_tag): Delete it.
842 (merge_capability): New function.
843 (mfont__init): Init Motf.
844 (mfont__fini): Don't unref otf_script_list.
845 (free_font_capability): Check cap->script_tag to determine if
846 OTF-related capability is set.
847 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
848 the change of type MFontCapability.
849 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
851 (mfont_list): Call merge_capability for LANGUAGE arg.
852 (mfont_list_family_names): New function.
854 * input-gui.c: Typo in comments fixed.
856 * input.c: Typo in comments fixed.
858 * language.h (mlanguage__list): Delete it.
859 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
862 * language.c: Include "mtext.h".
863 (M_script_lang_list): Delete it.
864 (language_list, script_list): New variables.
865 (load_lang_script_list, init_language_list, init_script_list): New
867 (mlang__init): Don't load language database here.
868 (mlang__fini): Unref language_list and script_list if not NULL.
869 (mlanguage__list): Delete it.
870 (mlanguage__info, mscript__info, mscript__char_list)
871 (mscript__otf_tag, mscript__from_otf_tag): New functions.
872 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
873 (mscript_list, mscript_language_list): New functions.
875 * m17n-gui.h (mfont_list_family_names): Extern it.
877 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
878 (mlanguage_text, mscript_list, mscript_language_list): Extern
881 2006-06-21 Kenichi Handa <handa@m17n.org>
883 * m17n-X.c (xfont_driver): Initialize with
884 xfont_list_family_names.
885 (xfont_list_family_names): New function.
886 (xft_driver): Initialize with NULL for list_family_names member.
887 (device_init): Set list_family_names member of xft_driver to that
890 2006-06-06 Kenichi Handa <handa@m17n.org>
892 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
894 2006-03-24 Kenichi Handa <handa@m17n.org>
896 * font-ft.c (ft_open): Improve debug message.
898 * fontset.c (mfontset__get_font): Fix for the case that no font in
899 per_script list is available.
901 2006-02-06 Kenichi Handa <handa@m17n.org>
903 * Version 1.3.3 released.
905 2006-02-22 Kenichi Handa <handa@m17n.org>
907 * textprop.c: Fix some typos in documentation.
909 * plist.c: Fix some typos in documentation.
911 * m17n-core.h: Fix some typos in documentation.
912 (M17NLIB_PATCH_LEVEL): Updated to 3.
913 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
915 * symbol.c: Fix some typos in documentation.
917 * mtext.c: Fix some typos in documentation.
919 * input.c: Fix several typos in documentation.
921 2006-02-06 Kenichi Handa <handa@m17n.org>
923 * Version 1.3.2 released.
925 2006-02-03 Kenichi Handa <handa@m17n.org>
927 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
928 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
930 * font.c (xlfd_parse_name): Fix handling of the name "nil".
932 * draw.c (layout_glyphs): Fix handling left_padding of
935 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
937 2006-02-02 Kenichi Handa <handa@m17n.org>
939 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
942 2006-01-25 Kenichi Handa <handa@m17n.org>
944 * input.c (resolve_expression): If the value of PLIST is a plist,
945 but the first element is not symbol, return 0.
947 2006-01-17 Kenichi Handa <handa@m17n.org>
949 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
950 HAVE_GD is 2 or the greater.
952 2006-01-16 Kenichi Handa <handa@m17n.org>
954 * Version 1.3.1 released.
956 2006-01-16 Kenichi Handa <handa@m17n.org>
958 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
959 simulating anti-aliasing.
961 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
962 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
964 2006-01-12 Kenichi Handa <handa@m17n.org>
966 * input.c (get_surrounding_text): Always pop ic->plist.
967 (reset_ic): Don't reset ic->plist.
969 2006-01-10 Kenichi Handa <handa@m17n.org>
971 * input.c (preedit_commit): For debugging, print only commiting
972 charactes. Don't set ic->candidate_show to 0.
973 (handle_key): Don't run branch-actions just by shifting to the
975 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
976 Reset vars and plist.
978 2006-01-07 Kenichi Handa <handa@m17n.org>
980 * input.c (load_branch): Confirm that maps is not NULL.
982 2006-01-05 Kenichi Handa <handa@m17n.org>
984 * input-gui.c (win_filter): Try to convert arg to key only when
987 * plist.c (read_integer_element): If '#' and '-' are followed by
988 non-integer-constituent, read them as a part of a symbol.
989 (read_symbol_element): New arg C.
990 (read_element): Adjust args to read_symbol_element.
992 * input.c (load_macros): On overwriting a macro, free the old
994 (minput__init): Store Mmap in load_im_info_keys.
995 (minput_get_title_icon): If the input method has no title, be sure
997 (minput_get_description): If the input method has no description,
998 be sure to return NULL.
999 (minput_get_variables): Fix documentation.
1000 (handle_key): Pay attention to the case that key is Mnil.
1001 (filter): Likewise. Fix handling of such symbol as S-A.
1003 2005-12-22 Kenichi Handa <handa@m17n.org>
1005 * Version 1.3.0 released.
1007 2005-12-22 Kenichi Handa <handa@m17n.org>
1009 * font-ft.c (ft_list): If the specified font has no property,
1012 2005-12-20 Kenichi Handa <handa@m17n.org>
1014 * character.c (mchar_get_prop): Check char_prop_list.
1015 (mchar_put_prop, mchar_get_prop_table): Likewise.
1017 2005-12-18 Kenichi Handa <handa@m17n.org>
1019 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1020 file name sans language.
1022 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1024 * input.c: Fix typo in comments.
1026 2005-12-14 Kenichi Handa <handa@m17n.org>
1028 * input.c (minput_get_title_icon): Check the default icon for the
1031 2005-12-13 Kenichi Handa <handa@m17n.org>
1033 * input.c (Mless_equal, Mgreater_equal): New variables.
1034 (parse_expression, resolve_expression, parse_action_list)
1035 (take_action_list): Handle the aboves.
1036 (filter): Treat key S-X as X.
1037 (minput__init): Initialize Mless_equal and Mgreater_equal.
1038 (minput_get_title_icon): New function.
1040 * m17n.h (minput_get_title_icon): Extern it.
1042 * database.c (get_database_filename): Return a filename instead of
1044 (load_database): Adjusted for the above change.
1045 (mdatabase__load_for_keys): Likewise.
1046 (mdatabase__find_file): New function.
1048 * database.h (mdatabase__find_file): Extern it.
1050 * font.h (mfont__resize): Delete extern.
1052 * font.c (mfont__list): Check resize ratio.
1053 (mfont__resize): Delete it.
1054 (mfont_resize_ratio): Include the code of mfont__resize.
1056 * font-ft.c (ft_open): Check resize ratio.
1058 * m17n-X.c (xfont_open): Check resize ratio.
1059 (xft_open): Likewise.
1061 2005-12-07 Kenichi Handa <handa@m17n.org>
1063 * input.c (take_action_list): If take_action_list return -1,
1065 (handle_key): Likewise.
1067 * face.c (mface__for_chars): When font is specified and layouter
1068 is found for it, if the layouter doesn't support one of a
1069 character, use a face sans layouter for it.
1071 2005-12-06 Kenichi Handa <handa@m17n.org>
1073 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1074 found, don't use it for more than one character.
1076 2005-12-05 Kenichi Handa <handa@m17n.org>
1078 * face.c (mface__realize): Set rfont->layouter to Mnil.
1079 (mface__for_chars): Fix handling of layouter.
1081 * character.h (mchar__define_prop): Extern it.
1083 * database.c (update_database_list): Call mchar__define_prop if
1086 * character.c (mchar__init): Don't call mchar_define_property.
1087 Instead just initialize property keys.
1088 (mchar__fini): Free char_prop_list only if it's not NULL.
1089 (mchar__define_prop): New function.
1090 (mchar_define_property): Call mchar__define_prop.
1092 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1095 2005-12-02 Kenichi Handa <handa@m17n.org>
1097 * language.c (mlang__init): Handle extra chars.
1099 * m17n-gui.h (mfont_check): Adjust prototype.
1101 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1102 (xfont_check_capability): New function.
1103 (xft_driver): Specify xft_check_capability.
1104 (xft_check_capability): New function.
1106 * font-ft.c (M0_3): Delete it.
1108 (ft_get_charmaps): Refer to M0.
1109 (fc_parse_pattern): Fix previous change.
1110 (ft_list_language): Check also extra chars.
1111 (ft_check_otf): Define it even if HAVE_OTF is undef.
1112 (ft_check_lang): Check the result of FcLangSetHasLang against
1113 FcLangDifferentLang. Check also extra chars.
1114 (ft_list_capability): Delete ifdef HAVE_OTF.
1115 (ft_select): Likewise.
1116 (ft_open): Improve debug information.
1117 (ft_check_capability): New function.
1118 (mfont__ft_driver): Specify ft_check_capability.
1119 (mfont__ft_init): Initialize M0.
1121 * fontset.c (get_font_from_group): New function.
1122 (mfontset__get_font): New function.
1124 * fontset.h (mfontset__get_font): Extern it.
1126 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1127 (mfont__fini): Delete ifdef HAVE_OTF.
1128 (free_font_capability): Likewise.
1129 (mfont__get_capability): Likewise.
1130 (mfont__check_capability): New function.
1131 (mfont_check): Change the order of arguments. Use
1134 * font.h (struct MFontDriver): New member check_capability.
1135 (MFontCapability): Delete ifdef HAVE_OTF.
1136 (mfont__check_capability): Extern it.
1138 * face.c (mface__realize): Fix handling of FONT arg.
1139 (mface__for_chars): Fix handling of explicitly specified font.
1141 2005-11-25 Kenichi Handa <handa@m17n.org>
1143 * font-flt.c (run_command): Print debug info for
1146 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1148 * face.c (mface__for_chars): Check rfont before accessing the
1151 2005-11-21 Kenichi Handa <handa@m17n.org>
1153 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1156 * fontset.c (fontset_table): New variable.
1157 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1158 (mfont__fontset_init): Add fontset_table as an object array.
1159 (mfont__realize_fontset): Ref FONTSET.
1160 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1161 (mfontset): Call M17N_OBJECT_REGISTER.
1162 (mfontset_copy): Likewise.
1164 * input.c (handle_key): For debugging, print information about
1166 (filter): Add an alias for Meta and Alt modifiers.
1167 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1169 (minput__init): Initialize them.
1170 (parse_expression): New function.
1171 (resolve_expression): New function.
1172 (parse_action_list): Handle expressions by parse_expression.
1173 (take_action_list): Handle expressions by resolve_expression.
1174 (parse_nested_list_value): Fix previous change.
1175 (resolve_command): Fix handling of the return value of
1178 2005-11-18 Kenichi Handa <handa@m17n.org>
1180 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1181 HAVE_OTF is defined.
1182 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1184 (ft_select): Likewise.
1186 * font.c (mfont_list): Fix for the case that FONT is NULL.
1187 (OTF_tag): Delete it.
1188 (load_otf_script_list): Define only when HAVE_OTF is defined.
1189 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1192 * draw.c (truncate_gstring): Be sure to truncate at
1193 glapheme-cluster boundary.
1195 2005-11-11 Kenichi Handa <handa@m17n.org>
1197 * input.c (delete_surrounding_text): Clear cache if necessary.
1199 2005-11-09 Kenichi Handa <handa@m17n.org>
1201 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1202 glyph prev is also supported by the current flt.
1204 2005-11-08 Kenichi Handa <handa@m17n.org>
1206 * m17n-X.c (xft_render): Cancel previous change.
1208 2005-11-07 Kenichi Handa <handa@m17n.org>
1210 * input.c: Include <stdlib.h>.
1211 (get_surrounding_text, delete_surrounding_text)
1212 (get_preceding_char, get_following_char): New functions.
1213 (integer_value): New arg surrounding. If it is nonzero, try to
1214 get a surrounding character. Callers changed.
1215 (take_action_list): Check `value' before setting an element.
1216 (destroy_ic): Unref ic_info->preceding_text and
1217 ic_info->following_text.
1218 (minput__init): Initialize Minput_get_surrounding_text and
1219 Minput_delete_surrounding_text.
1220 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1222 (filter): Unref ic_info->preceding_text and
1223 ic_info->following_text.
1225 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1228 * input.h (MInputContextInfo): New members preceding_text and
1231 2005-11-04 Kenichi Handa <handa@m17n.org>
1233 * input.c (parse_nested_list_value): Fix handling of the global
1235 (get_nested_list): Get global definitions by load_partial_im_info.
1236 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1237 MInputCandidatesChanged.
1238 (take_action_list): Likewise.
1239 (reset_ic): Likewise.
1240 (create_ic): Don't pay special attention to
1241 Mcandidates_group_size.
1242 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1243 (minput_set_variable): Get a definition of varible by
1244 mplist_find_by_value, not mplist_get.
1246 * m17n.h (enum MInputCandidatesChanged): New enum.
1248 2005-11-01 Kenichi Handa <handa@m17n.org>
1250 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1252 (mwin__destroy_window): If xft_draw's drawable is win, change it
1253 to device->drawable before destroying win.
1255 2005-10-31 Kenichi Handa <handa@m17n.org>
1257 * input.c (load_im_info): Fix adding of state.
1259 * m17n-core.c (m17n_fini_core): Fix reporting of module
1262 * m17n.c (m17n_fini): Fix reporting of module finalization.
1264 * m17n-gui.c (m17n_init_win): Fix reporting of module
1267 2005-10-29 Kenichi Handa <handa@m17n.org>
1269 * input.c (get_candidate_list): Fix the timing of referring plist.
1271 2005-10-28 Kenichi Handa <handa@m17n.org>
1273 * input.c (load_branch): Ignore an undefined map name.
1274 (load_im_info): Set im_info->title from `name' only if it's not
1276 (shift_state): Always update ic->status.
1277 (adjust_candidates): Renamed from adjust_candidate_command.
1278 Argument changed. Caller changed.
1279 (get_candidate_list, regularize_action): New functions.
1280 (take_action_list): Use them. On handling Munhandle, don't set
1282 (handle_key): If KEY is not handled by MAP, and MAP has
1283 branch_actions, perform them.
1285 * database.c (mdatabase__fini): Free dir_info->filename;
1287 2005-10-20 Kenichi Handa <handa@m17n.org>
1289 * input.c (marker_code): Accept '@@'.
1290 (integer_value): Handle '@@'.
1291 (parse_action_list): Accept a symbol argument.
1292 (take_action_list): Resolve the symbol argument. Handle the
1295 2005-10-18 Kenichi Handa <handa@m17n.org>
1297 * input.c: Include "charset.h".
1298 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1300 (MIMState): New member (M17NObject control).
1301 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1302 (get_nested_list, resolve_variable): New functions.
1303 (integer_value): New arg (MPlist **value). Set it to the plist
1304 element containing the value.
1305 (resolve_command): New function.
1306 (load_translation): New arg (MPlist *map_actions).
1307 (load_branch): New args language and name. If `keylist' is a
1308 symbol, resolved that as a command name.
1309 (free_map): New arg top. Free map->map_actions only if top is
1311 (free_state): New function.
1312 (load_state): New arg name.
1313 (im_info_list): New variable.
1314 (free_im_info, get_im_info_by_tags): New functions.
1315 (load_im_info): Arg key changed to plist. Handle `include'.
1316 Return (MInputMethodInfo *).
1317 (preedit_commit): Ref ic->candidate_list.
1318 (get_select_charset, adjust_candidate_command): New functions.
1319 (take_action_list): Handle `include'. Adjust candidate action
1320 properly. Handle control variables `candidates-charset' and
1321 `candidates-group-size'.
1322 (open_im): Use get_im_info.
1323 (create_ic): Get global variables.
1324 (load_partial_im_info): New function.
1325 (get_im_info): New function.
1326 (check_command_keyseq, check_command_list, check_variable_list):
1328 (minput__init): Don't handle M_database_hook and Mdetail_text.
1329 Initialize M_candidates, Mcandidates_group_size,
1330 Mcandidates_charset.
1331 (parse_variable_list, get_variable_list, parse_command_list)
1332 (get_command_list): Delete them.
1333 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1334 (minput__fini): Simply unref command_list and variable_list.
1335 (minput_get_description): Adjusted for the new form of description.
1336 (minput_get_commands): Use get_nested_list.
1337 (minput_assign_command_keys): Likewise.
1338 (minput_get_variables, minput_set_variable): Likewise.
1340 * input.h (MInputMethodInfo): New members im and maps.
1342 * database.h (M_database_hook): Delete extern.
1343 (MDatabaseHookFunc): Delete extern.
1344 (mdatabase__check): Extern it.
1346 * database.c: Include <glob.h>.
1347 (MAX_TIME): New macro.
1348 (Masterisk): New variable.
1349 (get_database_stream): Argument changed to (MDatabaseInfo *).
1351 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1352 (find_database): New function.
1353 (update_database_list): New function.
1354 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1355 calling update_database_list.
1356 (mdatabase__check): New function.
1357 (mdatabase_find): Use update_database and find_database. Don't
1358 handle MDatabaseHookFunc.
1359 (mdatabase_list): Call update_database at first.
1360 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1361 (MDatabaseList): New type.
1363 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1365 * m17n.h (Mdetail_text): Delete extern.
1367 * m17n-core.h (mplist_conc): Delete extern.
1369 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1371 (mplist_conc): Renamed to mplist__conc.
1372 (mplist__pop_unref): New function.
1374 2005-10-14 Kenichi Handa <handa@m17n.org>
1376 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1378 (read_element): If keys is an empty plist, return any element
1380 (dump_plist_element): Check if plist is nested.
1381 (mplist_conc): Always ref tail.
1382 (mplist_set): If key is a managing key, ref val in advance.
1384 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1385 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1386 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1389 * fontset.c (free_fontset): Unref fontset_list if necessary.
1390 (mfont__fontset_fini): Don't free fontset_list. Unref
1392 (mfont__realize_fontset): Initialize request.
1393 (mfontset): Ref default_fontset or fontset only if necessary.
1394 (mfontset_copy): Don't ref copy.
1396 * draw.c (render_glyphs): Check gend->type before checking
1399 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1400 unrefed plists to NULL.
1402 2005-10-04 Kenichi Handa <handa@m17n.org>
1404 * textprop.c (mtext_serialize): Be sure to make mt
1405 MTEXT_FORMAT_UTF_8 and NULL terminated.
1407 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1409 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1411 2005-10-03 Kenichi Handa <handa@m17n.org>
1413 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1414 is not at the beginning of line.
1416 2005-09-22 Kenichi Handa <handa@m17n.org>
1418 * input.c: Include <sys/stat.h> and <unistd.h>.
1419 (Minclude, Mcommit, Munhandle): New variables.
1420 (minput__init): Initialize them. Push only Mstate to
1421 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1422 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1424 (load_input_method): Handle "include" directive. If no states are
1426 (shift_state): If state_name is Mt, shift back to the previous
1427 state. Call preedit_commit to commit preedit text.
1428 (preedit_commit): New function.
1429 (take_action_list): Improve debug printing. Handle commit and
1431 (handle_key): Check the return value of take_action_list. Don't
1432 take branch_actions just after changing to the root map.
1433 (reset_ic): Reset all ic_info members.
1434 (filter): When a key is not handled, just move ic_info->keys
1435 instead fo calling reset_ic.
1436 (load_im_info): If key is not Mstate, push Mmap to
1438 (MDatabaseStatList): New type.
1439 (imdir_stat_list): New variable.
1440 (input_method_hook): Don't cancel the hook. Check the
1441 modification time of directories.
1442 (minput__fini): Free imdir_stat_list;
1444 * input.h (MInputContextInfo): New member prev_state.
1446 * m17n-core.h (mplist_conc): Extern it.
1448 * plist.c (mplist_conc): New function.
1450 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1452 * font.h (MRealizedFont): New member average_width.
1454 * font-ft.c (ft_open): Set rface->average_width.
1456 * font.c (xlfd_unparse_name): Print '*' before registry name.
1458 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1459 (xfont_open): Set rfont->average_width.
1460 (xft_open): Likewise.
1461 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1463 * internal-gui.h (struct MFrame): New member average_width.
1465 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1466 (mframe_get_prop): Return the average_width of a font.
1468 * face.c (mface__realize): Set rface->average_width.
1469 (mface__update_frame_face): Set frame->average_width.
1471 * face.h (MRealizedFace): New member average_width.
1473 2005-09-19 Kenichi Handa <handa@m17n.org>
1475 * font.c (xlfd_unparse_name): New arg full_xlfd.
1476 (mfont__encode_char): Use shortcut only for X core fonts.
1477 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1478 (mfont_put_prop): Handle `language' property.
1479 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1480 Print file can capability info too.
1482 * m17n-core.c (mdebug__output): New variable.
1483 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1484 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1485 (m17n_fini_core): Close mdebug__output if it's not stderr.
1487 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1488 (xfont_open): Handle baseline_offset.
1489 (xfont_find_metric): Likewise.
1490 (xfont_render): Likewise.
1491 (xft_open): Likewise.
1492 (xft_render): Likewise.
1494 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1495 (mdebug__output): Extern it.
1496 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1497 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1498 (MDEBUG_DUMP): New macro.
1499 (MDEBUG_PRINT_TIME): Print to medebug__output.
1501 * font.h (MRealizedFont): New member baseline_offset.
1503 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1505 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1506 (ft_list_family): Check alias.
1507 (ft_list_language): If language is "en", don't try to the second
1509 (ft_default_list): New variable.
1510 (ft_list_default): New function.
1511 (ft_select): If family is not specified, try only the default
1512 fonts. Treat the weights normal and medium same.
1513 (ft_open): Fix debug message. If registry is not specified, try
1514 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1515 (ft_find_metric): Likewise.
1516 (ft_render): Likewise.
1517 (ft_list): Fix debug message. Accept the registring iso8859-1.
1518 If family is not specified, try only the default fonts.
1520 * face.c (mface__realize): Fix logic of opening a font.
1522 2005-09-16 Kenichi Handa <handa@m17n.org>
1524 * face.c (mface__realize):
1526 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1529 * input.c (shift_state): Fix the condition of taking init actions.
1530 (take_action_list): Fix handling of pushback action.
1531 (handle_key): Don't change key while checking its alias.
1532 (minput__init): Initialize new variables.
1533 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1536 2005-09-12 Kenichi Handa <handa@m17n.org>
1538 * mtext.c (mtext__uppercase): Add proper open/close parens.
1539 (mtext_titlecase): Add proper casting.
1541 * input.c (parse_action_list): Handle the case that the arg is a
1542 key sequence (MText or MPlist).
1543 (take_action_list): Likewise.
1544 (shift_state): Shorter debug message.
1545 (handle_key): Terminate a debug message by "\n".
1546 (reset_ic): Don't take initial actions here.
1547 (minput_open_im): Print a debug message.
1548 (minput_close_im): Likewise.
1549 (minput_create_ic): Likewise.
1550 (minput_destroy_ic): Likewise.
1552 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1554 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1557 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1558 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1561 * character.c: Add Japanese documentation for
1562 mchar_get_prop_table ().
1564 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1566 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1567 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1568 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1570 (init_case_conversion): New function.
1571 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1572 (uppercase_precheck, lowercase_precheck, final_sigma)
1573 (after_soft_dotted, more_above, before_dot, after_i)
1574 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1576 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1578 * plist.c (read_mtext_element): Fix previous change.
1580 2005-09-05 Kenichi Handa <handa@m17n.org>
1582 * plist.c (read_mtext_element): Handle \uXXXX notation.
1584 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1585 (MTABLE_ALLOCA): Change the name of local variable.
1587 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1588 HAVE_FREETYPE are defined.
1590 * m17n-X.c: Check HAVE_X11.
1592 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1593 directory listing libraries.
1594 (noinst_PROGRAMS): Define it only in maintainer mode.
1596 2005-09-02 Kenichi Handa <handa@m17n.org>
1598 * m17n-gui.h (mdraw_line_break_option): Extern it.
1600 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1601 end of the first glyph.
1602 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1604 (mdraw_line_break_option): New variable.
1605 (mdraw_default_line_break): Use mtext_line_break.
1607 * mtext.h (wordseg_func_table): Don't extern it.
1608 (mtext__wseg_fini): Extern it.
1610 * mtext.c: Don't include word-thai.h.
1611 (wordseg_func_table): Delete this variable.
1612 (mtext__init): Don't initialize above. Don't call
1613 mtext__word_thai_init.
1614 (mtext__fini): Don't free wordseg_func_table. Call
1615 mtext__wseg_fini instead fo mtext__word_thai_fini.
1616 (MTextWordsegFunc): Don't typedef it.
1617 (mtext__word_segment): Moved to mtext-wseg.c.
1619 * m17n-core.h (enum MTextLineBreakOption): New enum.
1620 (mtext_line_break): Extern it.
1622 * mtext-wseg.c: New file.
1624 * mtext-lbrk.c: New file.
1626 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1627 add mtext-lbrk.c and mtext-wseg.c.
1629 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1630 the case that head is NULL.
1632 2005-09-01 Kenichi Handa <handa@m17n.org>
1634 * word-thai.c (wordseg_propertize): If the property value is nil,
1635 don't make the property no-merge.
1636 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1637 attention to the case that they are NULL.
1638 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1641 * character.c (mchar_get_prop_table): New function.
1643 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1645 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1646 (mchar_get_prop_table): Extern it.
1648 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1649 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1651 * internal.h (enum MTextCoverage): New enum.
1652 (MText): New member coverage.
1654 * mtext.c (FORMAT_COVERAGE): New macro.
1655 (insert): Copy mt2->coverage.
1656 (mtext__from_data): Initialize mt->coverage.
1657 (mtext__adjust_format): Update mt->coverage.
1658 (mtext): Initialize mt->coverage.
1659 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1660 Update mt->coverage if necessary.
1661 (mtext_duplicate): Copy mt->coverage.
1662 (mtext_insert, mtext_replace): New functions.
1663 (mtext_dup): Use mtext_duplicate.
1664 (mtext__word_segment): Don't set *from and *to if a word
1665 segmentation funcion is not found.
1666 (mtext_ins_char): Fix typo.
1668 2005-08-25 Kenichi Handa <handa@m17n.org>
1670 * font.h (MFont): New member for_full_width.
1672 * font.c (compare_font_score): Prefer a font of not
1675 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1676 registry charset of a font is one of CJK charsets.
1678 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1679 supports some of CJK.
1681 2005-08-24 Kenichi Handa <handa@m17n.org>
1683 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1685 * m17n-gui.c (null_device_open): Check Mresolution param and set
1688 * m17n-gd.c (device_open): Check Mresolution param and set
1691 * m17n-X.c (MWDevice): New member resy.
1692 (xfont_open): Set ascent, descent, and max_advance members of
1694 (xft_open): Likewise.
1695 (device_open): Compare also screen_num to find a device. Set
1696 device->resy and frame->dpi.
1698 * internal-gui.h (MFrame): New member dpi.
1700 * font.h (MRealizedFont): New member max_advance.
1702 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1703 (mfont__init): Don't initialize Mascent, Mdescent.
1704 (Mascent, Mdescent): Delete these variables.
1705 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1706 Mfont_descent instead of Mascent and Mdescent.
1707 (mfont_put_prop): Allow negative size.
1708 (mfont_find): Handle the case of spec->size < 0. Fix previous
1710 (mfont_list): Handle the case of spec->size < 0.
1711 (mfont_check): Likewise.
1713 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1714 (fc_get_pattern): Handle the case of font->size < 0.
1715 (ft_open): Set ascent, descent, and max_advance members of rfont.
1716 (ft_find_metric): Improve rounding.
1717 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1720 * face.c (mface__realize): Handle the case of font->size < 0.
1722 2005-08-22 Kenichi Handa <handa@m17n.org>
1724 * coding.c (MConverterStatus): Change the member buf to union.
1725 (mconv_buffer_converter): Add const to the arg buf.
1726 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1727 (mconv_decode): Adjusted for the change of MConverterStatus.
1728 (mconv_encode_range): Likewise.
1730 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1731 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1733 2005-08-20 Kenichi Handa <handa@m17n.org>
1735 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1736 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1738 * m17n-X.c (xfont_open): Set members ascent, descent, and
1739 max_advance of rfont.
1740 (xft_open): Likewise.
1742 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1744 (mfont__ft_parse_name): Add const to the arg name.
1746 * font.c (xlfd_parse_name): Add const to the arg name. Call
1747 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1748 (xlfd_unparse_name): Handle spacing.
1749 (mfont__init): Initialize new variables.
1750 (mfont__id): Handle spacing.
1751 (mfont__merge): Likewise.
1752 (mfont__set_spec): This function deleted.
1753 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1754 condition of calling mfont__ft_parse_name.
1755 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1756 (mfont_get_prop): Handle properties spacing, ascent, descent,
1758 (mfont_find): Return a realized font.
1759 (mfont_from_name): Add const to the arg name.
1761 * font.h (enum MFontProperty): New member MFONT_SPACING.
1762 (enum MFontSpacing): New enum.
1763 (MFont): New members spacing and max_advance.
1764 (mfont__ft_parse_name): Prototype adjusted.
1765 (mfont__set_spec): Extern deleted.
1766 (mfont__parse_name_into_font): Prototype adjusted.
1768 2005-08-19 Kenichi Handa <handa@m17n.org>
1770 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1772 * font.c (mfont_list): If FONT is null, use a temporary font.
1773 (mfont_parse_name): Add const to the arg name.
1775 2005-08-18 Kenichi Handa <handa@m17n.org>
1777 * word-thai.c: Surround code by #ifdef and #endif to escape from
1780 * font-ft.c: Mostly re-written.
1782 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1783 (FontLayoutCmd): Type of the member otf changed..
1784 (load_otf_command): Adjusted for the format change of otf command.
1785 (load_command): Likewise.
1786 (free_flt_command): Unref cmd->body.otf.
1787 (run_otf): Ajusted for the type change of otf_cmd.
1788 (run_command): Ajusted for the type change of otf_cmd. On
1789 debugging, print ctx->combining_code.
1790 (mfont__flt_run): Initialize ctx's members code_offset,
1791 combining_code, and left_padding to 0.
1793 * face.h (struct MRealizedFace): New member font.
1794 (mface__realize): Prototype adjusted.
1796 * face.c (find_realized_face): New arg font.
1797 (find_realized_face): Adjusted for the change of MFont.
1798 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1799 (mface__fini): Don't call mdebug__report_object.
1800 (mface__realize): New arg font.
1801 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1802 Optimize the latin case.
1803 (mface__free_realized): Free rface->font.
1804 (mface__update_frame_face): Adjusted for the change of mface__realize.
1805 (mface_equal): New function.
1807 * draw.c (Mcommon): New variable.
1808 (visual_order): Args to mfont__encode_char changed.
1809 (compose_glyph_string): Handle Mfont text property.
1810 (layout_glyphs): Adjusted for the change of MFont.
1811 (mdraw__init): Initialize Mcommon.
1812 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1814 * font.h (enum MFontType): Members completely changed.
1815 (enum MFontProperty): Move MFONT_SIZE to the tail.
1816 (enum MFontSource): New enum.
1817 (struct MFont): New members type, source, sizes, file, capability,
1819 (struct MRealizedFont): Type of member font changed. Members
1820 score, status, and encoding deleted.
1821 (MFontScore): New type.
1822 (MFontList): Member changed.
1823 (struct MFontDriver): New member has_char. Types of members
1825 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1826 (Mapple_roman): Extern them.
1827 (OTF_Tag): Typedefed if not HAVE_OTF.
1828 (enum MFontOpenTypeTable): New enum.
1829 (MFontCapability): New type.
1830 (mfont__ft_drive_otf): Prototype adjusted.
1831 (mfont__score): Extern deleted.
1832 (mfont__merge): Extern it.
1833 (mfont__has_char): Extern it.
1834 (mfont__encode_char): Prototype adjusted.
1835 (mfont__open): Extern it.
1836 (mfont__set_spec): Prototype adjusted.
1837 (mfont__get_capability): Extern it.
1839 * font.c: Include "fontset.h".
1840 (M_font_capability, M_font_list, M_font_list_len): New variables.
1841 (font_score_priority): Change order of initial elements.
1842 (font_score_shift_bits): Fix array size.
1843 (common_weight): Add "thin", "semibold", and "heavy".
1844 (common_stretch): Add "ultracondensed", "extracondensed",
1845 "extraexpanded", and "utltraexpand".
1846 (font_weight_regular, font_weight_normal, font_weight_medium): New
1848 (gen_font_name): This function deleted.
1849 (find_encoding): Set font->encoding.
1850 (OTF_tag): New function.
1851 (otf_script_list): New variable.
1852 (load_otf_script_list): New function.
1853 (find_script_from_otf_tag): New function.
1854 (xlfd_parse_name): Set font->type and font->source.
1855 (mfont__free_realized): Free chains rfonts.
1856 (font_score): Renamed from mfont__score.
1857 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1858 (Mapple_roman): New variables.
1859 (mfont__init): Initilize new variables. Initalize
1860 default_encoding.encoding_name and
1861 default_encoding.encoding_charset to Municode_full and
1862 mcharset__unicode. Use SAFE* macros for allocating filepath
1864 (mfont__fini): Free otf_script_list.
1865 (mfont__id): New function.
1866 (mfont__match_p): Check also capability member of MFont.
1867 (mfont__merge): New funciton.
1868 (mfont__set_spec_from_face): Set type and source members.
1869 (mfont__set_spec_from_plist): Set capability and type members.
1870 (mfont__select): Argument changed.
1871 (mfont__available): New function.
1872 (compare_font_score): New function.
1873 (mfont__list): New function.
1874 (mfont__open): Return a realized font.
1875 (mfont__resize): Adjusted for the change of MFont.
1876 (mfont__has_char): New function.
1877 (mfont__encode_char): Argument changed.
1878 (mfont__set_spec): Argument changed.
1879 (free_font_capability): New function.
1880 (mfont__get_capability): New function.
1881 (MFontfile): New variable.
1882 (mfont_get_prop): Adjusted for the change of MFont.
1883 (mfont_put_prop): Likewise.
1884 (mfont_set_selection_priority): Fix the way of setting
1885 font_score_priority[].
1886 (mfont_find): Use mfont__list instead of mfont__select.
1887 (mfont_resize_ratio): Adjusted for the change of MFont.
1888 (mfont_list): Use mfont__list.
1889 (mfont_check): New function.
1890 (font_score): Make it static.
1892 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1893 (mfont__lookup_fontset): Likewise.
1895 * fontset.c (struct MFontset): Delete member font_spec_list.
1896 (struct MRealizedFontset): Type of member spec changed. New
1898 (load_font_group): Arg spec_list deleted.
1899 (load_fontset_contents): Adjusted for the change of fontset_def.
1900 (free_fontset): Fix the way of freeing fontset elements.
1901 (realize_fontset_elements): Argument changed.
1902 (get_per_script): New function.
1903 (free_realized_fontset_elements): Fix the way of feeing rfontset
1905 (update_fontset_elements): Fix args to realize_fontset_elements.
1906 (mfont__realize_fontset): New arg spec.
1907 (try_font_list): New function.
1908 (try_font_group): New arg request. Use try_font_list.
1909 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1911 (mfontset): Adjusted for the change of MFontset.
1912 (mfontset_copy): Likewise. Don't share plists.
1913 (mfontset_modify_entry): Adjusted for the change of MFontset.
1914 (mfontset_lookup): Call get_per_script.
1915 (mdebug_dump_fontset): Print also the address of fonts.
1917 * input.c (shift_state): Don't reset ic_info->vars.
1918 (take_action_list): Call MDEBUG_PRINT fore calling
1921 * internal-gui.h (MFontDriver): Don't typedef it here.
1923 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1924 (MXFont): This type deleted.
1926 (struct _MFontX): New struct.
1927 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1928 (MDisplayInfo): Member base_font_list deleted.
1929 (DEFAULT_FONT): Definition changed.
1930 (FALLBACK_FONT): This maclr deleted.
1931 (free_display_info): Adjusted for the change of MDisplayInfo.
1932 (free_device): Argument to mfont__free_realized changed.
1933 (xfont_driver): Adjusted for the change of MFontDriver.
1934 (xfont_registry_list): Use MFontX instead of MXFont.
1935 (MRealizedFontX): Renamed from MXFontInfo.
1936 (xfont_select): Return the font found first.
1937 (close_xfont): Change MXFontInfo to MRealizedFontX.
1938 (xfont_open): Return the realized font.
1939 (xfont_find_metric): Get xfont from rfont->fontp.
1940 (xfont_has_char): New function.
1941 (xfont_encode_char): Adjusted for the argument change.
1942 (xfont_render): Get xfont from rfont->fontp.
1943 (xfont_list): Adjusted for the argument change.
1944 (MRealizedFontXft): Renamed from MXftFontInfo.
1945 (xft_driver): Ajusted for the change of MFontDriver.
1946 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1947 (xft_open_font): Argument changed.
1948 (xft_open): Argument changed. Return the realized font.
1949 (xft_find_metric): Get xft_font from rfont->fontp.
1950 (xft_has_char, xft_encode_char): New functions.
1951 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1952 font if not yet opened.
1953 (device_open): Don't set frame->font.
1955 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1957 (gd_font_open): New function.
1958 (gd_render): Don't use the local variable ft_info.
1959 (device_init): Adjusted for the change of gd_font_driver.
1961 * textprop.c (mtext__prop_init): Initialize text_property_table.
1962 Call M17N_OBJECT_ADD_ARRAY.
1963 (mtext__prop_fini): Don't call mdebug__report_object.
1965 * plist.c (mplist__init): Initialize plist_table.
1966 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1967 (mplist__fini): Don't call mdebug__report_object.
1969 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1970 (mtext__fini): Don't call mdebug__report_object.
1971 (MTEXT_FORMAT_UTF_16): Correct type.
1972 (mtext_data): New function.
1973 (mtext_text): Fix calculation of limit and args to
1976 * language.c: Include "plist.h".
1977 (M_script_lang_list): New variable.
1978 (mlang__init): Read languages and their information from m17n
1980 (mlanguage__list): New function.
1981 (Miso639_1, Miso639_2): New variables.
1983 * language.h (mlanguage__list): Extern it.
1985 * database.c (get_database_stream): Use SAFE_* macros for
1986 allocating and freeing path.
1987 (mdatabase__init): Likewise.
1989 * symbol.c (msymbol__fini): Don't free symbols here.
1990 (msymbol__free_table): New function.
1991 (msymbol_is_managing_key): New function.
1993 * symbol.h (msymbol__free_table): Extern it.
1994 (msymbol__list): Extern it.
1996 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1998 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1999 (struct _M17NObjectArray): New member name and next.
2000 (mdebug__add_object_array): Extern it.
2001 (M17N_OBJECT_ADD_ARRAY): New macro.
2002 (mdebug__report_object): Don't extern it.
2004 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2006 * m17n-gui.c (free_frame): Don't free frame->font.
2007 (null_device_fini): Fix code for freeing
2008 null_device.realized_font_list.
2009 (m17n_fini_win): Free interface.
2010 (mframe): Cast the return value of dlsym. Set frame->font here.
2011 (mframe_get_prop): Check frame->rface->rfont before accessing the
2014 * m17n-gui.h (Mfontfile): Extern it.
2015 (mfont_check): Extern it.
2016 (mface_equal): Extern it.
2018 * m17n-core.c: Include "symbol.h".
2019 (report_header_printed): This variable deleted.
2020 (object_array_root): New variable.
2021 (report_object_array): New function.
2022 (mdebug__report_object): This function deleted.
2023 (mdebug__add_object_array): New function.
2024 (m17n_init_core): Call mchartable_init () before mtext_init ().
2025 (m17n_fini_core): Call report_object_array (if necessary) and
2026 msymbol__free_atable at the end.
2028 * m17n-core.h (msymbol_is_managing_key): Extern it.
2029 (mtext_data): Extern it.
2030 (MTEXT_FORMAT_UTF_16): Correct type.
2031 (M17NLIB_MINOR_VERSION): Changed to 3.
2032 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2034 * chartab.c (mchartable__init): Initalize chartable_table.count.
2035 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2036 mdebug__report_object.
2038 2005-05-26 Kenichi Handa <handa@m17n.org>
2040 * m17n.h (Miso639_1, Miso639_2): Extern them.
2042 * symbol.h (msymbol__list): Extern it.
2044 * symbol.c (msymbol__list): New function.
2046 2005-05-19 Kenichi Handa <handa@m17n.org>
2048 * input-gui.c (minput__win_init): Don't change the value of
2051 2005-05-16 Kenichi Handa <handa@m17n.org>
2053 * m17n-core.c (m17n_object): Be sure to initialize all members.
2055 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2057 2005-05-09 Kenichi Handa <handa@m17n.org>
2059 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2061 2005-04-27 Kenichi Handa <handa@m17n.org>
2063 * language.c (mlang__init): Add "an" (Aragonese).
2065 * word-thai.c: Add support for libthai.
2066 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2067 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2069 * mtext.c: Include "word-thai.h" conditionaly.
2070 (mtext__init): Call mtext__word_thai_init conditionaly.
2071 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2073 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2074 not WORDCUT_LD_FLAGS.
2076 2005-04-19 Kenichi Handa <handa@m17n.org>
2078 * word-thai.c (wordseg_propertize): Always unref the attached
2080 (thai_wordseg): Don't unref the property.
2082 2005-04-18 Kenichi Handa <handa@m17n.org>
2084 * word-thai.c: Include stdlib.h.
2085 (wordseg_propertize): Add dummy function for the case that wordcut
2086 library doesn't exist.
2087 (wordseg_propertize): Fix for old wordcut library.
2089 2005-04-16 Kenichi Handa <handa@m17n.org>
2091 * word-thai.c: Include <stdio.h>.
2093 2005-04-15 Kenichi Handa <handa@m17n.org>
2095 * draw.c: Include mtext.h.
2096 (linebreak_table, M_break_at_space, M_break_at_word)
2097 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2098 (compose_glyph_string): Check POS before getting Mface text
2100 (truncate_gstring): Give correct TO arg to line_break function.
2101 (GET_LB_TYPE): New macro.
2102 (find_break_backward, find_break_forward): New functions.
2103 (mdraw__init): Initialize the above new variables.
2104 (mdraw__fini): Free linebreak_table.
2105 (mdraw_default_line_break): Use find_break_backward and
2108 * word-thai.c: New file.
2110 * word-thai.h: New file.
2112 * mtext.c: Include word-thai.h.
2113 (wordseg_func_table): New variable.
2114 (mtext__init): Initialize wordseg_func_table and call
2115 mtext__word_thai_init.
2116 (mtext__fini): Call mtext__word_thai_fini, free
2118 (MTextWordsegFunc): New type.
2119 (mtext__word_segment): New function.
2121 * mtext.h (wordseg_func_table): Extern it.
2122 (mtext__word_segment): Extern it.
2124 * m17n.c (m17n_init): Fix typo (== -> =).
2126 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2127 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2129 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2130 (MTEXTPROP_VAL): New macros.
2132 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2134 2005-04-07 Kenichi Handa <handa@m17n.org>
2136 * database.c (load_chartable): Fix pursing of symbol name.
2138 2005-03-24 Kenichi Handa <handa@m17n.org>
2140 * m17n.c (m17n_init): Fix typo (== -> =).
2142 2005-03-11 Kenichi Handa <handa@m17n.org>
2144 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2146 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2148 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2151 2005-03-09 handa <handa@m17n.org>
2153 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2154 calling m17n_init ().
2156 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2157 calling m17n_init_core ().
2159 2005-02-28 Kenichi Handa <handa@m17n.org>
2161 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2164 2005-02-17 Kenichi Handa <handa@m17n.org>
2166 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2167 (M_description, M_command, M_variable): New variables.
2168 (load_im_info_keys): New variables.
2169 (load_im_info, check_command_keyseq, get_description_advance)
2170 (parse_command_list, get_command_list, parse_variable_list)
2171 (get_variable_list, input_method_hook): New functions.
2172 (command_list, variable_list): New variables.
2173 (minput__init): Put input_method_hook to Minput_method.
2174 Initialize M_description, M_command, M_variable, Mdetail_text,
2175 load_im_info_keys, command_list, variable_list.
2176 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2177 (Mdetail_text): New variable.
2178 (minput_get_description, minput_get_commands)
2179 (minput_assign_command_keys, minput_get_variables)
2180 (minput_set_variable): New functions.
2182 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2183 (minput_assign_command_keys, minput_get_variables)
2184 (minput_set_variable): Extern them.
2186 * plist.c (UNGETC): Just decrement st->p.
2187 (read_mtext_element): New arg skip.
2188 (read_integer_element): Likewise.
2189 (read_symbol_element): Likewise.
2190 (read_element): New arg KEYS.
2191 (mplist__from_plist): Don't increment ref-count of NULL object.
2192 (mplist__from_file): New arg KEYS.
2193 (mplist_put): Don't increment ref-count of NULL object.
2194 (mplist_add): Likewise.
2195 (mplist_push): Likewise.
2196 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2198 * plist.h (mplist__from_file): Prototype adjusted.
2200 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2201 (get_database_stream): New function.
2202 (load_database): Use get_database_stream.
2203 (M_database_hook): New variable
2204 (mdatabase__init): Initialize M_database_hook.
2205 (mdatabase__load_for_keys): New function.
2206 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2208 (mdatabase_define): Free mdb->extra_info if necessary.
2210 * database.h (mdatabase__dir_list, M_database_hook)
2211 (mdatabase__load_for_keys): Extern them.
2212 (MDatabaseHookFunc): New type.
2214 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2216 2004-12-27 Kenichi Handa <handa@m17n.org>
2218 * Version 1.2.0 released.
2220 2004-12-27 Kenichi Handa <handa@m17n.org>
2222 * input.c (minput_filter): Don't reset ic->xxx_changed.
2224 * mtext.c (mtext_from_data): Fix documentation.
2226 2004-12-25 Kenichi Handa <handa@m17n.org>
2228 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2229 (M17NLIB_VERSION_NAME): Update to "1.2.".
2231 2004-12-24 Kenichi Handa <handa@m17n.org>
2233 * input.c (reset_ic): Set key_unhandled to 0.
2235 2004-12-21 Kenichi Handa <handa@m17n.org>
2237 * m17n-gui.h (mfont_from_spec): Delete extern.
2239 * input-gui.c (win_callback): Handle Minput_reset.
2240 (minput__win_init): Register reset_ic as a callback for
2243 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2244 changed. At first, shift to the initial state.
2245 (minput__init): Initialize Minput_reset. Register reset_ic as a
2246 callback for Minput_reset.
2247 (Minput_reset): New variable.
2248 (minput_filter): Always set ic->xxx_changed to 0.
2249 (minput_reset_ic): New function.
2250 (integer_value): Fix typo ('>' -> '<') and calculation of length
2253 * m17n-core.c (merror_code): Change type to `int'.
2255 * m17n-misc.h (merror_code): Adjust type.
2257 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2259 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2260 (mtext_change_prop): Delete extern.
2262 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2263 to `int'. Move the documents to m17n-core.h.
2265 2004-12-13 Kenichi Handa <handa@m17n.org>
2267 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2268 (MTextProperty): Document it.
2270 2004-12-09 Kenichi Handa <handa@m17n.org>
2272 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2274 2004-12-03 Kenichi Handa <handa@m17n.org>
2276 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2277 m17n__gui_initialized): New externs.
2279 * m17n-core.h (enum M17NStatus): New enum.
2280 (m17n_status): Extern it.
2282 * m17n-core.c (core_initialized): Delete this variable.
2283 (m17n__core_initialized, m17n__shell_initialized,
2284 m17n__gui_initialized): New variables.
2285 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2286 instead of core_initialized.
2287 (m17n_status): New function.
2289 * m17n.c (shell_initialized): Delete this variable.
2290 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2293 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2295 * m17n-gui.c (win_initialized): Delete this variable.
2296 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2297 instead of gui_initialized.
2299 2004-11-19 Kenichi Handa <handa@m17n.org>
2301 * input.c (reset_ic): Check if ic_info->state is NULL.
2302 (filter): If ic_info->state is NULL, return 0.
2303 (load_input_method): Don't unref `maps' it it's not created.
2305 2004-11-15 Kenichi Handa <handa@m17n.org>
2307 * input.c (find_candidates_group): If INDEX is -1, find the last
2309 (take_action_list): If the previous of the first candidate is
2310 requested, select the last candidate.
2312 2004-11-08 Kenichi Handa <handa@m17n.org>
2314 * m17n-X.c (device_open): Try at most 32 fonts to find a
2315 non-autoscaled font.
2317 * font.c (xlfd_parse_name): Fix previous change.
2319 2004-11-05 Kenichi Handa <handa@m17n.org>
2321 * font.c: (commont_style): Include dummy elements "slanted" and
2322 "rslanted" to prefer "o" to "r" if "i" is requested.
2324 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2326 2004-10-29 Kenichi Handa <handa@m17n.org>
2328 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2330 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2331 New members smallest and larger.
2332 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2333 (xfont_registry_list): Likewise.
2334 (xfont_select): Likewise.
2337 2004-10-28 Kenichi Handa <handa@m17n.org>
2339 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2340 font name comparison.
2341 (xfont_select): Fix logic for selecting a larger size font.
2343 2004-10-25 Kenichi Handa <handa@m17n.org>
2345 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2348 2004-10-22 Kenichi Handa <handa@m17n.org>
2350 * input.c (update_candidate): Renamed from udpate_candidate.
2351 (take_action_list): Show more debugging info on arithmetic commands.
2353 * m17n-X.c (device_open): Fix previous change.
2355 * draw.c (compose_glyph_string): Don't get face property at the
2358 2004-10-21 Kenichi Handa <handa@m17n.org>
2360 * draw.c (compose_glyph_string): Fix for the case of category
2363 2004-10-19 Kenichi Handa <handa@m17n.org>
2365 * input.c (mdebug_mask): New variable.
2366 (shift_state): Print debug information.
2367 (take_action_list): Likewise.
2368 (handle_key): Likewise.
2370 2004-10-14 Kenichi Handa <handa@m17n.org>
2372 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2374 2004-10-13 Kenichi Handa <handa@m17n.org>
2376 * m17n-X.c (device_open): Be sure to register at least one font
2379 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2380 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2382 2004-10-12 Kenichi Handa <handa@m17n.org>
2384 * draw.c (alloc_gstring): Fix previous change.
2386 * font-ft.c (ft_list_generic): Fix for the case of not
2389 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2391 * font.c (mfont_list): If no font is found, return NULL.
2392 (load_font_encoding_table): Put entries of nil registry first.
2393 (find_encoding): Adjust for the above change.
2395 2004-10-11 Kenichi Handa <handa@m17n.org>
2397 * m17n-gui.h (mfont_list): Adjust prototype.
2399 * m17n-X.c (xfont_list): New arg maxnum.
2401 * font.h (struct MFontDriver): Change prototype of <list>.
2403 * font-ft.c (fc_generic_family_list): Delete it.
2404 (Mserif, Msans_serif, Mmonospace): Delete them.
2405 (M_generic_family_info): New variable.
2406 (enum GenericFamilyType): New enum.
2407 (struct GenericFamilyInfo): New struct.
2408 (generic_family_table): New variable.
2409 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2411 (add_font_info): Get style here.
2412 (ft_list_family): Don't initialize fc_config here. Don't list
2414 (ft_list_generic): New function.
2415 (ft_select): Pay attention to generic familes here.
2416 (ft_open): Fix calculation of ascent and descent.
2417 (ft_list): Pay attention to generic families.
2418 (mfont__ft_init): Initialize M_generic_family_info,
2419 generic_family_table, and fc_config..
2420 (mfont__ft_fini): Finalize generic_family_table.
2422 * draw.c (compose_glyph_string): Use more constant font for
2423 glyphs. Adjust for the member change in MGlyph.
2424 (layout_glyph_string): Adjust for the member change in MGlyph.
2425 (alloc_gstring): Intilize scracth_glyph to avoid
2426 compose_glyph_string on it.
2427 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2428 (mdraw_coordinates_position): Fix previous change.
2430 * internal-gui.h (glyph_category): New enum.
2431 (MGlyph): Change type of <category> to enum glyph_category.
2433 * face.c (mface__realize): Delete args langauge and charset.
2434 (mface__for_chars): Fix for the case that glyphs have different
2436 (mface__update_frame_face): Adjust for mface__realize change.
2438 * face.h (mface__realize): Adjust prototype.
2440 2004-10-05 Kenichi Handa <handa@m17n.org>
2442 * language.c (mlang__init): Add Akan.
2444 2004-10-04 Kenichi Handa <handa@m17n.org>
2446 * font-ft.c (add_font_info): Add instead of push the element.
2447 (ft_list_family): For generic fonts, try all
2448 substituted. families.
2450 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2451 (run_rule): Don't update cluster range here.
2452 (run_command): Update cluster range on appending a glyph.
2453 (run_otf): Update cluster range for glyphs generated by OTF.
2455 2004-10-02 Kenichi Handa <handa@m17n.org>
2457 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2459 2004-09-30 Kenichi Handa <handa@m17n.org>
2461 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2463 2004-09-30 Kenichi Handa <handa@m17n.org>
2465 * font.h: Include <fontconfig/fontconfig.h>.
2466 (MFTInfo): New member langset.
2467 (mfont__encoding_list): Extern it.
2469 * font.c (mfont__encoding_list): New function.
2470 (mdebug_dump_font_list): New function.
2472 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2473 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2475 (ft_family_list): New variable.
2476 (set_font_info): New arg basep. Callers changed.
2477 (fc_list): Check the return value of FcPatternGetString.
2478 (add_font_info): New arg plist. Callers changed. Update
2480 (ft_list_family): New function (merged fc_list and ft_list_all).
2481 (ft_select): Use ft_list_family.
2482 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2484 (mfont__ft_init): Initialize above new variables.
2485 (mfont__ft_fini): Free ft_family_list.
2486 (STRDUP_LOWER): New macro.
2487 (set_font_info): Use STRDUP_LOWER.
2488 (ft_list_family): Avoid duplicate addition of font path. Use
2490 (fc_decode_prop): Fix typo.
2492 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2493 (xfont_registry_list): Change argument disp_info to frame.
2495 (xfont_list_all): New function.
2496 (xfont_list): If FONT is not NULL, check all fonts.
2498 2004-09-28 Kenichi Handa <handa@m17n.org>
2500 * m17n-X.c (MXFont, MXFontList): New types.
2501 (MDisplayInfo): Delete members font_registry_list,
2502 iso8859_1_family_list, iso10646_1_family_list, new members
2503 font_list, base_font_list.
2504 (free_display_info): Adusted for the change of MDisplayInfo.
2505 (xfont_driver): Initialize with xfont_list.
2506 (font_compare): New function.
2507 (build_font_list): Deleted.
2508 (xfont_registry_list): New function.
2509 (xfont_select): Use xfont_registry_list.
2510 (xfont_list): New function.
2511 (device_open): Adusted for the change of MDisplayInfo.
2513 * font-ft.c (add_font_info): New arg languages. Callers changed.
2514 (fc_list): Get languages from fonts..
2515 (ft_list_all): Renamed from ft_list. Callers changed.
2516 (ft_list): New function.
2517 (mfont__ft_driver): Initalize with ft_list.
2519 * font.c (mfont_list): New function.
2521 * font.h (struct MFontDriver): New member `list'.
2522 (MFTInfo): New member languages.
2524 * m17n-gui.h (mfont_list): Extern it.
2526 2004-09-27 Kenichi Handa <handa@m17n.org>
2528 * internal-gui.h (struct MGlyphString): Delete members mt,
2529 sub_width, sub_lbrearing, sub_rbearing, and region.
2531 * draw.c (MSubTextExtents): New type.
2532 (layout_glyphs): New arg extents. Set its members.
2533 (layout_glyph_string): Adjusted for the above change.
2534 (alloc_gstring): Don't set gstring->mt.
2535 (truncate_gstring): Call line_break function with mt instead of
2538 2004-09-22 Kenichi Handa <handa@m17n.org>
2540 * mtext.c (count_utf_16_chars): Count each code of invalid
2543 2004-09-19 Kenichi Handa <handa@m17n.org>
2545 * mtext.c (default_utf_16, default_utf_32): Rename them to
2546 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2549 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2552 2004-09-13 Kenichi Handa <handa@m17n.org>
2554 * draw.c (Mlatin): Don't declare it here.
2555 (visual_order): Fix reordering of combining characters.
2556 (compose_glyph_string): Fix detection of script.
2557 (layout_glyphs): Don't fix reordering of combining characters
2559 (layout_glyph_string): Pay attention to
2560 control->disable_overlapping_adjustment.
2561 (truncate_gstring): Include at least on character in a line.
2562 (get_gstring): Always scan one full line.
2563 (mdraw__init): Don't initialize Mlatin here.
2564 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2565 have a font, use ascent/descent of an ASCII font. Allow
2566 ink_array_return and logical_array_return to be NULL.
2567 (mdraw_coordinates_position): Fix iteration.
2569 * font-ft.c (MFTtoProp): Member completely changed.
2570 (ft_to_prop): Adjusted for the above change.
2571 (ft_to_prop_size): Likewise.
2572 (set_font_info): Adjusted for the change of MFTtoProp.
2573 (fc_generic_family_list): New variable.
2574 (fc_list): Add special handling of generic font names.
2575 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2576 Initialize fc_generic_family_list.
2577 (mfont__ft_fini): Don't free ft_to_prop. Free
2578 fc_generic_family_list.
2579 (FC_vs_M17N_font_prop): New type.
2580 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2581 (fc_decode_prop, fc_encode_prop): New functions.
2582 (mfont__ft_parse_name): Use fc_decode_prop.
2583 (mfont__ft_unparse_name): Use fc_encode_prop.
2585 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2586 (MWDevice): Add member realized_font_list.
2587 (free_display_info): Don't free disp_info->realized_font_list.
2588 (free_device): Free device->realized_fontset_list.
2589 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2590 (device_open): Don't initialize disp_info->realized_font_list.
2591 (device_open): Initialize device->realized_font_list and set it to
2592 frame->realized_font_list.
2594 * fontset.c (try_font_group): New function.
2595 (mfont__lookup_fontset): Use try_font_group.
2597 * font.c (common_weight): Change the order of "regular".
2599 * face.c (Mlatin): Don't make it static.
2600 (mface__realize): Be sure to set work_gstring.frame.
2601 (mface__for_chars): Likewise.
2603 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2606 * internal-gui.h (Mlatin): Extern it.
2608 * m17n-gui.h (MDrawControl): New member
2609 disable_overlapping_adjustment.
2611 2004-09-06 Kenichi Handa <handa@m17n.org>
2613 * font-flt.c (run_otf): Fix typo ('}'->']').
2615 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2616 (COMBINING_PRECOMPUTED_P): New macros.
2618 * draw.c (layout_glyphs): Handle precomputed combining code.
2620 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2621 precomupted combining code.
2623 2004-09-03 Kenichi Handa <handa@m17n.org>
2625 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2628 2004-08-27 Kenichi Handa <handa@m17n.org>
2630 * face.c (mface_put_prop): If the new value is the same as the
2631 current one, don't increment frame->tick.
2633 2004-08-25 Kenichi Handa <handa@m17n.org>
2635 * fontset.c (mfontset): Initialize font_spec_list member.
2636 (mfontset_copy): Load fontset if necessary.
2638 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2639 'metrics' to for C++.
2641 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2644 2004-08-16 Kenichi Handa <handa@m17n.org>
2646 * Version 1.1.0 released.
2648 2004-08-13 Kenichi Handa <handa@m17n.org>
2650 * language.c (mlang__init): Add Dhivehi.
2652 * m17n-gui.c (Mx, Mfreetype): Delete it.
2653 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2655 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2656 (mfont_resize_ratio): Extern it.
2657 (MDrawGlyphInfo): New member logical_width;
2658 (MDrawGlyph): New type.
2659 (mdraw_glyph_list): Prototype adjusted.
2661 * m17n-X.c (xfont_open): Set type and fontp members.
2662 (xft_open): Likewise.
2664 * internal-gui.h (Mx, Mfreetype): Delete extern.
2666 * font.h (struct MRealizedFont): New member type and fontp.
2668 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2669 (Mx, Mfreetype): Declare here.
2670 (Mxft): New variable.
2671 (mfont_resize_ratio): New function.
2673 * font-ft.c (ft_open): Set type and fontp members.
2675 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2678 2004-08-11 Kenichi Handa <handa@m17n.org>
2680 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2683 2004-08-06 Kenichi Handa <handa@m17n.org>
2685 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2688 * font-flt.c (run_otf): Print debugging information if necessary.
2690 2004-08-05 Kenichi Handa <handa@m17n.org>
2692 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2693 positioning_type 5 and 6. Switch simplified.
2695 2004-08-04 Kenichi Handa <handa@m17n.org>
2697 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2699 2004-08-02 Kenichi Handa <handa@m17n.org>
2701 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2702 set val to 1 even if it is greater than 1.
2704 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2706 2004-07-29 Kenichi Handa <handa@m17n.org>
2708 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2709 debugging information.
2711 * internal.h (MDEBUG_PRINT5): New macro.
2713 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2714 the previous one if the zero width glyph has left or right
2717 2004-07-26 Kenichi Handa <handa@m17n.org>
2719 * m17n-X.c (xft_render): Pay attention to members left_padding and
2720 right_padding of MGlyph.
2722 * draw.c (visual_order): Allocate one more elements for arrays as
2723 a workaround of fribidi bug.
2724 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2725 instead of MGlyph->bidi_sensitive.
2726 (layout_glyph_string): Pay attentinon to
2727 control->orientation_reversed when padding at the head or tail.
2728 Fix adjustment of space glyph width.
2729 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2732 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2733 instead of MGlyph->bidi_sensitive.
2735 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2737 2004-07-26 Kenichi Handa <handa@m17n.org>
2739 * draw.c (visual_order): Don't treat combined glyphs specially.
2740 (layout_glyphs): Don't get metrics glyphs that are already ready.
2741 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2742 width with the previous one.
2743 (draw_background): Fix bar cursor position on a r2l glyph.
2745 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2746 (run_rule): Fix place of updating cluster_begin_pos and
2747 cluster_end_pos here.
2748 (run_otf): Don't set left_padding.
2750 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2752 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2753 Fix handling of GPOS.
2754 (mfont__ft_drive_gpos): Delete this function.
2756 * font.h (mfont__ft_drive_otf): Renamed back from
2757 mfont__ft_drive_gsub.
2758 (mfont__ft_drive_gpos): Delete extern.
2760 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2761 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2763 2004-07-23 Kenichi Handa <handa@m17n.org>
2765 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2766 the same bidi level.
2768 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2770 2004-07-22 Kenichi Handa <handa@m17n.org>
2772 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2774 2004-07-20 Kenichi Handa <handa@m17n.org>
2776 * draw.c (render_glyphs): Fix checking of g->code validity.
2778 * face.c (mface__realize): Set g.type.
2780 2004-07-18 Kenichi Handa <handa@m17n.org>
2782 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2785 * m17n-gui.c (mframe): Print error message give by dlopen to
2788 2004-07-16 Kenichi Handa <handa@m17n.org>
2790 * draw.c (compose_glyph_string): Improve the way of deciding a
2791 script. For a character that doesn't have script property, use
2792 the last non-latin script.
2794 * font-ft.c (fc_list): Cancel previous change.
2795 (mfont__ft_init): Add more entries in ft_to_prop_name.
2797 2004-07-15 Kenichi Handa <handa@m17n.org>
2799 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2800 previous or next character glyphs.
2802 2004-07-14 Kenichi Handa <handa@m17n.org>
2804 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2805 of type GLYPH_SPACE.
2807 * fontset.c (mfont__lookup_fontset): If glyph type is
2808 GLYPH_SPACE, get codes for SPACE.
2810 * internal-gui.h (Mfont): Delete extern.
2812 * m17n-gui.h (Mfont): Delete duplicated extern.
2814 2004-07-13 Kenichi Handa <handa@m17n.org>
2816 * font-ft.c (DEVICE_DELTA): New macro.
2817 (adjust_anchor): New function.
2818 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2820 (mfont__ft_drive_gpos): New function.
2822 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2823 (FontLayoutContext): Delete member `rfont'.
2824 (run_otf): Set g->otf_cmd. Call
2825 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2826 only whne HAVE_OTF is defined.
2828 * fontset.c: Include "config.h".
2830 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2831 (MGlyph): New member otf_cmd.
2833 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2834 (mfont__ft_drive_gpos): Extern it.
2836 * face.c: Include "config.h".
2838 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2840 * input-gui.c: Include "config.h".
2842 * plist.c: Include "config.h".
2844 2004-07-06 Kenichi Handa <handa@m17n.org>
2846 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2847 internal-gui.h: Cancel previous changes.
2849 * m17n-gd.h: Delete it.
2851 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2852 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2853 @XML2_LD_FLAGS@ to above.
2854 (libm17n_la_LIBADD): Add -ldl.
2855 (libm17n_la_LDFLAGS): Add -export-dynamic.
2856 (X_LD_FLAGS): Fix the order of linking.
2857 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2858 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2859 (libm17n_X_la_LDFLAGS): Add -module.
2860 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2861 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2862 (libm17n_gd_la_LDFLAGS): Add -module.
2863 (include_HEADERS): Delete m17n-gd.h.
2865 2004-06-30 Kenichi Handa <handa@m17n.org>
2867 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2868 (MDeviceLibraryInterface): Delete it.
2869 (register_device_library): Delete it.
2870 (m17n__device_library_list): Renamed from device_library_list.
2872 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2873 (m17n_init_win): Adjust prototype.
2875 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2876 (m17n_init_gd): New function.
2878 * m17n-gd.h: New file.
2880 * m17n-X.h: Include <m17n-gui.h>.
2881 (m17n_init_X): Extern it.
2882 (M17N_INIT): Redefine it.
2884 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2885 (m17n_init_X): New function.
2887 * internal-gui.h (m17n__device_library_list): Extern it.
2888 (struct MDeviceDriver): New members initialized, init, and fini.
2890 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2892 (libm17n_X_la_LIBADD): Delete aboves.
2893 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2894 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2895 (libm17n_gd_la_LDFLAGS): Delete it.
2896 (include_HEADERS): Add m17n-gd.h.
2898 2004-06-25 Kenichi Handa <handa@m17n.org>
2900 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2901 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2903 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2905 * font-ft.c (fc_list): If FcFontList finds no font, try
2908 * draw.c (compose_glyph_string): Terminate the last loop after
2909 doing default combining if necessary.
2911 2004-06-24 Kenichi Handa <handa@m17n.org>
2913 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2915 * character.c (mchar_define_property): Add const to an arg.
2917 * charset.c (mchar_define_charset): Add const to an arg.
2919 * coding.c (MCodingSystem): Add const to an arg or decoder.
2920 (finish_decoding): Add const to an arg.
2921 (decode_coding_charset, decode_coding_utf_8)
2922 (decode_coding_utf_16, decode_coding_utf_32)
2923 (decode_coding_iso_2022, decode_coding_sjis)
2924 (mconv_define_coding): Likewise.
2926 * m17n-X.c (xft_find_metric): Delete unused variable.
2928 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2931 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2934 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2935 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2937 * mtext.h (mtext__from_data): Ajust prototype.
2939 2004-06-23 Kenichi Handa <handa@m17n.org>
2941 * draw.c (compose_glyph_string): Always get glyph codes by
2943 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2944 (mdraw_glyph_list): New function.
2946 * font-flt.c (mfont__flt_run): Be sure to call
2947 rfont->driver->encode_char.
2949 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2950 (ft_encode_char): Delete arg C.
2951 (ft_render): Don't call FT_Get_Char_Index.
2953 * font.c (mfont__encodable_p): Delete it.
2954 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2956 * font.h (struct MFontDriver): Delete arg C of encode_char.
2957 (mfont__encodable_p): Delete extern.
2959 * m17n-X.c (xfont_encode_char): Delete arg C.
2960 (xft_find_metric): Don't cal FT_Get_Char_Index.
2961 (xft_render): Likewise.
2963 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2965 (mdraw_glyph_list): Extern it.
2967 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2969 2004-06-22 Kenichi Handa <handa@m17n.org>
2971 * m17n-gui.h (mfontset_lookup): Extern it.
2973 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2975 * fontset.c (realize_fontset_elements)
2976 (free_realized_fontset_elements, update_fontset_elements): New
2978 (mfont__realize_fontset): Call realize_fontset_elements.
2979 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2980 (mfont__lookup_fontset): If a fontset was modified, update
2981 the realized fontset.
2982 (mfontset_modify_entry): Increment fontset->tick.
2983 (mfontset_lookup): New function.
2985 2004-06-21 Kenichi Handa <handa@m17n.org>
2987 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2989 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2990 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2991 length of source text 0.
2993 2004-06-21 Kenichi Handa <handa@m17n.org>
2995 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2996 (compare): Pay attention to format other than utf-8.
2997 (copy): Delete this function.
2998 (count_by_utf_8, count_by_utf_16, insert): New functions.
2999 (count_utf_16_chars): Fix handling of a surrogate pair.
3000 (find_char_forward, find_char_backward): Likewise.
3001 (mtext__from_data): Delete unnecessary check. Fix number of
3003 (mtext_from_data): Don't count items.
3004 (mtext_ref_char): Optimize the code.
3005 (mtext_set_char): Pay attention to format other than utf-8.
3006 (mtext_cat_char): Likewise.
3007 (mtext_dup): Don't call copy, instead do allocation here.
3008 (mtext_cat): Call insert instead of copy.
3009 (mtext_ncat): Likewise.
3010 (mtext_cpy): Delete character at first and call insert instead of
3012 (mtext_ncpy): Likewise.
3013 (mtext_copy): Likewise.
3014 (mtext_duplicate): Call insert instead of copy.
3015 (mtext_del): Pay attention to format other than utf-8.
3016 (mtext_ins): Simply call insert.
3017 (mtext_ins_char): Pay attention to format other than utf-8.
3018 (mtext_tok): Call insert instead of copy.
3019 (mtext_text): Call UNIT_BYTES.
3021 * textprop.c (mtext__adjust_plist_for_change): New function.
3023 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3024 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3025 (CHAR_UNITS_AT): Fix typo.
3026 (CHAR_UNITS_BY_HEAD): Fix typo.
3027 (STRING_CHAR_AND_UNITS): Fix typo.
3029 * internal.h (MTEXT_READ_ONLY_P): New macro.
3031 * mtext.h (mtext__replace): Delete the extern.
3032 (mtext__adjust_foramt): Adjust prototype.
3034 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3035 if possible. Otherwise make a copy of mmt.
3037 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3040 2004-06-18 Kenichi Handa <handa@m17n.org>
3042 * character.h (CHAR_STRING_UTF16): Fix syntax.
3044 2004-06-16 Kenichi Handa <handa@m17n.org>
3046 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3047 (libm17n_X_la_LIBADD): Delete it.
3048 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3050 * m17n-X.c (device_open): Add parens in `if' condition.
3052 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3053 (DEC_POSITION): Likewise.
3054 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3056 2004-06-15 Kenichi Handa <handa@m17n.org>
3058 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3061 * draw.c (compose_glyph_string): If langauge is specified, call
3062 mface__for_chars even if a text is all latin. Fix condition for
3063 setting non_ascii_found.
3065 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3067 * m17n.h (minput_char_to_key): Delete extern.
3069 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3071 * m17n-gui.c (null_device_open): Set several members of frame.
3073 2004-06-14 Kenichi Handa <handa@m17n.org>
3075 * m17n-gui.h (minput_event_to_key): Delete extern.
3077 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3079 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3081 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3083 2004-06-08 Kenichi Handa <handa@m17n.org>
3085 * character.c (mchar_put_prop): Don't increment the ref-count of
3088 2004-06-04 Kenichi Handa <handa@m17n.org>
3090 * m17n-core.c (mdebug__register_object): New function.
3091 (mdebug__unregister_object): Likewise.
3093 * internal.h (mdebug__register_object, mdebug__unregister_object):
3095 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3098 * charset.c (mcharset__load_from_database): Don't call
3099 mconv__register_charset_coding here.
3101 * coding.c (find_coding): Get a real name from an element of
3102 coding_definition_list.
3103 (mconv__register_charset_coding): Set the real name at the top of
3105 (mcoding__load_from_database): Likewise.
3106 (mconv_list_codings): Adjusted for the above change.
3108 2004-06-03 Kenichi Handa <handa@m17n.org>
3110 * coding.c (find_coding): Find by canonicalized name. Don't have
3111 to modify the element of coding_definition_list by
3113 (mconv__define_coding_from_charset): Delete it.
3114 (mconv__register_charset_coding): Canonicalize sym.
3115 (mcoding__load_from_database): Register plist modified by
3118 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3120 * font-ft.c (ft_open): Fix setting of rfont->descent.
3122 2004-06-02 Kenichi Handa <handa@m17n.org>
3124 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3125 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3126 (xlfd_unparse_name): Renamed from xfont_build_name.
3127 (mfont__init): Initialized Mfontconfig.
3128 (mfont__free_realized): Unconditionally unref rfont->info.
3129 (mfont__select): Free `this' if it's not best.
3130 (mfont__open): Don't check frame->realized_font_list.
3131 (mfont__parse_name_into_font): New function.
3132 (Mfontconfig): New variable.
3133 (mfont_from_name): Call mfont_parse_name.
3134 (mfont_name): Call mfont_unparse_name.
3135 (mdebug_dump_font): Likewise.
3137 * font.h (struct MFontDriver): Delete members parse_name and
3139 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3140 (mfont__parse_name_into_font): Extern it.
3142 * font-ft.c: Include "symbol.h".
3143 (close_ft): Unconditionally free filename and charmap_list of
3145 (ft_open): Duplicate base->filename. Increment ref-count of
3146 ft_info->charmap_list. Free ft_info->charmap_list and
3147 ft_info->filename on error.
3148 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3150 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3152 (enum xlfd_field_idx): Moved to font.c.
3153 (split_font_name, build_font_name): Likewise.
3154 (build_font_list): Call mfont__parse_name_info_font.
3155 (xfont_open): Call mfont__unparse_name. Free name.
3156 (xfont_parse_name, xfont_build_name): Moved to font.c
3157 (xft_select): Prototype deleted.
3158 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3159 Call mfont_pase_name.
3161 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3162 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3165 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3168 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3170 2004-06-01 Kenichi Handa <handa@m17n.org>
3172 * fontset.c (mfontset_modify_entry): Pay attention to the case
3173 that fontset->font_spec_list is NULL.
3175 2004-05-31 Kenichi Handa <handa@m17n.org>
3177 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3179 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3181 * font.c (mfont__select): Print score the a font for debugging.
3183 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3185 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3186 kanji_sym and kana_sym.
3188 2004-05-28 Kenichi Handa <handa@m17n.org>
3190 * Makefile.am (VINFO): New variable.
3191 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3192 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3194 2004-05-27 Kenichi Handa <handa@m17n.org>
3196 The following chanages are to make device dependent functions
3197 accessible only from MDeviceDriver structure, and to add GD and
3198 null device drivers. Font drivers get also device dependent.
3200 * m17n.c (m17n_init): Increament shell_initialized.
3201 (m17n_fini): Decremented shell_initialized.
3203 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3205 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3206 (Mwidget, Mcolormap, Mx): Extern them.
3208 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3209 (free_frame): Call frame->driver->close instead of
3211 (DLOPEN_SHLIB_EXT): New macro.
3212 (MDeviceLibraryInterface): New type.
3213 (device_library_list): New variable.
3214 (register_device_library): New function.
3215 (null_device): New variable.
3216 (null_device_close, null_device_get_prop)
3217 (null_device_realize_face, null_device_free_realized_face): New
3219 (null_driver): New variable.
3220 (null_device_init, null_device_fini, null_device_open): New
3222 (null_interface): New variable.
3223 (Mfreetype, Mdevice): Declare them.
3224 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3225 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3226 Mwin__Close_Device. Register drivers for Mx and Mgd.
3227 (m17n_fini_win): Decremented win_initialized. Call "fini"
3228 function of all opened devices. Don't call mwin__fini.
3229 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3231 (mframe): Handle Mdevice key of PLIST.
3232 (mframe_get_prop): Call frame->device->get_prop instead of
3233 mwin__device_get_prop.
3235 * m17n-gd.c: New file.
3237 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3238 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3240 * m17n-core.c (m17n_init_core): Increate core_initialized.
3241 (m17n_fini_core): Decremented core_initialized.
3243 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3244 (Mcolormap): Don't extern them here.
3246 * m17n-X.c (FRAME_DEVICE): New macro.
3247 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3248 (free_display_info): Use MPLIST_DO.
3249 (free_device): Free rface->info.
3250 (xft_close): Delete it.
3251 (device_init): Renamed from mwin__init.
3252 (device_fini): Renamed from mwin__fini.
3253 (device_open): Renamed from mwin__open_device.
3254 (x_driver): New variable.
3255 (MXFontInfo): Delete member frame, add member display.
3256 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3257 Don't declare them here.
3259 * internal-gui.h (MDeviceType): New enum.
3260 (MWDefice): Delete it.
3261 (struct MFrame): Change type of device to void *. New members
3262 device_type, driver, font_driver_list.
3263 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3264 (MDeviceDriver): New type.
3265 (Mx, Mgd, Mfreetype): Extern them.
3266 (mwin__XXX): Delete all of them.
3268 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3270 (win_destroy_ic): Likewise.
3271 (adjust_window_and_draw): Likewise.
3272 (win_callback): Likewise.
3273 (Mxim): Declare it here.
3274 (minput_event_to_key): Call M_CHECK_READABLE.
3276 * fontset.c (mfont__lookup_fontset): Delete local variable
3279 * font.h (struct MFontDriver): Delete member close, add members
3280 parse_name and build_name.
3281 (mfont__driver_list): Delete extern.
3282 (mfont__close): Delete extern.
3284 * font.c (mfont__init): Don't set mfont__driver_list.
3285 (mfont__fini): Don't unref mfont__driver_list.
3286 (mfont__select): Try font drivers in frame->font_driver_list. Set
3287 driver member of a realized font.
3288 (mfont__close): Delete it.
3289 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3290 functions of the default frame.
3292 * font-ft.c (close_ft): Check ft_info->ft_face and work
3294 (add_font_info): Allocate ft_info by M17N_OBJECT.
3295 (ft_close): Delete it.
3296 (mfont__ft_driver): Don't set ft_close.
3297 (ft_select): Increment ref-count of best_font.
3298 (ft_open): Decremented ref-count of base. On error, call
3299 FT_Done_Face and free ft_info.
3300 (ft_find_metric): Always use XXX_MONO in load_flags.
3301 (ft_render): Fix setting of width. Call
3302 frame->driver->draw_points instead of mwin__draw_points.
3303 (ft_to_prop): Don't set mfont__driver_list.
3304 (mfont__ft_fini): Just unref ft_info.
3306 * face.c (mface__init): Exchange foreground and background of
3307 mface__default. Call mface_put_prop to set hline of
3309 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3310 (mface__free_realized): Don't call mwin__free_realized_face.
3312 * draw.c (Mdepth): Don't declare it here.
3313 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3314 (render_glyphs, render_glyph_string): Likewise.
3315 (mdraw__init): Don't set Mdepth.
3316 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3318 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3320 (mdraw_text_items): Check FRAME is writable.
3321 (mdraw_per_char_extents): Implement body.
3323 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3325 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3326 (GUI_SOURCES): Delete it.
3327 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3328 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3329 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3330 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3331 (linkgui_LDADD): Set to libm17n-gui.la
3332 (linkgui_LDFLAGS): New target.
3333 (SRC): Include ${libm17n_gui_la_SOURCES} and
3334 ${libm17n_gd_la_SOURCES}.
3336 2004-05-24 Kenichi Handa <handa@m17n.org>
3338 * draw.c (draw_background): Don't draw background even if
3339 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3341 2004-05-22 Kenichi Handa <handa@m17n.org>
3343 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3345 2004-05-20 Kenichi Handa <handa@m17n.org>
3347 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3349 * m17n-gui.c: Include "plist.h".
3350 (mframe): If PLIST is NULL, initialize it to emply plist.
3352 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3353 (xft_driver): New variable.
3354 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3355 (xft_find_metric, xft_render): New function.
3356 (mwin__init): Adjusted for the new mfont__driver_list.
3357 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3358 generated face to PARAM.
3359 (mwin__realize_face): Fix setting of box colors. Don't call hook
3361 (mwin__draw_hline): New function.
3362 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3363 (mwin__xft_render): Delete these function.
3365 * internal-gui.h (struct MFrame): New member tick.
3366 (struct MGlyphString): New member tick.
3367 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3368 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3369 (mwin__xft_render): Delete extern.
3371 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3372 (mfontset): Always increment the reference count of returned
3375 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3376 (MFTInfo): Moved to font.h.
3377 (ft_iso8859_1_font_list): Delete this variable.
3378 (set_font_info): Don't set font->property[MFONT_TYPE].
3379 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3380 (add_font_info): Change type to void.
3381 (fc_list): Change anme from xft_list. Caller changed. Include
3382 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3383 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3384 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3385 (close_ft): Don't call mwin__xft_close. Unref
3386 ft_info->extra_info.
3387 (ft_open): Don't setup ft_info->fontname. Don't call
3389 (ft_find_metric): Don't call mwin__xft_get_metric.
3390 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3391 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3392 (mfont__ft_init): Adjusted for new mfont__driver_list.
3393 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3395 * font.c (mfont__driver_list): Make it MPlist.
3396 (mfont__init): Adjust initialization of mfont__driver_list.
3397 (mfont__fini): Free mfont__driver_list.
3398 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3399 (mfont__select): Adjusted for the new mfont__driver_list.
3401 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3402 (mfont__drirver_list): Adjust prototype.
3403 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3405 * face.h (struct MFace): Delete member realized_face_list, add
3407 (struct MRealizedFace): Delete member need_update
3408 andnofont_rface, add member non_ascii_list.
3409 (mface__update_frame_face): Extern it.
3411 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3413 (get_hline_create, get_box_create): New functions.
3414 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3416 (free_face): Cancep previous change. Free face->frame_list.
3417 (serialize_hline): Do nothing if hline->width is zero.
3418 (serialize_box): Do nothing if box->width is zero.
3419 (mface__init): Setup all properties of mface__default.
3420 (mface__fini): Free hline_prop_list and box_prop_list.
3421 (mface__realize): Cancel previous change. Update
3422 face->frame_list. Setup rface->non_ascii_list.
3423 (mface__for_chars): Update rface->non_ascii_list.
3424 (mface__free_realized): Free rface->non_ascii_list.
3425 (mface__update_frame_face): New function.
3426 (mface): Initialize face->frame_list.
3427 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3429 (mface_merge): Likewise.
3430 (mface_put_prop): If key is Mhline or Mbox, get value by
3431 get_hline_create or get_box_create respectively.
3432 (mface_put_prop): Update frame->tick and call
3433 mface__update_frame_face if necessary.
3434 (mface_update): Do nothing if func is noop_hook.
3436 * draw.c (render_glyphs): If a font is not found, use
3437 mwin__draw_empty_boxes.
3438 (alloc_gstring): Initialize gstring->tick.
3439 (get_gstring): Check gstring->tick.
3441 2004-05-17 Kenichi Handa <handa@m17n.org>
3443 * face.c (find_realized_face): Return value changed. If RFONT is
3444 NULL, avoid unnecessary checking.
3445 (free_face): Free face->realized_face_list.
3446 (mface__realize): Adjusted for the change of find_realized_face.
3447 If it returns a realized face that needs update, free it and
3448 realize a new one. Push a new realized face to
3449 frame->realized_face_list instead of appending.
3450 (mface__for_chars): Adjusted for the change of find_realized_face.
3451 Short cut if the required font is in rface->ascii_rface.
3452 (mface_put_prop): Free old value if necessary. Set need_update
3453 member of realized faces to 1.
3455 * face.h (struct MFace): Delete member tick, add member
3457 (struct MRealizedFace): Delete member tick, add member
3460 2004-05-13 Kenichi Handa <handa@m17n.org>
3462 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3464 2004-05-12 Kenichi Handa <handa@m17n.org>
3466 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3468 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3469 parse it XftNameParse.
3471 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3472 (all_fonts_scaned): New variable.
3473 (set_font_info): FAMILY may be Mnil.
3474 (add_font_info): Argument changed.
3475 (xft_list): Call add_font_info in it.
3476 (ft_list): Likewise.
3477 (ft_select): Make it work in the case family is Mnil.
3478 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3479 (mfont__ft_fini): Set all_fonts_scaned to 0.
3481 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3482 that is failed to open.
3484 2004-05-10 Kenichi Handa <handa@m17n.org>
3486 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3487 device's depth is 1 (i.e. monochrome).
3489 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3490 to work around the problem of libtool.
3492 * font-ft.c: Include <freetype/ftbdf.h>.
3493 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3495 (mfont__ft_init): Initialize them.
3496 (ft_iso8859_1_font_list): New variable.
3497 (set_font_info): Detect a font containing iso8859-1 glyphs and
3498 register it in ft_iso8859_1_font_list. If the font is not
3499 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3500 properties of the font from its properties.
3501 (add_font_list): If the font is not scalable, check if it is BDF
3502 or PCF font. If not, ignore it.
3503 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3504 registry is not iso8859-1.
3505 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3506 ft_iso8859_1_font_list.
3507 (ft_find_metric): If the font is not scalable, assume it as BDF
3508 or PCF, and get a metric from its properties.
3509 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3511 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3513 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3514 (libm17n_la_LDFLAGS): Delete it.
3515 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3516 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3518 2004-05-06 Kenichi Handa <handa@m17n.org>
3520 * draw.c (compose_glyph_string): Fix previous change.
3522 2004-04-30 Kenichi Handa <handa@m17n.org>
3524 * font-ft.c (ft_list): Delete unused variable `result'.
3525 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3527 2004-04-27 Kenichi Handa <handa@m17n.org>
3529 * m17n-X.c: Include config.h
3530 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3531 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3532 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3533 (FRAME_CMAP, FRAME_VISUAL): New macros.
3534 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3535 (xfont_driver): Make it static.
3536 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3537 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3538 info->xft_color_back.
3539 (MXftFontInfo) [HAVE_XFT2]: New type.
3540 (mwin__xft_close) [HAVE_XFT2]: New function.
3541 (mwin__xft_open) [HAVE_XFT2]: New function.
3542 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3543 (mwin__xft_render) [HAVE_XFT2]: New function.
3545 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3546 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3547 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3550 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3552 * font-ft.c: Don't include FT_FREETYPE_H here.
3553 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3554 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3555 (MFTInfo): New member charmap_index.
3556 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3557 (check_otf_filename): Renamed from check_filename. Return value
3559 (ft_set_property): This function deleted.
3560 (set_font_info): New function.
3561 (add_font_list): Argument changed. Add multiple fonts.
3562 (xft_list) [HAVE_XFT2]: New function.
3563 (ft_list) [not HAVE_XFT2]: New function.
3564 (ft_select): Add code for Xft.
3565 (close_ft): Likewise.
3566 (ft_open): Likewise.
3567 (ft_find_metric): Likewise.
3568 (ft_encode_char): Likewise.
3569 (ft_render): Likewise.
3571 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3573 2004-04-26 Kenichi Handa <handa@m17n.org>
3575 * textprop.c (mtext_attach_property): Declare the return type as
3578 2004-04-21 Kenichi Handa <handa@m17n.org>
3580 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3582 2004-04-09 Kenichi Handa <handa@m17n.org>
3584 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3586 (load_command): Setup above members.
3588 2004-04-05 Kenichi Handa <handa@m17n.org>
3590 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3592 2004-03-30 Kenichi Handa <handa@m17n.org>
3594 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3597 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3598 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3600 2004-03-29 Kenichi Handa <handa@m17n.org>
3602 * Version 1.0 Patch Level 2 released.
3604 2004-03-29 Kenichi Handa <handa@m17n.org>
3606 * charset.c (make_charset): Set charset->fully_loaded and
3607 charset->simple correctly. Don't try to get charset->min_char and
3608 charset->max_char for a charset of method subset and superset.
3609 Don't load a mapping file here.
3610 (mcharset__init): Set unified_max.
3611 (mcharset__load_from_database): Free a working plist.
3613 * coding.c (mcoding__fini): Free all malloced data.
3615 * input-gui.c (win_create_ic): Set control.as_image for preediting
3618 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3619 `count') to initialize the array.
3621 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3624 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3626 (mwin__create_window): Fix bug of setting a background pixel of a
3628 (mwin__adjust_window): Clear the window before drawing.
3630 * m17n-core.c (mdebug__report_object): Free array->objectes if
3632 (m17n_init_core): Don't set report_header_printed to 0 here.
3633 Fix debugging information.
3634 (m17n_fini_core): Set report_header_printed to 0 here.
3636 * m17n-core.h (mplist_deserialize): Extern it.
3638 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3640 * m17n.c (m17n_fini): Fix debugging information.
3642 * mtext.c (mtext__adjust_foramt): New function.
3644 * mtext.h (mtext__adjust_foramt): Extern it.
3646 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3648 * plist.h (mplist__deserialize): Don't extern it.
3650 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3651 elements of symbol_table to NULL. Report about created and freed
3652 symbols if MDEBUG_FINI is set.
3654 2004-03-22 Kenichi Handa <handa@m17n.org>
3656 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3658 * m17n.c (m17n_init): Fix the way of checking merror_code.
3660 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3662 2004-03-22 Kenichi Handa <handa@m17n.org>
3664 * fontset.c (realize_font_group): Adjust the font size by
3665 mfont__resize before selecting a font.
3667 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3669 2004-03-19 Kenichi Handa <handa@m17n.org>
3671 * Version 1.0 Patch Level 1 released.
3673 2004-03-19 Kenichi Handa <handa@m17n.org>
3675 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3677 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3679 2004-03-19 Kenichi Handa <handa@m17n.org>
3681 Re-apply the changes forgotten in the released version.
3683 * charset.c (mcharset__load_from_database): Call
3684 mchar_define_charset.
3686 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3687 (mconv_encode_range): Put Mcoding text property.
3689 2004-03-18 Kenichi Handa <handa@m17n.org>
3691 * draw.c (Mdepth): New variable.
3692 (visual_order): Delete unused local var `pos'.
3693 (compose_glyph_string): Fix for the case that gstring->glyphs is
3694 realloced. Stop generating glyphs at TO. Fix handling of
3696 (layout_glyphs): Get metrics of all glyphs in advance. Set
3697 lbearing and rbearing of base of composition glyph correctly.
3698 Handle left-overhang glyphs correctly.
3699 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3701 (dump_combining_code): Change the defualt off_x character to ".".
3702 (mdraw__init): Initialize Mdepth.
3704 * face.c (work_gstring): New variable
3705 (mface__init): Initialize work_gstring.
3706 (mface__fini): Free work_gstring.glyphs.
3707 (mface__realize): Don't handle videomode property here. Adjusted
3708 for the change of mfont__get_metric.
3709 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3711 * face.h (enum face_gc): Moved to m17n-X.c.
3713 * font.h (struct MFontDriver): Arguments of find_metric changed.
3714 (mfont__select): Prototype adjusted.
3715 (mfont__get_metric): Likewise.
3716 (mfont__ft_drive_otf): Likewise.
3717 (mfont__flt_run): Likewise.
3719 * font.c (mfont__select): New argument layouter. If layouter is
3720 different in the registered font, make a new copy of realized
3722 (mfont__get_metric): Argument changed. Get metrics of multiple
3724 (mfont_find): Call mfont__select with layouter as Mnil.
3726 * font-flt.c (FontLayoutContext): New member rfont.
3727 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3728 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3730 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3732 (NUM_POINTS): New macro.
3733 (MPointTable): New type.
3734 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3735 (mfont__ft_drive_otf): New argument rfont.
3737 * fontset.c (realize_font_group): Adjusted for the changed of
3739 (check_fontset_element): This function deleted.
3741 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3742 off the parent window if the preedit text is zero length.
3744 * internal-gui.h (struct MFrame): New members foreground,
3745 background, videomode, font.
3746 (struct MGlyphString): New member anti_alias.
3747 (MDrawPoint): New type.
3748 (mwin__draw_bitmap): Prototype deleted.
3749 (mwin__draw_points): Prototype added.
3751 * m17n-gui.h (MDrawControl): New member anti_alias.
3753 * m17n-gui.c (free_frame): Free frame->font.
3754 (mframe): Set the fontset of frame->face to the default fontset.
3756 * m17n-X.c (RGB_GC): New type.
3757 (enum gc_index): Renamed from enum face_gc. Member names changed.
3759 (struct MWDevice): Members foreground and background deleted. New
3760 member scratch_gc, gc_list.
3761 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3762 (free_device): Free GCs in device->gc_list.
3763 (get_rgb_gc): New function.
3764 (get_gc): Renamed and argument changed from get_color.
3765 (get_gc_for_anti_alias): New function.
3766 (xfont_find_metric): Arguments changed. Get metrics of multiple
3768 (set_region): Argument changed. Caller changed.
3769 (xfont_render): Allways set a font in gc.
3770 (x_error_handler, x_io_error_handler): Define only if
3771 X_SET_ERROR_HANDLER is defined.
3772 (mwin__open_device): Create device->scratch_gc. Set members
3773 foreground, background, and videomode of frame. Call
3774 XSetErrorHandler and XSetIOErrorHandler only if
3775 X_SET_ERROR_HANDLER is defined.
3776 (struct gc_list): Deleted.
3777 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3778 (mwin__realize_face): Adjusted for the change of the format of
3779 rface->info and the charge of set_region.
3780 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3781 (mwin__draw_box): Likewise.
3782 (mwin__draw_bitmap): This function deleted.
3783 (mwin__draw_points): New function.
3784 (mwin__verify_region): Adjusted for the change of the format of
3785 rface->info and the charge of set_region.
3786 (mwin__create_window): Inherit backgound pixel from parent.
3787 (mwin__dump_gc): Adjusted for the change of the format of
3790 2004-03-16 Kenichi Handa <handa@m17n.org>
3792 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3794 * input.c (M_key_alias): New variable.
3795 (handle_key): Try M_key_alias property of a key too.
3796 (minput__init): Initialize M_key_alias. Give that property to
3797 symbols in one_char_symbol. Fix bug of initializing
3800 * draw.c (compose_glyph_string): Don't handle
3801 ignore_formatting_char here. Include formatting characters in the
3802 range processed by a FTL.
3803 (layout_glyph_string): Handle ignore_formatting_char here.
3805 2004-03-12 Kenichi Handa <handa@m17n.org>
3807 * input-gui.c (win_create_ic): Enable bidi in status control.
3809 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3811 2004-03-09 Kenichi Handa <handa@m17n.org>
3813 * input.c (load_input_method): If title is not specified, use the
3814 input method name as title.
3816 * m17n-X.c (get_color): Make it static.
3817 (xim_create_ic, xim_destroy_ic, x_error_handler)
3818 (x_io_error_handler): Likewise.
3820 2004-03-01 Kenichi Handa <handa@m17n.org>
3822 * Version 1.0 released.
3825 Copyright (C) 2003, 2004
3826 National Institute of Advanced Industrial Science and Technology (AIST)
3827 Registration Number H15PRO112
3829 This file is part of the m17n library.
3831 The m17n library is free software; you can redistribute it and/or
3832 modify it under the terms of the GNU Lesser General Public License
3833 as published by the Free Software Foundation; either version 2.1 of
3834 the License, or (at your option) any later version.
3836 The m17n library is distributed in the hope that it will be useful,
3837 but WITHOUT ANY WARRANTY; without even the implied warranty of
3838 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3839 Lesser General Public License for more details.
3841 You should have received a copy of the GNU Lesser General Public
3842 License along with the m17n library; if not, write to the Free
3843 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3844 Boston, MA 02110-1301, USA.