1 2007-05-11 Kenichi Handa <handa@m17n.org>
3 * coding.c (mconv_reset_converter): Set internal->used to 0.
5 2007-05-08 Kenichi Handa <handa@m17n.org>
7 * input.c (check_description): Force copying the translated text.
9 2007-05-02 Kenichi Handa <handa@m17n.org>
11 * input.c (minput_save_config): Unref unnecessary plist. Use
12 free_im_list to free im_config_list.
14 2007-04-20 Kenichi Handa <handa@m17n.org>
16 * input.c (config_command): Fix previous change again.
17 (config_variable): Likewise.
18 (minput_config_command): Fix for the case of setting back to
20 (minput_config_variable): Likewise.
21 (minput_save_config): Include nil as documentation of customized
24 2007-04-05 Kenichi Handa <handa@m17n.org>
26 * input.c (config_command): Fix previous change.
27 (config_variable): Likewise.
29 * plist.c (mplist_get_func): Fix for backward compatiblity.
31 2007-04-04 Kenichi Handa <handa@m17n.org>
33 * input.c (minput_get_command, minput_config_command): Fix example
36 2007-03-29 Kenichi Handa <handa@m17n.org>
38 These changes are to avoid unsafe casting of a function pointer.
40 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
41 (struct MFace): New member hook.
43 * face.c (serialize_face): Adjusted for the change of MFace.
44 (deserialize_face): Likewise.
45 (mface__init): Likewise. Use msymbol_put_func.
46 (mface__realize): Adjusted for the change of MFace. Avoid
48 (mface_get_prop): Adjusted for the change of MFace.
49 (mface_put_prop): Likewise.
50 (mface_get_hook): New function.
51 (mface_put_hook): New function.
52 (mface_update): Adjusted for the change of MFace.
54 * input-gui.c (win_callback): Use mplsit_get_func.
55 (minput__win_init): Use mplsit_put_func.
57 * input.c (take_action_list): Use mplist_get_func.
58 (init_ic_info): Likewise.
59 (fini_ic_info): Likewise.
60 (minput_callback): Likewise.
61 (minput__init): Use mplist_put_func.
63 * language.c (mlang__init): Use msymbol_put_func.
65 * m17n-core.h (M17NFunc): New function type.
66 (M17N_FUNC): New macro.
67 (msymbol_put_func, msymbol_get_func): Extern them.
68 (mplist_put_func, mplist_get_func): Extern them.
70 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
72 * m17n-gui.c (mframe): Add a proper casting.
74 * plist.h (struct MPlist): Make the member val a union.
75 (MPLIST_VAL): Adjusted for the above change.
76 (MPLIST_FUNC): New macro.
77 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
79 * plist.c (mplist_put_func, mplist_get_func): New functions.
81 * symbol.c (msymbol__fini): Use MPLIST_VAL.
82 (msymbol_put_func, msymbol_get_func): New functions.
84 * textprop.c (mtext_serialize): Use msymbol_get_func.
85 (mtext_deserialize): Likewise.
87 2007-03-28 Kenichi Handa <handa@m17n.org>
89 * input.c (get_candidate_list): Avoid unnecessary unref.
91 2007-03-23 Kenichi Handa <handa@m17n.org>
93 * database.c (mdatabase__update): Unref plist at the tail.
95 2007-03-21 Kenichi Handa <handa@m17n.org>
97 * input.c (update_custom_info): Fix for the case "name == Mnil &&
99 (config_command): Fix for the case that configuration is
101 (config_variable): Likewise.
102 (minput_config_command): If keyseqlist is an empty list, cancel
104 (minput_config_variable) If value is an empty list, cancel the
106 (minput_save_config): Handle cancellation of config and customize
109 2007-03-15 Kenichi Handa <handa@m17n.org>
111 * input.c (minput_config_variable): Check custom->vars (not
114 2007-03-01 Kenichi Handa <handa@m17n.org>
116 * input.c (reload_im_info): Setup cmds, vars, and title of
118 (check_variable_value): Fix the return value.
120 * database.c (mdatabase__check): If necessary, update database and
123 2007-02-28 Kenichi Handa <handa@m17n.org>
125 * database.c (get_dir_info): Set dir_info->status to
127 (check_version): New function.
128 (register_database): Don't call find_database.
129 (register_databases_in_files): Don't register a database of
131 (mdatabase__update): Likewise. Avoid unnecessary scanning.
133 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
134 and MDB_STATUS_OUTDATED.
136 * font.h (struct MFont): Types of members type, source, and
137 spacing changed to unsigned.
139 * internal-gui.h (struct): Types of members category and type
142 * internal.h (struct MText): Types of members format and coverage
145 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
146 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
148 2007-02-23 Kenichi Handa <handa@m17n.org>
150 * input.c (Mpop): New variable.
151 (fully_initialize): Initialize Mpop.
152 (parse_action_list): Handle Mpop.
153 (take_action_list): Likewise.
154 (handle_key): When a key is unhandled, shift to the initial state
155 only if the current state has no branch action.
157 2007-02-12 Kenichi Handa <handa@m17n.org>
159 * input.c (get_preceding_char): Unref mt if necessary.
160 (get_following_char): Likewise.
161 (parse_action_list): Fix handling of `insert' action as
163 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
164 (take_action_list): Check invalid candidate list.
166 2007-02-06 Kenichi Handa <handa@m17n.org>
168 * input.c (integer_value): Check also ic->produced for @-N.
170 2007-01-26 Kenichi Handa <handa@m17n.org>
172 * database.c (mdatabase__update): Check mdatabase__dir_list from
175 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
177 2007-01-12 Kenichi Handa <handa@m17n.org>
179 * input.c (handle_key): Handle a branch action of the initial
182 2007-01-10 Kenichi Handa <handa@m17n.org>
184 * m17n-gd.c (gd_render): Delete superfluous line.
186 2006-12-26 Kenichi Handa <handa@m17n.org>
188 * m17n.h (minput_callback): Extern it.
190 * input.h (minput__callback): Delte extern.
192 * input.c (get_surrounding_text): Adjusted for the change of
193 minput__callback to minput_callback.
194 (delete_surrounding_text): Likewise.
195 (minput_create_ic): Likewise.
196 (minput_destroy_ic): Likewise.
197 (minput_filter): Likewise.
198 (minput_set_spot): Likewise.
199 (minput_toggle): Likewise.
200 (minput_reset_ic): Likewise.
202 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
203 and ic->candidate_to to 0.
204 (minput_callback): Renamed from minput__callback.
206 * input-gui.c (win_callback): Adjusted for the change of
207 minput__callback to minput_callback.
209 2006-12-15 Kenichi Handa <handa@m17n.org>
211 * font-ft.c (ft_add_font): Fix typo.
213 2006-12-06 Kenichi Handa <handa@m17n.org>
215 * Version 1.3.4 released.
217 2006-11-16 Kenichi Handa <handa@m17n.org>
219 * input.c (parse_action_list): Allow (undo 0).
220 (adjust_markers): New function.
221 (preedit_insert, preedit_delete): Call adjust_markers.
222 (preedit_replace): New function.
223 (update_candidate): Call preedit_replace instead of preedit_insert
225 (filter): When ic_info->commit_key_head is nonzero, shift input
226 event keys even if there's no committed text.
228 2006-11-10 Kenichi Handa <handa@m17n.org>
230 * input.h (MInputContextInfo): New member commit_key_head.
232 * input.c (preedit_commit): Update ic_info->commit_key_head.
233 (take_action_list): Reset ic_info->commit_key_head on Mundo.
234 (filter): When committed, shift keys by ic_info->commit_key_head.
236 2006-10-30 Kenichi Handa <handa@m17n.org>
238 * input.c (preedit_delete): Fix typo.
239 (take_action_list): Print more debugging information. Allow
240 variable in arg of 'select' and `pushback'.
242 * database.c (gen_database_name): Don't put extra space.
243 (load_database): Print debugging information.
244 (register_databases_in_files): New arg headlen. Callers changed.
245 (mdatabase__load_for_keys): Shorten debugging information.
246 (mdatabase_load): Don't print debugging information here.
248 2006-10-27 Kenichi Handa <handa@m17n.org>
250 * input.c (marker_code): New arg surrounding. Callers changed.
251 (surrounding_pos): Check if name[0] == '@'.
252 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
253 (take_action_list): Likewise.
254 (get_preceding_char): If POS is zero, always call
255 get_surrounding_text.
257 2006-10-19 Kenichi Handa <handa@m17n.org>
259 * input.c (load_variables): Fix setting of `global'.
261 2006-10-16 Kenichi Handa <handa@m17n.org>
263 * draw.c (draw_background): Be sure to set *to_x.
264 (render_glyph_string): If from == to, just return.
266 2006-10-18 Kenichi Handa <handa@m17n.org>
268 * database.c (get_dir_info): Return NULL if the directory name is
270 (register_databases_in_files): Call register_database with
272 (mdatabase__update): Fix logic. Call register_database with
274 (mdatabase_define): Call register_database with
277 * input.c (delete_surrounding_text): Be sure to set members
278 preceding_text and following_text to NULL.
279 (shift_state): Save variable values in ic_info->vars_saved.
280 (preedit_commit): Don't print debug information here. Don't
281 change ic_info->keys here.
282 (get_candidate_list): Don't ref plist.
283 (take_action_list): Don't unref return value of
284 get_candidate_list. For undo, reset ic->produced and recover
285 ic_info->vars. Be sure to set ic->candidate_list to NULL after
287 (init_ic_info): Set ic_info->vars_saved.
288 (fini_ic_info): Unref ic_info->vars_saved.
289 (re_init_ic): Be sure to set ic->candidate_list to NULL after
291 (filter): Be sure to set members preceding_text and following_text
292 to NULL. Print debug information about produced text. Delete
293 processed keys from ic_info->keys.
295 * input.h (MInputContextInfo): New member vars_saved.
297 2006-10-16 Kenichi Handa <handa@m17n.org>
299 * database.c (mdatabase__update): Fix the way to get db_info.
301 2006-10-02 Kenichi Handa <handa@m17n.org>
303 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
304 `size' changed to 24.
306 * font.c (xlfd_unparse_name): Adjusted for the change of
308 (font_score): Likewise.
309 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
311 * m17n-X.c (MFontX, _MFontX): Deleted.
312 (SET_SIZE, HAVE_SIZE): Deleted.
313 (free_display_info): Adjusted for the change of
314 disp_info->font_list format.
315 (xfont_registry_list): Likewise.
316 (xfont_open): Likewise.
317 (xfont_list): Likewise.
318 (xfont_encode_char): Ignore size to find a realized font.
319 (MRealizedFontXft): Change the order of members to make it
320 compatible with MRealizedFontFT.
322 2006-09-27 Kenichi Handa <handa@m17n.org>
324 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
325 (mfont_close): Add comments.
327 * mtext-lbrk.c (mtext_line_break): Add comment.
329 2006-09-26 Kenichi Handa <handa@m17n.org>
331 * input.c (minput_get_description): Handle description about
332 inclusion-only input methods.
334 2006-09-21 Kenichi Handa <handa@m17n.org>
336 * input.c (M_gettext): New variable.
337 (fully_initialize): Initialize M_gettext.
338 (check_description): New function.
339 (load_commands): Call check_description.
340 (config_all_commands): Be sure to unref pl.
341 (load_variables): Call check_description.
342 (config_all_variables): Be sure to unref pl.
343 (load_im_info): Call check_description.
345 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
347 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
348 and bind_textdomain_codeset.
350 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
352 2006-09-15 Kenichi Handa <handa@m17n.org>
354 * input.c (reload_im_info): Update custom and global info.
355 (init_ic_info): Fix previous change.
357 2006-09-14 Kenichi Handa <handa@m17n.org>
359 * database.c: Include <libgen.h>.
360 (mdatabase__lock): Make a directory if necessary.
362 * input.c (resolve_command): Adjusted for the format change of
363 configured_cmds member.
364 (load_commands, load_variables): Fix for errornous data handling.
365 (config_command, config_variable): New function.
366 (config_all_commands, config_all_variables): Renamed from
367 config_commands and config_variables. Utilize the above function.
368 (check_variable_value): Argument changed. Callers changed.
369 (load_im_info): Call config_all_commands and config_all_variables.
370 (init_ic_info): Adjusted for the format change of configured_vars
372 (minput__init): Initialize Mcustomized, Mconfigured, and
374 (Mcustomized, Mconfigured, Minherited): New variables.
375 (minput_get_command): Be sure to return NULL if an input method
376 use no local command.
377 (minput_get_variable): Be sure to return NULL if an input method
378 use no local variable.
379 (minput_config_command, minput_config_variable)
380 (minput_save_config): Adjusted for the format change of
381 configured_cmds and configured_vars members.
383 * plist.c (write_element): Delete superfluous ':'.
385 2006-09-13 Kenichi Handa <handa@m17n.org>
387 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
388 (minput_config_file): Extern it.
390 * draw.c (Minherited): Declaration moved to input.c.
391 (mdraw__init): Don't initialize Minherited here.
393 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
395 2006-09-07 Kenichi Handa <handa@m17n.org>
397 * textprop.c (mtext_serialize): Call mplist__serialize with the
400 * plist.h (mplist__serialize): Prototype adjusted.
401 (mplist__assq): Extern it.
403 * plist.c: Include <ctype.h>
404 (PUTC, PUTS): New macros.
405 (write_symbol): New function.
406 (write_element): New arg indent.
407 (dump_string, dump_plist_element): Delete them.
408 (mplist__from_string): New arg pretty.
409 (mplist__assq): New function.
410 (mdebug_dump_plist): Use write_element.
412 * mtext.c (mtext_cat_char): Allocate more memory.
413 (mdebug_dump_mtext): Don't escal a newline character.
415 * m17n.h (minput_get_command, minput_get_variable)
416 (minput_config_command, minput_config_variable)
417 (minput_save_config): Extern them.
419 * m17n-core.c: Include <string.h>.
420 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
421 use the stream stdout instead of a file of that name.
423 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
426 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
427 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
428 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
429 (MDEBUG_DUMP): Flush the stream.
431 * input.h (struct _MInputMethodInfo): Delete member im. New
432 members mdb, language, name, extra, cmds, configured_cmds,
433 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
434 (MInputContextInfo): New member tick.
436 * input.c: Big change to improve user-side input method
437 customization. Here, list just public API changes.
438 (minput_get_commands, minput_get_variables)
439 (minput_assign_command_keys, minput_set_variable): Label them
441 (minput_get_command, minput_get_variable)
442 (minput_config_command, minput_config_variable)
443 (minput_save_config): New functions.
445 * database.h (PATH_MAX): Define it if not yet defined.
446 (PATH_SEPARATOR): Likewise.
447 (enum MDatabaseStatus): New enum.
448 (struct MDatabaseInfo): Moved from database.c. New members status,
449 time, lock_file, and uniq_file.
450 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
451 (mdatabase__unlock): Extern them.
453 * database.c: Include <time.h>.
454 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
455 (GEN_PATH): Args changed. Callers changed.
456 (struct MDatabaseInfo): Moved to database.h.
457 (struct MDatabase, mdb_list): Deleted.
458 (mdatabase__list): New var.
459 (get_database_filename): Deleted. Callers changed to use
461 (find_file, get_database_file): New files.
462 (get_dir_info): Initialize new members of MDatabaseInfo.
463 (find_database): Arg chagnded. Callers changed.
464 (free_db_info, register_database, register_databases_in_files):
466 (update_database_list): Deleted.
467 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
468 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
469 (mdatabase__update): New function.
470 (mdatabase__check): Return value changed.
471 (mdatabase__file, mdatabase__lock, mdatabase__save)
472 (mdatabase__unlock): New functions.
474 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
476 * input.c (get_surrounding_text): Return -2 when surrounding text
478 (get_following_char): Likewise.
479 (get_preceding_char): Likewise.
480 (minput__callback): Return 0 if there is a callback function,
483 2006-08-17 Kenichi Handa <handa@m17n.org>
485 * input.c (reset_ic): Use shift_state to setup the current state.
487 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
489 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
490 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
491 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
493 2006-08-02 Kenichi Handa <handa@m17n.org>
495 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
497 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
499 * font-ft.c (ft_encapsulate): Add code for debugging.
500 (mfont__ft_drive_otf): Be sure to encode character before getting
503 2006-07-21 Kenichi Handa <handa@m17n.org>
505 * draw.c (mdraw_text_extents): Fix previous typo.
507 2006-07-19 Kenichi Handa <handa@m17n.org>
509 * draw.c (gstring_width): New arg lbearing.
510 (render_glyph_string): Adjusted for the change of gstring_width.
511 (mdraw_text_extents): Fix lbearing of ink and line metrics.
513 * m17n-core.h (Mlanguage): Extern it.
515 * m17n.h (Mlanguage): Extern deleted.
517 * mtext.c (mtext__init): Initialize Mlanguage.
518 (Mlanguage): Declaration moved from locale.c
520 * locale.c (mlocale__init): Don't initialize Mlanguage here.
521 (Mlanguage): Declaration moved to mtext.c.
523 * language.c (mlang__init): Don't initialize Mlanguage here.
525 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
527 2006-07-14 Kenichi Handa <handa@m17n.org>
529 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
530 (MRealizedFontFT): New member face_encapsulated.
531 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
532 (ft_gen_font): New function.
533 (ft_add_font): Use ft_gen_font.
534 (ft_list_script): Store lists in ft_script_list.
535 (ft_check_otf): New arg ft_face. Caller changed.
536 (ft_check_language): Likewise.
537 (ft_check_script): Likewise.
538 (ft_encapsulate, ft_close): New functions.
539 (mfont__ft_driver): Initialize members encapsulate and close.
540 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
542 * font.h (struct MRealizedFont): New member encapsulating.
543 (struct MFontDriver): New members encapsulate and close.
545 * font.c (mfont__match_p): If FONT is realized, check capability
546 by font drivers's check_capability method.
547 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
550 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
551 declarations of foundry and fam local vars.
552 (xft_driver): Make it static.
554 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
555 (mfont_close): Extern them.
557 * m17n-gd.c (device_open): Don't specify foundry and family of the
560 2006-07-11 Kenichi Handa <handa@m17n.org>
562 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
564 2006-07-13 Kenichi Handa <handa@m17n.org>
566 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
568 (ft_check_script): Delete unused var.
569 (ft_list_capability): Likewise.
571 * font.c (mfont__get_capability): Setup cap->otf.
572 (Motf): Make it global.
573 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
575 * font.h (MFontCapability): New member otf.
577 * language.c (mlang__fini): Delete unused vars.
579 * m17n-gui.h (Motf): Extern it.
581 * database.c (update_database_list): Delete unused vars.
583 2006-07-07 Kenichi Handa <handa@m17n.org>
585 * font-ft.c (DEVICE_DELTA): Fix typo.
587 2006-07-06 Kenichi Handa <handa@m17n.org>
589 * fontset.c (mfont__lookup_fontset): Don't ignore family and
592 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
594 * database.c: Update comments.
596 2006-07-05 Kenichi Handa <handa@m17n.org>
598 * database.c (PATH_MAX): Define it if not yet defined.
599 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
601 (get_database_filename): Use GEN_PATH.
602 (get_dir_info): Don't include the last '/' in directory name.
603 (register_database): New function.
604 (update_database_list): Use register_database. Search all
605 directories in mdatabase__dir_list for wildcard databases.
606 (mdatabase__init): Check "~/.m17n.d".
608 2006-07-03 Kenichi Handa <handa@m17n.org>
610 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
611 push reverse property.
613 * plist.c (dump_plist_element): Fix previous change.
615 2006-06-28 Kenichi Handa <handa@m17n.org>
617 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
620 * draw.c (MbidiNSM): New variable.
621 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
622 attention to bidi type NSM.
623 (mdraw__init): Initialize MbibiNSM.
625 * language.c (mscript__char_list): Fix finding a char-list element.
627 * plist.c (dump_string): Return number of printed characters.
628 (dump_plist_element): Print elements more compactly.
630 2006-06-23 Kenichi Handa <handa@m17n.org>
632 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
633 (include_HEADERS): Likewise.
635 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
637 * language.c: Update documentation.
639 2006-06-23 Kenichi Handa <handa@m17n.org>
641 * font-ft.c (struct MFontFT): Delete member lang.
642 (free_ft_info): Don't unref member lang. Destroy members langset
644 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
645 changed. Set members langset and charset.
646 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
648 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
650 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
651 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
652 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
653 characters at first. If it fails, try listing by language names.
654 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
655 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
656 change of MFontCapability.
657 (ft_list_capability): Likewise. Try listing by languages, then by
658 scripts. Check OTF at last.
659 (ft_check_script): New function.
660 (ft_select): Adjusted for the check of MFontCapability.
661 (ft_list_family_names): New function.
662 (ft_check_capability): If cap->script is not Mnil, call
664 (mfont__ft_driver): Initialize with ft_list_family_names.
666 * font.h (struct MFontDriver): New member list_fmaily_names.
667 (struct): Change member "MSymbol *lang" to "MSymbol language".
669 * font.c: Include "language.h".
670 (Motf): New variable.
671 (otf_script_list, load_otf_script_list): Delete it.
672 (find_script_from_otf_tag): Delete it.
673 (merge_capability): New function.
674 (mfont__init): Init Motf.
675 (mfont__fini): Don't unref otf_script_list.
676 (free_font_capability): Check cap->script_tag to determine if
677 OTF-related capability is set.
678 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
679 the change of type MFontCapability.
680 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
682 (mfont_list): Call merge_capability for LANGUAGE arg.
683 (mfont_list_family_names): New function.
685 * input-gui.c: Typo in comments fixed.
687 * input.c: Typo in comments fixed.
689 * language.h (mlanguage__list): Delete it.
690 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
693 * language.c: Include "mtext.h".
694 (M_script_lang_list): Delete it.
695 (language_list, script_list): New variables.
696 (load_lang_script_list, init_language_list, init_script_list): New
698 (mlang__init): Don't load language database here.
699 (mlang__fini): Unref language_list and script_list if not NULL.
700 (mlanguage__list): Delete it.
701 (mlanguage__info, mscript__info, mscript__char_list)
702 (mscript__otf_tag, mscript__from_otf_tag): New functions.
703 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
704 (mscript_list, mscript_language_list): New functions.
706 * m17n-gui.h (mfont_list_family_names): Extern it.
708 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
709 (mlanguage_text, mscript_list, mscript_language_list): Extern
712 2006-06-21 Kenichi Handa <handa@m17n.org>
714 * m17n-X.c (xfont_driver): Initialize with
715 xfont_list_family_names.
716 (xfont_list_family_names): New function.
717 (xft_driver): Initialize with NULL for list_family_names member.
718 (device_init): Set list_family_names member of xft_driver to that
721 2006-06-06 Kenichi Handa <handa@m17n.org>
723 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
725 2006-03-24 Kenichi Handa <handa@m17n.org>
727 * font-ft.c (ft_open): Improve debug message.
729 * fontset.c (mfontset__get_font): Fix for the case that no font in
730 per_script list is available.
732 2006-02-06 Kenichi Handa <handa@m17n.org>
734 * Version 1.3.3 released.
736 2006-02-22 Kenichi Handa <handa@m17n.org>
738 * textprop.c: Fix some typos in documentation.
740 * plist.c: Fix some typos in documentation.
742 * m17n-core.h: Fix some typos in documentation.
743 (M17NLIB_PATCH_LEVEL): Updated to 3.
744 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
746 * symbol.c: Fix some typos in documentation.
748 * mtext.c: Fix some typos in documentation.
750 * input.c: Fix several typos in documentation.
752 2006-02-06 Kenichi Handa <handa@m17n.org>
754 * Version 1.3.2 released.
756 2006-02-03 Kenichi Handa <handa@m17n.org>
758 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
759 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
761 * font.c (xlfd_parse_name): Fix handling of the name "nil".
763 * draw.c (layout_glyphs): Fix handling left_padding of
766 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
768 2006-02-02 Kenichi Handa <handa@m17n.org>
770 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
773 2006-01-25 Kenichi Handa <handa@m17n.org>
775 * input.c (resolve_expression): If the value of PLIST is a plist,
776 but the first element is not symbol, return 0.
778 2006-01-17 Kenichi Handa <handa@m17n.org>
780 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
781 HAVE_GD is 2 or the greater.
783 2006-01-16 Kenichi Handa <handa@m17n.org>
785 * Version 1.3.1 released.
787 2006-01-16 Kenichi Handa <handa@m17n.org>
789 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
790 simulating anti-aliasing.
792 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
793 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
795 2006-01-12 Kenichi Handa <handa@m17n.org>
797 * input.c (get_surrounding_text): Always pop ic->plist.
798 (reset_ic): Don't reset ic->plist.
800 2006-01-10 Kenichi Handa <handa@m17n.org>
802 * input.c (preedit_commit): For debugging, print only commiting
803 charactes. Don't set ic->candidate_show to 0.
804 (handle_key): Don't run branch-actions just by shifting to the
806 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
807 Reset vars and plist.
809 2006-01-07 Kenichi Handa <handa@m17n.org>
811 * input.c (load_branch): Confirm that maps is not NULL.
813 2006-01-05 Kenichi Handa <handa@m17n.org>
815 * input-gui.c (win_filter): Try to convert arg to key only when
818 * plist.c (read_integer_element): If '#' and '-' are followed by
819 non-integer-constituent, read them as a part of a symbol.
820 (read_symbol_element): New arg C.
821 (read_element): Adjust args to read_symbol_element.
823 * input.c (load_macros): On overwriting a macro, free the old
825 (minput__init): Store Mmap in load_im_info_keys.
826 (minput_get_title_icon): If the input method has no title, be sure
828 (minput_get_description): If the input method has no description,
829 be sure to return NULL.
830 (minput_get_variables): Fix documentation.
831 (handle_key): Pay attention to the case that key is Mnil.
832 (filter): Likewise. Fix handling of such symbol as S-A.
834 2005-12-22 Kenichi Handa <handa@m17n.org>
836 * Version 1.3.0 released.
838 2005-12-22 Kenichi Handa <handa@m17n.org>
840 * font-ft.c (ft_list): If the specified font has no property,
843 2005-12-20 Kenichi Handa <handa@m17n.org>
845 * character.c (mchar_get_prop): Check char_prop_list.
846 (mchar_put_prop, mchar_get_prop_table): Likewise.
848 2005-12-18 Kenichi Handa <handa@m17n.org>
850 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
851 file name sans language.
853 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
855 * input.c: Fix typo in comments.
857 2005-12-14 Kenichi Handa <handa@m17n.org>
859 * input.c (minput_get_title_icon): Check the default icon for the
862 2005-12-13 Kenichi Handa <handa@m17n.org>
864 * input.c (Mless_equal, Mgreater_equal): New variables.
865 (parse_expression, resolve_expression, parse_action_list)
866 (take_action_list): Handle the aboves.
867 (filter): Treat key S-X as X.
868 (minput__init): Initialize Mless_equal and Mgreater_equal.
869 (minput_get_title_icon): New function.
871 * m17n.h (minput_get_title_icon): Extern it.
873 * database.c (get_database_filename): Return a filename instead of
875 (load_database): Adjusted for the above change.
876 (mdatabase__load_for_keys): Likewise.
877 (mdatabase__find_file): New function.
879 * database.h (mdatabase__find_file): Extern it.
881 * font.h (mfont__resize): Delete extern.
883 * font.c (mfont__list): Check resize ratio.
884 (mfont__resize): Delete it.
885 (mfont_resize_ratio): Include the code of mfont__resize.
887 * font-ft.c (ft_open): Check resize ratio.
889 * m17n-X.c (xfont_open): Check resize ratio.
890 (xft_open): Likewise.
892 2005-12-07 Kenichi Handa <handa@m17n.org>
894 * input.c (take_action_list): If take_action_list return -1,
896 (handle_key): Likewise.
898 * face.c (mface__for_chars): When font is specified and layouter
899 is found for it, if the layouter doesn't support one of a
900 character, use a face sans layouter for it.
902 2005-12-06 Kenichi Handa <handa@m17n.org>
904 * fontset.c (mfont__lookup_fontset): If only a fallback font is
905 found, don't use it for more than one character.
907 2005-12-05 Kenichi Handa <handa@m17n.org>
909 * face.c (mface__realize): Set rfont->layouter to Mnil.
910 (mface__for_chars): Fix handling of layouter.
912 * character.h (mchar__define_prop): Extern it.
914 * database.c (update_database_list): Call mchar__define_prop if
917 * character.c (mchar__init): Don't call mchar_define_property.
918 Instead just initialize property keys.
919 (mchar__fini): Free char_prop_list only if it's not NULL.
920 (mchar__define_prop): New function.
921 (mchar_define_property): Call mchar__define_prop.
923 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
926 2005-12-02 Kenichi Handa <handa@m17n.org>
928 * language.c (mlang__init): Handle extra chars.
930 * m17n-gui.h (mfont_check): Adjust prototype.
932 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
933 (xfont_check_capability): New function.
934 (xft_driver): Specify xft_check_capability.
935 (xft_check_capability): New function.
937 * font-ft.c (M0_3): Delete it.
939 (ft_get_charmaps): Refer to M0.
940 (fc_parse_pattern): Fix previous change.
941 (ft_list_language): Check also extra chars.
942 (ft_check_otf): Define it even if HAVE_OTF is undef.
943 (ft_check_lang): Check the result of FcLangSetHasLang against
944 FcLangDifferentLang. Check also extra chars.
945 (ft_list_capability): Delete ifdef HAVE_OTF.
946 (ft_select): Likewise.
947 (ft_open): Improve debug information.
948 (ft_check_capability): New function.
949 (mfont__ft_driver): Specify ft_check_capability.
950 (mfont__ft_init): Initialize M0.
952 * fontset.c (get_font_from_group): New function.
953 (mfontset__get_font): New function.
955 * fontset.h (mfontset__get_font): Extern it.
957 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
958 (mfont__fini): Delete ifdef HAVE_OTF.
959 (free_font_capability): Likewise.
960 (mfont__get_capability): Likewise.
961 (mfont__check_capability): New function.
962 (mfont_check): Change the order of arguments. Use
965 * font.h (struct MFontDriver): New member check_capability.
966 (MFontCapability): Delete ifdef HAVE_OTF.
967 (mfont__check_capability): Extern it.
969 * face.c (mface__realize): Fix handling of FONT arg.
970 (mface__for_chars): Fix handling of explicitly specified font.
972 2005-11-25 Kenichi Handa <handa@m17n.org>
974 * font-flt.c (run_command): Print debug info for
977 * draw.c (layout_glyphs): Fix handling of left/right_padding.
979 * face.c (mface__for_chars): Check rfont before accessing the
982 2005-11-21 Kenichi Handa <handa@m17n.org>
984 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
987 * fontset.c (fontset_table): New variable.
988 (free_fontset): Call M17N_OBJECT_UNREGISTER.
989 (mfont__fontset_init): Add fontset_table as an object array.
990 (mfont__realize_fontset): Ref FONTSET.
991 (mfont__free_realized_fontset): Unref REALIZED->fontset.
992 (mfontset): Call M17N_OBJECT_REGISTER.
993 (mfontset_copy): Likewise.
995 * input.c (handle_key): For debugging, print information about
997 (filter): Add an alias for Meta and Alt modifiers.
998 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1000 (minput__init): Initialize them.
1001 (parse_expression): New function.
1002 (resolve_expression): New function.
1003 (parse_action_list): Handle expressions by parse_expression.
1004 (take_action_list): Handle expressions by resolve_expression.
1005 (parse_nested_list_value): Fix previous change.
1006 (resolve_command): Fix handling of the return value of
1009 2005-11-18 Kenichi Handa <handa@m17n.org>
1011 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1012 HAVE_OTF is defined.
1013 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1015 (ft_select): Likewise.
1017 * font.c (mfont_list): Fix for the case that FONT is NULL.
1018 (OTF_tag): Delete it.
1019 (load_otf_script_list): Define only when HAVE_OTF is defined.
1020 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1023 * draw.c (truncate_gstring): Be sure to truncate at
1024 glapheme-cluster boundary.
1026 2005-11-11 Kenichi Handa <handa@m17n.org>
1028 * input.c (delete_surrounding_text): Clear cache if necessary.
1030 2005-11-09 Kenichi Handa <handa@m17n.org>
1032 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1033 glyph prev is also supported by the current flt.
1035 2005-11-08 Kenichi Handa <handa@m17n.org>
1037 * m17n-X.c (xft_render): Cancel previous change.
1039 2005-11-07 Kenichi Handa <handa@m17n.org>
1041 * input.c: Include <stdlib.h>.
1042 (get_surrounding_text, delete_surrounding_text)
1043 (get_preceding_char, get_following_char): New functions.
1044 (integer_value): New arg surrounding. If it is nonzero, try to
1045 get a surrounding character. Callers changed.
1046 (take_action_list): Check `value' before setting an element.
1047 (destroy_ic): Unref ic_info->preceding_text and
1048 ic_info->following_text.
1049 (minput__init): Initialize Minput_get_surrounding_text and
1050 Minput_delete_surrounding_text.
1051 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1053 (filter): Unref ic_info->preceding_text and
1054 ic_info->following_text.
1056 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1059 * input.h (MInputContextInfo): New members preceding_text and
1062 2005-11-04 Kenichi Handa <handa@m17n.org>
1064 * input.c (parse_nested_list_value): Fix handling of the global
1066 (get_nested_list): Get global definitions by load_partial_im_info.
1067 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1068 MInputCandidatesChanged.
1069 (take_action_list): Likewise.
1070 (reset_ic): Likewise.
1071 (create_ic): Don't pay special attention to
1072 Mcandidates_group_size.
1073 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1074 (minput_set_variable): Get a definition of varible by
1075 mplist_find_by_value, not mplist_get.
1077 * m17n.h (enum MInputCandidatesChanged): New enum.
1079 2005-11-01 Kenichi Handa <handa@m17n.org>
1081 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1083 (mwin__destroy_window): If xft_draw's drawable is win, change it
1084 to device->drawable before destroying win.
1086 2005-10-31 Kenichi Handa <handa@m17n.org>
1088 * input.c (load_im_info): Fix adding of state.
1090 * m17n-core.c (m17n_fini_core): Fix reporting of module
1093 * m17n.c (m17n_fini): Fix reporting of module finalization.
1095 * m17n-gui.c (m17n_init_win): Fix reporting of module
1098 2005-10-29 Kenichi Handa <handa@m17n.org>
1100 * input.c (get_candidate_list): Fix the timing of referring plist.
1102 2005-10-28 Kenichi Handa <handa@m17n.org>
1104 * input.c (load_branch): Ignore an undefined map name.
1105 (load_im_info): Set im_info->title from `name' only if it's not
1107 (shift_state): Always update ic->status.
1108 (adjust_candidates): Renamed from adjust_candidate_command.
1109 Argument changed. Caller changed.
1110 (get_candidate_list, regularize_action): New functions.
1111 (take_action_list): Use them. On handling Munhandle, don't set
1113 (handle_key): If KEY is not handled by MAP, and MAP has
1114 branch_actions, perform them.
1116 * database.c (mdatabase__fini): Free dir_info->filename;
1118 2005-10-20 Kenichi Handa <handa@m17n.org>
1120 * input.c (marker_code): Accept '@@'.
1121 (integer_value): Handle '@@'.
1122 (parse_action_list): Accept a symbol argument.
1123 (take_action_list): Resolve the symbol argument. Handle the
1126 2005-10-18 Kenichi Handa <handa@m17n.org>
1128 * input.c: Include "charset.h".
1129 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1131 (MIMState): New member (M17NObject control).
1132 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1133 (get_nested_list, resolve_variable): New functions.
1134 (integer_value): New arg (MPlist **value). Set it to the plist
1135 element containing the value.
1136 (resolve_command): New function.
1137 (load_translation): New arg (MPlist *map_actions).
1138 (load_branch): New args language and name. If `keylist' is a
1139 symbol, resolved that as a command name.
1140 (free_map): New arg top. Free map->map_actions only if top is
1142 (free_state): New function.
1143 (load_state): New arg name.
1144 (im_info_list): New variable.
1145 (free_im_info, get_im_info_by_tags): New functions.
1146 (load_im_info): Arg key changed to plist. Handle `include'.
1147 Return (MInputMethodInfo *).
1148 (preedit_commit): Ref ic->candidate_list.
1149 (get_select_charset, adjust_candidate_command): New functions.
1150 (take_action_list): Handle `include'. Adjust candidate action
1151 properly. Handle control variables `candidates-charset' and
1152 `candidates-group-size'.
1153 (open_im): Use get_im_info.
1154 (create_ic): Get global variables.
1155 (load_partial_im_info): New function.
1156 (get_im_info): New function.
1157 (check_command_keyseq, check_command_list, check_variable_list):
1159 (minput__init): Don't handle M_database_hook and Mdetail_text.
1160 Initialize M_candidates, Mcandidates_group_size,
1161 Mcandidates_charset.
1162 (parse_variable_list, get_variable_list, parse_command_list)
1163 (get_command_list): Delete them.
1164 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1165 (minput__fini): Simply unref command_list and variable_list.
1166 (minput_get_description): Adjusted for the new form of description.
1167 (minput_get_commands): Use get_nested_list.
1168 (minput_assign_command_keys): Likewise.
1169 (minput_get_variables, minput_set_variable): Likewise.
1171 * input.h (MInputMethodInfo): New members im and maps.
1173 * database.h (M_database_hook): Delete extern.
1174 (MDatabaseHookFunc): Delete extern.
1175 (mdatabase__check): Extern it.
1177 * database.c: Include <glob.h>.
1178 (MAX_TIME): New macro.
1179 (Masterisk): New variable.
1180 (get_database_stream): Argument changed to (MDatabaseInfo *).
1182 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1183 (find_database): New function.
1184 (update_database_list): New function.
1185 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1186 calling update_database_list.
1187 (mdatabase__check): New function.
1188 (mdatabase_find): Use update_database and find_database. Don't
1189 handle MDatabaseHookFunc.
1190 (mdatabase_list): Call update_database at first.
1191 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1192 (MDatabaseList): New type.
1194 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1196 * m17n.h (Mdetail_text): Delete extern.
1198 * m17n-core.h (mplist_conc): Delete extern.
1200 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1202 (mplist_conc): Renamed to mplist__conc.
1203 (mplist__pop_unref): New function.
1205 2005-10-14 Kenichi Handa <handa@m17n.org>
1207 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1209 (read_element): If keys is an empty plist, return any element
1211 (dump_plist_element): Check if plist is nested.
1212 (mplist_conc): Always ref tail.
1213 (mplist_set): If key is a managing key, ref val in advance.
1215 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1216 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1217 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1220 * fontset.c (free_fontset): Unref fontset_list if necessary.
1221 (mfont__fontset_fini): Don't free fontset_list. Unref
1223 (mfont__realize_fontset): Initialize request.
1224 (mfontset): Ref default_fontset or fontset only if necessary.
1225 (mfontset_copy): Don't ref copy.
1227 * draw.c (render_glyphs): Check gend->type before checking
1230 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1231 unrefed plists to NULL.
1233 2005-10-04 Kenichi Handa <handa@m17n.org>
1235 * textprop.c (mtext_serialize): Be sure to make mt
1236 MTEXT_FORMAT_UTF_8 and NULL terminated.
1238 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1240 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1242 2005-10-03 Kenichi Handa <handa@m17n.org>
1244 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1245 is not at the beginning of line.
1247 2005-09-22 Kenichi Handa <handa@m17n.org>
1249 * input.c: Include <sys/stat.h> and <unistd.h>.
1250 (Minclude, Mcommit, Munhandle): New variables.
1251 (minput__init): Initialize them. Push only Mstate to
1252 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1253 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1255 (load_input_method): Handle "include" directive. If no states are
1257 (shift_state): If state_name is Mt, shift back to the previous
1258 state. Call preedit_commit to commit preedit text.
1259 (preedit_commit): New function.
1260 (take_action_list): Improve debug printing. Handle commit and
1262 (handle_key): Check the return value of take_action_list. Don't
1263 take branch_actions just after changing to the root map.
1264 (reset_ic): Reset all ic_info members.
1265 (filter): When a key is not handled, just move ic_info->keys
1266 instead fo calling reset_ic.
1267 (load_im_info): If key is not Mstate, push Mmap to
1269 (MDatabaseStatList): New type.
1270 (imdir_stat_list): New variable.
1271 (input_method_hook): Don't cancel the hook. Check the
1272 modification time of directories.
1273 (minput__fini): Free imdir_stat_list;
1275 * input.h (MInputContextInfo): New member prev_state.
1277 * m17n-core.h (mplist_conc): Extern it.
1279 * plist.c (mplist_conc): New function.
1281 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1283 * font.h (MRealizedFont): New member average_width.
1285 * font-ft.c (ft_open): Set rface->average_width.
1287 * font.c (xlfd_unparse_name): Print '*' before registry name.
1289 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1290 (xfont_open): Set rfont->average_width.
1291 (xft_open): Likewise.
1292 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1294 * internal-gui.h (struct MFrame): New member average_width.
1296 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1297 (mframe_get_prop): Return the average_width of a font.
1299 * face.c (mface__realize): Set rface->average_width.
1300 (mface__update_frame_face): Set frame->average_width.
1302 * face.h (MRealizedFace): New member average_width.
1304 2005-09-19 Kenichi Handa <handa@m17n.org>
1306 * font.c (xlfd_unparse_name): New arg full_xlfd.
1307 (mfont__encode_char): Use shortcut only for X core fonts.
1308 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1309 (mfont_put_prop): Handle `language' property.
1310 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1311 Print file can capability info too.
1313 * m17n-core.c (mdebug__output): New variable.
1314 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1315 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1316 (m17n_fini_core): Close mdebug__output if it's not stderr.
1318 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1319 (xfont_open): Handle baseline_offset.
1320 (xfont_find_metric): Likewise.
1321 (xfont_render): Likewise.
1322 (xft_open): Likewise.
1323 (xft_render): Likewise.
1325 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1326 (mdebug__output): Extern it.
1327 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1328 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1329 (MDEBUG_DUMP): New macro.
1330 (MDEBUG_PRINT_TIME): Print to medebug__output.
1332 * font.h (MRealizedFont): New member baseline_offset.
1334 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1336 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1337 (ft_list_family): Check alias.
1338 (ft_list_language): If language is "en", don't try to the second
1340 (ft_default_list): New variable.
1341 (ft_list_default): New function.
1342 (ft_select): If family is not specified, try only the default
1343 fonts. Treat the weights normal and medium same.
1344 (ft_open): Fix debug message. If registry is not specified, try
1345 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1346 (ft_find_metric): Likewise.
1347 (ft_render): Likewise.
1348 (ft_list): Fix debug message. Accept the registring iso8859-1.
1349 If family is not specified, try only the default fonts.
1351 * face.c (mface__realize): Fix logic of opening a font.
1353 2005-09-16 Kenichi Handa <handa@m17n.org>
1355 * face.c (mface__realize):
1357 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1360 * input.c (shift_state): Fix the condition of taking init actions.
1361 (take_action_list): Fix handling of pushback action.
1362 (handle_key): Don't change key while checking its alias.
1363 (minput__init): Initialize new variables.
1364 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1367 2005-09-12 Kenichi Handa <handa@m17n.org>
1369 * mtext.c (mtext__uppercase): Add proper open/close parens.
1370 (mtext_titlecase): Add proper casting.
1372 * input.c (parse_action_list): Handle the case that the arg is a
1373 key sequence (MText or MPlist).
1374 (take_action_list): Likewise.
1375 (shift_state): Shorter debug message.
1376 (handle_key): Terminate a debug message by "\n".
1377 (reset_ic): Don't take initial actions here.
1378 (minput_open_im): Print a debug message.
1379 (minput_close_im): Likewise.
1380 (minput_create_ic): Likewise.
1381 (minput_destroy_ic): Likewise.
1383 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1385 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1388 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1389 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1392 * character.c: Add Japanese documentation for
1393 mchar_get_prop_table ().
1395 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1397 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1398 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1399 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1401 (init_case_conversion): New function.
1402 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1403 (uppercase_precheck, lowercase_precheck, final_sigma)
1404 (after_soft_dotted, more_above, before_dot, after_i)
1405 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1407 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1409 * plist.c (read_mtext_element): Fix previous change.
1411 2005-09-05 Kenichi Handa <handa@m17n.org>
1413 * plist.c (read_mtext_element): Handle \uXXXX notation.
1415 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1416 (MTABLE_ALLOCA): Change the name of local variable.
1418 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1419 HAVE_FREETYPE are defined.
1421 * m17n-X.c: Check HAVE_X11.
1423 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1424 directory listing libraries.
1425 (noinst_PROGRAMS): Define it only in maintainer mode.
1427 2005-09-02 Kenichi Handa <handa@m17n.org>
1429 * m17n-gui.h (mdraw_line_break_option): Extern it.
1431 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1432 end of the first glyph.
1433 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1435 (mdraw_line_break_option): New variable.
1436 (mdraw_default_line_break): Use mtext_line_break.
1438 * mtext.h (wordseg_func_table): Don't extern it.
1439 (mtext__wseg_fini): Extern it.
1441 * mtext.c: Don't include word-thai.h.
1442 (wordseg_func_table): Delete this variable.
1443 (mtext__init): Don't initialize above. Don't call
1444 mtext__word_thai_init.
1445 (mtext__fini): Don't free wordseg_func_table. Call
1446 mtext__wseg_fini instead fo mtext__word_thai_fini.
1447 (MTextWordsegFunc): Don't typedef it.
1448 (mtext__word_segment): Moved to mtext-wseg.c.
1450 * m17n-core.h (enum MTextLineBreakOption): New enum.
1451 (mtext_line_break): Extern it.
1453 * mtext-wseg.c: New file.
1455 * mtext-lbrk.c: New file.
1457 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1458 add mtext-lbrk.c and mtext-wseg.c.
1460 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1461 the case that head is NULL.
1463 2005-09-01 Kenichi Handa <handa@m17n.org>
1465 * word-thai.c (wordseg_propertize): If the property value is nil,
1466 don't make the property no-merge.
1467 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1468 attention to the case that they are NULL.
1469 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1472 * character.c (mchar_get_prop_table): New function.
1474 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1476 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1477 (mchar_get_prop_table): Extern it.
1479 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1480 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1482 * internal.h (enum MTextCoverage): New enum.
1483 (MText): New member coverage.
1485 * mtext.c (FORMAT_COVERAGE): New macro.
1486 (insert): Copy mt2->coverage.
1487 (mtext__from_data): Initialize mt->coverage.
1488 (mtext__adjust_format): Update mt->coverage.
1489 (mtext): Initialize mt->coverage.
1490 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1491 Update mt->coverage if necessary.
1492 (mtext_duplicate): Copy mt->coverage.
1493 (mtext_insert, mtext_replace): New functions.
1494 (mtext_dup): Use mtext_duplicate.
1495 (mtext__word_segment): Don't set *from and *to if a word
1496 segmentation funcion is not found.
1497 (mtext_ins_char): Fix typo.
1499 2005-08-25 Kenichi Handa <handa@m17n.org>
1501 * font.h (MFont): New member for_full_width.
1503 * font.c (compare_font_score): Prefer a font of not
1506 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1507 registry charset of a font is one of CJK charsets.
1509 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1510 supports some of CJK.
1512 2005-08-24 Kenichi Handa <handa@m17n.org>
1514 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1516 * m17n-gui.c (null_device_open): Check Mresolution param and set
1519 * m17n-gd.c (device_open): Check Mresolution param and set
1522 * m17n-X.c (MWDevice): New member resy.
1523 (xfont_open): Set ascent, descent, and max_advance members of
1525 (xft_open): Likewise.
1526 (device_open): Compare also screen_num to find a device. Set
1527 device->resy and frame->dpi.
1529 * internal-gui.h (MFrame): New member dpi.
1531 * font.h (MRealizedFont): New member max_advance.
1533 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1534 (mfont__init): Don't initialize Mascent, Mdescent.
1535 (Mascent, Mdescent): Delete these variables.
1536 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1537 Mfont_descent instead of Mascent and Mdescent.
1538 (mfont_put_prop): Allow negative size.
1539 (mfont_find): Handle the case of spec->size < 0. Fix previous
1541 (mfont_list): Handle the case of spec->size < 0.
1542 (mfont_check): Likewise.
1544 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1545 (fc_get_pattern): Handle the case of font->size < 0.
1546 (ft_open): Set ascent, descent, and max_advance members of rfont.
1547 (ft_find_metric): Improve rounding.
1548 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1551 * face.c (mface__realize): Handle the case of font->size < 0.
1553 2005-08-22 Kenichi Handa <handa@m17n.org>
1555 * coding.c (MConverterStatus): Change the member buf to union.
1556 (mconv_buffer_converter): Add const to the arg buf.
1557 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1558 (mconv_decode): Adjusted for the change of MConverterStatus.
1559 (mconv_encode_range): Likewise.
1561 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1562 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1564 2005-08-20 Kenichi Handa <handa@m17n.org>
1566 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1567 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1569 * m17n-X.c (xfont_open): Set members ascent, descent, and
1570 max_advance of rfont.
1571 (xft_open): Likewise.
1573 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1575 (mfont__ft_parse_name): Add const to the arg name.
1577 * font.c (xlfd_parse_name): Add const to the arg name. Call
1578 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1579 (xlfd_unparse_name): Handle spacing.
1580 (mfont__init): Initialize new variables.
1581 (mfont__id): Handle spacing.
1582 (mfont__merge): Likewise.
1583 (mfont__set_spec): This function deleted.
1584 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1585 condition of calling mfont__ft_parse_name.
1586 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1587 (mfont_get_prop): Handle properties spacing, ascent, descent,
1589 (mfont_find): Return a realized font.
1590 (mfont_from_name): Add const to the arg name.
1592 * font.h (enum MFontProperty): New member MFONT_SPACING.
1593 (enum MFontSpacing): New enum.
1594 (MFont): New members spacing and max_advance.
1595 (mfont__ft_parse_name): Prototype adjusted.
1596 (mfont__set_spec): Extern deleted.
1597 (mfont__parse_name_into_font): Prototype adjusted.
1599 2005-08-19 Kenichi Handa <handa@m17n.org>
1601 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1603 * font.c (mfont_list): If FONT is null, use a temporary font.
1604 (mfont_parse_name): Add const to the arg name.
1606 2005-08-18 Kenichi Handa <handa@m17n.org>
1608 * word-thai.c: Surround code by #ifdef and #endif to escape from
1611 * font-ft.c: Mostly re-written.
1613 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1614 (FontLayoutCmd): Type of the member otf changed..
1615 (load_otf_command): Adjusted for the format change of otf command.
1616 (load_command): Likewise.
1617 (free_flt_command): Unref cmd->body.otf.
1618 (run_otf): Ajusted for the type change of otf_cmd.
1619 (run_command): Ajusted for the type change of otf_cmd. On
1620 debugging, print ctx->combining_code.
1621 (mfont__flt_run): Initialize ctx's members code_offset,
1622 combining_code, and left_padding to 0.
1624 * face.h (struct MRealizedFace): New member font.
1625 (mface__realize): Prototype adjusted.
1627 * face.c (find_realized_face): New arg font.
1628 (find_realized_face): Adjusted for the change of MFont.
1629 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1630 (mface__fini): Don't call mdebug__report_object.
1631 (mface__realize): New arg font.
1632 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1633 Optimize the latin case.
1634 (mface__free_realized): Free rface->font.
1635 (mface__update_frame_face): Adjusted for the change of mface__realize.
1636 (mface_equal): New function.
1638 * draw.c (Mcommon): New variable.
1639 (visual_order): Args to mfont__encode_char changed.
1640 (compose_glyph_string): Handle Mfont text property.
1641 (layout_glyphs): Adjusted for the change of MFont.
1642 (mdraw__init): Initialize Mcommon.
1643 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1645 * font.h (enum MFontType): Members completely changed.
1646 (enum MFontProperty): Move MFONT_SIZE to the tail.
1647 (enum MFontSource): New enum.
1648 (struct MFont): New members type, source, sizes, file, capability,
1650 (struct MRealizedFont): Type of member font changed. Members
1651 score, status, and encoding deleted.
1652 (MFontScore): New type.
1653 (MFontList): Member changed.
1654 (struct MFontDriver): New member has_char. Types of members
1656 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1657 (Mapple_roman): Extern them.
1658 (OTF_Tag): Typedefed if not HAVE_OTF.
1659 (enum MFontOpenTypeTable): New enum.
1660 (MFontCapability): New type.
1661 (mfont__ft_drive_otf): Prototype adjusted.
1662 (mfont__score): Extern deleted.
1663 (mfont__merge): Extern it.
1664 (mfont__has_char): Extern it.
1665 (mfont__encode_char): Prototype adjusted.
1666 (mfont__open): Extern it.
1667 (mfont__set_spec): Prototype adjusted.
1668 (mfont__get_capability): Extern it.
1670 * font.c: Include "fontset.h".
1671 (M_font_capability, M_font_list, M_font_list_len): New variables.
1672 (font_score_priority): Change order of initial elements.
1673 (font_score_shift_bits): Fix array size.
1674 (common_weight): Add "thin", "semibold", and "heavy".
1675 (common_stretch): Add "ultracondensed", "extracondensed",
1676 "extraexpanded", and "utltraexpand".
1677 (font_weight_regular, font_weight_normal, font_weight_medium): New
1679 (gen_font_name): This function deleted.
1680 (find_encoding): Set font->encoding.
1681 (OTF_tag): New function.
1682 (otf_script_list): New variable.
1683 (load_otf_script_list): New function.
1684 (find_script_from_otf_tag): New function.
1685 (xlfd_parse_name): Set font->type and font->source.
1686 (mfont__free_realized): Free chains rfonts.
1687 (font_score): Renamed from mfont__score.
1688 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1689 (Mapple_roman): New variables.
1690 (mfont__init): Initilize new variables. Initalize
1691 default_encoding.encoding_name and
1692 default_encoding.encoding_charset to Municode_full and
1693 mcharset__unicode. Use SAFE* macros for allocating filepath
1695 (mfont__fini): Free otf_script_list.
1696 (mfont__id): New function.
1697 (mfont__match_p): Check also capability member of MFont.
1698 (mfont__merge): New funciton.
1699 (mfont__set_spec_from_face): Set type and source members.
1700 (mfont__set_spec_from_plist): Set capability and type members.
1701 (mfont__select): Argument changed.
1702 (mfont__available): New function.
1703 (compare_font_score): New function.
1704 (mfont__list): New function.
1705 (mfont__open): Return a realized font.
1706 (mfont__resize): Adjusted for the change of MFont.
1707 (mfont__has_char): New function.
1708 (mfont__encode_char): Argument changed.
1709 (mfont__set_spec): Argument changed.
1710 (free_font_capability): New function.
1711 (mfont__get_capability): New function.
1712 (MFontfile): New variable.
1713 (mfont_get_prop): Adjusted for the change of MFont.
1714 (mfont_put_prop): Likewise.
1715 (mfont_set_selection_priority): Fix the way of setting
1716 font_score_priority[].
1717 (mfont_find): Use mfont__list instead of mfont__select.
1718 (mfont_resize_ratio): Adjusted for the change of MFont.
1719 (mfont_list): Use mfont__list.
1720 (mfont_check): New function.
1721 (font_score): Make it static.
1723 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1724 (mfont__lookup_fontset): Likewise.
1726 * fontset.c (struct MFontset): Delete member font_spec_list.
1727 (struct MRealizedFontset): Type of member spec changed. New
1729 (load_font_group): Arg spec_list deleted.
1730 (load_fontset_contents): Adjusted for the change of fontset_def.
1731 (free_fontset): Fix the way of freeing fontset elements.
1732 (realize_fontset_elements): Argument changed.
1733 (get_per_script): New function.
1734 (free_realized_fontset_elements): Fix the way of feeing rfontset
1736 (update_fontset_elements): Fix args to realize_fontset_elements.
1737 (mfont__realize_fontset): New arg spec.
1738 (try_font_list): New function.
1739 (try_font_group): New arg request. Use try_font_list.
1740 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1742 (mfontset): Adjusted for the change of MFontset.
1743 (mfontset_copy): Likewise. Don't share plists.
1744 (mfontset_modify_entry): Adjusted for the change of MFontset.
1745 (mfontset_lookup): Call get_per_script.
1746 (mdebug_dump_fontset): Print also the address of fonts.
1748 * input.c (shift_state): Don't reset ic_info->vars.
1749 (take_action_list): Call MDEBUG_PRINT fore calling
1752 * internal-gui.h (MFontDriver): Don't typedef it here.
1754 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1755 (MXFont): This type deleted.
1757 (struct _MFontX): New struct.
1758 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1759 (MDisplayInfo): Member base_font_list deleted.
1760 (DEFAULT_FONT): Definition changed.
1761 (FALLBACK_FONT): This maclr deleted.
1762 (free_display_info): Adjusted for the change of MDisplayInfo.
1763 (free_device): Argument to mfont__free_realized changed.
1764 (xfont_driver): Adjusted for the change of MFontDriver.
1765 (xfont_registry_list): Use MFontX instead of MXFont.
1766 (MRealizedFontX): Renamed from MXFontInfo.
1767 (xfont_select): Return the font found first.
1768 (close_xfont): Change MXFontInfo to MRealizedFontX.
1769 (xfont_open): Return the realized font.
1770 (xfont_find_metric): Get xfont from rfont->fontp.
1771 (xfont_has_char): New function.
1772 (xfont_encode_char): Adjusted for the argument change.
1773 (xfont_render): Get xfont from rfont->fontp.
1774 (xfont_list): Adjusted for the argument change.
1775 (MRealizedFontXft): Renamed from MXftFontInfo.
1776 (xft_driver): Ajusted for the change of MFontDriver.
1777 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1778 (xft_open_font): Argument changed.
1779 (xft_open): Argument changed. Return the realized font.
1780 (xft_find_metric): Get xft_font from rfont->fontp.
1781 (xft_has_char, xft_encode_char): New functions.
1782 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1783 font if not yet opened.
1784 (device_open): Don't set frame->font.
1786 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1788 (gd_font_open): New function.
1789 (gd_render): Don't use the local variable ft_info.
1790 (device_init): Adjusted for the change of gd_font_driver.
1792 * textprop.c (mtext__prop_init): Initialize text_property_table.
1793 Call M17N_OBJECT_ADD_ARRAY.
1794 (mtext__prop_fini): Don't call mdebug__report_object.
1796 * plist.c (mplist__init): Initialize plist_table.
1797 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1798 (mplist__fini): Don't call mdebug__report_object.
1800 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1801 (mtext__fini): Don't call mdebug__report_object.
1802 (MTEXT_FORMAT_UTF_16): Correct type.
1803 (mtext_data): New function.
1804 (mtext_text): Fix calculation of limit and args to
1807 * language.c: Include "plist.h".
1808 (M_script_lang_list): New variable.
1809 (mlang__init): Read languages and their information from m17n
1811 (mlanguage__list): New function.
1812 (Miso639_1, Miso639_2): New variables.
1814 * language.h (mlanguage__list): Extern it.
1816 * database.c (get_database_stream): Use SAFE_* macros for
1817 allocating and freeing path.
1818 (mdatabase__init): Likewise.
1820 * symbol.c (msymbol__fini): Don't free symbols here.
1821 (msymbol__free_table): New function.
1822 (msymbol_is_managing_key): New function.
1824 * symbol.h (msymbol__free_table): Extern it.
1825 (msymbol__list): Extern it.
1827 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1829 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1830 (struct _M17NObjectArray): New member name and next.
1831 (mdebug__add_object_array): Extern it.
1832 (M17N_OBJECT_ADD_ARRAY): New macro.
1833 (mdebug__report_object): Don't extern it.
1835 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1837 * m17n-gui.c (free_frame): Don't free frame->font.
1838 (null_device_fini): Fix code for freeing
1839 null_device.realized_font_list.
1840 (m17n_fini_win): Free interface.
1841 (mframe): Cast the return value of dlsym. Set frame->font here.
1842 (mframe_get_prop): Check frame->rface->rfont before accessing the
1845 * m17n-gui.h (Mfontfile): Extern it.
1846 (mfont_check): Extern it.
1847 (mface_equal): Extern it.
1849 * m17n-core.c: Include "symbol.h".
1850 (report_header_printed): This variable deleted.
1851 (object_array_root): New variable.
1852 (report_object_array): New function.
1853 (mdebug__report_object): This function deleted.
1854 (mdebug__add_object_array): New function.
1855 (m17n_init_core): Call mchartable_init () before mtext_init ().
1856 (m17n_fini_core): Call report_object_array (if necessary) and
1857 msymbol__free_atable at the end.
1859 * m17n-core.h (msymbol_is_managing_key): Extern it.
1860 (mtext_data): Extern it.
1861 (MTEXT_FORMAT_UTF_16): Correct type.
1862 (M17NLIB_MINOR_VERSION): Changed to 3.
1863 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1865 * chartab.c (mchartable__init): Initalize chartable_table.count.
1866 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1867 mdebug__report_object.
1869 2005-05-26 Kenichi Handa <handa@m17n.org>
1871 * m17n.h (Miso639_1, Miso639_2): Extern them.
1873 * symbol.h (msymbol__list): Extern it.
1875 * symbol.c (msymbol__list): New function.
1877 2005-05-19 Kenichi Handa <handa@m17n.org>
1879 * input-gui.c (minput__win_init): Don't change the value of
1882 2005-05-16 Kenichi Handa <handa@m17n.org>
1884 * m17n-core.c (m17n_object): Be sure to initialize all members.
1886 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1888 2005-05-09 Kenichi Handa <handa@m17n.org>
1890 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1892 2005-04-27 Kenichi Handa <handa@m17n.org>
1894 * language.c (mlang__init): Add "an" (Aragonese).
1896 * word-thai.c: Add support for libthai.
1897 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1898 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1900 * mtext.c: Include "word-thai.h" conditionaly.
1901 (mtext__init): Call mtext__word_thai_init conditionaly.
1902 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1904 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1905 not WORDCUT_LD_FLAGS.
1907 2005-04-19 Kenichi Handa <handa@m17n.org>
1909 * word-thai.c (wordseg_propertize): Always unref the attached
1911 (thai_wordseg): Don't unref the property.
1913 2005-04-18 Kenichi Handa <handa@m17n.org>
1915 * word-thai.c: Include stdlib.h.
1916 (wordseg_propertize): Add dummy function for the case that wordcut
1917 library doesn't exist.
1918 (wordseg_propertize): Fix for old wordcut library.
1920 2005-04-16 Kenichi Handa <handa@m17n.org>
1922 * word-thai.c: Include <stdio.h>.
1924 2005-04-15 Kenichi Handa <handa@m17n.org>
1926 * draw.c: Include mtext.h.
1927 (linebreak_table, M_break_at_space, M_break_at_word)
1928 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1929 (compose_glyph_string): Check POS before getting Mface text
1931 (truncate_gstring): Give correct TO arg to line_break function.
1932 (GET_LB_TYPE): New macro.
1933 (find_break_backward, find_break_forward): New functions.
1934 (mdraw__init): Initialize the above new variables.
1935 (mdraw__fini): Free linebreak_table.
1936 (mdraw_default_line_break): Use find_break_backward and
1939 * word-thai.c: New file.
1941 * word-thai.h: New file.
1943 * mtext.c: Include word-thai.h.
1944 (wordseg_func_table): New variable.
1945 (mtext__init): Initialize wordseg_func_table and call
1946 mtext__word_thai_init.
1947 (mtext__fini): Call mtext__word_thai_fini, free
1949 (MTextWordsegFunc): New type.
1950 (mtext__word_segment): New function.
1952 * mtext.h (wordseg_func_table): Extern it.
1953 (mtext__word_segment): Extern it.
1955 * m17n.c (m17n_init): Fix typo (== -> =).
1957 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1958 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1960 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1961 (MTEXTPROP_VAL): New macros.
1963 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1965 2005-04-07 Kenichi Handa <handa@m17n.org>
1967 * database.c (load_chartable): Fix pursing of symbol name.
1969 2005-03-24 Kenichi Handa <handa@m17n.org>
1971 * m17n.c (m17n_init): Fix typo (== -> =).
1973 2005-03-11 Kenichi Handa <handa@m17n.org>
1975 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1977 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1979 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1982 2005-03-09 handa <handa@m17n.org>
1984 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1985 calling m17n_init ().
1987 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1988 calling m17n_init_core ().
1990 2005-02-28 Kenichi Handa <handa@m17n.org>
1992 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1995 2005-02-17 Kenichi Handa <handa@m17n.org>
1997 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1998 (M_description, M_command, M_variable): New variables.
1999 (load_im_info_keys): New variables.
2000 (load_im_info, check_command_keyseq, get_description_advance)
2001 (parse_command_list, get_command_list, parse_variable_list)
2002 (get_variable_list, input_method_hook): New functions.
2003 (command_list, variable_list): New variables.
2004 (minput__init): Put input_method_hook to Minput_method.
2005 Initialize M_description, M_command, M_variable, Mdetail_text,
2006 load_im_info_keys, command_list, variable_list.
2007 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2008 (Mdetail_text): New variable.
2009 (minput_get_description, minput_get_commands)
2010 (minput_assign_command_keys, minput_get_variables)
2011 (minput_set_variable): New functions.
2013 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2014 (minput_assign_command_keys, minput_get_variables)
2015 (minput_set_variable): Extern them.
2017 * plist.c (UNGETC): Just decrement st->p.
2018 (read_mtext_element): New arg skip.
2019 (read_integer_element): Likewise.
2020 (read_symbol_element): Likewise.
2021 (read_element): New arg KEYS.
2022 (mplist__from_plist): Don't increment ref-count of NULL object.
2023 (mplist__from_file): New arg KEYS.
2024 (mplist_put): Don't increment ref-count of NULL object.
2025 (mplist_add): Likewise.
2026 (mplist_push): Likewise.
2027 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2029 * plist.h (mplist__from_file): Prototype adjusted.
2031 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2032 (get_database_stream): New function.
2033 (load_database): Use get_database_stream.
2034 (M_database_hook): New variable
2035 (mdatabase__init): Initialize M_database_hook.
2036 (mdatabase__load_for_keys): New function.
2037 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2039 (mdatabase_define): Free mdb->extra_info if necessary.
2041 * database.h (mdatabase__dir_list, M_database_hook)
2042 (mdatabase__load_for_keys): Extern them.
2043 (MDatabaseHookFunc): New type.
2045 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2047 2004-12-27 Kenichi Handa <handa@m17n.org>
2049 * Version 1.2.0 released.
2051 2004-12-27 Kenichi Handa <handa@m17n.org>
2053 * input.c (minput_filter): Don't reset ic->xxx_changed.
2055 * mtext.c (mtext_from_data): Fix documentation.
2057 2004-12-25 Kenichi Handa <handa@m17n.org>
2059 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2060 (M17NLIB_VERSION_NAME): Update to "1.2.".
2062 2004-12-24 Kenichi Handa <handa@m17n.org>
2064 * input.c (reset_ic): Set key_unhandled to 0.
2066 2004-12-21 Kenichi Handa <handa@m17n.org>
2068 * m17n-gui.h (mfont_from_spec): Delete extern.
2070 * input-gui.c (win_callback): Handle Minput_reset.
2071 (minput__win_init): Register reset_ic as a callback for
2074 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2075 changed. At first, shift to the initial state.
2076 (minput__init): Initialize Minput_reset. Register reset_ic as a
2077 callback for Minput_reset.
2078 (Minput_reset): New variable.
2079 (minput_filter): Always set ic->xxx_changed to 0.
2080 (minput_reset_ic): New function.
2081 (integer_value): Fix typo ('>' -> '<') and calculation of length
2084 * m17n-core.c (merror_code): Change type to `int'.
2086 * m17n-misc.h (merror_code): Adjust type.
2088 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2090 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2091 (mtext_change_prop): Delete extern.
2093 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2094 to `int'. Move the documents to m17n-core.h.
2096 2004-12-13 Kenichi Handa <handa@m17n.org>
2098 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2099 (MTextProperty): Document it.
2101 2004-12-09 Kenichi Handa <handa@m17n.org>
2103 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2105 2004-12-03 Kenichi Handa <handa@m17n.org>
2107 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2108 m17n__gui_initialized): New externs.
2110 * m17n-core.h (enum M17NStatus): New enum.
2111 (m17n_status): Extern it.
2113 * m17n-core.c (core_initialized): Delete this variable.
2114 (m17n__core_initialized, m17n__shell_initialized,
2115 m17n__gui_initialized): New variables.
2116 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2117 instead of core_initialized.
2118 (m17n_status): New function.
2120 * m17n.c (shell_initialized): Delete this variable.
2121 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2124 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2126 * m17n-gui.c (win_initialized): Delete this variable.
2127 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2128 instead of gui_initialized.
2130 2004-11-19 Kenichi Handa <handa@m17n.org>
2132 * input.c (reset_ic): Check if ic_info->state is NULL.
2133 (filter): If ic_info->state is NULL, return 0.
2134 (load_input_method): Don't unref `maps' it it's not created.
2136 2004-11-15 Kenichi Handa <handa@m17n.org>
2138 * input.c (find_candidates_group): If INDEX is -1, find the last
2140 (take_action_list): If the previous of the first candidate is
2141 requested, select the last candidate.
2143 2004-11-08 Kenichi Handa <handa@m17n.org>
2145 * m17n-X.c (device_open): Try at most 32 fonts to find a
2146 non-autoscaled font.
2148 * font.c (xlfd_parse_name): Fix previous change.
2150 2004-11-05 Kenichi Handa <handa@m17n.org>
2152 * font.c: (commont_style): Include dummy elements "slanted" and
2153 "rslanted" to prefer "o" to "r" if "i" is requested.
2155 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2157 2004-10-29 Kenichi Handa <handa@m17n.org>
2159 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2161 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2162 New members smallest and larger.
2163 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2164 (xfont_registry_list): Likewise.
2165 (xfont_select): Likewise.
2168 2004-10-28 Kenichi Handa <handa@m17n.org>
2170 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2171 font name comparison.
2172 (xfont_select): Fix logic for selecting a larger size font.
2174 2004-10-25 Kenichi Handa <handa@m17n.org>
2176 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2179 2004-10-22 Kenichi Handa <handa@m17n.org>
2181 * input.c (update_candidate): Renamed from udpate_candidate.
2182 (take_action_list): Show more debugging info on arithmetic commands.
2184 * m17n-X.c (device_open): Fix previous change.
2186 * draw.c (compose_glyph_string): Don't get face property at the
2189 2004-10-21 Kenichi Handa <handa@m17n.org>
2191 * draw.c (compose_glyph_string): Fix for the case of category
2194 2004-10-19 Kenichi Handa <handa@m17n.org>
2196 * input.c (mdebug_mask): New variable.
2197 (shift_state): Print debug information.
2198 (take_action_list): Likewise.
2199 (handle_key): Likewise.
2201 2004-10-14 Kenichi Handa <handa@m17n.org>
2203 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2205 2004-10-13 Kenichi Handa <handa@m17n.org>
2207 * m17n-X.c (device_open): Be sure to register at least one font
2210 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2211 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2213 2004-10-12 Kenichi Handa <handa@m17n.org>
2215 * draw.c (alloc_gstring): Fix previous change.
2217 * font-ft.c (ft_list_generic): Fix for the case of not
2220 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2222 * font.c (mfont_list): If no font is found, return NULL.
2223 (load_font_encoding_table): Put entries of nil registry first.
2224 (find_encoding): Adjust for the above change.
2226 2004-10-11 Kenichi Handa <handa@m17n.org>
2228 * m17n-gui.h (mfont_list): Adjust prototype.
2230 * m17n-X.c (xfont_list): New arg maxnum.
2232 * font.h (struct MFontDriver): Change prototype of <list>.
2234 * font-ft.c (fc_generic_family_list): Delete it.
2235 (Mserif, Msans_serif, Mmonospace): Delete them.
2236 (M_generic_family_info): New variable.
2237 (enum GenericFamilyType): New enum.
2238 (struct GenericFamilyInfo): New struct.
2239 (generic_family_table): New variable.
2240 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2242 (add_font_info): Get style here.
2243 (ft_list_family): Don't initialize fc_config here. Don't list
2245 (ft_list_generic): New function.
2246 (ft_select): Pay attention to generic familes here.
2247 (ft_open): Fix calculation of ascent and descent.
2248 (ft_list): Pay attention to generic families.
2249 (mfont__ft_init): Initialize M_generic_family_info,
2250 generic_family_table, and fc_config..
2251 (mfont__ft_fini): Finalize generic_family_table.
2253 * draw.c (compose_glyph_string): Use more constant font for
2254 glyphs. Adjust for the member change in MGlyph.
2255 (layout_glyph_string): Adjust for the member change in MGlyph.
2256 (alloc_gstring): Intilize scracth_glyph to avoid
2257 compose_glyph_string on it.
2258 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2259 (mdraw_coordinates_position): Fix previous change.
2261 * internal-gui.h (glyph_category): New enum.
2262 (MGlyph): Change type of <category> to enum glyph_category.
2264 * face.c (mface__realize): Delete args langauge and charset.
2265 (mface__for_chars): Fix for the case that glyphs have different
2267 (mface__update_frame_face): Adjust for mface__realize change.
2269 * face.h (mface__realize): Adjust prototype.
2271 2004-10-05 Kenichi Handa <handa@m17n.org>
2273 * language.c (mlang__init): Add Akan.
2275 2004-10-04 Kenichi Handa <handa@m17n.org>
2277 * font-ft.c (add_font_info): Add instead of push the element.
2278 (ft_list_family): For generic fonts, try all
2279 substituted. families.
2281 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2282 (run_rule): Don't update cluster range here.
2283 (run_command): Update cluster range on appending a glyph.
2284 (run_otf): Update cluster range for glyphs generated by OTF.
2286 2004-10-02 Kenichi Handa <handa@m17n.org>
2288 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2290 2004-09-30 Kenichi Handa <handa@m17n.org>
2292 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2294 2004-09-30 Kenichi Handa <handa@m17n.org>
2296 * font.h: Include <fontconfig/fontconfig.h>.
2297 (MFTInfo): New member langset.
2298 (mfont__encoding_list): Extern it.
2300 * font.c (mfont__encoding_list): New function.
2301 (mdebug_dump_font_list): New function.
2303 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2304 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2306 (ft_family_list): New variable.
2307 (set_font_info): New arg basep. Callers changed.
2308 (fc_list): Check the return value of FcPatternGetString.
2309 (add_font_info): New arg plist. Callers changed. Update
2311 (ft_list_family): New function (merged fc_list and ft_list_all).
2312 (ft_select): Use ft_list_family.
2313 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2315 (mfont__ft_init): Initialize above new variables.
2316 (mfont__ft_fini): Free ft_family_list.
2317 (STRDUP_LOWER): New macro.
2318 (set_font_info): Use STRDUP_LOWER.
2319 (ft_list_family): Avoid duplicate addition of font path. Use
2321 (fc_decode_prop): Fix typo.
2323 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2324 (xfont_registry_list): Change argument disp_info to frame.
2326 (xfont_list_all): New function.
2327 (xfont_list): If FONT is not NULL, check all fonts.
2329 2004-09-28 Kenichi Handa <handa@m17n.org>
2331 * m17n-X.c (MXFont, MXFontList): New types.
2332 (MDisplayInfo): Delete members font_registry_list,
2333 iso8859_1_family_list, iso10646_1_family_list, new members
2334 font_list, base_font_list.
2335 (free_display_info): Adusted for the change of MDisplayInfo.
2336 (xfont_driver): Initialize with xfont_list.
2337 (font_compare): New function.
2338 (build_font_list): Deleted.
2339 (xfont_registry_list): New function.
2340 (xfont_select): Use xfont_registry_list.
2341 (xfont_list): New function.
2342 (device_open): Adusted for the change of MDisplayInfo.
2344 * font-ft.c (add_font_info): New arg languages. Callers changed.
2345 (fc_list): Get languages from fonts..
2346 (ft_list_all): Renamed from ft_list. Callers changed.
2347 (ft_list): New function.
2348 (mfont__ft_driver): Initalize with ft_list.
2350 * font.c (mfont_list): New function.
2352 * font.h (struct MFontDriver): New member `list'.
2353 (MFTInfo): New member languages.
2355 * m17n-gui.h (mfont_list): Extern it.
2357 2004-09-27 Kenichi Handa <handa@m17n.org>
2359 * internal-gui.h (struct MGlyphString): Delete members mt,
2360 sub_width, sub_lbrearing, sub_rbearing, and region.
2362 * draw.c (MSubTextExtents): New type.
2363 (layout_glyphs): New arg extents. Set its members.
2364 (layout_glyph_string): Adjusted for the above change.
2365 (alloc_gstring): Don't set gstring->mt.
2366 (truncate_gstring): Call line_break function with mt instead of
2369 2004-09-22 Kenichi Handa <handa@m17n.org>
2371 * mtext.c (count_utf_16_chars): Count each code of invalid
2374 2004-09-19 Kenichi Handa <handa@m17n.org>
2376 * mtext.c (default_utf_16, default_utf_32): Rename them to
2377 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2380 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2383 2004-09-13 Kenichi Handa <handa@m17n.org>
2385 * draw.c (Mlatin): Don't declare it here.
2386 (visual_order): Fix reordering of combining characters.
2387 (compose_glyph_string): Fix detection of script.
2388 (layout_glyphs): Don't fix reordering of combining characters
2390 (layout_glyph_string): Pay attention to
2391 control->disable_overlapping_adjustment.
2392 (truncate_gstring): Include at least on character in a line.
2393 (get_gstring): Always scan one full line.
2394 (mdraw__init): Don't initialize Mlatin here.
2395 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2396 have a font, use ascent/descent of an ASCII font. Allow
2397 ink_array_return and logical_array_return to be NULL.
2398 (mdraw_coordinates_position): Fix iteration.
2400 * font-ft.c (MFTtoProp): Member completely changed.
2401 (ft_to_prop): Adjusted for the above change.
2402 (ft_to_prop_size): Likewise.
2403 (set_font_info): Adjusted for the change of MFTtoProp.
2404 (fc_generic_family_list): New variable.
2405 (fc_list): Add special handling of generic font names.
2406 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2407 Initialize fc_generic_family_list.
2408 (mfont__ft_fini): Don't free ft_to_prop. Free
2409 fc_generic_family_list.
2410 (FC_vs_M17N_font_prop): New type.
2411 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2412 (fc_decode_prop, fc_encode_prop): New functions.
2413 (mfont__ft_parse_name): Use fc_decode_prop.
2414 (mfont__ft_unparse_name): Use fc_encode_prop.
2416 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2417 (MWDevice): Add member realized_font_list.
2418 (free_display_info): Don't free disp_info->realized_font_list.
2419 (free_device): Free device->realized_fontset_list.
2420 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2421 (device_open): Don't initialize disp_info->realized_font_list.
2422 (device_open): Initialize device->realized_font_list and set it to
2423 frame->realized_font_list.
2425 * fontset.c (try_font_group): New function.
2426 (mfont__lookup_fontset): Use try_font_group.
2428 * font.c (common_weight): Change the order of "regular".
2430 * face.c (Mlatin): Don't make it static.
2431 (mface__realize): Be sure to set work_gstring.frame.
2432 (mface__for_chars): Likewise.
2434 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2437 * internal-gui.h (Mlatin): Extern it.
2439 * m17n-gui.h (MDrawControl): New member
2440 disable_overlapping_adjustment.
2442 2004-09-06 Kenichi Handa <handa@m17n.org>
2444 * font-flt.c (run_otf): Fix typo ('}'->']').
2446 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2447 (COMBINING_PRECOMPUTED_P): New macros.
2449 * draw.c (layout_glyphs): Handle precomputed combining code.
2451 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2452 precomupted combining code.
2454 2004-09-03 Kenichi Handa <handa@m17n.org>
2456 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2459 2004-08-27 Kenichi Handa <handa@m17n.org>
2461 * face.c (mface_put_prop): If the new value is the same as the
2462 current one, don't increment frame->tick.
2464 2004-08-25 Kenichi Handa <handa@m17n.org>
2466 * fontset.c (mfontset): Initialize font_spec_list member.
2467 (mfontset_copy): Load fontset if necessary.
2469 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2470 'metrics' to for C++.
2472 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2475 2004-08-16 Kenichi Handa <handa@m17n.org>
2477 * Version 1.1.0 released.
2479 2004-08-13 Kenichi Handa <handa@m17n.org>
2481 * language.c (mlang__init): Add Dhivehi.
2483 * m17n-gui.c (Mx, Mfreetype): Delete it.
2484 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2486 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2487 (mfont_resize_ratio): Extern it.
2488 (MDrawGlyphInfo): New member logical_width;
2489 (MDrawGlyph): New type.
2490 (mdraw_glyph_list): Prototype adjusted.
2492 * m17n-X.c (xfont_open): Set type and fontp members.
2493 (xft_open): Likewise.
2495 * internal-gui.h (Mx, Mfreetype): Delete extern.
2497 * font.h (struct MRealizedFont): New member type and fontp.
2499 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2500 (Mx, Mfreetype): Declare here.
2501 (Mxft): New variable.
2502 (mfont_resize_ratio): New function.
2504 * font-ft.c (ft_open): Set type and fontp members.
2506 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2509 2004-08-11 Kenichi Handa <handa@m17n.org>
2511 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2514 2004-08-06 Kenichi Handa <handa@m17n.org>
2516 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2519 * font-flt.c (run_otf): Print debugging information if necessary.
2521 2004-08-05 Kenichi Handa <handa@m17n.org>
2523 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2524 positioning_type 5 and 6. Switch simplified.
2526 2004-08-04 Kenichi Handa <handa@m17n.org>
2528 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2530 2004-08-02 Kenichi Handa <handa@m17n.org>
2532 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2533 set val to 1 even if it is greater than 1.
2535 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2537 2004-07-29 Kenichi Handa <handa@m17n.org>
2539 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2540 debugging information.
2542 * internal.h (MDEBUG_PRINT5): New macro.
2544 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2545 the previous one if the zero width glyph has left or right
2548 2004-07-26 Kenichi Handa <handa@m17n.org>
2550 * m17n-X.c (xft_render): Pay attention to members left_padding and
2551 right_padding of MGlyph.
2553 * draw.c (visual_order): Allocate one more elements for arrays as
2554 a workaround of fribidi bug.
2555 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2556 instead of MGlyph->bidi_sensitive.
2557 (layout_glyph_string): Pay attentinon to
2558 control->orientation_reversed when padding at the head or tail.
2559 Fix adjustment of space glyph width.
2560 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2563 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2564 instead of MGlyph->bidi_sensitive.
2566 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2568 2004-07-26 Kenichi Handa <handa@m17n.org>
2570 * draw.c (visual_order): Don't treat combined glyphs specially.
2571 (layout_glyphs): Don't get metrics glyphs that are already ready.
2572 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2573 width with the previous one.
2574 (draw_background): Fix bar cursor position on a r2l glyph.
2576 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2577 (run_rule): Fix place of updating cluster_begin_pos and
2578 cluster_end_pos here.
2579 (run_otf): Don't set left_padding.
2581 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2583 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2584 Fix handling of GPOS.
2585 (mfont__ft_drive_gpos): Delete this function.
2587 * font.h (mfont__ft_drive_otf): Renamed back from
2588 mfont__ft_drive_gsub.
2589 (mfont__ft_drive_gpos): Delete extern.
2591 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2592 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2594 2004-07-23 Kenichi Handa <handa@m17n.org>
2596 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2597 the same bidi level.
2599 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2601 2004-07-22 Kenichi Handa <handa@m17n.org>
2603 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2605 2004-07-20 Kenichi Handa <handa@m17n.org>
2607 * draw.c (render_glyphs): Fix checking of g->code validity.
2609 * face.c (mface__realize): Set g.type.
2611 2004-07-18 Kenichi Handa <handa@m17n.org>
2613 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2616 * m17n-gui.c (mframe): Print error message give by dlopen to
2619 2004-07-16 Kenichi Handa <handa@m17n.org>
2621 * draw.c (compose_glyph_string): Improve the way of deciding a
2622 script. For a character that doesn't have script property, use
2623 the last non-latin script.
2625 * font-ft.c (fc_list): Cancel previous change.
2626 (mfont__ft_init): Add more entries in ft_to_prop_name.
2628 2004-07-15 Kenichi Handa <handa@m17n.org>
2630 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2631 previous or next character glyphs.
2633 2004-07-14 Kenichi Handa <handa@m17n.org>
2635 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2636 of type GLYPH_SPACE.
2638 * fontset.c (mfont__lookup_fontset): If glyph type is
2639 GLYPH_SPACE, get codes for SPACE.
2641 * internal-gui.h (Mfont): Delete extern.
2643 * m17n-gui.h (Mfont): Delete duplicated extern.
2645 2004-07-13 Kenichi Handa <handa@m17n.org>
2647 * font-ft.c (DEVICE_DELTA): New macro.
2648 (adjust_anchor): New function.
2649 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2651 (mfont__ft_drive_gpos): New function.
2653 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2654 (FontLayoutContext): Delete member `rfont'.
2655 (run_otf): Set g->otf_cmd. Call
2656 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2657 only whne HAVE_OTF is defined.
2659 * fontset.c: Include "config.h".
2661 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2662 (MGlyph): New member otf_cmd.
2664 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2665 (mfont__ft_drive_gpos): Extern it.
2667 * face.c: Include "config.h".
2669 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2671 * input-gui.c: Include "config.h".
2673 * plist.c: Include "config.h".
2675 2004-07-06 Kenichi Handa <handa@m17n.org>
2677 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2678 internal-gui.h: Cancel previous changes.
2680 * m17n-gd.h: Delete it.
2682 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2683 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2684 @XML2_LD_FLAGS@ to above.
2685 (libm17n_la_LIBADD): Add -ldl.
2686 (libm17n_la_LDFLAGS): Add -export-dynamic.
2687 (X_LD_FLAGS): Fix the order of linking.
2688 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2689 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2690 (libm17n_X_la_LDFLAGS): Add -module.
2691 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2692 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2693 (libm17n_gd_la_LDFLAGS): Add -module.
2694 (include_HEADERS): Delete m17n-gd.h.
2696 2004-06-30 Kenichi Handa <handa@m17n.org>
2698 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2699 (MDeviceLibraryInterface): Delete it.
2700 (register_device_library): Delete it.
2701 (m17n__device_library_list): Renamed from device_library_list.
2703 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2704 (m17n_init_win): Adjust prototype.
2706 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2707 (m17n_init_gd): New function.
2709 * m17n-gd.h: New file.
2711 * m17n-X.h: Include <m17n-gui.h>.
2712 (m17n_init_X): Extern it.
2713 (M17N_INIT): Redefine it.
2715 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2716 (m17n_init_X): New function.
2718 * internal-gui.h (m17n__device_library_list): Extern it.
2719 (struct MDeviceDriver): New members initialized, init, and fini.
2721 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2723 (libm17n_X_la_LIBADD): Delete aboves.
2724 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2725 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2726 (libm17n_gd_la_LDFLAGS): Delete it.
2727 (include_HEADERS): Add m17n-gd.h.
2729 2004-06-25 Kenichi Handa <handa@m17n.org>
2731 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2732 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2734 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2736 * font-ft.c (fc_list): If FcFontList finds no font, try
2739 * draw.c (compose_glyph_string): Terminate the last loop after
2740 doing default combining if necessary.
2742 2004-06-24 Kenichi Handa <handa@m17n.org>
2744 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2746 * character.c (mchar_define_property): Add const to an arg.
2748 * charset.c (mchar_define_charset): Add const to an arg.
2750 * coding.c (MCodingSystem): Add const to an arg or decoder.
2751 (finish_decoding): Add const to an arg.
2752 (decode_coding_charset, decode_coding_utf_8)
2753 (decode_coding_utf_16, decode_coding_utf_32)
2754 (decode_coding_iso_2022, decode_coding_sjis)
2755 (mconv_define_coding): Likewise.
2757 * m17n-X.c (xft_find_metric): Delete unused variable.
2759 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2762 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2765 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2766 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2768 * mtext.h (mtext__from_data): Ajust prototype.
2770 2004-06-23 Kenichi Handa <handa@m17n.org>
2772 * draw.c (compose_glyph_string): Always get glyph codes by
2774 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2775 (mdraw_glyph_list): New function.
2777 * font-flt.c (mfont__flt_run): Be sure to call
2778 rfont->driver->encode_char.
2780 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2781 (ft_encode_char): Delete arg C.
2782 (ft_render): Don't call FT_Get_Char_Index.
2784 * font.c (mfont__encodable_p): Delete it.
2785 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2787 * font.h (struct MFontDriver): Delete arg C of encode_char.
2788 (mfont__encodable_p): Delete extern.
2790 * m17n-X.c (xfont_encode_char): Delete arg C.
2791 (xft_find_metric): Don't cal FT_Get_Char_Index.
2792 (xft_render): Likewise.
2794 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2796 (mdraw_glyph_list): Extern it.
2798 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2800 2004-06-22 Kenichi Handa <handa@m17n.org>
2802 * m17n-gui.h (mfontset_lookup): Extern it.
2804 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2806 * fontset.c (realize_fontset_elements)
2807 (free_realized_fontset_elements, update_fontset_elements): New
2809 (mfont__realize_fontset): Call realize_fontset_elements.
2810 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2811 (mfont__lookup_fontset): If a fontset was modified, update
2812 the realized fontset.
2813 (mfontset_modify_entry): Increment fontset->tick.
2814 (mfontset_lookup): New function.
2816 2004-06-21 Kenichi Handa <handa@m17n.org>
2818 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2820 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2821 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2822 length of source text 0.
2824 2004-06-21 Kenichi Handa <handa@m17n.org>
2826 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2827 (compare): Pay attention to format other than utf-8.
2828 (copy): Delete this function.
2829 (count_by_utf_8, count_by_utf_16, insert): New functions.
2830 (count_utf_16_chars): Fix handling of a surrogate pair.
2831 (find_char_forward, find_char_backward): Likewise.
2832 (mtext__from_data): Delete unnecessary check. Fix number of
2834 (mtext_from_data): Don't count items.
2835 (mtext_ref_char): Optimize the code.
2836 (mtext_set_char): Pay attention to format other than utf-8.
2837 (mtext_cat_char): Likewise.
2838 (mtext_dup): Don't call copy, instead do allocation here.
2839 (mtext_cat): Call insert instead of copy.
2840 (mtext_ncat): Likewise.
2841 (mtext_cpy): Delete character at first and call insert instead of
2843 (mtext_ncpy): Likewise.
2844 (mtext_copy): Likewise.
2845 (mtext_duplicate): Call insert instead of copy.
2846 (mtext_del): Pay attention to format other than utf-8.
2847 (mtext_ins): Simply call insert.
2848 (mtext_ins_char): Pay attention to format other than utf-8.
2849 (mtext_tok): Call insert instead of copy.
2850 (mtext_text): Call UNIT_BYTES.
2852 * textprop.c (mtext__adjust_plist_for_change): New function.
2854 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2855 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2856 (CHAR_UNITS_AT): Fix typo.
2857 (CHAR_UNITS_BY_HEAD): Fix typo.
2858 (STRING_CHAR_AND_UNITS): Fix typo.
2860 * internal.h (MTEXT_READ_ONLY_P): New macro.
2862 * mtext.h (mtext__replace): Delete the extern.
2863 (mtext__adjust_foramt): Adjust prototype.
2865 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2866 if possible. Otherwise make a copy of mmt.
2868 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2871 2004-06-18 Kenichi Handa <handa@m17n.org>
2873 * character.h (CHAR_STRING_UTF16): Fix syntax.
2875 2004-06-16 Kenichi Handa <handa@m17n.org>
2877 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2878 (libm17n_X_la_LIBADD): Delete it.
2879 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2881 * m17n-X.c (device_open): Add parens in `if' condition.
2883 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2884 (DEC_POSITION): Likewise.
2885 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2887 2004-06-15 Kenichi Handa <handa@m17n.org>
2889 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2892 * draw.c (compose_glyph_string): If langauge is specified, call
2893 mface__for_chars even if a text is all latin. Fix condition for
2894 setting non_ascii_found.
2896 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2898 * m17n.h (minput_char_to_key): Delete extern.
2900 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2902 * m17n-gui.c (null_device_open): Set several members of frame.
2904 2004-06-14 Kenichi Handa <handa@m17n.org>
2906 * m17n-gui.h (minput_event_to_key): Delete extern.
2908 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2910 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2912 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2914 2004-06-08 Kenichi Handa <handa@m17n.org>
2916 * character.c (mchar_put_prop): Don't increment the ref-count of
2919 2004-06-04 Kenichi Handa <handa@m17n.org>
2921 * m17n-core.c (mdebug__register_object): New function.
2922 (mdebug__unregister_object): Likewise.
2924 * internal.h (mdebug__register_object, mdebug__unregister_object):
2926 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2929 * charset.c (mcharset__load_from_database): Don't call
2930 mconv__register_charset_coding here.
2932 * coding.c (find_coding): Get a real name from an element of
2933 coding_definition_list.
2934 (mconv__register_charset_coding): Set the real name at the top of
2936 (mcoding__load_from_database): Likewise.
2937 (mconv_list_codings): Adjusted for the above change.
2939 2004-06-03 Kenichi Handa <handa@m17n.org>
2941 * coding.c (find_coding): Find by canonicalized name. Don't have
2942 to modify the element of coding_definition_list by
2944 (mconv__define_coding_from_charset): Delete it.
2945 (mconv__register_charset_coding): Canonicalize sym.
2946 (mcoding__load_from_database): Register plist modified by
2949 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2951 * font-ft.c (ft_open): Fix setting of rfont->descent.
2953 2004-06-02 Kenichi Handa <handa@m17n.org>
2955 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2956 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2957 (xlfd_unparse_name): Renamed from xfont_build_name.
2958 (mfont__init): Initialized Mfontconfig.
2959 (mfont__free_realized): Unconditionally unref rfont->info.
2960 (mfont__select): Free `this' if it's not best.
2961 (mfont__open): Don't check frame->realized_font_list.
2962 (mfont__parse_name_into_font): New function.
2963 (Mfontconfig): New variable.
2964 (mfont_from_name): Call mfont_parse_name.
2965 (mfont_name): Call mfont_unparse_name.
2966 (mdebug_dump_font): Likewise.
2968 * font.h (struct MFontDriver): Delete members parse_name and
2970 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2971 (mfont__parse_name_into_font): Extern it.
2973 * font-ft.c: Include "symbol.h".
2974 (close_ft): Unconditionally free filename and charmap_list of
2976 (ft_open): Duplicate base->filename. Increment ref-count of
2977 ft_info->charmap_list. Free ft_info->charmap_list and
2978 ft_info->filename on error.
2979 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2981 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2983 (enum xlfd_field_idx): Moved to font.c.
2984 (split_font_name, build_font_name): Likewise.
2985 (build_font_list): Call mfont__parse_name_info_font.
2986 (xfont_open): Call mfont__unparse_name. Free name.
2987 (xfont_parse_name, xfont_build_name): Moved to font.c
2988 (xft_select): Prototype deleted.
2989 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2990 Call mfont_pase_name.
2992 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2993 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2996 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2999 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3001 2004-06-01 Kenichi Handa <handa@m17n.org>
3003 * fontset.c (mfontset_modify_entry): Pay attention to the case
3004 that fontset->font_spec_list is NULL.
3006 2004-05-31 Kenichi Handa <handa@m17n.org>
3008 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3010 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3012 * font.c (mfont__select): Print score the a font for debugging.
3014 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3016 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3017 kanji_sym and kana_sym.
3019 2004-05-28 Kenichi Handa <handa@m17n.org>
3021 * Makefile.am (VINFO): New variable.
3022 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3023 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3025 2004-05-27 Kenichi Handa <handa@m17n.org>
3027 The following chanages are to make device dependent functions
3028 accessible only from MDeviceDriver structure, and to add GD and
3029 null device drivers. Font drivers get also device dependent.
3031 * m17n.c (m17n_init): Increament shell_initialized.
3032 (m17n_fini): Decremented shell_initialized.
3034 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3036 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3037 (Mwidget, Mcolormap, Mx): Extern them.
3039 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3040 (free_frame): Call frame->driver->close instead of
3042 (DLOPEN_SHLIB_EXT): New macro.
3043 (MDeviceLibraryInterface): New type.
3044 (device_library_list): New variable.
3045 (register_device_library): New function.
3046 (null_device): New variable.
3047 (null_device_close, null_device_get_prop)
3048 (null_device_realize_face, null_device_free_realized_face): New
3050 (null_driver): New variable.
3051 (null_device_init, null_device_fini, null_device_open): New
3053 (null_interface): New variable.
3054 (Mfreetype, Mdevice): Declare them.
3055 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3056 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3057 Mwin__Close_Device. Register drivers for Mx and Mgd.
3058 (m17n_fini_win): Decremented win_initialized. Call "fini"
3059 function of all opened devices. Don't call mwin__fini.
3060 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3062 (mframe): Handle Mdevice key of PLIST.
3063 (mframe_get_prop): Call frame->device->get_prop instead of
3064 mwin__device_get_prop.
3066 * m17n-gd.c: New file.
3068 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3069 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3071 * m17n-core.c (m17n_init_core): Increate core_initialized.
3072 (m17n_fini_core): Decremented core_initialized.
3074 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3075 (Mcolormap): Don't extern them here.
3077 * m17n-X.c (FRAME_DEVICE): New macro.
3078 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3079 (free_display_info): Use MPLIST_DO.
3080 (free_device): Free rface->info.
3081 (xft_close): Delete it.
3082 (device_init): Renamed from mwin__init.
3083 (device_fini): Renamed from mwin__fini.
3084 (device_open): Renamed from mwin__open_device.
3085 (x_driver): New variable.
3086 (MXFontInfo): Delete member frame, add member display.
3087 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3088 Don't declare them here.
3090 * internal-gui.h (MDeviceType): New enum.
3091 (MWDefice): Delete it.
3092 (struct MFrame): Change type of device to void *. New members
3093 device_type, driver, font_driver_list.
3094 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3095 (MDeviceDriver): New type.
3096 (Mx, Mgd, Mfreetype): Extern them.
3097 (mwin__XXX): Delete all of them.
3099 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3101 (win_destroy_ic): Likewise.
3102 (adjust_window_and_draw): Likewise.
3103 (win_callback): Likewise.
3104 (Mxim): Declare it here.
3105 (minput_event_to_key): Call M_CHECK_READABLE.
3107 * fontset.c (mfont__lookup_fontset): Delete local variable
3110 * font.h (struct MFontDriver): Delete member close, add members
3111 parse_name and build_name.
3112 (mfont__driver_list): Delete extern.
3113 (mfont__close): Delete extern.
3115 * font.c (mfont__init): Don't set mfont__driver_list.
3116 (mfont__fini): Don't unref mfont__driver_list.
3117 (mfont__select): Try font drivers in frame->font_driver_list. Set
3118 driver member of a realized font.
3119 (mfont__close): Delete it.
3120 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3121 functions of the default frame.
3123 * font-ft.c (close_ft): Check ft_info->ft_face and work
3125 (add_font_info): Allocate ft_info by M17N_OBJECT.
3126 (ft_close): Delete it.
3127 (mfont__ft_driver): Don't set ft_close.
3128 (ft_select): Increment ref-count of best_font.
3129 (ft_open): Decremented ref-count of base. On error, call
3130 FT_Done_Face and free ft_info.
3131 (ft_find_metric): Always use XXX_MONO in load_flags.
3132 (ft_render): Fix setting of width. Call
3133 frame->driver->draw_points instead of mwin__draw_points.
3134 (ft_to_prop): Don't set mfont__driver_list.
3135 (mfont__ft_fini): Just unref ft_info.
3137 * face.c (mface__init): Exchange foreground and background of
3138 mface__default. Call mface_put_prop to set hline of
3140 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3141 (mface__free_realized): Don't call mwin__free_realized_face.
3143 * draw.c (Mdepth): Don't declare it here.
3144 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3145 (render_glyphs, render_glyph_string): Likewise.
3146 (mdraw__init): Don't set Mdepth.
3147 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3149 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3151 (mdraw_text_items): Check FRAME is writable.
3152 (mdraw_per_char_extents): Implement body.
3154 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3156 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3157 (GUI_SOURCES): Delete it.
3158 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3159 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3160 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3161 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3162 (linkgui_LDADD): Set to libm17n-gui.la
3163 (linkgui_LDFLAGS): New target.
3164 (SRC): Include ${libm17n_gui_la_SOURCES} and
3165 ${libm17n_gd_la_SOURCES}.
3167 2004-05-24 Kenichi Handa <handa@m17n.org>
3169 * draw.c (draw_background): Don't draw background even if
3170 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3172 2004-05-22 Kenichi Handa <handa@m17n.org>
3174 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3176 2004-05-20 Kenichi Handa <handa@m17n.org>
3178 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3180 * m17n-gui.c: Include "plist.h".
3181 (mframe): If PLIST is NULL, initialize it to emply plist.
3183 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3184 (xft_driver): New variable.
3185 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3186 (xft_find_metric, xft_render): New function.
3187 (mwin__init): Adjusted for the new mfont__driver_list.
3188 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3189 generated face to PARAM.
3190 (mwin__realize_face): Fix setting of box colors. Don't call hook
3192 (mwin__draw_hline): New function.
3193 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3194 (mwin__xft_render): Delete these function.
3196 * internal-gui.h (struct MFrame): New member tick.
3197 (struct MGlyphString): New member tick.
3198 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3199 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3200 (mwin__xft_render): Delete extern.
3202 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3203 (mfontset): Always increment the reference count of returned
3206 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3207 (MFTInfo): Moved to font.h.
3208 (ft_iso8859_1_font_list): Delete this variable.
3209 (set_font_info): Don't set font->property[MFONT_TYPE].
3210 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3211 (add_font_info): Change type to void.
3212 (fc_list): Change anme from xft_list. Caller changed. Include
3213 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3214 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3215 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3216 (close_ft): Don't call mwin__xft_close. Unref
3217 ft_info->extra_info.
3218 (ft_open): Don't setup ft_info->fontname. Don't call
3220 (ft_find_metric): Don't call mwin__xft_get_metric.
3221 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3222 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3223 (mfont__ft_init): Adjusted for new mfont__driver_list.
3224 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3226 * font.c (mfont__driver_list): Make it MPlist.
3227 (mfont__init): Adjust initialization of mfont__driver_list.
3228 (mfont__fini): Free mfont__driver_list.
3229 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3230 (mfont__select): Adjusted for the new mfont__driver_list.
3232 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3233 (mfont__drirver_list): Adjust prototype.
3234 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3236 * face.h (struct MFace): Delete member realized_face_list, add
3238 (struct MRealizedFace): Delete member need_update
3239 andnofont_rface, add member non_ascii_list.
3240 (mface__update_frame_face): Extern it.
3242 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3244 (get_hline_create, get_box_create): New functions.
3245 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3247 (free_face): Cancep previous change. Free face->frame_list.
3248 (serialize_hline): Do nothing if hline->width is zero.
3249 (serialize_box): Do nothing if box->width is zero.
3250 (mface__init): Setup all properties of mface__default.
3251 (mface__fini): Free hline_prop_list and box_prop_list.
3252 (mface__realize): Cancel previous change. Update
3253 face->frame_list. Setup rface->non_ascii_list.
3254 (mface__for_chars): Update rface->non_ascii_list.
3255 (mface__free_realized): Free rface->non_ascii_list.
3256 (mface__update_frame_face): New function.
3257 (mface): Initialize face->frame_list.
3258 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3260 (mface_merge): Likewise.
3261 (mface_put_prop): If key is Mhline or Mbox, get value by
3262 get_hline_create or get_box_create respectively.
3263 (mface_put_prop): Update frame->tick and call
3264 mface__update_frame_face if necessary.
3265 (mface_update): Do nothing if func is noop_hook.
3267 * draw.c (render_glyphs): If a font is not found, use
3268 mwin__draw_empty_boxes.
3269 (alloc_gstring): Initialize gstring->tick.
3270 (get_gstring): Check gstring->tick.
3272 2004-05-17 Kenichi Handa <handa@m17n.org>
3274 * face.c (find_realized_face): Return value changed. If RFONT is
3275 NULL, avoid unnecessary checking.
3276 (free_face): Free face->realized_face_list.
3277 (mface__realize): Adjusted for the change of find_realized_face.
3278 If it returns a realized face that needs update, free it and
3279 realize a new one. Push a new realized face to
3280 frame->realized_face_list instead of appending.
3281 (mface__for_chars): Adjusted for the change of find_realized_face.
3282 Short cut if the required font is in rface->ascii_rface.
3283 (mface_put_prop): Free old value if necessary. Set need_update
3284 member of realized faces to 1.
3286 * face.h (struct MFace): Delete member tick, add member
3288 (struct MRealizedFace): Delete member tick, add member
3291 2004-05-13 Kenichi Handa <handa@m17n.org>
3293 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3295 2004-05-12 Kenichi Handa <handa@m17n.org>
3297 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3299 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3300 parse it XftNameParse.
3302 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3303 (all_fonts_scaned): New variable.
3304 (set_font_info): FAMILY may be Mnil.
3305 (add_font_info): Argument changed.
3306 (xft_list): Call add_font_info in it.
3307 (ft_list): Likewise.
3308 (ft_select): Make it work in the case family is Mnil.
3309 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3310 (mfont__ft_fini): Set all_fonts_scaned to 0.
3312 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3313 that is failed to open.
3315 2004-05-10 Kenichi Handa <handa@m17n.org>
3317 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3318 device's depth is 1 (i.e. monochrome).
3320 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3321 to work around the problem of libtool.
3323 * font-ft.c: Include <freetype/ftbdf.h>.
3324 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3326 (mfont__ft_init): Initialize them.
3327 (ft_iso8859_1_font_list): New variable.
3328 (set_font_info): Detect a font containing iso8859-1 glyphs and
3329 register it in ft_iso8859_1_font_list. If the font is not
3330 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3331 properties of the font from its properties.
3332 (add_font_list): If the font is not scalable, check if it is BDF
3333 or PCF font. If not, ignore it.
3334 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3335 registry is not iso8859-1.
3336 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3337 ft_iso8859_1_font_list.
3338 (ft_find_metric): If the font is not scalable, assume it as BDF
3339 or PCF, and get a metric from its properties.
3340 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3342 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3344 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3345 (libm17n_la_LDFLAGS): Delete it.
3346 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3347 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3349 2004-05-06 Kenichi Handa <handa@m17n.org>
3351 * draw.c (compose_glyph_string): Fix previous change.
3353 2004-04-30 Kenichi Handa <handa@m17n.org>
3355 * font-ft.c (ft_list): Delete unused variable `result'.
3356 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3358 2004-04-27 Kenichi Handa <handa@m17n.org>
3360 * m17n-X.c: Include config.h
3361 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3362 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3363 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3364 (FRAME_CMAP, FRAME_VISUAL): New macros.
3365 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3366 (xfont_driver): Make it static.
3367 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3368 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3369 info->xft_color_back.
3370 (MXftFontInfo) [HAVE_XFT2]: New type.
3371 (mwin__xft_close) [HAVE_XFT2]: New function.
3372 (mwin__xft_open) [HAVE_XFT2]: New function.
3373 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3374 (mwin__xft_render) [HAVE_XFT2]: New function.
3376 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3377 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3378 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3381 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3383 * font-ft.c: Don't include FT_FREETYPE_H here.
3384 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3385 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3386 (MFTInfo): New member charmap_index.
3387 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3388 (check_otf_filename): Renamed from check_filename. Return value
3390 (ft_set_property): This function deleted.
3391 (set_font_info): New function.
3392 (add_font_list): Argument changed. Add multiple fonts.
3393 (xft_list) [HAVE_XFT2]: New function.
3394 (ft_list) [not HAVE_XFT2]: New function.
3395 (ft_select): Add code for Xft.
3396 (close_ft): Likewise.
3397 (ft_open): Likewise.
3398 (ft_find_metric): Likewise.
3399 (ft_encode_char): Likewise.
3400 (ft_render): Likewise.
3402 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3404 2004-04-26 Kenichi Handa <handa@m17n.org>
3406 * textprop.c (mtext_attach_property): Declare the return type as
3409 2004-04-21 Kenichi Handa <handa@m17n.org>
3411 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3413 2004-04-09 Kenichi Handa <handa@m17n.org>
3415 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3417 (load_command): Setup above members.
3419 2004-04-05 Kenichi Handa <handa@m17n.org>
3421 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3423 2004-03-30 Kenichi Handa <handa@m17n.org>
3425 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3428 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3429 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3431 2004-03-29 Kenichi Handa <handa@m17n.org>
3433 * Version 1.0 Patch Level 2 released.
3435 2004-03-29 Kenichi Handa <handa@m17n.org>
3437 * charset.c (make_charset): Set charset->fully_loaded and
3438 charset->simple correctly. Don't try to get charset->min_char and
3439 charset->max_char for a charset of method subset and superset.
3440 Don't load a mapping file here.
3441 (mcharset__init): Set unified_max.
3442 (mcharset__load_from_database): Free a working plist.
3444 * coding.c (mcoding__fini): Free all malloced data.
3446 * input-gui.c (win_create_ic): Set control.as_image for preediting
3449 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3450 `count') to initialize the array.
3452 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3455 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3457 (mwin__create_window): Fix bug of setting a background pixel of a
3459 (mwin__adjust_window): Clear the window before drawing.
3461 * m17n-core.c (mdebug__report_object): Free array->objectes if
3463 (m17n_init_core): Don't set report_header_printed to 0 here.
3464 Fix debugging information.
3465 (m17n_fini_core): Set report_header_printed to 0 here.
3467 * m17n-core.h (mplist_deserialize): Extern it.
3469 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3471 * m17n.c (m17n_fini): Fix debugging information.
3473 * mtext.c (mtext__adjust_foramt): New function.
3475 * mtext.h (mtext__adjust_foramt): Extern it.
3477 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3479 * plist.h (mplist__deserialize): Don't extern it.
3481 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3482 elements of symbol_table to NULL. Report about created and freed
3483 symbols if MDEBUG_FINI is set.
3485 2004-03-22 Kenichi Handa <handa@m17n.org>
3487 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3489 * m17n.c (m17n_init): Fix the way of checking merror_code.
3491 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3493 2004-03-22 Kenichi Handa <handa@m17n.org>
3495 * fontset.c (realize_font_group): Adjust the font size by
3496 mfont__resize before selecting a font.
3498 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3500 2004-03-19 Kenichi Handa <handa@m17n.org>
3502 * Version 1.0 Patch Level 1 released.
3504 2004-03-19 Kenichi Handa <handa@m17n.org>
3506 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3508 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3510 2004-03-19 Kenichi Handa <handa@m17n.org>
3512 Re-apply the changes forgotten in the released version.
3514 * charset.c (mcharset__load_from_database): Call
3515 mchar_define_charset.
3517 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3518 (mconv_encode_range): Put Mcoding text property.
3520 2004-03-18 Kenichi Handa <handa@m17n.org>
3522 * draw.c (Mdepth): New variable.
3523 (visual_order): Delete unused local var `pos'.
3524 (compose_glyph_string): Fix for the case that gstring->glyphs is
3525 realloced. Stop generating glyphs at TO. Fix handling of
3527 (layout_glyphs): Get metrics of all glyphs in advance. Set
3528 lbearing and rbearing of base of composition glyph correctly.
3529 Handle left-overhang glyphs correctly.
3530 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3532 (dump_combining_code): Change the defualt off_x character to ".".
3533 (mdraw__init): Initialize Mdepth.
3535 * face.c (work_gstring): New variable
3536 (mface__init): Initialize work_gstring.
3537 (mface__fini): Free work_gstring.glyphs.
3538 (mface__realize): Don't handle videomode property here. Adjusted
3539 for the change of mfont__get_metric.
3540 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3542 * face.h (enum face_gc): Moved to m17n-X.c.
3544 * font.h (struct MFontDriver): Arguments of find_metric changed.
3545 (mfont__select): Prototype adjusted.
3546 (mfont__get_metric): Likewise.
3547 (mfont__ft_drive_otf): Likewise.
3548 (mfont__flt_run): Likewise.
3550 * font.c (mfont__select): New argument layouter. If layouter is
3551 different in the registered font, make a new copy of realized
3553 (mfont__get_metric): Argument changed. Get metrics of multiple
3555 (mfont_find): Call mfont__select with layouter as Mnil.
3557 * font-flt.c (FontLayoutContext): New member rfont.
3558 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3559 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3561 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3563 (NUM_POINTS): New macro.
3564 (MPointTable): New type.
3565 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3566 (mfont__ft_drive_otf): New argument rfont.
3568 * fontset.c (realize_font_group): Adjusted for the changed of
3570 (check_fontset_element): This function deleted.
3572 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3573 off the parent window if the preedit text is zero length.
3575 * internal-gui.h (struct MFrame): New members foreground,
3576 background, videomode, font.
3577 (struct MGlyphString): New member anti_alias.
3578 (MDrawPoint): New type.
3579 (mwin__draw_bitmap): Prototype deleted.
3580 (mwin__draw_points): Prototype added.
3582 * m17n-gui.h (MDrawControl): New member anti_alias.
3584 * m17n-gui.c (free_frame): Free frame->font.
3585 (mframe): Set the fontset of frame->face to the default fontset.
3587 * m17n-X.c (RGB_GC): New type.
3588 (enum gc_index): Renamed from enum face_gc. Member names changed.
3590 (struct MWDevice): Members foreground and background deleted. New
3591 member scratch_gc, gc_list.
3592 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3593 (free_device): Free GCs in device->gc_list.
3594 (get_rgb_gc): New function.
3595 (get_gc): Renamed and argument changed from get_color.
3596 (get_gc_for_anti_alias): New function.
3597 (xfont_find_metric): Arguments changed. Get metrics of multiple
3599 (set_region): Argument changed. Caller changed.
3600 (xfont_render): Allways set a font in gc.
3601 (x_error_handler, x_io_error_handler): Define only if
3602 X_SET_ERROR_HANDLER is defined.
3603 (mwin__open_device): Create device->scratch_gc. Set members
3604 foreground, background, and videomode of frame. Call
3605 XSetErrorHandler and XSetIOErrorHandler only if
3606 X_SET_ERROR_HANDLER is defined.
3607 (struct gc_list): Deleted.
3608 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3609 (mwin__realize_face): Adjusted for the change of the format of
3610 rface->info and the charge of set_region.
3611 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3612 (mwin__draw_box): Likewise.
3613 (mwin__draw_bitmap): This function deleted.
3614 (mwin__draw_points): New function.
3615 (mwin__verify_region): Adjusted for the change of the format of
3616 rface->info and the charge of set_region.
3617 (mwin__create_window): Inherit backgound pixel from parent.
3618 (mwin__dump_gc): Adjusted for the change of the format of
3621 2004-03-16 Kenichi Handa <handa@m17n.org>
3623 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3625 * input.c (M_key_alias): New variable.
3626 (handle_key): Try M_key_alias property of a key too.
3627 (minput__init): Initialize M_key_alias. Give that property to
3628 symbols in one_char_symbol. Fix bug of initializing
3631 * draw.c (compose_glyph_string): Don't handle
3632 ignore_formatting_char here. Include formatting characters in the
3633 range processed by a FTL.
3634 (layout_glyph_string): Handle ignore_formatting_char here.
3636 2004-03-12 Kenichi Handa <handa@m17n.org>
3638 * input-gui.c (win_create_ic): Enable bidi in status control.
3640 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3642 2004-03-09 Kenichi Handa <handa@m17n.org>
3644 * input.c (load_input_method): If title is not specified, use the
3645 input method name as title.
3647 * m17n-X.c (get_color): Make it static.
3648 (xim_create_ic, xim_destroy_ic, x_error_handler)
3649 (x_io_error_handler): Likewise.
3651 2004-03-01 Kenichi Handa <handa@m17n.org>
3653 * Version 1.0 released.
3656 Copyright (C) 2003, 2004
3657 National Institute of Advanced Industrial Science and Technology (AIST)
3658 Registration Number H15PRO112
3660 This file is part of the m17n library.
3662 The m17n library is free software; you can redistribute it and/or
3663 modify it under the terms of the GNU Lesser General Public License
3664 as published by the Free Software Foundation; either version 2.1 of
3665 the License, or (at your option) any later version.
3667 The m17n library is distributed in the hope that it will be useful,
3668 but WITHOUT ANY WARRANTY; without even the implied warranty of
3669 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3670 Lesser General Public License for more details.
3672 You should have received a copy of the GNU Lesser General Public
3673 License along with the m17n library; if not, write to the Free
3674 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3675 Boston, MA 02110-1301, USA.