1 2007-05-14 Kenichi Handa <handa@m17n.org>
3 * language.c: Include <string.h> and <locale.h>.
4 (langname_list): New variable.
5 (load_lang_script_list): Exclude invalid list elements.
6 (mlang__init): Initialize langname_list.
7 (mlang__fini): Unref langname_list.
8 (mlanguage__info): Adjusted for the change of English
10 (mlanguage_name): Label it as obsolete.
11 (mlanguage_name_list): New function.
13 * m17n.h (mlanguage_name_list): Extern it.
15 * locale.c (make_locale): Fix setting of members of locale.
17 * plist.c (free_plist): Unref also nested plist.
19 2007-05-11 Kenichi Handa <handa@m17n.org>
21 * coding.c (mconv_reset_converter): Set internal->used to 0.
23 2007-05-08 Kenichi Handa <handa@m17n.org>
25 * input.c (check_description): Force copying the translated text.
27 2007-05-02 Kenichi Handa <handa@m17n.org>
29 * input.c (minput_save_config): Unref unnecessary plist. Use
30 free_im_list to free im_config_list.
32 2007-04-20 Kenichi Handa <handa@m17n.org>
34 * input.c (config_command): Fix previous change again.
35 (config_variable): Likewise.
36 (minput_config_command): Fix for the case of setting back to
38 (minput_config_variable): Likewise.
39 (minput_save_config): Include nil as documentation of customized
42 2007-04-05 Kenichi Handa <handa@m17n.org>
44 * input.c (config_command): Fix previous change.
45 (config_variable): Likewise.
47 * plist.c (mplist_get_func): Fix for backward compatiblity.
49 2007-04-04 Kenichi Handa <handa@m17n.org>
51 * input.c (minput_get_command, minput_config_command): Fix example
54 2007-03-29 Kenichi Handa <handa@m17n.org>
56 These changes are to avoid unsafe casting of a function pointer.
58 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
59 (struct MFace): New member hook.
61 * face.c (serialize_face): Adjusted for the change of MFace.
62 (deserialize_face): Likewise.
63 (mface__init): Likewise. Use msymbol_put_func.
64 (mface__realize): Adjusted for the change of MFace. Avoid
66 (mface_get_prop): Adjusted for the change of MFace.
67 (mface_put_prop): Likewise.
68 (mface_get_hook): New function.
69 (mface_put_hook): New function.
70 (mface_update): Adjusted for the change of MFace.
72 * input-gui.c (win_callback): Use mplsit_get_func.
73 (minput__win_init): Use mplsit_put_func.
75 * input.c (take_action_list): Use mplist_get_func.
76 (init_ic_info): Likewise.
77 (fini_ic_info): Likewise.
78 (minput_callback): Likewise.
79 (minput__init): Use mplist_put_func.
81 * language.c (mlang__init): Use msymbol_put_func.
83 * m17n-core.h (M17NFunc): New function type.
84 (M17N_FUNC): New macro.
85 (msymbol_put_func, msymbol_get_func): Extern them.
86 (mplist_put_func, mplist_get_func): Extern them.
88 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
90 * m17n-gui.c (mframe): Add a proper casting.
92 * plist.h (struct MPlist): Make the member val a union.
93 (MPLIST_VAL): Adjusted for the above change.
94 (MPLIST_FUNC): New macro.
95 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
97 * plist.c (mplist_put_func, mplist_get_func): New functions.
99 * symbol.c (msymbol__fini): Use MPLIST_VAL.
100 (msymbol_put_func, msymbol_get_func): New functions.
102 * textprop.c (mtext_serialize): Use msymbol_get_func.
103 (mtext_deserialize): Likewise.
105 2007-03-28 Kenichi Handa <handa@m17n.org>
107 * input.c (get_candidate_list): Avoid unnecessary unref.
109 2007-03-23 Kenichi Handa <handa@m17n.org>
111 * database.c (mdatabase__update): Unref plist at the tail.
113 2007-03-21 Kenichi Handa <handa@m17n.org>
115 * input.c (update_custom_info): Fix for the case "name == Mnil &&
117 (config_command): Fix for the case that configuration is
119 (config_variable): Likewise.
120 (minput_config_command): If keyseqlist is an empty list, cancel
122 (minput_config_variable) If value is an empty list, cancel the
124 (minput_save_config): Handle cancellation of config and customize
127 2007-03-15 Kenichi Handa <handa@m17n.org>
129 * input.c (minput_config_variable): Check custom->vars (not
132 2007-03-01 Kenichi Handa <handa@m17n.org>
134 * input.c (reload_im_info): Setup cmds, vars, and title of
136 (check_variable_value): Fix the return value.
138 * database.c (mdatabase__check): If necessary, update database and
141 2007-02-28 Kenichi Handa <handa@m17n.org>
143 * database.c (get_dir_info): Set dir_info->status to
145 (check_version): New function.
146 (register_database): Don't call find_database.
147 (register_databases_in_files): Don't register a database of
149 (mdatabase__update): Likewise. Avoid unnecessary scanning.
151 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
152 and MDB_STATUS_OUTDATED.
154 * font.h (struct MFont): Types of members type, source, and
155 spacing changed to unsigned.
157 * internal-gui.h (struct): Types of members category and type
160 * internal.h (struct MText): Types of members format and coverage
163 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
164 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
166 2007-02-23 Kenichi Handa <handa@m17n.org>
168 * input.c (Mpop): New variable.
169 (fully_initialize): Initialize Mpop.
170 (parse_action_list): Handle Mpop.
171 (take_action_list): Likewise.
172 (handle_key): When a key is unhandled, shift to the initial state
173 only if the current state has no branch action.
175 2007-02-12 Kenichi Handa <handa@m17n.org>
177 * input.c (get_preceding_char): Unref mt if necessary.
178 (get_following_char): Likewise.
179 (parse_action_list): Fix handling of `insert' action as
181 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
182 (take_action_list): Check invalid candidate list.
184 2007-02-06 Kenichi Handa <handa@m17n.org>
186 * input.c (integer_value): Check also ic->produced for @-N.
188 2007-01-26 Kenichi Handa <handa@m17n.org>
190 * database.c (mdatabase__update): Check mdatabase__dir_list from
193 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
195 2007-01-12 Kenichi Handa <handa@m17n.org>
197 * input.c (handle_key): Handle a branch action of the initial
200 2007-01-10 Kenichi Handa <handa@m17n.org>
202 * m17n-gd.c (gd_render): Delete superfluous line.
204 2006-12-26 Kenichi Handa <handa@m17n.org>
206 * m17n.h (minput_callback): Extern it.
208 * input.h (minput__callback): Delte extern.
210 * input.c (get_surrounding_text): Adjusted for the change of
211 minput__callback to minput_callback.
212 (delete_surrounding_text): Likewise.
213 (minput_create_ic): Likewise.
214 (minput_destroy_ic): Likewise.
215 (minput_filter): Likewise.
216 (minput_set_spot): Likewise.
217 (minput_toggle): Likewise.
218 (minput_reset_ic): Likewise.
220 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
221 and ic->candidate_to to 0.
222 (minput_callback): Renamed from minput__callback.
224 * input-gui.c (win_callback): Adjusted for the change of
225 minput__callback to minput_callback.
227 2006-12-15 Kenichi Handa <handa@m17n.org>
229 * font-ft.c (ft_add_font): Fix typo.
231 2006-12-06 Kenichi Handa <handa@m17n.org>
233 * Version 1.3.4 released.
235 2006-11-16 Kenichi Handa <handa@m17n.org>
237 * input.c (parse_action_list): Allow (undo 0).
238 (adjust_markers): New function.
239 (preedit_insert, preedit_delete): Call adjust_markers.
240 (preedit_replace): New function.
241 (update_candidate): Call preedit_replace instead of preedit_insert
243 (filter): When ic_info->commit_key_head is nonzero, shift input
244 event keys even if there's no committed text.
246 2006-11-10 Kenichi Handa <handa@m17n.org>
248 * input.h (MInputContextInfo): New member commit_key_head.
250 * input.c (preedit_commit): Update ic_info->commit_key_head.
251 (take_action_list): Reset ic_info->commit_key_head on Mundo.
252 (filter): When committed, shift keys by ic_info->commit_key_head.
254 2006-10-30 Kenichi Handa <handa@m17n.org>
256 * input.c (preedit_delete): Fix typo.
257 (take_action_list): Print more debugging information. Allow
258 variable in arg of 'select' and `pushback'.
260 * database.c (gen_database_name): Don't put extra space.
261 (load_database): Print debugging information.
262 (register_databases_in_files): New arg headlen. Callers changed.
263 (mdatabase__load_for_keys): Shorten debugging information.
264 (mdatabase_load): Don't print debugging information here.
266 2006-10-27 Kenichi Handa <handa@m17n.org>
268 * input.c (marker_code): New arg surrounding. Callers changed.
269 (surrounding_pos): Check if name[0] == '@'.
270 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
271 (take_action_list): Likewise.
272 (get_preceding_char): If POS is zero, always call
273 get_surrounding_text.
275 2006-10-19 Kenichi Handa <handa@m17n.org>
277 * input.c (load_variables): Fix setting of `global'.
279 2006-10-16 Kenichi Handa <handa@m17n.org>
281 * draw.c (draw_background): Be sure to set *to_x.
282 (render_glyph_string): If from == to, just return.
284 2006-10-18 Kenichi Handa <handa@m17n.org>
286 * database.c (get_dir_info): Return NULL if the directory name is
288 (register_databases_in_files): Call register_database with
290 (mdatabase__update): Fix logic. Call register_database with
292 (mdatabase_define): Call register_database with
295 * input.c (delete_surrounding_text): Be sure to set members
296 preceding_text and following_text to NULL.
297 (shift_state): Save variable values in ic_info->vars_saved.
298 (preedit_commit): Don't print debug information here. Don't
299 change ic_info->keys here.
300 (get_candidate_list): Don't ref plist.
301 (take_action_list): Don't unref return value of
302 get_candidate_list. For undo, reset ic->produced and recover
303 ic_info->vars. Be sure to set ic->candidate_list to NULL after
305 (init_ic_info): Set ic_info->vars_saved.
306 (fini_ic_info): Unref ic_info->vars_saved.
307 (re_init_ic): Be sure to set ic->candidate_list to NULL after
309 (filter): Be sure to set members preceding_text and following_text
310 to NULL. Print debug information about produced text. Delete
311 processed keys from ic_info->keys.
313 * input.h (MInputContextInfo): New member vars_saved.
315 2006-10-16 Kenichi Handa <handa@m17n.org>
317 * database.c (mdatabase__update): Fix the way to get db_info.
319 2006-10-02 Kenichi Handa <handa@m17n.org>
321 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
322 `size' changed to 24.
324 * font.c (xlfd_unparse_name): Adjusted for the change of
326 (font_score): Likewise.
327 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
329 * m17n-X.c (MFontX, _MFontX): Deleted.
330 (SET_SIZE, HAVE_SIZE): Deleted.
331 (free_display_info): Adjusted for the change of
332 disp_info->font_list format.
333 (xfont_registry_list): Likewise.
334 (xfont_open): Likewise.
335 (xfont_list): Likewise.
336 (xfont_encode_char): Ignore size to find a realized font.
337 (MRealizedFontXft): Change the order of members to make it
338 compatible with MRealizedFontFT.
340 2006-09-27 Kenichi Handa <handa@m17n.org>
342 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
343 (mfont_close): Add comments.
345 * mtext-lbrk.c (mtext_line_break): Add comment.
347 2006-09-26 Kenichi Handa <handa@m17n.org>
349 * input.c (minput_get_description): Handle description about
350 inclusion-only input methods.
352 2006-09-21 Kenichi Handa <handa@m17n.org>
354 * input.c (M_gettext): New variable.
355 (fully_initialize): Initialize M_gettext.
356 (check_description): New function.
357 (load_commands): Call check_description.
358 (config_all_commands): Be sure to unref pl.
359 (load_variables): Call check_description.
360 (config_all_variables): Be sure to unref pl.
361 (load_im_info): Call check_description.
363 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
365 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
366 and bind_textdomain_codeset.
368 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
370 2006-09-15 Kenichi Handa <handa@m17n.org>
372 * input.c (reload_im_info): Update custom and global info.
373 (init_ic_info): Fix previous change.
375 2006-09-14 Kenichi Handa <handa@m17n.org>
377 * database.c: Include <libgen.h>.
378 (mdatabase__lock): Make a directory if necessary.
380 * input.c (resolve_command): Adjusted for the format change of
381 configured_cmds member.
382 (load_commands, load_variables): Fix for errornous data handling.
383 (config_command, config_variable): New function.
384 (config_all_commands, config_all_variables): Renamed from
385 config_commands and config_variables. Utilize the above function.
386 (check_variable_value): Argument changed. Callers changed.
387 (load_im_info): Call config_all_commands and config_all_variables.
388 (init_ic_info): Adjusted for the format change of configured_vars
390 (minput__init): Initialize Mcustomized, Mconfigured, and
392 (Mcustomized, Mconfigured, Minherited): New variables.
393 (minput_get_command): Be sure to return NULL if an input method
394 use no local command.
395 (minput_get_variable): Be sure to return NULL if an input method
396 use no local variable.
397 (minput_config_command, minput_config_variable)
398 (minput_save_config): Adjusted for the format change of
399 configured_cmds and configured_vars members.
401 * plist.c (write_element): Delete superfluous ':'.
403 2006-09-13 Kenichi Handa <handa@m17n.org>
405 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
406 (minput_config_file): Extern it.
408 * draw.c (Minherited): Declaration moved to input.c.
409 (mdraw__init): Don't initialize Minherited here.
411 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
413 2006-09-07 Kenichi Handa <handa@m17n.org>
415 * textprop.c (mtext_serialize): Call mplist__serialize with the
418 * plist.h (mplist__serialize): Prototype adjusted.
419 (mplist__assq): Extern it.
421 * plist.c: Include <ctype.h>
422 (PUTC, PUTS): New macros.
423 (write_symbol): New function.
424 (write_element): New arg indent.
425 (dump_string, dump_plist_element): Delete them.
426 (mplist__from_string): New arg pretty.
427 (mplist__assq): New function.
428 (mdebug_dump_plist): Use write_element.
430 * mtext.c (mtext_cat_char): Allocate more memory.
431 (mdebug_dump_mtext): Don't escal a newline character.
433 * m17n.h (minput_get_command, minput_get_variable)
434 (minput_config_command, minput_config_variable)
435 (minput_save_config): Extern them.
437 * m17n-core.c: Include <string.h>.
438 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
439 use the stream stdout instead of a file of that name.
441 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
444 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
445 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
446 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
447 (MDEBUG_DUMP): Flush the stream.
449 * input.h (struct _MInputMethodInfo): Delete member im. New
450 members mdb, language, name, extra, cmds, configured_cmds,
451 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
452 (MInputContextInfo): New member tick.
454 * input.c: Big change to improve user-side input method
455 customization. Here, list just public API changes.
456 (minput_get_commands, minput_get_variables)
457 (minput_assign_command_keys, minput_set_variable): Label them
459 (minput_get_command, minput_get_variable)
460 (minput_config_command, minput_config_variable)
461 (minput_save_config): New functions.
463 * database.h (PATH_MAX): Define it if not yet defined.
464 (PATH_SEPARATOR): Likewise.
465 (enum MDatabaseStatus): New enum.
466 (struct MDatabaseInfo): Moved from database.c. New members status,
467 time, lock_file, and uniq_file.
468 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
469 (mdatabase__unlock): Extern them.
471 * database.c: Include <time.h>.
472 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
473 (GEN_PATH): Args changed. Callers changed.
474 (struct MDatabaseInfo): Moved to database.h.
475 (struct MDatabase, mdb_list): Deleted.
476 (mdatabase__list): New var.
477 (get_database_filename): Deleted. Callers changed to use
479 (find_file, get_database_file): New files.
480 (get_dir_info): Initialize new members of MDatabaseInfo.
481 (find_database): Arg chagnded. Callers changed.
482 (free_db_info, register_database, register_databases_in_files):
484 (update_database_list): Deleted.
485 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
486 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
487 (mdatabase__update): New function.
488 (mdatabase__check): Return value changed.
489 (mdatabase__file, mdatabase__lock, mdatabase__save)
490 (mdatabase__unlock): New functions.
492 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
494 * input.c (get_surrounding_text): Return -2 when surrounding text
496 (get_following_char): Likewise.
497 (get_preceding_char): Likewise.
498 (minput__callback): Return 0 if there is a callback function,
501 2006-08-17 Kenichi Handa <handa@m17n.org>
503 * input.c (reset_ic): Use shift_state to setup the current state.
505 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
507 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
508 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
509 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
511 2006-08-02 Kenichi Handa <handa@m17n.org>
513 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
515 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
517 * font-ft.c (ft_encapsulate): Add code for debugging.
518 (mfont__ft_drive_otf): Be sure to encode character before getting
521 2006-07-21 Kenichi Handa <handa@m17n.org>
523 * draw.c (mdraw_text_extents): Fix previous typo.
525 2006-07-19 Kenichi Handa <handa@m17n.org>
527 * draw.c (gstring_width): New arg lbearing.
528 (render_glyph_string): Adjusted for the change of gstring_width.
529 (mdraw_text_extents): Fix lbearing of ink and line metrics.
531 * m17n-core.h (Mlanguage): Extern it.
533 * m17n.h (Mlanguage): Extern deleted.
535 * mtext.c (mtext__init): Initialize Mlanguage.
536 (Mlanguage): Declaration moved from locale.c
538 * locale.c (mlocale__init): Don't initialize Mlanguage here.
539 (Mlanguage): Declaration moved to mtext.c.
541 * language.c (mlang__init): Don't initialize Mlanguage here.
543 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
545 2006-07-14 Kenichi Handa <handa@m17n.org>
547 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
548 (MRealizedFontFT): New member face_encapsulated.
549 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
550 (ft_gen_font): New function.
551 (ft_add_font): Use ft_gen_font.
552 (ft_list_script): Store lists in ft_script_list.
553 (ft_check_otf): New arg ft_face. Caller changed.
554 (ft_check_language): Likewise.
555 (ft_check_script): Likewise.
556 (ft_encapsulate, ft_close): New functions.
557 (mfont__ft_driver): Initialize members encapsulate and close.
558 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
560 * font.h (struct MRealizedFont): New member encapsulating.
561 (struct MFontDriver): New members encapsulate and close.
563 * font.c (mfont__match_p): If FONT is realized, check capability
564 by font drivers's check_capability method.
565 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
568 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
569 declarations of foundry and fam local vars.
570 (xft_driver): Make it static.
572 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
573 (mfont_close): Extern them.
575 * m17n-gd.c (device_open): Don't specify foundry and family of the
578 2006-07-11 Kenichi Handa <handa@m17n.org>
580 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
582 2006-07-13 Kenichi Handa <handa@m17n.org>
584 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
586 (ft_check_script): Delete unused var.
587 (ft_list_capability): Likewise.
589 * font.c (mfont__get_capability): Setup cap->otf.
590 (Motf): Make it global.
591 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
593 * font.h (MFontCapability): New member otf.
595 * language.c (mlang__fini): Delete unused vars.
597 * m17n-gui.h (Motf): Extern it.
599 * database.c (update_database_list): Delete unused vars.
601 2006-07-07 Kenichi Handa <handa@m17n.org>
603 * font-ft.c (DEVICE_DELTA): Fix typo.
605 2006-07-06 Kenichi Handa <handa@m17n.org>
607 * fontset.c (mfont__lookup_fontset): Don't ignore family and
610 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
612 * database.c: Update comments.
614 2006-07-05 Kenichi Handa <handa@m17n.org>
616 * database.c (PATH_MAX): Define it if not yet defined.
617 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
619 (get_database_filename): Use GEN_PATH.
620 (get_dir_info): Don't include the last '/' in directory name.
621 (register_database): New function.
622 (update_database_list): Use register_database. Search all
623 directories in mdatabase__dir_list for wildcard databases.
624 (mdatabase__init): Check "~/.m17n.d".
626 2006-07-03 Kenichi Handa <handa@m17n.org>
628 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
629 push reverse property.
631 * plist.c (dump_plist_element): Fix previous change.
633 2006-06-28 Kenichi Handa <handa@m17n.org>
635 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
638 * draw.c (MbidiNSM): New variable.
639 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
640 attention to bidi type NSM.
641 (mdraw__init): Initialize MbibiNSM.
643 * language.c (mscript__char_list): Fix finding a char-list element.
645 * plist.c (dump_string): Return number of printed characters.
646 (dump_plist_element): Print elements more compactly.
648 2006-06-23 Kenichi Handa <handa@m17n.org>
650 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
651 (include_HEADERS): Likewise.
653 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
655 * language.c: Update documentation.
657 2006-06-23 Kenichi Handa <handa@m17n.org>
659 * font-ft.c (struct MFontFT): Delete member lang.
660 (free_ft_info): Don't unref member lang. Destroy members langset
662 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
663 changed. Set members langset and charset.
664 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
666 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
668 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
669 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
670 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
671 characters at first. If it fails, try listing by language names.
672 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
673 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
674 change of MFontCapability.
675 (ft_list_capability): Likewise. Try listing by languages, then by
676 scripts. Check OTF at last.
677 (ft_check_script): New function.
678 (ft_select): Adjusted for the check of MFontCapability.
679 (ft_list_family_names): New function.
680 (ft_check_capability): If cap->script is not Mnil, call
682 (mfont__ft_driver): Initialize with ft_list_family_names.
684 * font.h (struct MFontDriver): New member list_fmaily_names.
685 (struct): Change member "MSymbol *lang" to "MSymbol language".
687 * font.c: Include "language.h".
688 (Motf): New variable.
689 (otf_script_list, load_otf_script_list): Delete it.
690 (find_script_from_otf_tag): Delete it.
691 (merge_capability): New function.
692 (mfont__init): Init Motf.
693 (mfont__fini): Don't unref otf_script_list.
694 (free_font_capability): Check cap->script_tag to determine if
695 OTF-related capability is set.
696 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
697 the change of type MFontCapability.
698 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
700 (mfont_list): Call merge_capability for LANGUAGE arg.
701 (mfont_list_family_names): New function.
703 * input-gui.c: Typo in comments fixed.
705 * input.c: Typo in comments fixed.
707 * language.h (mlanguage__list): Delete it.
708 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
711 * language.c: Include "mtext.h".
712 (M_script_lang_list): Delete it.
713 (language_list, script_list): New variables.
714 (load_lang_script_list, init_language_list, init_script_list): New
716 (mlang__init): Don't load language database here.
717 (mlang__fini): Unref language_list and script_list if not NULL.
718 (mlanguage__list): Delete it.
719 (mlanguage__info, mscript__info, mscript__char_list)
720 (mscript__otf_tag, mscript__from_otf_tag): New functions.
721 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
722 (mscript_list, mscript_language_list): New functions.
724 * m17n-gui.h (mfont_list_family_names): Extern it.
726 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
727 (mlanguage_text, mscript_list, mscript_language_list): Extern
730 2006-06-21 Kenichi Handa <handa@m17n.org>
732 * m17n-X.c (xfont_driver): Initialize with
733 xfont_list_family_names.
734 (xfont_list_family_names): New function.
735 (xft_driver): Initialize with NULL for list_family_names member.
736 (device_init): Set list_family_names member of xft_driver to that
739 2006-06-06 Kenichi Handa <handa@m17n.org>
741 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
743 2006-03-24 Kenichi Handa <handa@m17n.org>
745 * font-ft.c (ft_open): Improve debug message.
747 * fontset.c (mfontset__get_font): Fix for the case that no font in
748 per_script list is available.
750 2006-02-06 Kenichi Handa <handa@m17n.org>
752 * Version 1.3.3 released.
754 2006-02-22 Kenichi Handa <handa@m17n.org>
756 * textprop.c: Fix some typos in documentation.
758 * plist.c: Fix some typos in documentation.
760 * m17n-core.h: Fix some typos in documentation.
761 (M17NLIB_PATCH_LEVEL): Updated to 3.
762 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
764 * symbol.c: Fix some typos in documentation.
766 * mtext.c: Fix some typos in documentation.
768 * input.c: Fix several typos in documentation.
770 2006-02-06 Kenichi Handa <handa@m17n.org>
772 * Version 1.3.2 released.
774 2006-02-03 Kenichi Handa <handa@m17n.org>
776 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
777 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
779 * font.c (xlfd_parse_name): Fix handling of the name "nil".
781 * draw.c (layout_glyphs): Fix handling left_padding of
784 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
786 2006-02-02 Kenichi Handa <handa@m17n.org>
788 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
791 2006-01-25 Kenichi Handa <handa@m17n.org>
793 * input.c (resolve_expression): If the value of PLIST is a plist,
794 but the first element is not symbol, return 0.
796 2006-01-17 Kenichi Handa <handa@m17n.org>
798 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
799 HAVE_GD is 2 or the greater.
801 2006-01-16 Kenichi Handa <handa@m17n.org>
803 * Version 1.3.1 released.
805 2006-01-16 Kenichi Handa <handa@m17n.org>
807 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
808 simulating anti-aliasing.
810 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
811 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
813 2006-01-12 Kenichi Handa <handa@m17n.org>
815 * input.c (get_surrounding_text): Always pop ic->plist.
816 (reset_ic): Don't reset ic->plist.
818 2006-01-10 Kenichi Handa <handa@m17n.org>
820 * input.c (preedit_commit): For debugging, print only commiting
821 charactes. Don't set ic->candidate_show to 0.
822 (handle_key): Don't run branch-actions just by shifting to the
824 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
825 Reset vars and plist.
827 2006-01-07 Kenichi Handa <handa@m17n.org>
829 * input.c (load_branch): Confirm that maps is not NULL.
831 2006-01-05 Kenichi Handa <handa@m17n.org>
833 * input-gui.c (win_filter): Try to convert arg to key only when
836 * plist.c (read_integer_element): If '#' and '-' are followed by
837 non-integer-constituent, read them as a part of a symbol.
838 (read_symbol_element): New arg C.
839 (read_element): Adjust args to read_symbol_element.
841 * input.c (load_macros): On overwriting a macro, free the old
843 (minput__init): Store Mmap in load_im_info_keys.
844 (minput_get_title_icon): If the input method has no title, be sure
846 (minput_get_description): If the input method has no description,
847 be sure to return NULL.
848 (minput_get_variables): Fix documentation.
849 (handle_key): Pay attention to the case that key is Mnil.
850 (filter): Likewise. Fix handling of such symbol as S-A.
852 2005-12-22 Kenichi Handa <handa@m17n.org>
854 * Version 1.3.0 released.
856 2005-12-22 Kenichi Handa <handa@m17n.org>
858 * font-ft.c (ft_list): If the specified font has no property,
861 2005-12-20 Kenichi Handa <handa@m17n.org>
863 * character.c (mchar_get_prop): Check char_prop_list.
864 (mchar_put_prop, mchar_get_prop_table): Likewise.
866 2005-12-18 Kenichi Handa <handa@m17n.org>
868 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
869 file name sans language.
871 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
873 * input.c: Fix typo in comments.
875 2005-12-14 Kenichi Handa <handa@m17n.org>
877 * input.c (minput_get_title_icon): Check the default icon for the
880 2005-12-13 Kenichi Handa <handa@m17n.org>
882 * input.c (Mless_equal, Mgreater_equal): New variables.
883 (parse_expression, resolve_expression, parse_action_list)
884 (take_action_list): Handle the aboves.
885 (filter): Treat key S-X as X.
886 (minput__init): Initialize Mless_equal and Mgreater_equal.
887 (minput_get_title_icon): New function.
889 * m17n.h (minput_get_title_icon): Extern it.
891 * database.c (get_database_filename): Return a filename instead of
893 (load_database): Adjusted for the above change.
894 (mdatabase__load_for_keys): Likewise.
895 (mdatabase__find_file): New function.
897 * database.h (mdatabase__find_file): Extern it.
899 * font.h (mfont__resize): Delete extern.
901 * font.c (mfont__list): Check resize ratio.
902 (mfont__resize): Delete it.
903 (mfont_resize_ratio): Include the code of mfont__resize.
905 * font-ft.c (ft_open): Check resize ratio.
907 * m17n-X.c (xfont_open): Check resize ratio.
908 (xft_open): Likewise.
910 2005-12-07 Kenichi Handa <handa@m17n.org>
912 * input.c (take_action_list): If take_action_list return -1,
914 (handle_key): Likewise.
916 * face.c (mface__for_chars): When font is specified and layouter
917 is found for it, if the layouter doesn't support one of a
918 character, use a face sans layouter for it.
920 2005-12-06 Kenichi Handa <handa@m17n.org>
922 * fontset.c (mfont__lookup_fontset): If only a fallback font is
923 found, don't use it for more than one character.
925 2005-12-05 Kenichi Handa <handa@m17n.org>
927 * face.c (mface__realize): Set rfont->layouter to Mnil.
928 (mface__for_chars): Fix handling of layouter.
930 * character.h (mchar__define_prop): Extern it.
932 * database.c (update_database_list): Call mchar__define_prop if
935 * character.c (mchar__init): Don't call mchar_define_property.
936 Instead just initialize property keys.
937 (mchar__fini): Free char_prop_list only if it's not NULL.
938 (mchar__define_prop): New function.
939 (mchar_define_property): Call mchar__define_prop.
941 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
944 2005-12-02 Kenichi Handa <handa@m17n.org>
946 * language.c (mlang__init): Handle extra chars.
948 * m17n-gui.h (mfont_check): Adjust prototype.
950 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
951 (xfont_check_capability): New function.
952 (xft_driver): Specify xft_check_capability.
953 (xft_check_capability): New function.
955 * font-ft.c (M0_3): Delete it.
957 (ft_get_charmaps): Refer to M0.
958 (fc_parse_pattern): Fix previous change.
959 (ft_list_language): Check also extra chars.
960 (ft_check_otf): Define it even if HAVE_OTF is undef.
961 (ft_check_lang): Check the result of FcLangSetHasLang against
962 FcLangDifferentLang. Check also extra chars.
963 (ft_list_capability): Delete ifdef HAVE_OTF.
964 (ft_select): Likewise.
965 (ft_open): Improve debug information.
966 (ft_check_capability): New function.
967 (mfont__ft_driver): Specify ft_check_capability.
968 (mfont__ft_init): Initialize M0.
970 * fontset.c (get_font_from_group): New function.
971 (mfontset__get_font): New function.
973 * fontset.h (mfontset__get_font): Extern it.
975 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
976 (mfont__fini): Delete ifdef HAVE_OTF.
977 (free_font_capability): Likewise.
978 (mfont__get_capability): Likewise.
979 (mfont__check_capability): New function.
980 (mfont_check): Change the order of arguments. Use
983 * font.h (struct MFontDriver): New member check_capability.
984 (MFontCapability): Delete ifdef HAVE_OTF.
985 (mfont__check_capability): Extern it.
987 * face.c (mface__realize): Fix handling of FONT arg.
988 (mface__for_chars): Fix handling of explicitly specified font.
990 2005-11-25 Kenichi Handa <handa@m17n.org>
992 * font-flt.c (run_command): Print debug info for
995 * draw.c (layout_glyphs): Fix handling of left/right_padding.
997 * face.c (mface__for_chars): Check rfont before accessing the
1000 2005-11-21 Kenichi Handa <handa@m17n.org>
1002 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1005 * fontset.c (fontset_table): New variable.
1006 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1007 (mfont__fontset_init): Add fontset_table as an object array.
1008 (mfont__realize_fontset): Ref FONTSET.
1009 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1010 (mfontset): Call M17N_OBJECT_REGISTER.
1011 (mfontset_copy): Likewise.
1013 * input.c (handle_key): For debugging, print information about
1015 (filter): Add an alias for Meta and Alt modifiers.
1016 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1018 (minput__init): Initialize them.
1019 (parse_expression): New function.
1020 (resolve_expression): New function.
1021 (parse_action_list): Handle expressions by parse_expression.
1022 (take_action_list): Handle expressions by resolve_expression.
1023 (parse_nested_list_value): Fix previous change.
1024 (resolve_command): Fix handling of the return value of
1027 2005-11-18 Kenichi Handa <handa@m17n.org>
1029 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1030 HAVE_OTF is defined.
1031 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1033 (ft_select): Likewise.
1035 * font.c (mfont_list): Fix for the case that FONT is NULL.
1036 (OTF_tag): Delete it.
1037 (load_otf_script_list): Define only when HAVE_OTF is defined.
1038 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1041 * draw.c (truncate_gstring): Be sure to truncate at
1042 glapheme-cluster boundary.
1044 2005-11-11 Kenichi Handa <handa@m17n.org>
1046 * input.c (delete_surrounding_text): Clear cache if necessary.
1048 2005-11-09 Kenichi Handa <handa@m17n.org>
1050 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1051 glyph prev is also supported by the current flt.
1053 2005-11-08 Kenichi Handa <handa@m17n.org>
1055 * m17n-X.c (xft_render): Cancel previous change.
1057 2005-11-07 Kenichi Handa <handa@m17n.org>
1059 * input.c: Include <stdlib.h>.
1060 (get_surrounding_text, delete_surrounding_text)
1061 (get_preceding_char, get_following_char): New functions.
1062 (integer_value): New arg surrounding. If it is nonzero, try to
1063 get a surrounding character. Callers changed.
1064 (take_action_list): Check `value' before setting an element.
1065 (destroy_ic): Unref ic_info->preceding_text and
1066 ic_info->following_text.
1067 (minput__init): Initialize Minput_get_surrounding_text and
1068 Minput_delete_surrounding_text.
1069 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1071 (filter): Unref ic_info->preceding_text and
1072 ic_info->following_text.
1074 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1077 * input.h (MInputContextInfo): New members preceding_text and
1080 2005-11-04 Kenichi Handa <handa@m17n.org>
1082 * input.c (parse_nested_list_value): Fix handling of the global
1084 (get_nested_list): Get global definitions by load_partial_im_info.
1085 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1086 MInputCandidatesChanged.
1087 (take_action_list): Likewise.
1088 (reset_ic): Likewise.
1089 (create_ic): Don't pay special attention to
1090 Mcandidates_group_size.
1091 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1092 (minput_set_variable): Get a definition of varible by
1093 mplist_find_by_value, not mplist_get.
1095 * m17n.h (enum MInputCandidatesChanged): New enum.
1097 2005-11-01 Kenichi Handa <handa@m17n.org>
1099 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1101 (mwin__destroy_window): If xft_draw's drawable is win, change it
1102 to device->drawable before destroying win.
1104 2005-10-31 Kenichi Handa <handa@m17n.org>
1106 * input.c (load_im_info): Fix adding of state.
1108 * m17n-core.c (m17n_fini_core): Fix reporting of module
1111 * m17n.c (m17n_fini): Fix reporting of module finalization.
1113 * m17n-gui.c (m17n_init_win): Fix reporting of module
1116 2005-10-29 Kenichi Handa <handa@m17n.org>
1118 * input.c (get_candidate_list): Fix the timing of referring plist.
1120 2005-10-28 Kenichi Handa <handa@m17n.org>
1122 * input.c (load_branch): Ignore an undefined map name.
1123 (load_im_info): Set im_info->title from `name' only if it's not
1125 (shift_state): Always update ic->status.
1126 (adjust_candidates): Renamed from adjust_candidate_command.
1127 Argument changed. Caller changed.
1128 (get_candidate_list, regularize_action): New functions.
1129 (take_action_list): Use them. On handling Munhandle, don't set
1131 (handle_key): If KEY is not handled by MAP, and MAP has
1132 branch_actions, perform them.
1134 * database.c (mdatabase__fini): Free dir_info->filename;
1136 2005-10-20 Kenichi Handa <handa@m17n.org>
1138 * input.c (marker_code): Accept '@@'.
1139 (integer_value): Handle '@@'.
1140 (parse_action_list): Accept a symbol argument.
1141 (take_action_list): Resolve the symbol argument. Handle the
1144 2005-10-18 Kenichi Handa <handa@m17n.org>
1146 * input.c: Include "charset.h".
1147 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1149 (MIMState): New member (M17NObject control).
1150 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1151 (get_nested_list, resolve_variable): New functions.
1152 (integer_value): New arg (MPlist **value). Set it to the plist
1153 element containing the value.
1154 (resolve_command): New function.
1155 (load_translation): New arg (MPlist *map_actions).
1156 (load_branch): New args language and name. If `keylist' is a
1157 symbol, resolved that as a command name.
1158 (free_map): New arg top. Free map->map_actions only if top is
1160 (free_state): New function.
1161 (load_state): New arg name.
1162 (im_info_list): New variable.
1163 (free_im_info, get_im_info_by_tags): New functions.
1164 (load_im_info): Arg key changed to plist. Handle `include'.
1165 Return (MInputMethodInfo *).
1166 (preedit_commit): Ref ic->candidate_list.
1167 (get_select_charset, adjust_candidate_command): New functions.
1168 (take_action_list): Handle `include'. Adjust candidate action
1169 properly. Handle control variables `candidates-charset' and
1170 `candidates-group-size'.
1171 (open_im): Use get_im_info.
1172 (create_ic): Get global variables.
1173 (load_partial_im_info): New function.
1174 (get_im_info): New function.
1175 (check_command_keyseq, check_command_list, check_variable_list):
1177 (minput__init): Don't handle M_database_hook and Mdetail_text.
1178 Initialize M_candidates, Mcandidates_group_size,
1179 Mcandidates_charset.
1180 (parse_variable_list, get_variable_list, parse_command_list)
1181 (get_command_list): Delete them.
1182 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1183 (minput__fini): Simply unref command_list and variable_list.
1184 (minput_get_description): Adjusted for the new form of description.
1185 (minput_get_commands): Use get_nested_list.
1186 (minput_assign_command_keys): Likewise.
1187 (minput_get_variables, minput_set_variable): Likewise.
1189 * input.h (MInputMethodInfo): New members im and maps.
1191 * database.h (M_database_hook): Delete extern.
1192 (MDatabaseHookFunc): Delete extern.
1193 (mdatabase__check): Extern it.
1195 * database.c: Include <glob.h>.
1196 (MAX_TIME): New macro.
1197 (Masterisk): New variable.
1198 (get_database_stream): Argument changed to (MDatabaseInfo *).
1200 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1201 (find_database): New function.
1202 (update_database_list): New function.
1203 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1204 calling update_database_list.
1205 (mdatabase__check): New function.
1206 (mdatabase_find): Use update_database and find_database. Don't
1207 handle MDatabaseHookFunc.
1208 (mdatabase_list): Call update_database at first.
1209 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1210 (MDatabaseList): New type.
1212 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1214 * m17n.h (Mdetail_text): Delete extern.
1216 * m17n-core.h (mplist_conc): Delete extern.
1218 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1220 (mplist_conc): Renamed to mplist__conc.
1221 (mplist__pop_unref): New function.
1223 2005-10-14 Kenichi Handa <handa@m17n.org>
1225 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1227 (read_element): If keys is an empty plist, return any element
1229 (dump_plist_element): Check if plist is nested.
1230 (mplist_conc): Always ref tail.
1231 (mplist_set): If key is a managing key, ref val in advance.
1233 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1234 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1235 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1238 * fontset.c (free_fontset): Unref fontset_list if necessary.
1239 (mfont__fontset_fini): Don't free fontset_list. Unref
1241 (mfont__realize_fontset): Initialize request.
1242 (mfontset): Ref default_fontset or fontset only if necessary.
1243 (mfontset_copy): Don't ref copy.
1245 * draw.c (render_glyphs): Check gend->type before checking
1248 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1249 unrefed plists to NULL.
1251 2005-10-04 Kenichi Handa <handa@m17n.org>
1253 * textprop.c (mtext_serialize): Be sure to make mt
1254 MTEXT_FORMAT_UTF_8 and NULL terminated.
1256 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1258 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1260 2005-10-03 Kenichi Handa <handa@m17n.org>
1262 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1263 is not at the beginning of line.
1265 2005-09-22 Kenichi Handa <handa@m17n.org>
1267 * input.c: Include <sys/stat.h> and <unistd.h>.
1268 (Minclude, Mcommit, Munhandle): New variables.
1269 (minput__init): Initialize them. Push only Mstate to
1270 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1271 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1273 (load_input_method): Handle "include" directive. If no states are
1275 (shift_state): If state_name is Mt, shift back to the previous
1276 state. Call preedit_commit to commit preedit text.
1277 (preedit_commit): New function.
1278 (take_action_list): Improve debug printing. Handle commit and
1280 (handle_key): Check the return value of take_action_list. Don't
1281 take branch_actions just after changing to the root map.
1282 (reset_ic): Reset all ic_info members.
1283 (filter): When a key is not handled, just move ic_info->keys
1284 instead fo calling reset_ic.
1285 (load_im_info): If key is not Mstate, push Mmap to
1287 (MDatabaseStatList): New type.
1288 (imdir_stat_list): New variable.
1289 (input_method_hook): Don't cancel the hook. Check the
1290 modification time of directories.
1291 (minput__fini): Free imdir_stat_list;
1293 * input.h (MInputContextInfo): New member prev_state.
1295 * m17n-core.h (mplist_conc): Extern it.
1297 * plist.c (mplist_conc): New function.
1299 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1301 * font.h (MRealizedFont): New member average_width.
1303 * font-ft.c (ft_open): Set rface->average_width.
1305 * font.c (xlfd_unparse_name): Print '*' before registry name.
1307 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1308 (xfont_open): Set rfont->average_width.
1309 (xft_open): Likewise.
1310 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1312 * internal-gui.h (struct MFrame): New member average_width.
1314 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1315 (mframe_get_prop): Return the average_width of a font.
1317 * face.c (mface__realize): Set rface->average_width.
1318 (mface__update_frame_face): Set frame->average_width.
1320 * face.h (MRealizedFace): New member average_width.
1322 2005-09-19 Kenichi Handa <handa@m17n.org>
1324 * font.c (xlfd_unparse_name): New arg full_xlfd.
1325 (mfont__encode_char): Use shortcut only for X core fonts.
1326 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1327 (mfont_put_prop): Handle `language' property.
1328 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1329 Print file can capability info too.
1331 * m17n-core.c (mdebug__output): New variable.
1332 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1333 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1334 (m17n_fini_core): Close mdebug__output if it's not stderr.
1336 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1337 (xfont_open): Handle baseline_offset.
1338 (xfont_find_metric): Likewise.
1339 (xfont_render): Likewise.
1340 (xft_open): Likewise.
1341 (xft_render): Likewise.
1343 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1344 (mdebug__output): Extern it.
1345 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1346 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1347 (MDEBUG_DUMP): New macro.
1348 (MDEBUG_PRINT_TIME): Print to medebug__output.
1350 * font.h (MRealizedFont): New member baseline_offset.
1352 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1354 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1355 (ft_list_family): Check alias.
1356 (ft_list_language): If language is "en", don't try to the second
1358 (ft_default_list): New variable.
1359 (ft_list_default): New function.
1360 (ft_select): If family is not specified, try only the default
1361 fonts. Treat the weights normal and medium same.
1362 (ft_open): Fix debug message. If registry is not specified, try
1363 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1364 (ft_find_metric): Likewise.
1365 (ft_render): Likewise.
1366 (ft_list): Fix debug message. Accept the registring iso8859-1.
1367 If family is not specified, try only the default fonts.
1369 * face.c (mface__realize): Fix logic of opening a font.
1371 2005-09-16 Kenichi Handa <handa@m17n.org>
1373 * face.c (mface__realize):
1375 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1378 * input.c (shift_state): Fix the condition of taking init actions.
1379 (take_action_list): Fix handling of pushback action.
1380 (handle_key): Don't change key while checking its alias.
1381 (minput__init): Initialize new variables.
1382 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1385 2005-09-12 Kenichi Handa <handa@m17n.org>
1387 * mtext.c (mtext__uppercase): Add proper open/close parens.
1388 (mtext_titlecase): Add proper casting.
1390 * input.c (parse_action_list): Handle the case that the arg is a
1391 key sequence (MText or MPlist).
1392 (take_action_list): Likewise.
1393 (shift_state): Shorter debug message.
1394 (handle_key): Terminate a debug message by "\n".
1395 (reset_ic): Don't take initial actions here.
1396 (minput_open_im): Print a debug message.
1397 (minput_close_im): Likewise.
1398 (minput_create_ic): Likewise.
1399 (minput_destroy_ic): Likewise.
1401 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1403 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1406 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1407 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1410 * character.c: Add Japanese documentation for
1411 mchar_get_prop_table ().
1413 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1415 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1416 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1417 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1419 (init_case_conversion): New function.
1420 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1421 (uppercase_precheck, lowercase_precheck, final_sigma)
1422 (after_soft_dotted, more_above, before_dot, after_i)
1423 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1425 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1427 * plist.c (read_mtext_element): Fix previous change.
1429 2005-09-05 Kenichi Handa <handa@m17n.org>
1431 * plist.c (read_mtext_element): Handle \uXXXX notation.
1433 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1434 (MTABLE_ALLOCA): Change the name of local variable.
1436 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1437 HAVE_FREETYPE are defined.
1439 * m17n-X.c: Check HAVE_X11.
1441 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1442 directory listing libraries.
1443 (noinst_PROGRAMS): Define it only in maintainer mode.
1445 2005-09-02 Kenichi Handa <handa@m17n.org>
1447 * m17n-gui.h (mdraw_line_break_option): Extern it.
1449 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1450 end of the first glyph.
1451 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1453 (mdraw_line_break_option): New variable.
1454 (mdraw_default_line_break): Use mtext_line_break.
1456 * mtext.h (wordseg_func_table): Don't extern it.
1457 (mtext__wseg_fini): Extern it.
1459 * mtext.c: Don't include word-thai.h.
1460 (wordseg_func_table): Delete this variable.
1461 (mtext__init): Don't initialize above. Don't call
1462 mtext__word_thai_init.
1463 (mtext__fini): Don't free wordseg_func_table. Call
1464 mtext__wseg_fini instead fo mtext__word_thai_fini.
1465 (MTextWordsegFunc): Don't typedef it.
1466 (mtext__word_segment): Moved to mtext-wseg.c.
1468 * m17n-core.h (enum MTextLineBreakOption): New enum.
1469 (mtext_line_break): Extern it.
1471 * mtext-wseg.c: New file.
1473 * mtext-lbrk.c: New file.
1475 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1476 add mtext-lbrk.c and mtext-wseg.c.
1478 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1479 the case that head is NULL.
1481 2005-09-01 Kenichi Handa <handa@m17n.org>
1483 * word-thai.c (wordseg_propertize): If the property value is nil,
1484 don't make the property no-merge.
1485 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1486 attention to the case that they are NULL.
1487 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1490 * character.c (mchar_get_prop_table): New function.
1492 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1494 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1495 (mchar_get_prop_table): Extern it.
1497 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1498 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1500 * internal.h (enum MTextCoverage): New enum.
1501 (MText): New member coverage.
1503 * mtext.c (FORMAT_COVERAGE): New macro.
1504 (insert): Copy mt2->coverage.
1505 (mtext__from_data): Initialize mt->coverage.
1506 (mtext__adjust_format): Update mt->coverage.
1507 (mtext): Initialize mt->coverage.
1508 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1509 Update mt->coverage if necessary.
1510 (mtext_duplicate): Copy mt->coverage.
1511 (mtext_insert, mtext_replace): New functions.
1512 (mtext_dup): Use mtext_duplicate.
1513 (mtext__word_segment): Don't set *from and *to if a word
1514 segmentation funcion is not found.
1515 (mtext_ins_char): Fix typo.
1517 2005-08-25 Kenichi Handa <handa@m17n.org>
1519 * font.h (MFont): New member for_full_width.
1521 * font.c (compare_font_score): Prefer a font of not
1524 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1525 registry charset of a font is one of CJK charsets.
1527 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1528 supports some of CJK.
1530 2005-08-24 Kenichi Handa <handa@m17n.org>
1532 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1534 * m17n-gui.c (null_device_open): Check Mresolution param and set
1537 * m17n-gd.c (device_open): Check Mresolution param and set
1540 * m17n-X.c (MWDevice): New member resy.
1541 (xfont_open): Set ascent, descent, and max_advance members of
1543 (xft_open): Likewise.
1544 (device_open): Compare also screen_num to find a device. Set
1545 device->resy and frame->dpi.
1547 * internal-gui.h (MFrame): New member dpi.
1549 * font.h (MRealizedFont): New member max_advance.
1551 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1552 (mfont__init): Don't initialize Mascent, Mdescent.
1553 (Mascent, Mdescent): Delete these variables.
1554 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1555 Mfont_descent instead of Mascent and Mdescent.
1556 (mfont_put_prop): Allow negative size.
1557 (mfont_find): Handle the case of spec->size < 0. Fix previous
1559 (mfont_list): Handle the case of spec->size < 0.
1560 (mfont_check): Likewise.
1562 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1563 (fc_get_pattern): Handle the case of font->size < 0.
1564 (ft_open): Set ascent, descent, and max_advance members of rfont.
1565 (ft_find_metric): Improve rounding.
1566 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1569 * face.c (mface__realize): Handle the case of font->size < 0.
1571 2005-08-22 Kenichi Handa <handa@m17n.org>
1573 * coding.c (MConverterStatus): Change the member buf to union.
1574 (mconv_buffer_converter): Add const to the arg buf.
1575 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1576 (mconv_decode): Adjusted for the change of MConverterStatus.
1577 (mconv_encode_range): Likewise.
1579 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1580 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1582 2005-08-20 Kenichi Handa <handa@m17n.org>
1584 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1585 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1587 * m17n-X.c (xfont_open): Set members ascent, descent, and
1588 max_advance of rfont.
1589 (xft_open): Likewise.
1591 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1593 (mfont__ft_parse_name): Add const to the arg name.
1595 * font.c (xlfd_parse_name): Add const to the arg name. Call
1596 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1597 (xlfd_unparse_name): Handle spacing.
1598 (mfont__init): Initialize new variables.
1599 (mfont__id): Handle spacing.
1600 (mfont__merge): Likewise.
1601 (mfont__set_spec): This function deleted.
1602 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1603 condition of calling mfont__ft_parse_name.
1604 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1605 (mfont_get_prop): Handle properties spacing, ascent, descent,
1607 (mfont_find): Return a realized font.
1608 (mfont_from_name): Add const to the arg name.
1610 * font.h (enum MFontProperty): New member MFONT_SPACING.
1611 (enum MFontSpacing): New enum.
1612 (MFont): New members spacing and max_advance.
1613 (mfont__ft_parse_name): Prototype adjusted.
1614 (mfont__set_spec): Extern deleted.
1615 (mfont__parse_name_into_font): Prototype adjusted.
1617 2005-08-19 Kenichi Handa <handa@m17n.org>
1619 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1621 * font.c (mfont_list): If FONT is null, use a temporary font.
1622 (mfont_parse_name): Add const to the arg name.
1624 2005-08-18 Kenichi Handa <handa@m17n.org>
1626 * word-thai.c: Surround code by #ifdef and #endif to escape from
1629 * font-ft.c: Mostly re-written.
1631 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1632 (FontLayoutCmd): Type of the member otf changed..
1633 (load_otf_command): Adjusted for the format change of otf command.
1634 (load_command): Likewise.
1635 (free_flt_command): Unref cmd->body.otf.
1636 (run_otf): Ajusted for the type change of otf_cmd.
1637 (run_command): Ajusted for the type change of otf_cmd. On
1638 debugging, print ctx->combining_code.
1639 (mfont__flt_run): Initialize ctx's members code_offset,
1640 combining_code, and left_padding to 0.
1642 * face.h (struct MRealizedFace): New member font.
1643 (mface__realize): Prototype adjusted.
1645 * face.c (find_realized_face): New arg font.
1646 (find_realized_face): Adjusted for the change of MFont.
1647 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1648 (mface__fini): Don't call mdebug__report_object.
1649 (mface__realize): New arg font.
1650 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1651 Optimize the latin case.
1652 (mface__free_realized): Free rface->font.
1653 (mface__update_frame_face): Adjusted for the change of mface__realize.
1654 (mface_equal): New function.
1656 * draw.c (Mcommon): New variable.
1657 (visual_order): Args to mfont__encode_char changed.
1658 (compose_glyph_string): Handle Mfont text property.
1659 (layout_glyphs): Adjusted for the change of MFont.
1660 (mdraw__init): Initialize Mcommon.
1661 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1663 * font.h (enum MFontType): Members completely changed.
1664 (enum MFontProperty): Move MFONT_SIZE to the tail.
1665 (enum MFontSource): New enum.
1666 (struct MFont): New members type, source, sizes, file, capability,
1668 (struct MRealizedFont): Type of member font changed. Members
1669 score, status, and encoding deleted.
1670 (MFontScore): New type.
1671 (MFontList): Member changed.
1672 (struct MFontDriver): New member has_char. Types of members
1674 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1675 (Mapple_roman): Extern them.
1676 (OTF_Tag): Typedefed if not HAVE_OTF.
1677 (enum MFontOpenTypeTable): New enum.
1678 (MFontCapability): New type.
1679 (mfont__ft_drive_otf): Prototype adjusted.
1680 (mfont__score): Extern deleted.
1681 (mfont__merge): Extern it.
1682 (mfont__has_char): Extern it.
1683 (mfont__encode_char): Prototype adjusted.
1684 (mfont__open): Extern it.
1685 (mfont__set_spec): Prototype adjusted.
1686 (mfont__get_capability): Extern it.
1688 * font.c: Include "fontset.h".
1689 (M_font_capability, M_font_list, M_font_list_len): New variables.
1690 (font_score_priority): Change order of initial elements.
1691 (font_score_shift_bits): Fix array size.
1692 (common_weight): Add "thin", "semibold", and "heavy".
1693 (common_stretch): Add "ultracondensed", "extracondensed",
1694 "extraexpanded", and "utltraexpand".
1695 (font_weight_regular, font_weight_normal, font_weight_medium): New
1697 (gen_font_name): This function deleted.
1698 (find_encoding): Set font->encoding.
1699 (OTF_tag): New function.
1700 (otf_script_list): New variable.
1701 (load_otf_script_list): New function.
1702 (find_script_from_otf_tag): New function.
1703 (xlfd_parse_name): Set font->type and font->source.
1704 (mfont__free_realized): Free chains rfonts.
1705 (font_score): Renamed from mfont__score.
1706 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1707 (Mapple_roman): New variables.
1708 (mfont__init): Initilize new variables. Initalize
1709 default_encoding.encoding_name and
1710 default_encoding.encoding_charset to Municode_full and
1711 mcharset__unicode. Use SAFE* macros for allocating filepath
1713 (mfont__fini): Free otf_script_list.
1714 (mfont__id): New function.
1715 (mfont__match_p): Check also capability member of MFont.
1716 (mfont__merge): New funciton.
1717 (mfont__set_spec_from_face): Set type and source members.
1718 (mfont__set_spec_from_plist): Set capability and type members.
1719 (mfont__select): Argument changed.
1720 (mfont__available): New function.
1721 (compare_font_score): New function.
1722 (mfont__list): New function.
1723 (mfont__open): Return a realized font.
1724 (mfont__resize): Adjusted for the change of MFont.
1725 (mfont__has_char): New function.
1726 (mfont__encode_char): Argument changed.
1727 (mfont__set_spec): Argument changed.
1728 (free_font_capability): New function.
1729 (mfont__get_capability): New function.
1730 (MFontfile): New variable.
1731 (mfont_get_prop): Adjusted for the change of MFont.
1732 (mfont_put_prop): Likewise.
1733 (mfont_set_selection_priority): Fix the way of setting
1734 font_score_priority[].
1735 (mfont_find): Use mfont__list instead of mfont__select.
1736 (mfont_resize_ratio): Adjusted for the change of MFont.
1737 (mfont_list): Use mfont__list.
1738 (mfont_check): New function.
1739 (font_score): Make it static.
1741 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1742 (mfont__lookup_fontset): Likewise.
1744 * fontset.c (struct MFontset): Delete member font_spec_list.
1745 (struct MRealizedFontset): Type of member spec changed. New
1747 (load_font_group): Arg spec_list deleted.
1748 (load_fontset_contents): Adjusted for the change of fontset_def.
1749 (free_fontset): Fix the way of freeing fontset elements.
1750 (realize_fontset_elements): Argument changed.
1751 (get_per_script): New function.
1752 (free_realized_fontset_elements): Fix the way of feeing rfontset
1754 (update_fontset_elements): Fix args to realize_fontset_elements.
1755 (mfont__realize_fontset): New arg spec.
1756 (try_font_list): New function.
1757 (try_font_group): New arg request. Use try_font_list.
1758 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1760 (mfontset): Adjusted for the change of MFontset.
1761 (mfontset_copy): Likewise. Don't share plists.
1762 (mfontset_modify_entry): Adjusted for the change of MFontset.
1763 (mfontset_lookup): Call get_per_script.
1764 (mdebug_dump_fontset): Print also the address of fonts.
1766 * input.c (shift_state): Don't reset ic_info->vars.
1767 (take_action_list): Call MDEBUG_PRINT fore calling
1770 * internal-gui.h (MFontDriver): Don't typedef it here.
1772 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1773 (MXFont): This type deleted.
1775 (struct _MFontX): New struct.
1776 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1777 (MDisplayInfo): Member base_font_list deleted.
1778 (DEFAULT_FONT): Definition changed.
1779 (FALLBACK_FONT): This maclr deleted.
1780 (free_display_info): Adjusted for the change of MDisplayInfo.
1781 (free_device): Argument to mfont__free_realized changed.
1782 (xfont_driver): Adjusted for the change of MFontDriver.
1783 (xfont_registry_list): Use MFontX instead of MXFont.
1784 (MRealizedFontX): Renamed from MXFontInfo.
1785 (xfont_select): Return the font found first.
1786 (close_xfont): Change MXFontInfo to MRealizedFontX.
1787 (xfont_open): Return the realized font.
1788 (xfont_find_metric): Get xfont from rfont->fontp.
1789 (xfont_has_char): New function.
1790 (xfont_encode_char): Adjusted for the argument change.
1791 (xfont_render): Get xfont from rfont->fontp.
1792 (xfont_list): Adjusted for the argument change.
1793 (MRealizedFontXft): Renamed from MXftFontInfo.
1794 (xft_driver): Ajusted for the change of MFontDriver.
1795 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1796 (xft_open_font): Argument changed.
1797 (xft_open): Argument changed. Return the realized font.
1798 (xft_find_metric): Get xft_font from rfont->fontp.
1799 (xft_has_char, xft_encode_char): New functions.
1800 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1801 font if not yet opened.
1802 (device_open): Don't set frame->font.
1804 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1806 (gd_font_open): New function.
1807 (gd_render): Don't use the local variable ft_info.
1808 (device_init): Adjusted for the change of gd_font_driver.
1810 * textprop.c (mtext__prop_init): Initialize text_property_table.
1811 Call M17N_OBJECT_ADD_ARRAY.
1812 (mtext__prop_fini): Don't call mdebug__report_object.
1814 * plist.c (mplist__init): Initialize plist_table.
1815 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1816 (mplist__fini): Don't call mdebug__report_object.
1818 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1819 (mtext__fini): Don't call mdebug__report_object.
1820 (MTEXT_FORMAT_UTF_16): Correct type.
1821 (mtext_data): New function.
1822 (mtext_text): Fix calculation of limit and args to
1825 * language.c: Include "plist.h".
1826 (M_script_lang_list): New variable.
1827 (mlang__init): Read languages and their information from m17n
1829 (mlanguage__list): New function.
1830 (Miso639_1, Miso639_2): New variables.
1832 * language.h (mlanguage__list): Extern it.
1834 * database.c (get_database_stream): Use SAFE_* macros for
1835 allocating and freeing path.
1836 (mdatabase__init): Likewise.
1838 * symbol.c (msymbol__fini): Don't free symbols here.
1839 (msymbol__free_table): New function.
1840 (msymbol_is_managing_key): New function.
1842 * symbol.h (msymbol__free_table): Extern it.
1843 (msymbol__list): Extern it.
1845 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1847 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1848 (struct _M17NObjectArray): New member name and next.
1849 (mdebug__add_object_array): Extern it.
1850 (M17N_OBJECT_ADD_ARRAY): New macro.
1851 (mdebug__report_object): Don't extern it.
1853 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1855 * m17n-gui.c (free_frame): Don't free frame->font.
1856 (null_device_fini): Fix code for freeing
1857 null_device.realized_font_list.
1858 (m17n_fini_win): Free interface.
1859 (mframe): Cast the return value of dlsym. Set frame->font here.
1860 (mframe_get_prop): Check frame->rface->rfont before accessing the
1863 * m17n-gui.h (Mfontfile): Extern it.
1864 (mfont_check): Extern it.
1865 (mface_equal): Extern it.
1867 * m17n-core.c: Include "symbol.h".
1868 (report_header_printed): This variable deleted.
1869 (object_array_root): New variable.
1870 (report_object_array): New function.
1871 (mdebug__report_object): This function deleted.
1872 (mdebug__add_object_array): New function.
1873 (m17n_init_core): Call mchartable_init () before mtext_init ().
1874 (m17n_fini_core): Call report_object_array (if necessary) and
1875 msymbol__free_atable at the end.
1877 * m17n-core.h (msymbol_is_managing_key): Extern it.
1878 (mtext_data): Extern it.
1879 (MTEXT_FORMAT_UTF_16): Correct type.
1880 (M17NLIB_MINOR_VERSION): Changed to 3.
1881 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1883 * chartab.c (mchartable__init): Initalize chartable_table.count.
1884 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1885 mdebug__report_object.
1887 2005-05-26 Kenichi Handa <handa@m17n.org>
1889 * m17n.h (Miso639_1, Miso639_2): Extern them.
1891 * symbol.h (msymbol__list): Extern it.
1893 * symbol.c (msymbol__list): New function.
1895 2005-05-19 Kenichi Handa <handa@m17n.org>
1897 * input-gui.c (minput__win_init): Don't change the value of
1900 2005-05-16 Kenichi Handa <handa@m17n.org>
1902 * m17n-core.c (m17n_object): Be sure to initialize all members.
1904 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1906 2005-05-09 Kenichi Handa <handa@m17n.org>
1908 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1910 2005-04-27 Kenichi Handa <handa@m17n.org>
1912 * language.c (mlang__init): Add "an" (Aragonese).
1914 * word-thai.c: Add support for libthai.
1915 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1916 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1918 * mtext.c: Include "word-thai.h" conditionaly.
1919 (mtext__init): Call mtext__word_thai_init conditionaly.
1920 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1922 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1923 not WORDCUT_LD_FLAGS.
1925 2005-04-19 Kenichi Handa <handa@m17n.org>
1927 * word-thai.c (wordseg_propertize): Always unref the attached
1929 (thai_wordseg): Don't unref the property.
1931 2005-04-18 Kenichi Handa <handa@m17n.org>
1933 * word-thai.c: Include stdlib.h.
1934 (wordseg_propertize): Add dummy function for the case that wordcut
1935 library doesn't exist.
1936 (wordseg_propertize): Fix for old wordcut library.
1938 2005-04-16 Kenichi Handa <handa@m17n.org>
1940 * word-thai.c: Include <stdio.h>.
1942 2005-04-15 Kenichi Handa <handa@m17n.org>
1944 * draw.c: Include mtext.h.
1945 (linebreak_table, M_break_at_space, M_break_at_word)
1946 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1947 (compose_glyph_string): Check POS before getting Mface text
1949 (truncate_gstring): Give correct TO arg to line_break function.
1950 (GET_LB_TYPE): New macro.
1951 (find_break_backward, find_break_forward): New functions.
1952 (mdraw__init): Initialize the above new variables.
1953 (mdraw__fini): Free linebreak_table.
1954 (mdraw_default_line_break): Use find_break_backward and
1957 * word-thai.c: New file.
1959 * word-thai.h: New file.
1961 * mtext.c: Include word-thai.h.
1962 (wordseg_func_table): New variable.
1963 (mtext__init): Initialize wordseg_func_table and call
1964 mtext__word_thai_init.
1965 (mtext__fini): Call mtext__word_thai_fini, free
1967 (MTextWordsegFunc): New type.
1968 (mtext__word_segment): New function.
1970 * mtext.h (wordseg_func_table): Extern it.
1971 (mtext__word_segment): Extern it.
1973 * m17n.c (m17n_init): Fix typo (== -> =).
1975 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1976 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1978 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1979 (MTEXTPROP_VAL): New macros.
1981 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1983 2005-04-07 Kenichi Handa <handa@m17n.org>
1985 * database.c (load_chartable): Fix pursing of symbol name.
1987 2005-03-24 Kenichi Handa <handa@m17n.org>
1989 * m17n.c (m17n_init): Fix typo (== -> =).
1991 2005-03-11 Kenichi Handa <handa@m17n.org>
1993 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1995 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1997 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2000 2005-03-09 handa <handa@m17n.org>
2002 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2003 calling m17n_init ().
2005 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2006 calling m17n_init_core ().
2008 2005-02-28 Kenichi Handa <handa@m17n.org>
2010 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2013 2005-02-17 Kenichi Handa <handa@m17n.org>
2015 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2016 (M_description, M_command, M_variable): New variables.
2017 (load_im_info_keys): New variables.
2018 (load_im_info, check_command_keyseq, get_description_advance)
2019 (parse_command_list, get_command_list, parse_variable_list)
2020 (get_variable_list, input_method_hook): New functions.
2021 (command_list, variable_list): New variables.
2022 (minput__init): Put input_method_hook to Minput_method.
2023 Initialize M_description, M_command, M_variable, Mdetail_text,
2024 load_im_info_keys, command_list, variable_list.
2025 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2026 (Mdetail_text): New variable.
2027 (minput_get_description, minput_get_commands)
2028 (minput_assign_command_keys, minput_get_variables)
2029 (minput_set_variable): New functions.
2031 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2032 (minput_assign_command_keys, minput_get_variables)
2033 (minput_set_variable): Extern them.
2035 * plist.c (UNGETC): Just decrement st->p.
2036 (read_mtext_element): New arg skip.
2037 (read_integer_element): Likewise.
2038 (read_symbol_element): Likewise.
2039 (read_element): New arg KEYS.
2040 (mplist__from_plist): Don't increment ref-count of NULL object.
2041 (mplist__from_file): New arg KEYS.
2042 (mplist_put): Don't increment ref-count of NULL object.
2043 (mplist_add): Likewise.
2044 (mplist_push): Likewise.
2045 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2047 * plist.h (mplist__from_file): Prototype adjusted.
2049 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2050 (get_database_stream): New function.
2051 (load_database): Use get_database_stream.
2052 (M_database_hook): New variable
2053 (mdatabase__init): Initialize M_database_hook.
2054 (mdatabase__load_for_keys): New function.
2055 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2057 (mdatabase_define): Free mdb->extra_info if necessary.
2059 * database.h (mdatabase__dir_list, M_database_hook)
2060 (mdatabase__load_for_keys): Extern them.
2061 (MDatabaseHookFunc): New type.
2063 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2065 2004-12-27 Kenichi Handa <handa@m17n.org>
2067 * Version 1.2.0 released.
2069 2004-12-27 Kenichi Handa <handa@m17n.org>
2071 * input.c (minput_filter): Don't reset ic->xxx_changed.
2073 * mtext.c (mtext_from_data): Fix documentation.
2075 2004-12-25 Kenichi Handa <handa@m17n.org>
2077 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2078 (M17NLIB_VERSION_NAME): Update to "1.2.".
2080 2004-12-24 Kenichi Handa <handa@m17n.org>
2082 * input.c (reset_ic): Set key_unhandled to 0.
2084 2004-12-21 Kenichi Handa <handa@m17n.org>
2086 * m17n-gui.h (mfont_from_spec): Delete extern.
2088 * input-gui.c (win_callback): Handle Minput_reset.
2089 (minput__win_init): Register reset_ic as a callback for
2092 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2093 changed. At first, shift to the initial state.
2094 (minput__init): Initialize Minput_reset. Register reset_ic as a
2095 callback for Minput_reset.
2096 (Minput_reset): New variable.
2097 (minput_filter): Always set ic->xxx_changed to 0.
2098 (minput_reset_ic): New function.
2099 (integer_value): Fix typo ('>' -> '<') and calculation of length
2102 * m17n-core.c (merror_code): Change type to `int'.
2104 * m17n-misc.h (merror_code): Adjust type.
2106 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2108 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2109 (mtext_change_prop): Delete extern.
2111 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2112 to `int'. Move the documents to m17n-core.h.
2114 2004-12-13 Kenichi Handa <handa@m17n.org>
2116 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2117 (MTextProperty): Document it.
2119 2004-12-09 Kenichi Handa <handa@m17n.org>
2121 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2123 2004-12-03 Kenichi Handa <handa@m17n.org>
2125 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2126 m17n__gui_initialized): New externs.
2128 * m17n-core.h (enum M17NStatus): New enum.
2129 (m17n_status): Extern it.
2131 * m17n-core.c (core_initialized): Delete this variable.
2132 (m17n__core_initialized, m17n__shell_initialized,
2133 m17n__gui_initialized): New variables.
2134 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2135 instead of core_initialized.
2136 (m17n_status): New function.
2138 * m17n.c (shell_initialized): Delete this variable.
2139 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2142 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2144 * m17n-gui.c (win_initialized): Delete this variable.
2145 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2146 instead of gui_initialized.
2148 2004-11-19 Kenichi Handa <handa@m17n.org>
2150 * input.c (reset_ic): Check if ic_info->state is NULL.
2151 (filter): If ic_info->state is NULL, return 0.
2152 (load_input_method): Don't unref `maps' it it's not created.
2154 2004-11-15 Kenichi Handa <handa@m17n.org>
2156 * input.c (find_candidates_group): If INDEX is -1, find the last
2158 (take_action_list): If the previous of the first candidate is
2159 requested, select the last candidate.
2161 2004-11-08 Kenichi Handa <handa@m17n.org>
2163 * m17n-X.c (device_open): Try at most 32 fonts to find a
2164 non-autoscaled font.
2166 * font.c (xlfd_parse_name): Fix previous change.
2168 2004-11-05 Kenichi Handa <handa@m17n.org>
2170 * font.c: (commont_style): Include dummy elements "slanted" and
2171 "rslanted" to prefer "o" to "r" if "i" is requested.
2173 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2175 2004-10-29 Kenichi Handa <handa@m17n.org>
2177 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2179 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2180 New members smallest and larger.
2181 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2182 (xfont_registry_list): Likewise.
2183 (xfont_select): Likewise.
2186 2004-10-28 Kenichi Handa <handa@m17n.org>
2188 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2189 font name comparison.
2190 (xfont_select): Fix logic for selecting a larger size font.
2192 2004-10-25 Kenichi Handa <handa@m17n.org>
2194 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2197 2004-10-22 Kenichi Handa <handa@m17n.org>
2199 * input.c (update_candidate): Renamed from udpate_candidate.
2200 (take_action_list): Show more debugging info on arithmetic commands.
2202 * m17n-X.c (device_open): Fix previous change.
2204 * draw.c (compose_glyph_string): Don't get face property at the
2207 2004-10-21 Kenichi Handa <handa@m17n.org>
2209 * draw.c (compose_glyph_string): Fix for the case of category
2212 2004-10-19 Kenichi Handa <handa@m17n.org>
2214 * input.c (mdebug_mask): New variable.
2215 (shift_state): Print debug information.
2216 (take_action_list): Likewise.
2217 (handle_key): Likewise.
2219 2004-10-14 Kenichi Handa <handa@m17n.org>
2221 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2223 2004-10-13 Kenichi Handa <handa@m17n.org>
2225 * m17n-X.c (device_open): Be sure to register at least one font
2228 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2229 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2231 2004-10-12 Kenichi Handa <handa@m17n.org>
2233 * draw.c (alloc_gstring): Fix previous change.
2235 * font-ft.c (ft_list_generic): Fix for the case of not
2238 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2240 * font.c (mfont_list): If no font is found, return NULL.
2241 (load_font_encoding_table): Put entries of nil registry first.
2242 (find_encoding): Adjust for the above change.
2244 2004-10-11 Kenichi Handa <handa@m17n.org>
2246 * m17n-gui.h (mfont_list): Adjust prototype.
2248 * m17n-X.c (xfont_list): New arg maxnum.
2250 * font.h (struct MFontDriver): Change prototype of <list>.
2252 * font-ft.c (fc_generic_family_list): Delete it.
2253 (Mserif, Msans_serif, Mmonospace): Delete them.
2254 (M_generic_family_info): New variable.
2255 (enum GenericFamilyType): New enum.
2256 (struct GenericFamilyInfo): New struct.
2257 (generic_family_table): New variable.
2258 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2260 (add_font_info): Get style here.
2261 (ft_list_family): Don't initialize fc_config here. Don't list
2263 (ft_list_generic): New function.
2264 (ft_select): Pay attention to generic familes here.
2265 (ft_open): Fix calculation of ascent and descent.
2266 (ft_list): Pay attention to generic families.
2267 (mfont__ft_init): Initialize M_generic_family_info,
2268 generic_family_table, and fc_config..
2269 (mfont__ft_fini): Finalize generic_family_table.
2271 * draw.c (compose_glyph_string): Use more constant font for
2272 glyphs. Adjust for the member change in MGlyph.
2273 (layout_glyph_string): Adjust for the member change in MGlyph.
2274 (alloc_gstring): Intilize scracth_glyph to avoid
2275 compose_glyph_string on it.
2276 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2277 (mdraw_coordinates_position): Fix previous change.
2279 * internal-gui.h (glyph_category): New enum.
2280 (MGlyph): Change type of <category> to enum glyph_category.
2282 * face.c (mface__realize): Delete args langauge and charset.
2283 (mface__for_chars): Fix for the case that glyphs have different
2285 (mface__update_frame_face): Adjust for mface__realize change.
2287 * face.h (mface__realize): Adjust prototype.
2289 2004-10-05 Kenichi Handa <handa@m17n.org>
2291 * language.c (mlang__init): Add Akan.
2293 2004-10-04 Kenichi Handa <handa@m17n.org>
2295 * font-ft.c (add_font_info): Add instead of push the element.
2296 (ft_list_family): For generic fonts, try all
2297 substituted. families.
2299 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2300 (run_rule): Don't update cluster range here.
2301 (run_command): Update cluster range on appending a glyph.
2302 (run_otf): Update cluster range for glyphs generated by OTF.
2304 2004-10-02 Kenichi Handa <handa@m17n.org>
2306 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2308 2004-09-30 Kenichi Handa <handa@m17n.org>
2310 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2312 2004-09-30 Kenichi Handa <handa@m17n.org>
2314 * font.h: Include <fontconfig/fontconfig.h>.
2315 (MFTInfo): New member langset.
2316 (mfont__encoding_list): Extern it.
2318 * font.c (mfont__encoding_list): New function.
2319 (mdebug_dump_font_list): New function.
2321 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2322 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2324 (ft_family_list): New variable.
2325 (set_font_info): New arg basep. Callers changed.
2326 (fc_list): Check the return value of FcPatternGetString.
2327 (add_font_info): New arg plist. Callers changed. Update
2329 (ft_list_family): New function (merged fc_list and ft_list_all).
2330 (ft_select): Use ft_list_family.
2331 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2333 (mfont__ft_init): Initialize above new variables.
2334 (mfont__ft_fini): Free ft_family_list.
2335 (STRDUP_LOWER): New macro.
2336 (set_font_info): Use STRDUP_LOWER.
2337 (ft_list_family): Avoid duplicate addition of font path. Use
2339 (fc_decode_prop): Fix typo.
2341 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2342 (xfont_registry_list): Change argument disp_info to frame.
2344 (xfont_list_all): New function.
2345 (xfont_list): If FONT is not NULL, check all fonts.
2347 2004-09-28 Kenichi Handa <handa@m17n.org>
2349 * m17n-X.c (MXFont, MXFontList): New types.
2350 (MDisplayInfo): Delete members font_registry_list,
2351 iso8859_1_family_list, iso10646_1_family_list, new members
2352 font_list, base_font_list.
2353 (free_display_info): Adusted for the change of MDisplayInfo.
2354 (xfont_driver): Initialize with xfont_list.
2355 (font_compare): New function.
2356 (build_font_list): Deleted.
2357 (xfont_registry_list): New function.
2358 (xfont_select): Use xfont_registry_list.
2359 (xfont_list): New function.
2360 (device_open): Adusted for the change of MDisplayInfo.
2362 * font-ft.c (add_font_info): New arg languages. Callers changed.
2363 (fc_list): Get languages from fonts..
2364 (ft_list_all): Renamed from ft_list. Callers changed.
2365 (ft_list): New function.
2366 (mfont__ft_driver): Initalize with ft_list.
2368 * font.c (mfont_list): New function.
2370 * font.h (struct MFontDriver): New member `list'.
2371 (MFTInfo): New member languages.
2373 * m17n-gui.h (mfont_list): Extern it.
2375 2004-09-27 Kenichi Handa <handa@m17n.org>
2377 * internal-gui.h (struct MGlyphString): Delete members mt,
2378 sub_width, sub_lbrearing, sub_rbearing, and region.
2380 * draw.c (MSubTextExtents): New type.
2381 (layout_glyphs): New arg extents. Set its members.
2382 (layout_glyph_string): Adjusted for the above change.
2383 (alloc_gstring): Don't set gstring->mt.
2384 (truncate_gstring): Call line_break function with mt instead of
2387 2004-09-22 Kenichi Handa <handa@m17n.org>
2389 * mtext.c (count_utf_16_chars): Count each code of invalid
2392 2004-09-19 Kenichi Handa <handa@m17n.org>
2394 * mtext.c (default_utf_16, default_utf_32): Rename them to
2395 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2398 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2401 2004-09-13 Kenichi Handa <handa@m17n.org>
2403 * draw.c (Mlatin): Don't declare it here.
2404 (visual_order): Fix reordering of combining characters.
2405 (compose_glyph_string): Fix detection of script.
2406 (layout_glyphs): Don't fix reordering of combining characters
2408 (layout_glyph_string): Pay attention to
2409 control->disable_overlapping_adjustment.
2410 (truncate_gstring): Include at least on character in a line.
2411 (get_gstring): Always scan one full line.
2412 (mdraw__init): Don't initialize Mlatin here.
2413 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2414 have a font, use ascent/descent of an ASCII font. Allow
2415 ink_array_return and logical_array_return to be NULL.
2416 (mdraw_coordinates_position): Fix iteration.
2418 * font-ft.c (MFTtoProp): Member completely changed.
2419 (ft_to_prop): Adjusted for the above change.
2420 (ft_to_prop_size): Likewise.
2421 (set_font_info): Adjusted for the change of MFTtoProp.
2422 (fc_generic_family_list): New variable.
2423 (fc_list): Add special handling of generic font names.
2424 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2425 Initialize fc_generic_family_list.
2426 (mfont__ft_fini): Don't free ft_to_prop. Free
2427 fc_generic_family_list.
2428 (FC_vs_M17N_font_prop): New type.
2429 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2430 (fc_decode_prop, fc_encode_prop): New functions.
2431 (mfont__ft_parse_name): Use fc_decode_prop.
2432 (mfont__ft_unparse_name): Use fc_encode_prop.
2434 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2435 (MWDevice): Add member realized_font_list.
2436 (free_display_info): Don't free disp_info->realized_font_list.
2437 (free_device): Free device->realized_fontset_list.
2438 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2439 (device_open): Don't initialize disp_info->realized_font_list.
2440 (device_open): Initialize device->realized_font_list and set it to
2441 frame->realized_font_list.
2443 * fontset.c (try_font_group): New function.
2444 (mfont__lookup_fontset): Use try_font_group.
2446 * font.c (common_weight): Change the order of "regular".
2448 * face.c (Mlatin): Don't make it static.
2449 (mface__realize): Be sure to set work_gstring.frame.
2450 (mface__for_chars): Likewise.
2452 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2455 * internal-gui.h (Mlatin): Extern it.
2457 * m17n-gui.h (MDrawControl): New member
2458 disable_overlapping_adjustment.
2460 2004-09-06 Kenichi Handa <handa@m17n.org>
2462 * font-flt.c (run_otf): Fix typo ('}'->']').
2464 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2465 (COMBINING_PRECOMPUTED_P): New macros.
2467 * draw.c (layout_glyphs): Handle precomputed combining code.
2469 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2470 precomupted combining code.
2472 2004-09-03 Kenichi Handa <handa@m17n.org>
2474 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2477 2004-08-27 Kenichi Handa <handa@m17n.org>
2479 * face.c (mface_put_prop): If the new value is the same as the
2480 current one, don't increment frame->tick.
2482 2004-08-25 Kenichi Handa <handa@m17n.org>
2484 * fontset.c (mfontset): Initialize font_spec_list member.
2485 (mfontset_copy): Load fontset if necessary.
2487 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2488 'metrics' to for C++.
2490 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2493 2004-08-16 Kenichi Handa <handa@m17n.org>
2495 * Version 1.1.0 released.
2497 2004-08-13 Kenichi Handa <handa@m17n.org>
2499 * language.c (mlang__init): Add Dhivehi.
2501 * m17n-gui.c (Mx, Mfreetype): Delete it.
2502 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2504 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2505 (mfont_resize_ratio): Extern it.
2506 (MDrawGlyphInfo): New member logical_width;
2507 (MDrawGlyph): New type.
2508 (mdraw_glyph_list): Prototype adjusted.
2510 * m17n-X.c (xfont_open): Set type and fontp members.
2511 (xft_open): Likewise.
2513 * internal-gui.h (Mx, Mfreetype): Delete extern.
2515 * font.h (struct MRealizedFont): New member type and fontp.
2517 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2518 (Mx, Mfreetype): Declare here.
2519 (Mxft): New variable.
2520 (mfont_resize_ratio): New function.
2522 * font-ft.c (ft_open): Set type and fontp members.
2524 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2527 2004-08-11 Kenichi Handa <handa@m17n.org>
2529 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2532 2004-08-06 Kenichi Handa <handa@m17n.org>
2534 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2537 * font-flt.c (run_otf): Print debugging information if necessary.
2539 2004-08-05 Kenichi Handa <handa@m17n.org>
2541 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2542 positioning_type 5 and 6. Switch simplified.
2544 2004-08-04 Kenichi Handa <handa@m17n.org>
2546 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2548 2004-08-02 Kenichi Handa <handa@m17n.org>
2550 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2551 set val to 1 even if it is greater than 1.
2553 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2555 2004-07-29 Kenichi Handa <handa@m17n.org>
2557 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2558 debugging information.
2560 * internal.h (MDEBUG_PRINT5): New macro.
2562 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2563 the previous one if the zero width glyph has left or right
2566 2004-07-26 Kenichi Handa <handa@m17n.org>
2568 * m17n-X.c (xft_render): Pay attention to members left_padding and
2569 right_padding of MGlyph.
2571 * draw.c (visual_order): Allocate one more elements for arrays as
2572 a workaround of fribidi bug.
2573 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2574 instead of MGlyph->bidi_sensitive.
2575 (layout_glyph_string): Pay attentinon to
2576 control->orientation_reversed when padding at the head or tail.
2577 Fix adjustment of space glyph width.
2578 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2581 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2582 instead of MGlyph->bidi_sensitive.
2584 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2586 2004-07-26 Kenichi Handa <handa@m17n.org>
2588 * draw.c (visual_order): Don't treat combined glyphs specially.
2589 (layout_glyphs): Don't get metrics glyphs that are already ready.
2590 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2591 width with the previous one.
2592 (draw_background): Fix bar cursor position on a r2l glyph.
2594 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2595 (run_rule): Fix place of updating cluster_begin_pos and
2596 cluster_end_pos here.
2597 (run_otf): Don't set left_padding.
2599 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2601 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2602 Fix handling of GPOS.
2603 (mfont__ft_drive_gpos): Delete this function.
2605 * font.h (mfont__ft_drive_otf): Renamed back from
2606 mfont__ft_drive_gsub.
2607 (mfont__ft_drive_gpos): Delete extern.
2609 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2610 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2612 2004-07-23 Kenichi Handa <handa@m17n.org>
2614 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2615 the same bidi level.
2617 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2619 2004-07-22 Kenichi Handa <handa@m17n.org>
2621 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2623 2004-07-20 Kenichi Handa <handa@m17n.org>
2625 * draw.c (render_glyphs): Fix checking of g->code validity.
2627 * face.c (mface__realize): Set g.type.
2629 2004-07-18 Kenichi Handa <handa@m17n.org>
2631 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2634 * m17n-gui.c (mframe): Print error message give by dlopen to
2637 2004-07-16 Kenichi Handa <handa@m17n.org>
2639 * draw.c (compose_glyph_string): Improve the way of deciding a
2640 script. For a character that doesn't have script property, use
2641 the last non-latin script.
2643 * font-ft.c (fc_list): Cancel previous change.
2644 (mfont__ft_init): Add more entries in ft_to_prop_name.
2646 2004-07-15 Kenichi Handa <handa@m17n.org>
2648 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2649 previous or next character glyphs.
2651 2004-07-14 Kenichi Handa <handa@m17n.org>
2653 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2654 of type GLYPH_SPACE.
2656 * fontset.c (mfont__lookup_fontset): If glyph type is
2657 GLYPH_SPACE, get codes for SPACE.
2659 * internal-gui.h (Mfont): Delete extern.
2661 * m17n-gui.h (Mfont): Delete duplicated extern.
2663 2004-07-13 Kenichi Handa <handa@m17n.org>
2665 * font-ft.c (DEVICE_DELTA): New macro.
2666 (adjust_anchor): New function.
2667 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2669 (mfont__ft_drive_gpos): New function.
2671 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2672 (FontLayoutContext): Delete member `rfont'.
2673 (run_otf): Set g->otf_cmd. Call
2674 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2675 only whne HAVE_OTF is defined.
2677 * fontset.c: Include "config.h".
2679 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2680 (MGlyph): New member otf_cmd.
2682 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2683 (mfont__ft_drive_gpos): Extern it.
2685 * face.c: Include "config.h".
2687 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2689 * input-gui.c: Include "config.h".
2691 * plist.c: Include "config.h".
2693 2004-07-06 Kenichi Handa <handa@m17n.org>
2695 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2696 internal-gui.h: Cancel previous changes.
2698 * m17n-gd.h: Delete it.
2700 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2701 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2702 @XML2_LD_FLAGS@ to above.
2703 (libm17n_la_LIBADD): Add -ldl.
2704 (libm17n_la_LDFLAGS): Add -export-dynamic.
2705 (X_LD_FLAGS): Fix the order of linking.
2706 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2707 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2708 (libm17n_X_la_LDFLAGS): Add -module.
2709 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2710 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2711 (libm17n_gd_la_LDFLAGS): Add -module.
2712 (include_HEADERS): Delete m17n-gd.h.
2714 2004-06-30 Kenichi Handa <handa@m17n.org>
2716 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2717 (MDeviceLibraryInterface): Delete it.
2718 (register_device_library): Delete it.
2719 (m17n__device_library_list): Renamed from device_library_list.
2721 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2722 (m17n_init_win): Adjust prototype.
2724 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2725 (m17n_init_gd): New function.
2727 * m17n-gd.h: New file.
2729 * m17n-X.h: Include <m17n-gui.h>.
2730 (m17n_init_X): Extern it.
2731 (M17N_INIT): Redefine it.
2733 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2734 (m17n_init_X): New function.
2736 * internal-gui.h (m17n__device_library_list): Extern it.
2737 (struct MDeviceDriver): New members initialized, init, and fini.
2739 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2741 (libm17n_X_la_LIBADD): Delete aboves.
2742 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2743 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2744 (libm17n_gd_la_LDFLAGS): Delete it.
2745 (include_HEADERS): Add m17n-gd.h.
2747 2004-06-25 Kenichi Handa <handa@m17n.org>
2749 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2750 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2752 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2754 * font-ft.c (fc_list): If FcFontList finds no font, try
2757 * draw.c (compose_glyph_string): Terminate the last loop after
2758 doing default combining if necessary.
2760 2004-06-24 Kenichi Handa <handa@m17n.org>
2762 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2764 * character.c (mchar_define_property): Add const to an arg.
2766 * charset.c (mchar_define_charset): Add const to an arg.
2768 * coding.c (MCodingSystem): Add const to an arg or decoder.
2769 (finish_decoding): Add const to an arg.
2770 (decode_coding_charset, decode_coding_utf_8)
2771 (decode_coding_utf_16, decode_coding_utf_32)
2772 (decode_coding_iso_2022, decode_coding_sjis)
2773 (mconv_define_coding): Likewise.
2775 * m17n-X.c (xft_find_metric): Delete unused variable.
2777 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2780 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2783 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2784 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2786 * mtext.h (mtext__from_data): Ajust prototype.
2788 2004-06-23 Kenichi Handa <handa@m17n.org>
2790 * draw.c (compose_glyph_string): Always get glyph codes by
2792 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2793 (mdraw_glyph_list): New function.
2795 * font-flt.c (mfont__flt_run): Be sure to call
2796 rfont->driver->encode_char.
2798 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2799 (ft_encode_char): Delete arg C.
2800 (ft_render): Don't call FT_Get_Char_Index.
2802 * font.c (mfont__encodable_p): Delete it.
2803 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2805 * font.h (struct MFontDriver): Delete arg C of encode_char.
2806 (mfont__encodable_p): Delete extern.
2808 * m17n-X.c (xfont_encode_char): Delete arg C.
2809 (xft_find_metric): Don't cal FT_Get_Char_Index.
2810 (xft_render): Likewise.
2812 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2814 (mdraw_glyph_list): Extern it.
2816 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2818 2004-06-22 Kenichi Handa <handa@m17n.org>
2820 * m17n-gui.h (mfontset_lookup): Extern it.
2822 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2824 * fontset.c (realize_fontset_elements)
2825 (free_realized_fontset_elements, update_fontset_elements): New
2827 (mfont__realize_fontset): Call realize_fontset_elements.
2828 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2829 (mfont__lookup_fontset): If a fontset was modified, update
2830 the realized fontset.
2831 (mfontset_modify_entry): Increment fontset->tick.
2832 (mfontset_lookup): New function.
2834 2004-06-21 Kenichi Handa <handa@m17n.org>
2836 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2838 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2839 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2840 length of source text 0.
2842 2004-06-21 Kenichi Handa <handa@m17n.org>
2844 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2845 (compare): Pay attention to format other than utf-8.
2846 (copy): Delete this function.
2847 (count_by_utf_8, count_by_utf_16, insert): New functions.
2848 (count_utf_16_chars): Fix handling of a surrogate pair.
2849 (find_char_forward, find_char_backward): Likewise.
2850 (mtext__from_data): Delete unnecessary check. Fix number of
2852 (mtext_from_data): Don't count items.
2853 (mtext_ref_char): Optimize the code.
2854 (mtext_set_char): Pay attention to format other than utf-8.
2855 (mtext_cat_char): Likewise.
2856 (mtext_dup): Don't call copy, instead do allocation here.
2857 (mtext_cat): Call insert instead of copy.
2858 (mtext_ncat): Likewise.
2859 (mtext_cpy): Delete character at first and call insert instead of
2861 (mtext_ncpy): Likewise.
2862 (mtext_copy): Likewise.
2863 (mtext_duplicate): Call insert instead of copy.
2864 (mtext_del): Pay attention to format other than utf-8.
2865 (mtext_ins): Simply call insert.
2866 (mtext_ins_char): Pay attention to format other than utf-8.
2867 (mtext_tok): Call insert instead of copy.
2868 (mtext_text): Call UNIT_BYTES.
2870 * textprop.c (mtext__adjust_plist_for_change): New function.
2872 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2873 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2874 (CHAR_UNITS_AT): Fix typo.
2875 (CHAR_UNITS_BY_HEAD): Fix typo.
2876 (STRING_CHAR_AND_UNITS): Fix typo.
2878 * internal.h (MTEXT_READ_ONLY_P): New macro.
2880 * mtext.h (mtext__replace): Delete the extern.
2881 (mtext__adjust_foramt): Adjust prototype.
2883 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2884 if possible. Otherwise make a copy of mmt.
2886 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2889 2004-06-18 Kenichi Handa <handa@m17n.org>
2891 * character.h (CHAR_STRING_UTF16): Fix syntax.
2893 2004-06-16 Kenichi Handa <handa@m17n.org>
2895 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2896 (libm17n_X_la_LIBADD): Delete it.
2897 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2899 * m17n-X.c (device_open): Add parens in `if' condition.
2901 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2902 (DEC_POSITION): Likewise.
2903 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2905 2004-06-15 Kenichi Handa <handa@m17n.org>
2907 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2910 * draw.c (compose_glyph_string): If langauge is specified, call
2911 mface__for_chars even if a text is all latin. Fix condition for
2912 setting non_ascii_found.
2914 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2916 * m17n.h (minput_char_to_key): Delete extern.
2918 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2920 * m17n-gui.c (null_device_open): Set several members of frame.
2922 2004-06-14 Kenichi Handa <handa@m17n.org>
2924 * m17n-gui.h (minput_event_to_key): Delete extern.
2926 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2928 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2930 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2932 2004-06-08 Kenichi Handa <handa@m17n.org>
2934 * character.c (mchar_put_prop): Don't increment the ref-count of
2937 2004-06-04 Kenichi Handa <handa@m17n.org>
2939 * m17n-core.c (mdebug__register_object): New function.
2940 (mdebug__unregister_object): Likewise.
2942 * internal.h (mdebug__register_object, mdebug__unregister_object):
2944 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2947 * charset.c (mcharset__load_from_database): Don't call
2948 mconv__register_charset_coding here.
2950 * coding.c (find_coding): Get a real name from an element of
2951 coding_definition_list.
2952 (mconv__register_charset_coding): Set the real name at the top of
2954 (mcoding__load_from_database): Likewise.
2955 (mconv_list_codings): Adjusted for the above change.
2957 2004-06-03 Kenichi Handa <handa@m17n.org>
2959 * coding.c (find_coding): Find by canonicalized name. Don't have
2960 to modify the element of coding_definition_list by
2962 (mconv__define_coding_from_charset): Delete it.
2963 (mconv__register_charset_coding): Canonicalize sym.
2964 (mcoding__load_from_database): Register plist modified by
2967 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2969 * font-ft.c (ft_open): Fix setting of rfont->descent.
2971 2004-06-02 Kenichi Handa <handa@m17n.org>
2973 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2974 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2975 (xlfd_unparse_name): Renamed from xfont_build_name.
2976 (mfont__init): Initialized Mfontconfig.
2977 (mfont__free_realized): Unconditionally unref rfont->info.
2978 (mfont__select): Free `this' if it's not best.
2979 (mfont__open): Don't check frame->realized_font_list.
2980 (mfont__parse_name_into_font): New function.
2981 (Mfontconfig): New variable.
2982 (mfont_from_name): Call mfont_parse_name.
2983 (mfont_name): Call mfont_unparse_name.
2984 (mdebug_dump_font): Likewise.
2986 * font.h (struct MFontDriver): Delete members parse_name and
2988 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2989 (mfont__parse_name_into_font): Extern it.
2991 * font-ft.c: Include "symbol.h".
2992 (close_ft): Unconditionally free filename and charmap_list of
2994 (ft_open): Duplicate base->filename. Increment ref-count of
2995 ft_info->charmap_list. Free ft_info->charmap_list and
2996 ft_info->filename on error.
2997 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2999 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3001 (enum xlfd_field_idx): Moved to font.c.
3002 (split_font_name, build_font_name): Likewise.
3003 (build_font_list): Call mfont__parse_name_info_font.
3004 (xfont_open): Call mfont__unparse_name. Free name.
3005 (xfont_parse_name, xfont_build_name): Moved to font.c
3006 (xft_select): Prototype deleted.
3007 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3008 Call mfont_pase_name.
3010 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3011 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3014 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3017 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3019 2004-06-01 Kenichi Handa <handa@m17n.org>
3021 * fontset.c (mfontset_modify_entry): Pay attention to the case
3022 that fontset->font_spec_list is NULL.
3024 2004-05-31 Kenichi Handa <handa@m17n.org>
3026 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3028 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3030 * font.c (mfont__select): Print score the a font for debugging.
3032 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3034 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3035 kanji_sym and kana_sym.
3037 2004-05-28 Kenichi Handa <handa@m17n.org>
3039 * Makefile.am (VINFO): New variable.
3040 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3041 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3043 2004-05-27 Kenichi Handa <handa@m17n.org>
3045 The following chanages are to make device dependent functions
3046 accessible only from MDeviceDriver structure, and to add GD and
3047 null device drivers. Font drivers get also device dependent.
3049 * m17n.c (m17n_init): Increament shell_initialized.
3050 (m17n_fini): Decremented shell_initialized.
3052 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3054 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3055 (Mwidget, Mcolormap, Mx): Extern them.
3057 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3058 (free_frame): Call frame->driver->close instead of
3060 (DLOPEN_SHLIB_EXT): New macro.
3061 (MDeviceLibraryInterface): New type.
3062 (device_library_list): New variable.
3063 (register_device_library): New function.
3064 (null_device): New variable.
3065 (null_device_close, null_device_get_prop)
3066 (null_device_realize_face, null_device_free_realized_face): New
3068 (null_driver): New variable.
3069 (null_device_init, null_device_fini, null_device_open): New
3071 (null_interface): New variable.
3072 (Mfreetype, Mdevice): Declare them.
3073 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3074 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3075 Mwin__Close_Device. Register drivers for Mx and Mgd.
3076 (m17n_fini_win): Decremented win_initialized. Call "fini"
3077 function of all opened devices. Don't call mwin__fini.
3078 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3080 (mframe): Handle Mdevice key of PLIST.
3081 (mframe_get_prop): Call frame->device->get_prop instead of
3082 mwin__device_get_prop.
3084 * m17n-gd.c: New file.
3086 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3087 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3089 * m17n-core.c (m17n_init_core): Increate core_initialized.
3090 (m17n_fini_core): Decremented core_initialized.
3092 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3093 (Mcolormap): Don't extern them here.
3095 * m17n-X.c (FRAME_DEVICE): New macro.
3096 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3097 (free_display_info): Use MPLIST_DO.
3098 (free_device): Free rface->info.
3099 (xft_close): Delete it.
3100 (device_init): Renamed from mwin__init.
3101 (device_fini): Renamed from mwin__fini.
3102 (device_open): Renamed from mwin__open_device.
3103 (x_driver): New variable.
3104 (MXFontInfo): Delete member frame, add member display.
3105 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3106 Don't declare them here.
3108 * internal-gui.h (MDeviceType): New enum.
3109 (MWDefice): Delete it.
3110 (struct MFrame): Change type of device to void *. New members
3111 device_type, driver, font_driver_list.
3112 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3113 (MDeviceDriver): New type.
3114 (Mx, Mgd, Mfreetype): Extern them.
3115 (mwin__XXX): Delete all of them.
3117 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3119 (win_destroy_ic): Likewise.
3120 (adjust_window_and_draw): Likewise.
3121 (win_callback): Likewise.
3122 (Mxim): Declare it here.
3123 (minput_event_to_key): Call M_CHECK_READABLE.
3125 * fontset.c (mfont__lookup_fontset): Delete local variable
3128 * font.h (struct MFontDriver): Delete member close, add members
3129 parse_name and build_name.
3130 (mfont__driver_list): Delete extern.
3131 (mfont__close): Delete extern.
3133 * font.c (mfont__init): Don't set mfont__driver_list.
3134 (mfont__fini): Don't unref mfont__driver_list.
3135 (mfont__select): Try font drivers in frame->font_driver_list. Set
3136 driver member of a realized font.
3137 (mfont__close): Delete it.
3138 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3139 functions of the default frame.
3141 * font-ft.c (close_ft): Check ft_info->ft_face and work
3143 (add_font_info): Allocate ft_info by M17N_OBJECT.
3144 (ft_close): Delete it.
3145 (mfont__ft_driver): Don't set ft_close.
3146 (ft_select): Increment ref-count of best_font.
3147 (ft_open): Decremented ref-count of base. On error, call
3148 FT_Done_Face and free ft_info.
3149 (ft_find_metric): Always use XXX_MONO in load_flags.
3150 (ft_render): Fix setting of width. Call
3151 frame->driver->draw_points instead of mwin__draw_points.
3152 (ft_to_prop): Don't set mfont__driver_list.
3153 (mfont__ft_fini): Just unref ft_info.
3155 * face.c (mface__init): Exchange foreground and background of
3156 mface__default. Call mface_put_prop to set hline of
3158 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3159 (mface__free_realized): Don't call mwin__free_realized_face.
3161 * draw.c (Mdepth): Don't declare it here.
3162 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3163 (render_glyphs, render_glyph_string): Likewise.
3164 (mdraw__init): Don't set Mdepth.
3165 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3167 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3169 (mdraw_text_items): Check FRAME is writable.
3170 (mdraw_per_char_extents): Implement body.
3172 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3174 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3175 (GUI_SOURCES): Delete it.
3176 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3177 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3178 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3179 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3180 (linkgui_LDADD): Set to libm17n-gui.la
3181 (linkgui_LDFLAGS): New target.
3182 (SRC): Include ${libm17n_gui_la_SOURCES} and
3183 ${libm17n_gd_la_SOURCES}.
3185 2004-05-24 Kenichi Handa <handa@m17n.org>
3187 * draw.c (draw_background): Don't draw background even if
3188 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3190 2004-05-22 Kenichi Handa <handa@m17n.org>
3192 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3194 2004-05-20 Kenichi Handa <handa@m17n.org>
3196 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3198 * m17n-gui.c: Include "plist.h".
3199 (mframe): If PLIST is NULL, initialize it to emply plist.
3201 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3202 (xft_driver): New variable.
3203 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3204 (xft_find_metric, xft_render): New function.
3205 (mwin__init): Adjusted for the new mfont__driver_list.
3206 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3207 generated face to PARAM.
3208 (mwin__realize_face): Fix setting of box colors. Don't call hook
3210 (mwin__draw_hline): New function.
3211 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3212 (mwin__xft_render): Delete these function.
3214 * internal-gui.h (struct MFrame): New member tick.
3215 (struct MGlyphString): New member tick.
3216 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3217 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3218 (mwin__xft_render): Delete extern.
3220 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3221 (mfontset): Always increment the reference count of returned
3224 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3225 (MFTInfo): Moved to font.h.
3226 (ft_iso8859_1_font_list): Delete this variable.
3227 (set_font_info): Don't set font->property[MFONT_TYPE].
3228 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3229 (add_font_info): Change type to void.
3230 (fc_list): Change anme from xft_list. Caller changed. Include
3231 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3232 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3233 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3234 (close_ft): Don't call mwin__xft_close. Unref
3235 ft_info->extra_info.
3236 (ft_open): Don't setup ft_info->fontname. Don't call
3238 (ft_find_metric): Don't call mwin__xft_get_metric.
3239 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3240 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3241 (mfont__ft_init): Adjusted for new mfont__driver_list.
3242 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3244 * font.c (mfont__driver_list): Make it MPlist.
3245 (mfont__init): Adjust initialization of mfont__driver_list.
3246 (mfont__fini): Free mfont__driver_list.
3247 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3248 (mfont__select): Adjusted for the new mfont__driver_list.
3250 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3251 (mfont__drirver_list): Adjust prototype.
3252 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3254 * face.h (struct MFace): Delete member realized_face_list, add
3256 (struct MRealizedFace): Delete member need_update
3257 andnofont_rface, add member non_ascii_list.
3258 (mface__update_frame_face): Extern it.
3260 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3262 (get_hline_create, get_box_create): New functions.
3263 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3265 (free_face): Cancep previous change. Free face->frame_list.
3266 (serialize_hline): Do nothing if hline->width is zero.
3267 (serialize_box): Do nothing if box->width is zero.
3268 (mface__init): Setup all properties of mface__default.
3269 (mface__fini): Free hline_prop_list and box_prop_list.
3270 (mface__realize): Cancel previous change. Update
3271 face->frame_list. Setup rface->non_ascii_list.
3272 (mface__for_chars): Update rface->non_ascii_list.
3273 (mface__free_realized): Free rface->non_ascii_list.
3274 (mface__update_frame_face): New function.
3275 (mface): Initialize face->frame_list.
3276 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3278 (mface_merge): Likewise.
3279 (mface_put_prop): If key is Mhline or Mbox, get value by
3280 get_hline_create or get_box_create respectively.
3281 (mface_put_prop): Update frame->tick and call
3282 mface__update_frame_face if necessary.
3283 (mface_update): Do nothing if func is noop_hook.
3285 * draw.c (render_glyphs): If a font is not found, use
3286 mwin__draw_empty_boxes.
3287 (alloc_gstring): Initialize gstring->tick.
3288 (get_gstring): Check gstring->tick.
3290 2004-05-17 Kenichi Handa <handa@m17n.org>
3292 * face.c (find_realized_face): Return value changed. If RFONT is
3293 NULL, avoid unnecessary checking.
3294 (free_face): Free face->realized_face_list.
3295 (mface__realize): Adjusted for the change of find_realized_face.
3296 If it returns a realized face that needs update, free it and
3297 realize a new one. Push a new realized face to
3298 frame->realized_face_list instead of appending.
3299 (mface__for_chars): Adjusted for the change of find_realized_face.
3300 Short cut if the required font is in rface->ascii_rface.
3301 (mface_put_prop): Free old value if necessary. Set need_update
3302 member of realized faces to 1.
3304 * face.h (struct MFace): Delete member tick, add member
3306 (struct MRealizedFace): Delete member tick, add member
3309 2004-05-13 Kenichi Handa <handa@m17n.org>
3311 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3313 2004-05-12 Kenichi Handa <handa@m17n.org>
3315 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3317 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3318 parse it XftNameParse.
3320 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3321 (all_fonts_scaned): New variable.
3322 (set_font_info): FAMILY may be Mnil.
3323 (add_font_info): Argument changed.
3324 (xft_list): Call add_font_info in it.
3325 (ft_list): Likewise.
3326 (ft_select): Make it work in the case family is Mnil.
3327 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3328 (mfont__ft_fini): Set all_fonts_scaned to 0.
3330 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3331 that is failed to open.
3333 2004-05-10 Kenichi Handa <handa@m17n.org>
3335 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3336 device's depth is 1 (i.e. monochrome).
3338 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3339 to work around the problem of libtool.
3341 * font-ft.c: Include <freetype/ftbdf.h>.
3342 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3344 (mfont__ft_init): Initialize them.
3345 (ft_iso8859_1_font_list): New variable.
3346 (set_font_info): Detect a font containing iso8859-1 glyphs and
3347 register it in ft_iso8859_1_font_list. If the font is not
3348 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3349 properties of the font from its properties.
3350 (add_font_list): If the font is not scalable, check if it is BDF
3351 or PCF font. If not, ignore it.
3352 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3353 registry is not iso8859-1.
3354 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3355 ft_iso8859_1_font_list.
3356 (ft_find_metric): If the font is not scalable, assume it as BDF
3357 or PCF, and get a metric from its properties.
3358 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3360 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3362 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3363 (libm17n_la_LDFLAGS): Delete it.
3364 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3365 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3367 2004-05-06 Kenichi Handa <handa@m17n.org>
3369 * draw.c (compose_glyph_string): Fix previous change.
3371 2004-04-30 Kenichi Handa <handa@m17n.org>
3373 * font-ft.c (ft_list): Delete unused variable `result'.
3374 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3376 2004-04-27 Kenichi Handa <handa@m17n.org>
3378 * m17n-X.c: Include config.h
3379 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3380 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3381 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3382 (FRAME_CMAP, FRAME_VISUAL): New macros.
3383 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3384 (xfont_driver): Make it static.
3385 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3386 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3387 info->xft_color_back.
3388 (MXftFontInfo) [HAVE_XFT2]: New type.
3389 (mwin__xft_close) [HAVE_XFT2]: New function.
3390 (mwin__xft_open) [HAVE_XFT2]: New function.
3391 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3392 (mwin__xft_render) [HAVE_XFT2]: New function.
3394 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3395 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3396 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3399 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3401 * font-ft.c: Don't include FT_FREETYPE_H here.
3402 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3403 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3404 (MFTInfo): New member charmap_index.
3405 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3406 (check_otf_filename): Renamed from check_filename. Return value
3408 (ft_set_property): This function deleted.
3409 (set_font_info): New function.
3410 (add_font_list): Argument changed. Add multiple fonts.
3411 (xft_list) [HAVE_XFT2]: New function.
3412 (ft_list) [not HAVE_XFT2]: New function.
3413 (ft_select): Add code for Xft.
3414 (close_ft): Likewise.
3415 (ft_open): Likewise.
3416 (ft_find_metric): Likewise.
3417 (ft_encode_char): Likewise.
3418 (ft_render): Likewise.
3420 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3422 2004-04-26 Kenichi Handa <handa@m17n.org>
3424 * textprop.c (mtext_attach_property): Declare the return type as
3427 2004-04-21 Kenichi Handa <handa@m17n.org>
3429 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3431 2004-04-09 Kenichi Handa <handa@m17n.org>
3433 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3435 (load_command): Setup above members.
3437 2004-04-05 Kenichi Handa <handa@m17n.org>
3439 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3441 2004-03-30 Kenichi Handa <handa@m17n.org>
3443 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3446 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3447 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3449 2004-03-29 Kenichi Handa <handa@m17n.org>
3451 * Version 1.0 Patch Level 2 released.
3453 2004-03-29 Kenichi Handa <handa@m17n.org>
3455 * charset.c (make_charset): Set charset->fully_loaded and
3456 charset->simple correctly. Don't try to get charset->min_char and
3457 charset->max_char for a charset of method subset and superset.
3458 Don't load a mapping file here.
3459 (mcharset__init): Set unified_max.
3460 (mcharset__load_from_database): Free a working plist.
3462 * coding.c (mcoding__fini): Free all malloced data.
3464 * input-gui.c (win_create_ic): Set control.as_image for preediting
3467 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3468 `count') to initialize the array.
3470 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3473 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3475 (mwin__create_window): Fix bug of setting a background pixel of a
3477 (mwin__adjust_window): Clear the window before drawing.
3479 * m17n-core.c (mdebug__report_object): Free array->objectes if
3481 (m17n_init_core): Don't set report_header_printed to 0 here.
3482 Fix debugging information.
3483 (m17n_fini_core): Set report_header_printed to 0 here.
3485 * m17n-core.h (mplist_deserialize): Extern it.
3487 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3489 * m17n.c (m17n_fini): Fix debugging information.
3491 * mtext.c (mtext__adjust_foramt): New function.
3493 * mtext.h (mtext__adjust_foramt): Extern it.
3495 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3497 * plist.h (mplist__deserialize): Don't extern it.
3499 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3500 elements of symbol_table to NULL. Report about created and freed
3501 symbols if MDEBUG_FINI is set.
3503 2004-03-22 Kenichi Handa <handa@m17n.org>
3505 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3507 * m17n.c (m17n_init): Fix the way of checking merror_code.
3509 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3511 2004-03-22 Kenichi Handa <handa@m17n.org>
3513 * fontset.c (realize_font_group): Adjust the font size by
3514 mfont__resize before selecting a font.
3516 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3518 2004-03-19 Kenichi Handa <handa@m17n.org>
3520 * Version 1.0 Patch Level 1 released.
3522 2004-03-19 Kenichi Handa <handa@m17n.org>
3524 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3526 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3528 2004-03-19 Kenichi Handa <handa@m17n.org>
3530 Re-apply the changes forgotten in the released version.
3532 * charset.c (mcharset__load_from_database): Call
3533 mchar_define_charset.
3535 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3536 (mconv_encode_range): Put Mcoding text property.
3538 2004-03-18 Kenichi Handa <handa@m17n.org>
3540 * draw.c (Mdepth): New variable.
3541 (visual_order): Delete unused local var `pos'.
3542 (compose_glyph_string): Fix for the case that gstring->glyphs is
3543 realloced. Stop generating glyphs at TO. Fix handling of
3545 (layout_glyphs): Get metrics of all glyphs in advance. Set
3546 lbearing and rbearing of base of composition glyph correctly.
3547 Handle left-overhang glyphs correctly.
3548 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3550 (dump_combining_code): Change the defualt off_x character to ".".
3551 (mdraw__init): Initialize Mdepth.
3553 * face.c (work_gstring): New variable
3554 (mface__init): Initialize work_gstring.
3555 (mface__fini): Free work_gstring.glyphs.
3556 (mface__realize): Don't handle videomode property here. Adjusted
3557 for the change of mfont__get_metric.
3558 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3560 * face.h (enum face_gc): Moved to m17n-X.c.
3562 * font.h (struct MFontDriver): Arguments of find_metric changed.
3563 (mfont__select): Prototype adjusted.
3564 (mfont__get_metric): Likewise.
3565 (mfont__ft_drive_otf): Likewise.
3566 (mfont__flt_run): Likewise.
3568 * font.c (mfont__select): New argument layouter. If layouter is
3569 different in the registered font, make a new copy of realized
3571 (mfont__get_metric): Argument changed. Get metrics of multiple
3573 (mfont_find): Call mfont__select with layouter as Mnil.
3575 * font-flt.c (FontLayoutContext): New member rfont.
3576 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3577 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3579 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3581 (NUM_POINTS): New macro.
3582 (MPointTable): New type.
3583 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3584 (mfont__ft_drive_otf): New argument rfont.
3586 * fontset.c (realize_font_group): Adjusted for the changed of
3588 (check_fontset_element): This function deleted.
3590 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3591 off the parent window if the preedit text is zero length.
3593 * internal-gui.h (struct MFrame): New members foreground,
3594 background, videomode, font.
3595 (struct MGlyphString): New member anti_alias.
3596 (MDrawPoint): New type.
3597 (mwin__draw_bitmap): Prototype deleted.
3598 (mwin__draw_points): Prototype added.
3600 * m17n-gui.h (MDrawControl): New member anti_alias.
3602 * m17n-gui.c (free_frame): Free frame->font.
3603 (mframe): Set the fontset of frame->face to the default fontset.
3605 * m17n-X.c (RGB_GC): New type.
3606 (enum gc_index): Renamed from enum face_gc. Member names changed.
3608 (struct MWDevice): Members foreground and background deleted. New
3609 member scratch_gc, gc_list.
3610 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3611 (free_device): Free GCs in device->gc_list.
3612 (get_rgb_gc): New function.
3613 (get_gc): Renamed and argument changed from get_color.
3614 (get_gc_for_anti_alias): New function.
3615 (xfont_find_metric): Arguments changed. Get metrics of multiple
3617 (set_region): Argument changed. Caller changed.
3618 (xfont_render): Allways set a font in gc.
3619 (x_error_handler, x_io_error_handler): Define only if
3620 X_SET_ERROR_HANDLER is defined.
3621 (mwin__open_device): Create device->scratch_gc. Set members
3622 foreground, background, and videomode of frame. Call
3623 XSetErrorHandler and XSetIOErrorHandler only if
3624 X_SET_ERROR_HANDLER is defined.
3625 (struct gc_list): Deleted.
3626 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3627 (mwin__realize_face): Adjusted for the change of the format of
3628 rface->info and the charge of set_region.
3629 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3630 (mwin__draw_box): Likewise.
3631 (mwin__draw_bitmap): This function deleted.
3632 (mwin__draw_points): New function.
3633 (mwin__verify_region): Adjusted for the change of the format of
3634 rface->info and the charge of set_region.
3635 (mwin__create_window): Inherit backgound pixel from parent.
3636 (mwin__dump_gc): Adjusted for the change of the format of
3639 2004-03-16 Kenichi Handa <handa@m17n.org>
3641 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3643 * input.c (M_key_alias): New variable.
3644 (handle_key): Try M_key_alias property of a key too.
3645 (minput__init): Initialize M_key_alias. Give that property to
3646 symbols in one_char_symbol. Fix bug of initializing
3649 * draw.c (compose_glyph_string): Don't handle
3650 ignore_formatting_char here. Include formatting characters in the
3651 range processed by a FTL.
3652 (layout_glyph_string): Handle ignore_formatting_char here.
3654 2004-03-12 Kenichi Handa <handa@m17n.org>
3656 * input-gui.c (win_create_ic): Enable bidi in status control.
3658 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3660 2004-03-09 Kenichi Handa <handa@m17n.org>
3662 * input.c (load_input_method): If title is not specified, use the
3663 input method name as title.
3665 * m17n-X.c (get_color): Make it static.
3666 (xim_create_ic, xim_destroy_ic, x_error_handler)
3667 (x_io_error_handler): Likewise.
3669 2004-03-01 Kenichi Handa <handa@m17n.org>
3671 * Version 1.0 released.
3674 Copyright (C) 2003, 2004
3675 National Institute of Advanced Industrial Science and Technology (AIST)
3676 Registration Number H15PRO112
3678 This file is part of the m17n library.
3680 The m17n library is free software; you can redistribute it and/or
3681 modify it under the terms of the GNU Lesser General Public License
3682 as published by the Free Software Foundation; either version 2.1 of
3683 the License, or (at your option) any later version.
3685 The m17n library is distributed in the hope that it will be useful,
3686 but WITHOUT ANY WARRANTY; without even the implied warranty of
3687 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3688 Lesser General Public License for more details.
3690 You should have received a copy of the GNU Lesser General Public
3691 License along with the m17n library; if not, write to the Free
3692 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3693 Boston, MA 02110-1301, USA.