1 2007-03-29 Kenichi Handa <handa@m17n.org>
3 These changes are to avoid unsafe casting of a function pointer.
5 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
6 (struct MFace): New member hook.
8 * face.c (serialize_face): Adjusted for the change of MFace.
9 (deserialize_face): Likewise.
10 (mface__init): Likewise. Use msymbol_put_func.
11 (mface__realize): Adjusted for the change of MFace. Avoid
13 (mface_get_prop): Adjusted for the change of MFace.
14 (mface_put_prop): Likewise.
15 (mface_get_hook): New function.
16 (mface_put_hook): New function.
17 (mface_update): Adjusted for the change of MFace.
19 * input-gui.c (win_callback): Use mplsit_get_func.
20 (minput__win_init): Use mplsit_put_func.
22 * input.c (take_action_list): Use mplist_get_func.
23 (init_ic_info): Likewise.
24 (fini_ic_info): Likewise.
25 (minput_callback): Likewise.
26 (minput__init): Use mplist_put_func.
28 * language.c (mlang__init): Use msymbol_put_func.
30 * m17n-core.h (M17NFunc): New function type.
31 (M17N_FUNC): New macro.
32 (msymbol_put_func, msymbol_get_func): Extern them.
33 (mplist_put_func, mplist_get_func): Extern them.
35 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
37 * m17n-gui.c (mframe): Add a proper casting.
39 * plist.h (struct MPlist): Make the member val a union.
40 (MPLIST_VAL): Adjusted for the above change.
41 (MPLIST_FUNC): New macro.
42 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
44 * plist.c (mplist_put_func, mplist_get_func): New functions.
46 * symbol.c (msymbol__fini): Use MPLIST_VAL.
47 (msymbol_put_func, msymbol_get_func): New functions.
49 * textprop.c (mtext_serialize): Use msymbol_get_func.
50 (mtext_deserialize): Likewise.
52 2007-03-28 Kenichi Handa <handa@m17n.org>
54 * input.c (get_candidate_list): Avoid unnecessary unref.
56 2007-03-23 Kenichi Handa <handa@m17n.org>
58 * database.c (mdatabase__update): Unref plist at the tail.
60 2007-03-21 Kenichi Handa <handa@m17n.org>
62 * input.c (update_custom_info): Fix for the case "name == Mnil &&
64 (config_command): Fix for the case that configuration is
66 (config_variable): Likewise.
67 (minput_config_command): If keyseqlist is an empty list, cancel
69 (minput_config_variable) If value is an empty list, cancel the
71 (minput_save_config): Handle cancellation of config and customize
74 2007-03-15 Kenichi Handa <handa@m17n.org>
76 * input.c (minput_config_variable): Check custom->vars (not
79 2007-03-01 Kenichi Handa <handa@m17n.org>
81 * input.c (reload_im_info): Setup cmds, vars, and title of
83 (check_variable_value): Fix the return value.
85 * database.c (mdatabase__check): If necessary, update database and
88 2007-02-28 Kenichi Handa <handa@m17n.org>
90 * database.c (get_dir_info): Set dir_info->status to
92 (check_version): New function.
93 (register_database): Don't call find_database.
94 (register_databases_in_files): Don't register a database of
96 (mdatabase__update): Likewise. Avoid unnecessary scanning.
98 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
99 and MDB_STATUS_OUTDATED.
101 * font.h (struct MFont): Types of members type, source, and
102 spacing changed to unsigned.
104 * internal-gui.h (struct): Types of members category and type
107 * internal.h (struct MText): Types of members format and coverage
110 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
111 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
113 2007-02-23 Kenichi Handa <handa@m17n.org>
115 * input.c (Mpop): New variable.
116 (fully_initialize): Initialize Mpop.
117 (parse_action_list): Handle Mpop.
118 (take_action_list): Likewise.
119 (handle_key): When a key is unhandled, shift to the initial state
120 only if the current state has no branch action.
123 2007-02-12 Kenichi Handa <handa@m17n.org>
125 * input.c (get_preceding_char): Unref mt if necessary.
126 (get_following_char): Likewise.
127 (parse_action_list): Fix handling of `insert' action as
129 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
130 (take_action_list): Check invalid candidate list.
132 2007-02-06 Kenichi Handa <handa@m17n.org>
134 * input.c (integer_value): Check also ic->produced for @-N.
136 2007-01-26 Kenichi Handa <handa@m17n.org>
138 * database.c (mdatabase__update): Check mdatabase__dir_list from
141 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
143 2007-01-12 Kenichi Handa <handa@m17n.org>
145 * input.c (handle_key): Handle a branch action of the initial
148 2007-01-10 Kenichi Handa <handa@m17n.org>
150 * m17n-gd.c (gd_render): Delete superfluous line.
152 2006-12-26 Kenichi Handa <handa@m17n.org>
154 * m17n.h (minput_callback): Extern it.
156 * input.h (minput__callback): Delte extern.
158 * input.c (get_surrounding_text): Adjusted for the change of
159 minput__callback to minput_callback.
160 (delete_surrounding_text): Likewise.
161 (minput_create_ic): Likewise.
162 (minput_destroy_ic): Likewise.
163 (minput_filter): Likewise.
164 (minput_set_spot): Likewise.
165 (minput_toggle): Likewise.
166 (minput_reset_ic): Likewise.
168 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
169 and ic->candidate_to to 0.
170 (minput_callback): Renamed from minput__callback.
172 * input-gui.c (win_callback): Adjusted for the change of
173 minput__callback to minput_callback.
175 2006-12-15 Kenichi Handa <handa@m17n.org>
177 * font-ft.c (ft_add_font): Fix typo.
179 2006-12-06 Kenichi Handa <handa@m17n.org>
181 * Version 1.3.4 released.
183 2006-11-16 Kenichi Handa <handa@m17n.org>
185 * input.c (parse_action_list): Allow (undo 0).
186 (adjust_markers): New function.
187 (preedit_insert, preedit_delete): Call adjust_markers.
188 (preedit_replace): New function.
189 (update_candidate): Call preedit_replace instead of preedit_insert
191 (filter): When ic_info->commit_key_head is nonzero, shift input
192 event keys even if there's no committed text.
194 2006-11-10 Kenichi Handa <handa@m17n.org>
196 * input.h (MInputContextInfo): New member commit_key_head.
198 * input.c (preedit_commit): Update ic_info->commit_key_head.
199 (take_action_list): Reset ic_info->commit_key_head on Mundo.
200 (filter): When committed, shift keys by ic_info->commit_key_head.
202 2006-10-30 Kenichi Handa <handa@m17n.org>
204 * input.c (preedit_delete): Fix typo.
205 (take_action_list): Print more debugging information. Allow
206 variable in arg of 'select' and `pushback'.
208 * database.c (gen_database_name): Don't put extra space.
209 (load_database): Print debugging information.
210 (register_databases_in_files): New arg headlen. Callers changed.
211 (mdatabase__load_for_keys): Shorten debugging information.
212 (mdatabase_load): Don't print debugging information here.
214 2006-10-27 Kenichi Handa <handa@m17n.org>
216 * input.c (marker_code): New arg surrounding. Callers changed.
217 (surrounding_pos): Check if name[0] == '@'.
218 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
219 (take_action_list): Likewise.
220 (get_preceding_char): If POS is zero, always call
221 get_surrounding_text.
223 2006-10-19 Kenichi Handa <handa@m17n.org>
225 * input.c (load_variables): Fix setting of `global'.
227 2006-10-16 Kenichi Handa <handa@m17n.org>
229 * draw.c (draw_background): Be sure to set *to_x.
230 (render_glyph_string): If from == to, just return.
232 2006-10-18 Kenichi Handa <handa@m17n.org>
234 * database.c (get_dir_info): Return NULL if the directory name is
236 (register_databases_in_files): Call register_database with
238 (mdatabase__update): Fix logic. Call register_database with
240 (mdatabase_define): Call register_database with
243 * input.c (delete_surrounding_text): Be sure to set members
244 preceding_text and following_text to NULL.
245 (shift_state): Save variable values in ic_info->vars_saved.
246 (preedit_commit): Don't print debug information here. Don't
247 change ic_info->keys here.
248 (get_candidate_list): Don't ref plist.
249 (take_action_list): Don't unref return value of
250 get_candidate_list. For undo, reset ic->produced and recover
251 ic_info->vars. Be sure to set ic->candidate_list to NULL after
253 (init_ic_info): Set ic_info->vars_saved.
254 (fini_ic_info): Unref ic_info->vars_saved.
255 (re_init_ic): Be sure to set ic->candidate_list to NULL after
257 (filter): Be sure to set members preceding_text and following_text
258 to NULL. Print debug information about produced text. Delete
259 processed keys from ic_info->keys.
261 * input.h (MInputContextInfo): New member vars_saved.
263 2006-10-16 Kenichi Handa <handa@m17n.org>
265 * database.c (mdatabase__update): Fix the way to get db_info.
267 2006-10-02 Kenichi Handa <handa@m17n.org>
269 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
270 `size' changed to 24.
272 * font.c (xlfd_unparse_name): Adjusted for the change of
274 (font_score): Likewise.
275 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
277 * m17n-X.c (MFontX, _MFontX): Deleted.
278 (SET_SIZE, HAVE_SIZE): Deleted.
279 (free_display_info): Adjusted for the change of
280 disp_info->font_list format.
281 (xfont_registry_list): Likewise.
282 (xfont_open): Likewise.
283 (xfont_list): Likewise.
284 (xfont_encode_char): Ignore size to find a realized font.
285 (MRealizedFontXft): Change the order of members to make it
286 compatible with MRealizedFontFT.
288 2006-09-27 Kenichi Handa <handa@m17n.org>
290 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
291 (mfont_close): Add comments.
293 * mtext-lbrk.c (mtext_line_break): Add comment.
295 2006-09-26 Kenichi Handa <handa@m17n.org>
297 * input.c (minput_get_description): Handle description about
298 inclusion-only input methods.
300 2006-09-21 Kenichi Handa <handa@m17n.org>
302 * input.c (M_gettext): New variable.
303 (fully_initialize): Initialize M_gettext.
304 (check_description): New function.
305 (load_commands): Call check_description.
306 (config_all_commands): Be sure to unref pl.
307 (load_variables): Call check_description.
308 (config_all_variables): Be sure to unref pl.
309 (load_im_info): Call check_description.
311 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
313 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
314 and bind_textdomain_codeset.
316 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
318 2006-09-15 Kenichi Handa <handa@m17n.org>
320 * input.c (reload_im_info): Update custom and global info.
321 (init_ic_info): Fix previous change.
323 2006-09-14 Kenichi Handa <handa@m17n.org>
325 * database.c: Include <libgen.h>.
326 (mdatabase__lock): Make a directory if necessary.
328 * input.c (resolve_command): Adjusted for the format change of
329 configured_cmds member.
330 (load_commands, load_variables): Fix for errornous data handling.
331 (config_command, config_variable): New function.
332 (config_all_commands, config_all_variables): Renamed from
333 config_commands and config_variables. Utilize the above function.
334 (check_variable_value): Argument changed. Callers changed.
335 (load_im_info): Call config_all_commands and config_all_variables.
336 (init_ic_info): Adjusted for the format change of configured_vars
338 (minput__init): Initialize Mcustomized, Mconfigured, and
340 (Mcustomized, Mconfigured, Minherited): New variables.
341 (minput_get_command): Be sure to return NULL if an input method
342 use no local command.
343 (minput_get_variable): Be sure to return NULL if an input method
344 use no local variable.
345 (minput_config_command, minput_config_variable)
346 (minput_save_config): Adjusted for the format change of
347 configured_cmds and configured_vars members.
349 * plist.c (write_element): Delete superfluous ':'.
351 2006-09-13 Kenichi Handa <handa@m17n.org>
353 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
354 (minput_config_file): Extern it.
356 * draw.c (Minherited): Declaration moved to input.c.
357 (mdraw__init): Don't initialize Minherited here.
359 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
361 2006-09-07 Kenichi Handa <handa@m17n.org>
363 * textprop.c (mtext_serialize): Call mplist__serialize with the
366 * plist.h (mplist__serialize): Prototype adjusted.
367 (mplist__assq): Extern it.
369 * plist.c: Include <ctype.h>
370 (PUTC, PUTS): New macros.
371 (write_symbol): New function.
372 (write_element): New arg indent.
373 (dump_string, dump_plist_element): Delete them.
374 (mplist__from_string): New arg pretty.
375 (mplist__assq): New function.
376 (mdebug_dump_plist): Use write_element.
378 * mtext.c (mtext_cat_char): Allocate more memory.
379 (mdebug_dump_mtext): Don't escal a newline character.
381 * m17n.h (minput_get_command, minput_get_variable)
382 (minput_config_command, minput_config_variable)
383 (minput_save_config): Extern them.
385 * m17n-core.c: Include <string.h>.
386 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
387 use the stream stdout instead of a file of that name.
389 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
392 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
393 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
394 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
395 (MDEBUG_DUMP): Flush the stream.
397 * input.h (struct _MInputMethodInfo): Delete member im. New
398 members mdb, language, name, extra, cmds, configured_cmds,
399 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
400 (MInputContextInfo): New member tick.
402 * input.c: Big change to improve user-side input method
403 customization. Here, list just public API changes.
404 (minput_get_commands, minput_get_variables)
405 (minput_assign_command_keys, minput_set_variable): Label them
407 (minput_get_command, minput_get_variable)
408 (minput_config_command, minput_config_variable)
409 (minput_save_config): New functions.
411 * database.h (PATH_MAX): Define it if not yet defined.
412 (PATH_SEPARATOR): Likewise.
413 (enum MDatabaseStatus): New enum.
414 (struct MDatabaseInfo): Moved from database.c. New members status,
415 time, lock_file, and uniq_file.
416 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
417 (mdatabase__unlock): Extern them.
419 * database.c: Include <time.h>.
420 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
421 (GEN_PATH): Args changed. Callers changed.
422 (struct MDatabaseInfo): Moved to database.h.
423 (struct MDatabase, mdb_list): Deleted.
424 (mdatabase__list): New var.
425 (get_database_filename): Deleted. Callers changed to use
427 (find_file, get_database_file): New files.
428 (get_dir_info): Initialize new members of MDatabaseInfo.
429 (find_database): Arg chagnded. Callers changed.
430 (free_db_info, register_database, register_databases_in_files):
432 (update_database_list): Deleted.
433 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
434 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
435 (mdatabase__update): New function.
436 (mdatabase__check): Return value changed.
437 (mdatabase__file, mdatabase__lock, mdatabase__save)
438 (mdatabase__unlock): New functions.
440 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
442 * input.c (get_surrounding_text): Return -2 when surrounding text
444 (get_following_char): Likewise.
445 (get_preceding_char): Likewise.
446 (minput__callback): Return 0 if there is a callback function,
449 2006-08-17 Kenichi Handa <handa@m17n.org>
451 * input.c (reset_ic): Use shift_state to setup the current state.
453 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
455 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
456 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
457 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
459 2006-08-02 Kenichi Handa <handa@m17n.org>
461 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
463 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
465 * font-ft.c (ft_encapsulate): Add code for debugging.
466 (mfont__ft_drive_otf): Be sure to encode character before getting
469 2006-07-21 Kenichi Handa <handa@m17n.org>
471 * draw.c (mdraw_text_extents): Fix previous typo.
473 2006-07-19 Kenichi Handa <handa@m17n.org>
475 * draw.c (gstring_width): New arg lbearing.
476 (render_glyph_string): Adjusted for the change of gstring_width.
477 (mdraw_text_extents): Fix lbearing of ink and line metrics.
479 * m17n-core.h (Mlanguage): Extern it.
481 * m17n.h (Mlanguage): Extern deleted.
483 * mtext.c (mtext__init): Initialize Mlanguage.
484 (Mlanguage): Declaration moved from locale.c
486 * locale.c (mlocale__init): Don't initialize Mlanguage here.
487 (Mlanguage): Declaration moved to mtext.c.
489 * language.c (mlang__init): Don't initialize Mlanguage here.
491 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
493 2006-07-14 Kenichi Handa <handa@m17n.org>
495 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
496 (MRealizedFontFT): New member face_encapsulated.
497 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
498 (ft_gen_font): New function.
499 (ft_add_font): Use ft_gen_font.
500 (ft_list_script): Store lists in ft_script_list.
501 (ft_check_otf): New arg ft_face. Caller changed.
502 (ft_check_language): Likewise.
503 (ft_check_script): Likewise.
504 (ft_encapsulate, ft_close): New functions.
505 (mfont__ft_driver): Initialize members encapsulate and close.
506 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
508 * font.h (struct MRealizedFont): New member encapsulating.
509 (struct MFontDriver): New members encapsulate and close.
511 * font.c (mfont__match_p): If FONT is realized, check capability
512 by font drivers's check_capability method.
513 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
516 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
517 declarations of foundry and fam local vars.
518 (xft_driver): Make it static.
520 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
521 (mfont_close): Extern them.
523 * m17n-gd.c (device_open): Don't specify foundry and family of the
526 2006-07-11 Kenichi Handa <handa@m17n.org>
528 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
530 2006-07-13 Kenichi Handa <handa@m17n.org>
532 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
534 (ft_check_script): Delete unused var.
535 (ft_list_capability): Likewise.
537 * font.c (mfont__get_capability): Setup cap->otf.
538 (Motf): Make it global.
539 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
541 * font.h (MFontCapability): New member otf.
543 * language.c (mlang__fini): Delete unused vars.
545 * m17n-gui.h (Motf): Extern it.
547 * database.c (update_database_list): Delete unused vars.
549 2006-07-07 Kenichi Handa <handa@m17n.org>
551 * font-ft.c (DEVICE_DELTA): Fix typo.
553 2006-07-06 Kenichi Handa <handa@m17n.org>
555 * fontset.c (mfont__lookup_fontset): Don't ignore family and
558 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
560 * database.c: Update comments.
562 2006-07-05 Kenichi Handa <handa@m17n.org>
564 * database.c (PATH_MAX): Define it if not yet defined.
565 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
567 (get_database_filename): Use GEN_PATH.
568 (get_dir_info): Don't include the last '/' in directory name.
569 (register_database): New function.
570 (update_database_list): Use register_database. Search all
571 directories in mdatabase__dir_list for wildcard databases.
572 (mdatabase__init): Check "~/.m17n.d".
574 2006-07-03 Kenichi Handa <handa@m17n.org>
576 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
577 push reverse property.
579 * plist.c (dump_plist_element): Fix previous change.
581 2006-06-28 Kenichi Handa <handa@m17n.org>
583 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
586 * draw.c (MbidiNSM): New variable.
587 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
588 attention to bidi type NSM.
589 (mdraw__init): Initialize MbibiNSM.
591 * language.c (mscript__char_list): Fix finding a char-list element.
593 * plist.c (dump_string): Return number of printed characters.
594 (dump_plist_element): Print elements more compactly.
596 2006-06-23 Kenichi Handa <handa@m17n.org>
598 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
599 (include_HEADERS): Likewise.
601 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
603 * language.c: Update documentation.
605 2006-06-23 Kenichi Handa <handa@m17n.org>
607 * font-ft.c (struct MFontFT): Delete member lang.
608 (free_ft_info): Don't unref member lang. Destroy members langset
610 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
611 changed. Set members langset and charset.
612 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
614 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
616 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
617 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
618 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
619 characters at first. If it fails, try listing by language names.
620 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
621 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
622 change of MFontCapability.
623 (ft_list_capability): Likewise. Try listing by languages, then by
624 scripts. Check OTF at last.
625 (ft_check_script): New function.
626 (ft_select): Adjusted for the check of MFontCapability.
627 (ft_list_family_names): New function.
628 (ft_check_capability): If cap->script is not Mnil, call
630 (mfont__ft_driver): Initialize with ft_list_family_names.
632 * font.h (struct MFontDriver): New member list_fmaily_names.
633 (struct): Change member "MSymbol *lang" to "MSymbol language".
635 * font.c: Include "language.h".
636 (Motf): New variable.
637 (otf_script_list, load_otf_script_list): Delete it.
638 (find_script_from_otf_tag): Delete it.
639 (merge_capability): New function.
640 (mfont__init): Init Motf.
641 (mfont__fini): Don't unref otf_script_list.
642 (free_font_capability): Check cap->script_tag to determine if
643 OTF-related capability is set.
644 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
645 the change of type MFontCapability.
646 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
648 (mfont_list): Call merge_capability for LANGUAGE arg.
649 (mfont_list_family_names): New function.
651 * input-gui.c: Typo in comments fixed.
653 * input.c: Typo in comments fixed.
655 * language.h (mlanguage__list): Delete it.
656 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
659 * language.c: Include "mtext.h".
660 (M_script_lang_list): Delete it.
661 (language_list, script_list): New variables.
662 (load_lang_script_list, init_language_list, init_script_list): New
664 (mlang__init): Don't load language database here.
665 (mlang__fini): Unref language_list and script_list if not NULL.
666 (mlanguage__list): Delete it.
667 (mlanguage__info, mscript__info, mscript__char_list)
668 (mscript__otf_tag, mscript__from_otf_tag): New functions.
669 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
670 (mscript_list, mscript_language_list): New functions.
672 * m17n-gui.h (mfont_list_family_names): Extern it.
674 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
675 (mlanguage_text, mscript_list, mscript_language_list): Extern
678 2006-06-21 Kenichi Handa <handa@m17n.org>
680 * m17n-X.c (xfont_driver): Initialize with
681 xfont_list_family_names.
682 (xfont_list_family_names): New function.
683 (xft_driver): Initialize with NULL for list_family_names member.
684 (device_init): Set list_family_names member of xft_driver to that
687 2006-06-06 Kenichi Handa <handa@m17n.org>
689 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
691 2006-03-24 Kenichi Handa <handa@m17n.org>
693 * font-ft.c (ft_open): Improve debug message.
695 * fontset.c (mfontset__get_font): Fix for the case that no font in
696 per_script list is available.
698 2006-02-06 Kenichi Handa <handa@m17n.org>
700 * Version 1.3.3 released.
702 2006-02-22 Kenichi Handa <handa@m17n.org>
704 * textprop.c: Fix some typos in documentation.
706 * plist.c: Fix some typos in documentation.
708 * m17n-core.h: Fix some typos in documentation.
709 (M17NLIB_PATCH_LEVEL): Updated to 3.
710 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
712 * symbol.c: Fix some typos in documentation.
714 * mtext.c: Fix some typos in documentation.
716 * input.c: Fix several typos in documentation.
718 2006-02-06 Kenichi Handa <handa@m17n.org>
720 * Version 1.3.2 released.
722 2006-02-03 Kenichi Handa <handa@m17n.org>
724 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
725 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
727 * font.c (xlfd_parse_name): Fix handling of the name "nil".
729 * draw.c (layout_glyphs): Fix handling left_padding of
732 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
734 2006-02-02 Kenichi Handa <handa@m17n.org>
736 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
739 2006-01-25 Kenichi Handa <handa@m17n.org>
741 * input.c (resolve_expression): If the value of PLIST is a plist,
742 but the first element is not symbol, return 0.
744 2006-01-17 Kenichi Handa <handa@m17n.org>
746 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
747 HAVE_GD is 2 or the greater.
749 2006-01-16 Kenichi Handa <handa@m17n.org>
751 * Version 1.3.1 released.
753 2006-01-16 Kenichi Handa <handa@m17n.org>
755 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
756 simulating anti-aliasing.
758 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
759 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
761 2006-01-12 Kenichi Handa <handa@m17n.org>
763 * input.c (get_surrounding_text): Always pop ic->plist.
764 (reset_ic): Don't reset ic->plist.
766 2006-01-10 Kenichi Handa <handa@m17n.org>
768 * input.c (preedit_commit): For debugging, print only commiting
769 charactes. Don't set ic->candidate_show to 0.
770 (handle_key): Don't run branch-actions just by shifting to the
772 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
773 Reset vars and plist.
775 2006-01-07 Kenichi Handa <handa@m17n.org>
777 * input.c (load_branch): Confirm that maps is not NULL.
779 2006-01-05 Kenichi Handa <handa@m17n.org>
781 * input-gui.c (win_filter): Try to convert arg to key only when
784 * plist.c (read_integer_element): If '#' and '-' are followed by
785 non-integer-constituent, read them as a part of a symbol.
786 (read_symbol_element): New arg C.
787 (read_element): Adjust args to read_symbol_element.
789 * input.c (load_macros): On overwriting a macro, free the old
791 (minput__init): Store Mmap in load_im_info_keys.
792 (minput_get_title_icon): If the input method has no title, be sure
794 (minput_get_description): If the input method has no description,
795 be sure to return NULL.
796 (minput_get_variables): Fix documentation.
797 (handle_key): Pay attention to the case that key is Mnil.
798 (filter): Likewise. Fix handling of such symbol as S-A.
800 2005-12-22 Kenichi Handa <handa@m17n.org>
802 * Version 1.3.0 released.
804 2005-12-22 Kenichi Handa <handa@m17n.org>
806 * font-ft.c (ft_list): If the specified font has no property,
809 2005-12-20 Kenichi Handa <handa@m17n.org>
811 * character.c (mchar_get_prop): Check char_prop_list.
812 (mchar_put_prop, mchar_get_prop_table): Likewise.
814 2005-12-18 Kenichi Handa <handa@m17n.org>
816 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
817 file name sans language.
819 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
821 * input.c: Fix typo in comments.
823 2005-12-14 Kenichi Handa <handa@m17n.org>
825 * input.c (minput_get_title_icon): Check the default icon for the
828 2005-12-13 Kenichi Handa <handa@m17n.org>
830 * input.c (Mless_equal, Mgreater_equal): New variables.
831 (parse_expression, resolve_expression, parse_action_list)
832 (take_action_list): Handle the aboves.
833 (filter): Treat key S-X as X.
834 (minput__init): Initialize Mless_equal and Mgreater_equal.
835 (minput_get_title_icon): New function.
837 * m17n.h (minput_get_title_icon): Extern it.
839 * database.c (get_database_filename): Return a filename instead of
841 (load_database): Adjusted for the above change.
842 (mdatabase__load_for_keys): Likewise.
843 (mdatabase__find_file): New function.
845 * database.h (mdatabase__find_file): Extern it.
847 * font.h (mfont__resize): Delete extern.
849 * font.c (mfont__list): Check resize ratio.
850 (mfont__resize): Delete it.
851 (mfont_resize_ratio): Include the code of mfont__resize.
853 * font-ft.c (ft_open): Check resize ratio.
855 * m17n-X.c (xfont_open): Check resize ratio.
856 (xft_open): Likewise.
858 2005-12-07 Kenichi Handa <handa@m17n.org>
860 * input.c (take_action_list): If take_action_list return -1,
862 (handle_key): Likewise.
864 * face.c (mface__for_chars): When font is specified and layouter
865 is found for it, if the layouter doesn't support one of a
866 character, use a face sans layouter for it.
868 2005-12-06 Kenichi Handa <handa@m17n.org>
870 * fontset.c (mfont__lookup_fontset): If only a fallback font is
871 found, don't use it for more than one character.
873 2005-12-05 Kenichi Handa <handa@m17n.org>
875 * face.c (mface__realize): Set rfont->layouter to Mnil.
876 (mface__for_chars): Fix handling of layouter.
878 * character.h (mchar__define_prop): Extern it.
880 * database.c (update_database_list): Call mchar__define_prop if
883 * character.c (mchar__init): Don't call mchar_define_property.
884 Instead just initialize property keys.
885 (mchar__fini): Free char_prop_list only if it's not NULL.
886 (mchar__define_prop): New function.
887 (mchar_define_property): Call mchar__define_prop.
889 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
892 2005-12-02 Kenichi Handa <handa@m17n.org>
894 * language.c (mlang__init): Handle extra chars.
896 * m17n-gui.h (mfont_check): Adjust prototype.
898 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
899 (xfont_check_capability): New function.
900 (xft_driver): Specify xft_check_capability.
901 (xft_check_capability): New function.
903 * font-ft.c (M0_3): Delete it.
905 (ft_get_charmaps): Refer to M0.
906 (fc_parse_pattern): Fix previous change.
907 (ft_list_language): Check also extra chars.
908 (ft_check_otf): Define it even if HAVE_OTF is undef.
909 (ft_check_lang): Check the result of FcLangSetHasLang against
910 FcLangDifferentLang. Check also extra chars.
911 (ft_list_capability): Delete ifdef HAVE_OTF.
912 (ft_select): Likewise.
913 (ft_open): Improve debug information.
914 (ft_check_capability): New function.
915 (mfont__ft_driver): Specify ft_check_capability.
916 (mfont__ft_init): Initialize M0.
918 * fontset.c (get_font_from_group): New function.
919 (mfontset__get_font): New function.
921 * fontset.h (mfontset__get_font): Extern it.
923 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
924 (mfont__fini): Delete ifdef HAVE_OTF.
925 (free_font_capability): Likewise.
926 (mfont__get_capability): Likewise.
927 (mfont__check_capability): New function.
928 (mfont_check): Change the order of arguments. Use
931 * font.h (struct MFontDriver): New member check_capability.
932 (MFontCapability): Delete ifdef HAVE_OTF.
933 (mfont__check_capability): Extern it.
935 * face.c (mface__realize): Fix handling of FONT arg.
936 (mface__for_chars): Fix handling of explicitly specified font.
938 2005-11-25 Kenichi Handa <handa@m17n.org>
940 * font-flt.c (run_command): Print debug info for
943 * draw.c (layout_glyphs): Fix handling of left/right_padding.
945 * face.c (mface__for_chars): Check rfont before accessing the
948 2005-11-21 Kenichi Handa <handa@m17n.org>
950 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
953 * fontset.c (fontset_table): New variable.
954 (free_fontset): Call M17N_OBJECT_UNREGISTER.
955 (mfont__fontset_init): Add fontset_table as an object array.
956 (mfont__realize_fontset): Ref FONTSET.
957 (mfont__free_realized_fontset): Unref REALIZED->fontset.
958 (mfontset): Call M17N_OBJECT_REGISTER.
959 (mfontset_copy): Likewise.
961 * input.c (handle_key): For debugging, print information about
963 (filter): Add an alias for Meta and Alt modifiers.
964 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
966 (minput__init): Initialize them.
967 (parse_expression): New function.
968 (resolve_expression): New function.
969 (parse_action_list): Handle expressions by parse_expression.
970 (take_action_list): Handle expressions by resolve_expression.
971 (parse_nested_list_value): Fix previous change.
972 (resolve_command): Fix handling of the return value of
975 2005-11-18 Kenichi Handa <handa@m17n.org>
977 * font-ft.c (ft_check_otf, otf_script_list): Define only when
979 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
981 (ft_select): Likewise.
983 * font.c (mfont_list): Fix for the case that FONT is NULL.
984 (OTF_tag): Delete it.
985 (load_otf_script_list): Define only when HAVE_OTF is defined.
986 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
989 * draw.c (truncate_gstring): Be sure to truncate at
990 glapheme-cluster boundary.
992 2005-11-11 Kenichi Handa <handa@m17n.org>
994 * input.c (delete_surrounding_text): Clear cache if necessary.
996 2005-11-09 Kenichi Handa <handa@m17n.org>
998 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
999 glyph prev is also supported by the current flt.
1001 2005-11-08 Kenichi Handa <handa@m17n.org>
1003 * m17n-X.c (xft_render): Cancel previous change.
1005 2005-11-07 Kenichi Handa <handa@m17n.org>
1007 * input.c: Include <stdlib.h>.
1008 (get_surrounding_text, delete_surrounding_text)
1009 (get_preceding_char, get_following_char): New functions.
1010 (integer_value): New arg surrounding. If it is nonzero, try to
1011 get a surrounding character. Callers changed.
1012 (take_action_list): Check `value' before setting an element.
1013 (destroy_ic): Unref ic_info->preceding_text and
1014 ic_info->following_text.
1015 (minput__init): Initialize Minput_get_surrounding_text and
1016 Minput_delete_surrounding_text.
1017 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1019 (filter): Unref ic_info->preceding_text and
1020 ic_info->following_text.
1022 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1025 * input.h (MInputContextInfo): New members preceding_text and
1028 2005-11-04 Kenichi Handa <handa@m17n.org>
1030 * input.c (parse_nested_list_value): Fix handling of the global
1032 (get_nested_list): Get global definitions by load_partial_im_info.
1033 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1034 MInputCandidatesChanged.
1035 (take_action_list): Likewise.
1036 (reset_ic): Likewise.
1037 (create_ic): Don't pay special attention to
1038 Mcandidates_group_size.
1039 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1040 (minput_set_variable): Get a definition of varible by
1041 mplist_find_by_value, not mplist_get.
1043 * m17n.h (enum MInputCandidatesChanged): New enum.
1045 2005-11-01 Kenichi Handa <handa@m17n.org>
1047 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1049 (mwin__destroy_window): If xft_draw's drawable is win, change it
1050 to device->drawable before destroying win.
1052 2005-10-31 Kenichi Handa <handa@m17n.org>
1054 * input.c (load_im_info): Fix adding of state.
1056 * m17n-core.c (m17n_fini_core): Fix reporting of module
1059 * m17n.c (m17n_fini): Fix reporting of module finalization.
1061 * m17n-gui.c (m17n_init_win): Fix reporting of module
1064 2005-10-29 Kenichi Handa <handa@m17n.org>
1066 * input.c (get_candidate_list): Fix the timing of referring plist.
1068 2005-10-28 Kenichi Handa <handa@m17n.org>
1070 * input.c (load_branch): Ignore an undefined map name.
1071 (load_im_info): Set im_info->title from `name' only if it's not
1073 (shift_state): Always update ic->status.
1074 (adjust_candidates): Renamed from adjust_candidate_command.
1075 Argument changed. Caller changed.
1076 (get_candidate_list, regularize_action): New functions.
1077 (take_action_list): Use them. On handling Munhandle, don't set
1079 (handle_key): If KEY is not handled by MAP, and MAP has
1080 branch_actions, perform them.
1082 * database.c (mdatabase__fini): Free dir_info->filename;
1084 2005-10-20 Kenichi Handa <handa@m17n.org>
1086 * input.c (marker_code): Accept '@@'.
1087 (integer_value): Handle '@@'.
1088 (parse_action_list): Accept a symbol argument.
1089 (take_action_list): Resolve the symbol argument. Handle the
1092 2005-10-18 Kenichi Handa <handa@m17n.org>
1094 * input.c: Include "charset.h".
1095 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1097 (MIMState): New member (M17NObject control).
1098 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1099 (get_nested_list, resolve_variable): New functions.
1100 (integer_value): New arg (MPlist **value). Set it to the plist
1101 element containing the value.
1102 (resolve_command): New function.
1103 (load_translation): New arg (MPlist *map_actions).
1104 (load_branch): New args language and name. If `keylist' is a
1105 symbol, resolved that as a command name.
1106 (free_map): New arg top. Free map->map_actions only if top is
1108 (free_state): New function.
1109 (load_state): New arg name.
1110 (im_info_list): New variable.
1111 (free_im_info, get_im_info_by_tags): New functions.
1112 (load_im_info): Arg key changed to plist. Handle `include'.
1113 Return (MInputMethodInfo *).
1114 (preedit_commit): Ref ic->candidate_list.
1115 (get_select_charset, adjust_candidate_command): New functions.
1116 (take_action_list): Handle `include'. Adjust candidate action
1117 properly. Handle control variables `candidates-charset' and
1118 `candidates-group-size'.
1119 (open_im): Use get_im_info.
1120 (create_ic): Get global variables.
1121 (load_partial_im_info): New function.
1122 (get_im_info): New function.
1123 (check_command_keyseq, check_command_list, check_variable_list):
1125 (minput__init): Don't handle M_database_hook and Mdetail_text.
1126 Initialize M_candidates, Mcandidates_group_size,
1127 Mcandidates_charset.
1128 (parse_variable_list, get_variable_list, parse_command_list)
1129 (get_command_list): Delete them.
1130 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1131 (minput__fini): Simply unref command_list and variable_list.
1132 (minput_get_description): Adjusted for the new form of description.
1133 (minput_get_commands): Use get_nested_list.
1134 (minput_assign_command_keys): Likewise.
1135 (minput_get_variables, minput_set_variable): Likewise.
1137 * input.h (MInputMethodInfo): New members im and maps.
1139 * database.h (M_database_hook): Delete extern.
1140 (MDatabaseHookFunc): Delete extern.
1141 (mdatabase__check): Extern it.
1143 * database.c: Include <glob.h>.
1144 (MAX_TIME): New macro.
1145 (Masterisk): New variable.
1146 (get_database_stream): Argument changed to (MDatabaseInfo *).
1148 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1149 (find_database): New function.
1150 (update_database_list): New function.
1151 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1152 calling update_database_list.
1153 (mdatabase__check): New function.
1154 (mdatabase_find): Use update_database and find_database. Don't
1155 handle MDatabaseHookFunc.
1156 (mdatabase_list): Call update_database at first.
1157 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1158 (MDatabaseList): New type.
1160 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1162 * m17n.h (Mdetail_text): Delete extern.
1164 * m17n-core.h (mplist_conc): Delete extern.
1166 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1168 (mplist_conc): Renamed to mplist__conc.
1169 (mplist__pop_unref): New function.
1171 2005-10-14 Kenichi Handa <handa@m17n.org>
1173 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1175 (read_element): If keys is an empty plist, return any element
1177 (dump_plist_element): Check if plist is nested.
1178 (mplist_conc): Always ref tail.
1179 (mplist_set): If key is a managing key, ref val in advance.
1181 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1182 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1183 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1186 * fontset.c (free_fontset): Unref fontset_list if necessary.
1187 (mfont__fontset_fini): Don't free fontset_list. Unref
1189 (mfont__realize_fontset): Initialize request.
1190 (mfontset): Ref default_fontset or fontset only if necessary.
1191 (mfontset_copy): Don't ref copy.
1193 * draw.c (render_glyphs): Check gend->type before checking
1196 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1197 unrefed plists to NULL.
1199 2005-10-04 Kenichi Handa <handa@m17n.org>
1201 * textprop.c (mtext_serialize): Be sure to make mt
1202 MTEXT_FORMAT_UTF_8 and NULL terminated.
1204 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1206 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1208 2005-10-03 Kenichi Handa <handa@m17n.org>
1210 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1211 is not at the beginning of line.
1213 2005-09-22 Kenichi Handa <handa@m17n.org>
1215 * input.c: Include <sys/stat.h> and <unistd.h>.
1216 (Minclude, Mcommit, Munhandle): New variables.
1217 (minput__init): Initialize them. Push only Mstate to
1218 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1219 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1221 (load_input_method): Handle "include" directive. If no states are
1223 (shift_state): If state_name is Mt, shift back to the previous
1224 state. Call preedit_commit to commit preedit text.
1225 (preedit_commit): New function.
1226 (take_action_list): Improve debug printing. Handle commit and
1228 (handle_key): Check the return value of take_action_list. Don't
1229 take branch_actions just after changing to the root map.
1230 (reset_ic): Reset all ic_info members.
1231 (filter): When a key is not handled, just move ic_info->keys
1232 instead fo calling reset_ic.
1233 (load_im_info): If key is not Mstate, push Mmap to
1235 (MDatabaseStatList): New type.
1236 (imdir_stat_list): New variable.
1237 (input_method_hook): Don't cancel the hook. Check the
1238 modification time of directories.
1239 (minput__fini): Free imdir_stat_list;
1241 * input.h (MInputContextInfo): New member prev_state.
1243 * m17n-core.h (mplist_conc): Extern it.
1245 * plist.c (mplist_conc): New function.
1247 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1249 * font.h (MRealizedFont): New member average_width.
1251 * font-ft.c (ft_open): Set rface->average_width.
1253 * font.c (xlfd_unparse_name): Print '*' before registry name.
1255 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1256 (xfont_open): Set rfont->average_width.
1257 (xft_open): Likewise.
1258 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1260 * internal-gui.h (struct MFrame): New member average_width.
1262 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1263 (mframe_get_prop): Return the average_width of a font.
1265 * face.c (mface__realize): Set rface->average_width.
1266 (mface__update_frame_face): Set frame->average_width.
1268 * face.h (MRealizedFace): New member average_width.
1270 2005-09-19 Kenichi Handa <handa@m17n.org>
1272 * font.c (xlfd_unparse_name): New arg full_xlfd.
1273 (mfont__encode_char): Use shortcut only for X core fonts.
1274 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1275 (mfont_put_prop): Handle `language' property.
1276 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1277 Print file can capability info too.
1279 * m17n-core.c (mdebug__output): New variable.
1280 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1281 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1282 (m17n_fini_core): Close mdebug__output if it's not stderr.
1284 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1285 (xfont_open): Handle baseline_offset.
1286 (xfont_find_metric): Likewise.
1287 (xfont_render): Likewise.
1288 (xft_open): Likewise.
1289 (xft_render): Likewise.
1291 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1292 (mdebug__output): Extern it.
1293 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1294 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1295 (MDEBUG_DUMP): New macro.
1296 (MDEBUG_PRINT_TIME): Print to medebug__output.
1298 * font.h (MRealizedFont): New member baseline_offset.
1300 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1302 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1303 (ft_list_family): Check alias.
1304 (ft_list_language): If language is "en", don't try to the second
1306 (ft_default_list): New variable.
1307 (ft_list_default): New function.
1308 (ft_select): If family is not specified, try only the default
1309 fonts. Treat the weights normal and medium same.
1310 (ft_open): Fix debug message. If registry is not specified, try
1311 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1312 (ft_find_metric): Likewise.
1313 (ft_render): Likewise.
1314 (ft_list): Fix debug message. Accept the registring iso8859-1.
1315 If family is not specified, try only the default fonts.
1317 * face.c (mface__realize): Fix logic of opening a font.
1319 2005-09-16 Kenichi Handa <handa@m17n.org>
1321 * face.c (mface__realize):
1323 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1326 * input.c (shift_state): Fix the condition of taking init actions.
1327 (take_action_list): Fix handling of pushback action.
1328 (handle_key): Don't change key while checking its alias.
1329 (minput__init): Initialize new variables.
1330 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1333 2005-09-12 Kenichi Handa <handa@m17n.org>
1335 * mtext.c (mtext__uppercase): Add proper open/close parens.
1336 (mtext_titlecase): Add proper casting.
1338 * input.c (parse_action_list): Handle the case that the arg is a
1339 key sequence (MText or MPlist).
1340 (take_action_list): Likewise.
1341 (shift_state): Shorter debug message.
1342 (handle_key): Terminate a debug message by "\n".
1343 (reset_ic): Don't take initial actions here.
1344 (minput_open_im): Print a debug message.
1345 (minput_close_im): Likewise.
1346 (minput_create_ic): Likewise.
1347 (minput_destroy_ic): Likewise.
1349 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1351 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1354 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1355 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1358 * character.c: Add Japanese documentation for
1359 mchar_get_prop_table ().
1361 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1363 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1364 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1365 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1367 (init_case_conversion): New function.
1368 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1369 (uppercase_precheck, lowercase_precheck, final_sigma)
1370 (after_soft_dotted, more_above, before_dot, after_i)
1371 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1373 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1375 * plist.c (read_mtext_element): Fix previous change.
1377 2005-09-05 Kenichi Handa <handa@m17n.org>
1379 * plist.c (read_mtext_element): Handle \uXXXX notation.
1381 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1382 (MTABLE_ALLOCA): Change the name of local variable.
1384 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1385 HAVE_FREETYPE are defined.
1387 * m17n-X.c: Check HAVE_X11.
1389 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1390 directory listing libraries.
1391 (noinst_PROGRAMS): Define it only in maintainer mode.
1393 2005-09-02 Kenichi Handa <handa@m17n.org>
1395 * m17n-gui.h (mdraw_line_break_option): Extern it.
1397 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1398 end of the first glyph.
1399 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1401 (mdraw_line_break_option): New variable.
1402 (mdraw_default_line_break): Use mtext_line_break.
1404 * mtext.h (wordseg_func_table): Don't extern it.
1405 (mtext__wseg_fini): Extern it.
1407 * mtext.c: Don't include word-thai.h.
1408 (wordseg_func_table): Delete this variable.
1409 (mtext__init): Don't initialize above. Don't call
1410 mtext__word_thai_init.
1411 (mtext__fini): Don't free wordseg_func_table. Call
1412 mtext__wseg_fini instead fo mtext__word_thai_fini.
1413 (MTextWordsegFunc): Don't typedef it.
1414 (mtext__word_segment): Moved to mtext-wseg.c.
1416 * m17n-core.h (enum MTextLineBreakOption): New enum.
1417 (mtext_line_break): Extern it.
1419 * mtext-wseg.c: New file.
1421 * mtext-lbrk.c: New file.
1423 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1424 add mtext-lbrk.c and mtext-wseg.c.
1426 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1427 the case that head is NULL.
1429 2005-09-01 Kenichi Handa <handa@m17n.org>
1431 * word-thai.c (wordseg_propertize): If the property value is nil,
1432 don't make the property no-merge.
1433 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1434 attention to the case that they are NULL.
1435 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1438 * character.c (mchar_get_prop_table): New function.
1440 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1442 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1443 (mchar_get_prop_table): Extern it.
1445 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1446 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1448 * internal.h (enum MTextCoverage): New enum.
1449 (MText): New member coverage.
1451 * mtext.c (FORMAT_COVERAGE): New macro.
1452 (insert): Copy mt2->coverage.
1453 (mtext__from_data): Initialize mt->coverage.
1454 (mtext__adjust_format): Update mt->coverage.
1455 (mtext): Initialize mt->coverage.
1456 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1457 Update mt->coverage if necessary.
1458 (mtext_duplicate): Copy mt->coverage.
1459 (mtext_insert, mtext_replace): New functions.
1460 (mtext_dup): Use mtext_duplicate.
1461 (mtext__word_segment): Don't set *from and *to if a word
1462 segmentation funcion is not found.
1463 (mtext_ins_char): Fix typo.
1465 2005-08-25 Kenichi Handa <handa@m17n.org>
1467 * font.h (MFont): New member for_full_width.
1469 * font.c (compare_font_score): Prefer a font of not
1472 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1473 registry charset of a font is one of CJK charsets.
1475 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1476 supports some of CJK.
1478 2005-08-24 Kenichi Handa <handa@m17n.org>
1480 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1482 * m17n-gui.c (null_device_open): Check Mresolution param and set
1485 * m17n-gd.c (device_open): Check Mresolution param and set
1488 * m17n-X.c (MWDevice): New member resy.
1489 (xfont_open): Set ascent, descent, and max_advance members of
1491 (xft_open): Likewise.
1492 (device_open): Compare also screen_num to find a device. Set
1493 device->resy and frame->dpi.
1495 * internal-gui.h (MFrame): New member dpi.
1497 * font.h (MRealizedFont): New member max_advance.
1499 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1500 (mfont__init): Don't initialize Mascent, Mdescent.
1501 (Mascent, Mdescent): Delete these variables.
1502 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1503 Mfont_descent instead of Mascent and Mdescent.
1504 (mfont_put_prop): Allow negative size.
1505 (mfont_find): Handle the case of spec->size < 0. Fix previous
1507 (mfont_list): Handle the case of spec->size < 0.
1508 (mfont_check): Likewise.
1510 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1511 (fc_get_pattern): Handle the case of font->size < 0.
1512 (ft_open): Set ascent, descent, and max_advance members of rfont.
1513 (ft_find_metric): Improve rounding.
1514 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1517 * face.c (mface__realize): Handle the case of font->size < 0.
1519 2005-08-22 Kenichi Handa <handa@m17n.org>
1521 * coding.c (MConverterStatus): Change the member buf to union.
1522 (mconv_buffer_converter): Add const to the arg buf.
1523 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1524 (mconv_decode): Adjusted for the change of MConverterStatus.
1525 (mconv_encode_range): Likewise.
1527 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1528 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1530 2005-08-20 Kenichi Handa <handa@m17n.org>
1532 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1533 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1535 * m17n-X.c (xfont_open): Set members ascent, descent, and
1536 max_advance of rfont.
1537 (xft_open): Likewise.
1539 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1541 (mfont__ft_parse_name): Add const to the arg name.
1543 * font.c (xlfd_parse_name): Add const to the arg name. Call
1544 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1545 (xlfd_unparse_name): Handle spacing.
1546 (mfont__init): Initialize new variables.
1547 (mfont__id): Handle spacing.
1548 (mfont__merge): Likewise.
1549 (mfont__set_spec): This function deleted.
1550 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1551 condition of calling mfont__ft_parse_name.
1552 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1553 (mfont_get_prop): Handle properties spacing, ascent, descent,
1555 (mfont_find): Return a realized font.
1556 (mfont_from_name): Add const to the arg name.
1558 * font.h (enum MFontProperty): New member MFONT_SPACING.
1559 (enum MFontSpacing): New enum.
1560 (MFont): New members spacing and max_advance.
1561 (mfont__ft_parse_name): Prototype adjusted.
1562 (mfont__set_spec): Extern deleted.
1563 (mfont__parse_name_into_font): Prototype adjusted.
1565 2005-08-19 Kenichi Handa <handa@m17n.org>
1567 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1569 * font.c (mfont_list): If FONT is null, use a temporary font.
1570 (mfont_parse_name): Add const to the arg name.
1572 2005-08-18 Kenichi Handa <handa@m17n.org>
1574 * word-thai.c: Surround code by #ifdef and #endif to escape from
1577 * font-ft.c: Mostly re-written.
1579 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1580 (FontLayoutCmd): Type of the member otf changed..
1581 (load_otf_command): Adjusted for the format change of otf command.
1582 (load_command): Likewise.
1583 (free_flt_command): Unref cmd->body.otf.
1584 (run_otf): Ajusted for the type change of otf_cmd.
1585 (run_command): Ajusted for the type change of otf_cmd. On
1586 debugging, print ctx->combining_code.
1587 (mfont__flt_run): Initialize ctx's members code_offset,
1588 combining_code, and left_padding to 0.
1590 * face.h (struct MRealizedFace): New member font.
1591 (mface__realize): Prototype adjusted.
1593 * face.c (find_realized_face): New arg font.
1594 (find_realized_face): Adjusted for the change of MFont.
1595 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1596 (mface__fini): Don't call mdebug__report_object.
1597 (mface__realize): New arg font.
1598 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1599 Optimize the latin case.
1600 (mface__free_realized): Free rface->font.
1601 (mface__update_frame_face): Adjusted for the change of mface__realize.
1602 (mface_equal): New function.
1604 * draw.c (Mcommon): New variable.
1605 (visual_order): Args to mfont__encode_char changed.
1606 (compose_glyph_string): Handle Mfont text property.
1607 (layout_glyphs): Adjusted for the change of MFont.
1608 (mdraw__init): Initialize Mcommon.
1609 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1611 * font.h (enum MFontType): Members completely changed.
1612 (enum MFontProperty): Move MFONT_SIZE to the tail.
1613 (enum MFontSource): New enum.
1614 (struct MFont): New members type, source, sizes, file, capability,
1616 (struct MRealizedFont): Type of member font changed. Members
1617 score, status, and encoding deleted.
1618 (MFontScore): New type.
1619 (MFontList): Member changed.
1620 (struct MFontDriver): New member has_char. Types of members
1622 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1623 (Mapple_roman): Extern them.
1624 (OTF_Tag): Typedefed if not HAVE_OTF.
1625 (enum MFontOpenTypeTable): New enum.
1626 (MFontCapability): New type.
1627 (mfont__ft_drive_otf): Prototype adjusted.
1628 (mfont__score): Extern deleted.
1629 (mfont__merge): Extern it.
1630 (mfont__has_char): Extern it.
1631 (mfont__encode_char): Prototype adjusted.
1632 (mfont__open): Extern it.
1633 (mfont__set_spec): Prototype adjusted.
1634 (mfont__get_capability): Extern it.
1636 * font.c: Include "fontset.h".
1637 (M_font_capability, M_font_list, M_font_list_len): New variables.
1638 (font_score_priority): Change order of initial elements.
1639 (font_score_shift_bits): Fix array size.
1640 (common_weight): Add "thin", "semibold", and "heavy".
1641 (common_stretch): Add "ultracondensed", "extracondensed",
1642 "extraexpanded", and "utltraexpand".
1643 (font_weight_regular, font_weight_normal, font_weight_medium): New
1645 (gen_font_name): This function deleted.
1646 (find_encoding): Set font->encoding.
1647 (OTF_tag): New function.
1648 (otf_script_list): New variable.
1649 (load_otf_script_list): New function.
1650 (find_script_from_otf_tag): New function.
1651 (xlfd_parse_name): Set font->type and font->source.
1652 (mfont__free_realized): Free chains rfonts.
1653 (font_score): Renamed from mfont__score.
1654 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1655 (Mapple_roman): New variables.
1656 (mfont__init): Initilize new variables. Initalize
1657 default_encoding.encoding_name and
1658 default_encoding.encoding_charset to Municode_full and
1659 mcharset__unicode. Use SAFE* macros for allocating filepath
1661 (mfont__fini): Free otf_script_list.
1662 (mfont__id): New function.
1663 (mfont__match_p): Check also capability member of MFont.
1664 (mfont__merge): New funciton.
1665 (mfont__set_spec_from_face): Set type and source members.
1666 (mfont__set_spec_from_plist): Set capability and type members.
1667 (mfont__select): Argument changed.
1668 (mfont__available): New function.
1669 (compare_font_score): New function.
1670 (mfont__list): New function.
1671 (mfont__open): Return a realized font.
1672 (mfont__resize): Adjusted for the change of MFont.
1673 (mfont__has_char): New function.
1674 (mfont__encode_char): Argument changed.
1675 (mfont__set_spec): Argument changed.
1676 (free_font_capability): New function.
1677 (mfont__get_capability): New function.
1678 (MFontfile): New variable.
1679 (mfont_get_prop): Adjusted for the change of MFont.
1680 (mfont_put_prop): Likewise.
1681 (mfont_set_selection_priority): Fix the way of setting
1682 font_score_priority[].
1683 (mfont_find): Use mfont__list instead of mfont__select.
1684 (mfont_resize_ratio): Adjusted for the change of MFont.
1685 (mfont_list): Use mfont__list.
1686 (mfont_check): New function.
1687 (font_score): Make it static.
1689 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1690 (mfont__lookup_fontset): Likewise.
1692 * fontset.c (struct MFontset): Delete member font_spec_list.
1693 (struct MRealizedFontset): Type of member spec changed. New
1695 (load_font_group): Arg spec_list deleted.
1696 (load_fontset_contents): Adjusted for the change of fontset_def.
1697 (free_fontset): Fix the way of freeing fontset elements.
1698 (realize_fontset_elements): Argument changed.
1699 (get_per_script): New function.
1700 (free_realized_fontset_elements): Fix the way of feeing rfontset
1702 (update_fontset_elements): Fix args to realize_fontset_elements.
1703 (mfont__realize_fontset): New arg spec.
1704 (try_font_list): New function.
1705 (try_font_group): New arg request. Use try_font_list.
1706 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1708 (mfontset): Adjusted for the change of MFontset.
1709 (mfontset_copy): Likewise. Don't share plists.
1710 (mfontset_modify_entry): Adjusted for the change of MFontset.
1711 (mfontset_lookup): Call get_per_script.
1712 (mdebug_dump_fontset): Print also the address of fonts.
1714 * input.c (shift_state): Don't reset ic_info->vars.
1715 (take_action_list): Call MDEBUG_PRINT fore calling
1718 * internal-gui.h (MFontDriver): Don't typedef it here.
1720 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1721 (MXFont): This type deleted.
1723 (struct _MFontX): New struct.
1724 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1725 (MDisplayInfo): Member base_font_list deleted.
1726 (DEFAULT_FONT): Definition changed.
1727 (FALLBACK_FONT): This maclr deleted.
1728 (free_display_info): Adjusted for the change of MDisplayInfo.
1729 (free_device): Argument to mfont__free_realized changed.
1730 (xfont_driver): Adjusted for the change of MFontDriver.
1731 (xfont_registry_list): Use MFontX instead of MXFont.
1732 (MRealizedFontX): Renamed from MXFontInfo.
1733 (xfont_select): Return the font found first.
1734 (close_xfont): Change MXFontInfo to MRealizedFontX.
1735 (xfont_open): Return the realized font.
1736 (xfont_find_metric): Get xfont from rfont->fontp.
1737 (xfont_has_char): New function.
1738 (xfont_encode_char): Adjusted for the argument change.
1739 (xfont_render): Get xfont from rfont->fontp.
1740 (xfont_list): Adjusted for the argument change.
1741 (MRealizedFontXft): Renamed from MXftFontInfo.
1742 (xft_driver): Ajusted for the change of MFontDriver.
1743 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1744 (xft_open_font): Argument changed.
1745 (xft_open): Argument changed. Return the realized font.
1746 (xft_find_metric): Get xft_font from rfont->fontp.
1747 (xft_has_char, xft_encode_char): New functions.
1748 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1749 font if not yet opened.
1750 (device_open): Don't set frame->font.
1752 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1754 (gd_font_open): New function.
1755 (gd_render): Don't use the local variable ft_info.
1756 (device_init): Adjusted for the change of gd_font_driver.
1758 * textprop.c (mtext__prop_init): Initialize text_property_table.
1759 Call M17N_OBJECT_ADD_ARRAY.
1760 (mtext__prop_fini): Don't call mdebug__report_object.
1762 * plist.c (mplist__init): Initialize plist_table.
1763 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1764 (mplist__fini): Don't call mdebug__report_object.
1766 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1767 (mtext__fini): Don't call mdebug__report_object.
1768 (MTEXT_FORMAT_UTF_16): Correct type.
1769 (mtext_data): New function.
1770 (mtext_text): Fix calculation of limit and args to
1773 * language.c: Include "plist.h".
1774 (M_script_lang_list): New variable.
1775 (mlang__init): Read languages and their information from m17n
1777 (mlanguage__list): New function.
1778 (Miso639_1, Miso639_2): New variables.
1780 * language.h (mlanguage__list): Extern it.
1782 * database.c (get_database_stream): Use SAFE_* macros for
1783 allocating and freeing path.
1784 (mdatabase__init): Likewise.
1786 * symbol.c (msymbol__fini): Don't free symbols here.
1787 (msymbol__free_table): New function.
1788 (msymbol_is_managing_key): New function.
1790 * symbol.h (msymbol__free_table): Extern it.
1791 (msymbol__list): Extern it.
1793 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1795 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1796 (struct _M17NObjectArray): New member name and next.
1797 (mdebug__add_object_array): Extern it.
1798 (M17N_OBJECT_ADD_ARRAY): New macro.
1799 (mdebug__report_object): Don't extern it.
1801 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1803 * m17n-gui.c (free_frame): Don't free frame->font.
1804 (null_device_fini): Fix code for freeing
1805 null_device.realized_font_list.
1806 (m17n_fini_win): Free interface.
1807 (mframe): Cast the return value of dlsym. Set frame->font here.
1808 (mframe_get_prop): Check frame->rface->rfont before accessing the
1811 * m17n-gui.h (Mfontfile): Extern it.
1812 (mfont_check): Extern it.
1813 (mface_equal): Extern it.
1815 * m17n-core.c: Include "symbol.h".
1816 (report_header_printed): This variable deleted.
1817 (object_array_root): New variable.
1818 (report_object_array): New function.
1819 (mdebug__report_object): This function deleted.
1820 (mdebug__add_object_array): New function.
1821 (m17n_init_core): Call mchartable_init () before mtext_init ().
1822 (m17n_fini_core): Call report_object_array (if necessary) and
1823 msymbol__free_atable at the end.
1825 * m17n-core.h (msymbol_is_managing_key): Extern it.
1826 (mtext_data): Extern it.
1827 (MTEXT_FORMAT_UTF_16): Correct type.
1828 (M17NLIB_MINOR_VERSION): Changed to 3.
1829 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1831 * chartab.c (mchartable__init): Initalize chartable_table.count.
1832 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1833 mdebug__report_object.
1835 2005-05-26 Kenichi Handa <handa@m17n.org>
1837 * m17n.h (Miso639_1, Miso639_2): Extern them.
1839 * symbol.h (msymbol__list): Extern it.
1841 * symbol.c (msymbol__list): New function.
1843 2005-05-19 Kenichi Handa <handa@m17n.org>
1845 * input-gui.c (minput__win_init): Don't change the value of
1848 2005-05-16 Kenichi Handa <handa@m17n.org>
1850 * m17n-core.c (m17n_object): Be sure to initialize all members.
1852 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1854 2005-05-09 Kenichi Handa <handa@m17n.org>
1856 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1858 2005-04-27 Kenichi Handa <handa@m17n.org>
1860 * language.c (mlang__init): Add "an" (Aragonese).
1862 * word-thai.c: Add support for libthai.
1863 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1864 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1866 * mtext.c: Include "word-thai.h" conditionaly.
1867 (mtext__init): Call mtext__word_thai_init conditionaly.
1868 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1870 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1871 not WORDCUT_LD_FLAGS.
1873 2005-04-19 Kenichi Handa <handa@m17n.org>
1875 * word-thai.c (wordseg_propertize): Always unref the attached
1877 (thai_wordseg): Don't unref the property.
1879 2005-04-18 Kenichi Handa <handa@m17n.org>
1881 * word-thai.c: Include stdlib.h.
1882 (wordseg_propertize): Add dummy function for the case that wordcut
1883 library doesn't exist.
1884 (wordseg_propertize): Fix for old wordcut library.
1886 2005-04-16 Kenichi Handa <handa@m17n.org>
1888 * word-thai.c: Include <stdio.h>.
1890 2005-04-15 Kenichi Handa <handa@m17n.org>
1892 * draw.c: Include mtext.h.
1893 (linebreak_table, M_break_at_space, M_break_at_word)
1894 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1895 (compose_glyph_string): Check POS before getting Mface text
1897 (truncate_gstring): Give correct TO arg to line_break function.
1898 (GET_LB_TYPE): New macro.
1899 (find_break_backward, find_break_forward): New functions.
1900 (mdraw__init): Initialize the above new variables.
1901 (mdraw__fini): Free linebreak_table.
1902 (mdraw_default_line_break): Use find_break_backward and
1905 * word-thai.c: New file.
1907 * word-thai.h: New file.
1909 * mtext.c: Include word-thai.h.
1910 (wordseg_func_table): New variable.
1911 (mtext__init): Initialize wordseg_func_table and call
1912 mtext__word_thai_init.
1913 (mtext__fini): Call mtext__word_thai_fini, free
1915 (MTextWordsegFunc): New type.
1916 (mtext__word_segment): New function.
1918 * mtext.h (wordseg_func_table): Extern it.
1919 (mtext__word_segment): Extern it.
1921 * m17n.c (m17n_init): Fix typo (== -> =).
1923 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1924 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1926 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1927 (MTEXTPROP_VAL): New macros.
1929 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1931 2005-04-07 Kenichi Handa <handa@m17n.org>
1933 * database.c (load_chartable): Fix pursing of symbol name.
1935 2005-03-24 Kenichi Handa <handa@m17n.org>
1937 * m17n.c (m17n_init): Fix typo (== -> =).
1939 2005-03-11 Kenichi Handa <handa@m17n.org>
1941 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1943 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1945 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1948 2005-03-09 handa <handa@m17n.org>
1950 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1951 calling m17n_init ().
1953 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1954 calling m17n_init_core ().
1956 2005-02-28 Kenichi Handa <handa@m17n.org>
1958 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1961 2005-02-17 Kenichi Handa <handa@m17n.org>
1963 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1964 (M_description, M_command, M_variable): New variables.
1965 (load_im_info_keys): New variables.
1966 (load_im_info, check_command_keyseq, get_description_advance)
1967 (parse_command_list, get_command_list, parse_variable_list)
1968 (get_variable_list, input_method_hook): New functions.
1969 (command_list, variable_list): New variables.
1970 (minput__init): Put input_method_hook to Minput_method.
1971 Initialize M_description, M_command, M_variable, Mdetail_text,
1972 load_im_info_keys, command_list, variable_list.
1973 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1974 (Mdetail_text): New variable.
1975 (minput_get_description, minput_get_commands)
1976 (minput_assign_command_keys, minput_get_variables)
1977 (minput_set_variable): New functions.
1979 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1980 (minput_assign_command_keys, minput_get_variables)
1981 (minput_set_variable): Extern them.
1983 * plist.c (UNGETC): Just decrement st->p.
1984 (read_mtext_element): New arg skip.
1985 (read_integer_element): Likewise.
1986 (read_symbol_element): Likewise.
1987 (read_element): New arg KEYS.
1988 (mplist__from_plist): Don't increment ref-count of NULL object.
1989 (mplist__from_file): New arg KEYS.
1990 (mplist_put): Don't increment ref-count of NULL object.
1991 (mplist_add): Likewise.
1992 (mplist_push): Likewise.
1993 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1995 * plist.h (mplist__from_file): Prototype adjusted.
1997 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1998 (get_database_stream): New function.
1999 (load_database): Use get_database_stream.
2000 (M_database_hook): New variable
2001 (mdatabase__init): Initialize M_database_hook.
2002 (mdatabase__load_for_keys): New function.
2003 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2005 (mdatabase_define): Free mdb->extra_info if necessary.
2007 * database.h (mdatabase__dir_list, M_database_hook)
2008 (mdatabase__load_for_keys): Extern them.
2009 (MDatabaseHookFunc): New type.
2011 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2013 2004-12-27 Kenichi Handa <handa@m17n.org>
2015 * Version 1.2.0 released.
2017 2004-12-27 Kenichi Handa <handa@m17n.org>
2019 * input.c (minput_filter): Don't reset ic->xxx_changed.
2021 * mtext.c (mtext_from_data): Fix documentation.
2023 2004-12-25 Kenichi Handa <handa@m17n.org>
2025 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2026 (M17NLIB_VERSION_NAME): Update to "1.2.".
2028 2004-12-24 Kenichi Handa <handa@m17n.org>
2030 * input.c (reset_ic): Set key_unhandled to 0.
2032 2004-12-21 Kenichi Handa <handa@m17n.org>
2034 * m17n-gui.h (mfont_from_spec): Delete extern.
2036 * input-gui.c (win_callback): Handle Minput_reset.
2037 (minput__win_init): Register reset_ic as a callback for
2040 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2041 changed. At first, shift to the initial state.
2042 (minput__init): Initialize Minput_reset. Register reset_ic as a
2043 callback for Minput_reset.
2044 (Minput_reset): New variable.
2045 (minput_filter): Always set ic->xxx_changed to 0.
2046 (minput_reset_ic): New function.
2047 (integer_value): Fix typo ('>' -> '<') and calculation of length
2050 * m17n-core.c (merror_code): Change type to `int'.
2052 * m17n-misc.h (merror_code): Adjust type.
2054 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2056 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2057 (mtext_change_prop): Delete extern.
2059 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2060 to `int'. Move the documents to m17n-core.h.
2062 2004-12-13 Kenichi Handa <handa@m17n.org>
2064 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2065 (MTextProperty): Document it.
2067 2004-12-09 Kenichi Handa <handa@m17n.org>
2069 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2071 2004-12-03 Kenichi Handa <handa@m17n.org>
2073 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2074 m17n__gui_initialized): New externs.
2076 * m17n-core.h (enum M17NStatus): New enum.
2077 (m17n_status): Extern it.
2079 * m17n-core.c (core_initialized): Delete this variable.
2080 (m17n__core_initialized, m17n__shell_initialized,
2081 m17n__gui_initialized): New variables.
2082 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2083 instead of core_initialized.
2084 (m17n_status): New function.
2086 * m17n.c (shell_initialized): Delete this variable.
2087 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2090 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2092 * m17n-gui.c (win_initialized): Delete this variable.
2093 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2094 instead of gui_initialized.
2096 2004-11-19 Kenichi Handa <handa@m17n.org>
2098 * input.c (reset_ic): Check if ic_info->state is NULL.
2099 (filter): If ic_info->state is NULL, return 0.
2100 (load_input_method): Don't unref `maps' it it's not created.
2102 2004-11-15 Kenichi Handa <handa@m17n.org>
2104 * input.c (find_candidates_group): If INDEX is -1, find the last
2106 (take_action_list): If the previous of the first candidate is
2107 requested, select the last candidate.
2109 2004-11-08 Kenichi Handa <handa@m17n.org>
2111 * m17n-X.c (device_open): Try at most 32 fonts to find a
2112 non-autoscaled font.
2114 * font.c (xlfd_parse_name): Fix previous change.
2116 2004-11-05 Kenichi Handa <handa@m17n.org>
2118 * font.c: (commont_style): Include dummy elements "slanted" and
2119 "rslanted" to prefer "o" to "r" if "i" is requested.
2121 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2123 2004-10-29 Kenichi Handa <handa@m17n.org>
2125 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2127 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2128 New members smallest and larger.
2129 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2130 (xfont_registry_list): Likewise.
2131 (xfont_select): Likewise.
2134 2004-10-28 Kenichi Handa <handa@m17n.org>
2136 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2137 font name comparison.
2138 (xfont_select): Fix logic for selecting a larger size font.
2140 2004-10-25 Kenichi Handa <handa@m17n.org>
2142 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2145 2004-10-22 Kenichi Handa <handa@m17n.org>
2147 * input.c (update_candidate): Renamed from udpate_candidate.
2148 (take_action_list): Show more debugging info on arithmetic commands.
2150 * m17n-X.c (device_open): Fix previous change.
2152 * draw.c (compose_glyph_string): Don't get face property at the
2155 2004-10-21 Kenichi Handa <handa@m17n.org>
2157 * draw.c (compose_glyph_string): Fix for the case of category
2160 2004-10-19 Kenichi Handa <handa@m17n.org>
2162 * input.c (mdebug_mask): New variable.
2163 (shift_state): Print debug information.
2164 (take_action_list): Likewise.
2165 (handle_key): Likewise.
2167 2004-10-14 Kenichi Handa <handa@m17n.org>
2169 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2171 2004-10-13 Kenichi Handa <handa@m17n.org>
2173 * m17n-X.c (device_open): Be sure to register at least one font
2176 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2177 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2179 2004-10-12 Kenichi Handa <handa@m17n.org>
2181 * draw.c (alloc_gstring): Fix previous change.
2183 * font-ft.c (ft_list_generic): Fix for the case of not
2186 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2188 * font.c (mfont_list): If no font is found, return NULL.
2189 (load_font_encoding_table): Put entries of nil registry first.
2190 (find_encoding): Adjust for the above change.
2192 2004-10-11 Kenichi Handa <handa@m17n.org>
2194 * m17n-gui.h (mfont_list): Adjust prototype.
2196 * m17n-X.c (xfont_list): New arg maxnum.
2198 * font.h (struct MFontDriver): Change prototype of <list>.
2200 * font-ft.c (fc_generic_family_list): Delete it.
2201 (Mserif, Msans_serif, Mmonospace): Delete them.
2202 (M_generic_family_info): New variable.
2203 (enum GenericFamilyType): New enum.
2204 (struct GenericFamilyInfo): New struct.
2205 (generic_family_table): New variable.
2206 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2208 (add_font_info): Get style here.
2209 (ft_list_family): Don't initialize fc_config here. Don't list
2211 (ft_list_generic): New function.
2212 (ft_select): Pay attention to generic familes here.
2213 (ft_open): Fix calculation of ascent and descent.
2214 (ft_list): Pay attention to generic families.
2215 (mfont__ft_init): Initialize M_generic_family_info,
2216 generic_family_table, and fc_config..
2217 (mfont__ft_fini): Finalize generic_family_table.
2219 * draw.c (compose_glyph_string): Use more constant font for
2220 glyphs. Adjust for the member change in MGlyph.
2221 (layout_glyph_string): Adjust for the member change in MGlyph.
2222 (alloc_gstring): Intilize scracth_glyph to avoid
2223 compose_glyph_string on it.
2224 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2225 (mdraw_coordinates_position): Fix previous change.
2227 * internal-gui.h (glyph_category): New enum.
2228 (MGlyph): Change type of <category> to enum glyph_category.
2230 * face.c (mface__realize): Delete args langauge and charset.
2231 (mface__for_chars): Fix for the case that glyphs have different
2233 (mface__update_frame_face): Adjust for mface__realize change.
2235 * face.h (mface__realize): Adjust prototype.
2237 2004-10-05 Kenichi Handa <handa@m17n.org>
2239 * language.c (mlang__init): Add Akan.
2241 2004-10-04 Kenichi Handa <handa@m17n.org>
2243 * font-ft.c (add_font_info): Add instead of push the element.
2244 (ft_list_family): For generic fonts, try all
2245 substituted. families.
2247 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2248 (run_rule): Don't update cluster range here.
2249 (run_command): Update cluster range on appending a glyph.
2250 (run_otf): Update cluster range for glyphs generated by OTF.
2252 2004-10-02 Kenichi Handa <handa@m17n.org>
2254 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2256 2004-09-30 Kenichi Handa <handa@m17n.org>
2258 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2260 2004-09-30 Kenichi Handa <handa@m17n.org>
2262 * font.h: Include <fontconfig/fontconfig.h>.
2263 (MFTInfo): New member langset.
2264 (mfont__encoding_list): Extern it.
2266 * font.c (mfont__encoding_list): New function.
2267 (mdebug_dump_font_list): New function.
2269 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2270 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2272 (ft_family_list): New variable.
2273 (set_font_info): New arg basep. Callers changed.
2274 (fc_list): Check the return value of FcPatternGetString.
2275 (add_font_info): New arg plist. Callers changed. Update
2277 (ft_list_family): New function (merged fc_list and ft_list_all).
2278 (ft_select): Use ft_list_family.
2279 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2281 (mfont__ft_init): Initialize above new variables.
2282 (mfont__ft_fini): Free ft_family_list.
2283 (STRDUP_LOWER): New macro.
2284 (set_font_info): Use STRDUP_LOWER.
2285 (ft_list_family): Avoid duplicate addition of font path. Use
2287 (fc_decode_prop): Fix typo.
2289 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2290 (xfont_registry_list): Change argument disp_info to frame.
2292 (xfont_list_all): New function.
2293 (xfont_list): If FONT is not NULL, check all fonts.
2295 2004-09-28 Kenichi Handa <handa@m17n.org>
2297 * m17n-X.c (MXFont, MXFontList): New types.
2298 (MDisplayInfo): Delete members font_registry_list,
2299 iso8859_1_family_list, iso10646_1_family_list, new members
2300 font_list, base_font_list.
2301 (free_display_info): Adusted for the change of MDisplayInfo.
2302 (xfont_driver): Initialize with xfont_list.
2303 (font_compare): New function.
2304 (build_font_list): Deleted.
2305 (xfont_registry_list): New function.
2306 (xfont_select): Use xfont_registry_list.
2307 (xfont_list): New function.
2308 (device_open): Adusted for the change of MDisplayInfo.
2310 * font-ft.c (add_font_info): New arg languages. Callers changed.
2311 (fc_list): Get languages from fonts..
2312 (ft_list_all): Renamed from ft_list. Callers changed.
2313 (ft_list): New function.
2314 (mfont__ft_driver): Initalize with ft_list.
2316 * font.c (mfont_list): New function.
2318 * font.h (struct MFontDriver): New member `list'.
2319 (MFTInfo): New member languages.
2321 * m17n-gui.h (mfont_list): Extern it.
2323 2004-09-27 Kenichi Handa <handa@m17n.org>
2325 * internal-gui.h (struct MGlyphString): Delete members mt,
2326 sub_width, sub_lbrearing, sub_rbearing, and region.
2328 * draw.c (MSubTextExtents): New type.
2329 (layout_glyphs): New arg extents. Set its members.
2330 (layout_glyph_string): Adjusted for the above change.
2331 (alloc_gstring): Don't set gstring->mt.
2332 (truncate_gstring): Call line_break function with mt instead of
2335 2004-09-22 Kenichi Handa <handa@m17n.org>
2337 * mtext.c (count_utf_16_chars): Count each code of invalid
2340 2004-09-19 Kenichi Handa <handa@m17n.org>
2342 * mtext.c (default_utf_16, default_utf_32): Rename them to
2343 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2346 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2349 2004-09-13 Kenichi Handa <handa@m17n.org>
2351 * draw.c (Mlatin): Don't declare it here.
2352 (visual_order): Fix reordering of combining characters.
2353 (compose_glyph_string): Fix detection of script.
2354 (layout_glyphs): Don't fix reordering of combining characters
2356 (layout_glyph_string): Pay attention to
2357 control->disable_overlapping_adjustment.
2358 (truncate_gstring): Include at least on character in a line.
2359 (get_gstring): Always scan one full line.
2360 (mdraw__init): Don't initialize Mlatin here.
2361 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2362 have a font, use ascent/descent of an ASCII font. Allow
2363 ink_array_return and logical_array_return to be NULL.
2364 (mdraw_coordinates_position): Fix iteration.
2366 * font-ft.c (MFTtoProp): Member completely changed.
2367 (ft_to_prop): Adjusted for the above change.
2368 (ft_to_prop_size): Likewise.
2369 (set_font_info): Adjusted for the change of MFTtoProp.
2370 (fc_generic_family_list): New variable.
2371 (fc_list): Add special handling of generic font names.
2372 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2373 Initialize fc_generic_family_list.
2374 (mfont__ft_fini): Don't free ft_to_prop. Free
2375 fc_generic_family_list.
2376 (FC_vs_M17N_font_prop): New type.
2377 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2378 (fc_decode_prop, fc_encode_prop): New functions.
2379 (mfont__ft_parse_name): Use fc_decode_prop.
2380 (mfont__ft_unparse_name): Use fc_encode_prop.
2382 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2383 (MWDevice): Add member realized_font_list.
2384 (free_display_info): Don't free disp_info->realized_font_list.
2385 (free_device): Free device->realized_fontset_list.
2386 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2387 (device_open): Don't initialize disp_info->realized_font_list.
2388 (device_open): Initialize device->realized_font_list and set it to
2389 frame->realized_font_list.
2391 * fontset.c (try_font_group): New function.
2392 (mfont__lookup_fontset): Use try_font_group.
2394 * font.c (common_weight): Change the order of "regular".
2396 * face.c (Mlatin): Don't make it static.
2397 (mface__realize): Be sure to set work_gstring.frame.
2398 (mface__for_chars): Likewise.
2400 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2403 * internal-gui.h (Mlatin): Extern it.
2405 * m17n-gui.h (MDrawControl): New member
2406 disable_overlapping_adjustment.
2408 2004-09-06 Kenichi Handa <handa@m17n.org>
2410 * font-flt.c (run_otf): Fix typo ('}'->']').
2412 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2413 (COMBINING_PRECOMPUTED_P): New macros.
2415 * draw.c (layout_glyphs): Handle precomputed combining code.
2417 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2418 precomupted combining code.
2420 2004-09-03 Kenichi Handa <handa@m17n.org>
2422 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2425 2004-08-27 Kenichi Handa <handa@m17n.org>
2427 * face.c (mface_put_prop): If the new value is the same as the
2428 current one, don't increment frame->tick.
2430 2004-08-25 Kenichi Handa <handa@m17n.org>
2432 * fontset.c (mfontset): Initialize font_spec_list member.
2433 (mfontset_copy): Load fontset if necessary.
2435 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2436 'metrics' to for C++.
2438 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2441 2004-08-16 Kenichi Handa <handa@m17n.org>
2443 * Version 1.1.0 released.
2445 2004-08-13 Kenichi Handa <handa@m17n.org>
2447 * language.c (mlang__init): Add Dhivehi.
2449 * m17n-gui.c (Mx, Mfreetype): Delete it.
2450 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2452 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2453 (mfont_resize_ratio): Extern it.
2454 (MDrawGlyphInfo): New member logical_width;
2455 (MDrawGlyph): New type.
2456 (mdraw_glyph_list): Prototype adjusted.
2458 * m17n-X.c (xfont_open): Set type and fontp members.
2459 (xft_open): Likewise.
2461 * internal-gui.h (Mx, Mfreetype): Delete extern.
2463 * font.h (struct MRealizedFont): New member type and fontp.
2465 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2466 (Mx, Mfreetype): Declare here.
2467 (Mxft): New variable.
2468 (mfont_resize_ratio): New function.
2470 * font-ft.c (ft_open): Set type and fontp members.
2472 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2475 2004-08-11 Kenichi Handa <handa@m17n.org>
2477 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2480 2004-08-06 Kenichi Handa <handa@m17n.org>
2482 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2485 * font-flt.c (run_otf): Print debugging information if necessary.
2487 2004-08-05 Kenichi Handa <handa@m17n.org>
2489 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2490 positioning_type 5 and 6. Switch simplified.
2492 2004-08-04 Kenichi Handa <handa@m17n.org>
2494 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2496 2004-08-02 Kenichi Handa <handa@m17n.org>
2498 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2499 set val to 1 even if it is greater than 1.
2501 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2503 2004-07-29 Kenichi Handa <handa@m17n.org>
2505 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2506 debugging information.
2508 * internal.h (MDEBUG_PRINT5): New macro.
2510 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2511 the previous one if the zero width glyph has left or right
2514 2004-07-26 Kenichi Handa <handa@m17n.org>
2516 * m17n-X.c (xft_render): Pay attention to members left_padding and
2517 right_padding of MGlyph.
2519 * draw.c (visual_order): Allocate one more elements for arrays as
2520 a workaround of fribidi bug.
2521 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2522 instead of MGlyph->bidi_sensitive.
2523 (layout_glyph_string): Pay attentinon to
2524 control->orientation_reversed when padding at the head or tail.
2525 Fix adjustment of space glyph width.
2526 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2529 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2530 instead of MGlyph->bidi_sensitive.
2532 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2534 2004-07-26 Kenichi Handa <handa@m17n.org>
2536 * draw.c (visual_order): Don't treat combined glyphs specially.
2537 (layout_glyphs): Don't get metrics glyphs that are already ready.
2538 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2539 width with the previous one.
2540 (draw_background): Fix bar cursor position on a r2l glyph.
2542 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2543 (run_rule): Fix place of updating cluster_begin_pos and
2544 cluster_end_pos here.
2545 (run_otf): Don't set left_padding.
2547 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2549 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2550 Fix handling of GPOS.
2551 (mfont__ft_drive_gpos): Delete this function.
2553 * font.h (mfont__ft_drive_otf): Renamed back from
2554 mfont__ft_drive_gsub.
2555 (mfont__ft_drive_gpos): Delete extern.
2557 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2558 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2560 2004-07-23 Kenichi Handa <handa@m17n.org>
2562 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2563 the same bidi level.
2565 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2567 2004-07-22 Kenichi Handa <handa@m17n.org>
2569 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2571 2004-07-20 Kenichi Handa <handa@m17n.org>
2573 * draw.c (render_glyphs): Fix checking of g->code validity.
2575 * face.c (mface__realize): Set g.type.
2577 2004-07-18 Kenichi Handa <handa@m17n.org>
2579 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2582 * m17n-gui.c (mframe): Print error message give by dlopen to
2585 2004-07-16 Kenichi Handa <handa@m17n.org>
2587 * draw.c (compose_glyph_string): Improve the way of deciding a
2588 script. For a character that doesn't have script property, use
2589 the last non-latin script.
2591 * font-ft.c (fc_list): Cancel previous change.
2592 (mfont__ft_init): Add more entries in ft_to_prop_name.
2594 2004-07-15 Kenichi Handa <handa@m17n.org>
2596 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2597 previous or next character glyphs.
2599 2004-07-14 Kenichi Handa <handa@m17n.org>
2601 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2602 of type GLYPH_SPACE.
2604 * fontset.c (mfont__lookup_fontset): If glyph type is
2605 GLYPH_SPACE, get codes for SPACE.
2607 * internal-gui.h (Mfont): Delete extern.
2609 * m17n-gui.h (Mfont): Delete duplicated extern.
2611 2004-07-13 Kenichi Handa <handa@m17n.org>
2613 * font-ft.c (DEVICE_DELTA): New macro.
2614 (adjust_anchor): New function.
2615 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2617 (mfont__ft_drive_gpos): New function.
2619 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2620 (FontLayoutContext): Delete member `rfont'.
2621 (run_otf): Set g->otf_cmd. Call
2622 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2623 only whne HAVE_OTF is defined.
2625 * fontset.c: Include "config.h".
2627 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2628 (MGlyph): New member otf_cmd.
2630 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2631 (mfont__ft_drive_gpos): Extern it.
2633 * face.c: Include "config.h".
2635 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2637 * input-gui.c: Include "config.h".
2639 * plist.c: Include "config.h".
2641 2004-07-06 Kenichi Handa <handa@m17n.org>
2643 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2644 internal-gui.h: Cancel previous changes.
2646 * m17n-gd.h: Delete it.
2648 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2649 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2650 @XML2_LD_FLAGS@ to above.
2651 (libm17n_la_LIBADD): Add -ldl.
2652 (libm17n_la_LDFLAGS): Add -export-dynamic.
2653 (X_LD_FLAGS): Fix the order of linking.
2654 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2655 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2656 (libm17n_X_la_LDFLAGS): Add -module.
2657 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2658 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2659 (libm17n_gd_la_LDFLAGS): Add -module.
2660 (include_HEADERS): Delete m17n-gd.h.
2662 2004-06-30 Kenichi Handa <handa@m17n.org>
2664 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2665 (MDeviceLibraryInterface): Delete it.
2666 (register_device_library): Delete it.
2667 (m17n__device_library_list): Renamed from device_library_list.
2669 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2670 (m17n_init_win): Adjust prototype.
2672 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2673 (m17n_init_gd): New function.
2675 * m17n-gd.h: New file.
2677 * m17n-X.h: Include <m17n-gui.h>.
2678 (m17n_init_X): Extern it.
2679 (M17N_INIT): Redefine it.
2681 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2682 (m17n_init_X): New function.
2684 * internal-gui.h (m17n__device_library_list): Extern it.
2685 (struct MDeviceDriver): New members initialized, init, and fini.
2687 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2689 (libm17n_X_la_LIBADD): Delete aboves.
2690 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2691 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2692 (libm17n_gd_la_LDFLAGS): Delete it.
2693 (include_HEADERS): Add m17n-gd.h.
2695 2004-06-25 Kenichi Handa <handa@m17n.org>
2697 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2698 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2700 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2702 * font-ft.c (fc_list): If FcFontList finds no font, try
2705 * draw.c (compose_glyph_string): Terminate the last loop after
2706 doing default combining if necessary.
2708 2004-06-24 Kenichi Handa <handa@m17n.org>
2710 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2712 * character.c (mchar_define_property): Add const to an arg.
2714 * charset.c (mchar_define_charset): Add const to an arg.
2716 * coding.c (MCodingSystem): Add const to an arg or decoder.
2717 (finish_decoding): Add const to an arg.
2718 (decode_coding_charset, decode_coding_utf_8)
2719 (decode_coding_utf_16, decode_coding_utf_32)
2720 (decode_coding_iso_2022, decode_coding_sjis)
2721 (mconv_define_coding): Likewise.
2723 * m17n-X.c (xft_find_metric): Delete unused variable.
2725 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2728 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2731 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2732 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2734 * mtext.h (mtext__from_data): Ajust prototype.
2736 2004-06-23 Kenichi Handa <handa@m17n.org>
2738 * draw.c (compose_glyph_string): Always get glyph codes by
2740 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2741 (mdraw_glyph_list): New function.
2743 * font-flt.c (mfont__flt_run): Be sure to call
2744 rfont->driver->encode_char.
2746 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2747 (ft_encode_char): Delete arg C.
2748 (ft_render): Don't call FT_Get_Char_Index.
2750 * font.c (mfont__encodable_p): Delete it.
2751 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2753 * font.h (struct MFontDriver): Delete arg C of encode_char.
2754 (mfont__encodable_p): Delete extern.
2756 * m17n-X.c (xfont_encode_char): Delete arg C.
2757 (xft_find_metric): Don't cal FT_Get_Char_Index.
2758 (xft_render): Likewise.
2760 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2762 (mdraw_glyph_list): Extern it.
2764 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2766 2004-06-22 Kenichi Handa <handa@m17n.org>
2768 * m17n-gui.h (mfontset_lookup): Extern it.
2770 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2772 * fontset.c (realize_fontset_elements)
2773 (free_realized_fontset_elements, update_fontset_elements): New
2775 (mfont__realize_fontset): Call realize_fontset_elements.
2776 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2777 (mfont__lookup_fontset): If a fontset was modified, update
2778 the realized fontset.
2779 (mfontset_modify_entry): Increment fontset->tick.
2780 (mfontset_lookup): New function.
2782 2004-06-21 Kenichi Handa <handa@m17n.org>
2784 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2786 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2787 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2788 length of source text 0.
2790 2004-06-21 Kenichi Handa <handa@m17n.org>
2792 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2793 (compare): Pay attention to format other than utf-8.
2794 (copy): Delete this function.
2795 (count_by_utf_8, count_by_utf_16, insert): New functions.
2796 (count_utf_16_chars): Fix handling of a surrogate pair.
2797 (find_char_forward, find_char_backward): Likewise.
2798 (mtext__from_data): Delete unnecessary check. Fix number of
2800 (mtext_from_data): Don't count items.
2801 (mtext_ref_char): Optimize the code.
2802 (mtext_set_char): Pay attention to format other than utf-8.
2803 (mtext_cat_char): Likewise.
2804 (mtext_dup): Don't call copy, instead do allocation here.
2805 (mtext_cat): Call insert instead of copy.
2806 (mtext_ncat): Likewise.
2807 (mtext_cpy): Delete character at first and call insert instead of
2809 (mtext_ncpy): Likewise.
2810 (mtext_copy): Likewise.
2811 (mtext_duplicate): Call insert instead of copy.
2812 (mtext_del): Pay attention to format other than utf-8.
2813 (mtext_ins): Simply call insert.
2814 (mtext_ins_char): Pay attention to format other than utf-8.
2815 (mtext_tok): Call insert instead of copy.
2816 (mtext_text): Call UNIT_BYTES.
2818 * textprop.c (mtext__adjust_plist_for_change): New function.
2820 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2821 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2822 (CHAR_UNITS_AT): Fix typo.
2823 (CHAR_UNITS_BY_HEAD): Fix typo.
2824 (STRING_CHAR_AND_UNITS): Fix typo.
2826 * internal.h (MTEXT_READ_ONLY_P): New macro.
2828 * mtext.h (mtext__replace): Delete the extern.
2829 (mtext__adjust_foramt): Adjust prototype.
2831 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2832 if possible. Otherwise make a copy of mmt.
2834 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2837 2004-06-18 Kenichi Handa <handa@m17n.org>
2839 * character.h (CHAR_STRING_UTF16): Fix syntax.
2841 2004-06-16 Kenichi Handa <handa@m17n.org>
2843 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2844 (libm17n_X_la_LIBADD): Delete it.
2845 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2847 * m17n-X.c (device_open): Add parens in `if' condition.
2849 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2850 (DEC_POSITION): Likewise.
2851 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2853 2004-06-15 Kenichi Handa <handa@m17n.org>
2855 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2858 * draw.c (compose_glyph_string): If langauge is specified, call
2859 mface__for_chars even if a text is all latin. Fix condition for
2860 setting non_ascii_found.
2862 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2864 * m17n.h (minput_char_to_key): Delete extern.
2866 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2868 * m17n-gui.c (null_device_open): Set several members of frame.
2870 2004-06-14 Kenichi Handa <handa@m17n.org>
2872 * m17n-gui.h (minput_event_to_key): Delete extern.
2874 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2876 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2878 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2880 2004-06-08 Kenichi Handa <handa@m17n.org>
2882 * character.c (mchar_put_prop): Don't increment the ref-count of
2885 2004-06-04 Kenichi Handa <handa@m17n.org>
2887 * m17n-core.c (mdebug__register_object): New function.
2888 (mdebug__unregister_object): Likewise.
2890 * internal.h (mdebug__register_object, mdebug__unregister_object):
2892 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2895 * charset.c (mcharset__load_from_database): Don't call
2896 mconv__register_charset_coding here.
2898 * coding.c (find_coding): Get a real name from an element of
2899 coding_definition_list.
2900 (mconv__register_charset_coding): Set the real name at the top of
2902 (mcoding__load_from_database): Likewise.
2903 (mconv_list_codings): Adjusted for the above change.
2905 2004-06-03 Kenichi Handa <handa@m17n.org>
2907 * coding.c (find_coding): Find by canonicalized name. Don't have
2908 to modify the element of coding_definition_list by
2910 (mconv__define_coding_from_charset): Delete it.
2911 (mconv__register_charset_coding): Canonicalize sym.
2912 (mcoding__load_from_database): Register plist modified by
2915 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2917 * font-ft.c (ft_open): Fix setting of rfont->descent.
2919 2004-06-02 Kenichi Handa <handa@m17n.org>
2921 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2922 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2923 (xlfd_unparse_name): Renamed from xfont_build_name.
2924 (mfont__init): Initialized Mfontconfig.
2925 (mfont__free_realized): Unconditionally unref rfont->info.
2926 (mfont__select): Free `this' if it's not best.
2927 (mfont__open): Don't check frame->realized_font_list.
2928 (mfont__parse_name_into_font): New function.
2929 (Mfontconfig): New variable.
2930 (mfont_from_name): Call mfont_parse_name.
2931 (mfont_name): Call mfont_unparse_name.
2932 (mdebug_dump_font): Likewise.
2934 * font.h (struct MFontDriver): Delete members parse_name and
2936 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2937 (mfont__parse_name_into_font): Extern it.
2939 * font-ft.c: Include "symbol.h".
2940 (close_ft): Unconditionally free filename and charmap_list of
2942 (ft_open): Duplicate base->filename. Increment ref-count of
2943 ft_info->charmap_list. Free ft_info->charmap_list and
2944 ft_info->filename on error.
2945 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2947 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2949 (enum xlfd_field_idx): Moved to font.c.
2950 (split_font_name, build_font_name): Likewise.
2951 (build_font_list): Call mfont__parse_name_info_font.
2952 (xfont_open): Call mfont__unparse_name. Free name.
2953 (xfont_parse_name, xfont_build_name): Moved to font.c
2954 (xft_select): Prototype deleted.
2955 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2956 Call mfont_pase_name.
2958 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2959 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2962 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2965 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2967 2004-06-01 Kenichi Handa <handa@m17n.org>
2969 * fontset.c (mfontset_modify_entry): Pay attention to the case
2970 that fontset->font_spec_list is NULL.
2972 2004-05-31 Kenichi Handa <handa@m17n.org>
2974 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2976 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2978 * font.c (mfont__select): Print score the a font for debugging.
2980 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2982 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2983 kanji_sym and kana_sym.
2985 2004-05-28 Kenichi Handa <handa@m17n.org>
2987 * Makefile.am (VINFO): New variable.
2988 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2989 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2991 2004-05-27 Kenichi Handa <handa@m17n.org>
2993 The following chanages are to make device dependent functions
2994 accessible only from MDeviceDriver structure, and to add GD and
2995 null device drivers. Font drivers get also device dependent.
2997 * m17n.c (m17n_init): Increament shell_initialized.
2998 (m17n_fini): Decremented shell_initialized.
3000 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3002 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3003 (Mwidget, Mcolormap, Mx): Extern them.
3005 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3006 (free_frame): Call frame->driver->close instead of
3008 (DLOPEN_SHLIB_EXT): New macro.
3009 (MDeviceLibraryInterface): New type.
3010 (device_library_list): New variable.
3011 (register_device_library): New function.
3012 (null_device): New variable.
3013 (null_device_close, null_device_get_prop)
3014 (null_device_realize_face, null_device_free_realized_face): New
3016 (null_driver): New variable.
3017 (null_device_init, null_device_fini, null_device_open): New
3019 (null_interface): New variable.
3020 (Mfreetype, Mdevice): Declare them.
3021 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3022 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3023 Mwin__Close_Device. Register drivers for Mx and Mgd.
3024 (m17n_fini_win): Decremented win_initialized. Call "fini"
3025 function of all opened devices. Don't call mwin__fini.
3026 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3028 (mframe): Handle Mdevice key of PLIST.
3029 (mframe_get_prop): Call frame->device->get_prop instead of
3030 mwin__device_get_prop.
3032 * m17n-gd.c: New file.
3034 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3035 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3037 * m17n-core.c (m17n_init_core): Increate core_initialized.
3038 (m17n_fini_core): Decremented core_initialized.
3040 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3041 (Mcolormap): Don't extern them here.
3043 * m17n-X.c (FRAME_DEVICE): New macro.
3044 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3045 (free_display_info): Use MPLIST_DO.
3046 (free_device): Free rface->info.
3047 (xft_close): Delete it.
3048 (device_init): Renamed from mwin__init.
3049 (device_fini): Renamed from mwin__fini.
3050 (device_open): Renamed from mwin__open_device.
3051 (x_driver): New variable.
3052 (MXFontInfo): Delete member frame, add member display.
3053 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3054 Don't declare them here.
3056 * internal-gui.h (MDeviceType): New enum.
3057 (MWDefice): Delete it.
3058 (struct MFrame): Change type of device to void *. New members
3059 device_type, driver, font_driver_list.
3060 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3061 (MDeviceDriver): New type.
3062 (Mx, Mgd, Mfreetype): Extern them.
3063 (mwin__XXX): Delete all of them.
3065 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3067 (win_destroy_ic): Likewise.
3068 (adjust_window_and_draw): Likewise.
3069 (win_callback): Likewise.
3070 (Mxim): Declare it here.
3071 (minput_event_to_key): Call M_CHECK_READABLE.
3073 * fontset.c (mfont__lookup_fontset): Delete local variable
3076 * font.h (struct MFontDriver): Delete member close, add members
3077 parse_name and build_name.
3078 (mfont__driver_list): Delete extern.
3079 (mfont__close): Delete extern.
3081 * font.c (mfont__init): Don't set mfont__driver_list.
3082 (mfont__fini): Don't unref mfont__driver_list.
3083 (mfont__select): Try font drivers in frame->font_driver_list. Set
3084 driver member of a realized font.
3085 (mfont__close): Delete it.
3086 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3087 functions of the default frame.
3089 * font-ft.c (close_ft): Check ft_info->ft_face and work
3091 (add_font_info): Allocate ft_info by M17N_OBJECT.
3092 (ft_close): Delete it.
3093 (mfont__ft_driver): Don't set ft_close.
3094 (ft_select): Increment ref-count of best_font.
3095 (ft_open): Decremented ref-count of base. On error, call
3096 FT_Done_Face and free ft_info.
3097 (ft_find_metric): Always use XXX_MONO in load_flags.
3098 (ft_render): Fix setting of width. Call
3099 frame->driver->draw_points instead of mwin__draw_points.
3100 (ft_to_prop): Don't set mfont__driver_list.
3101 (mfont__ft_fini): Just unref ft_info.
3103 * face.c (mface__init): Exchange foreground and background of
3104 mface__default. Call mface_put_prop to set hline of
3106 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3107 (mface__free_realized): Don't call mwin__free_realized_face.
3109 * draw.c (Mdepth): Don't declare it here.
3110 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3111 (render_glyphs, render_glyph_string): Likewise.
3112 (mdraw__init): Don't set Mdepth.
3113 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3115 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3117 (mdraw_text_items): Check FRAME is writable.
3118 (mdraw_per_char_extents): Implement body.
3120 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3122 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3123 (GUI_SOURCES): Delete it.
3124 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3125 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3126 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3127 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3128 (linkgui_LDADD): Set to libm17n-gui.la
3129 (linkgui_LDFLAGS): New target.
3130 (SRC): Include ${libm17n_gui_la_SOURCES} and
3131 ${libm17n_gd_la_SOURCES}.
3133 2004-05-24 Kenichi Handa <handa@m17n.org>
3135 * draw.c (draw_background): Don't draw background even if
3136 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3138 2004-05-22 Kenichi Handa <handa@m17n.org>
3140 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3142 2004-05-20 Kenichi Handa <handa@m17n.org>
3144 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3146 * m17n-gui.c: Include "plist.h".
3147 (mframe): If PLIST is NULL, initialize it to emply plist.
3149 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3150 (xft_driver): New variable.
3151 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3152 (xft_find_metric, xft_render): New function.
3153 (mwin__init): Adjusted for the new mfont__driver_list.
3154 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3155 generated face to PARAM.
3156 (mwin__realize_face): Fix setting of box colors. Don't call hook
3158 (mwin__draw_hline): New function.
3159 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3160 (mwin__xft_render): Delete these function.
3162 * internal-gui.h (struct MFrame): New member tick.
3163 (struct MGlyphString): New member tick.
3164 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3165 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3166 (mwin__xft_render): Delete extern.
3168 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3169 (mfontset): Always increment the reference count of returned
3172 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3173 (MFTInfo): Moved to font.h.
3174 (ft_iso8859_1_font_list): Delete this variable.
3175 (set_font_info): Don't set font->property[MFONT_TYPE].
3176 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3177 (add_font_info): Change type to void.
3178 (fc_list): Change anme from xft_list. Caller changed. Include
3179 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3180 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3181 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3182 (close_ft): Don't call mwin__xft_close. Unref
3183 ft_info->extra_info.
3184 (ft_open): Don't setup ft_info->fontname. Don't call
3186 (ft_find_metric): Don't call mwin__xft_get_metric.
3187 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3188 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3189 (mfont__ft_init): Adjusted for new mfont__driver_list.
3190 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3192 * font.c (mfont__driver_list): Make it MPlist.
3193 (mfont__init): Adjust initialization of mfont__driver_list.
3194 (mfont__fini): Free mfont__driver_list.
3195 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3196 (mfont__select): Adjusted for the new mfont__driver_list.
3198 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3199 (mfont__drirver_list): Adjust prototype.
3200 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3202 * face.h (struct MFace): Delete member realized_face_list, add
3204 (struct MRealizedFace): Delete member need_update
3205 andnofont_rface, add member non_ascii_list.
3206 (mface__update_frame_face): Extern it.
3208 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3210 (get_hline_create, get_box_create): New functions.
3211 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3213 (free_face): Cancep previous change. Free face->frame_list.
3214 (serialize_hline): Do nothing if hline->width is zero.
3215 (serialize_box): Do nothing if box->width is zero.
3216 (mface__init): Setup all properties of mface__default.
3217 (mface__fini): Free hline_prop_list and box_prop_list.
3218 (mface__realize): Cancel previous change. Update
3219 face->frame_list. Setup rface->non_ascii_list.
3220 (mface__for_chars): Update rface->non_ascii_list.
3221 (mface__free_realized): Free rface->non_ascii_list.
3222 (mface__update_frame_face): New function.
3223 (mface): Initialize face->frame_list.
3224 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3226 (mface_merge): Likewise.
3227 (mface_put_prop): If key is Mhline or Mbox, get value by
3228 get_hline_create or get_box_create respectively.
3229 (mface_put_prop): Update frame->tick and call
3230 mface__update_frame_face if necessary.
3231 (mface_update): Do nothing if func is noop_hook.
3233 * draw.c (render_glyphs): If a font is not found, use
3234 mwin__draw_empty_boxes.
3235 (alloc_gstring): Initialize gstring->tick.
3236 (get_gstring): Check gstring->tick.
3238 2004-05-17 Kenichi Handa <handa@m17n.org>
3240 * face.c (find_realized_face): Return value changed. If RFONT is
3241 NULL, avoid unnecessary checking.
3242 (free_face): Free face->realized_face_list.
3243 (mface__realize): Adjusted for the change of find_realized_face.
3244 If it returns a realized face that needs update, free it and
3245 realize a new one. Push a new realized face to
3246 frame->realized_face_list instead of appending.
3247 (mface__for_chars): Adjusted for the change of find_realized_face.
3248 Short cut if the required font is in rface->ascii_rface.
3249 (mface_put_prop): Free old value if necessary. Set need_update
3250 member of realized faces to 1.
3252 * face.h (struct MFace): Delete member tick, add member
3254 (struct MRealizedFace): Delete member tick, add member
3257 2004-05-13 Kenichi Handa <handa@m17n.org>
3259 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3261 2004-05-12 Kenichi Handa <handa@m17n.org>
3263 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3265 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3266 parse it XftNameParse.
3268 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3269 (all_fonts_scaned): New variable.
3270 (set_font_info): FAMILY may be Mnil.
3271 (add_font_info): Argument changed.
3272 (xft_list): Call add_font_info in it.
3273 (ft_list): Likewise.
3274 (ft_select): Make it work in the case family is Mnil.
3275 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3276 (mfont__ft_fini): Set all_fonts_scaned to 0.
3278 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3279 that is failed to open.
3281 2004-05-10 Kenichi Handa <handa@m17n.org>
3283 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3284 device's depth is 1 (i.e. monochrome).
3286 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3287 to work around the problem of libtool.
3289 * font-ft.c: Include <freetype/ftbdf.h>.
3290 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3292 (mfont__ft_init): Initialize them.
3293 (ft_iso8859_1_font_list): New variable.
3294 (set_font_info): Detect a font containing iso8859-1 glyphs and
3295 register it in ft_iso8859_1_font_list. If the font is not
3296 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3297 properties of the font from its properties.
3298 (add_font_list): If the font is not scalable, check if it is BDF
3299 or PCF font. If not, ignore it.
3300 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3301 registry is not iso8859-1.
3302 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3303 ft_iso8859_1_font_list.
3304 (ft_find_metric): If the font is not scalable, assume it as BDF
3305 or PCF, and get a metric from its properties.
3306 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3308 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3310 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3311 (libm17n_la_LDFLAGS): Delete it.
3312 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3313 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3315 2004-05-06 Kenichi Handa <handa@m17n.org>
3317 * draw.c (compose_glyph_string): Fix previous change.
3319 2004-04-30 Kenichi Handa <handa@m17n.org>
3321 * font-ft.c (ft_list): Delete unused variable `result'.
3322 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3324 2004-04-27 Kenichi Handa <handa@m17n.org>
3326 * m17n-X.c: Include config.h
3327 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3328 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3329 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3330 (FRAME_CMAP, FRAME_VISUAL): New macros.
3331 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3332 (xfont_driver): Make it static.
3333 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3334 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3335 info->xft_color_back.
3336 (MXftFontInfo) [HAVE_XFT2]: New type.
3337 (mwin__xft_close) [HAVE_XFT2]: New function.
3338 (mwin__xft_open) [HAVE_XFT2]: New function.
3339 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3340 (mwin__xft_render) [HAVE_XFT2]: New function.
3342 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3343 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3344 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3347 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3349 * font-ft.c: Don't include FT_FREETYPE_H here.
3350 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3351 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3352 (MFTInfo): New member charmap_index.
3353 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3354 (check_otf_filename): Renamed from check_filename. Return value
3356 (ft_set_property): This function deleted.
3357 (set_font_info): New function.
3358 (add_font_list): Argument changed. Add multiple fonts.
3359 (xft_list) [HAVE_XFT2]: New function.
3360 (ft_list) [not HAVE_XFT2]: New function.
3361 (ft_select): Add code for Xft.
3362 (close_ft): Likewise.
3363 (ft_open): Likewise.
3364 (ft_find_metric): Likewise.
3365 (ft_encode_char): Likewise.
3366 (ft_render): Likewise.
3368 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3370 2004-04-26 Kenichi Handa <handa@m17n.org>
3372 * textprop.c (mtext_attach_property): Declare the return type as
3375 2004-04-21 Kenichi Handa <handa@m17n.org>
3377 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3379 2004-04-09 Kenichi Handa <handa@m17n.org>
3381 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3383 (load_command): Setup above members.
3385 2004-04-05 Kenichi Handa <handa@m17n.org>
3387 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3389 2004-03-30 Kenichi Handa <handa@m17n.org>
3391 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3394 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3395 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3397 2004-03-29 Kenichi Handa <handa@m17n.org>
3399 * Version 1.0 Patch Level 2 released.
3401 2004-03-29 Kenichi Handa <handa@m17n.org>
3403 * charset.c (make_charset): Set charset->fully_loaded and
3404 charset->simple correctly. Don't try to get charset->min_char and
3405 charset->max_char for a charset of method subset and superset.
3406 Don't load a mapping file here.
3407 (mcharset__init): Set unified_max.
3408 (mcharset__load_from_database): Free a working plist.
3410 * coding.c (mcoding__fini): Free all malloced data.
3412 * input-gui.c (win_create_ic): Set control.as_image for preediting
3415 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3416 `count') to initialize the array.
3418 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3421 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3423 (mwin__create_window): Fix bug of setting a background pixel of a
3425 (mwin__adjust_window): Clear the window before drawing.
3427 * m17n-core.c (mdebug__report_object): Free array->objectes if
3429 (m17n_init_core): Don't set report_header_printed to 0 here.
3430 Fix debugging information.
3431 (m17n_fini_core): Set report_header_printed to 0 here.
3433 * m17n-core.h (mplist_deserialize): Extern it.
3435 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3437 * m17n.c (m17n_fini): Fix debugging information.
3439 * mtext.c (mtext__adjust_foramt): New function.
3441 * mtext.h (mtext__adjust_foramt): Extern it.
3443 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3445 * plist.h (mplist__deserialize): Don't extern it.
3447 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3448 elements of symbol_table to NULL. Report about created and freed
3449 symbols if MDEBUG_FINI is set.
3451 2004-03-22 Kenichi Handa <handa@m17n.org>
3453 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3455 * m17n.c (m17n_init): Fix the way of checking merror_code.
3457 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3459 2004-03-22 Kenichi Handa <handa@m17n.org>
3461 * fontset.c (realize_font_group): Adjust the font size by
3462 mfont__resize before selecting a font.
3464 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3466 2004-03-19 Kenichi Handa <handa@m17n.org>
3468 * Version 1.0 Patch Level 1 released.
3470 2004-03-19 Kenichi Handa <handa@m17n.org>
3472 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3474 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3476 2004-03-19 Kenichi Handa <handa@m17n.org>
3478 Re-apply the changes forgotten in the released version.
3480 * charset.c (mcharset__load_from_database): Call
3481 mchar_define_charset.
3483 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3484 (mconv_encode_range): Put Mcoding text property.
3486 2004-03-18 Kenichi Handa <handa@m17n.org>
3488 * draw.c (Mdepth): New variable.
3489 (visual_order): Delete unused local var `pos'.
3490 (compose_glyph_string): Fix for the case that gstring->glyphs is
3491 realloced. Stop generating glyphs at TO. Fix handling of
3493 (layout_glyphs): Get metrics of all glyphs in advance. Set
3494 lbearing and rbearing of base of composition glyph correctly.
3495 Handle left-overhang glyphs correctly.
3496 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3498 (dump_combining_code): Change the defualt off_x character to ".".
3499 (mdraw__init): Initialize Mdepth.
3501 * face.c (work_gstring): New variable
3502 (mface__init): Initialize work_gstring.
3503 (mface__fini): Free work_gstring.glyphs.
3504 (mface__realize): Don't handle videomode property here. Adjusted
3505 for the change of mfont__get_metric.
3506 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3508 * face.h (enum face_gc): Moved to m17n-X.c.
3510 * font.h (struct MFontDriver): Arguments of find_metric changed.
3511 (mfont__select): Prototype adjusted.
3512 (mfont__get_metric): Likewise.
3513 (mfont__ft_drive_otf): Likewise.
3514 (mfont__flt_run): Likewise.
3516 * font.c (mfont__select): New argument layouter. If layouter is
3517 different in the registered font, make a new copy of realized
3519 (mfont__get_metric): Argument changed. Get metrics of multiple
3521 (mfont_find): Call mfont__select with layouter as Mnil.
3523 * font-flt.c (FontLayoutContext): New member rfont.
3524 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3525 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3527 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3529 (NUM_POINTS): New macro.
3530 (MPointTable): New type.
3531 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3532 (mfont__ft_drive_otf): New argument rfont.
3534 * fontset.c (realize_font_group): Adjusted for the changed of
3536 (check_fontset_element): This function deleted.
3538 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3539 off the parent window if the preedit text is zero length.
3541 * internal-gui.h (struct MFrame): New members foreground,
3542 background, videomode, font.
3543 (struct MGlyphString): New member anti_alias.
3544 (MDrawPoint): New type.
3545 (mwin__draw_bitmap): Prototype deleted.
3546 (mwin__draw_points): Prototype added.
3548 * m17n-gui.h (MDrawControl): New member anti_alias.
3550 * m17n-gui.c (free_frame): Free frame->font.
3551 (mframe): Set the fontset of frame->face to the default fontset.
3553 * m17n-X.c (RGB_GC): New type.
3554 (enum gc_index): Renamed from enum face_gc. Member names changed.
3556 (struct MWDevice): Members foreground and background deleted. New
3557 member scratch_gc, gc_list.
3558 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3559 (free_device): Free GCs in device->gc_list.
3560 (get_rgb_gc): New function.
3561 (get_gc): Renamed and argument changed from get_color.
3562 (get_gc_for_anti_alias): New function.
3563 (xfont_find_metric): Arguments changed. Get metrics of multiple
3565 (set_region): Argument changed. Caller changed.
3566 (xfont_render): Allways set a font in gc.
3567 (x_error_handler, x_io_error_handler): Define only if
3568 X_SET_ERROR_HANDLER is defined.
3569 (mwin__open_device): Create device->scratch_gc. Set members
3570 foreground, background, and videomode of frame. Call
3571 XSetErrorHandler and XSetIOErrorHandler only if
3572 X_SET_ERROR_HANDLER is defined.
3573 (struct gc_list): Deleted.
3574 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3575 (mwin__realize_face): Adjusted for the change of the format of
3576 rface->info and the charge of set_region.
3577 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3578 (mwin__draw_box): Likewise.
3579 (mwin__draw_bitmap): This function deleted.
3580 (mwin__draw_points): New function.
3581 (mwin__verify_region): Adjusted for the change of the format of
3582 rface->info and the charge of set_region.
3583 (mwin__create_window): Inherit backgound pixel from parent.
3584 (mwin__dump_gc): Adjusted for the change of the format of
3587 2004-03-16 Kenichi Handa <handa@m17n.org>
3589 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3591 * input.c (M_key_alias): New variable.
3592 (handle_key): Try M_key_alias property of a key too.
3593 (minput__init): Initialize M_key_alias. Give that property to
3594 symbols in one_char_symbol. Fix bug of initializing
3597 * draw.c (compose_glyph_string): Don't handle
3598 ignore_formatting_char here. Include formatting characters in the
3599 range processed by a FTL.
3600 (layout_glyph_string): Handle ignore_formatting_char here.
3602 2004-03-12 Kenichi Handa <handa@m17n.org>
3604 * input-gui.c (win_create_ic): Enable bidi in status control.
3606 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3608 2004-03-09 Kenichi Handa <handa@m17n.org>
3610 * input.c (load_input_method): If title is not specified, use the
3611 input method name as title.
3613 * m17n-X.c (get_color): Make it static.
3614 (xim_create_ic, xim_destroy_ic, x_error_handler)
3615 (x_io_error_handler): Likewise.
3617 2004-03-01 Kenichi Handa <handa@m17n.org>
3619 * Version 1.0 released.
3622 Copyright (C) 2003, 2004
3623 National Institute of Advanced Industrial Science and Technology (AIST)
3624 Registration Number H15PRO112
3626 This file is part of the m17n library.
3628 The m17n library is free software; you can redistribute it and/or
3629 modify it under the terms of the GNU Lesser General Public License
3630 as published by the Free Software Foundation; either version 2.1 of
3631 the License, or (at your option) any later version.
3633 The m17n library is distributed in the hope that it will be useful,
3634 but WITHOUT ANY WARRANTY; without even the implied warranty of
3635 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3636 Lesser General Public License for more details.
3638 You should have received a copy of the GNU Lesser General Public
3639 License along with the m17n library; if not, write to the Free
3640 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3641 Boston, MA 02110-1301, USA.