1 2007-05-23 Kenichi Handa <handa@m17n.org>
3 * database.c (Mversion): New variable.
4 (mdatabase__init): Initialize it.
5 (register_database): New arg properties. Caller changed.
6 (register_databases_in_files): Don't check version here.
7 (mdatabase__update): Likewise.
9 * database.h (MDatabaseInfo): New member properties.
11 2007-05-21 Kenichi Handa <handa@m17n.org>
13 * language.c: Include <ctype.h>
14 (mlanguage__info): Use strncasecmp (not memcmp).
15 (mlanguage_name): Downcase language name for backward
18 * input.c (filter): Don't check Mlanguage property of
21 2007-05-18 Kenichi Handa <handa@m17n.org>
23 * language.c (mlanguage_name): Fix it to handle M-text English
26 * input.c (config_command): Set NAME before using it.
27 (load_branch): Try to resolve a map name by variables.
29 2007-05-17 Kenichi Handa <handa@m17n.org>
31 * language.c (mlang__fini): Fix previous change.
33 2007-05-16 Kenichi Handa <handa@m17n.org>
35 * plist.c (free_plist): Cancel the last change.
36 (write_element): Check if PLIST is nested.
37 (mplist__from_plist): Label a plist as nested if appropriate.
38 (mplist__from_alist): Label a plist as nested.
39 (mplist__conc): Check the value of PL before referring it. Label
40 a plist as nested if appropriate.
41 (mplist_copy): Label a plist as nested if appropriate.
42 (mplist_put_func): Return Mnil if KEY is a managing key.
43 (mplist_push): Label a plist as nested if appropriate.
45 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
48 * language.c (mlang__fini): Unref each element of langname_list.
50 2007-05-14 Kenichi Handa <handa@m17n.org>
52 * language.c: Include <string.h> and <locale.h>.
53 (langname_list): New variable.
54 (load_lang_script_list): Exclude invalid list elements.
55 (mlang__init): Initialize langname_list.
56 (mlang__fini): Unref langname_list.
57 (mlanguage__info): Adjusted for the change of English
58 name (symbol->M-text).
59 (mlanguage_name): Label it as obsolete.
60 (mlanguage_name_list): New function.
62 * m17n.h (mlanguage_name_list): Extern it.
64 * locale.c (make_locale): Fix setting of members of locale.
66 * plist.c (free_plist): Unref also nested plist.
68 2007-05-11 Kenichi Handa <handa@m17n.org>
70 * coding.c (mconv_reset_converter): Set internal->used to 0.
72 2007-05-08 Kenichi Handa <handa@m17n.org>
74 * input.c (check_description): Force copying the translated text.
76 2007-05-02 Kenichi Handa <handa@m17n.org>
78 * input.c (minput_save_config): Unref unnecessary plist. Use
79 free_im_list to free im_config_list.
81 2007-04-20 Kenichi Handa <handa@m17n.org>
83 * input.c (config_command): Fix previous change again.
84 (config_variable): Likewise.
85 (minput_config_command): Fix for the case of setting back to
87 (minput_config_variable): Likewise.
88 (minput_save_config): Include nil as documentation of customized
91 2007-04-05 Kenichi Handa <handa@m17n.org>
93 * input.c (config_command): Fix previous change.
94 (config_variable): Likewise.
96 * plist.c (mplist_get_func): Fix for backward compatiblity.
98 2007-04-04 Kenichi Handa <handa@m17n.org>
100 * input.c (minput_get_command, minput_config_command): Fix example
103 2007-03-29 Kenichi Handa <handa@m17n.org>
105 These changes are to avoid unsafe casting of a function pointer.
107 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
108 (struct MFace): New member hook.
110 * face.c (serialize_face): Adjusted for the change of MFace.
111 (deserialize_face): Likewise.
112 (mface__init): Likewise. Use msymbol_put_func.
113 (mface__realize): Adjusted for the change of MFace. Avoid
115 (mface_get_prop): Adjusted for the change of MFace.
116 (mface_put_prop): Likewise.
117 (mface_get_hook): New function.
118 (mface_put_hook): New function.
119 (mface_update): Adjusted for the change of MFace.
121 * input-gui.c (win_callback): Use mplsit_get_func.
122 (minput__win_init): Use mplsit_put_func.
124 * input.c (take_action_list): Use mplist_get_func.
125 (init_ic_info): Likewise.
126 (fini_ic_info): Likewise.
127 (minput_callback): Likewise.
128 (minput__init): Use mplist_put_func.
130 * language.c (mlang__init): Use msymbol_put_func.
132 * m17n-core.h (M17NFunc): New function type.
133 (M17N_FUNC): New macro.
134 (msymbol_put_func, msymbol_get_func): Extern them.
135 (mplist_put_func, mplist_get_func): Extern them.
137 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
139 * m17n-gui.c (mframe): Add a proper casting.
141 * plist.h (struct MPlist): Make the member val a union.
142 (MPLIST_VAL): Adjusted for the above change.
143 (MPLIST_FUNC): New macro.
144 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
146 * plist.c (mplist_put_func, mplist_get_func): New functions.
148 * symbol.c (msymbol__fini): Use MPLIST_VAL.
149 (msymbol_put_func, msymbol_get_func): New functions.
151 * textprop.c (mtext_serialize): Use msymbol_get_func.
152 (mtext_deserialize): Likewise.
154 2007-03-28 Kenichi Handa <handa@m17n.org>
156 * input.c (get_candidate_list): Avoid unnecessary unref.
158 2007-03-23 Kenichi Handa <handa@m17n.org>
160 * database.c (mdatabase__update): Unref plist at the tail.
162 2007-03-21 Kenichi Handa <handa@m17n.org>
164 * input.c (update_custom_info): Fix for the case "name == Mnil &&
166 (config_command): Fix for the case that configuration is
168 (config_variable): Likewise.
169 (minput_config_command): If keyseqlist is an empty list, cancel
171 (minput_config_variable) If value is an empty list, cancel the
173 (minput_save_config): Handle cancellation of config and customize
176 2007-03-15 Kenichi Handa <handa@m17n.org>
178 * input.c (minput_config_variable): Check custom->vars (not
181 2007-03-01 Kenichi Handa <handa@m17n.org>
183 * input.c (reload_im_info): Setup cmds, vars, and title of
185 (check_variable_value): Fix the return value.
187 * database.c (mdatabase__check): If necessary, update database and
190 2007-02-28 Kenichi Handa <handa@m17n.org>
192 * database.c (get_dir_info): Set dir_info->status to
194 (check_version): New function.
195 (register_database): Don't call find_database.
196 (register_databases_in_files): Don't register a database of
198 (mdatabase__update): Likewise. Avoid unnecessary scanning.
200 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
201 and MDB_STATUS_OUTDATED.
203 * font.h (struct MFont): Types of members type, source, and
204 spacing changed to unsigned.
206 * internal-gui.h (struct): Types of members category and type
209 * internal.h (struct MText): Types of members format and coverage
212 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
213 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
215 2007-02-23 Kenichi Handa <handa@m17n.org>
217 * input.c (Mpop): New variable.
218 (fully_initialize): Initialize Mpop.
219 (parse_action_list): Handle Mpop.
220 (take_action_list): Likewise.
221 (handle_key): When a key is unhandled, shift to the initial state
222 only if the current state has no branch action.
224 2007-02-12 Kenichi Handa <handa@m17n.org>
226 * input.c (get_preceding_char): Unref mt if necessary.
227 (get_following_char): Likewise.
228 (parse_action_list): Fix handling of `insert' action as
230 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
231 (take_action_list): Check invalid candidate list.
233 2007-02-06 Kenichi Handa <handa@m17n.org>
235 * input.c (integer_value): Check also ic->produced for @-N.
237 2007-01-26 Kenichi Handa <handa@m17n.org>
239 * database.c (mdatabase__update): Check mdatabase__dir_list from
242 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
244 2007-01-12 Kenichi Handa <handa@m17n.org>
246 * input.c (handle_key): Handle a branch action of the initial
249 2007-01-10 Kenichi Handa <handa@m17n.org>
251 * m17n-gd.c (gd_render): Delete superfluous line.
253 2006-12-26 Kenichi Handa <handa@m17n.org>
255 * m17n.h (minput_callback): Extern it.
257 * input.h (minput__callback): Delte extern.
259 * input.c (get_surrounding_text): Adjusted for the change of
260 minput__callback to minput_callback.
261 (delete_surrounding_text): Likewise.
262 (minput_create_ic): Likewise.
263 (minput_destroy_ic): Likewise.
264 (minput_filter): Likewise.
265 (minput_set_spot): Likewise.
266 (minput_toggle): Likewise.
267 (minput_reset_ic): Likewise.
269 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
270 and ic->candidate_to to 0.
271 (minput_callback): Renamed from minput__callback.
273 * input-gui.c (win_callback): Adjusted for the change of
274 minput__callback to minput_callback.
276 2006-12-15 Kenichi Handa <handa@m17n.org>
278 * font-ft.c (ft_add_font): Fix typo.
280 2006-12-06 Kenichi Handa <handa@m17n.org>
282 * Version 1.3.4 released.
284 2006-11-16 Kenichi Handa <handa@m17n.org>
286 * input.c (parse_action_list): Allow (undo 0).
287 (adjust_markers): New function.
288 (preedit_insert, preedit_delete): Call adjust_markers.
289 (preedit_replace): New function.
290 (update_candidate): Call preedit_replace instead of preedit_insert
292 (filter): When ic_info->commit_key_head is nonzero, shift input
293 event keys even if there's no committed text.
295 2006-11-10 Kenichi Handa <handa@m17n.org>
297 * input.h (MInputContextInfo): New member commit_key_head.
299 * input.c (preedit_commit): Update ic_info->commit_key_head.
300 (take_action_list): Reset ic_info->commit_key_head on Mundo.
301 (filter): When committed, shift keys by ic_info->commit_key_head.
303 2006-10-30 Kenichi Handa <handa@m17n.org>
305 * input.c (preedit_delete): Fix typo.
306 (take_action_list): Print more debugging information. Allow
307 variable in arg of 'select' and `pushback'.
309 * database.c (gen_database_name): Don't put extra space.
310 (load_database): Print debugging information.
311 (register_databases_in_files): New arg headlen. Callers changed.
312 (mdatabase__load_for_keys): Shorten debugging information.
313 (mdatabase_load): Don't print debugging information here.
315 2006-10-27 Kenichi Handa <handa@m17n.org>
317 * input.c (marker_code): New arg surrounding. Callers changed.
318 (surrounding_pos): Check if name[0] == '@'.
319 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
320 (take_action_list): Likewise.
321 (get_preceding_char): If POS is zero, always call
322 get_surrounding_text.
324 2006-10-19 Kenichi Handa <handa@m17n.org>
326 * input.c (load_variables): Fix setting of `global'.
328 2006-10-16 Kenichi Handa <handa@m17n.org>
330 * draw.c (draw_background): Be sure to set *to_x.
331 (render_glyph_string): If from == to, just return.
333 2006-10-18 Kenichi Handa <handa@m17n.org>
335 * database.c (get_dir_info): Return NULL if the directory name is
337 (register_databases_in_files): Call register_database with
339 (mdatabase__update): Fix logic. Call register_database with
341 (mdatabase_define): Call register_database with
344 * input.c (delete_surrounding_text): Be sure to set members
345 preceding_text and following_text to NULL.
346 (shift_state): Save variable values in ic_info->vars_saved.
347 (preedit_commit): Don't print debug information here. Don't
348 change ic_info->keys here.
349 (get_candidate_list): Don't ref plist.
350 (take_action_list): Don't unref return value of
351 get_candidate_list. For undo, reset ic->produced and recover
352 ic_info->vars. Be sure to set ic->candidate_list to NULL after
354 (init_ic_info): Set ic_info->vars_saved.
355 (fini_ic_info): Unref ic_info->vars_saved.
356 (re_init_ic): Be sure to set ic->candidate_list to NULL after
358 (filter): Be sure to set members preceding_text and following_text
359 to NULL. Print debug information about produced text. Delete
360 processed keys from ic_info->keys.
362 * input.h (MInputContextInfo): New member vars_saved.
364 2006-10-16 Kenichi Handa <handa@m17n.org>
366 * database.c (mdatabase__update): Fix the way to get db_info.
368 2006-10-02 Kenichi Handa <handa@m17n.org>
370 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
371 `size' changed to 24.
373 * font.c (xlfd_unparse_name): Adjusted for the change of
375 (font_score): Likewise.
376 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
378 * m17n-X.c (MFontX, _MFontX): Deleted.
379 (SET_SIZE, HAVE_SIZE): Deleted.
380 (free_display_info): Adjusted for the change of
381 disp_info->font_list format.
382 (xfont_registry_list): Likewise.
383 (xfont_open): Likewise.
384 (xfont_list): Likewise.
385 (xfont_encode_char): Ignore size to find a realized font.
386 (MRealizedFontXft): Change the order of members to make it
387 compatible with MRealizedFontFT.
389 2006-09-27 Kenichi Handa <handa@m17n.org>
391 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
392 (mfont_close): Add comments.
394 * mtext-lbrk.c (mtext_line_break): Add comment.
396 2006-09-26 Kenichi Handa <handa@m17n.org>
398 * input.c (minput_get_description): Handle description about
399 inclusion-only input methods.
401 2006-09-21 Kenichi Handa <handa@m17n.org>
403 * input.c (M_gettext): New variable.
404 (fully_initialize): Initialize M_gettext.
405 (check_description): New function.
406 (load_commands): Call check_description.
407 (config_all_commands): Be sure to unref pl.
408 (load_variables): Call check_description.
409 (config_all_variables): Be sure to unref pl.
410 (load_im_info): Call check_description.
412 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
414 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
415 and bind_textdomain_codeset.
417 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
419 2006-09-15 Kenichi Handa <handa@m17n.org>
421 * input.c (reload_im_info): Update custom and global info.
422 (init_ic_info): Fix previous change.
424 2006-09-14 Kenichi Handa <handa@m17n.org>
426 * database.c: Include <libgen.h>.
427 (mdatabase__lock): Make a directory if necessary.
429 * input.c (resolve_command): Adjusted for the format change of
430 configured_cmds member.
431 (load_commands, load_variables): Fix for errornous data handling.
432 (config_command, config_variable): New function.
433 (config_all_commands, config_all_variables): Renamed from
434 config_commands and config_variables. Utilize the above function.
435 (check_variable_value): Argument changed. Callers changed.
436 (load_im_info): Call config_all_commands and config_all_variables.
437 (init_ic_info): Adjusted for the format change of configured_vars
439 (minput__init): Initialize Mcustomized, Mconfigured, and
441 (Mcustomized, Mconfigured, Minherited): New variables.
442 (minput_get_command): Be sure to return NULL if an input method
443 use no local command.
444 (minput_get_variable): Be sure to return NULL if an input method
445 use no local variable.
446 (minput_config_command, minput_config_variable)
447 (minput_save_config): Adjusted for the format change of
448 configured_cmds and configured_vars members.
450 * plist.c (write_element): Delete superfluous ':'.
452 2006-09-13 Kenichi Handa <handa@m17n.org>
454 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
455 (minput_config_file): Extern it.
457 * draw.c (Minherited): Declaration moved to input.c.
458 (mdraw__init): Don't initialize Minherited here.
460 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
462 2006-09-07 Kenichi Handa <handa@m17n.org>
464 * textprop.c (mtext_serialize): Call mplist__serialize with the
467 * plist.h (mplist__serialize): Prototype adjusted.
468 (mplist__assq): Extern it.
470 * plist.c: Include <ctype.h>
471 (PUTC, PUTS): New macros.
472 (write_symbol): New function.
473 (write_element): New arg indent.
474 (dump_string, dump_plist_element): Delete them.
475 (mplist__from_string): New arg pretty.
476 (mplist__assq): New function.
477 (mdebug_dump_plist): Use write_element.
479 * mtext.c (mtext_cat_char): Allocate more memory.
480 (mdebug_dump_mtext): Don't escal a newline character.
482 * m17n.h (minput_get_command, minput_get_variable)
483 (minput_config_command, minput_config_variable)
484 (minput_save_config): Extern them.
486 * m17n-core.c: Include <string.h>.
487 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
488 use the stream stdout instead of a file of that name.
490 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
493 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
494 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
495 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
496 (MDEBUG_DUMP): Flush the stream.
498 * input.h (struct _MInputMethodInfo): Delete member im. New
499 members mdb, language, name, extra, cmds, configured_cmds,
500 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
501 (MInputContextInfo): New member tick.
503 * input.c: Big change to improve user-side input method
504 customization. Here, list just public API changes.
505 (minput_get_commands, minput_get_variables)
506 (minput_assign_command_keys, minput_set_variable): Label them
508 (minput_get_command, minput_get_variable)
509 (minput_config_command, minput_config_variable)
510 (minput_save_config): New functions.
512 * database.h (PATH_MAX): Define it if not yet defined.
513 (PATH_SEPARATOR): Likewise.
514 (enum MDatabaseStatus): New enum.
515 (struct MDatabaseInfo): Moved from database.c. New members status,
516 time, lock_file, and uniq_file.
517 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
518 (mdatabase__unlock): Extern them.
520 * database.c: Include <time.h>.
521 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
522 (GEN_PATH): Args changed. Callers changed.
523 (struct MDatabaseInfo): Moved to database.h.
524 (struct MDatabase, mdb_list): Deleted.
525 (mdatabase__list): New var.
526 (get_database_filename): Deleted. Callers changed to use
528 (find_file, get_database_file): New files.
529 (get_dir_info): Initialize new members of MDatabaseInfo.
530 (find_database): Arg chagnded. Callers changed.
531 (free_db_info, register_database, register_databases_in_files):
533 (update_database_list): Deleted.
534 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
535 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
536 (mdatabase__update): New function.
537 (mdatabase__check): Return value changed.
538 (mdatabase__file, mdatabase__lock, mdatabase__save)
539 (mdatabase__unlock): New functions.
541 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
543 * input.c (get_surrounding_text): Return -2 when surrounding text
545 (get_following_char): Likewise.
546 (get_preceding_char): Likewise.
547 (minput__callback): Return 0 if there is a callback function,
550 2006-08-17 Kenichi Handa <handa@m17n.org>
552 * input.c (reset_ic): Use shift_state to setup the current state.
554 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
556 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
557 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
558 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
560 2006-08-02 Kenichi Handa <handa@m17n.org>
562 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
564 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
566 * font-ft.c (ft_encapsulate): Add code for debugging.
567 (mfont__ft_drive_otf): Be sure to encode character before getting
570 2006-07-21 Kenichi Handa <handa@m17n.org>
572 * draw.c (mdraw_text_extents): Fix previous typo.
574 2006-07-19 Kenichi Handa <handa@m17n.org>
576 * draw.c (gstring_width): New arg lbearing.
577 (render_glyph_string): Adjusted for the change of gstring_width.
578 (mdraw_text_extents): Fix lbearing of ink and line metrics.
580 * m17n-core.h (Mlanguage): Extern it.
582 * m17n.h (Mlanguage): Extern deleted.
584 * mtext.c (mtext__init): Initialize Mlanguage.
585 (Mlanguage): Declaration moved from locale.c
587 * locale.c (mlocale__init): Don't initialize Mlanguage here.
588 (Mlanguage): Declaration moved to mtext.c.
590 * language.c (mlang__init): Don't initialize Mlanguage here.
592 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
594 2006-07-14 Kenichi Handa <handa@m17n.org>
596 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
597 (MRealizedFontFT): New member face_encapsulated.
598 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
599 (ft_gen_font): New function.
600 (ft_add_font): Use ft_gen_font.
601 (ft_list_script): Store lists in ft_script_list.
602 (ft_check_otf): New arg ft_face. Caller changed.
603 (ft_check_language): Likewise.
604 (ft_check_script): Likewise.
605 (ft_encapsulate, ft_close): New functions.
606 (mfont__ft_driver): Initialize members encapsulate and close.
607 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
609 * font.h (struct MRealizedFont): New member encapsulating.
610 (struct MFontDriver): New members encapsulate and close.
612 * font.c (mfont__match_p): If FONT is realized, check capability
613 by font drivers's check_capability method.
614 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
617 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
618 declarations of foundry and fam local vars.
619 (xft_driver): Make it static.
621 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
622 (mfont_close): Extern them.
624 * m17n-gd.c (device_open): Don't specify foundry and family of the
627 2006-07-11 Kenichi Handa <handa@m17n.org>
629 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
631 2006-07-13 Kenichi Handa <handa@m17n.org>
633 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
635 (ft_check_script): Delete unused var.
636 (ft_list_capability): Likewise.
638 * font.c (mfont__get_capability): Setup cap->otf.
639 (Motf): Make it global.
640 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
642 * font.h (MFontCapability): New member otf.
644 * language.c (mlang__fini): Delete unused vars.
646 * m17n-gui.h (Motf): Extern it.
648 * database.c (update_database_list): Delete unused vars.
650 2006-07-07 Kenichi Handa <handa@m17n.org>
652 * font-ft.c (DEVICE_DELTA): Fix typo.
654 2006-07-06 Kenichi Handa <handa@m17n.org>
656 * fontset.c (mfont__lookup_fontset): Don't ignore family and
659 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
661 * database.c: Update comments.
663 2006-07-05 Kenichi Handa <handa@m17n.org>
665 * database.c (PATH_MAX): Define it if not yet defined.
666 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
668 (get_database_filename): Use GEN_PATH.
669 (get_dir_info): Don't include the last '/' in directory name.
670 (register_database): New function.
671 (update_database_list): Use register_database. Search all
672 directories in mdatabase__dir_list for wildcard databases.
673 (mdatabase__init): Check "~/.m17n.d".
675 2006-07-03 Kenichi Handa <handa@m17n.org>
677 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
678 push reverse property.
680 * plist.c (dump_plist_element): Fix previous change.
682 2006-06-28 Kenichi Handa <handa@m17n.org>
684 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
687 * draw.c (MbidiNSM): New variable.
688 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
689 attention to bidi type NSM.
690 (mdraw__init): Initialize MbibiNSM.
692 * language.c (mscript__char_list): Fix finding a char-list element.
694 * plist.c (dump_string): Return number of printed characters.
695 (dump_plist_element): Print elements more compactly.
697 2006-06-23 Kenichi Handa <handa@m17n.org>
699 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
700 (include_HEADERS): Likewise.
702 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
704 * language.c: Update documentation.
706 2006-06-23 Kenichi Handa <handa@m17n.org>
708 * font-ft.c (struct MFontFT): Delete member lang.
709 (free_ft_info): Don't unref member lang. Destroy members langset
711 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
712 changed. Set members langset and charset.
713 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
715 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
717 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
718 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
719 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
720 characters at first. If it fails, try listing by language names.
721 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
722 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
723 change of MFontCapability.
724 (ft_list_capability): Likewise. Try listing by languages, then by
725 scripts. Check OTF at last.
726 (ft_check_script): New function.
727 (ft_select): Adjusted for the check of MFontCapability.
728 (ft_list_family_names): New function.
729 (ft_check_capability): If cap->script is not Mnil, call
731 (mfont__ft_driver): Initialize with ft_list_family_names.
733 * font.h (struct MFontDriver): New member list_fmaily_names.
734 (struct): Change member "MSymbol *lang" to "MSymbol language".
736 * font.c: Include "language.h".
737 (Motf): New variable.
738 (otf_script_list, load_otf_script_list): Delete it.
739 (find_script_from_otf_tag): Delete it.
740 (merge_capability): New function.
741 (mfont__init): Init Motf.
742 (mfont__fini): Don't unref otf_script_list.
743 (free_font_capability): Check cap->script_tag to determine if
744 OTF-related capability is set.
745 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
746 the change of type MFontCapability.
747 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
749 (mfont_list): Call merge_capability for LANGUAGE arg.
750 (mfont_list_family_names): New function.
752 * input-gui.c: Typo in comments fixed.
754 * input.c: Typo in comments fixed.
756 * language.h (mlanguage__list): Delete it.
757 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
760 * language.c: Include "mtext.h".
761 (M_script_lang_list): Delete it.
762 (language_list, script_list): New variables.
763 (load_lang_script_list, init_language_list, init_script_list): New
765 (mlang__init): Don't load language database here.
766 (mlang__fini): Unref language_list and script_list if not NULL.
767 (mlanguage__list): Delete it.
768 (mlanguage__info, mscript__info, mscript__char_list)
769 (mscript__otf_tag, mscript__from_otf_tag): New functions.
770 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
771 (mscript_list, mscript_language_list): New functions.
773 * m17n-gui.h (mfont_list_family_names): Extern it.
775 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
776 (mlanguage_text, mscript_list, mscript_language_list): Extern
779 2006-06-21 Kenichi Handa <handa@m17n.org>
781 * m17n-X.c (xfont_driver): Initialize with
782 xfont_list_family_names.
783 (xfont_list_family_names): New function.
784 (xft_driver): Initialize with NULL for list_family_names member.
785 (device_init): Set list_family_names member of xft_driver to that
788 2006-06-06 Kenichi Handa <handa@m17n.org>
790 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
792 2006-03-24 Kenichi Handa <handa@m17n.org>
794 * font-ft.c (ft_open): Improve debug message.
796 * fontset.c (mfontset__get_font): Fix for the case that no font in
797 per_script list is available.
799 2006-02-06 Kenichi Handa <handa@m17n.org>
801 * Version 1.3.3 released.
803 2006-02-22 Kenichi Handa <handa@m17n.org>
805 * textprop.c: Fix some typos in documentation.
807 * plist.c: Fix some typos in documentation.
809 * m17n-core.h: Fix some typos in documentation.
810 (M17NLIB_PATCH_LEVEL): Updated to 3.
811 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
813 * symbol.c: Fix some typos in documentation.
815 * mtext.c: Fix some typos in documentation.
817 * input.c: Fix several typos in documentation.
819 2006-02-06 Kenichi Handa <handa@m17n.org>
821 * Version 1.3.2 released.
823 2006-02-03 Kenichi Handa <handa@m17n.org>
825 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
826 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
828 * font.c (xlfd_parse_name): Fix handling of the name "nil".
830 * draw.c (layout_glyphs): Fix handling left_padding of
833 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
835 2006-02-02 Kenichi Handa <handa@m17n.org>
837 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
840 2006-01-25 Kenichi Handa <handa@m17n.org>
842 * input.c (resolve_expression): If the value of PLIST is a plist,
843 but the first element is not symbol, return 0.
845 2006-01-17 Kenichi Handa <handa@m17n.org>
847 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
848 HAVE_GD is 2 or the greater.
850 2006-01-16 Kenichi Handa <handa@m17n.org>
852 * Version 1.3.1 released.
854 2006-01-16 Kenichi Handa <handa@m17n.org>
856 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
857 simulating anti-aliasing.
859 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
860 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
862 2006-01-12 Kenichi Handa <handa@m17n.org>
864 * input.c (get_surrounding_text): Always pop ic->plist.
865 (reset_ic): Don't reset ic->plist.
867 2006-01-10 Kenichi Handa <handa@m17n.org>
869 * input.c (preedit_commit): For debugging, print only commiting
870 charactes. Don't set ic->candidate_show to 0.
871 (handle_key): Don't run branch-actions just by shifting to the
873 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
874 Reset vars and plist.
876 2006-01-07 Kenichi Handa <handa@m17n.org>
878 * input.c (load_branch): Confirm that maps is not NULL.
880 2006-01-05 Kenichi Handa <handa@m17n.org>
882 * input-gui.c (win_filter): Try to convert arg to key only when
885 * plist.c (read_integer_element): If '#' and '-' are followed by
886 non-integer-constituent, read them as a part of a symbol.
887 (read_symbol_element): New arg C.
888 (read_element): Adjust args to read_symbol_element.
890 * input.c (load_macros): On overwriting a macro, free the old
892 (minput__init): Store Mmap in load_im_info_keys.
893 (minput_get_title_icon): If the input method has no title, be sure
895 (minput_get_description): If the input method has no description,
896 be sure to return NULL.
897 (minput_get_variables): Fix documentation.
898 (handle_key): Pay attention to the case that key is Mnil.
899 (filter): Likewise. Fix handling of such symbol as S-A.
901 2005-12-22 Kenichi Handa <handa@m17n.org>
903 * Version 1.3.0 released.
905 2005-12-22 Kenichi Handa <handa@m17n.org>
907 * font-ft.c (ft_list): If the specified font has no property,
910 2005-12-20 Kenichi Handa <handa@m17n.org>
912 * character.c (mchar_get_prop): Check char_prop_list.
913 (mchar_put_prop, mchar_get_prop_table): Likewise.
915 2005-12-18 Kenichi Handa <handa@m17n.org>
917 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
918 file name sans language.
920 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
922 * input.c: Fix typo in comments.
924 2005-12-14 Kenichi Handa <handa@m17n.org>
926 * input.c (minput_get_title_icon): Check the default icon for the
929 2005-12-13 Kenichi Handa <handa@m17n.org>
931 * input.c (Mless_equal, Mgreater_equal): New variables.
932 (parse_expression, resolve_expression, parse_action_list)
933 (take_action_list): Handle the aboves.
934 (filter): Treat key S-X as X.
935 (minput__init): Initialize Mless_equal and Mgreater_equal.
936 (minput_get_title_icon): New function.
938 * m17n.h (minput_get_title_icon): Extern it.
940 * database.c (get_database_filename): Return a filename instead of
942 (load_database): Adjusted for the above change.
943 (mdatabase__load_for_keys): Likewise.
944 (mdatabase__find_file): New function.
946 * database.h (mdatabase__find_file): Extern it.
948 * font.h (mfont__resize): Delete extern.
950 * font.c (mfont__list): Check resize ratio.
951 (mfont__resize): Delete it.
952 (mfont_resize_ratio): Include the code of mfont__resize.
954 * font-ft.c (ft_open): Check resize ratio.
956 * m17n-X.c (xfont_open): Check resize ratio.
957 (xft_open): Likewise.
959 2005-12-07 Kenichi Handa <handa@m17n.org>
961 * input.c (take_action_list): If take_action_list return -1,
963 (handle_key): Likewise.
965 * face.c (mface__for_chars): When font is specified and layouter
966 is found for it, if the layouter doesn't support one of a
967 character, use a face sans layouter for it.
969 2005-12-06 Kenichi Handa <handa@m17n.org>
971 * fontset.c (mfont__lookup_fontset): If only a fallback font is
972 found, don't use it for more than one character.
974 2005-12-05 Kenichi Handa <handa@m17n.org>
976 * face.c (mface__realize): Set rfont->layouter to Mnil.
977 (mface__for_chars): Fix handling of layouter.
979 * character.h (mchar__define_prop): Extern it.
981 * database.c (update_database_list): Call mchar__define_prop if
984 * character.c (mchar__init): Don't call mchar_define_property.
985 Instead just initialize property keys.
986 (mchar__fini): Free char_prop_list only if it's not NULL.
987 (mchar__define_prop): New function.
988 (mchar_define_property): Call mchar__define_prop.
990 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
993 2005-12-02 Kenichi Handa <handa@m17n.org>
995 * language.c (mlang__init): Handle extra chars.
997 * m17n-gui.h (mfont_check): Adjust prototype.
999 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1000 (xfont_check_capability): New function.
1001 (xft_driver): Specify xft_check_capability.
1002 (xft_check_capability): New function.
1004 * font-ft.c (M0_3): Delete it.
1006 (ft_get_charmaps): Refer to M0.
1007 (fc_parse_pattern): Fix previous change.
1008 (ft_list_language): Check also extra chars.
1009 (ft_check_otf): Define it even if HAVE_OTF is undef.
1010 (ft_check_lang): Check the result of FcLangSetHasLang against
1011 FcLangDifferentLang. Check also extra chars.
1012 (ft_list_capability): Delete ifdef HAVE_OTF.
1013 (ft_select): Likewise.
1014 (ft_open): Improve debug information.
1015 (ft_check_capability): New function.
1016 (mfont__ft_driver): Specify ft_check_capability.
1017 (mfont__ft_init): Initialize M0.
1019 * fontset.c (get_font_from_group): New function.
1020 (mfontset__get_font): New function.
1022 * fontset.h (mfontset__get_font): Extern it.
1024 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1025 (mfont__fini): Delete ifdef HAVE_OTF.
1026 (free_font_capability): Likewise.
1027 (mfont__get_capability): Likewise.
1028 (mfont__check_capability): New function.
1029 (mfont_check): Change the order of arguments. Use
1032 * font.h (struct MFontDriver): New member check_capability.
1033 (MFontCapability): Delete ifdef HAVE_OTF.
1034 (mfont__check_capability): Extern it.
1036 * face.c (mface__realize): Fix handling of FONT arg.
1037 (mface__for_chars): Fix handling of explicitly specified font.
1039 2005-11-25 Kenichi Handa <handa@m17n.org>
1041 * font-flt.c (run_command): Print debug info for
1044 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1046 * face.c (mface__for_chars): Check rfont before accessing the
1049 2005-11-21 Kenichi Handa <handa@m17n.org>
1051 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1054 * fontset.c (fontset_table): New variable.
1055 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1056 (mfont__fontset_init): Add fontset_table as an object array.
1057 (mfont__realize_fontset): Ref FONTSET.
1058 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1059 (mfontset): Call M17N_OBJECT_REGISTER.
1060 (mfontset_copy): Likewise.
1062 * input.c (handle_key): For debugging, print information about
1064 (filter): Add an alias for Meta and Alt modifiers.
1065 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1067 (minput__init): Initialize them.
1068 (parse_expression): New function.
1069 (resolve_expression): New function.
1070 (parse_action_list): Handle expressions by parse_expression.
1071 (take_action_list): Handle expressions by resolve_expression.
1072 (parse_nested_list_value): Fix previous change.
1073 (resolve_command): Fix handling of the return value of
1076 2005-11-18 Kenichi Handa <handa@m17n.org>
1078 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1079 HAVE_OTF is defined.
1080 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1082 (ft_select): Likewise.
1084 * font.c (mfont_list): Fix for the case that FONT is NULL.
1085 (OTF_tag): Delete it.
1086 (load_otf_script_list): Define only when HAVE_OTF is defined.
1087 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1090 * draw.c (truncate_gstring): Be sure to truncate at
1091 glapheme-cluster boundary.
1093 2005-11-11 Kenichi Handa <handa@m17n.org>
1095 * input.c (delete_surrounding_text): Clear cache if necessary.
1097 2005-11-09 Kenichi Handa <handa@m17n.org>
1099 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1100 glyph prev is also supported by the current flt.
1102 2005-11-08 Kenichi Handa <handa@m17n.org>
1104 * m17n-X.c (xft_render): Cancel previous change.
1106 2005-11-07 Kenichi Handa <handa@m17n.org>
1108 * input.c: Include <stdlib.h>.
1109 (get_surrounding_text, delete_surrounding_text)
1110 (get_preceding_char, get_following_char): New functions.
1111 (integer_value): New arg surrounding. If it is nonzero, try to
1112 get a surrounding character. Callers changed.
1113 (take_action_list): Check `value' before setting an element.
1114 (destroy_ic): Unref ic_info->preceding_text and
1115 ic_info->following_text.
1116 (minput__init): Initialize Minput_get_surrounding_text and
1117 Minput_delete_surrounding_text.
1118 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1120 (filter): Unref ic_info->preceding_text and
1121 ic_info->following_text.
1123 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1126 * input.h (MInputContextInfo): New members preceding_text and
1129 2005-11-04 Kenichi Handa <handa@m17n.org>
1131 * input.c (parse_nested_list_value): Fix handling of the global
1133 (get_nested_list): Get global definitions by load_partial_im_info.
1134 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1135 MInputCandidatesChanged.
1136 (take_action_list): Likewise.
1137 (reset_ic): Likewise.
1138 (create_ic): Don't pay special attention to
1139 Mcandidates_group_size.
1140 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1141 (minput_set_variable): Get a definition of varible by
1142 mplist_find_by_value, not mplist_get.
1144 * m17n.h (enum MInputCandidatesChanged): New enum.
1146 2005-11-01 Kenichi Handa <handa@m17n.org>
1148 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1150 (mwin__destroy_window): If xft_draw's drawable is win, change it
1151 to device->drawable before destroying win.
1153 2005-10-31 Kenichi Handa <handa@m17n.org>
1155 * input.c (load_im_info): Fix adding of state.
1157 * m17n-core.c (m17n_fini_core): Fix reporting of module
1160 * m17n.c (m17n_fini): Fix reporting of module finalization.
1162 * m17n-gui.c (m17n_init_win): Fix reporting of module
1165 2005-10-29 Kenichi Handa <handa@m17n.org>
1167 * input.c (get_candidate_list): Fix the timing of referring plist.
1169 2005-10-28 Kenichi Handa <handa@m17n.org>
1171 * input.c (load_branch): Ignore an undefined map name.
1172 (load_im_info): Set im_info->title from `name' only if it's not
1174 (shift_state): Always update ic->status.
1175 (adjust_candidates): Renamed from adjust_candidate_command.
1176 Argument changed. Caller changed.
1177 (get_candidate_list, regularize_action): New functions.
1178 (take_action_list): Use them. On handling Munhandle, don't set
1180 (handle_key): If KEY is not handled by MAP, and MAP has
1181 branch_actions, perform them.
1183 * database.c (mdatabase__fini): Free dir_info->filename;
1185 2005-10-20 Kenichi Handa <handa@m17n.org>
1187 * input.c (marker_code): Accept '@@'.
1188 (integer_value): Handle '@@'.
1189 (parse_action_list): Accept a symbol argument.
1190 (take_action_list): Resolve the symbol argument. Handle the
1193 2005-10-18 Kenichi Handa <handa@m17n.org>
1195 * input.c: Include "charset.h".
1196 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1198 (MIMState): New member (M17NObject control).
1199 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1200 (get_nested_list, resolve_variable): New functions.
1201 (integer_value): New arg (MPlist **value). Set it to the plist
1202 element containing the value.
1203 (resolve_command): New function.
1204 (load_translation): New arg (MPlist *map_actions).
1205 (load_branch): New args language and name. If `keylist' is a
1206 symbol, resolved that as a command name.
1207 (free_map): New arg top. Free map->map_actions only if top is
1209 (free_state): New function.
1210 (load_state): New arg name.
1211 (im_info_list): New variable.
1212 (free_im_info, get_im_info_by_tags): New functions.
1213 (load_im_info): Arg key changed to plist. Handle `include'.
1214 Return (MInputMethodInfo *).
1215 (preedit_commit): Ref ic->candidate_list.
1216 (get_select_charset, adjust_candidate_command): New functions.
1217 (take_action_list): Handle `include'. Adjust candidate action
1218 properly. Handle control variables `candidates-charset' and
1219 `candidates-group-size'.
1220 (open_im): Use get_im_info.
1221 (create_ic): Get global variables.
1222 (load_partial_im_info): New function.
1223 (get_im_info): New function.
1224 (check_command_keyseq, check_command_list, check_variable_list):
1226 (minput__init): Don't handle M_database_hook and Mdetail_text.
1227 Initialize M_candidates, Mcandidates_group_size,
1228 Mcandidates_charset.
1229 (parse_variable_list, get_variable_list, parse_command_list)
1230 (get_command_list): Delete them.
1231 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1232 (minput__fini): Simply unref command_list and variable_list.
1233 (minput_get_description): Adjusted for the new form of description.
1234 (minput_get_commands): Use get_nested_list.
1235 (minput_assign_command_keys): Likewise.
1236 (minput_get_variables, minput_set_variable): Likewise.
1238 * input.h (MInputMethodInfo): New members im and maps.
1240 * database.h (M_database_hook): Delete extern.
1241 (MDatabaseHookFunc): Delete extern.
1242 (mdatabase__check): Extern it.
1244 * database.c: Include <glob.h>.
1245 (MAX_TIME): New macro.
1246 (Masterisk): New variable.
1247 (get_database_stream): Argument changed to (MDatabaseInfo *).
1249 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1250 (find_database): New function.
1251 (update_database_list): New function.
1252 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1253 calling update_database_list.
1254 (mdatabase__check): New function.
1255 (mdatabase_find): Use update_database and find_database. Don't
1256 handle MDatabaseHookFunc.
1257 (mdatabase_list): Call update_database at first.
1258 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1259 (MDatabaseList): New type.
1261 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1263 * m17n.h (Mdetail_text): Delete extern.
1265 * m17n-core.h (mplist_conc): Delete extern.
1267 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1269 (mplist_conc): Renamed to mplist__conc.
1270 (mplist__pop_unref): New function.
1272 2005-10-14 Kenichi Handa <handa@m17n.org>
1274 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1276 (read_element): If keys is an empty plist, return any element
1278 (dump_plist_element): Check if plist is nested.
1279 (mplist_conc): Always ref tail.
1280 (mplist_set): If key is a managing key, ref val in advance.
1282 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1283 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1284 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1287 * fontset.c (free_fontset): Unref fontset_list if necessary.
1288 (mfont__fontset_fini): Don't free fontset_list. Unref
1290 (mfont__realize_fontset): Initialize request.
1291 (mfontset): Ref default_fontset or fontset only if necessary.
1292 (mfontset_copy): Don't ref copy.
1294 * draw.c (render_glyphs): Check gend->type before checking
1297 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1298 unrefed plists to NULL.
1300 2005-10-04 Kenichi Handa <handa@m17n.org>
1302 * textprop.c (mtext_serialize): Be sure to make mt
1303 MTEXT_FORMAT_UTF_8 and NULL terminated.
1305 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1307 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1309 2005-10-03 Kenichi Handa <handa@m17n.org>
1311 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1312 is not at the beginning of line.
1314 2005-09-22 Kenichi Handa <handa@m17n.org>
1316 * input.c: Include <sys/stat.h> and <unistd.h>.
1317 (Minclude, Mcommit, Munhandle): New variables.
1318 (minput__init): Initialize them. Push only Mstate to
1319 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1320 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1322 (load_input_method): Handle "include" directive. If no states are
1324 (shift_state): If state_name is Mt, shift back to the previous
1325 state. Call preedit_commit to commit preedit text.
1326 (preedit_commit): New function.
1327 (take_action_list): Improve debug printing. Handle commit and
1329 (handle_key): Check the return value of take_action_list. Don't
1330 take branch_actions just after changing to the root map.
1331 (reset_ic): Reset all ic_info members.
1332 (filter): When a key is not handled, just move ic_info->keys
1333 instead fo calling reset_ic.
1334 (load_im_info): If key is not Mstate, push Mmap to
1336 (MDatabaseStatList): New type.
1337 (imdir_stat_list): New variable.
1338 (input_method_hook): Don't cancel the hook. Check the
1339 modification time of directories.
1340 (minput__fini): Free imdir_stat_list;
1342 * input.h (MInputContextInfo): New member prev_state.
1344 * m17n-core.h (mplist_conc): Extern it.
1346 * plist.c (mplist_conc): New function.
1348 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1350 * font.h (MRealizedFont): New member average_width.
1352 * font-ft.c (ft_open): Set rface->average_width.
1354 * font.c (xlfd_unparse_name): Print '*' before registry name.
1356 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1357 (xfont_open): Set rfont->average_width.
1358 (xft_open): Likewise.
1359 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1361 * internal-gui.h (struct MFrame): New member average_width.
1363 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1364 (mframe_get_prop): Return the average_width of a font.
1366 * face.c (mface__realize): Set rface->average_width.
1367 (mface__update_frame_face): Set frame->average_width.
1369 * face.h (MRealizedFace): New member average_width.
1371 2005-09-19 Kenichi Handa <handa@m17n.org>
1373 * font.c (xlfd_unparse_name): New arg full_xlfd.
1374 (mfont__encode_char): Use shortcut only for X core fonts.
1375 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1376 (mfont_put_prop): Handle `language' property.
1377 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1378 Print file can capability info too.
1380 * m17n-core.c (mdebug__output): New variable.
1381 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1382 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1383 (m17n_fini_core): Close mdebug__output if it's not stderr.
1385 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1386 (xfont_open): Handle baseline_offset.
1387 (xfont_find_metric): Likewise.
1388 (xfont_render): Likewise.
1389 (xft_open): Likewise.
1390 (xft_render): Likewise.
1392 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1393 (mdebug__output): Extern it.
1394 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1395 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1396 (MDEBUG_DUMP): New macro.
1397 (MDEBUG_PRINT_TIME): Print to medebug__output.
1399 * font.h (MRealizedFont): New member baseline_offset.
1401 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1403 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1404 (ft_list_family): Check alias.
1405 (ft_list_language): If language is "en", don't try to the second
1407 (ft_default_list): New variable.
1408 (ft_list_default): New function.
1409 (ft_select): If family is not specified, try only the default
1410 fonts. Treat the weights normal and medium same.
1411 (ft_open): Fix debug message. If registry is not specified, try
1412 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1413 (ft_find_metric): Likewise.
1414 (ft_render): Likewise.
1415 (ft_list): Fix debug message. Accept the registring iso8859-1.
1416 If family is not specified, try only the default fonts.
1418 * face.c (mface__realize): Fix logic of opening a font.
1420 2005-09-16 Kenichi Handa <handa@m17n.org>
1422 * face.c (mface__realize):
1424 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1427 * input.c (shift_state): Fix the condition of taking init actions.
1428 (take_action_list): Fix handling of pushback action.
1429 (handle_key): Don't change key while checking its alias.
1430 (minput__init): Initialize new variables.
1431 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1434 2005-09-12 Kenichi Handa <handa@m17n.org>
1436 * mtext.c (mtext__uppercase): Add proper open/close parens.
1437 (mtext_titlecase): Add proper casting.
1439 * input.c (parse_action_list): Handle the case that the arg is a
1440 key sequence (MText or MPlist).
1441 (take_action_list): Likewise.
1442 (shift_state): Shorter debug message.
1443 (handle_key): Terminate a debug message by "\n".
1444 (reset_ic): Don't take initial actions here.
1445 (minput_open_im): Print a debug message.
1446 (minput_close_im): Likewise.
1447 (minput_create_ic): Likewise.
1448 (minput_destroy_ic): Likewise.
1450 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1452 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1455 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1456 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1459 * character.c: Add Japanese documentation for
1460 mchar_get_prop_table ().
1462 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1464 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1465 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1466 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1468 (init_case_conversion): New function.
1469 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1470 (uppercase_precheck, lowercase_precheck, final_sigma)
1471 (after_soft_dotted, more_above, before_dot, after_i)
1472 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1474 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1476 * plist.c (read_mtext_element): Fix previous change.
1478 2005-09-05 Kenichi Handa <handa@m17n.org>
1480 * plist.c (read_mtext_element): Handle \uXXXX notation.
1482 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1483 (MTABLE_ALLOCA): Change the name of local variable.
1485 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1486 HAVE_FREETYPE are defined.
1488 * m17n-X.c: Check HAVE_X11.
1490 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1491 directory listing libraries.
1492 (noinst_PROGRAMS): Define it only in maintainer mode.
1494 2005-09-02 Kenichi Handa <handa@m17n.org>
1496 * m17n-gui.h (mdraw_line_break_option): Extern it.
1498 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1499 end of the first glyph.
1500 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1502 (mdraw_line_break_option): New variable.
1503 (mdraw_default_line_break): Use mtext_line_break.
1505 * mtext.h (wordseg_func_table): Don't extern it.
1506 (mtext__wseg_fini): Extern it.
1508 * mtext.c: Don't include word-thai.h.
1509 (wordseg_func_table): Delete this variable.
1510 (mtext__init): Don't initialize above. Don't call
1511 mtext__word_thai_init.
1512 (mtext__fini): Don't free wordseg_func_table. Call
1513 mtext__wseg_fini instead fo mtext__word_thai_fini.
1514 (MTextWordsegFunc): Don't typedef it.
1515 (mtext__word_segment): Moved to mtext-wseg.c.
1517 * m17n-core.h (enum MTextLineBreakOption): New enum.
1518 (mtext_line_break): Extern it.
1520 * mtext-wseg.c: New file.
1522 * mtext-lbrk.c: New file.
1524 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1525 add mtext-lbrk.c and mtext-wseg.c.
1527 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1528 the case that head is NULL.
1530 2005-09-01 Kenichi Handa <handa@m17n.org>
1532 * word-thai.c (wordseg_propertize): If the property value is nil,
1533 don't make the property no-merge.
1534 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1535 attention to the case that they are NULL.
1536 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1539 * character.c (mchar_get_prop_table): New function.
1541 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1543 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1544 (mchar_get_prop_table): Extern it.
1546 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1547 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1549 * internal.h (enum MTextCoverage): New enum.
1550 (MText): New member coverage.
1552 * mtext.c (FORMAT_COVERAGE): New macro.
1553 (insert): Copy mt2->coverage.
1554 (mtext__from_data): Initialize mt->coverage.
1555 (mtext__adjust_format): Update mt->coverage.
1556 (mtext): Initialize mt->coverage.
1557 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1558 Update mt->coverage if necessary.
1559 (mtext_duplicate): Copy mt->coverage.
1560 (mtext_insert, mtext_replace): New functions.
1561 (mtext_dup): Use mtext_duplicate.
1562 (mtext__word_segment): Don't set *from and *to if a word
1563 segmentation funcion is not found.
1564 (mtext_ins_char): Fix typo.
1566 2005-08-25 Kenichi Handa <handa@m17n.org>
1568 * font.h (MFont): New member for_full_width.
1570 * font.c (compare_font_score): Prefer a font of not
1573 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1574 registry charset of a font is one of CJK charsets.
1576 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1577 supports some of CJK.
1579 2005-08-24 Kenichi Handa <handa@m17n.org>
1581 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1583 * m17n-gui.c (null_device_open): Check Mresolution param and set
1586 * m17n-gd.c (device_open): Check Mresolution param and set
1589 * m17n-X.c (MWDevice): New member resy.
1590 (xfont_open): Set ascent, descent, and max_advance members of
1592 (xft_open): Likewise.
1593 (device_open): Compare also screen_num to find a device. Set
1594 device->resy and frame->dpi.
1596 * internal-gui.h (MFrame): New member dpi.
1598 * font.h (MRealizedFont): New member max_advance.
1600 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1601 (mfont__init): Don't initialize Mascent, Mdescent.
1602 (Mascent, Mdescent): Delete these variables.
1603 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1604 Mfont_descent instead of Mascent and Mdescent.
1605 (mfont_put_prop): Allow negative size.
1606 (mfont_find): Handle the case of spec->size < 0. Fix previous
1608 (mfont_list): Handle the case of spec->size < 0.
1609 (mfont_check): Likewise.
1611 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1612 (fc_get_pattern): Handle the case of font->size < 0.
1613 (ft_open): Set ascent, descent, and max_advance members of rfont.
1614 (ft_find_metric): Improve rounding.
1615 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1618 * face.c (mface__realize): Handle the case of font->size < 0.
1620 2005-08-22 Kenichi Handa <handa@m17n.org>
1622 * coding.c (MConverterStatus): Change the member buf to union.
1623 (mconv_buffer_converter): Add const to the arg buf.
1624 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1625 (mconv_decode): Adjusted for the change of MConverterStatus.
1626 (mconv_encode_range): Likewise.
1628 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1629 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1631 2005-08-20 Kenichi Handa <handa@m17n.org>
1633 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1634 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1636 * m17n-X.c (xfont_open): Set members ascent, descent, and
1637 max_advance of rfont.
1638 (xft_open): Likewise.
1640 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1642 (mfont__ft_parse_name): Add const to the arg name.
1644 * font.c (xlfd_parse_name): Add const to the arg name. Call
1645 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1646 (xlfd_unparse_name): Handle spacing.
1647 (mfont__init): Initialize new variables.
1648 (mfont__id): Handle spacing.
1649 (mfont__merge): Likewise.
1650 (mfont__set_spec): This function deleted.
1651 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1652 condition of calling mfont__ft_parse_name.
1653 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1654 (mfont_get_prop): Handle properties spacing, ascent, descent,
1656 (mfont_find): Return a realized font.
1657 (mfont_from_name): Add const to the arg name.
1659 * font.h (enum MFontProperty): New member MFONT_SPACING.
1660 (enum MFontSpacing): New enum.
1661 (MFont): New members spacing and max_advance.
1662 (mfont__ft_parse_name): Prototype adjusted.
1663 (mfont__set_spec): Extern deleted.
1664 (mfont__parse_name_into_font): Prototype adjusted.
1666 2005-08-19 Kenichi Handa <handa@m17n.org>
1668 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1670 * font.c (mfont_list): If FONT is null, use a temporary font.
1671 (mfont_parse_name): Add const to the arg name.
1673 2005-08-18 Kenichi Handa <handa@m17n.org>
1675 * word-thai.c: Surround code by #ifdef and #endif to escape from
1678 * font-ft.c: Mostly re-written.
1680 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1681 (FontLayoutCmd): Type of the member otf changed..
1682 (load_otf_command): Adjusted for the format change of otf command.
1683 (load_command): Likewise.
1684 (free_flt_command): Unref cmd->body.otf.
1685 (run_otf): Ajusted for the type change of otf_cmd.
1686 (run_command): Ajusted for the type change of otf_cmd. On
1687 debugging, print ctx->combining_code.
1688 (mfont__flt_run): Initialize ctx's members code_offset,
1689 combining_code, and left_padding to 0.
1691 * face.h (struct MRealizedFace): New member font.
1692 (mface__realize): Prototype adjusted.
1694 * face.c (find_realized_face): New arg font.
1695 (find_realized_face): Adjusted for the change of MFont.
1696 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1697 (mface__fini): Don't call mdebug__report_object.
1698 (mface__realize): New arg font.
1699 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1700 Optimize the latin case.
1701 (mface__free_realized): Free rface->font.
1702 (mface__update_frame_face): Adjusted for the change of mface__realize.
1703 (mface_equal): New function.
1705 * draw.c (Mcommon): New variable.
1706 (visual_order): Args to mfont__encode_char changed.
1707 (compose_glyph_string): Handle Mfont text property.
1708 (layout_glyphs): Adjusted for the change of MFont.
1709 (mdraw__init): Initialize Mcommon.
1710 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1712 * font.h (enum MFontType): Members completely changed.
1713 (enum MFontProperty): Move MFONT_SIZE to the tail.
1714 (enum MFontSource): New enum.
1715 (struct MFont): New members type, source, sizes, file, capability,
1717 (struct MRealizedFont): Type of member font changed. Members
1718 score, status, and encoding deleted.
1719 (MFontScore): New type.
1720 (MFontList): Member changed.
1721 (struct MFontDriver): New member has_char. Types of members
1723 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1724 (Mapple_roman): Extern them.
1725 (OTF_Tag): Typedefed if not HAVE_OTF.
1726 (enum MFontOpenTypeTable): New enum.
1727 (MFontCapability): New type.
1728 (mfont__ft_drive_otf): Prototype adjusted.
1729 (mfont__score): Extern deleted.
1730 (mfont__merge): Extern it.
1731 (mfont__has_char): Extern it.
1732 (mfont__encode_char): Prototype adjusted.
1733 (mfont__open): Extern it.
1734 (mfont__set_spec): Prototype adjusted.
1735 (mfont__get_capability): Extern it.
1737 * font.c: Include "fontset.h".
1738 (M_font_capability, M_font_list, M_font_list_len): New variables.
1739 (font_score_priority): Change order of initial elements.
1740 (font_score_shift_bits): Fix array size.
1741 (common_weight): Add "thin", "semibold", and "heavy".
1742 (common_stretch): Add "ultracondensed", "extracondensed",
1743 "extraexpanded", and "utltraexpand".
1744 (font_weight_regular, font_weight_normal, font_weight_medium): New
1746 (gen_font_name): This function deleted.
1747 (find_encoding): Set font->encoding.
1748 (OTF_tag): New function.
1749 (otf_script_list): New variable.
1750 (load_otf_script_list): New function.
1751 (find_script_from_otf_tag): New function.
1752 (xlfd_parse_name): Set font->type and font->source.
1753 (mfont__free_realized): Free chains rfonts.
1754 (font_score): Renamed from mfont__score.
1755 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1756 (Mapple_roman): New variables.
1757 (mfont__init): Initilize new variables. Initalize
1758 default_encoding.encoding_name and
1759 default_encoding.encoding_charset to Municode_full and
1760 mcharset__unicode. Use SAFE* macros for allocating filepath
1762 (mfont__fini): Free otf_script_list.
1763 (mfont__id): New function.
1764 (mfont__match_p): Check also capability member of MFont.
1765 (mfont__merge): New funciton.
1766 (mfont__set_spec_from_face): Set type and source members.
1767 (mfont__set_spec_from_plist): Set capability and type members.
1768 (mfont__select): Argument changed.
1769 (mfont__available): New function.
1770 (compare_font_score): New function.
1771 (mfont__list): New function.
1772 (mfont__open): Return a realized font.
1773 (mfont__resize): Adjusted for the change of MFont.
1774 (mfont__has_char): New function.
1775 (mfont__encode_char): Argument changed.
1776 (mfont__set_spec): Argument changed.
1777 (free_font_capability): New function.
1778 (mfont__get_capability): New function.
1779 (MFontfile): New variable.
1780 (mfont_get_prop): Adjusted for the change of MFont.
1781 (mfont_put_prop): Likewise.
1782 (mfont_set_selection_priority): Fix the way of setting
1783 font_score_priority[].
1784 (mfont_find): Use mfont__list instead of mfont__select.
1785 (mfont_resize_ratio): Adjusted for the change of MFont.
1786 (mfont_list): Use mfont__list.
1787 (mfont_check): New function.
1788 (font_score): Make it static.
1790 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1791 (mfont__lookup_fontset): Likewise.
1793 * fontset.c (struct MFontset): Delete member font_spec_list.
1794 (struct MRealizedFontset): Type of member spec changed. New
1796 (load_font_group): Arg spec_list deleted.
1797 (load_fontset_contents): Adjusted for the change of fontset_def.
1798 (free_fontset): Fix the way of freeing fontset elements.
1799 (realize_fontset_elements): Argument changed.
1800 (get_per_script): New function.
1801 (free_realized_fontset_elements): Fix the way of feeing rfontset
1803 (update_fontset_elements): Fix args to realize_fontset_elements.
1804 (mfont__realize_fontset): New arg spec.
1805 (try_font_list): New function.
1806 (try_font_group): New arg request. Use try_font_list.
1807 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1809 (mfontset): Adjusted for the change of MFontset.
1810 (mfontset_copy): Likewise. Don't share plists.
1811 (mfontset_modify_entry): Adjusted for the change of MFontset.
1812 (mfontset_lookup): Call get_per_script.
1813 (mdebug_dump_fontset): Print also the address of fonts.
1815 * input.c (shift_state): Don't reset ic_info->vars.
1816 (take_action_list): Call MDEBUG_PRINT fore calling
1819 * internal-gui.h (MFontDriver): Don't typedef it here.
1821 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1822 (MXFont): This type deleted.
1824 (struct _MFontX): New struct.
1825 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1826 (MDisplayInfo): Member base_font_list deleted.
1827 (DEFAULT_FONT): Definition changed.
1828 (FALLBACK_FONT): This maclr deleted.
1829 (free_display_info): Adjusted for the change of MDisplayInfo.
1830 (free_device): Argument to mfont__free_realized changed.
1831 (xfont_driver): Adjusted for the change of MFontDriver.
1832 (xfont_registry_list): Use MFontX instead of MXFont.
1833 (MRealizedFontX): Renamed from MXFontInfo.
1834 (xfont_select): Return the font found first.
1835 (close_xfont): Change MXFontInfo to MRealizedFontX.
1836 (xfont_open): Return the realized font.
1837 (xfont_find_metric): Get xfont from rfont->fontp.
1838 (xfont_has_char): New function.
1839 (xfont_encode_char): Adjusted for the argument change.
1840 (xfont_render): Get xfont from rfont->fontp.
1841 (xfont_list): Adjusted for the argument change.
1842 (MRealizedFontXft): Renamed from MXftFontInfo.
1843 (xft_driver): Ajusted for the change of MFontDriver.
1844 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1845 (xft_open_font): Argument changed.
1846 (xft_open): Argument changed. Return the realized font.
1847 (xft_find_metric): Get xft_font from rfont->fontp.
1848 (xft_has_char, xft_encode_char): New functions.
1849 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1850 font if not yet opened.
1851 (device_open): Don't set frame->font.
1853 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1855 (gd_font_open): New function.
1856 (gd_render): Don't use the local variable ft_info.
1857 (device_init): Adjusted for the change of gd_font_driver.
1859 * textprop.c (mtext__prop_init): Initialize text_property_table.
1860 Call M17N_OBJECT_ADD_ARRAY.
1861 (mtext__prop_fini): Don't call mdebug__report_object.
1863 * plist.c (mplist__init): Initialize plist_table.
1864 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1865 (mplist__fini): Don't call mdebug__report_object.
1867 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1868 (mtext__fini): Don't call mdebug__report_object.
1869 (MTEXT_FORMAT_UTF_16): Correct type.
1870 (mtext_data): New function.
1871 (mtext_text): Fix calculation of limit and args to
1874 * language.c: Include "plist.h".
1875 (M_script_lang_list): New variable.
1876 (mlang__init): Read languages and their information from m17n
1878 (mlanguage__list): New function.
1879 (Miso639_1, Miso639_2): New variables.
1881 * language.h (mlanguage__list): Extern it.
1883 * database.c (get_database_stream): Use SAFE_* macros for
1884 allocating and freeing path.
1885 (mdatabase__init): Likewise.
1887 * symbol.c (msymbol__fini): Don't free symbols here.
1888 (msymbol__free_table): New function.
1889 (msymbol_is_managing_key): New function.
1891 * symbol.h (msymbol__free_table): Extern it.
1892 (msymbol__list): Extern it.
1894 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1896 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1897 (struct _M17NObjectArray): New member name and next.
1898 (mdebug__add_object_array): Extern it.
1899 (M17N_OBJECT_ADD_ARRAY): New macro.
1900 (mdebug__report_object): Don't extern it.
1902 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1904 * m17n-gui.c (free_frame): Don't free frame->font.
1905 (null_device_fini): Fix code for freeing
1906 null_device.realized_font_list.
1907 (m17n_fini_win): Free interface.
1908 (mframe): Cast the return value of dlsym. Set frame->font here.
1909 (mframe_get_prop): Check frame->rface->rfont before accessing the
1912 * m17n-gui.h (Mfontfile): Extern it.
1913 (mfont_check): Extern it.
1914 (mface_equal): Extern it.
1916 * m17n-core.c: Include "symbol.h".
1917 (report_header_printed): This variable deleted.
1918 (object_array_root): New variable.
1919 (report_object_array): New function.
1920 (mdebug__report_object): This function deleted.
1921 (mdebug__add_object_array): New function.
1922 (m17n_init_core): Call mchartable_init () before mtext_init ().
1923 (m17n_fini_core): Call report_object_array (if necessary) and
1924 msymbol__free_atable at the end.
1926 * m17n-core.h (msymbol_is_managing_key): Extern it.
1927 (mtext_data): Extern it.
1928 (MTEXT_FORMAT_UTF_16): Correct type.
1929 (M17NLIB_MINOR_VERSION): Changed to 3.
1930 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1932 * chartab.c (mchartable__init): Initalize chartable_table.count.
1933 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1934 mdebug__report_object.
1936 2005-05-26 Kenichi Handa <handa@m17n.org>
1938 * m17n.h (Miso639_1, Miso639_2): Extern them.
1940 * symbol.h (msymbol__list): Extern it.
1942 * symbol.c (msymbol__list): New function.
1944 2005-05-19 Kenichi Handa <handa@m17n.org>
1946 * input-gui.c (minput__win_init): Don't change the value of
1949 2005-05-16 Kenichi Handa <handa@m17n.org>
1951 * m17n-core.c (m17n_object): Be sure to initialize all members.
1953 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1955 2005-05-09 Kenichi Handa <handa@m17n.org>
1957 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1959 2005-04-27 Kenichi Handa <handa@m17n.org>
1961 * language.c (mlang__init): Add "an" (Aragonese).
1963 * word-thai.c: Add support for libthai.
1964 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1965 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1967 * mtext.c: Include "word-thai.h" conditionaly.
1968 (mtext__init): Call mtext__word_thai_init conditionaly.
1969 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1971 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1972 not WORDCUT_LD_FLAGS.
1974 2005-04-19 Kenichi Handa <handa@m17n.org>
1976 * word-thai.c (wordseg_propertize): Always unref the attached
1978 (thai_wordseg): Don't unref the property.
1980 2005-04-18 Kenichi Handa <handa@m17n.org>
1982 * word-thai.c: Include stdlib.h.
1983 (wordseg_propertize): Add dummy function for the case that wordcut
1984 library doesn't exist.
1985 (wordseg_propertize): Fix for old wordcut library.
1987 2005-04-16 Kenichi Handa <handa@m17n.org>
1989 * word-thai.c: Include <stdio.h>.
1991 2005-04-15 Kenichi Handa <handa@m17n.org>
1993 * draw.c: Include mtext.h.
1994 (linebreak_table, M_break_at_space, M_break_at_word)
1995 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1996 (compose_glyph_string): Check POS before getting Mface text
1998 (truncate_gstring): Give correct TO arg to line_break function.
1999 (GET_LB_TYPE): New macro.
2000 (find_break_backward, find_break_forward): New functions.
2001 (mdraw__init): Initialize the above new variables.
2002 (mdraw__fini): Free linebreak_table.
2003 (mdraw_default_line_break): Use find_break_backward and
2006 * word-thai.c: New file.
2008 * word-thai.h: New file.
2010 * mtext.c: Include word-thai.h.
2011 (wordseg_func_table): New variable.
2012 (mtext__init): Initialize wordseg_func_table and call
2013 mtext__word_thai_init.
2014 (mtext__fini): Call mtext__word_thai_fini, free
2016 (MTextWordsegFunc): New type.
2017 (mtext__word_segment): New function.
2019 * mtext.h (wordseg_func_table): Extern it.
2020 (mtext__word_segment): Extern it.
2022 * m17n.c (m17n_init): Fix typo (== -> =).
2024 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2025 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2027 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2028 (MTEXTPROP_VAL): New macros.
2030 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2032 2005-04-07 Kenichi Handa <handa@m17n.org>
2034 * database.c (load_chartable): Fix pursing of symbol name.
2036 2005-03-24 Kenichi Handa <handa@m17n.org>
2038 * m17n.c (m17n_init): Fix typo (== -> =).
2040 2005-03-11 Kenichi Handa <handa@m17n.org>
2042 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2044 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2046 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2049 2005-03-09 handa <handa@m17n.org>
2051 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2052 calling m17n_init ().
2054 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2055 calling m17n_init_core ().
2057 2005-02-28 Kenichi Handa <handa@m17n.org>
2059 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2062 2005-02-17 Kenichi Handa <handa@m17n.org>
2064 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2065 (M_description, M_command, M_variable): New variables.
2066 (load_im_info_keys): New variables.
2067 (load_im_info, check_command_keyseq, get_description_advance)
2068 (parse_command_list, get_command_list, parse_variable_list)
2069 (get_variable_list, input_method_hook): New functions.
2070 (command_list, variable_list): New variables.
2071 (minput__init): Put input_method_hook to Minput_method.
2072 Initialize M_description, M_command, M_variable, Mdetail_text,
2073 load_im_info_keys, command_list, variable_list.
2074 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2075 (Mdetail_text): New variable.
2076 (minput_get_description, minput_get_commands)
2077 (minput_assign_command_keys, minput_get_variables)
2078 (minput_set_variable): New functions.
2080 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2081 (minput_assign_command_keys, minput_get_variables)
2082 (minput_set_variable): Extern them.
2084 * plist.c (UNGETC): Just decrement st->p.
2085 (read_mtext_element): New arg skip.
2086 (read_integer_element): Likewise.
2087 (read_symbol_element): Likewise.
2088 (read_element): New arg KEYS.
2089 (mplist__from_plist): Don't increment ref-count of NULL object.
2090 (mplist__from_file): New arg KEYS.
2091 (mplist_put): Don't increment ref-count of NULL object.
2092 (mplist_add): Likewise.
2093 (mplist_push): Likewise.
2094 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2096 * plist.h (mplist__from_file): Prototype adjusted.
2098 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2099 (get_database_stream): New function.
2100 (load_database): Use get_database_stream.
2101 (M_database_hook): New variable
2102 (mdatabase__init): Initialize M_database_hook.
2103 (mdatabase__load_for_keys): New function.
2104 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2106 (mdatabase_define): Free mdb->extra_info if necessary.
2108 * database.h (mdatabase__dir_list, M_database_hook)
2109 (mdatabase__load_for_keys): Extern them.
2110 (MDatabaseHookFunc): New type.
2112 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2114 2004-12-27 Kenichi Handa <handa@m17n.org>
2116 * Version 1.2.0 released.
2118 2004-12-27 Kenichi Handa <handa@m17n.org>
2120 * input.c (minput_filter): Don't reset ic->xxx_changed.
2122 * mtext.c (mtext_from_data): Fix documentation.
2124 2004-12-25 Kenichi Handa <handa@m17n.org>
2126 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2127 (M17NLIB_VERSION_NAME): Update to "1.2.".
2129 2004-12-24 Kenichi Handa <handa@m17n.org>
2131 * input.c (reset_ic): Set key_unhandled to 0.
2133 2004-12-21 Kenichi Handa <handa@m17n.org>
2135 * m17n-gui.h (mfont_from_spec): Delete extern.
2137 * input-gui.c (win_callback): Handle Minput_reset.
2138 (minput__win_init): Register reset_ic as a callback for
2141 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2142 changed. At first, shift to the initial state.
2143 (minput__init): Initialize Minput_reset. Register reset_ic as a
2144 callback for Minput_reset.
2145 (Minput_reset): New variable.
2146 (minput_filter): Always set ic->xxx_changed to 0.
2147 (minput_reset_ic): New function.
2148 (integer_value): Fix typo ('>' -> '<') and calculation of length
2151 * m17n-core.c (merror_code): Change type to `int'.
2153 * m17n-misc.h (merror_code): Adjust type.
2155 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2157 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2158 (mtext_change_prop): Delete extern.
2160 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2161 to `int'. Move the documents to m17n-core.h.
2163 2004-12-13 Kenichi Handa <handa@m17n.org>
2165 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2166 (MTextProperty): Document it.
2168 2004-12-09 Kenichi Handa <handa@m17n.org>
2170 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2172 2004-12-03 Kenichi Handa <handa@m17n.org>
2174 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2175 m17n__gui_initialized): New externs.
2177 * m17n-core.h (enum M17NStatus): New enum.
2178 (m17n_status): Extern it.
2180 * m17n-core.c (core_initialized): Delete this variable.
2181 (m17n__core_initialized, m17n__shell_initialized,
2182 m17n__gui_initialized): New variables.
2183 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2184 instead of core_initialized.
2185 (m17n_status): New function.
2187 * m17n.c (shell_initialized): Delete this variable.
2188 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2191 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2193 * m17n-gui.c (win_initialized): Delete this variable.
2194 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2195 instead of gui_initialized.
2197 2004-11-19 Kenichi Handa <handa@m17n.org>
2199 * input.c (reset_ic): Check if ic_info->state is NULL.
2200 (filter): If ic_info->state is NULL, return 0.
2201 (load_input_method): Don't unref `maps' it it's not created.
2203 2004-11-15 Kenichi Handa <handa@m17n.org>
2205 * input.c (find_candidates_group): If INDEX is -1, find the last
2207 (take_action_list): If the previous of the first candidate is
2208 requested, select the last candidate.
2210 2004-11-08 Kenichi Handa <handa@m17n.org>
2212 * m17n-X.c (device_open): Try at most 32 fonts to find a
2213 non-autoscaled font.
2215 * font.c (xlfd_parse_name): Fix previous change.
2217 2004-11-05 Kenichi Handa <handa@m17n.org>
2219 * font.c: (commont_style): Include dummy elements "slanted" and
2220 "rslanted" to prefer "o" to "r" if "i" is requested.
2222 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2224 2004-10-29 Kenichi Handa <handa@m17n.org>
2226 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2228 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2229 New members smallest and larger.
2230 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2231 (xfont_registry_list): Likewise.
2232 (xfont_select): Likewise.
2235 2004-10-28 Kenichi Handa <handa@m17n.org>
2237 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2238 font name comparison.
2239 (xfont_select): Fix logic for selecting a larger size font.
2241 2004-10-25 Kenichi Handa <handa@m17n.org>
2243 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2246 2004-10-22 Kenichi Handa <handa@m17n.org>
2248 * input.c (update_candidate): Renamed from udpate_candidate.
2249 (take_action_list): Show more debugging info on arithmetic commands.
2251 * m17n-X.c (device_open): Fix previous change.
2253 * draw.c (compose_glyph_string): Don't get face property at the
2256 2004-10-21 Kenichi Handa <handa@m17n.org>
2258 * draw.c (compose_glyph_string): Fix for the case of category
2261 2004-10-19 Kenichi Handa <handa@m17n.org>
2263 * input.c (mdebug_mask): New variable.
2264 (shift_state): Print debug information.
2265 (take_action_list): Likewise.
2266 (handle_key): Likewise.
2268 2004-10-14 Kenichi Handa <handa@m17n.org>
2270 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2272 2004-10-13 Kenichi Handa <handa@m17n.org>
2274 * m17n-X.c (device_open): Be sure to register at least one font
2277 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2278 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2280 2004-10-12 Kenichi Handa <handa@m17n.org>
2282 * draw.c (alloc_gstring): Fix previous change.
2284 * font-ft.c (ft_list_generic): Fix for the case of not
2287 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2289 * font.c (mfont_list): If no font is found, return NULL.
2290 (load_font_encoding_table): Put entries of nil registry first.
2291 (find_encoding): Adjust for the above change.
2293 2004-10-11 Kenichi Handa <handa@m17n.org>
2295 * m17n-gui.h (mfont_list): Adjust prototype.
2297 * m17n-X.c (xfont_list): New arg maxnum.
2299 * font.h (struct MFontDriver): Change prototype of <list>.
2301 * font-ft.c (fc_generic_family_list): Delete it.
2302 (Mserif, Msans_serif, Mmonospace): Delete them.
2303 (M_generic_family_info): New variable.
2304 (enum GenericFamilyType): New enum.
2305 (struct GenericFamilyInfo): New struct.
2306 (generic_family_table): New variable.
2307 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2309 (add_font_info): Get style here.
2310 (ft_list_family): Don't initialize fc_config here. Don't list
2312 (ft_list_generic): New function.
2313 (ft_select): Pay attention to generic familes here.
2314 (ft_open): Fix calculation of ascent and descent.
2315 (ft_list): Pay attention to generic families.
2316 (mfont__ft_init): Initialize M_generic_family_info,
2317 generic_family_table, and fc_config..
2318 (mfont__ft_fini): Finalize generic_family_table.
2320 * draw.c (compose_glyph_string): Use more constant font for
2321 glyphs. Adjust for the member change in MGlyph.
2322 (layout_glyph_string): Adjust for the member change in MGlyph.
2323 (alloc_gstring): Intilize scracth_glyph to avoid
2324 compose_glyph_string on it.
2325 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2326 (mdraw_coordinates_position): Fix previous change.
2328 * internal-gui.h (glyph_category): New enum.
2329 (MGlyph): Change type of <category> to enum glyph_category.
2331 * face.c (mface__realize): Delete args langauge and charset.
2332 (mface__for_chars): Fix for the case that glyphs have different
2334 (mface__update_frame_face): Adjust for mface__realize change.
2336 * face.h (mface__realize): Adjust prototype.
2338 2004-10-05 Kenichi Handa <handa@m17n.org>
2340 * language.c (mlang__init): Add Akan.
2342 2004-10-04 Kenichi Handa <handa@m17n.org>
2344 * font-ft.c (add_font_info): Add instead of push the element.
2345 (ft_list_family): For generic fonts, try all
2346 substituted. families.
2348 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2349 (run_rule): Don't update cluster range here.
2350 (run_command): Update cluster range on appending a glyph.
2351 (run_otf): Update cluster range for glyphs generated by OTF.
2353 2004-10-02 Kenichi Handa <handa@m17n.org>
2355 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2357 2004-09-30 Kenichi Handa <handa@m17n.org>
2359 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2361 2004-09-30 Kenichi Handa <handa@m17n.org>
2363 * font.h: Include <fontconfig/fontconfig.h>.
2364 (MFTInfo): New member langset.
2365 (mfont__encoding_list): Extern it.
2367 * font.c (mfont__encoding_list): New function.
2368 (mdebug_dump_font_list): New function.
2370 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2371 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2373 (ft_family_list): New variable.
2374 (set_font_info): New arg basep. Callers changed.
2375 (fc_list): Check the return value of FcPatternGetString.
2376 (add_font_info): New arg plist. Callers changed. Update
2378 (ft_list_family): New function (merged fc_list and ft_list_all).
2379 (ft_select): Use ft_list_family.
2380 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2382 (mfont__ft_init): Initialize above new variables.
2383 (mfont__ft_fini): Free ft_family_list.
2384 (STRDUP_LOWER): New macro.
2385 (set_font_info): Use STRDUP_LOWER.
2386 (ft_list_family): Avoid duplicate addition of font path. Use
2388 (fc_decode_prop): Fix typo.
2390 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2391 (xfont_registry_list): Change argument disp_info to frame.
2393 (xfont_list_all): New function.
2394 (xfont_list): If FONT is not NULL, check all fonts.
2396 2004-09-28 Kenichi Handa <handa@m17n.org>
2398 * m17n-X.c (MXFont, MXFontList): New types.
2399 (MDisplayInfo): Delete members font_registry_list,
2400 iso8859_1_family_list, iso10646_1_family_list, new members
2401 font_list, base_font_list.
2402 (free_display_info): Adusted for the change of MDisplayInfo.
2403 (xfont_driver): Initialize with xfont_list.
2404 (font_compare): New function.
2405 (build_font_list): Deleted.
2406 (xfont_registry_list): New function.
2407 (xfont_select): Use xfont_registry_list.
2408 (xfont_list): New function.
2409 (device_open): Adusted for the change of MDisplayInfo.
2411 * font-ft.c (add_font_info): New arg languages. Callers changed.
2412 (fc_list): Get languages from fonts..
2413 (ft_list_all): Renamed from ft_list. Callers changed.
2414 (ft_list): New function.
2415 (mfont__ft_driver): Initalize with ft_list.
2417 * font.c (mfont_list): New function.
2419 * font.h (struct MFontDriver): New member `list'.
2420 (MFTInfo): New member languages.
2422 * m17n-gui.h (mfont_list): Extern it.
2424 2004-09-27 Kenichi Handa <handa@m17n.org>
2426 * internal-gui.h (struct MGlyphString): Delete members mt,
2427 sub_width, sub_lbrearing, sub_rbearing, and region.
2429 * draw.c (MSubTextExtents): New type.
2430 (layout_glyphs): New arg extents. Set its members.
2431 (layout_glyph_string): Adjusted for the above change.
2432 (alloc_gstring): Don't set gstring->mt.
2433 (truncate_gstring): Call line_break function with mt instead of
2436 2004-09-22 Kenichi Handa <handa@m17n.org>
2438 * mtext.c (count_utf_16_chars): Count each code of invalid
2441 2004-09-19 Kenichi Handa <handa@m17n.org>
2443 * mtext.c (default_utf_16, default_utf_32): Rename them to
2444 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2447 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2450 2004-09-13 Kenichi Handa <handa@m17n.org>
2452 * draw.c (Mlatin): Don't declare it here.
2453 (visual_order): Fix reordering of combining characters.
2454 (compose_glyph_string): Fix detection of script.
2455 (layout_glyphs): Don't fix reordering of combining characters
2457 (layout_glyph_string): Pay attention to
2458 control->disable_overlapping_adjustment.
2459 (truncate_gstring): Include at least on character in a line.
2460 (get_gstring): Always scan one full line.
2461 (mdraw__init): Don't initialize Mlatin here.
2462 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2463 have a font, use ascent/descent of an ASCII font. Allow
2464 ink_array_return and logical_array_return to be NULL.
2465 (mdraw_coordinates_position): Fix iteration.
2467 * font-ft.c (MFTtoProp): Member completely changed.
2468 (ft_to_prop): Adjusted for the above change.
2469 (ft_to_prop_size): Likewise.
2470 (set_font_info): Adjusted for the change of MFTtoProp.
2471 (fc_generic_family_list): New variable.
2472 (fc_list): Add special handling of generic font names.
2473 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2474 Initialize fc_generic_family_list.
2475 (mfont__ft_fini): Don't free ft_to_prop. Free
2476 fc_generic_family_list.
2477 (FC_vs_M17N_font_prop): New type.
2478 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2479 (fc_decode_prop, fc_encode_prop): New functions.
2480 (mfont__ft_parse_name): Use fc_decode_prop.
2481 (mfont__ft_unparse_name): Use fc_encode_prop.
2483 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2484 (MWDevice): Add member realized_font_list.
2485 (free_display_info): Don't free disp_info->realized_font_list.
2486 (free_device): Free device->realized_fontset_list.
2487 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2488 (device_open): Don't initialize disp_info->realized_font_list.
2489 (device_open): Initialize device->realized_font_list and set it to
2490 frame->realized_font_list.
2492 * fontset.c (try_font_group): New function.
2493 (mfont__lookup_fontset): Use try_font_group.
2495 * font.c (common_weight): Change the order of "regular".
2497 * face.c (Mlatin): Don't make it static.
2498 (mface__realize): Be sure to set work_gstring.frame.
2499 (mface__for_chars): Likewise.
2501 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2504 * internal-gui.h (Mlatin): Extern it.
2506 * m17n-gui.h (MDrawControl): New member
2507 disable_overlapping_adjustment.
2509 2004-09-06 Kenichi Handa <handa@m17n.org>
2511 * font-flt.c (run_otf): Fix typo ('}'->']').
2513 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2514 (COMBINING_PRECOMPUTED_P): New macros.
2516 * draw.c (layout_glyphs): Handle precomputed combining code.
2518 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2519 precomupted combining code.
2521 2004-09-03 Kenichi Handa <handa@m17n.org>
2523 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2526 2004-08-27 Kenichi Handa <handa@m17n.org>
2528 * face.c (mface_put_prop): If the new value is the same as the
2529 current one, don't increment frame->tick.
2531 2004-08-25 Kenichi Handa <handa@m17n.org>
2533 * fontset.c (mfontset): Initialize font_spec_list member.
2534 (mfontset_copy): Load fontset if necessary.
2536 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2537 'metrics' to for C++.
2539 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2542 2004-08-16 Kenichi Handa <handa@m17n.org>
2544 * Version 1.1.0 released.
2546 2004-08-13 Kenichi Handa <handa@m17n.org>
2548 * language.c (mlang__init): Add Dhivehi.
2550 * m17n-gui.c (Mx, Mfreetype): Delete it.
2551 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2553 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2554 (mfont_resize_ratio): Extern it.
2555 (MDrawGlyphInfo): New member logical_width;
2556 (MDrawGlyph): New type.
2557 (mdraw_glyph_list): Prototype adjusted.
2559 * m17n-X.c (xfont_open): Set type and fontp members.
2560 (xft_open): Likewise.
2562 * internal-gui.h (Mx, Mfreetype): Delete extern.
2564 * font.h (struct MRealizedFont): New member type and fontp.
2566 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2567 (Mx, Mfreetype): Declare here.
2568 (Mxft): New variable.
2569 (mfont_resize_ratio): New function.
2571 * font-ft.c (ft_open): Set type and fontp members.
2573 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2576 2004-08-11 Kenichi Handa <handa@m17n.org>
2578 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2581 2004-08-06 Kenichi Handa <handa@m17n.org>
2583 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2586 * font-flt.c (run_otf): Print debugging information if necessary.
2588 2004-08-05 Kenichi Handa <handa@m17n.org>
2590 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2591 positioning_type 5 and 6. Switch simplified.
2593 2004-08-04 Kenichi Handa <handa@m17n.org>
2595 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2597 2004-08-02 Kenichi Handa <handa@m17n.org>
2599 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2600 set val to 1 even if it is greater than 1.
2602 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2604 2004-07-29 Kenichi Handa <handa@m17n.org>
2606 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2607 debugging information.
2609 * internal.h (MDEBUG_PRINT5): New macro.
2611 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2612 the previous one if the zero width glyph has left or right
2615 2004-07-26 Kenichi Handa <handa@m17n.org>
2617 * m17n-X.c (xft_render): Pay attention to members left_padding and
2618 right_padding of MGlyph.
2620 * draw.c (visual_order): Allocate one more elements for arrays as
2621 a workaround of fribidi bug.
2622 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2623 instead of MGlyph->bidi_sensitive.
2624 (layout_glyph_string): Pay attentinon to
2625 control->orientation_reversed when padding at the head or tail.
2626 Fix adjustment of space glyph width.
2627 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2630 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2631 instead of MGlyph->bidi_sensitive.
2633 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2635 2004-07-26 Kenichi Handa <handa@m17n.org>
2637 * draw.c (visual_order): Don't treat combined glyphs specially.
2638 (layout_glyphs): Don't get metrics glyphs that are already ready.
2639 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2640 width with the previous one.
2641 (draw_background): Fix bar cursor position on a r2l glyph.
2643 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2644 (run_rule): Fix place of updating cluster_begin_pos and
2645 cluster_end_pos here.
2646 (run_otf): Don't set left_padding.
2648 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2650 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2651 Fix handling of GPOS.
2652 (mfont__ft_drive_gpos): Delete this function.
2654 * font.h (mfont__ft_drive_otf): Renamed back from
2655 mfont__ft_drive_gsub.
2656 (mfont__ft_drive_gpos): Delete extern.
2658 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2659 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2661 2004-07-23 Kenichi Handa <handa@m17n.org>
2663 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2664 the same bidi level.
2666 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2668 2004-07-22 Kenichi Handa <handa@m17n.org>
2670 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2672 2004-07-20 Kenichi Handa <handa@m17n.org>
2674 * draw.c (render_glyphs): Fix checking of g->code validity.
2676 * face.c (mface__realize): Set g.type.
2678 2004-07-18 Kenichi Handa <handa@m17n.org>
2680 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2683 * m17n-gui.c (mframe): Print error message give by dlopen to
2686 2004-07-16 Kenichi Handa <handa@m17n.org>
2688 * draw.c (compose_glyph_string): Improve the way of deciding a
2689 script. For a character that doesn't have script property, use
2690 the last non-latin script.
2692 * font-ft.c (fc_list): Cancel previous change.
2693 (mfont__ft_init): Add more entries in ft_to_prop_name.
2695 2004-07-15 Kenichi Handa <handa@m17n.org>
2697 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2698 previous or next character glyphs.
2700 2004-07-14 Kenichi Handa <handa@m17n.org>
2702 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2703 of type GLYPH_SPACE.
2705 * fontset.c (mfont__lookup_fontset): If glyph type is
2706 GLYPH_SPACE, get codes for SPACE.
2708 * internal-gui.h (Mfont): Delete extern.
2710 * m17n-gui.h (Mfont): Delete duplicated extern.
2712 2004-07-13 Kenichi Handa <handa@m17n.org>
2714 * font-ft.c (DEVICE_DELTA): New macro.
2715 (adjust_anchor): New function.
2716 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2718 (mfont__ft_drive_gpos): New function.
2720 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2721 (FontLayoutContext): Delete member `rfont'.
2722 (run_otf): Set g->otf_cmd. Call
2723 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2724 only whne HAVE_OTF is defined.
2726 * fontset.c: Include "config.h".
2728 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2729 (MGlyph): New member otf_cmd.
2731 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2732 (mfont__ft_drive_gpos): Extern it.
2734 * face.c: Include "config.h".
2736 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2738 * input-gui.c: Include "config.h".
2740 * plist.c: Include "config.h".
2742 2004-07-06 Kenichi Handa <handa@m17n.org>
2744 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2745 internal-gui.h: Cancel previous changes.
2747 * m17n-gd.h: Delete it.
2749 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2750 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2751 @XML2_LD_FLAGS@ to above.
2752 (libm17n_la_LIBADD): Add -ldl.
2753 (libm17n_la_LDFLAGS): Add -export-dynamic.
2754 (X_LD_FLAGS): Fix the order of linking.
2755 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2756 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2757 (libm17n_X_la_LDFLAGS): Add -module.
2758 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2759 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2760 (libm17n_gd_la_LDFLAGS): Add -module.
2761 (include_HEADERS): Delete m17n-gd.h.
2763 2004-06-30 Kenichi Handa <handa@m17n.org>
2765 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2766 (MDeviceLibraryInterface): Delete it.
2767 (register_device_library): Delete it.
2768 (m17n__device_library_list): Renamed from device_library_list.
2770 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2771 (m17n_init_win): Adjust prototype.
2773 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2774 (m17n_init_gd): New function.
2776 * m17n-gd.h: New file.
2778 * m17n-X.h: Include <m17n-gui.h>.
2779 (m17n_init_X): Extern it.
2780 (M17N_INIT): Redefine it.
2782 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2783 (m17n_init_X): New function.
2785 * internal-gui.h (m17n__device_library_list): Extern it.
2786 (struct MDeviceDriver): New members initialized, init, and fini.
2788 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2790 (libm17n_X_la_LIBADD): Delete aboves.
2791 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2792 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2793 (libm17n_gd_la_LDFLAGS): Delete it.
2794 (include_HEADERS): Add m17n-gd.h.
2796 2004-06-25 Kenichi Handa <handa@m17n.org>
2798 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2799 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2801 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2803 * font-ft.c (fc_list): If FcFontList finds no font, try
2806 * draw.c (compose_glyph_string): Terminate the last loop after
2807 doing default combining if necessary.
2809 2004-06-24 Kenichi Handa <handa@m17n.org>
2811 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2813 * character.c (mchar_define_property): Add const to an arg.
2815 * charset.c (mchar_define_charset): Add const to an arg.
2817 * coding.c (MCodingSystem): Add const to an arg or decoder.
2818 (finish_decoding): Add const to an arg.
2819 (decode_coding_charset, decode_coding_utf_8)
2820 (decode_coding_utf_16, decode_coding_utf_32)
2821 (decode_coding_iso_2022, decode_coding_sjis)
2822 (mconv_define_coding): Likewise.
2824 * m17n-X.c (xft_find_metric): Delete unused variable.
2826 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2829 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2832 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2833 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2835 * mtext.h (mtext__from_data): Ajust prototype.
2837 2004-06-23 Kenichi Handa <handa@m17n.org>
2839 * draw.c (compose_glyph_string): Always get glyph codes by
2841 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2842 (mdraw_glyph_list): New function.
2844 * font-flt.c (mfont__flt_run): Be sure to call
2845 rfont->driver->encode_char.
2847 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2848 (ft_encode_char): Delete arg C.
2849 (ft_render): Don't call FT_Get_Char_Index.
2851 * font.c (mfont__encodable_p): Delete it.
2852 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2854 * font.h (struct MFontDriver): Delete arg C of encode_char.
2855 (mfont__encodable_p): Delete extern.
2857 * m17n-X.c (xfont_encode_char): Delete arg C.
2858 (xft_find_metric): Don't cal FT_Get_Char_Index.
2859 (xft_render): Likewise.
2861 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2863 (mdraw_glyph_list): Extern it.
2865 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2867 2004-06-22 Kenichi Handa <handa@m17n.org>
2869 * m17n-gui.h (mfontset_lookup): Extern it.
2871 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2873 * fontset.c (realize_fontset_elements)
2874 (free_realized_fontset_elements, update_fontset_elements): New
2876 (mfont__realize_fontset): Call realize_fontset_elements.
2877 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2878 (mfont__lookup_fontset): If a fontset was modified, update
2879 the realized fontset.
2880 (mfontset_modify_entry): Increment fontset->tick.
2881 (mfontset_lookup): New function.
2883 2004-06-21 Kenichi Handa <handa@m17n.org>
2885 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2887 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2888 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2889 length of source text 0.
2891 2004-06-21 Kenichi Handa <handa@m17n.org>
2893 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2894 (compare): Pay attention to format other than utf-8.
2895 (copy): Delete this function.
2896 (count_by_utf_8, count_by_utf_16, insert): New functions.
2897 (count_utf_16_chars): Fix handling of a surrogate pair.
2898 (find_char_forward, find_char_backward): Likewise.
2899 (mtext__from_data): Delete unnecessary check. Fix number of
2901 (mtext_from_data): Don't count items.
2902 (mtext_ref_char): Optimize the code.
2903 (mtext_set_char): Pay attention to format other than utf-8.
2904 (mtext_cat_char): Likewise.
2905 (mtext_dup): Don't call copy, instead do allocation here.
2906 (mtext_cat): Call insert instead of copy.
2907 (mtext_ncat): Likewise.
2908 (mtext_cpy): Delete character at first and call insert instead of
2910 (mtext_ncpy): Likewise.
2911 (mtext_copy): Likewise.
2912 (mtext_duplicate): Call insert instead of copy.
2913 (mtext_del): Pay attention to format other than utf-8.
2914 (mtext_ins): Simply call insert.
2915 (mtext_ins_char): Pay attention to format other than utf-8.
2916 (mtext_tok): Call insert instead of copy.
2917 (mtext_text): Call UNIT_BYTES.
2919 * textprop.c (mtext__adjust_plist_for_change): New function.
2921 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2922 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2923 (CHAR_UNITS_AT): Fix typo.
2924 (CHAR_UNITS_BY_HEAD): Fix typo.
2925 (STRING_CHAR_AND_UNITS): Fix typo.
2927 * internal.h (MTEXT_READ_ONLY_P): New macro.
2929 * mtext.h (mtext__replace): Delete the extern.
2930 (mtext__adjust_foramt): Adjust prototype.
2932 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2933 if possible. Otherwise make a copy of mmt.
2935 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2938 2004-06-18 Kenichi Handa <handa@m17n.org>
2940 * character.h (CHAR_STRING_UTF16): Fix syntax.
2942 2004-06-16 Kenichi Handa <handa@m17n.org>
2944 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2945 (libm17n_X_la_LIBADD): Delete it.
2946 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2948 * m17n-X.c (device_open): Add parens in `if' condition.
2950 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2951 (DEC_POSITION): Likewise.
2952 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2954 2004-06-15 Kenichi Handa <handa@m17n.org>
2956 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2959 * draw.c (compose_glyph_string): If langauge is specified, call
2960 mface__for_chars even if a text is all latin. Fix condition for
2961 setting non_ascii_found.
2963 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2965 * m17n.h (minput_char_to_key): Delete extern.
2967 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2969 * m17n-gui.c (null_device_open): Set several members of frame.
2971 2004-06-14 Kenichi Handa <handa@m17n.org>
2973 * m17n-gui.h (minput_event_to_key): Delete extern.
2975 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2977 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2979 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2981 2004-06-08 Kenichi Handa <handa@m17n.org>
2983 * character.c (mchar_put_prop): Don't increment the ref-count of
2986 2004-06-04 Kenichi Handa <handa@m17n.org>
2988 * m17n-core.c (mdebug__register_object): New function.
2989 (mdebug__unregister_object): Likewise.
2991 * internal.h (mdebug__register_object, mdebug__unregister_object):
2993 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2996 * charset.c (mcharset__load_from_database): Don't call
2997 mconv__register_charset_coding here.
2999 * coding.c (find_coding): Get a real name from an element of
3000 coding_definition_list.
3001 (mconv__register_charset_coding): Set the real name at the top of
3003 (mcoding__load_from_database): Likewise.
3004 (mconv_list_codings): Adjusted for the above change.
3006 2004-06-03 Kenichi Handa <handa@m17n.org>
3008 * coding.c (find_coding): Find by canonicalized name. Don't have
3009 to modify the element of coding_definition_list by
3011 (mconv__define_coding_from_charset): Delete it.
3012 (mconv__register_charset_coding): Canonicalize sym.
3013 (mcoding__load_from_database): Register plist modified by
3016 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3018 * font-ft.c (ft_open): Fix setting of rfont->descent.
3020 2004-06-02 Kenichi Handa <handa@m17n.org>
3022 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3023 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3024 (xlfd_unparse_name): Renamed from xfont_build_name.
3025 (mfont__init): Initialized Mfontconfig.
3026 (mfont__free_realized): Unconditionally unref rfont->info.
3027 (mfont__select): Free `this' if it's not best.
3028 (mfont__open): Don't check frame->realized_font_list.
3029 (mfont__parse_name_into_font): New function.
3030 (Mfontconfig): New variable.
3031 (mfont_from_name): Call mfont_parse_name.
3032 (mfont_name): Call mfont_unparse_name.
3033 (mdebug_dump_font): Likewise.
3035 * font.h (struct MFontDriver): Delete members parse_name and
3037 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3038 (mfont__parse_name_into_font): Extern it.
3040 * font-ft.c: Include "symbol.h".
3041 (close_ft): Unconditionally free filename and charmap_list of
3043 (ft_open): Duplicate base->filename. Increment ref-count of
3044 ft_info->charmap_list. Free ft_info->charmap_list and
3045 ft_info->filename on error.
3046 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3048 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3050 (enum xlfd_field_idx): Moved to font.c.
3051 (split_font_name, build_font_name): Likewise.
3052 (build_font_list): Call mfont__parse_name_info_font.
3053 (xfont_open): Call mfont__unparse_name. Free name.
3054 (xfont_parse_name, xfont_build_name): Moved to font.c
3055 (xft_select): Prototype deleted.
3056 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3057 Call mfont_pase_name.
3059 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3060 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3063 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3066 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3068 2004-06-01 Kenichi Handa <handa@m17n.org>
3070 * fontset.c (mfontset_modify_entry): Pay attention to the case
3071 that fontset->font_spec_list is NULL.
3073 2004-05-31 Kenichi Handa <handa@m17n.org>
3075 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3077 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3079 * font.c (mfont__select): Print score the a font for debugging.
3081 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3083 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3084 kanji_sym and kana_sym.
3086 2004-05-28 Kenichi Handa <handa@m17n.org>
3088 * Makefile.am (VINFO): New variable.
3089 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3090 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3092 2004-05-27 Kenichi Handa <handa@m17n.org>
3094 The following chanages are to make device dependent functions
3095 accessible only from MDeviceDriver structure, and to add GD and
3096 null device drivers. Font drivers get also device dependent.
3098 * m17n.c (m17n_init): Increament shell_initialized.
3099 (m17n_fini): Decremented shell_initialized.
3101 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3103 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3104 (Mwidget, Mcolormap, Mx): Extern them.
3106 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3107 (free_frame): Call frame->driver->close instead of
3109 (DLOPEN_SHLIB_EXT): New macro.
3110 (MDeviceLibraryInterface): New type.
3111 (device_library_list): New variable.
3112 (register_device_library): New function.
3113 (null_device): New variable.
3114 (null_device_close, null_device_get_prop)
3115 (null_device_realize_face, null_device_free_realized_face): New
3117 (null_driver): New variable.
3118 (null_device_init, null_device_fini, null_device_open): New
3120 (null_interface): New variable.
3121 (Mfreetype, Mdevice): Declare them.
3122 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3123 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3124 Mwin__Close_Device. Register drivers for Mx and Mgd.
3125 (m17n_fini_win): Decremented win_initialized. Call "fini"
3126 function of all opened devices. Don't call mwin__fini.
3127 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3129 (mframe): Handle Mdevice key of PLIST.
3130 (mframe_get_prop): Call frame->device->get_prop instead of
3131 mwin__device_get_prop.
3133 * m17n-gd.c: New file.
3135 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3136 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3138 * m17n-core.c (m17n_init_core): Increate core_initialized.
3139 (m17n_fini_core): Decremented core_initialized.
3141 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3142 (Mcolormap): Don't extern them here.
3144 * m17n-X.c (FRAME_DEVICE): New macro.
3145 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3146 (free_display_info): Use MPLIST_DO.
3147 (free_device): Free rface->info.
3148 (xft_close): Delete it.
3149 (device_init): Renamed from mwin__init.
3150 (device_fini): Renamed from mwin__fini.
3151 (device_open): Renamed from mwin__open_device.
3152 (x_driver): New variable.
3153 (MXFontInfo): Delete member frame, add member display.
3154 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3155 Don't declare them here.
3157 * internal-gui.h (MDeviceType): New enum.
3158 (MWDefice): Delete it.
3159 (struct MFrame): Change type of device to void *. New members
3160 device_type, driver, font_driver_list.
3161 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3162 (MDeviceDriver): New type.
3163 (Mx, Mgd, Mfreetype): Extern them.
3164 (mwin__XXX): Delete all of them.
3166 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3168 (win_destroy_ic): Likewise.
3169 (adjust_window_and_draw): Likewise.
3170 (win_callback): Likewise.
3171 (Mxim): Declare it here.
3172 (minput_event_to_key): Call M_CHECK_READABLE.
3174 * fontset.c (mfont__lookup_fontset): Delete local variable
3177 * font.h (struct MFontDriver): Delete member close, add members
3178 parse_name and build_name.
3179 (mfont__driver_list): Delete extern.
3180 (mfont__close): Delete extern.
3182 * font.c (mfont__init): Don't set mfont__driver_list.
3183 (mfont__fini): Don't unref mfont__driver_list.
3184 (mfont__select): Try font drivers in frame->font_driver_list. Set
3185 driver member of a realized font.
3186 (mfont__close): Delete it.
3187 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3188 functions of the default frame.
3190 * font-ft.c (close_ft): Check ft_info->ft_face and work
3192 (add_font_info): Allocate ft_info by M17N_OBJECT.
3193 (ft_close): Delete it.
3194 (mfont__ft_driver): Don't set ft_close.
3195 (ft_select): Increment ref-count of best_font.
3196 (ft_open): Decremented ref-count of base. On error, call
3197 FT_Done_Face and free ft_info.
3198 (ft_find_metric): Always use XXX_MONO in load_flags.
3199 (ft_render): Fix setting of width. Call
3200 frame->driver->draw_points instead of mwin__draw_points.
3201 (ft_to_prop): Don't set mfont__driver_list.
3202 (mfont__ft_fini): Just unref ft_info.
3204 * face.c (mface__init): Exchange foreground and background of
3205 mface__default. Call mface_put_prop to set hline of
3207 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3208 (mface__free_realized): Don't call mwin__free_realized_face.
3210 * draw.c (Mdepth): Don't declare it here.
3211 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3212 (render_glyphs, render_glyph_string): Likewise.
3213 (mdraw__init): Don't set Mdepth.
3214 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3216 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3218 (mdraw_text_items): Check FRAME is writable.
3219 (mdraw_per_char_extents): Implement body.
3221 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3223 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3224 (GUI_SOURCES): Delete it.
3225 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3226 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3227 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3228 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3229 (linkgui_LDADD): Set to libm17n-gui.la
3230 (linkgui_LDFLAGS): New target.
3231 (SRC): Include ${libm17n_gui_la_SOURCES} and
3232 ${libm17n_gd_la_SOURCES}.
3234 2004-05-24 Kenichi Handa <handa@m17n.org>
3236 * draw.c (draw_background): Don't draw background even if
3237 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3239 2004-05-22 Kenichi Handa <handa@m17n.org>
3241 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3243 2004-05-20 Kenichi Handa <handa@m17n.org>
3245 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3247 * m17n-gui.c: Include "plist.h".
3248 (mframe): If PLIST is NULL, initialize it to emply plist.
3250 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3251 (xft_driver): New variable.
3252 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3253 (xft_find_metric, xft_render): New function.
3254 (mwin__init): Adjusted for the new mfont__driver_list.
3255 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3256 generated face to PARAM.
3257 (mwin__realize_face): Fix setting of box colors. Don't call hook
3259 (mwin__draw_hline): New function.
3260 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3261 (mwin__xft_render): Delete these function.
3263 * internal-gui.h (struct MFrame): New member tick.
3264 (struct MGlyphString): New member tick.
3265 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3266 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3267 (mwin__xft_render): Delete extern.
3269 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3270 (mfontset): Always increment the reference count of returned
3273 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3274 (MFTInfo): Moved to font.h.
3275 (ft_iso8859_1_font_list): Delete this variable.
3276 (set_font_info): Don't set font->property[MFONT_TYPE].
3277 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3278 (add_font_info): Change type to void.
3279 (fc_list): Change anme from xft_list. Caller changed. Include
3280 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3281 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3282 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3283 (close_ft): Don't call mwin__xft_close. Unref
3284 ft_info->extra_info.
3285 (ft_open): Don't setup ft_info->fontname. Don't call
3287 (ft_find_metric): Don't call mwin__xft_get_metric.
3288 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3289 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3290 (mfont__ft_init): Adjusted for new mfont__driver_list.
3291 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3293 * font.c (mfont__driver_list): Make it MPlist.
3294 (mfont__init): Adjust initialization of mfont__driver_list.
3295 (mfont__fini): Free mfont__driver_list.
3296 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3297 (mfont__select): Adjusted for the new mfont__driver_list.
3299 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3300 (mfont__drirver_list): Adjust prototype.
3301 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3303 * face.h (struct MFace): Delete member realized_face_list, add
3305 (struct MRealizedFace): Delete member need_update
3306 andnofont_rface, add member non_ascii_list.
3307 (mface__update_frame_face): Extern it.
3309 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3311 (get_hline_create, get_box_create): New functions.
3312 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3314 (free_face): Cancep previous change. Free face->frame_list.
3315 (serialize_hline): Do nothing if hline->width is zero.
3316 (serialize_box): Do nothing if box->width is zero.
3317 (mface__init): Setup all properties of mface__default.
3318 (mface__fini): Free hline_prop_list and box_prop_list.
3319 (mface__realize): Cancel previous change. Update
3320 face->frame_list. Setup rface->non_ascii_list.
3321 (mface__for_chars): Update rface->non_ascii_list.
3322 (mface__free_realized): Free rface->non_ascii_list.
3323 (mface__update_frame_face): New function.
3324 (mface): Initialize face->frame_list.
3325 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3327 (mface_merge): Likewise.
3328 (mface_put_prop): If key is Mhline or Mbox, get value by
3329 get_hline_create or get_box_create respectively.
3330 (mface_put_prop): Update frame->tick and call
3331 mface__update_frame_face if necessary.
3332 (mface_update): Do nothing if func is noop_hook.
3334 * draw.c (render_glyphs): If a font is not found, use
3335 mwin__draw_empty_boxes.
3336 (alloc_gstring): Initialize gstring->tick.
3337 (get_gstring): Check gstring->tick.
3339 2004-05-17 Kenichi Handa <handa@m17n.org>
3341 * face.c (find_realized_face): Return value changed. If RFONT is
3342 NULL, avoid unnecessary checking.
3343 (free_face): Free face->realized_face_list.
3344 (mface__realize): Adjusted for the change of find_realized_face.
3345 If it returns a realized face that needs update, free it and
3346 realize a new one. Push a new realized face to
3347 frame->realized_face_list instead of appending.
3348 (mface__for_chars): Adjusted for the change of find_realized_face.
3349 Short cut if the required font is in rface->ascii_rface.
3350 (mface_put_prop): Free old value if necessary. Set need_update
3351 member of realized faces to 1.
3353 * face.h (struct MFace): Delete member tick, add member
3355 (struct MRealizedFace): Delete member tick, add member
3358 2004-05-13 Kenichi Handa <handa@m17n.org>
3360 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3362 2004-05-12 Kenichi Handa <handa@m17n.org>
3364 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3366 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3367 parse it XftNameParse.
3369 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3370 (all_fonts_scaned): New variable.
3371 (set_font_info): FAMILY may be Mnil.
3372 (add_font_info): Argument changed.
3373 (xft_list): Call add_font_info in it.
3374 (ft_list): Likewise.
3375 (ft_select): Make it work in the case family is Mnil.
3376 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3377 (mfont__ft_fini): Set all_fonts_scaned to 0.
3379 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3380 that is failed to open.
3382 2004-05-10 Kenichi Handa <handa@m17n.org>
3384 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3385 device's depth is 1 (i.e. monochrome).
3387 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3388 to work around the problem of libtool.
3390 * font-ft.c: Include <freetype/ftbdf.h>.
3391 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3393 (mfont__ft_init): Initialize them.
3394 (ft_iso8859_1_font_list): New variable.
3395 (set_font_info): Detect a font containing iso8859-1 glyphs and
3396 register it in ft_iso8859_1_font_list. If the font is not
3397 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3398 properties of the font from its properties.
3399 (add_font_list): If the font is not scalable, check if it is BDF
3400 or PCF font. If not, ignore it.
3401 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3402 registry is not iso8859-1.
3403 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3404 ft_iso8859_1_font_list.
3405 (ft_find_metric): If the font is not scalable, assume it as BDF
3406 or PCF, and get a metric from its properties.
3407 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3409 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3411 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3412 (libm17n_la_LDFLAGS): Delete it.
3413 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3414 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3416 2004-05-06 Kenichi Handa <handa@m17n.org>
3418 * draw.c (compose_glyph_string): Fix previous change.
3420 2004-04-30 Kenichi Handa <handa@m17n.org>
3422 * font-ft.c (ft_list): Delete unused variable `result'.
3423 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3425 2004-04-27 Kenichi Handa <handa@m17n.org>
3427 * m17n-X.c: Include config.h
3428 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3429 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3430 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3431 (FRAME_CMAP, FRAME_VISUAL): New macros.
3432 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3433 (xfont_driver): Make it static.
3434 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3435 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3436 info->xft_color_back.
3437 (MXftFontInfo) [HAVE_XFT2]: New type.
3438 (mwin__xft_close) [HAVE_XFT2]: New function.
3439 (mwin__xft_open) [HAVE_XFT2]: New function.
3440 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3441 (mwin__xft_render) [HAVE_XFT2]: New function.
3443 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3444 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3445 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3448 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3450 * font-ft.c: Don't include FT_FREETYPE_H here.
3451 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3452 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3453 (MFTInfo): New member charmap_index.
3454 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3455 (check_otf_filename): Renamed from check_filename. Return value
3457 (ft_set_property): This function deleted.
3458 (set_font_info): New function.
3459 (add_font_list): Argument changed. Add multiple fonts.
3460 (xft_list) [HAVE_XFT2]: New function.
3461 (ft_list) [not HAVE_XFT2]: New function.
3462 (ft_select): Add code for Xft.
3463 (close_ft): Likewise.
3464 (ft_open): Likewise.
3465 (ft_find_metric): Likewise.
3466 (ft_encode_char): Likewise.
3467 (ft_render): Likewise.
3469 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3471 2004-04-26 Kenichi Handa <handa@m17n.org>
3473 * textprop.c (mtext_attach_property): Declare the return type as
3476 2004-04-21 Kenichi Handa <handa@m17n.org>
3478 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3480 2004-04-09 Kenichi Handa <handa@m17n.org>
3482 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3484 (load_command): Setup above members.
3486 2004-04-05 Kenichi Handa <handa@m17n.org>
3488 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3490 2004-03-30 Kenichi Handa <handa@m17n.org>
3492 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3495 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3496 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3498 2004-03-29 Kenichi Handa <handa@m17n.org>
3500 * Version 1.0 Patch Level 2 released.
3502 2004-03-29 Kenichi Handa <handa@m17n.org>
3504 * charset.c (make_charset): Set charset->fully_loaded and
3505 charset->simple correctly. Don't try to get charset->min_char and
3506 charset->max_char for a charset of method subset and superset.
3507 Don't load a mapping file here.
3508 (mcharset__init): Set unified_max.
3509 (mcharset__load_from_database): Free a working plist.
3511 * coding.c (mcoding__fini): Free all malloced data.
3513 * input-gui.c (win_create_ic): Set control.as_image for preediting
3516 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3517 `count') to initialize the array.
3519 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3522 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3524 (mwin__create_window): Fix bug of setting a background pixel of a
3526 (mwin__adjust_window): Clear the window before drawing.
3528 * m17n-core.c (mdebug__report_object): Free array->objectes if
3530 (m17n_init_core): Don't set report_header_printed to 0 here.
3531 Fix debugging information.
3532 (m17n_fini_core): Set report_header_printed to 0 here.
3534 * m17n-core.h (mplist_deserialize): Extern it.
3536 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3538 * m17n.c (m17n_fini): Fix debugging information.
3540 * mtext.c (mtext__adjust_foramt): New function.
3542 * mtext.h (mtext__adjust_foramt): Extern it.
3544 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3546 * plist.h (mplist__deserialize): Don't extern it.
3548 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3549 elements of symbol_table to NULL. Report about created and freed
3550 symbols if MDEBUG_FINI is set.
3552 2004-03-22 Kenichi Handa <handa@m17n.org>
3554 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3556 * m17n.c (m17n_init): Fix the way of checking merror_code.
3558 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3560 2004-03-22 Kenichi Handa <handa@m17n.org>
3562 * fontset.c (realize_font_group): Adjust the font size by
3563 mfont__resize before selecting a font.
3565 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3567 2004-03-19 Kenichi Handa <handa@m17n.org>
3569 * Version 1.0 Patch Level 1 released.
3571 2004-03-19 Kenichi Handa <handa@m17n.org>
3573 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3575 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3577 2004-03-19 Kenichi Handa <handa@m17n.org>
3579 Re-apply the changes forgotten in the released version.
3581 * charset.c (mcharset__load_from_database): Call
3582 mchar_define_charset.
3584 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3585 (mconv_encode_range): Put Mcoding text property.
3587 2004-03-18 Kenichi Handa <handa@m17n.org>
3589 * draw.c (Mdepth): New variable.
3590 (visual_order): Delete unused local var `pos'.
3591 (compose_glyph_string): Fix for the case that gstring->glyphs is
3592 realloced. Stop generating glyphs at TO. Fix handling of
3594 (layout_glyphs): Get metrics of all glyphs in advance. Set
3595 lbearing and rbearing of base of composition glyph correctly.
3596 Handle left-overhang glyphs correctly.
3597 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3599 (dump_combining_code): Change the defualt off_x character to ".".
3600 (mdraw__init): Initialize Mdepth.
3602 * face.c (work_gstring): New variable
3603 (mface__init): Initialize work_gstring.
3604 (mface__fini): Free work_gstring.glyphs.
3605 (mface__realize): Don't handle videomode property here. Adjusted
3606 for the change of mfont__get_metric.
3607 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3609 * face.h (enum face_gc): Moved to m17n-X.c.
3611 * font.h (struct MFontDriver): Arguments of find_metric changed.
3612 (mfont__select): Prototype adjusted.
3613 (mfont__get_metric): Likewise.
3614 (mfont__ft_drive_otf): Likewise.
3615 (mfont__flt_run): Likewise.
3617 * font.c (mfont__select): New argument layouter. If layouter is
3618 different in the registered font, make a new copy of realized
3620 (mfont__get_metric): Argument changed. Get metrics of multiple
3622 (mfont_find): Call mfont__select with layouter as Mnil.
3624 * font-flt.c (FontLayoutContext): New member rfont.
3625 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3626 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3628 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3630 (NUM_POINTS): New macro.
3631 (MPointTable): New type.
3632 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3633 (mfont__ft_drive_otf): New argument rfont.
3635 * fontset.c (realize_font_group): Adjusted for the changed of
3637 (check_fontset_element): This function deleted.
3639 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3640 off the parent window if the preedit text is zero length.
3642 * internal-gui.h (struct MFrame): New members foreground,
3643 background, videomode, font.
3644 (struct MGlyphString): New member anti_alias.
3645 (MDrawPoint): New type.
3646 (mwin__draw_bitmap): Prototype deleted.
3647 (mwin__draw_points): Prototype added.
3649 * m17n-gui.h (MDrawControl): New member anti_alias.
3651 * m17n-gui.c (free_frame): Free frame->font.
3652 (mframe): Set the fontset of frame->face to the default fontset.
3654 * m17n-X.c (RGB_GC): New type.
3655 (enum gc_index): Renamed from enum face_gc. Member names changed.
3657 (struct MWDevice): Members foreground and background deleted. New
3658 member scratch_gc, gc_list.
3659 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3660 (free_device): Free GCs in device->gc_list.
3661 (get_rgb_gc): New function.
3662 (get_gc): Renamed and argument changed from get_color.
3663 (get_gc_for_anti_alias): New function.
3664 (xfont_find_metric): Arguments changed. Get metrics of multiple
3666 (set_region): Argument changed. Caller changed.
3667 (xfont_render): Allways set a font in gc.
3668 (x_error_handler, x_io_error_handler): Define only if
3669 X_SET_ERROR_HANDLER is defined.
3670 (mwin__open_device): Create device->scratch_gc. Set members
3671 foreground, background, and videomode of frame. Call
3672 XSetErrorHandler and XSetIOErrorHandler only if
3673 X_SET_ERROR_HANDLER is defined.
3674 (struct gc_list): Deleted.
3675 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3676 (mwin__realize_face): Adjusted for the change of the format of
3677 rface->info and the charge of set_region.
3678 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3679 (mwin__draw_box): Likewise.
3680 (mwin__draw_bitmap): This function deleted.
3681 (mwin__draw_points): New function.
3682 (mwin__verify_region): Adjusted for the change of the format of
3683 rface->info and the charge of set_region.
3684 (mwin__create_window): Inherit backgound pixel from parent.
3685 (mwin__dump_gc): Adjusted for the change of the format of
3688 2004-03-16 Kenichi Handa <handa@m17n.org>
3690 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3692 * input.c (M_key_alias): New variable.
3693 (handle_key): Try M_key_alias property of a key too.
3694 (minput__init): Initialize M_key_alias. Give that property to
3695 symbols in one_char_symbol. Fix bug of initializing
3698 * draw.c (compose_glyph_string): Don't handle
3699 ignore_formatting_char here. Include formatting characters in the
3700 range processed by a FTL.
3701 (layout_glyph_string): Handle ignore_formatting_char here.
3703 2004-03-12 Kenichi Handa <handa@m17n.org>
3705 * input-gui.c (win_create_ic): Enable bidi in status control.
3707 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3709 2004-03-09 Kenichi Handa <handa@m17n.org>
3711 * input.c (load_input_method): If title is not specified, use the
3712 input method name as title.
3714 * m17n-X.c (get_color): Make it static.
3715 (xim_create_ic, xim_destroy_ic, x_error_handler)
3716 (x_io_error_handler): Likewise.
3718 2004-03-01 Kenichi Handa <handa@m17n.org>
3720 * Version 1.0 released.
3723 Copyright (C) 2003, 2004
3724 National Institute of Advanced Industrial Science and Technology (AIST)
3725 Registration Number H15PRO112
3727 This file is part of the m17n library.
3729 The m17n library is free software; you can redistribute it and/or
3730 modify it under the terms of the GNU Lesser General Public License
3731 as published by the Free Software Foundation; either version 2.1 of
3732 the License, or (at your option) any later version.
3734 The m17n library is distributed in the hope that it will be useful,
3735 but WITHOUT ANY WARRANTY; without even the implied warranty of
3736 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3737 Lesser General Public License for more details.
3739 You should have received a copy of the GNU Lesser General Public
3740 License along with the m17n library; if not, write to the Free
3741 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3742 Boston, MA 02110-1301, USA.