1 2007-03-01 Kenichi Handa <handa@m17n.org>
3 * input.c (reload_im_info): Setup cmds, vars, and title of
5 (check_variable_value): Fix the return value.
7 * database.c (mdatabase__check): If necessary, update database and
10 2007-02-28 Kenichi Handa <handa@m17n.org>
12 * database.c (get_dir_info): Set dir_info->status to
14 (check_version): New function.
15 (register_database): Don't call find_database.
16 (register_databases_in_files): Don't register a database of
18 (mdatabase__update): Likewise. Avoid unnecessary scanning.
20 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
21 and MDB_STATUS_OUTDATED.
23 * font.h (struct MFont): Types of members type, source, and
24 spacing changed to unsigned.
26 * internal-gui.h (struct): Types of members category and type
29 * internal.h (struct MText): Types of members format and coverage
32 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
33 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
35 2007-02-23 Kenichi Handa <handa@m17n.org>
37 * input.c (Mpop): New variable.
38 (fully_initialize): Initialize Mpop.
39 (parse_action_list): Handle Mpop.
40 (take_action_list): Likewise.
41 (handle_key): When a key is unhandled, shift to the initial state
42 only if the current state has no branch action.
44 2007-02-12 Kenichi Handa <handa@m17n.org>
46 * input.c (get_preceding_char): Unref mt if necessary.
47 (get_following_char): Likewise.
48 (parse_action_list): Fix handling of `insert' action as
50 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
51 (take_action_list): Check invalid candidate list.
53 2007-02-06 Kenichi Handa <handa@m17n.org>
55 * input.c (integer_value): Check also ic->produced for @-N.
57 2007-01-26 Kenichi Handa <handa@m17n.org>
59 * database.c (mdatabase__update): Check mdatabase__dir_list from
62 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
64 2007-01-12 Kenichi Handa <handa@m17n.org>
66 * input.c (handle_key): Handle a branch action of the initial
69 2007-01-10 Kenichi Handa <handa@m17n.org>
71 * m17n-gd.c (gd_render): Delete superfluous line.
73 2006-12-26 Kenichi Handa <handa@m17n.org>
75 * m17n.h (minput_callback): Extern it.
77 * input.h (minput__callback): Delte extern.
79 * input.c (get_surrounding_text): Adjusted for the change of
80 minput__callback to minput_callback.
81 (delete_surrounding_text): Likewise.
82 (minput_create_ic): Likewise.
83 (minput_destroy_ic): Likewise.
84 (minput_filter): Likewise.
85 (minput_set_spot): Likewise.
86 (minput_toggle): Likewise.
87 (minput_reset_ic): Likewise.
89 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
90 and ic->candidate_to to 0.
91 (minput_callback): Renamed from minput__callback.
93 * input-gui.c (win_callback): Adjusted for the change of
94 minput__callback to minput_callback.
96 2006-12-15 Kenichi Handa <handa@m17n.org>
98 * font-ft.c (ft_add_font): Fix typo.
100 2006-12-06 Kenichi Handa <handa@m17n.org>
102 * Version 1.3.4 released.
104 2006-11-16 Kenichi Handa <handa@m17n.org>
106 * input.c (parse_action_list): Allow (undo 0).
107 (adjust_markers): New function.
108 (preedit_insert, preedit_delete): Call adjust_markers.
109 (preedit_replace): New function.
110 (update_candidate): Call preedit_replace instead of preedit_insert
112 (filter): When ic_info->commit_key_head is nonzero, shift input
113 event keys even if there's no committed text.
115 2006-11-10 Kenichi Handa <handa@m17n.org>
117 * input.h (MInputContextInfo): New member commit_key_head.
119 * input.c (preedit_commit): Update ic_info->commit_key_head.
120 (take_action_list): Reset ic_info->commit_key_head on Mundo.
121 (filter): When committed, shift keys by ic_info->commit_key_head.
123 2006-10-30 Kenichi Handa <handa@m17n.org>
125 * input.c (preedit_delete): Fix typo.
126 (take_action_list): Print more debugging information. Allow
127 variable in arg of 'select' and `pushback'.
129 * database.c (gen_database_name): Don't put extra space.
130 (load_database): Print debugging information.
131 (register_databases_in_files): New arg headlen. Callers changed.
132 (mdatabase__load_for_keys): Shorten debugging information.
133 (mdatabase_load): Don't print debugging information here.
135 2006-10-27 Kenichi Handa <handa@m17n.org>
137 * input.c (marker_code): New arg surrounding. Callers changed.
138 (surrounding_pos): Check if name[0] == '@'.
139 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
140 (take_action_list): Likewise.
141 (get_preceding_char): If POS is zero, always call
142 get_surrounding_text.
144 2006-10-19 Kenichi Handa <handa@m17n.org>
146 * input.c (load_variables): Fix setting of `global'.
148 2006-10-16 Kenichi Handa <handa@m17n.org>
150 * draw.c (draw_background): Be sure to set *to_x.
151 (render_glyph_string): If from == to, just return.
153 2006-10-18 Kenichi Handa <handa@m17n.org>
155 * database.c (get_dir_info): Return NULL if the directory name is
157 (register_databases_in_files): Call register_database with
159 (mdatabase__update): Fix logic. Call register_database with
161 (mdatabase_define): Call register_database with
164 * input.c (delete_surrounding_text): Be sure to set members
165 preceding_text and following_text to NULL.
166 (shift_state): Save variable values in ic_info->vars_saved.
167 (preedit_commit): Don't print debug information here. Don't
168 change ic_info->keys here.
169 (get_candidate_list): Don't ref plist.
170 (take_action_list): Don't unref return value of
171 get_candidate_list. For undo, reset ic->produced and recover
172 ic_info->vars. Be sure to set ic->candidate_list to NULL after
174 (init_ic_info): Set ic_info->vars_saved.
175 (fini_ic_info): Unref ic_info->vars_saved.
176 (re_init_ic): Be sure to set ic->candidate_list to NULL after
178 (filter): Be sure to set members preceding_text and following_text
179 to NULL. Print debug information about produced text. Delete
180 processed keys from ic_info->keys.
182 * input.h (MInputContextInfo): New member vars_saved.
184 2006-10-16 Kenichi Handa <handa@m17n.org>
186 * database.c (mdatabase__update): Fix the way to get db_info.
188 2006-10-02 Kenichi Handa <handa@m17n.org>
190 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
191 `size' changed to 24.
193 * font.c (xlfd_unparse_name): Adjusted for the change of
195 (font_score): Likewise.
196 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
198 * m17n-X.c (MFontX, _MFontX): Deleted.
199 (SET_SIZE, HAVE_SIZE): Deleted.
200 (free_display_info): Adjusted for the change of
201 disp_info->font_list format.
202 (xfont_registry_list): Likewise.
203 (xfont_open): Likewise.
204 (xfont_list): Likewise.
205 (xfont_encode_char): Ignore size to find a realized font.
206 (MRealizedFontXft): Change the order of members to make it
207 compatible with MRealizedFontFT.
209 2006-09-27 Kenichi Handa <handa@m17n.org>
211 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
212 (mfont_close): Add comments.
214 * mtext-lbrk.c (mtext_line_break): Add comment.
216 2006-09-26 Kenichi Handa <handa@m17n.org>
218 * input.c (minput_get_description): Handle description about
219 inclusion-only input methods.
221 2006-09-21 Kenichi Handa <handa@m17n.org>
223 * input.c (M_gettext): New variable.
224 (fully_initialize): Initialize M_gettext.
225 (check_description): New function.
226 (load_commands): Call check_description.
227 (config_all_commands): Be sure to unref pl.
228 (load_variables): Call check_description.
229 (config_all_variables): Be sure to unref pl.
230 (load_im_info): Call check_description.
232 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
234 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
235 and bind_textdomain_codeset.
237 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
239 2006-09-15 Kenichi Handa <handa@m17n.org>
241 * input.c (reload_im_info): Update custom and global info.
242 (init_ic_info): Fix previous change.
244 2006-09-14 Kenichi Handa <handa@m17n.org>
246 * database.c: Include <libgen.h>.
247 (mdatabase__lock): Make a directory if necessary.
249 * input.c (resolve_command): Adjusted for the format change of
250 configured_cmds member.
251 (load_commands, load_variables): Fix for errornous data handling.
252 (config_command, config_variable): New function.
253 (config_all_commands, config_all_variables): Renamed from
254 config_commands and config_variables. Utilize the above function.
255 (check_variable_value): Argument changed. Callers changed.
256 (load_im_info): Call config_all_commands and config_all_variables.
257 (init_ic_info): Adjusted for the format change of configured_vars
259 (minput__init): Initialize Mcustomized, Mconfigured, and
261 (Mcustomized, Mconfigured, Minherited): New variables.
262 (minput_get_command): Be sure to return NULL if an input method
263 use no local command.
264 (minput_get_variable): Be sure to return NULL if an input method
265 use no local variable.
266 (minput_config_command, minput_config_variable)
267 (minput_save_config): Adjusted for the format change of
268 configured_cmds and configured_vars members.
270 * plist.c (write_element): Delete superfluous ':'.
272 2006-09-13 Kenichi Handa <handa@m17n.org>
274 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
275 (minput_config_file): Extern it.
277 * draw.c (Minherited): Declaration moved to input.c.
278 (mdraw__init): Don't initialize Minherited here.
280 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
282 2006-09-07 Kenichi Handa <handa@m17n.org>
284 * textprop.c (mtext_serialize): Call mplist__serialize with the
287 * plist.h (mplist__serialize): Prototype adjusted.
288 (mplist__assq): Extern it.
290 * plist.c: Include <ctype.h>
291 (PUTC, PUTS): New macros.
292 (write_symbol): New function.
293 (write_element): New arg indent.
294 (dump_string, dump_plist_element): Delete them.
295 (mplist__from_string): New arg pretty.
296 (mplist__assq): New function.
297 (mdebug_dump_plist): Use write_element.
299 * mtext.c (mtext_cat_char): Allocate more memory.
300 (mdebug_dump_mtext): Don't escal a newline character.
302 * m17n.h (minput_get_command, minput_get_variable)
303 (minput_config_command, minput_config_variable)
304 (minput_save_config): Extern them.
306 * m17n-core.c: Include <string.h>.
307 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
308 use the stream stdout instead of a file of that name.
310 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
313 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
314 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
315 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
316 (MDEBUG_DUMP): Flush the stream.
318 * input.h (struct _MInputMethodInfo): Delete member im. New
319 members mdb, language, name, extra, cmds, configured_cmds,
320 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
321 (MInputContextInfo): New member tick.
323 * input.c: Big change to improve user-side input method
324 customization. Here, list just public API changes.
325 (minput_get_commands, minput_get_variables)
326 (minput_assign_command_keys, minput_set_variable): Label them
328 (minput_get_command, minput_get_variable)
329 (minput_config_command, minput_config_variable)
330 (minput_save_config): New functions.
332 * database.h (PATH_MAX): Define it if not yet defined.
333 (PATH_SEPARATOR): Likewise.
334 (enum MDatabaseStatus): New enum.
335 (struct MDatabaseInfo): Moved from database.c. New members status,
336 time, lock_file, and uniq_file.
337 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
338 (mdatabase__unlock): Extern them.
340 * database.c: Include <time.h>.
341 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
342 (GEN_PATH): Args changed. Callers changed.
343 (struct MDatabaseInfo): Moved to database.h.
344 (struct MDatabase, mdb_list): Deleted.
345 (mdatabase__list): New var.
346 (get_database_filename): Deleted. Callers changed to use
348 (find_file, get_database_file): New files.
349 (get_dir_info): Initialize new members of MDatabaseInfo.
350 (find_database): Arg chagnded. Callers changed.
351 (free_db_info, register_database, register_databases_in_files):
353 (update_database_list): Deleted.
354 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
355 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
356 (mdatabase__update): New function.
357 (mdatabase__check): Return value changed.
358 (mdatabase__file, mdatabase__lock, mdatabase__save)
359 (mdatabase__unlock): New functions.
361 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
363 * input.c (get_surrounding_text): Return -2 when surrounding text
365 (get_following_char): Likewise.
366 (get_preceding_char): Likewise.
367 (minput__callback): Return 0 if there is a callback function,
370 2006-08-17 Kenichi Handa <handa@m17n.org>
372 * input.c (reset_ic): Use shift_state to setup the current state.
374 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
376 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
377 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
378 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
380 2006-08-02 Kenichi Handa <handa@m17n.org>
382 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
384 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
386 * font-ft.c (ft_encapsulate): Add code for debugging.
387 (mfont__ft_drive_otf): Be sure to encode character before getting
390 2006-07-21 Kenichi Handa <handa@m17n.org>
392 * draw.c (mdraw_text_extents): Fix previous typo.
394 2006-07-19 Kenichi Handa <handa@m17n.org>
396 * draw.c (gstring_width): New arg lbearing.
397 (render_glyph_string): Adjusted for the change of gstring_width.
398 (mdraw_text_extents): Fix lbearing of ink and line metrics.
400 * m17n-core.h (Mlanguage): Extern it.
402 * m17n.h (Mlanguage): Extern deleted.
404 * mtext.c (mtext__init): Initialize Mlanguage.
405 (Mlanguage): Declaration moved from locale.c
407 * locale.c (mlocale__init): Don't initialize Mlanguage here.
408 (Mlanguage): Declaration moved to mtext.c.
410 * language.c (mlang__init): Don't initialize Mlanguage here.
412 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
414 2006-07-14 Kenichi Handa <handa@m17n.org>
416 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
417 (MRealizedFontFT): New member face_encapsulated.
418 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
419 (ft_gen_font): New function.
420 (ft_add_font): Use ft_gen_font.
421 (ft_list_script): Store lists in ft_script_list.
422 (ft_check_otf): New arg ft_face. Caller changed.
423 (ft_check_language): Likewise.
424 (ft_check_script): Likewise.
425 (ft_encapsulate, ft_close): New functions.
426 (mfont__ft_driver): Initialize members encapsulate and close.
427 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
429 * font.h (struct MRealizedFont): New member encapsulating.
430 (struct MFontDriver): New members encapsulate and close.
432 * font.c (mfont__match_p): If FONT is realized, check capability
433 by font drivers's check_capability method.
434 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
437 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
438 declarations of foundry and fam local vars.
439 (xft_driver): Make it static.
441 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
442 (mfont_close): Extern them.
444 * m17n-gd.c (device_open): Don't specify foundry and family of the
447 2006-07-11 Kenichi Handa <handa@m17n.org>
449 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
451 2006-07-13 Kenichi Handa <handa@m17n.org>
453 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
455 (ft_check_script): Delete unused var.
456 (ft_list_capability): Likewise.
458 * font.c (mfont__get_capability): Setup cap->otf.
459 (Motf): Make it global.
460 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
462 * font.h (MFontCapability): New member otf.
464 * language.c (mlang__fini): Delete unused vars.
466 * m17n-gui.h (Motf): Extern it.
468 * database.c (update_database_list): Delete unused vars.
470 2006-07-07 Kenichi Handa <handa@m17n.org>
472 * font-ft.c (DEVICE_DELTA): Fix typo.
474 2006-07-06 Kenichi Handa <handa@m17n.org>
476 * fontset.c (mfont__lookup_fontset): Don't ignore family and
479 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
481 * database.c: Update comments.
483 2006-07-05 Kenichi Handa <handa@m17n.org>
485 * database.c (PATH_MAX): Define it if not yet defined.
486 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
488 (get_database_filename): Use GEN_PATH.
489 (get_dir_info): Don't include the last '/' in directory name.
490 (register_database): New function.
491 (update_database_list): Use register_database. Search all
492 directories in mdatabase__dir_list for wildcard databases.
493 (mdatabase__init): Check "~/.m17n.d".
495 2006-07-03 Kenichi Handa <handa@m17n.org>
497 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
498 push reverse property.
500 * plist.c (dump_plist_element): Fix previous change.
502 2006-06-28 Kenichi Handa <handa@m17n.org>
504 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
507 * draw.c (MbidiNSM): New variable.
508 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
509 attention to bidi type NSM.
510 (mdraw__init): Initialize MbibiNSM.
512 * language.c (mscript__char_list): Fix finding a char-list element.
514 * plist.c (dump_string): Return number of printed characters.
515 (dump_plist_element): Print elements more compactly.
517 2006-06-23 Kenichi Handa <handa@m17n.org>
519 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
520 (include_HEADERS): Likewise.
522 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
524 * language.c: Update documentation.
526 2006-06-23 Kenichi Handa <handa@m17n.org>
528 * font-ft.c (struct MFontFT): Delete member lang.
529 (free_ft_info): Don't unref member lang. Destroy members langset
531 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
532 changed. Set members langset and charset.
533 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
535 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
537 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
538 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
539 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
540 characters at first. If it fails, try listing by language names.
541 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
542 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
543 change of MFontCapability.
544 (ft_list_capability): Likewise. Try listing by languages, then by
545 scripts. Check OTF at last.
546 (ft_check_script): New function.
547 (ft_select): Adjusted for the check of MFontCapability.
548 (ft_list_family_names): New function.
549 (ft_check_capability): If cap->script is not Mnil, call
551 (mfont__ft_driver): Initialize with ft_list_family_names.
553 * font.h (struct MFontDriver): New member list_fmaily_names.
554 (struct): Change member "MSymbol *lang" to "MSymbol language".
556 * font.c: Include "language.h".
557 (Motf): New variable.
558 (otf_script_list, load_otf_script_list): Delete it.
559 (find_script_from_otf_tag): Delete it.
560 (merge_capability): New function.
561 (mfont__init): Init Motf.
562 (mfont__fini): Don't unref otf_script_list.
563 (free_font_capability): Check cap->script_tag to determine if
564 OTF-related capability is set.
565 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
566 the change of type MFontCapability.
567 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
569 (mfont_list): Call merge_capability for LANGUAGE arg.
570 (mfont_list_family_names): New function.
572 * input-gui.c: Typo in comments fixed.
574 * input.c: Typo in comments fixed.
576 * language.h (mlanguage__list): Delete it.
577 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
580 * language.c: Include "mtext.h".
581 (M_script_lang_list): Delete it.
582 (language_list, script_list): New variables.
583 (load_lang_script_list, init_language_list, init_script_list): New
585 (mlang__init): Don't load language database here.
586 (mlang__fini): Unref language_list and script_list if not NULL.
587 (mlanguage__list): Delete it.
588 (mlanguage__info, mscript__info, mscript__char_list)
589 (mscript__otf_tag, mscript__from_otf_tag): New functions.
590 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
591 (mscript_list, mscript_language_list): New functions.
593 * m17n-gui.h (mfont_list_family_names): Extern it.
595 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
596 (mlanguage_text, mscript_list, mscript_language_list): Extern
599 2006-06-21 Kenichi Handa <handa@m17n.org>
601 * m17n-X.c (xfont_driver): Initialize with
602 xfont_list_family_names.
603 (xfont_list_family_names): New function.
604 (xft_driver): Initialize with NULL for list_family_names member.
605 (device_init): Set list_family_names member of xft_driver to that
608 2006-06-06 Kenichi Handa <handa@m17n.org>
610 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
612 2006-03-24 Kenichi Handa <handa@m17n.org>
614 * font-ft.c (ft_open): Improve debug message.
616 * fontset.c (mfontset__get_font): Fix for the case that no font in
617 per_script list is available.
619 2006-02-06 Kenichi Handa <handa@m17n.org>
621 * Version 1.3.3 released.
623 2006-02-22 Kenichi Handa <handa@m17n.org>
625 * textprop.c: Fix some typos in documentation.
627 * plist.c: Fix some typos in documentation.
629 * m17n-core.h: Fix some typos in documentation.
630 (M17NLIB_PATCH_LEVEL): Updated to 3.
631 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
633 * symbol.c: Fix some typos in documentation.
635 * mtext.c: Fix some typos in documentation.
637 * input.c: Fix several typos in documentation.
639 2006-02-06 Kenichi Handa <handa@m17n.org>
641 * Version 1.3.2 released.
643 2006-02-03 Kenichi Handa <handa@m17n.org>
645 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
646 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
648 * font.c (xlfd_parse_name): Fix handling of the name "nil".
650 * draw.c (layout_glyphs): Fix handling left_padding of
653 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
655 2006-02-02 Kenichi Handa <handa@m17n.org>
657 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
660 2006-01-25 Kenichi Handa <handa@m17n.org>
662 * input.c (resolve_expression): If the value of PLIST is a plist,
663 but the first element is not symbol, return 0.
665 2006-01-17 Kenichi Handa <handa@m17n.org>
667 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
668 HAVE_GD is 2 or the greater.
670 2006-01-16 Kenichi Handa <handa@m17n.org>
672 * Version 1.3.1 released.
674 2006-01-16 Kenichi Handa <handa@m17n.org>
676 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
677 simulating anti-aliasing.
679 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
680 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
682 2006-01-12 Kenichi Handa <handa@m17n.org>
684 * input.c (get_surrounding_text): Always pop ic->plist.
685 (reset_ic): Don't reset ic->plist.
687 2006-01-10 Kenichi Handa <handa@m17n.org>
689 * input.c (preedit_commit): For debugging, print only commiting
690 charactes. Don't set ic->candidate_show to 0.
691 (handle_key): Don't run branch-actions just by shifting to the
693 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
694 Reset vars and plist.
696 2006-01-07 Kenichi Handa <handa@m17n.org>
698 * input.c (load_branch): Confirm that maps is not NULL.
700 2006-01-05 Kenichi Handa <handa@m17n.org>
702 * input-gui.c (win_filter): Try to convert arg to key only when
705 * plist.c (read_integer_element): If '#' and '-' are followed by
706 non-integer-constituent, read them as a part of a symbol.
707 (read_symbol_element): New arg C.
708 (read_element): Adjust args to read_symbol_element.
710 * input.c (load_macros): On overwriting a macro, free the old
712 (minput__init): Store Mmap in load_im_info_keys.
713 (minput_get_title_icon): If the input method has no title, be sure
715 (minput_get_description): If the input method has no description,
716 be sure to return NULL.
717 (minput_get_variables): Fix documentation.
718 (handle_key): Pay attention to the case that key is Mnil.
719 (filter): Likewise. Fix handling of such symbol as S-A.
721 2005-12-22 Kenichi Handa <handa@m17n.org>
723 * Version 1.3.0 released.
725 2005-12-22 Kenichi Handa <handa@m17n.org>
727 * font-ft.c (ft_list): If the specified font has no property,
730 2005-12-20 Kenichi Handa <handa@m17n.org>
732 * character.c (mchar_get_prop): Check char_prop_list.
733 (mchar_put_prop, mchar_get_prop_table): Likewise.
735 2005-12-18 Kenichi Handa <handa@m17n.org>
737 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
738 file name sans language.
740 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
742 * input.c: Fix typo in comments.
744 2005-12-14 Kenichi Handa <handa@m17n.org>
746 * input.c (minput_get_title_icon): Check the default icon for the
749 2005-12-13 Kenichi Handa <handa@m17n.org>
751 * input.c (Mless_equal, Mgreater_equal): New variables.
752 (parse_expression, resolve_expression, parse_action_list)
753 (take_action_list): Handle the aboves.
754 (filter): Treat key S-X as X.
755 (minput__init): Initialize Mless_equal and Mgreater_equal.
756 (minput_get_title_icon): New function.
758 * m17n.h (minput_get_title_icon): Extern it.
760 * database.c (get_database_filename): Return a filename instead of
762 (load_database): Adjusted for the above change.
763 (mdatabase__load_for_keys): Likewise.
764 (mdatabase__find_file): New function.
766 * database.h (mdatabase__find_file): Extern it.
768 * font.h (mfont__resize): Delete extern.
770 * font.c (mfont__list): Check resize ratio.
771 (mfont__resize): Delete it.
772 (mfont_resize_ratio): Include the code of mfont__resize.
774 * font-ft.c (ft_open): Check resize ratio.
776 * m17n-X.c (xfont_open): Check resize ratio.
777 (xft_open): Likewise.
779 2005-12-07 Kenichi Handa <handa@m17n.org>
781 * input.c (take_action_list): If take_action_list return -1,
783 (handle_key): Likewise.
785 * face.c (mface__for_chars): When font is specified and layouter
786 is found for it, if the layouter doesn't support one of a
787 character, use a face sans layouter for it.
789 2005-12-06 Kenichi Handa <handa@m17n.org>
791 * fontset.c (mfont__lookup_fontset): If only a fallback font is
792 found, don't use it for more than one character.
794 2005-12-05 Kenichi Handa <handa@m17n.org>
796 * face.c (mface__realize): Set rfont->layouter to Mnil.
797 (mface__for_chars): Fix handling of layouter.
799 * character.h (mchar__define_prop): Extern it.
801 * database.c (update_database_list): Call mchar__define_prop if
804 * character.c (mchar__init): Don't call mchar_define_property.
805 Instead just initialize property keys.
806 (mchar__fini): Free char_prop_list only if it's not NULL.
807 (mchar__define_prop): New function.
808 (mchar_define_property): Call mchar__define_prop.
810 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
813 2005-12-02 Kenichi Handa <handa@m17n.org>
815 * language.c (mlang__init): Handle extra chars.
817 * m17n-gui.h (mfont_check): Adjust prototype.
819 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
820 (xfont_check_capability): New function.
821 (xft_driver): Specify xft_check_capability.
822 (xft_check_capability): New function.
824 * font-ft.c (M0_3): Delete it.
826 (ft_get_charmaps): Refer to M0.
827 (fc_parse_pattern): Fix previous change.
828 (ft_list_language): Check also extra chars.
829 (ft_check_otf): Define it even if HAVE_OTF is undef.
830 (ft_check_lang): Check the result of FcLangSetHasLang against
831 FcLangDifferentLang. Check also extra chars.
832 (ft_list_capability): Delete ifdef HAVE_OTF.
833 (ft_select): Likewise.
834 (ft_open): Improve debug information.
835 (ft_check_capability): New function.
836 (mfont__ft_driver): Specify ft_check_capability.
837 (mfont__ft_init): Initialize M0.
839 * fontset.c (get_font_from_group): New function.
840 (mfontset__get_font): New function.
842 * fontset.h (mfontset__get_font): Extern it.
844 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
845 (mfont__fini): Delete ifdef HAVE_OTF.
846 (free_font_capability): Likewise.
847 (mfont__get_capability): Likewise.
848 (mfont__check_capability): New function.
849 (mfont_check): Change the order of arguments. Use
852 * font.h (struct MFontDriver): New member check_capability.
853 (MFontCapability): Delete ifdef HAVE_OTF.
854 (mfont__check_capability): Extern it.
856 * face.c (mface__realize): Fix handling of FONT arg.
857 (mface__for_chars): Fix handling of explicitly specified font.
859 2005-11-25 Kenichi Handa <handa@m17n.org>
861 * font-flt.c (run_command): Print debug info for
864 * draw.c (layout_glyphs): Fix handling of left/right_padding.
866 * face.c (mface__for_chars): Check rfont before accessing the
869 2005-11-21 Kenichi Handa <handa@m17n.org>
871 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
874 * fontset.c (fontset_table): New variable.
875 (free_fontset): Call M17N_OBJECT_UNREGISTER.
876 (mfont__fontset_init): Add fontset_table as an object array.
877 (mfont__realize_fontset): Ref FONTSET.
878 (mfont__free_realized_fontset): Unref REALIZED->fontset.
879 (mfontset): Call M17N_OBJECT_REGISTER.
880 (mfontset_copy): Likewise.
882 * input.c (handle_key): For debugging, print information about
884 (filter): Add an alias for Meta and Alt modifiers.
885 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
887 (minput__init): Initialize them.
888 (parse_expression): New function.
889 (resolve_expression): New function.
890 (parse_action_list): Handle expressions by parse_expression.
891 (take_action_list): Handle expressions by resolve_expression.
892 (parse_nested_list_value): Fix previous change.
893 (resolve_command): Fix handling of the return value of
896 2005-11-18 Kenichi Handa <handa@m17n.org>
898 * font-ft.c (ft_check_otf, otf_script_list): Define only when
900 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
902 (ft_select): Likewise.
904 * font.c (mfont_list): Fix for the case that FONT is NULL.
905 (OTF_tag): Delete it.
906 (load_otf_script_list): Define only when HAVE_OTF is defined.
907 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
910 * draw.c (truncate_gstring): Be sure to truncate at
911 glapheme-cluster boundary.
913 2005-11-11 Kenichi Handa <handa@m17n.org>
915 * input.c (delete_surrounding_text): Clear cache if necessary.
917 2005-11-09 Kenichi Handa <handa@m17n.org>
919 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
920 glyph prev is also supported by the current flt.
922 2005-11-08 Kenichi Handa <handa@m17n.org>
924 * m17n-X.c (xft_render): Cancel previous change.
926 2005-11-07 Kenichi Handa <handa@m17n.org>
928 * input.c: Include <stdlib.h>.
929 (get_surrounding_text, delete_surrounding_text)
930 (get_preceding_char, get_following_char): New functions.
931 (integer_value): New arg surrounding. If it is nonzero, try to
932 get a surrounding character. Callers changed.
933 (take_action_list): Check `value' before setting an element.
934 (destroy_ic): Unref ic_info->preceding_text and
935 ic_info->following_text.
936 (minput__init): Initialize Minput_get_surrounding_text and
937 Minput_delete_surrounding_text.
938 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
940 (filter): Unref ic_info->preceding_text and
941 ic_info->following_text.
943 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
946 * input.h (MInputContextInfo): New members preceding_text and
949 2005-11-04 Kenichi Handa <handa@m17n.org>
951 * input.c (parse_nested_list_value): Fix handling of the global
953 (get_nested_list): Get global definitions by load_partial_im_info.
954 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
955 MInputCandidatesChanged.
956 (take_action_list): Likewise.
957 (reset_ic): Likewise.
958 (create_ic): Don't pay special attention to
959 Mcandidates_group_size.
960 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
961 (minput_set_variable): Get a definition of varible by
962 mplist_find_by_value, not mplist_get.
964 * m17n.h (enum MInputCandidatesChanged): New enum.
966 2005-11-01 Kenichi Handa <handa@m17n.org>
968 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
970 (mwin__destroy_window): If xft_draw's drawable is win, change it
971 to device->drawable before destroying win.
973 2005-10-31 Kenichi Handa <handa@m17n.org>
975 * input.c (load_im_info): Fix adding of state.
977 * m17n-core.c (m17n_fini_core): Fix reporting of module
980 * m17n.c (m17n_fini): Fix reporting of module finalization.
982 * m17n-gui.c (m17n_init_win): Fix reporting of module
985 2005-10-29 Kenichi Handa <handa@m17n.org>
987 * input.c (get_candidate_list): Fix the timing of referring plist.
989 2005-10-28 Kenichi Handa <handa@m17n.org>
991 * input.c (load_branch): Ignore an undefined map name.
992 (load_im_info): Set im_info->title from `name' only if it's not
994 (shift_state): Always update ic->status.
995 (adjust_candidates): Renamed from adjust_candidate_command.
996 Argument changed. Caller changed.
997 (get_candidate_list, regularize_action): New functions.
998 (take_action_list): Use them. On handling Munhandle, don't set
1000 (handle_key): If KEY is not handled by MAP, and MAP has
1001 branch_actions, perform them.
1003 * database.c (mdatabase__fini): Free dir_info->filename;
1005 2005-10-20 Kenichi Handa <handa@m17n.org>
1007 * input.c (marker_code): Accept '@@'.
1008 (integer_value): Handle '@@'.
1009 (parse_action_list): Accept a symbol argument.
1010 (take_action_list): Resolve the symbol argument. Handle the
1013 2005-10-18 Kenichi Handa <handa@m17n.org>
1015 * input.c: Include "charset.h".
1016 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1018 (MIMState): New member (M17NObject control).
1019 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1020 (get_nested_list, resolve_variable): New functions.
1021 (integer_value): New arg (MPlist **value). Set it to the plist
1022 element containing the value.
1023 (resolve_command): New function.
1024 (load_translation): New arg (MPlist *map_actions).
1025 (load_branch): New args language and name. If `keylist' is a
1026 symbol, resolved that as a command name.
1027 (free_map): New arg top. Free map->map_actions only if top is
1029 (free_state): New function.
1030 (load_state): New arg name.
1031 (im_info_list): New variable.
1032 (free_im_info, get_im_info_by_tags): New functions.
1033 (load_im_info): Arg key changed to plist. Handle `include'.
1034 Return (MInputMethodInfo *).
1035 (preedit_commit): Ref ic->candidate_list.
1036 (get_select_charset, adjust_candidate_command): New functions.
1037 (take_action_list): Handle `include'. Adjust candidate action
1038 properly. Handle control variables `candidates-charset' and
1039 `candidates-group-size'.
1040 (open_im): Use get_im_info.
1041 (create_ic): Get global variables.
1042 (load_partial_im_info): New function.
1043 (get_im_info): New function.
1044 (check_command_keyseq, check_command_list, check_variable_list):
1046 (minput__init): Don't handle M_database_hook and Mdetail_text.
1047 Initialize M_candidates, Mcandidates_group_size,
1048 Mcandidates_charset.
1049 (parse_variable_list, get_variable_list, parse_command_list)
1050 (get_command_list): Delete them.
1051 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1052 (minput__fini): Simply unref command_list and variable_list.
1053 (minput_get_description): Adjusted for the new form of description.
1054 (minput_get_commands): Use get_nested_list.
1055 (minput_assign_command_keys): Likewise.
1056 (minput_get_variables, minput_set_variable): Likewise.
1058 * input.h (MInputMethodInfo): New members im and maps.
1060 * database.h (M_database_hook): Delete extern.
1061 (MDatabaseHookFunc): Delete extern.
1062 (mdatabase__check): Extern it.
1064 * database.c: Include <glob.h>.
1065 (MAX_TIME): New macro.
1066 (Masterisk): New variable.
1067 (get_database_stream): Argument changed to (MDatabaseInfo *).
1069 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1070 (find_database): New function.
1071 (update_database_list): New function.
1072 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1073 calling update_database_list.
1074 (mdatabase__check): New function.
1075 (mdatabase_find): Use update_database and find_database. Don't
1076 handle MDatabaseHookFunc.
1077 (mdatabase_list): Call update_database at first.
1078 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1079 (MDatabaseList): New type.
1081 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1083 * m17n.h (Mdetail_text): Delete extern.
1085 * m17n-core.h (mplist_conc): Delete extern.
1087 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1089 (mplist_conc): Renamed to mplist__conc.
1090 (mplist__pop_unref): New function.
1092 2005-10-14 Kenichi Handa <handa@m17n.org>
1094 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1096 (read_element): If keys is an empty plist, return any element
1098 (dump_plist_element): Check if plist is nested.
1099 (mplist_conc): Always ref tail.
1100 (mplist_set): If key is a managing key, ref val in advance.
1102 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1103 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1104 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1107 * fontset.c (free_fontset): Unref fontset_list if necessary.
1108 (mfont__fontset_fini): Don't free fontset_list. Unref
1110 (mfont__realize_fontset): Initialize request.
1111 (mfontset): Ref default_fontset or fontset only if necessary.
1112 (mfontset_copy): Don't ref copy.
1114 * draw.c (render_glyphs): Check gend->type before checking
1117 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1118 unrefed plists to NULL.
1120 2005-10-04 Kenichi Handa <handa@m17n.org>
1122 * textprop.c (mtext_serialize): Be sure to make mt
1123 MTEXT_FORMAT_UTF_8 and NULL terminated.
1125 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1127 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1129 2005-10-03 Kenichi Handa <handa@m17n.org>
1131 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1132 is not at the beginning of line.
1134 2005-09-22 Kenichi Handa <handa@m17n.org>
1136 * input.c: Include <sys/stat.h> and <unistd.h>.
1137 (Minclude, Mcommit, Munhandle): New variables.
1138 (minput__init): Initialize them. Push only Mstate to
1139 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1140 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1142 (load_input_method): Handle "include" directive. If no states are
1144 (shift_state): If state_name is Mt, shift back to the previous
1145 state. Call preedit_commit to commit preedit text.
1146 (preedit_commit): New function.
1147 (take_action_list): Improve debug printing. Handle commit and
1149 (handle_key): Check the return value of take_action_list. Don't
1150 take branch_actions just after changing to the root map.
1151 (reset_ic): Reset all ic_info members.
1152 (filter): When a key is not handled, just move ic_info->keys
1153 instead fo calling reset_ic.
1154 (load_im_info): If key is not Mstate, push Mmap to
1156 (MDatabaseStatList): New type.
1157 (imdir_stat_list): New variable.
1158 (input_method_hook): Don't cancel the hook. Check the
1159 modification time of directories.
1160 (minput__fini): Free imdir_stat_list;
1162 * input.h (MInputContextInfo): New member prev_state.
1164 * m17n-core.h (mplist_conc): Extern it.
1166 * plist.c (mplist_conc): New function.
1168 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1170 * font.h (MRealizedFont): New member average_width.
1172 * font-ft.c (ft_open): Set rface->average_width.
1174 * font.c (xlfd_unparse_name): Print '*' before registry name.
1176 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1177 (xfont_open): Set rfont->average_width.
1178 (xft_open): Likewise.
1179 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1181 * internal-gui.h (struct MFrame): New member average_width.
1183 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1184 (mframe_get_prop): Return the average_width of a font.
1186 * face.c (mface__realize): Set rface->average_width.
1187 (mface__update_frame_face): Set frame->average_width.
1189 * face.h (MRealizedFace): New member average_width.
1191 2005-09-19 Kenichi Handa <handa@m17n.org>
1193 * font.c (xlfd_unparse_name): New arg full_xlfd.
1194 (mfont__encode_char): Use shortcut only for X core fonts.
1195 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1196 (mfont_put_prop): Handle `language' property.
1197 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1198 Print file can capability info too.
1200 * m17n-core.c (mdebug__output): New variable.
1201 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1202 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1203 (m17n_fini_core): Close mdebug__output if it's not stderr.
1205 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1206 (xfont_open): Handle baseline_offset.
1207 (xfont_find_metric): Likewise.
1208 (xfont_render): Likewise.
1209 (xft_open): Likewise.
1210 (xft_render): Likewise.
1212 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1213 (mdebug__output): Extern it.
1214 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1215 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1216 (MDEBUG_DUMP): New macro.
1217 (MDEBUG_PRINT_TIME): Print to medebug__output.
1219 * font.h (MRealizedFont): New member baseline_offset.
1221 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1223 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1224 (ft_list_family): Check alias.
1225 (ft_list_language): If language is "en", don't try to the second
1227 (ft_default_list): New variable.
1228 (ft_list_default): New function.
1229 (ft_select): If family is not specified, try only the default
1230 fonts. Treat the weights normal and medium same.
1231 (ft_open): Fix debug message. If registry is not specified, try
1232 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1233 (ft_find_metric): Likewise.
1234 (ft_render): Likewise.
1235 (ft_list): Fix debug message. Accept the registring iso8859-1.
1236 If family is not specified, try only the default fonts.
1238 * face.c (mface__realize): Fix logic of opening a font.
1240 2005-09-16 Kenichi Handa <handa@m17n.org>
1242 * face.c (mface__realize):
1244 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1247 * input.c (shift_state): Fix the condition of taking init actions.
1248 (take_action_list): Fix handling of pushback action.
1249 (handle_key): Don't change key while checking its alias.
1250 (minput__init): Initialize new variables.
1251 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1254 2005-09-12 Kenichi Handa <handa@m17n.org>
1256 * mtext.c (mtext__uppercase): Add proper open/close parens.
1257 (mtext_titlecase): Add proper casting.
1259 * input.c (parse_action_list): Handle the case that the arg is a
1260 key sequence (MText or MPlist).
1261 (take_action_list): Likewise.
1262 (shift_state): Shorter debug message.
1263 (handle_key): Terminate a debug message by "\n".
1264 (reset_ic): Don't take initial actions here.
1265 (minput_open_im): Print a debug message.
1266 (minput_close_im): Likewise.
1267 (minput_create_ic): Likewise.
1268 (minput_destroy_ic): Likewise.
1270 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1272 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1275 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1276 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1279 * character.c: Add Japanese documentation for
1280 mchar_get_prop_table ().
1282 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1284 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1285 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1286 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1288 (init_case_conversion): New function.
1289 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1290 (uppercase_precheck, lowercase_precheck, final_sigma)
1291 (after_soft_dotted, more_above, before_dot, after_i)
1292 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1294 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1296 * plist.c (read_mtext_element): Fix previous change.
1298 2005-09-05 Kenichi Handa <handa@m17n.org>
1300 * plist.c (read_mtext_element): Handle \uXXXX notation.
1302 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1303 (MTABLE_ALLOCA): Change the name of local variable.
1305 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1306 HAVE_FREETYPE are defined.
1308 * m17n-X.c: Check HAVE_X11.
1310 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1311 directory listing libraries.
1312 (noinst_PROGRAMS): Define it only in maintainer mode.
1314 2005-09-02 Kenichi Handa <handa@m17n.org>
1316 * m17n-gui.h (mdraw_line_break_option): Extern it.
1318 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1319 end of the first glyph.
1320 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1322 (mdraw_line_break_option): New variable.
1323 (mdraw_default_line_break): Use mtext_line_break.
1325 * mtext.h (wordseg_func_table): Don't extern it.
1326 (mtext__wseg_fini): Extern it.
1328 * mtext.c: Don't include word-thai.h.
1329 (wordseg_func_table): Delete this variable.
1330 (mtext__init): Don't initialize above. Don't call
1331 mtext__word_thai_init.
1332 (mtext__fini): Don't free wordseg_func_table. Call
1333 mtext__wseg_fini instead fo mtext__word_thai_fini.
1334 (MTextWordsegFunc): Don't typedef it.
1335 (mtext__word_segment): Moved to mtext-wseg.c.
1337 * m17n-core.h (enum MTextLineBreakOption): New enum.
1338 (mtext_line_break): Extern it.
1340 * mtext-wseg.c: New file.
1342 * mtext-lbrk.c: New file.
1344 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1345 add mtext-lbrk.c and mtext-wseg.c.
1347 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1348 the case that head is NULL.
1350 2005-09-01 Kenichi Handa <handa@m17n.org>
1352 * word-thai.c (wordseg_propertize): If the property value is nil,
1353 don't make the property no-merge.
1354 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1355 attention to the case that they are NULL.
1356 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1359 * character.c (mchar_get_prop_table): New function.
1361 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1363 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1364 (mchar_get_prop_table): Extern it.
1366 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1367 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1369 * internal.h (enum MTextCoverage): New enum.
1370 (MText): New member coverage.
1372 * mtext.c (FORMAT_COVERAGE): New macro.
1373 (insert): Copy mt2->coverage.
1374 (mtext__from_data): Initialize mt->coverage.
1375 (mtext__adjust_format): Update mt->coverage.
1376 (mtext): Initialize mt->coverage.
1377 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1378 Update mt->coverage if necessary.
1379 (mtext_duplicate): Copy mt->coverage.
1380 (mtext_insert, mtext_replace): New functions.
1381 (mtext_dup): Use mtext_duplicate.
1382 (mtext__word_segment): Don't set *from and *to if a word
1383 segmentation funcion is not found.
1384 (mtext_ins_char): Fix typo.
1386 2005-08-25 Kenichi Handa <handa@m17n.org>
1388 * font.h (MFont): New member for_full_width.
1390 * font.c (compare_font_score): Prefer a font of not
1393 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1394 registry charset of a font is one of CJK charsets.
1396 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1397 supports some of CJK.
1399 2005-08-24 Kenichi Handa <handa@m17n.org>
1401 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1403 * m17n-gui.c (null_device_open): Check Mresolution param and set
1406 * m17n-gd.c (device_open): Check Mresolution param and set
1409 * m17n-X.c (MWDevice): New member resy.
1410 (xfont_open): Set ascent, descent, and max_advance members of
1412 (xft_open): Likewise.
1413 (device_open): Compare also screen_num to find a device. Set
1414 device->resy and frame->dpi.
1416 * internal-gui.h (MFrame): New member dpi.
1418 * font.h (MRealizedFont): New member max_advance.
1420 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1421 (mfont__init): Don't initialize Mascent, Mdescent.
1422 (Mascent, Mdescent): Delete these variables.
1423 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1424 Mfont_descent instead of Mascent and Mdescent.
1425 (mfont_put_prop): Allow negative size.
1426 (mfont_find): Handle the case of spec->size < 0. Fix previous
1428 (mfont_list): Handle the case of spec->size < 0.
1429 (mfont_check): Likewise.
1431 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1432 (fc_get_pattern): Handle the case of font->size < 0.
1433 (ft_open): Set ascent, descent, and max_advance members of rfont.
1434 (ft_find_metric): Improve rounding.
1435 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1438 * face.c (mface__realize): Handle the case of font->size < 0.
1440 2005-08-22 Kenichi Handa <handa@m17n.org>
1442 * coding.c (MConverterStatus): Change the member buf to union.
1443 (mconv_buffer_converter): Add const to the arg buf.
1444 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1445 (mconv_decode): Adjusted for the change of MConverterStatus.
1446 (mconv_encode_range): Likewise.
1448 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1449 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1451 2005-08-20 Kenichi Handa <handa@m17n.org>
1453 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1454 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1456 * m17n-X.c (xfont_open): Set members ascent, descent, and
1457 max_advance of rfont.
1458 (xft_open): Likewise.
1460 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1462 (mfont__ft_parse_name): Add const to the arg name.
1464 * font.c (xlfd_parse_name): Add const to the arg name. Call
1465 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1466 (xlfd_unparse_name): Handle spacing.
1467 (mfont__init): Initialize new variables.
1468 (mfont__id): Handle spacing.
1469 (mfont__merge): Likewise.
1470 (mfont__set_spec): This function deleted.
1471 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1472 condition of calling mfont__ft_parse_name.
1473 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1474 (mfont_get_prop): Handle properties spacing, ascent, descent,
1476 (mfont_find): Return a realized font.
1477 (mfont_from_name): Add const to the arg name.
1479 * font.h (enum MFontProperty): New member MFONT_SPACING.
1480 (enum MFontSpacing): New enum.
1481 (MFont): New members spacing and max_advance.
1482 (mfont__ft_parse_name): Prototype adjusted.
1483 (mfont__set_spec): Extern deleted.
1484 (mfont__parse_name_into_font): Prototype adjusted.
1486 2005-08-19 Kenichi Handa <handa@m17n.org>
1488 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1490 * font.c (mfont_list): If FONT is null, use a temporary font.
1491 (mfont_parse_name): Add const to the arg name.
1493 2005-08-18 Kenichi Handa <handa@m17n.org>
1495 * word-thai.c: Surround code by #ifdef and #endif to escape from
1498 * font-ft.c: Mostly re-written.
1500 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1501 (FontLayoutCmd): Type of the member otf changed..
1502 (load_otf_command): Adjusted for the format change of otf command.
1503 (load_command): Likewise.
1504 (free_flt_command): Unref cmd->body.otf.
1505 (run_otf): Ajusted for the type change of otf_cmd.
1506 (run_command): Ajusted for the type change of otf_cmd. On
1507 debugging, print ctx->combining_code.
1508 (mfont__flt_run): Initialize ctx's members code_offset,
1509 combining_code, and left_padding to 0.
1511 * face.h (struct MRealizedFace): New member font.
1512 (mface__realize): Prototype adjusted.
1514 * face.c (find_realized_face): New arg font.
1515 (find_realized_face): Adjusted for the change of MFont.
1516 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1517 (mface__fini): Don't call mdebug__report_object.
1518 (mface__realize): New arg font.
1519 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1520 Optimize the latin case.
1521 (mface__free_realized): Free rface->font.
1522 (mface__update_frame_face): Adjusted for the change of mface__realize.
1523 (mface_equal): New function.
1525 * draw.c (Mcommon): New variable.
1526 (visual_order): Args to mfont__encode_char changed.
1527 (compose_glyph_string): Handle Mfont text property.
1528 (layout_glyphs): Adjusted for the change of MFont.
1529 (mdraw__init): Initialize Mcommon.
1530 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1532 * font.h (enum MFontType): Members completely changed.
1533 (enum MFontProperty): Move MFONT_SIZE to the tail.
1534 (enum MFontSource): New enum.
1535 (struct MFont): New members type, source, sizes, file, capability,
1537 (struct MRealizedFont): Type of member font changed. Members
1538 score, status, and encoding deleted.
1539 (MFontScore): New type.
1540 (MFontList): Member changed.
1541 (struct MFontDriver): New member has_char. Types of members
1543 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1544 (Mapple_roman): Extern them.
1545 (OTF_Tag): Typedefed if not HAVE_OTF.
1546 (enum MFontOpenTypeTable): New enum.
1547 (MFontCapability): New type.
1548 (mfont__ft_drive_otf): Prototype adjusted.
1549 (mfont__score): Extern deleted.
1550 (mfont__merge): Extern it.
1551 (mfont__has_char): Extern it.
1552 (mfont__encode_char): Prototype adjusted.
1553 (mfont__open): Extern it.
1554 (mfont__set_spec): Prototype adjusted.
1555 (mfont__get_capability): Extern it.
1557 * font.c: Include "fontset.h".
1558 (M_font_capability, M_font_list, M_font_list_len): New variables.
1559 (font_score_priority): Change order of initial elements.
1560 (font_score_shift_bits): Fix array size.
1561 (common_weight): Add "thin", "semibold", and "heavy".
1562 (common_stretch): Add "ultracondensed", "extracondensed",
1563 "extraexpanded", and "utltraexpand".
1564 (font_weight_regular, font_weight_normal, font_weight_medium): New
1566 (gen_font_name): This function deleted.
1567 (find_encoding): Set font->encoding.
1568 (OTF_tag): New function.
1569 (otf_script_list): New variable.
1570 (load_otf_script_list): New function.
1571 (find_script_from_otf_tag): New function.
1572 (xlfd_parse_name): Set font->type and font->source.
1573 (mfont__free_realized): Free chains rfonts.
1574 (font_score): Renamed from mfont__score.
1575 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1576 (Mapple_roman): New variables.
1577 (mfont__init): Initilize new variables. Initalize
1578 default_encoding.encoding_name and
1579 default_encoding.encoding_charset to Municode_full and
1580 mcharset__unicode. Use SAFE* macros for allocating filepath
1582 (mfont__fini): Free otf_script_list.
1583 (mfont__id): New function.
1584 (mfont__match_p): Check also capability member of MFont.
1585 (mfont__merge): New funciton.
1586 (mfont__set_spec_from_face): Set type and source members.
1587 (mfont__set_spec_from_plist): Set capability and type members.
1588 (mfont__select): Argument changed.
1589 (mfont__available): New function.
1590 (compare_font_score): New function.
1591 (mfont__list): New function.
1592 (mfont__open): Return a realized font.
1593 (mfont__resize): Adjusted for the change of MFont.
1594 (mfont__has_char): New function.
1595 (mfont__encode_char): Argument changed.
1596 (mfont__set_spec): Argument changed.
1597 (free_font_capability): New function.
1598 (mfont__get_capability): New function.
1599 (MFontfile): New variable.
1600 (mfont_get_prop): Adjusted for the change of MFont.
1601 (mfont_put_prop): Likewise.
1602 (mfont_set_selection_priority): Fix the way of setting
1603 font_score_priority[].
1604 (mfont_find): Use mfont__list instead of mfont__select.
1605 (mfont_resize_ratio): Adjusted for the change of MFont.
1606 (mfont_list): Use mfont__list.
1607 (mfont_check): New function.
1608 (font_score): Make it static.
1610 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1611 (mfont__lookup_fontset): Likewise.
1613 * fontset.c (struct MFontset): Delete member font_spec_list.
1614 (struct MRealizedFontset): Type of member spec changed. New
1616 (load_font_group): Arg spec_list deleted.
1617 (load_fontset_contents): Adjusted for the change of fontset_def.
1618 (free_fontset): Fix the way of freeing fontset elements.
1619 (realize_fontset_elements): Argument changed.
1620 (get_per_script): New function.
1621 (free_realized_fontset_elements): Fix the way of feeing rfontset
1623 (update_fontset_elements): Fix args to realize_fontset_elements.
1624 (mfont__realize_fontset): New arg spec.
1625 (try_font_list): New function.
1626 (try_font_group): New arg request. Use try_font_list.
1627 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1629 (mfontset): Adjusted for the change of MFontset.
1630 (mfontset_copy): Likewise. Don't share plists.
1631 (mfontset_modify_entry): Adjusted for the change of MFontset.
1632 (mfontset_lookup): Call get_per_script.
1633 (mdebug_dump_fontset): Print also the address of fonts.
1635 * input.c (shift_state): Don't reset ic_info->vars.
1636 (take_action_list): Call MDEBUG_PRINT fore calling
1639 * internal-gui.h (MFontDriver): Don't typedef it here.
1641 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1642 (MXFont): This type deleted.
1644 (struct _MFontX): New struct.
1645 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1646 (MDisplayInfo): Member base_font_list deleted.
1647 (DEFAULT_FONT): Definition changed.
1648 (FALLBACK_FONT): This maclr deleted.
1649 (free_display_info): Adjusted for the change of MDisplayInfo.
1650 (free_device): Argument to mfont__free_realized changed.
1651 (xfont_driver): Adjusted for the change of MFontDriver.
1652 (xfont_registry_list): Use MFontX instead of MXFont.
1653 (MRealizedFontX): Renamed from MXFontInfo.
1654 (xfont_select): Return the font found first.
1655 (close_xfont): Change MXFontInfo to MRealizedFontX.
1656 (xfont_open): Return the realized font.
1657 (xfont_find_metric): Get xfont from rfont->fontp.
1658 (xfont_has_char): New function.
1659 (xfont_encode_char): Adjusted for the argument change.
1660 (xfont_render): Get xfont from rfont->fontp.
1661 (xfont_list): Adjusted for the argument change.
1662 (MRealizedFontXft): Renamed from MXftFontInfo.
1663 (xft_driver): Ajusted for the change of MFontDriver.
1664 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1665 (xft_open_font): Argument changed.
1666 (xft_open): Argument changed. Return the realized font.
1667 (xft_find_metric): Get xft_font from rfont->fontp.
1668 (xft_has_char, xft_encode_char): New functions.
1669 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1670 font if not yet opened.
1671 (device_open): Don't set frame->font.
1673 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1675 (gd_font_open): New function.
1676 (gd_render): Don't use the local variable ft_info.
1677 (device_init): Adjusted for the change of gd_font_driver.
1679 * textprop.c (mtext__prop_init): Initialize text_property_table.
1680 Call M17N_OBJECT_ADD_ARRAY.
1681 (mtext__prop_fini): Don't call mdebug__report_object.
1683 * plist.c (mplist__init): Initialize plist_table.
1684 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1685 (mplist__fini): Don't call mdebug__report_object.
1687 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1688 (mtext__fini): Don't call mdebug__report_object.
1689 (MTEXT_FORMAT_UTF_16): Correct type.
1690 (mtext_data): New function.
1691 (mtext_text): Fix calculation of limit and args to
1694 * language.c: Include "plist.h".
1695 (M_script_lang_list): New variable.
1696 (mlang__init): Read languages and their information from m17n
1698 (mlanguage__list): New function.
1699 (Miso639_1, Miso639_2): New variables.
1701 * language.h (mlanguage__list): Extern it.
1703 * database.c (get_database_stream): Use SAFE_* macros for
1704 allocating and freeing path.
1705 (mdatabase__init): Likewise.
1707 * symbol.c (msymbol__fini): Don't free symbols here.
1708 (msymbol__free_table): New function.
1709 (msymbol_is_managing_key): New function.
1711 * symbol.h (msymbol__free_table): Extern it.
1712 (msymbol__list): Extern it.
1714 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1716 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1717 (struct _M17NObjectArray): New member name and next.
1718 (mdebug__add_object_array): Extern it.
1719 (M17N_OBJECT_ADD_ARRAY): New macro.
1720 (mdebug__report_object): Don't extern it.
1722 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1724 * m17n-gui.c (free_frame): Don't free frame->font.
1725 (null_device_fini): Fix code for freeing
1726 null_device.realized_font_list.
1727 (m17n_fini_win): Free interface.
1728 (mframe): Cast the return value of dlsym. Set frame->font here.
1729 (mframe_get_prop): Check frame->rface->rfont before accessing the
1732 * m17n-gui.h (Mfontfile): Extern it.
1733 (mfont_check): Extern it.
1734 (mface_equal): Extern it.
1736 * m17n-core.c: Include "symbol.h".
1737 (report_header_printed): This variable deleted.
1738 (object_array_root): New variable.
1739 (report_object_array): New function.
1740 (mdebug__report_object): This function deleted.
1741 (mdebug__add_object_array): New function.
1742 (m17n_init_core): Call mchartable_init () before mtext_init ().
1743 (m17n_fini_core): Call report_object_array (if necessary) and
1744 msymbol__free_atable at the end.
1746 * m17n-core.h (msymbol_is_managing_key): Extern it.
1747 (mtext_data): Extern it.
1748 (MTEXT_FORMAT_UTF_16): Correct type.
1749 (M17NLIB_MINOR_VERSION): Changed to 3.
1750 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1752 * chartab.c (mchartable__init): Initalize chartable_table.count.
1753 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1754 mdebug__report_object.
1756 2005-05-26 Kenichi Handa <handa@m17n.org>
1758 * m17n.h (Miso639_1, Miso639_2): Extern them.
1760 * symbol.h (msymbol__list): Extern it.
1762 * symbol.c (msymbol__list): New function.
1764 2005-05-19 Kenichi Handa <handa@m17n.org>
1766 * input-gui.c (minput__win_init): Don't change the value of
1769 2005-05-16 Kenichi Handa <handa@m17n.org>
1771 * m17n-core.c (m17n_object): Be sure to initialize all members.
1773 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1775 2005-05-09 Kenichi Handa <handa@m17n.org>
1777 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1779 2005-04-27 Kenichi Handa <handa@m17n.org>
1781 * language.c (mlang__init): Add "an" (Aragonese).
1783 * word-thai.c: Add support for libthai.
1784 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1785 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1787 * mtext.c: Include "word-thai.h" conditionaly.
1788 (mtext__init): Call mtext__word_thai_init conditionaly.
1789 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1791 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1792 not WORDCUT_LD_FLAGS.
1794 2005-04-19 Kenichi Handa <handa@m17n.org>
1796 * word-thai.c (wordseg_propertize): Always unref the attached
1798 (thai_wordseg): Don't unref the property.
1800 2005-04-18 Kenichi Handa <handa@m17n.org>
1802 * word-thai.c: Include stdlib.h.
1803 (wordseg_propertize): Add dummy function for the case that wordcut
1804 library doesn't exist.
1805 (wordseg_propertize): Fix for old wordcut library.
1807 2005-04-16 Kenichi Handa <handa@m17n.org>
1809 * word-thai.c: Include <stdio.h>.
1811 2005-04-15 Kenichi Handa <handa@m17n.org>
1813 * draw.c: Include mtext.h.
1814 (linebreak_table, M_break_at_space, M_break_at_word)
1815 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1816 (compose_glyph_string): Check POS before getting Mface text
1818 (truncate_gstring): Give correct TO arg to line_break function.
1819 (GET_LB_TYPE): New macro.
1820 (find_break_backward, find_break_forward): New functions.
1821 (mdraw__init): Initialize the above new variables.
1822 (mdraw__fini): Free linebreak_table.
1823 (mdraw_default_line_break): Use find_break_backward and
1826 * word-thai.c: New file.
1828 * word-thai.h: New file.
1830 * mtext.c: Include word-thai.h.
1831 (wordseg_func_table): New variable.
1832 (mtext__init): Initialize wordseg_func_table and call
1833 mtext__word_thai_init.
1834 (mtext__fini): Call mtext__word_thai_fini, free
1836 (MTextWordsegFunc): New type.
1837 (mtext__word_segment): New function.
1839 * mtext.h (wordseg_func_table): Extern it.
1840 (mtext__word_segment): Extern it.
1842 * m17n.c (m17n_init): Fix typo (== -> =).
1844 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1845 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1847 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1848 (MTEXTPROP_VAL): New macros.
1850 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1852 2005-04-07 Kenichi Handa <handa@m17n.org>
1854 * database.c (load_chartable): Fix pursing of symbol name.
1856 2005-03-24 Kenichi Handa <handa@m17n.org>
1858 * m17n.c (m17n_init): Fix typo (== -> =).
1860 2005-03-11 Kenichi Handa <handa@m17n.org>
1862 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1864 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1866 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1869 2005-03-09 handa <handa@m17n.org>
1871 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1872 calling m17n_init ().
1874 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1875 calling m17n_init_core ().
1877 2005-02-28 Kenichi Handa <handa@m17n.org>
1879 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1882 2005-02-17 Kenichi Handa <handa@m17n.org>
1884 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1885 (M_description, M_command, M_variable): New variables.
1886 (load_im_info_keys): New variables.
1887 (load_im_info, check_command_keyseq, get_description_advance)
1888 (parse_command_list, get_command_list, parse_variable_list)
1889 (get_variable_list, input_method_hook): New functions.
1890 (command_list, variable_list): New variables.
1891 (minput__init): Put input_method_hook to Minput_method.
1892 Initialize M_description, M_command, M_variable, Mdetail_text,
1893 load_im_info_keys, command_list, variable_list.
1894 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1895 (Mdetail_text): New variable.
1896 (minput_get_description, minput_get_commands)
1897 (minput_assign_command_keys, minput_get_variables)
1898 (minput_set_variable): New functions.
1900 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1901 (minput_assign_command_keys, minput_get_variables)
1902 (minput_set_variable): Extern them.
1904 * plist.c (UNGETC): Just decrement st->p.
1905 (read_mtext_element): New arg skip.
1906 (read_integer_element): Likewise.
1907 (read_symbol_element): Likewise.
1908 (read_element): New arg KEYS.
1909 (mplist__from_plist): Don't increment ref-count of NULL object.
1910 (mplist__from_file): New arg KEYS.
1911 (mplist_put): Don't increment ref-count of NULL object.
1912 (mplist_add): Likewise.
1913 (mplist_push): Likewise.
1914 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1916 * plist.h (mplist__from_file): Prototype adjusted.
1918 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1919 (get_database_stream): New function.
1920 (load_database): Use get_database_stream.
1921 (M_database_hook): New variable
1922 (mdatabase__init): Initialize M_database_hook.
1923 (mdatabase__load_for_keys): New function.
1924 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1926 (mdatabase_define): Free mdb->extra_info if necessary.
1928 * database.h (mdatabase__dir_list, M_database_hook)
1929 (mdatabase__load_for_keys): Extern them.
1930 (MDatabaseHookFunc): New type.
1932 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1934 2004-12-27 Kenichi Handa <handa@m17n.org>
1936 * Version 1.2.0 released.
1938 2004-12-27 Kenichi Handa <handa@m17n.org>
1940 * input.c (minput_filter): Don't reset ic->xxx_changed.
1942 * mtext.c (mtext_from_data): Fix documentation.
1944 2004-12-25 Kenichi Handa <handa@m17n.org>
1946 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1947 (M17NLIB_VERSION_NAME): Update to "1.2.".
1949 2004-12-24 Kenichi Handa <handa@m17n.org>
1951 * input.c (reset_ic): Set key_unhandled to 0.
1953 2004-12-21 Kenichi Handa <handa@m17n.org>
1955 * m17n-gui.h (mfont_from_spec): Delete extern.
1957 * input-gui.c (win_callback): Handle Minput_reset.
1958 (minput__win_init): Register reset_ic as a callback for
1961 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1962 changed. At first, shift to the initial state.
1963 (minput__init): Initialize Minput_reset. Register reset_ic as a
1964 callback for Minput_reset.
1965 (Minput_reset): New variable.
1966 (minput_filter): Always set ic->xxx_changed to 0.
1967 (minput_reset_ic): New function.
1968 (integer_value): Fix typo ('>' -> '<') and calculation of length
1971 * m17n-core.c (merror_code): Change type to `int'.
1973 * m17n-misc.h (merror_code): Adjust type.
1975 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1977 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1978 (mtext_change_prop): Delete extern.
1980 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1981 to `int'. Move the documents to m17n-core.h.
1983 2004-12-13 Kenichi Handa <handa@m17n.org>
1985 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1986 (MTextProperty): Document it.
1988 2004-12-09 Kenichi Handa <handa@m17n.org>
1990 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1992 2004-12-03 Kenichi Handa <handa@m17n.org>
1994 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1995 m17n__gui_initialized): New externs.
1997 * m17n-core.h (enum M17NStatus): New enum.
1998 (m17n_status): Extern it.
2000 * m17n-core.c (core_initialized): Delete this variable.
2001 (m17n__core_initialized, m17n__shell_initialized,
2002 m17n__gui_initialized): New variables.
2003 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2004 instead of core_initialized.
2005 (m17n_status): New function.
2007 * m17n.c (shell_initialized): Delete this variable.
2008 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2011 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2013 * m17n-gui.c (win_initialized): Delete this variable.
2014 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2015 instead of gui_initialized.
2017 2004-11-19 Kenichi Handa <handa@m17n.org>
2019 * input.c (reset_ic): Check if ic_info->state is NULL.
2020 (filter): If ic_info->state is NULL, return 0.
2021 (load_input_method): Don't unref `maps' it it's not created.
2023 2004-11-15 Kenichi Handa <handa@m17n.org>
2025 * input.c (find_candidates_group): If INDEX is -1, find the last
2027 (take_action_list): If the previous of the first candidate is
2028 requested, select the last candidate.
2030 2004-11-08 Kenichi Handa <handa@m17n.org>
2032 * m17n-X.c (device_open): Try at most 32 fonts to find a
2033 non-autoscaled font.
2035 * font.c (xlfd_parse_name): Fix previous change.
2037 2004-11-05 Kenichi Handa <handa@m17n.org>
2039 * font.c: (commont_style): Include dummy elements "slanted" and
2040 "rslanted" to prefer "o" to "r" if "i" is requested.
2042 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2044 2004-10-29 Kenichi Handa <handa@m17n.org>
2046 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2048 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2049 New members smallest and larger.
2050 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2051 (xfont_registry_list): Likewise.
2052 (xfont_select): Likewise.
2055 2004-10-28 Kenichi Handa <handa@m17n.org>
2057 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2058 font name comparison.
2059 (xfont_select): Fix logic for selecting a larger size font.
2061 2004-10-25 Kenichi Handa <handa@m17n.org>
2063 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2066 2004-10-22 Kenichi Handa <handa@m17n.org>
2068 * input.c (update_candidate): Renamed from udpate_candidate.
2069 (take_action_list): Show more debugging info on arithmetic commands.
2071 * m17n-X.c (device_open): Fix previous change.
2073 * draw.c (compose_glyph_string): Don't get face property at the
2076 2004-10-21 Kenichi Handa <handa@m17n.org>
2078 * draw.c (compose_glyph_string): Fix for the case of category
2081 2004-10-19 Kenichi Handa <handa@m17n.org>
2083 * input.c (mdebug_mask): New variable.
2084 (shift_state): Print debug information.
2085 (take_action_list): Likewise.
2086 (handle_key): Likewise.
2088 2004-10-14 Kenichi Handa <handa@m17n.org>
2090 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2092 2004-10-13 Kenichi Handa <handa@m17n.org>
2094 * m17n-X.c (device_open): Be sure to register at least one font
2097 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2098 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2100 2004-10-12 Kenichi Handa <handa@m17n.org>
2102 * draw.c (alloc_gstring): Fix previous change.
2104 * font-ft.c (ft_list_generic): Fix for the case of not
2107 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2109 * font.c (mfont_list): If no font is found, return NULL.
2110 (load_font_encoding_table): Put entries of nil registry first.
2111 (find_encoding): Adjust for the above change.
2113 2004-10-11 Kenichi Handa <handa@m17n.org>
2115 * m17n-gui.h (mfont_list): Adjust prototype.
2117 * m17n-X.c (xfont_list): New arg maxnum.
2119 * font.h (struct MFontDriver): Change prototype of <list>.
2121 * font-ft.c (fc_generic_family_list): Delete it.
2122 (Mserif, Msans_serif, Mmonospace): Delete them.
2123 (M_generic_family_info): New variable.
2124 (enum GenericFamilyType): New enum.
2125 (struct GenericFamilyInfo): New struct.
2126 (generic_family_table): New variable.
2127 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2129 (add_font_info): Get style here.
2130 (ft_list_family): Don't initialize fc_config here. Don't list
2132 (ft_list_generic): New function.
2133 (ft_select): Pay attention to generic familes here.
2134 (ft_open): Fix calculation of ascent and descent.
2135 (ft_list): Pay attention to generic families.
2136 (mfont__ft_init): Initialize M_generic_family_info,
2137 generic_family_table, and fc_config..
2138 (mfont__ft_fini): Finalize generic_family_table.
2140 * draw.c (compose_glyph_string): Use more constant font for
2141 glyphs. Adjust for the member change in MGlyph.
2142 (layout_glyph_string): Adjust for the member change in MGlyph.
2143 (alloc_gstring): Intilize scracth_glyph to avoid
2144 compose_glyph_string on it.
2145 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2146 (mdraw_coordinates_position): Fix previous change.
2148 * internal-gui.h (glyph_category): New enum.
2149 (MGlyph): Change type of <category> to enum glyph_category.
2151 * face.c (mface__realize): Delete args langauge and charset.
2152 (mface__for_chars): Fix for the case that glyphs have different
2154 (mface__update_frame_face): Adjust for mface__realize change.
2156 * face.h (mface__realize): Adjust prototype.
2158 2004-10-05 Kenichi Handa <handa@m17n.org>
2160 * language.c (mlang__init): Add Akan.
2162 2004-10-04 Kenichi Handa <handa@m17n.org>
2164 * font-ft.c (add_font_info): Add instead of push the element.
2165 (ft_list_family): For generic fonts, try all
2166 substituted. families.
2168 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2169 (run_rule): Don't update cluster range here.
2170 (run_command): Update cluster range on appending a glyph.
2171 (run_otf): Update cluster range for glyphs generated by OTF.
2173 2004-10-02 Kenichi Handa <handa@m17n.org>
2175 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2177 2004-09-30 Kenichi Handa <handa@m17n.org>
2179 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2181 2004-09-30 Kenichi Handa <handa@m17n.org>
2183 * font.h: Include <fontconfig/fontconfig.h>.
2184 (MFTInfo): New member langset.
2185 (mfont__encoding_list): Extern it.
2187 * font.c (mfont__encoding_list): New function.
2188 (mdebug_dump_font_list): New function.
2190 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2191 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2193 (ft_family_list): New variable.
2194 (set_font_info): New arg basep. Callers changed.
2195 (fc_list): Check the return value of FcPatternGetString.
2196 (add_font_info): New arg plist. Callers changed. Update
2198 (ft_list_family): New function (merged fc_list and ft_list_all).
2199 (ft_select): Use ft_list_family.
2200 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2202 (mfont__ft_init): Initialize above new variables.
2203 (mfont__ft_fini): Free ft_family_list.
2204 (STRDUP_LOWER): New macro.
2205 (set_font_info): Use STRDUP_LOWER.
2206 (ft_list_family): Avoid duplicate addition of font path. Use
2208 (fc_decode_prop): Fix typo.
2210 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2211 (xfont_registry_list): Change argument disp_info to frame.
2213 (xfont_list_all): New function.
2214 (xfont_list): If FONT is not NULL, check all fonts.
2216 2004-09-28 Kenichi Handa <handa@m17n.org>
2218 * m17n-X.c (MXFont, MXFontList): New types.
2219 (MDisplayInfo): Delete members font_registry_list,
2220 iso8859_1_family_list, iso10646_1_family_list, new members
2221 font_list, base_font_list.
2222 (free_display_info): Adusted for the change of MDisplayInfo.
2223 (xfont_driver): Initialize with xfont_list.
2224 (font_compare): New function.
2225 (build_font_list): Deleted.
2226 (xfont_registry_list): New function.
2227 (xfont_select): Use xfont_registry_list.
2228 (xfont_list): New function.
2229 (device_open): Adusted for the change of MDisplayInfo.
2231 * font-ft.c (add_font_info): New arg languages. Callers changed.
2232 (fc_list): Get languages from fonts..
2233 (ft_list_all): Renamed from ft_list. Callers changed.
2234 (ft_list): New function.
2235 (mfont__ft_driver): Initalize with ft_list.
2237 * font.c (mfont_list): New function.
2239 * font.h (struct MFontDriver): New member `list'.
2240 (MFTInfo): New member languages.
2242 * m17n-gui.h (mfont_list): Extern it.
2244 2004-09-27 Kenichi Handa <handa@m17n.org>
2246 * internal-gui.h (struct MGlyphString): Delete members mt,
2247 sub_width, sub_lbrearing, sub_rbearing, and region.
2249 * draw.c (MSubTextExtents): New type.
2250 (layout_glyphs): New arg extents. Set its members.
2251 (layout_glyph_string): Adjusted for the above change.
2252 (alloc_gstring): Don't set gstring->mt.
2253 (truncate_gstring): Call line_break function with mt instead of
2256 2004-09-22 Kenichi Handa <handa@m17n.org>
2258 * mtext.c (count_utf_16_chars): Count each code of invalid
2261 2004-09-19 Kenichi Handa <handa@m17n.org>
2263 * mtext.c (default_utf_16, default_utf_32): Rename them to
2264 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2267 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2270 2004-09-13 Kenichi Handa <handa@m17n.org>
2272 * draw.c (Mlatin): Don't declare it here.
2273 (visual_order): Fix reordering of combining characters.
2274 (compose_glyph_string): Fix detection of script.
2275 (layout_glyphs): Don't fix reordering of combining characters
2277 (layout_glyph_string): Pay attention to
2278 control->disable_overlapping_adjustment.
2279 (truncate_gstring): Include at least on character in a line.
2280 (get_gstring): Always scan one full line.
2281 (mdraw__init): Don't initialize Mlatin here.
2282 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2283 have a font, use ascent/descent of an ASCII font. Allow
2284 ink_array_return and logical_array_return to be NULL.
2285 (mdraw_coordinates_position): Fix iteration.
2287 * font-ft.c (MFTtoProp): Member completely changed.
2288 (ft_to_prop): Adjusted for the above change.
2289 (ft_to_prop_size): Likewise.
2290 (set_font_info): Adjusted for the change of MFTtoProp.
2291 (fc_generic_family_list): New variable.
2292 (fc_list): Add special handling of generic font names.
2293 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2294 Initialize fc_generic_family_list.
2295 (mfont__ft_fini): Don't free ft_to_prop. Free
2296 fc_generic_family_list.
2297 (FC_vs_M17N_font_prop): New type.
2298 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2299 (fc_decode_prop, fc_encode_prop): New functions.
2300 (mfont__ft_parse_name): Use fc_decode_prop.
2301 (mfont__ft_unparse_name): Use fc_encode_prop.
2303 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2304 (MWDevice): Add member realized_font_list.
2305 (free_display_info): Don't free disp_info->realized_font_list.
2306 (free_device): Free device->realized_fontset_list.
2307 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2308 (device_open): Don't initialize disp_info->realized_font_list.
2309 (device_open): Initialize device->realized_font_list and set it to
2310 frame->realized_font_list.
2312 * fontset.c (try_font_group): New function.
2313 (mfont__lookup_fontset): Use try_font_group.
2315 * font.c (common_weight): Change the order of "regular".
2317 * face.c (Mlatin): Don't make it static.
2318 (mface__realize): Be sure to set work_gstring.frame.
2319 (mface__for_chars): Likewise.
2321 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2324 * internal-gui.h (Mlatin): Extern it.
2326 * m17n-gui.h (MDrawControl): New member
2327 disable_overlapping_adjustment.
2329 2004-09-06 Kenichi Handa <handa@m17n.org>
2331 * font-flt.c (run_otf): Fix typo ('}'->']').
2333 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2334 (COMBINING_PRECOMPUTED_P): New macros.
2336 * draw.c (layout_glyphs): Handle precomputed combining code.
2338 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2339 precomupted combining code.
2341 2004-09-03 Kenichi Handa <handa@m17n.org>
2343 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2346 2004-08-27 Kenichi Handa <handa@m17n.org>
2348 * face.c (mface_put_prop): If the new value is the same as the
2349 current one, don't increment frame->tick.
2351 2004-08-25 Kenichi Handa <handa@m17n.org>
2353 * fontset.c (mfontset): Initialize font_spec_list member.
2354 (mfontset_copy): Load fontset if necessary.
2356 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2357 'metrics' to for C++.
2359 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2362 2004-08-16 Kenichi Handa <handa@m17n.org>
2364 * Version 1.1.0 released.
2366 2004-08-13 Kenichi Handa <handa@m17n.org>
2368 * language.c (mlang__init): Add Dhivehi.
2370 * m17n-gui.c (Mx, Mfreetype): Delete it.
2371 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2373 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2374 (mfont_resize_ratio): Extern it.
2375 (MDrawGlyphInfo): New member logical_width;
2376 (MDrawGlyph): New type.
2377 (mdraw_glyph_list): Prototype adjusted.
2379 * m17n-X.c (xfont_open): Set type and fontp members.
2380 (xft_open): Likewise.
2382 * internal-gui.h (Mx, Mfreetype): Delete extern.
2384 * font.h (struct MRealizedFont): New member type and fontp.
2386 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2387 (Mx, Mfreetype): Declare here.
2388 (Mxft): New variable.
2389 (mfont_resize_ratio): New function.
2391 * font-ft.c (ft_open): Set type and fontp members.
2393 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2396 2004-08-11 Kenichi Handa <handa@m17n.org>
2398 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2401 2004-08-06 Kenichi Handa <handa@m17n.org>
2403 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2406 * font-flt.c (run_otf): Print debugging information if necessary.
2408 2004-08-05 Kenichi Handa <handa@m17n.org>
2410 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2411 positioning_type 5 and 6. Switch simplified.
2413 2004-08-04 Kenichi Handa <handa@m17n.org>
2415 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2417 2004-08-02 Kenichi Handa <handa@m17n.org>
2419 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2420 set val to 1 even if it is greater than 1.
2422 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2424 2004-07-29 Kenichi Handa <handa@m17n.org>
2426 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2427 debugging information.
2429 * internal.h (MDEBUG_PRINT5): New macro.
2431 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2432 the previous one if the zero width glyph has left or right
2435 2004-07-26 Kenichi Handa <handa@m17n.org>
2437 * m17n-X.c (xft_render): Pay attention to members left_padding and
2438 right_padding of MGlyph.
2440 * draw.c (visual_order): Allocate one more elements for arrays as
2441 a workaround of fribidi bug.
2442 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2443 instead of MGlyph->bidi_sensitive.
2444 (layout_glyph_string): Pay attentinon to
2445 control->orientation_reversed when padding at the head or tail.
2446 Fix adjustment of space glyph width.
2447 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2450 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2451 instead of MGlyph->bidi_sensitive.
2453 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2455 2004-07-26 Kenichi Handa <handa@m17n.org>
2457 * draw.c (visual_order): Don't treat combined glyphs specially.
2458 (layout_glyphs): Don't get metrics glyphs that are already ready.
2459 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2460 width with the previous one.
2461 (draw_background): Fix bar cursor position on a r2l glyph.
2463 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2464 (run_rule): Fix place of updating cluster_begin_pos and
2465 cluster_end_pos here.
2466 (run_otf): Don't set left_padding.
2468 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2470 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2471 Fix handling of GPOS.
2472 (mfont__ft_drive_gpos): Delete this function.
2474 * font.h (mfont__ft_drive_otf): Renamed back from
2475 mfont__ft_drive_gsub.
2476 (mfont__ft_drive_gpos): Delete extern.
2478 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2479 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2481 2004-07-23 Kenichi Handa <handa@m17n.org>
2483 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2484 the same bidi level.
2486 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2488 2004-07-22 Kenichi Handa <handa@m17n.org>
2490 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2492 2004-07-20 Kenichi Handa <handa@m17n.org>
2494 * draw.c (render_glyphs): Fix checking of g->code validity.
2496 * face.c (mface__realize): Set g.type.
2498 2004-07-18 Kenichi Handa <handa@m17n.org>
2500 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2503 * m17n-gui.c (mframe): Print error message give by dlopen to
2506 2004-07-16 Kenichi Handa <handa@m17n.org>
2508 * draw.c (compose_glyph_string): Improve the way of deciding a
2509 script. For a character that doesn't have script property, use
2510 the last non-latin script.
2512 * font-ft.c (fc_list): Cancel previous change.
2513 (mfont__ft_init): Add more entries in ft_to_prop_name.
2515 2004-07-15 Kenichi Handa <handa@m17n.org>
2517 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2518 previous or next character glyphs.
2520 2004-07-14 Kenichi Handa <handa@m17n.org>
2522 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2523 of type GLYPH_SPACE.
2525 * fontset.c (mfont__lookup_fontset): If glyph type is
2526 GLYPH_SPACE, get codes for SPACE.
2528 * internal-gui.h (Mfont): Delete extern.
2530 * m17n-gui.h (Mfont): Delete duplicated extern.
2532 2004-07-13 Kenichi Handa <handa@m17n.org>
2534 * font-ft.c (DEVICE_DELTA): New macro.
2535 (adjust_anchor): New function.
2536 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2538 (mfont__ft_drive_gpos): New function.
2540 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2541 (FontLayoutContext): Delete member `rfont'.
2542 (run_otf): Set g->otf_cmd. Call
2543 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2544 only whne HAVE_OTF is defined.
2546 * fontset.c: Include "config.h".
2548 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2549 (MGlyph): New member otf_cmd.
2551 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2552 (mfont__ft_drive_gpos): Extern it.
2554 * face.c: Include "config.h".
2556 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2558 * input-gui.c: Include "config.h".
2560 * plist.c: Include "config.h".
2562 2004-07-06 Kenichi Handa <handa@m17n.org>
2564 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2565 internal-gui.h: Cancel previous changes.
2567 * m17n-gd.h: Delete it.
2569 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2570 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2571 @XML2_LD_FLAGS@ to above.
2572 (libm17n_la_LIBADD): Add -ldl.
2573 (libm17n_la_LDFLAGS): Add -export-dynamic.
2574 (X_LD_FLAGS): Fix the order of linking.
2575 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2576 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2577 (libm17n_X_la_LDFLAGS): Add -module.
2578 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2579 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2580 (libm17n_gd_la_LDFLAGS): Add -module.
2581 (include_HEADERS): Delete m17n-gd.h.
2583 2004-06-30 Kenichi Handa <handa@m17n.org>
2585 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2586 (MDeviceLibraryInterface): Delete it.
2587 (register_device_library): Delete it.
2588 (m17n__device_library_list): Renamed from device_library_list.
2590 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2591 (m17n_init_win): Adjust prototype.
2593 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2594 (m17n_init_gd): New function.
2596 * m17n-gd.h: New file.
2598 * m17n-X.h: Include <m17n-gui.h>.
2599 (m17n_init_X): Extern it.
2600 (M17N_INIT): Redefine it.
2602 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2603 (m17n_init_X): New function.
2605 * internal-gui.h (m17n__device_library_list): Extern it.
2606 (struct MDeviceDriver): New members initialized, init, and fini.
2608 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2610 (libm17n_X_la_LIBADD): Delete aboves.
2611 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2612 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2613 (libm17n_gd_la_LDFLAGS): Delete it.
2614 (include_HEADERS): Add m17n-gd.h.
2616 2004-06-25 Kenichi Handa <handa@m17n.org>
2618 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2619 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2621 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2623 * font-ft.c (fc_list): If FcFontList finds no font, try
2626 * draw.c (compose_glyph_string): Terminate the last loop after
2627 doing default combining if necessary.
2629 2004-06-24 Kenichi Handa <handa@m17n.org>
2631 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2633 * character.c (mchar_define_property): Add const to an arg.
2635 * charset.c (mchar_define_charset): Add const to an arg.
2637 * coding.c (MCodingSystem): Add const to an arg or decoder.
2638 (finish_decoding): Add const to an arg.
2639 (decode_coding_charset, decode_coding_utf_8)
2640 (decode_coding_utf_16, decode_coding_utf_32)
2641 (decode_coding_iso_2022, decode_coding_sjis)
2642 (mconv_define_coding): Likewise.
2644 * m17n-X.c (xft_find_metric): Delete unused variable.
2646 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2649 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2652 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2653 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2655 * mtext.h (mtext__from_data): Ajust prototype.
2657 2004-06-23 Kenichi Handa <handa@m17n.org>
2659 * draw.c (compose_glyph_string): Always get glyph codes by
2661 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2662 (mdraw_glyph_list): New function.
2664 * font-flt.c (mfont__flt_run): Be sure to call
2665 rfont->driver->encode_char.
2667 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2668 (ft_encode_char): Delete arg C.
2669 (ft_render): Don't call FT_Get_Char_Index.
2671 * font.c (mfont__encodable_p): Delete it.
2672 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2674 * font.h (struct MFontDriver): Delete arg C of encode_char.
2675 (mfont__encodable_p): Delete extern.
2677 * m17n-X.c (xfont_encode_char): Delete arg C.
2678 (xft_find_metric): Don't cal FT_Get_Char_Index.
2679 (xft_render): Likewise.
2681 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2683 (mdraw_glyph_list): Extern it.
2685 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2687 2004-06-22 Kenichi Handa <handa@m17n.org>
2689 * m17n-gui.h (mfontset_lookup): Extern it.
2691 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2693 * fontset.c (realize_fontset_elements)
2694 (free_realized_fontset_elements, update_fontset_elements): New
2696 (mfont__realize_fontset): Call realize_fontset_elements.
2697 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2698 (mfont__lookup_fontset): If a fontset was modified, update
2699 the realized fontset.
2700 (mfontset_modify_entry): Increment fontset->tick.
2701 (mfontset_lookup): New function.
2703 2004-06-21 Kenichi Handa <handa@m17n.org>
2705 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2707 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2708 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2709 length of source text 0.
2711 2004-06-21 Kenichi Handa <handa@m17n.org>
2713 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2714 (compare): Pay attention to format other than utf-8.
2715 (copy): Delete this function.
2716 (count_by_utf_8, count_by_utf_16, insert): New functions.
2717 (count_utf_16_chars): Fix handling of a surrogate pair.
2718 (find_char_forward, find_char_backward): Likewise.
2719 (mtext__from_data): Delete unnecessary check. Fix number of
2721 (mtext_from_data): Don't count items.
2722 (mtext_ref_char): Optimize the code.
2723 (mtext_set_char): Pay attention to format other than utf-8.
2724 (mtext_cat_char): Likewise.
2725 (mtext_dup): Don't call copy, instead do allocation here.
2726 (mtext_cat): Call insert instead of copy.
2727 (mtext_ncat): Likewise.
2728 (mtext_cpy): Delete character at first and call insert instead of
2730 (mtext_ncpy): Likewise.
2731 (mtext_copy): Likewise.
2732 (mtext_duplicate): Call insert instead of copy.
2733 (mtext_del): Pay attention to format other than utf-8.
2734 (mtext_ins): Simply call insert.
2735 (mtext_ins_char): Pay attention to format other than utf-8.
2736 (mtext_tok): Call insert instead of copy.
2737 (mtext_text): Call UNIT_BYTES.
2739 * textprop.c (mtext__adjust_plist_for_change): New function.
2741 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2742 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2743 (CHAR_UNITS_AT): Fix typo.
2744 (CHAR_UNITS_BY_HEAD): Fix typo.
2745 (STRING_CHAR_AND_UNITS): Fix typo.
2747 * internal.h (MTEXT_READ_ONLY_P): New macro.
2749 * mtext.h (mtext__replace): Delete the extern.
2750 (mtext__adjust_foramt): Adjust prototype.
2752 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2753 if possible. Otherwise make a copy of mmt.
2755 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2758 2004-06-18 Kenichi Handa <handa@m17n.org>
2760 * character.h (CHAR_STRING_UTF16): Fix syntax.
2762 2004-06-16 Kenichi Handa <handa@m17n.org>
2764 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2765 (libm17n_X_la_LIBADD): Delete it.
2766 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2768 * m17n-X.c (device_open): Add parens in `if' condition.
2770 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2771 (DEC_POSITION): Likewise.
2772 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2774 2004-06-15 Kenichi Handa <handa@m17n.org>
2776 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2779 * draw.c (compose_glyph_string): If langauge is specified, call
2780 mface__for_chars even if a text is all latin. Fix condition for
2781 setting non_ascii_found.
2783 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2785 * m17n.h (minput_char_to_key): Delete extern.
2787 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2789 * m17n-gui.c (null_device_open): Set several members of frame.
2791 2004-06-14 Kenichi Handa <handa@m17n.org>
2793 * m17n-gui.h (minput_event_to_key): Delete extern.
2795 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2797 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2799 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2801 2004-06-08 Kenichi Handa <handa@m17n.org>
2803 * character.c (mchar_put_prop): Don't increment the ref-count of
2806 2004-06-04 Kenichi Handa <handa@m17n.org>
2808 * m17n-core.c (mdebug__register_object): New function.
2809 (mdebug__unregister_object): Likewise.
2811 * internal.h (mdebug__register_object, mdebug__unregister_object):
2813 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2816 * charset.c (mcharset__load_from_database): Don't call
2817 mconv__register_charset_coding here.
2819 * coding.c (find_coding): Get a real name from an element of
2820 coding_definition_list.
2821 (mconv__register_charset_coding): Set the real name at the top of
2823 (mcoding__load_from_database): Likewise.
2824 (mconv_list_codings): Adjusted for the above change.
2826 2004-06-03 Kenichi Handa <handa@m17n.org>
2828 * coding.c (find_coding): Find by canonicalized name. Don't have
2829 to modify the element of coding_definition_list by
2831 (mconv__define_coding_from_charset): Delete it.
2832 (mconv__register_charset_coding): Canonicalize sym.
2833 (mcoding__load_from_database): Register plist modified by
2836 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2838 * font-ft.c (ft_open): Fix setting of rfont->descent.
2840 2004-06-02 Kenichi Handa <handa@m17n.org>
2842 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2843 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2844 (xlfd_unparse_name): Renamed from xfont_build_name.
2845 (mfont__init): Initialized Mfontconfig.
2846 (mfont__free_realized): Unconditionally unref rfont->info.
2847 (mfont__select): Free `this' if it's not best.
2848 (mfont__open): Don't check frame->realized_font_list.
2849 (mfont__parse_name_into_font): New function.
2850 (Mfontconfig): New variable.
2851 (mfont_from_name): Call mfont_parse_name.
2852 (mfont_name): Call mfont_unparse_name.
2853 (mdebug_dump_font): Likewise.
2855 * font.h (struct MFontDriver): Delete members parse_name and
2857 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2858 (mfont__parse_name_into_font): Extern it.
2860 * font-ft.c: Include "symbol.h".
2861 (close_ft): Unconditionally free filename and charmap_list of
2863 (ft_open): Duplicate base->filename. Increment ref-count of
2864 ft_info->charmap_list. Free ft_info->charmap_list and
2865 ft_info->filename on error.
2866 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2868 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2870 (enum xlfd_field_idx): Moved to font.c.
2871 (split_font_name, build_font_name): Likewise.
2872 (build_font_list): Call mfont__parse_name_info_font.
2873 (xfont_open): Call mfont__unparse_name. Free name.
2874 (xfont_parse_name, xfont_build_name): Moved to font.c
2875 (xft_select): Prototype deleted.
2876 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2877 Call mfont_pase_name.
2879 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2880 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2883 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2886 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2888 2004-06-01 Kenichi Handa <handa@m17n.org>
2890 * fontset.c (mfontset_modify_entry): Pay attention to the case
2891 that fontset->font_spec_list is NULL.
2893 2004-05-31 Kenichi Handa <handa@m17n.org>
2895 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2897 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2899 * font.c (mfont__select): Print score the a font for debugging.
2901 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2903 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2904 kanji_sym and kana_sym.
2906 2004-05-28 Kenichi Handa <handa@m17n.org>
2908 * Makefile.am (VINFO): New variable.
2909 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2910 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2912 2004-05-27 Kenichi Handa <handa@m17n.org>
2914 The following chanages are to make device dependent functions
2915 accessible only from MDeviceDriver structure, and to add GD and
2916 null device drivers. Font drivers get also device dependent.
2918 * m17n.c (m17n_init): Increament shell_initialized.
2919 (m17n_fini): Decremented shell_initialized.
2921 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2923 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2924 (Mwidget, Mcolormap, Mx): Extern them.
2926 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2927 (free_frame): Call frame->driver->close instead of
2929 (DLOPEN_SHLIB_EXT): New macro.
2930 (MDeviceLibraryInterface): New type.
2931 (device_library_list): New variable.
2932 (register_device_library): New function.
2933 (null_device): New variable.
2934 (null_device_close, null_device_get_prop)
2935 (null_device_realize_face, null_device_free_realized_face): New
2937 (null_driver): New variable.
2938 (null_device_init, null_device_fini, null_device_open): New
2940 (null_interface): New variable.
2941 (Mfreetype, Mdevice): Declare them.
2942 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2943 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2944 Mwin__Close_Device. Register drivers for Mx and Mgd.
2945 (m17n_fini_win): Decremented win_initialized. Call "fini"
2946 function of all opened devices. Don't call mwin__fini.
2947 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2949 (mframe): Handle Mdevice key of PLIST.
2950 (mframe_get_prop): Call frame->device->get_prop instead of
2951 mwin__device_get_prop.
2953 * m17n-gd.c: New file.
2955 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2956 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2958 * m17n-core.c (m17n_init_core): Increate core_initialized.
2959 (m17n_fini_core): Decremented core_initialized.
2961 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2962 (Mcolormap): Don't extern them here.
2964 * m17n-X.c (FRAME_DEVICE): New macro.
2965 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2966 (free_display_info): Use MPLIST_DO.
2967 (free_device): Free rface->info.
2968 (xft_close): Delete it.
2969 (device_init): Renamed from mwin__init.
2970 (device_fini): Renamed from mwin__fini.
2971 (device_open): Renamed from mwin__open_device.
2972 (x_driver): New variable.
2973 (MXFontInfo): Delete member frame, add member display.
2974 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2975 Don't declare them here.
2977 * internal-gui.h (MDeviceType): New enum.
2978 (MWDefice): Delete it.
2979 (struct MFrame): Change type of device to void *. New members
2980 device_type, driver, font_driver_list.
2981 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2982 (MDeviceDriver): New type.
2983 (Mx, Mgd, Mfreetype): Extern them.
2984 (mwin__XXX): Delete all of them.
2986 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2988 (win_destroy_ic): Likewise.
2989 (adjust_window_and_draw): Likewise.
2990 (win_callback): Likewise.
2991 (Mxim): Declare it here.
2992 (minput_event_to_key): Call M_CHECK_READABLE.
2994 * fontset.c (mfont__lookup_fontset): Delete local variable
2997 * font.h (struct MFontDriver): Delete member close, add members
2998 parse_name and build_name.
2999 (mfont__driver_list): Delete extern.
3000 (mfont__close): Delete extern.
3002 * font.c (mfont__init): Don't set mfont__driver_list.
3003 (mfont__fini): Don't unref mfont__driver_list.
3004 (mfont__select): Try font drivers in frame->font_driver_list. Set
3005 driver member of a realized font.
3006 (mfont__close): Delete it.
3007 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3008 functions of the default frame.
3010 * font-ft.c (close_ft): Check ft_info->ft_face and work
3012 (add_font_info): Allocate ft_info by M17N_OBJECT.
3013 (ft_close): Delete it.
3014 (mfont__ft_driver): Don't set ft_close.
3015 (ft_select): Increment ref-count of best_font.
3016 (ft_open): Decremented ref-count of base. On error, call
3017 FT_Done_Face and free ft_info.
3018 (ft_find_metric): Always use XXX_MONO in load_flags.
3019 (ft_render): Fix setting of width. Call
3020 frame->driver->draw_points instead of mwin__draw_points.
3021 (ft_to_prop): Don't set mfont__driver_list.
3022 (mfont__ft_fini): Just unref ft_info.
3024 * face.c (mface__init): Exchange foreground and background of
3025 mface__default. Call mface_put_prop to set hline of
3027 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3028 (mface__free_realized): Don't call mwin__free_realized_face.
3030 * draw.c (Mdepth): Don't declare it here.
3031 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3032 (render_glyphs, render_glyph_string): Likewise.
3033 (mdraw__init): Don't set Mdepth.
3034 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3036 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3038 (mdraw_text_items): Check FRAME is writable.
3039 (mdraw_per_char_extents): Implement body.
3041 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3043 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3044 (GUI_SOURCES): Delete it.
3045 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3046 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3047 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3048 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3049 (linkgui_LDADD): Set to libm17n-gui.la
3050 (linkgui_LDFLAGS): New target.
3051 (SRC): Include ${libm17n_gui_la_SOURCES} and
3052 ${libm17n_gd_la_SOURCES}.
3054 2004-05-24 Kenichi Handa <handa@m17n.org>
3056 * draw.c (draw_background): Don't draw background even if
3057 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3059 2004-05-22 Kenichi Handa <handa@m17n.org>
3061 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3063 2004-05-20 Kenichi Handa <handa@m17n.org>
3065 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3067 * m17n-gui.c: Include "plist.h".
3068 (mframe): If PLIST is NULL, initialize it to emply plist.
3070 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3071 (xft_driver): New variable.
3072 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3073 (xft_find_metric, xft_render): New function.
3074 (mwin__init): Adjusted for the new mfont__driver_list.
3075 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3076 generated face to PARAM.
3077 (mwin__realize_face): Fix setting of box colors. Don't call hook
3079 (mwin__draw_hline): New function.
3080 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3081 (mwin__xft_render): Delete these function.
3083 * internal-gui.h (struct MFrame): New member tick.
3084 (struct MGlyphString): New member tick.
3085 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3086 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3087 (mwin__xft_render): Delete extern.
3089 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3090 (mfontset): Always increment the reference count of returned
3093 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3094 (MFTInfo): Moved to font.h.
3095 (ft_iso8859_1_font_list): Delete this variable.
3096 (set_font_info): Don't set font->property[MFONT_TYPE].
3097 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3098 (add_font_info): Change type to void.
3099 (fc_list): Change anme from xft_list. Caller changed. Include
3100 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3101 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3102 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3103 (close_ft): Don't call mwin__xft_close. Unref
3104 ft_info->extra_info.
3105 (ft_open): Don't setup ft_info->fontname. Don't call
3107 (ft_find_metric): Don't call mwin__xft_get_metric.
3108 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3109 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3110 (mfont__ft_init): Adjusted for new mfont__driver_list.
3111 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3113 * font.c (mfont__driver_list): Make it MPlist.
3114 (mfont__init): Adjust initialization of mfont__driver_list.
3115 (mfont__fini): Free mfont__driver_list.
3116 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3117 (mfont__select): Adjusted for the new mfont__driver_list.
3119 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3120 (mfont__drirver_list): Adjust prototype.
3121 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3123 * face.h (struct MFace): Delete member realized_face_list, add
3125 (struct MRealizedFace): Delete member need_update
3126 andnofont_rface, add member non_ascii_list.
3127 (mface__update_frame_face): Extern it.
3129 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3131 (get_hline_create, get_box_create): New functions.
3132 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3134 (free_face): Cancep previous change. Free face->frame_list.
3135 (serialize_hline): Do nothing if hline->width is zero.
3136 (serialize_box): Do nothing if box->width is zero.
3137 (mface__init): Setup all properties of mface__default.
3138 (mface__fini): Free hline_prop_list and box_prop_list.
3139 (mface__realize): Cancel previous change. Update
3140 face->frame_list. Setup rface->non_ascii_list.
3141 (mface__for_chars): Update rface->non_ascii_list.
3142 (mface__free_realized): Free rface->non_ascii_list.
3143 (mface__update_frame_face): New function.
3144 (mface): Initialize face->frame_list.
3145 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3147 (mface_merge): Likewise.
3148 (mface_put_prop): If key is Mhline or Mbox, get value by
3149 get_hline_create or get_box_create respectively.
3150 (mface_put_prop): Update frame->tick and call
3151 mface__update_frame_face if necessary.
3152 (mface_update): Do nothing if func is noop_hook.
3154 * draw.c (render_glyphs): If a font is not found, use
3155 mwin__draw_empty_boxes.
3156 (alloc_gstring): Initialize gstring->tick.
3157 (get_gstring): Check gstring->tick.
3159 2004-05-17 Kenichi Handa <handa@m17n.org>
3161 * face.c (find_realized_face): Return value changed. If RFONT is
3162 NULL, avoid unnecessary checking.
3163 (free_face): Free face->realized_face_list.
3164 (mface__realize): Adjusted for the change of find_realized_face.
3165 If it returns a realized face that needs update, free it and
3166 realize a new one. Push a new realized face to
3167 frame->realized_face_list instead of appending.
3168 (mface__for_chars): Adjusted for the change of find_realized_face.
3169 Short cut if the required font is in rface->ascii_rface.
3170 (mface_put_prop): Free old value if necessary. Set need_update
3171 member of realized faces to 1.
3173 * face.h (struct MFace): Delete member tick, add member
3175 (struct MRealizedFace): Delete member tick, add member
3178 2004-05-13 Kenichi Handa <handa@m17n.org>
3180 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3182 2004-05-12 Kenichi Handa <handa@m17n.org>
3184 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3186 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3187 parse it XftNameParse.
3189 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3190 (all_fonts_scaned): New variable.
3191 (set_font_info): FAMILY may be Mnil.
3192 (add_font_info): Argument changed.
3193 (xft_list): Call add_font_info in it.
3194 (ft_list): Likewise.
3195 (ft_select): Make it work in the case family is Mnil.
3196 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3197 (mfont__ft_fini): Set all_fonts_scaned to 0.
3199 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3200 that is failed to open.
3202 2004-05-10 Kenichi Handa <handa@m17n.org>
3204 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3205 device's depth is 1 (i.e. monochrome).
3207 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3208 to work around the problem of libtool.
3210 * font-ft.c: Include <freetype/ftbdf.h>.
3211 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3213 (mfont__ft_init): Initialize them.
3214 (ft_iso8859_1_font_list): New variable.
3215 (set_font_info): Detect a font containing iso8859-1 glyphs and
3216 register it in ft_iso8859_1_font_list. If the font is not
3217 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3218 properties of the font from its properties.
3219 (add_font_list): If the font is not scalable, check if it is BDF
3220 or PCF font. If not, ignore it.
3221 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3222 registry is not iso8859-1.
3223 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3224 ft_iso8859_1_font_list.
3225 (ft_find_metric): If the font is not scalable, assume it as BDF
3226 or PCF, and get a metric from its properties.
3227 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3229 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3231 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3232 (libm17n_la_LDFLAGS): Delete it.
3233 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3234 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3236 2004-05-06 Kenichi Handa <handa@m17n.org>
3238 * draw.c (compose_glyph_string): Fix previous change.
3240 2004-04-30 Kenichi Handa <handa@m17n.org>
3242 * font-ft.c (ft_list): Delete unused variable `result'.
3243 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3245 2004-04-27 Kenichi Handa <handa@m17n.org>
3247 * m17n-X.c: Include config.h
3248 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3249 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3250 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3251 (FRAME_CMAP, FRAME_VISUAL): New macros.
3252 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3253 (xfont_driver): Make it static.
3254 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3255 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3256 info->xft_color_back.
3257 (MXftFontInfo) [HAVE_XFT2]: New type.
3258 (mwin__xft_close) [HAVE_XFT2]: New function.
3259 (mwin__xft_open) [HAVE_XFT2]: New function.
3260 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3261 (mwin__xft_render) [HAVE_XFT2]: New function.
3263 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3264 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3265 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3268 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3270 * font-ft.c: Don't include FT_FREETYPE_H here.
3271 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3272 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3273 (MFTInfo): New member charmap_index.
3274 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3275 (check_otf_filename): Renamed from check_filename. Return value
3277 (ft_set_property): This function deleted.
3278 (set_font_info): New function.
3279 (add_font_list): Argument changed. Add multiple fonts.
3280 (xft_list) [HAVE_XFT2]: New function.
3281 (ft_list) [not HAVE_XFT2]: New function.
3282 (ft_select): Add code for Xft.
3283 (close_ft): Likewise.
3284 (ft_open): Likewise.
3285 (ft_find_metric): Likewise.
3286 (ft_encode_char): Likewise.
3287 (ft_render): Likewise.
3289 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3291 2004-04-26 Kenichi Handa <handa@m17n.org>
3293 * textprop.c (mtext_attach_property): Declare the return type as
3296 2004-04-21 Kenichi Handa <handa@m17n.org>
3298 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3300 2004-04-09 Kenichi Handa <handa@m17n.org>
3302 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3304 (load_command): Setup above members.
3306 2004-04-05 Kenichi Handa <handa@m17n.org>
3308 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3310 2004-03-30 Kenichi Handa <handa@m17n.org>
3312 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3315 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3316 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3318 2004-03-29 Kenichi Handa <handa@m17n.org>
3320 * Version 1.0 Patch Level 2 released.
3322 2004-03-29 Kenichi Handa <handa@m17n.org>
3324 * charset.c (make_charset): Set charset->fully_loaded and
3325 charset->simple correctly. Don't try to get charset->min_char and
3326 charset->max_char for a charset of method subset and superset.
3327 Don't load a mapping file here.
3328 (mcharset__init): Set unified_max.
3329 (mcharset__load_from_database): Free a working plist.
3331 * coding.c (mcoding__fini): Free all malloced data.
3333 * input-gui.c (win_create_ic): Set control.as_image for preediting
3336 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3337 `count') to initialize the array.
3339 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3342 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3344 (mwin__create_window): Fix bug of setting a background pixel of a
3346 (mwin__adjust_window): Clear the window before drawing.
3348 * m17n-core.c (mdebug__report_object): Free array->objectes if
3350 (m17n_init_core): Don't set report_header_printed to 0 here.
3351 Fix debugging information.
3352 (m17n_fini_core): Set report_header_printed to 0 here.
3354 * m17n-core.h (mplist_deserialize): Extern it.
3356 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3358 * m17n.c (m17n_fini): Fix debugging information.
3360 * mtext.c (mtext__adjust_foramt): New function.
3362 * mtext.h (mtext__adjust_foramt): Extern it.
3364 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3366 * plist.h (mplist__deserialize): Don't extern it.
3368 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3369 elements of symbol_table to NULL. Report about created and freed
3370 symbols if MDEBUG_FINI is set.
3372 2004-03-22 Kenichi Handa <handa@m17n.org>
3374 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3376 * m17n.c (m17n_init): Fix the way of checking merror_code.
3378 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3380 2004-03-22 Kenichi Handa <handa@m17n.org>
3382 * fontset.c (realize_font_group): Adjust the font size by
3383 mfont__resize before selecting a font.
3385 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3387 2004-03-19 Kenichi Handa <handa@m17n.org>
3389 * Version 1.0 Patch Level 1 released.
3391 2004-03-19 Kenichi Handa <handa@m17n.org>
3393 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3395 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3397 2004-03-19 Kenichi Handa <handa@m17n.org>
3399 Re-apply the changes forgotten in the released version.
3401 * charset.c (mcharset__load_from_database): Call
3402 mchar_define_charset.
3404 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3405 (mconv_encode_range): Put Mcoding text property.
3407 2004-03-18 Kenichi Handa <handa@m17n.org>
3409 * draw.c (Mdepth): New variable.
3410 (visual_order): Delete unused local var `pos'.
3411 (compose_glyph_string): Fix for the case that gstring->glyphs is
3412 realloced. Stop generating glyphs at TO. Fix handling of
3414 (layout_glyphs): Get metrics of all glyphs in advance. Set
3415 lbearing and rbearing of base of composition glyph correctly.
3416 Handle left-overhang glyphs correctly.
3417 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3419 (dump_combining_code): Change the defualt off_x character to ".".
3420 (mdraw__init): Initialize Mdepth.
3422 * face.c (work_gstring): New variable
3423 (mface__init): Initialize work_gstring.
3424 (mface__fini): Free work_gstring.glyphs.
3425 (mface__realize): Don't handle videomode property here. Adjusted
3426 for the change of mfont__get_metric.
3427 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3429 * face.h (enum face_gc): Moved to m17n-X.c.
3431 * font.h (struct MFontDriver): Arguments of find_metric changed.
3432 (mfont__select): Prototype adjusted.
3433 (mfont__get_metric): Likewise.
3434 (mfont__ft_drive_otf): Likewise.
3435 (mfont__flt_run): Likewise.
3437 * font.c (mfont__select): New argument layouter. If layouter is
3438 different in the registered font, make a new copy of realized
3440 (mfont__get_metric): Argument changed. Get metrics of multiple
3442 (mfont_find): Call mfont__select with layouter as Mnil.
3444 * font-flt.c (FontLayoutContext): New member rfont.
3445 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3446 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3448 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3450 (NUM_POINTS): New macro.
3451 (MPointTable): New type.
3452 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3453 (mfont__ft_drive_otf): New argument rfont.
3455 * fontset.c (realize_font_group): Adjusted for the changed of
3457 (check_fontset_element): This function deleted.
3459 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3460 off the parent window if the preedit text is zero length.
3462 * internal-gui.h (struct MFrame): New members foreground,
3463 background, videomode, font.
3464 (struct MGlyphString): New member anti_alias.
3465 (MDrawPoint): New type.
3466 (mwin__draw_bitmap): Prototype deleted.
3467 (mwin__draw_points): Prototype added.
3469 * m17n-gui.h (MDrawControl): New member anti_alias.
3471 * m17n-gui.c (free_frame): Free frame->font.
3472 (mframe): Set the fontset of frame->face to the default fontset.
3474 * m17n-X.c (RGB_GC): New type.
3475 (enum gc_index): Renamed from enum face_gc. Member names changed.
3477 (struct MWDevice): Members foreground and background deleted. New
3478 member scratch_gc, gc_list.
3479 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3480 (free_device): Free GCs in device->gc_list.
3481 (get_rgb_gc): New function.
3482 (get_gc): Renamed and argument changed from get_color.
3483 (get_gc_for_anti_alias): New function.
3484 (xfont_find_metric): Arguments changed. Get metrics of multiple
3486 (set_region): Argument changed. Caller changed.
3487 (xfont_render): Allways set a font in gc.
3488 (x_error_handler, x_io_error_handler): Define only if
3489 X_SET_ERROR_HANDLER is defined.
3490 (mwin__open_device): Create device->scratch_gc. Set members
3491 foreground, background, and videomode of frame. Call
3492 XSetErrorHandler and XSetIOErrorHandler only if
3493 X_SET_ERROR_HANDLER is defined.
3494 (struct gc_list): Deleted.
3495 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3496 (mwin__realize_face): Adjusted for the change of the format of
3497 rface->info and the charge of set_region.
3498 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3499 (mwin__draw_box): Likewise.
3500 (mwin__draw_bitmap): This function deleted.
3501 (mwin__draw_points): New function.
3502 (mwin__verify_region): Adjusted for the change of the format of
3503 rface->info and the charge of set_region.
3504 (mwin__create_window): Inherit backgound pixel from parent.
3505 (mwin__dump_gc): Adjusted for the change of the format of
3508 2004-03-16 Kenichi Handa <handa@m17n.org>
3510 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3512 * input.c (M_key_alias): New variable.
3513 (handle_key): Try M_key_alias property of a key too.
3514 (minput__init): Initialize M_key_alias. Give that property to
3515 symbols in one_char_symbol. Fix bug of initializing
3518 * draw.c (compose_glyph_string): Don't handle
3519 ignore_formatting_char here. Include formatting characters in the
3520 range processed by a FTL.
3521 (layout_glyph_string): Handle ignore_formatting_char here.
3523 2004-03-12 Kenichi Handa <handa@m17n.org>
3525 * input-gui.c (win_create_ic): Enable bidi in status control.
3527 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3529 2004-03-09 Kenichi Handa <handa@m17n.org>
3531 * input.c (load_input_method): If title is not specified, use the
3532 input method name as title.
3534 * m17n-X.c (get_color): Make it static.
3535 (xim_create_ic, xim_destroy_ic, x_error_handler)
3536 (x_io_error_handler): Likewise.
3538 2004-03-01 Kenichi Handa <handa@m17n.org>
3540 * Version 1.0 released.
3543 Copyright (C) 2003, 2004
3544 National Institute of Advanced Industrial Science and Technology (AIST)
3545 Registration Number H15PRO112
3547 This file is part of the m17n library.
3549 The m17n library is free software; you can redistribute it and/or
3550 modify it under the terms of the GNU Lesser General Public License
3551 as published by the Free Software Foundation; either version 2.1 of
3552 the License, or (at your option) any later version.
3554 The m17n library is distributed in the hope that it will be useful,
3555 but WITHOUT ANY WARRANTY; without even the implied warranty of
3556 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3557 Lesser General Public License for more details.
3559 You should have received a copy of the GNU Lesser General Public
3560 License along with the m17n library; if not, write to the Free
3561 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3562 Boston, MA 02110-1301, USA.