1 2007-04-20 Kenichi Handa <handa@m17n.org>
3 * input.c (config_command): Fix previous change again.
4 (config_variable): Likewise.
5 (minput_config_command): Fix for the case of setting back to
7 (minput_config_variable): Likewise.
8 (minput_save_config): Include nil as documentation of customized
11 2007-04-05 Kenichi Handa <handa@m17n.org>
13 * input.c (config_command): Fix previous change.
14 (config_variable): Likewise.
16 * plist.c (mplist_get_func): Fix for backward compatiblity.
18 2007-04-04 Kenichi Handa <handa@m17n.org>
20 * input.c (minput_get_command, minput_config_command): Fix example
23 2007-03-29 Kenichi Handa <handa@m17n.org>
25 These changes are to avoid unsafe casting of a function pointer.
27 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
28 (struct MFace): New member hook.
30 * face.c (serialize_face): Adjusted for the change of MFace.
31 (deserialize_face): Likewise.
32 (mface__init): Likewise. Use msymbol_put_func.
33 (mface__realize): Adjusted for the change of MFace. Avoid
35 (mface_get_prop): Adjusted for the change of MFace.
36 (mface_put_prop): Likewise.
37 (mface_get_hook): New function.
38 (mface_put_hook): New function.
39 (mface_update): Adjusted for the change of MFace.
41 * input-gui.c (win_callback): Use mplsit_get_func.
42 (minput__win_init): Use mplsit_put_func.
44 * input.c (take_action_list): Use mplist_get_func.
45 (init_ic_info): Likewise.
46 (fini_ic_info): Likewise.
47 (minput_callback): Likewise.
48 (minput__init): Use mplist_put_func.
50 * language.c (mlang__init): Use msymbol_put_func.
52 * m17n-core.h (M17NFunc): New function type.
53 (M17N_FUNC): New macro.
54 (msymbol_put_func, msymbol_get_func): Extern them.
55 (mplist_put_func, mplist_get_func): Extern them.
57 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
59 * m17n-gui.c (mframe): Add a proper casting.
61 * plist.h (struct MPlist): Make the member val a union.
62 (MPLIST_VAL): Adjusted for the above change.
63 (MPLIST_FUNC): New macro.
64 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
66 * plist.c (mplist_put_func, mplist_get_func): New functions.
68 * symbol.c (msymbol__fini): Use MPLIST_VAL.
69 (msymbol_put_func, msymbol_get_func): New functions.
71 * textprop.c (mtext_serialize): Use msymbol_get_func.
72 (mtext_deserialize): Likewise.
74 2007-03-28 Kenichi Handa <handa@m17n.org>
76 * input.c (get_candidate_list): Avoid unnecessary unref.
78 2007-03-23 Kenichi Handa <handa@m17n.org>
80 * database.c (mdatabase__update): Unref plist at the tail.
82 2007-03-21 Kenichi Handa <handa@m17n.org>
84 * input.c (update_custom_info): Fix for the case "name == Mnil &&
86 (config_command): Fix for the case that configuration is
88 (config_variable): Likewise.
89 (minput_config_command): If keyseqlist is an empty list, cancel
91 (minput_config_variable) If value is an empty list, cancel the
93 (minput_save_config): Handle cancellation of config and customize
96 2007-03-15 Kenichi Handa <handa@m17n.org>
98 * input.c (minput_config_variable): Check custom->vars (not
101 2007-03-01 Kenichi Handa <handa@m17n.org>
103 * input.c (reload_im_info): Setup cmds, vars, and title of
105 (check_variable_value): Fix the return value.
107 * database.c (mdatabase__check): If necessary, update database and
110 2007-02-28 Kenichi Handa <handa@m17n.org>
112 * database.c (get_dir_info): Set dir_info->status to
114 (check_version): New function.
115 (register_database): Don't call find_database.
116 (register_databases_in_files): Don't register a database of
118 (mdatabase__update): Likewise. Avoid unnecessary scanning.
120 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
121 and MDB_STATUS_OUTDATED.
123 * font.h (struct MFont): Types of members type, source, and
124 spacing changed to unsigned.
126 * internal-gui.h (struct): Types of members category and type
129 * internal.h (struct MText): Types of members format and coverage
132 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
133 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
135 2007-02-23 Kenichi Handa <handa@m17n.org>
137 * input.c (Mpop): New variable.
138 (fully_initialize): Initialize Mpop.
139 (parse_action_list): Handle Mpop.
140 (take_action_list): Likewise.
141 (handle_key): When a key is unhandled, shift to the initial state
142 only if the current state has no branch action.
144 2007-02-12 Kenichi Handa <handa@m17n.org>
146 * input.c (get_preceding_char): Unref mt if necessary.
147 (get_following_char): Likewise.
148 (parse_action_list): Fix handling of `insert' action as
150 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
151 (take_action_list): Check invalid candidate list.
153 2007-02-06 Kenichi Handa <handa@m17n.org>
155 * input.c (integer_value): Check also ic->produced for @-N.
157 2007-01-26 Kenichi Handa <handa@m17n.org>
159 * database.c (mdatabase__update): Check mdatabase__dir_list from
162 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
164 2007-01-12 Kenichi Handa <handa@m17n.org>
166 * input.c (handle_key): Handle a branch action of the initial
169 2007-01-10 Kenichi Handa <handa@m17n.org>
171 * m17n-gd.c (gd_render): Delete superfluous line.
173 2006-12-26 Kenichi Handa <handa@m17n.org>
175 * m17n.h (minput_callback): Extern it.
177 * input.h (minput__callback): Delte extern.
179 * input.c (get_surrounding_text): Adjusted for the change of
180 minput__callback to minput_callback.
181 (delete_surrounding_text): Likewise.
182 (minput_create_ic): Likewise.
183 (minput_destroy_ic): Likewise.
184 (minput_filter): Likewise.
185 (minput_set_spot): Likewise.
186 (minput_toggle): Likewise.
187 (minput_reset_ic): Likewise.
189 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
190 and ic->candidate_to to 0.
191 (minput_callback): Renamed from minput__callback.
193 * input-gui.c (win_callback): Adjusted for the change of
194 minput__callback to minput_callback.
196 2006-12-15 Kenichi Handa <handa@m17n.org>
198 * font-ft.c (ft_add_font): Fix typo.
200 2006-12-06 Kenichi Handa <handa@m17n.org>
202 * Version 1.3.4 released.
204 2006-11-16 Kenichi Handa <handa@m17n.org>
206 * input.c (parse_action_list): Allow (undo 0).
207 (adjust_markers): New function.
208 (preedit_insert, preedit_delete): Call adjust_markers.
209 (preedit_replace): New function.
210 (update_candidate): Call preedit_replace instead of preedit_insert
212 (filter): When ic_info->commit_key_head is nonzero, shift input
213 event keys even if there's no committed text.
215 2006-11-10 Kenichi Handa <handa@m17n.org>
217 * input.h (MInputContextInfo): New member commit_key_head.
219 * input.c (preedit_commit): Update ic_info->commit_key_head.
220 (take_action_list): Reset ic_info->commit_key_head on Mundo.
221 (filter): When committed, shift keys by ic_info->commit_key_head.
223 2006-10-30 Kenichi Handa <handa@m17n.org>
225 * input.c (preedit_delete): Fix typo.
226 (take_action_list): Print more debugging information. Allow
227 variable in arg of 'select' and `pushback'.
229 * database.c (gen_database_name): Don't put extra space.
230 (load_database): Print debugging information.
231 (register_databases_in_files): New arg headlen. Callers changed.
232 (mdatabase__load_for_keys): Shorten debugging information.
233 (mdatabase_load): Don't print debugging information here.
235 2006-10-27 Kenichi Handa <handa@m17n.org>
237 * input.c (marker_code): New arg surrounding. Callers changed.
238 (surrounding_pos): Check if name[0] == '@'.
239 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
240 (take_action_list): Likewise.
241 (get_preceding_char): If POS is zero, always call
242 get_surrounding_text.
244 2006-10-19 Kenichi Handa <handa@m17n.org>
246 * input.c (load_variables): Fix setting of `global'.
248 2006-10-16 Kenichi Handa <handa@m17n.org>
250 * draw.c (draw_background): Be sure to set *to_x.
251 (render_glyph_string): If from == to, just return.
253 2006-10-18 Kenichi Handa <handa@m17n.org>
255 * database.c (get_dir_info): Return NULL if the directory name is
257 (register_databases_in_files): Call register_database with
259 (mdatabase__update): Fix logic. Call register_database with
261 (mdatabase_define): Call register_database with
264 * input.c (delete_surrounding_text): Be sure to set members
265 preceding_text and following_text to NULL.
266 (shift_state): Save variable values in ic_info->vars_saved.
267 (preedit_commit): Don't print debug information here. Don't
268 change ic_info->keys here.
269 (get_candidate_list): Don't ref plist.
270 (take_action_list): Don't unref return value of
271 get_candidate_list. For undo, reset ic->produced and recover
272 ic_info->vars. Be sure to set ic->candidate_list to NULL after
274 (init_ic_info): Set ic_info->vars_saved.
275 (fini_ic_info): Unref ic_info->vars_saved.
276 (re_init_ic): Be sure to set ic->candidate_list to NULL after
278 (filter): Be sure to set members preceding_text and following_text
279 to NULL. Print debug information about produced text. Delete
280 processed keys from ic_info->keys.
282 * input.h (MInputContextInfo): New member vars_saved.
284 2006-10-16 Kenichi Handa <handa@m17n.org>
286 * database.c (mdatabase__update): Fix the way to get db_info.
288 2006-10-02 Kenichi Handa <handa@m17n.org>
290 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
291 `size' changed to 24.
293 * font.c (xlfd_unparse_name): Adjusted for the change of
295 (font_score): Likewise.
296 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
298 * m17n-X.c (MFontX, _MFontX): Deleted.
299 (SET_SIZE, HAVE_SIZE): Deleted.
300 (free_display_info): Adjusted for the change of
301 disp_info->font_list format.
302 (xfont_registry_list): Likewise.
303 (xfont_open): Likewise.
304 (xfont_list): Likewise.
305 (xfont_encode_char): Ignore size to find a realized font.
306 (MRealizedFontXft): Change the order of members to make it
307 compatible with MRealizedFontFT.
309 2006-09-27 Kenichi Handa <handa@m17n.org>
311 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
312 (mfont_close): Add comments.
314 * mtext-lbrk.c (mtext_line_break): Add comment.
316 2006-09-26 Kenichi Handa <handa@m17n.org>
318 * input.c (minput_get_description): Handle description about
319 inclusion-only input methods.
321 2006-09-21 Kenichi Handa <handa@m17n.org>
323 * input.c (M_gettext): New variable.
324 (fully_initialize): Initialize M_gettext.
325 (check_description): New function.
326 (load_commands): Call check_description.
327 (config_all_commands): Be sure to unref pl.
328 (load_variables): Call check_description.
329 (config_all_variables): Be sure to unref pl.
330 (load_im_info): Call check_description.
332 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
334 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
335 and bind_textdomain_codeset.
337 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
339 2006-09-15 Kenichi Handa <handa@m17n.org>
341 * input.c (reload_im_info): Update custom and global info.
342 (init_ic_info): Fix previous change.
344 2006-09-14 Kenichi Handa <handa@m17n.org>
346 * database.c: Include <libgen.h>.
347 (mdatabase__lock): Make a directory if necessary.
349 * input.c (resolve_command): Adjusted for the format change of
350 configured_cmds member.
351 (load_commands, load_variables): Fix for errornous data handling.
352 (config_command, config_variable): New function.
353 (config_all_commands, config_all_variables): Renamed from
354 config_commands and config_variables. Utilize the above function.
355 (check_variable_value): Argument changed. Callers changed.
356 (load_im_info): Call config_all_commands and config_all_variables.
357 (init_ic_info): Adjusted for the format change of configured_vars
359 (minput__init): Initialize Mcustomized, Mconfigured, and
361 (Mcustomized, Mconfigured, Minherited): New variables.
362 (minput_get_command): Be sure to return NULL if an input method
363 use no local command.
364 (minput_get_variable): Be sure to return NULL if an input method
365 use no local variable.
366 (minput_config_command, minput_config_variable)
367 (minput_save_config): Adjusted for the format change of
368 configured_cmds and configured_vars members.
370 * plist.c (write_element): Delete superfluous ':'.
372 2006-09-13 Kenichi Handa <handa@m17n.org>
374 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
375 (minput_config_file): Extern it.
377 * draw.c (Minherited): Declaration moved to input.c.
378 (mdraw__init): Don't initialize Minherited here.
380 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
382 2006-09-07 Kenichi Handa <handa@m17n.org>
384 * textprop.c (mtext_serialize): Call mplist__serialize with the
387 * plist.h (mplist__serialize): Prototype adjusted.
388 (mplist__assq): Extern it.
390 * plist.c: Include <ctype.h>
391 (PUTC, PUTS): New macros.
392 (write_symbol): New function.
393 (write_element): New arg indent.
394 (dump_string, dump_plist_element): Delete them.
395 (mplist__from_string): New arg pretty.
396 (mplist__assq): New function.
397 (mdebug_dump_plist): Use write_element.
399 * mtext.c (mtext_cat_char): Allocate more memory.
400 (mdebug_dump_mtext): Don't escal a newline character.
402 * m17n.h (minput_get_command, minput_get_variable)
403 (minput_config_command, minput_config_variable)
404 (minput_save_config): Extern them.
406 * m17n-core.c: Include <string.h>.
407 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
408 use the stream stdout instead of a file of that name.
410 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
413 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
414 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
415 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
416 (MDEBUG_DUMP): Flush the stream.
418 * input.h (struct _MInputMethodInfo): Delete member im. New
419 members mdb, language, name, extra, cmds, configured_cmds,
420 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
421 (MInputContextInfo): New member tick.
423 * input.c: Big change to improve user-side input method
424 customization. Here, list just public API changes.
425 (minput_get_commands, minput_get_variables)
426 (minput_assign_command_keys, minput_set_variable): Label them
428 (minput_get_command, minput_get_variable)
429 (minput_config_command, minput_config_variable)
430 (minput_save_config): New functions.
432 * database.h (PATH_MAX): Define it if not yet defined.
433 (PATH_SEPARATOR): Likewise.
434 (enum MDatabaseStatus): New enum.
435 (struct MDatabaseInfo): Moved from database.c. New members status,
436 time, lock_file, and uniq_file.
437 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
438 (mdatabase__unlock): Extern them.
440 * database.c: Include <time.h>.
441 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
442 (GEN_PATH): Args changed. Callers changed.
443 (struct MDatabaseInfo): Moved to database.h.
444 (struct MDatabase, mdb_list): Deleted.
445 (mdatabase__list): New var.
446 (get_database_filename): Deleted. Callers changed to use
448 (find_file, get_database_file): New files.
449 (get_dir_info): Initialize new members of MDatabaseInfo.
450 (find_database): Arg chagnded. Callers changed.
451 (free_db_info, register_database, register_databases_in_files):
453 (update_database_list): Deleted.
454 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
455 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
456 (mdatabase__update): New function.
457 (mdatabase__check): Return value changed.
458 (mdatabase__file, mdatabase__lock, mdatabase__save)
459 (mdatabase__unlock): New functions.
461 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
463 * input.c (get_surrounding_text): Return -2 when surrounding text
465 (get_following_char): Likewise.
466 (get_preceding_char): Likewise.
467 (minput__callback): Return 0 if there is a callback function,
470 2006-08-17 Kenichi Handa <handa@m17n.org>
472 * input.c (reset_ic): Use shift_state to setup the current state.
474 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
476 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
477 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
478 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
480 2006-08-02 Kenichi Handa <handa@m17n.org>
482 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
484 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
486 * font-ft.c (ft_encapsulate): Add code for debugging.
487 (mfont__ft_drive_otf): Be sure to encode character before getting
490 2006-07-21 Kenichi Handa <handa@m17n.org>
492 * draw.c (mdraw_text_extents): Fix previous typo.
494 2006-07-19 Kenichi Handa <handa@m17n.org>
496 * draw.c (gstring_width): New arg lbearing.
497 (render_glyph_string): Adjusted for the change of gstring_width.
498 (mdraw_text_extents): Fix lbearing of ink and line metrics.
500 * m17n-core.h (Mlanguage): Extern it.
502 * m17n.h (Mlanguage): Extern deleted.
504 * mtext.c (mtext__init): Initialize Mlanguage.
505 (Mlanguage): Declaration moved from locale.c
507 * locale.c (mlocale__init): Don't initialize Mlanguage here.
508 (Mlanguage): Declaration moved to mtext.c.
510 * language.c (mlang__init): Don't initialize Mlanguage here.
512 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
514 2006-07-14 Kenichi Handa <handa@m17n.org>
516 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
517 (MRealizedFontFT): New member face_encapsulated.
518 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
519 (ft_gen_font): New function.
520 (ft_add_font): Use ft_gen_font.
521 (ft_list_script): Store lists in ft_script_list.
522 (ft_check_otf): New arg ft_face. Caller changed.
523 (ft_check_language): Likewise.
524 (ft_check_script): Likewise.
525 (ft_encapsulate, ft_close): New functions.
526 (mfont__ft_driver): Initialize members encapsulate and close.
527 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
529 * font.h (struct MRealizedFont): New member encapsulating.
530 (struct MFontDriver): New members encapsulate and close.
532 * font.c (mfont__match_p): If FONT is realized, check capability
533 by font drivers's check_capability method.
534 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
537 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
538 declarations of foundry and fam local vars.
539 (xft_driver): Make it static.
541 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
542 (mfont_close): Extern them.
544 * m17n-gd.c (device_open): Don't specify foundry and family of the
547 2006-07-11 Kenichi Handa <handa@m17n.org>
549 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
551 2006-07-13 Kenichi Handa <handa@m17n.org>
553 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
555 (ft_check_script): Delete unused var.
556 (ft_list_capability): Likewise.
558 * font.c (mfont__get_capability): Setup cap->otf.
559 (Motf): Make it global.
560 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
562 * font.h (MFontCapability): New member otf.
564 * language.c (mlang__fini): Delete unused vars.
566 * m17n-gui.h (Motf): Extern it.
568 * database.c (update_database_list): Delete unused vars.
570 2006-07-07 Kenichi Handa <handa@m17n.org>
572 * font-ft.c (DEVICE_DELTA): Fix typo.
574 2006-07-06 Kenichi Handa <handa@m17n.org>
576 * fontset.c (mfont__lookup_fontset): Don't ignore family and
579 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
581 * database.c: Update comments.
583 2006-07-05 Kenichi Handa <handa@m17n.org>
585 * database.c (PATH_MAX): Define it if not yet defined.
586 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
588 (get_database_filename): Use GEN_PATH.
589 (get_dir_info): Don't include the last '/' in directory name.
590 (register_database): New function.
591 (update_database_list): Use register_database. Search all
592 directories in mdatabase__dir_list for wildcard databases.
593 (mdatabase__init): Check "~/.m17n.d".
595 2006-07-03 Kenichi Handa <handa@m17n.org>
597 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
598 push reverse property.
600 * plist.c (dump_plist_element): Fix previous change.
602 2006-06-28 Kenichi Handa <handa@m17n.org>
604 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
607 * draw.c (MbidiNSM): New variable.
608 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
609 attention to bidi type NSM.
610 (mdraw__init): Initialize MbibiNSM.
612 * language.c (mscript__char_list): Fix finding a char-list element.
614 * plist.c (dump_string): Return number of printed characters.
615 (dump_plist_element): Print elements more compactly.
617 2006-06-23 Kenichi Handa <handa@m17n.org>
619 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
620 (include_HEADERS): Likewise.
622 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
624 * language.c: Update documentation.
626 2006-06-23 Kenichi Handa <handa@m17n.org>
628 * font-ft.c (struct MFontFT): Delete member lang.
629 (free_ft_info): Don't unref member lang. Destroy members langset
631 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
632 changed. Set members langset and charset.
633 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
635 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
637 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
638 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
639 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
640 characters at first. If it fails, try listing by language names.
641 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
642 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
643 change of MFontCapability.
644 (ft_list_capability): Likewise. Try listing by languages, then by
645 scripts. Check OTF at last.
646 (ft_check_script): New function.
647 (ft_select): Adjusted for the check of MFontCapability.
648 (ft_list_family_names): New function.
649 (ft_check_capability): If cap->script is not Mnil, call
651 (mfont__ft_driver): Initialize with ft_list_family_names.
653 * font.h (struct MFontDriver): New member list_fmaily_names.
654 (struct): Change member "MSymbol *lang" to "MSymbol language".
656 * font.c: Include "language.h".
657 (Motf): New variable.
658 (otf_script_list, load_otf_script_list): Delete it.
659 (find_script_from_otf_tag): Delete it.
660 (merge_capability): New function.
661 (mfont__init): Init Motf.
662 (mfont__fini): Don't unref otf_script_list.
663 (free_font_capability): Check cap->script_tag to determine if
664 OTF-related capability is set.
665 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
666 the change of type MFontCapability.
667 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
669 (mfont_list): Call merge_capability for LANGUAGE arg.
670 (mfont_list_family_names): New function.
672 * input-gui.c: Typo in comments fixed.
674 * input.c: Typo in comments fixed.
676 * language.h (mlanguage__list): Delete it.
677 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
680 * language.c: Include "mtext.h".
681 (M_script_lang_list): Delete it.
682 (language_list, script_list): New variables.
683 (load_lang_script_list, init_language_list, init_script_list): New
685 (mlang__init): Don't load language database here.
686 (mlang__fini): Unref language_list and script_list if not NULL.
687 (mlanguage__list): Delete it.
688 (mlanguage__info, mscript__info, mscript__char_list)
689 (mscript__otf_tag, mscript__from_otf_tag): New functions.
690 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
691 (mscript_list, mscript_language_list): New functions.
693 * m17n-gui.h (mfont_list_family_names): Extern it.
695 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
696 (mlanguage_text, mscript_list, mscript_language_list): Extern
699 2006-06-21 Kenichi Handa <handa@m17n.org>
701 * m17n-X.c (xfont_driver): Initialize with
702 xfont_list_family_names.
703 (xfont_list_family_names): New function.
704 (xft_driver): Initialize with NULL for list_family_names member.
705 (device_init): Set list_family_names member of xft_driver to that
708 2006-06-06 Kenichi Handa <handa@m17n.org>
710 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
712 2006-03-24 Kenichi Handa <handa@m17n.org>
714 * font-ft.c (ft_open): Improve debug message.
716 * fontset.c (mfontset__get_font): Fix for the case that no font in
717 per_script list is available.
719 2006-02-06 Kenichi Handa <handa@m17n.org>
721 * Version 1.3.3 released.
723 2006-02-22 Kenichi Handa <handa@m17n.org>
725 * textprop.c: Fix some typos in documentation.
727 * plist.c: Fix some typos in documentation.
729 * m17n-core.h: Fix some typos in documentation.
730 (M17NLIB_PATCH_LEVEL): Updated to 3.
731 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
733 * symbol.c: Fix some typos in documentation.
735 * mtext.c: Fix some typos in documentation.
737 * input.c: Fix several typos in documentation.
739 2006-02-06 Kenichi Handa <handa@m17n.org>
741 * Version 1.3.2 released.
743 2006-02-03 Kenichi Handa <handa@m17n.org>
745 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
746 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
748 * font.c (xlfd_parse_name): Fix handling of the name "nil".
750 * draw.c (layout_glyphs): Fix handling left_padding of
753 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
755 2006-02-02 Kenichi Handa <handa@m17n.org>
757 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
760 2006-01-25 Kenichi Handa <handa@m17n.org>
762 * input.c (resolve_expression): If the value of PLIST is a plist,
763 but the first element is not symbol, return 0.
765 2006-01-17 Kenichi Handa <handa@m17n.org>
767 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
768 HAVE_GD is 2 or the greater.
770 2006-01-16 Kenichi Handa <handa@m17n.org>
772 * Version 1.3.1 released.
774 2006-01-16 Kenichi Handa <handa@m17n.org>
776 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
777 simulating anti-aliasing.
779 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
780 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
782 2006-01-12 Kenichi Handa <handa@m17n.org>
784 * input.c (get_surrounding_text): Always pop ic->plist.
785 (reset_ic): Don't reset ic->plist.
787 2006-01-10 Kenichi Handa <handa@m17n.org>
789 * input.c (preedit_commit): For debugging, print only commiting
790 charactes. Don't set ic->candidate_show to 0.
791 (handle_key): Don't run branch-actions just by shifting to the
793 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
794 Reset vars and plist.
796 2006-01-07 Kenichi Handa <handa@m17n.org>
798 * input.c (load_branch): Confirm that maps is not NULL.
800 2006-01-05 Kenichi Handa <handa@m17n.org>
802 * input-gui.c (win_filter): Try to convert arg to key only when
805 * plist.c (read_integer_element): If '#' and '-' are followed by
806 non-integer-constituent, read them as a part of a symbol.
807 (read_symbol_element): New arg C.
808 (read_element): Adjust args to read_symbol_element.
810 * input.c (load_macros): On overwriting a macro, free the old
812 (minput__init): Store Mmap in load_im_info_keys.
813 (minput_get_title_icon): If the input method has no title, be sure
815 (minput_get_description): If the input method has no description,
816 be sure to return NULL.
817 (minput_get_variables): Fix documentation.
818 (handle_key): Pay attention to the case that key is Mnil.
819 (filter): Likewise. Fix handling of such symbol as S-A.
821 2005-12-22 Kenichi Handa <handa@m17n.org>
823 * Version 1.3.0 released.
825 2005-12-22 Kenichi Handa <handa@m17n.org>
827 * font-ft.c (ft_list): If the specified font has no property,
830 2005-12-20 Kenichi Handa <handa@m17n.org>
832 * character.c (mchar_get_prop): Check char_prop_list.
833 (mchar_put_prop, mchar_get_prop_table): Likewise.
835 2005-12-18 Kenichi Handa <handa@m17n.org>
837 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
838 file name sans language.
840 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
842 * input.c: Fix typo in comments.
844 2005-12-14 Kenichi Handa <handa@m17n.org>
846 * input.c (minput_get_title_icon): Check the default icon for the
849 2005-12-13 Kenichi Handa <handa@m17n.org>
851 * input.c (Mless_equal, Mgreater_equal): New variables.
852 (parse_expression, resolve_expression, parse_action_list)
853 (take_action_list): Handle the aboves.
854 (filter): Treat key S-X as X.
855 (minput__init): Initialize Mless_equal and Mgreater_equal.
856 (minput_get_title_icon): New function.
858 * m17n.h (minput_get_title_icon): Extern it.
860 * database.c (get_database_filename): Return a filename instead of
862 (load_database): Adjusted for the above change.
863 (mdatabase__load_for_keys): Likewise.
864 (mdatabase__find_file): New function.
866 * database.h (mdatabase__find_file): Extern it.
868 * font.h (mfont__resize): Delete extern.
870 * font.c (mfont__list): Check resize ratio.
871 (mfont__resize): Delete it.
872 (mfont_resize_ratio): Include the code of mfont__resize.
874 * font-ft.c (ft_open): Check resize ratio.
876 * m17n-X.c (xfont_open): Check resize ratio.
877 (xft_open): Likewise.
879 2005-12-07 Kenichi Handa <handa@m17n.org>
881 * input.c (take_action_list): If take_action_list return -1,
883 (handle_key): Likewise.
885 * face.c (mface__for_chars): When font is specified and layouter
886 is found for it, if the layouter doesn't support one of a
887 character, use a face sans layouter for it.
889 2005-12-06 Kenichi Handa <handa@m17n.org>
891 * fontset.c (mfont__lookup_fontset): If only a fallback font is
892 found, don't use it for more than one character.
894 2005-12-05 Kenichi Handa <handa@m17n.org>
896 * face.c (mface__realize): Set rfont->layouter to Mnil.
897 (mface__for_chars): Fix handling of layouter.
899 * character.h (mchar__define_prop): Extern it.
901 * database.c (update_database_list): Call mchar__define_prop if
904 * character.c (mchar__init): Don't call mchar_define_property.
905 Instead just initialize property keys.
906 (mchar__fini): Free char_prop_list only if it's not NULL.
907 (mchar__define_prop): New function.
908 (mchar_define_property): Call mchar__define_prop.
910 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
913 2005-12-02 Kenichi Handa <handa@m17n.org>
915 * language.c (mlang__init): Handle extra chars.
917 * m17n-gui.h (mfont_check): Adjust prototype.
919 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
920 (xfont_check_capability): New function.
921 (xft_driver): Specify xft_check_capability.
922 (xft_check_capability): New function.
924 * font-ft.c (M0_3): Delete it.
926 (ft_get_charmaps): Refer to M0.
927 (fc_parse_pattern): Fix previous change.
928 (ft_list_language): Check also extra chars.
929 (ft_check_otf): Define it even if HAVE_OTF is undef.
930 (ft_check_lang): Check the result of FcLangSetHasLang against
931 FcLangDifferentLang. Check also extra chars.
932 (ft_list_capability): Delete ifdef HAVE_OTF.
933 (ft_select): Likewise.
934 (ft_open): Improve debug information.
935 (ft_check_capability): New function.
936 (mfont__ft_driver): Specify ft_check_capability.
937 (mfont__ft_init): Initialize M0.
939 * fontset.c (get_font_from_group): New function.
940 (mfontset__get_font): New function.
942 * fontset.h (mfontset__get_font): Extern it.
944 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
945 (mfont__fini): Delete ifdef HAVE_OTF.
946 (free_font_capability): Likewise.
947 (mfont__get_capability): Likewise.
948 (mfont__check_capability): New function.
949 (mfont_check): Change the order of arguments. Use
952 * font.h (struct MFontDriver): New member check_capability.
953 (MFontCapability): Delete ifdef HAVE_OTF.
954 (mfont__check_capability): Extern it.
956 * face.c (mface__realize): Fix handling of FONT arg.
957 (mface__for_chars): Fix handling of explicitly specified font.
959 2005-11-25 Kenichi Handa <handa@m17n.org>
961 * font-flt.c (run_command): Print debug info for
964 * draw.c (layout_glyphs): Fix handling of left/right_padding.
966 * face.c (mface__for_chars): Check rfont before accessing the
969 2005-11-21 Kenichi Handa <handa@m17n.org>
971 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
974 * fontset.c (fontset_table): New variable.
975 (free_fontset): Call M17N_OBJECT_UNREGISTER.
976 (mfont__fontset_init): Add fontset_table as an object array.
977 (mfont__realize_fontset): Ref FONTSET.
978 (mfont__free_realized_fontset): Unref REALIZED->fontset.
979 (mfontset): Call M17N_OBJECT_REGISTER.
980 (mfontset_copy): Likewise.
982 * input.c (handle_key): For debugging, print information about
984 (filter): Add an alias for Meta and Alt modifiers.
985 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
987 (minput__init): Initialize them.
988 (parse_expression): New function.
989 (resolve_expression): New function.
990 (parse_action_list): Handle expressions by parse_expression.
991 (take_action_list): Handle expressions by resolve_expression.
992 (parse_nested_list_value): Fix previous change.
993 (resolve_command): Fix handling of the return value of
996 2005-11-18 Kenichi Handa <handa@m17n.org>
998 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1000 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1002 (ft_select): Likewise.
1004 * font.c (mfont_list): Fix for the case that FONT is NULL.
1005 (OTF_tag): Delete it.
1006 (load_otf_script_list): Define only when HAVE_OTF is defined.
1007 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1010 * draw.c (truncate_gstring): Be sure to truncate at
1011 glapheme-cluster boundary.
1013 2005-11-11 Kenichi Handa <handa@m17n.org>
1015 * input.c (delete_surrounding_text): Clear cache if necessary.
1017 2005-11-09 Kenichi Handa <handa@m17n.org>
1019 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1020 glyph prev is also supported by the current flt.
1022 2005-11-08 Kenichi Handa <handa@m17n.org>
1024 * m17n-X.c (xft_render): Cancel previous change.
1026 2005-11-07 Kenichi Handa <handa@m17n.org>
1028 * input.c: Include <stdlib.h>.
1029 (get_surrounding_text, delete_surrounding_text)
1030 (get_preceding_char, get_following_char): New functions.
1031 (integer_value): New arg surrounding. If it is nonzero, try to
1032 get a surrounding character. Callers changed.
1033 (take_action_list): Check `value' before setting an element.
1034 (destroy_ic): Unref ic_info->preceding_text and
1035 ic_info->following_text.
1036 (minput__init): Initialize Minput_get_surrounding_text and
1037 Minput_delete_surrounding_text.
1038 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1040 (filter): Unref ic_info->preceding_text and
1041 ic_info->following_text.
1043 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1046 * input.h (MInputContextInfo): New members preceding_text and
1049 2005-11-04 Kenichi Handa <handa@m17n.org>
1051 * input.c (parse_nested_list_value): Fix handling of the global
1053 (get_nested_list): Get global definitions by load_partial_im_info.
1054 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1055 MInputCandidatesChanged.
1056 (take_action_list): Likewise.
1057 (reset_ic): Likewise.
1058 (create_ic): Don't pay special attention to
1059 Mcandidates_group_size.
1060 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1061 (minput_set_variable): Get a definition of varible by
1062 mplist_find_by_value, not mplist_get.
1064 * m17n.h (enum MInputCandidatesChanged): New enum.
1066 2005-11-01 Kenichi Handa <handa@m17n.org>
1068 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1070 (mwin__destroy_window): If xft_draw's drawable is win, change it
1071 to device->drawable before destroying win.
1073 2005-10-31 Kenichi Handa <handa@m17n.org>
1075 * input.c (load_im_info): Fix adding of state.
1077 * m17n-core.c (m17n_fini_core): Fix reporting of module
1080 * m17n.c (m17n_fini): Fix reporting of module finalization.
1082 * m17n-gui.c (m17n_init_win): Fix reporting of module
1085 2005-10-29 Kenichi Handa <handa@m17n.org>
1087 * input.c (get_candidate_list): Fix the timing of referring plist.
1089 2005-10-28 Kenichi Handa <handa@m17n.org>
1091 * input.c (load_branch): Ignore an undefined map name.
1092 (load_im_info): Set im_info->title from `name' only if it's not
1094 (shift_state): Always update ic->status.
1095 (adjust_candidates): Renamed from adjust_candidate_command.
1096 Argument changed. Caller changed.
1097 (get_candidate_list, regularize_action): New functions.
1098 (take_action_list): Use them. On handling Munhandle, don't set
1100 (handle_key): If KEY is not handled by MAP, and MAP has
1101 branch_actions, perform them.
1103 * database.c (mdatabase__fini): Free dir_info->filename;
1105 2005-10-20 Kenichi Handa <handa@m17n.org>
1107 * input.c (marker_code): Accept '@@'.
1108 (integer_value): Handle '@@'.
1109 (parse_action_list): Accept a symbol argument.
1110 (take_action_list): Resolve the symbol argument. Handle the
1113 2005-10-18 Kenichi Handa <handa@m17n.org>
1115 * input.c: Include "charset.h".
1116 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1118 (MIMState): New member (M17NObject control).
1119 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1120 (get_nested_list, resolve_variable): New functions.
1121 (integer_value): New arg (MPlist **value). Set it to the plist
1122 element containing the value.
1123 (resolve_command): New function.
1124 (load_translation): New arg (MPlist *map_actions).
1125 (load_branch): New args language and name. If `keylist' is a
1126 symbol, resolved that as a command name.
1127 (free_map): New arg top. Free map->map_actions only if top is
1129 (free_state): New function.
1130 (load_state): New arg name.
1131 (im_info_list): New variable.
1132 (free_im_info, get_im_info_by_tags): New functions.
1133 (load_im_info): Arg key changed to plist. Handle `include'.
1134 Return (MInputMethodInfo *).
1135 (preedit_commit): Ref ic->candidate_list.
1136 (get_select_charset, adjust_candidate_command): New functions.
1137 (take_action_list): Handle `include'. Adjust candidate action
1138 properly. Handle control variables `candidates-charset' and
1139 `candidates-group-size'.
1140 (open_im): Use get_im_info.
1141 (create_ic): Get global variables.
1142 (load_partial_im_info): New function.
1143 (get_im_info): New function.
1144 (check_command_keyseq, check_command_list, check_variable_list):
1146 (minput__init): Don't handle M_database_hook and Mdetail_text.
1147 Initialize M_candidates, Mcandidates_group_size,
1148 Mcandidates_charset.
1149 (parse_variable_list, get_variable_list, parse_command_list)
1150 (get_command_list): Delete them.
1151 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1152 (minput__fini): Simply unref command_list and variable_list.
1153 (minput_get_description): Adjusted for the new form of description.
1154 (minput_get_commands): Use get_nested_list.
1155 (minput_assign_command_keys): Likewise.
1156 (minput_get_variables, minput_set_variable): Likewise.
1158 * input.h (MInputMethodInfo): New members im and maps.
1160 * database.h (M_database_hook): Delete extern.
1161 (MDatabaseHookFunc): Delete extern.
1162 (mdatabase__check): Extern it.
1164 * database.c: Include <glob.h>.
1165 (MAX_TIME): New macro.
1166 (Masterisk): New variable.
1167 (get_database_stream): Argument changed to (MDatabaseInfo *).
1169 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1170 (find_database): New function.
1171 (update_database_list): New function.
1172 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1173 calling update_database_list.
1174 (mdatabase__check): New function.
1175 (mdatabase_find): Use update_database and find_database. Don't
1176 handle MDatabaseHookFunc.
1177 (mdatabase_list): Call update_database at first.
1178 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1179 (MDatabaseList): New type.
1181 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1183 * m17n.h (Mdetail_text): Delete extern.
1185 * m17n-core.h (mplist_conc): Delete extern.
1187 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1189 (mplist_conc): Renamed to mplist__conc.
1190 (mplist__pop_unref): New function.
1192 2005-10-14 Kenichi Handa <handa@m17n.org>
1194 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1196 (read_element): If keys is an empty plist, return any element
1198 (dump_plist_element): Check if plist is nested.
1199 (mplist_conc): Always ref tail.
1200 (mplist_set): If key is a managing key, ref val in advance.
1202 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1203 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1204 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1207 * fontset.c (free_fontset): Unref fontset_list if necessary.
1208 (mfont__fontset_fini): Don't free fontset_list. Unref
1210 (mfont__realize_fontset): Initialize request.
1211 (mfontset): Ref default_fontset or fontset only if necessary.
1212 (mfontset_copy): Don't ref copy.
1214 * draw.c (render_glyphs): Check gend->type before checking
1217 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1218 unrefed plists to NULL.
1220 2005-10-04 Kenichi Handa <handa@m17n.org>
1222 * textprop.c (mtext_serialize): Be sure to make mt
1223 MTEXT_FORMAT_UTF_8 and NULL terminated.
1225 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1227 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1229 2005-10-03 Kenichi Handa <handa@m17n.org>
1231 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1232 is not at the beginning of line.
1234 2005-09-22 Kenichi Handa <handa@m17n.org>
1236 * input.c: Include <sys/stat.h> and <unistd.h>.
1237 (Minclude, Mcommit, Munhandle): New variables.
1238 (minput__init): Initialize them. Push only Mstate to
1239 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1240 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1242 (load_input_method): Handle "include" directive. If no states are
1244 (shift_state): If state_name is Mt, shift back to the previous
1245 state. Call preedit_commit to commit preedit text.
1246 (preedit_commit): New function.
1247 (take_action_list): Improve debug printing. Handle commit and
1249 (handle_key): Check the return value of take_action_list. Don't
1250 take branch_actions just after changing to the root map.
1251 (reset_ic): Reset all ic_info members.
1252 (filter): When a key is not handled, just move ic_info->keys
1253 instead fo calling reset_ic.
1254 (load_im_info): If key is not Mstate, push Mmap to
1256 (MDatabaseStatList): New type.
1257 (imdir_stat_list): New variable.
1258 (input_method_hook): Don't cancel the hook. Check the
1259 modification time of directories.
1260 (minput__fini): Free imdir_stat_list;
1262 * input.h (MInputContextInfo): New member prev_state.
1264 * m17n-core.h (mplist_conc): Extern it.
1266 * plist.c (mplist_conc): New function.
1268 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1270 * font.h (MRealizedFont): New member average_width.
1272 * font-ft.c (ft_open): Set rface->average_width.
1274 * font.c (xlfd_unparse_name): Print '*' before registry name.
1276 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1277 (xfont_open): Set rfont->average_width.
1278 (xft_open): Likewise.
1279 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1281 * internal-gui.h (struct MFrame): New member average_width.
1283 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1284 (mframe_get_prop): Return the average_width of a font.
1286 * face.c (mface__realize): Set rface->average_width.
1287 (mface__update_frame_face): Set frame->average_width.
1289 * face.h (MRealizedFace): New member average_width.
1291 2005-09-19 Kenichi Handa <handa@m17n.org>
1293 * font.c (xlfd_unparse_name): New arg full_xlfd.
1294 (mfont__encode_char): Use shortcut only for X core fonts.
1295 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1296 (mfont_put_prop): Handle `language' property.
1297 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1298 Print file can capability info too.
1300 * m17n-core.c (mdebug__output): New variable.
1301 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1302 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1303 (m17n_fini_core): Close mdebug__output if it's not stderr.
1305 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1306 (xfont_open): Handle baseline_offset.
1307 (xfont_find_metric): Likewise.
1308 (xfont_render): Likewise.
1309 (xft_open): Likewise.
1310 (xft_render): Likewise.
1312 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1313 (mdebug__output): Extern it.
1314 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1315 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1316 (MDEBUG_DUMP): New macro.
1317 (MDEBUG_PRINT_TIME): Print to medebug__output.
1319 * font.h (MRealizedFont): New member baseline_offset.
1321 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1323 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1324 (ft_list_family): Check alias.
1325 (ft_list_language): If language is "en", don't try to the second
1327 (ft_default_list): New variable.
1328 (ft_list_default): New function.
1329 (ft_select): If family is not specified, try only the default
1330 fonts. Treat the weights normal and medium same.
1331 (ft_open): Fix debug message. If registry is not specified, try
1332 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1333 (ft_find_metric): Likewise.
1334 (ft_render): Likewise.
1335 (ft_list): Fix debug message. Accept the registring iso8859-1.
1336 If family is not specified, try only the default fonts.
1338 * face.c (mface__realize): Fix logic of opening a font.
1340 2005-09-16 Kenichi Handa <handa@m17n.org>
1342 * face.c (mface__realize):
1344 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
1347 * input.c (shift_state): Fix the condition of taking init actions.
1348 (take_action_list): Fix handling of pushback action.
1349 (handle_key): Don't change key while checking its alias.
1350 (minput__init): Initialize new variables.
1351 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
1354 2005-09-12 Kenichi Handa <handa@m17n.org>
1356 * mtext.c (mtext__uppercase): Add proper open/close parens.
1357 (mtext_titlecase): Add proper casting.
1359 * input.c (parse_action_list): Handle the case that the arg is a
1360 key sequence (MText or MPlist).
1361 (take_action_list): Likewise.
1362 (shift_state): Shorter debug message.
1363 (handle_key): Terminate a debug message by "\n".
1364 (reset_ic): Don't take initial actions here.
1365 (minput_open_im): Print a debug message.
1366 (minput_close_im): Likewise.
1367 (minput_create_ic): Likewise.
1368 (minput_destroy_ic): Likewise.
1370 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
1372 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
1375 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
1376 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
1379 * character.c: Add Japanese documentation for
1380 mchar_get_prop_table ().
1382 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
1384 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
1385 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
1386 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
1388 (init_case_conversion): New function.
1389 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
1390 (uppercase_precheck, lowercase_precheck, final_sigma)
1391 (after_soft_dotted, more_above, before_dot, after_i)
1392 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
1394 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1396 * plist.c (read_mtext_element): Fix previous change.
1398 2005-09-05 Kenichi Handa <handa@m17n.org>
1400 * plist.c (read_mtext_element): Handle \uXXXX notation.
1402 * internal.h (MTABLE_MALLOC): Don't use a local variable.
1403 (MTABLE_ALLOCA): Change the name of local variable.
1405 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
1406 HAVE_FREETYPE are defined.
1408 * m17n-X.c: Check HAVE_X11.
1410 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
1411 directory listing libraries.
1412 (noinst_PROGRAMS): Define it only in maintainer mode.
1414 2005-09-02 Kenichi Handa <handa@m17n.org>
1416 * m17n-gui.h (mdraw_line_break_option): Extern it.
1418 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
1419 end of the first glyph.
1420 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
1422 (mdraw_line_break_option): New variable.
1423 (mdraw_default_line_break): Use mtext_line_break.
1425 * mtext.h (wordseg_func_table): Don't extern it.
1426 (mtext__wseg_fini): Extern it.
1428 * mtext.c: Don't include word-thai.h.
1429 (wordseg_func_table): Delete this variable.
1430 (mtext__init): Don't initialize above. Don't call
1431 mtext__word_thai_init.
1432 (mtext__fini): Don't free wordseg_func_table. Call
1433 mtext__wseg_fini instead fo mtext__word_thai_fini.
1434 (MTextWordsegFunc): Don't typedef it.
1435 (mtext__word_segment): Moved to mtext-wseg.c.
1437 * m17n-core.h (enum MTextLineBreakOption): New enum.
1438 (mtext_line_break): Extern it.
1440 * mtext-wseg.c: New file.
1442 * mtext-lbrk.c: New file.
1444 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
1445 add mtext-lbrk.c and mtext-wseg.c.
1447 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
1448 the case that head is NULL.
1450 2005-09-01 Kenichi Handa <handa@m17n.org>
1452 * word-thai.c (wordseg_propertize): If the property value is nil,
1453 don't make the property no-merge.
1454 (thai_wordseg): Don't require *from and *to are set a priori. Pay
1455 attention to the case that they are NULL.
1456 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
1459 * character.c (mchar_get_prop_table): New function.
1461 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
1463 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
1464 (mchar_get_prop_table): Extern it.
1466 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
1467 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
1469 * internal.h (enum MTextCoverage): New enum.
1470 (MText): New member coverage.
1472 * mtext.c (FORMAT_COVERAGE): New macro.
1473 (insert): Copy mt2->coverage.
1474 (mtext__from_data): Initialize mt->coverage.
1475 (mtext__adjust_format): Update mt->coverage.
1476 (mtext): Initialize mt->coverage.
1477 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
1478 Update mt->coverage if necessary.
1479 (mtext_duplicate): Copy mt->coverage.
1480 (mtext_insert, mtext_replace): New functions.
1481 (mtext_dup): Use mtext_duplicate.
1482 (mtext__word_segment): Don't set *from and *to if a word
1483 segmentation funcion is not found.
1484 (mtext_ins_char): Fix typo.
1486 2005-08-25 Kenichi Handa <handa@m17n.org>
1488 * font.h (MFont): New member for_full_width.
1490 * font.c (compare_font_score): Prefer a font of not
1493 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
1494 registry charset of a font is one of CJK charsets.
1496 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
1497 supports some of CJK.
1499 2005-08-24 Kenichi Handa <handa@m17n.org>
1501 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
1503 * m17n-gui.c (null_device_open): Check Mresolution param and set
1506 * m17n-gd.c (device_open): Check Mresolution param and set
1509 * m17n-X.c (MWDevice): New member resy.
1510 (xfont_open): Set ascent, descent, and max_advance members of
1512 (xft_open): Likewise.
1513 (device_open): Compare also screen_num to find a device. Set
1514 device->resy and frame->dpi.
1516 * internal-gui.h (MFrame): New member dpi.
1518 * font.h (MRealizedFont): New member max_advance.
1520 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
1521 (mfont__init): Don't initialize Mascent, Mdescent.
1522 (Mascent, Mdescent): Delete these variables.
1523 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
1524 Mfont_descent instead of Mascent and Mdescent.
1525 (mfont_put_prop): Allow negative size.
1526 (mfont_find): Handle the case of spec->size < 0. Fix previous
1528 (mfont_list): Handle the case of spec->size < 0.
1529 (mfont_check): Likewise.
1531 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
1532 (fc_get_pattern): Handle the case of font->size < 0.
1533 (ft_open): Set ascent, descent, and max_advance members of rfont.
1534 (ft_find_metric): Improve rounding.
1535 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
1538 * face.c (mface__realize): Handle the case of font->size < 0.
1540 2005-08-22 Kenichi Handa <handa@m17n.org>
1542 * coding.c (MConverterStatus): Change the member buf to union.
1543 (mconv_buffer_converter): Add const to the arg buf.
1544 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1545 (mconv_decode): Adjusted for the change of MConverterStatus.
1546 (mconv_encode_range): Likewise.
1548 * m17n.h (mconv_buffer_converter): Prototype adjusted.
1549 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
1551 2005-08-20 Kenichi Handa <handa@m17n.org>
1553 * m17n-gui.h (mfont_from_name): Prototype adjusted.
1554 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
1556 * m17n-X.c (xfont_open): Set members ascent, descent, and
1557 max_advance of rfont.
1558 (xft_open): Likewise.
1560 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
1562 (mfont__ft_parse_name): Add const to the arg name.
1564 * font.c (xlfd_parse_name): Add const to the arg name. Call
1565 mfont__set_property instead of mfont_set_spec. Set font->spacing.
1566 (xlfd_unparse_name): Handle spacing.
1567 (mfont__init): Initialize new variables.
1568 (mfont__id): Handle spacing.
1569 (mfont__merge): Likewise.
1570 (mfont__set_spec): This function deleted.
1571 (mfont__parse_name_into_font): Add const to the arg name. Fix the
1572 condition of calling mfont__ft_parse_name.
1573 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
1574 (mfont_get_prop): Handle properties spacing, ascent, descent,
1576 (mfont_find): Return a realized font.
1577 (mfont_from_name): Add const to the arg name.
1579 * font.h (enum MFontProperty): New member MFONT_SPACING.
1580 (enum MFontSpacing): New enum.
1581 (MFont): New members spacing and max_advance.
1582 (mfont__ft_parse_name): Prototype adjusted.
1583 (mfont__set_spec): Extern deleted.
1584 (mfont__parse_name_into_font): Prototype adjusted.
1586 2005-08-19 Kenichi Handa <handa@m17n.org>
1588 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
1590 * font.c (mfont_list): If FONT is null, use a temporary font.
1591 (mfont_parse_name): Add const to the arg name.
1593 2005-08-18 Kenichi Handa <handa@m17n.org>
1595 * word-thai.c: Surround code by #ifdef and #endif to escape from
1598 * font-ft.c: Mostly re-written.
1600 * font-flt.c (FontLayoutCmdOTF): This type deleted.
1601 (FontLayoutCmd): Type of the member otf changed..
1602 (load_otf_command): Adjusted for the format change of otf command.
1603 (load_command): Likewise.
1604 (free_flt_command): Unref cmd->body.otf.
1605 (run_otf): Ajusted for the type change of otf_cmd.
1606 (run_command): Ajusted for the type change of otf_cmd. On
1607 debugging, print ctx->combining_code.
1608 (mfont__flt_run): Initialize ctx's members code_offset,
1609 combining_code, and left_padding to 0.
1611 * face.h (struct MRealizedFace): New member font.
1612 (mface__realize): Prototype adjusted.
1614 * face.c (find_realized_face): New arg font.
1615 (find_realized_face): Adjusted for the change of MFont.
1616 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
1617 (mface__fini): Don't call mdebug__report_object.
1618 (mface__realize): New arg font.
1619 (mface__for_chars): Adjusted for the change of mfont__encode_char.
1620 Optimize the latin case.
1621 (mface__free_realized): Free rface->font.
1622 (mface__update_frame_face): Adjusted for the change of mface__realize.
1623 (mface_equal): New function.
1625 * draw.c (Mcommon): New variable.
1626 (visual_order): Args to mfont__encode_char changed.
1627 (compose_glyph_string): Handle Mfont text property.
1628 (layout_glyphs): Adjusted for the change of MFont.
1629 (mdraw__init): Initialize Mcommon.
1630 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
1632 * font.h (enum MFontType): Members completely changed.
1633 (enum MFontProperty): Move MFONT_SIZE to the tail.
1634 (enum MFontSource): New enum.
1635 (struct MFont): New members type, source, sizes, file, capability,
1637 (struct MRealizedFont): Type of member font changed. Members
1638 score, status, and encoding deleted.
1639 (MFontScore): New type.
1640 (MFontList): Member changed.
1641 (struct MFontDriver): New member has_char. Types of members
1643 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1644 (Mapple_roman): Extern them.
1645 (OTF_Tag): Typedefed if not HAVE_OTF.
1646 (enum MFontOpenTypeTable): New enum.
1647 (MFontCapability): New type.
1648 (mfont__ft_drive_otf): Prototype adjusted.
1649 (mfont__score): Extern deleted.
1650 (mfont__merge): Extern it.
1651 (mfont__has_char): Extern it.
1652 (mfont__encode_char): Prototype adjusted.
1653 (mfont__open): Extern it.
1654 (mfont__set_spec): Prototype adjusted.
1655 (mfont__get_capability): Extern it.
1657 * font.c: Include "fontset.h".
1658 (M_font_capability, M_font_list, M_font_list_len): New variables.
1659 (font_score_priority): Change order of initial elements.
1660 (font_score_shift_bits): Fix array size.
1661 (common_weight): Add "thin", "semibold", and "heavy".
1662 (common_stretch): Add "ultracondensed", "extracondensed",
1663 "extraexpanded", and "utltraexpand".
1664 (font_weight_regular, font_weight_normal, font_weight_medium): New
1666 (gen_font_name): This function deleted.
1667 (find_encoding): Set font->encoding.
1668 (OTF_tag): New function.
1669 (otf_script_list): New variable.
1670 (load_otf_script_list): New function.
1671 (find_script_from_otf_tag): New function.
1672 (xlfd_parse_name): Set font->type and font->source.
1673 (mfont__free_realized): Free chains rfonts.
1674 (font_score): Renamed from mfont__score.
1675 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
1676 (Mapple_roman): New variables.
1677 (mfont__init): Initilize new variables. Initalize
1678 default_encoding.encoding_name and
1679 default_encoding.encoding_charset to Municode_full and
1680 mcharset__unicode. Use SAFE* macros for allocating filepath
1682 (mfont__fini): Free otf_script_list.
1683 (mfont__id): New function.
1684 (mfont__match_p): Check also capability member of MFont.
1685 (mfont__merge): New funciton.
1686 (mfont__set_spec_from_face): Set type and source members.
1687 (mfont__set_spec_from_plist): Set capability and type members.
1688 (mfont__select): Argument changed.
1689 (mfont__available): New function.
1690 (compare_font_score): New function.
1691 (mfont__list): New function.
1692 (mfont__open): Return a realized font.
1693 (mfont__resize): Adjusted for the change of MFont.
1694 (mfont__has_char): New function.
1695 (mfont__encode_char): Argument changed.
1696 (mfont__set_spec): Argument changed.
1697 (free_font_capability): New function.
1698 (mfont__get_capability): New function.
1699 (MFontfile): New variable.
1700 (mfont_get_prop): Adjusted for the change of MFont.
1701 (mfont_put_prop): Likewise.
1702 (mfont_set_selection_priority): Fix the way of setting
1703 font_score_priority[].
1704 (mfont_find): Use mfont__list instead of mfont__select.
1705 (mfont_resize_ratio): Adjusted for the change of MFont.
1706 (mfont_list): Use mfont__list.
1707 (mfont_check): New function.
1708 (font_score): Make it static.
1710 * fontset.h (mfont__realize_fontset): Prototype adjusted.
1711 (mfont__lookup_fontset): Likewise.
1713 * fontset.c (struct MFontset): Delete member font_spec_list.
1714 (struct MRealizedFontset): Type of member spec changed. New
1716 (load_font_group): Arg spec_list deleted.
1717 (load_fontset_contents): Adjusted for the change of fontset_def.
1718 (free_fontset): Fix the way of freeing fontset elements.
1719 (realize_fontset_elements): Argument changed.
1720 (get_per_script): New function.
1721 (free_realized_fontset_elements): Fix the way of feeing rfontset
1723 (update_fontset_elements): Fix args to realize_fontset_elements.
1724 (mfont__realize_fontset): New arg spec.
1725 (try_font_list): New function.
1726 (try_font_group): New arg request. Use try_font_list.
1727 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
1729 (mfontset): Adjusted for the change of MFontset.
1730 (mfontset_copy): Likewise. Don't share plists.
1731 (mfontset_modify_entry): Adjusted for the change of MFontset.
1732 (mfontset_lookup): Call get_per_script.
1733 (mdebug_dump_fontset): Print also the address of fonts.
1735 * input.c (shift_state): Don't reset ic_info->vars.
1736 (take_action_list): Call MDEBUG_PRINT fore calling
1739 * internal-gui.h (MFontDriver): Don't typedef it here.
1741 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1742 (MXFont): This type deleted.
1744 (struct _MFontX): New struct.
1745 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1746 (MDisplayInfo): Member base_font_list deleted.
1747 (DEFAULT_FONT): Definition changed.
1748 (FALLBACK_FONT): This maclr deleted.
1749 (free_display_info): Adjusted for the change of MDisplayInfo.
1750 (free_device): Argument to mfont__free_realized changed.
1751 (xfont_driver): Adjusted for the change of MFontDriver.
1752 (xfont_registry_list): Use MFontX instead of MXFont.
1753 (MRealizedFontX): Renamed from MXFontInfo.
1754 (xfont_select): Return the font found first.
1755 (close_xfont): Change MXFontInfo to MRealizedFontX.
1756 (xfont_open): Return the realized font.
1757 (xfont_find_metric): Get xfont from rfont->fontp.
1758 (xfont_has_char): New function.
1759 (xfont_encode_char): Adjusted for the argument change.
1760 (xfont_render): Get xfont from rfont->fontp.
1761 (xfont_list): Adjusted for the argument change.
1762 (MRealizedFontXft): Renamed from MXftFontInfo.
1763 (xft_driver): Ajusted for the change of MFontDriver.
1764 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1765 (xft_open_font): Argument changed.
1766 (xft_open): Argument changed. Return the realized font.
1767 (xft_find_metric): Get xft_font from rfont->fontp.
1768 (xft_has_char, xft_encode_char): New functions.
1769 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1770 font if not yet opened.
1771 (device_open): Don't set frame->font.
1773 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1775 (gd_font_open): New function.
1776 (gd_render): Don't use the local variable ft_info.
1777 (device_init): Adjusted for the change of gd_font_driver.
1779 * textprop.c (mtext__prop_init): Initialize text_property_table.
1780 Call M17N_OBJECT_ADD_ARRAY.
1781 (mtext__prop_fini): Don't call mdebug__report_object.
1783 * plist.c (mplist__init): Initialize plist_table.
1784 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1785 (mplist__fini): Don't call mdebug__report_object.
1787 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1788 (mtext__fini): Don't call mdebug__report_object.
1789 (MTEXT_FORMAT_UTF_16): Correct type.
1790 (mtext_data): New function.
1791 (mtext_text): Fix calculation of limit and args to
1794 * language.c: Include "plist.h".
1795 (M_script_lang_list): New variable.
1796 (mlang__init): Read languages and their information from m17n
1798 (mlanguage__list): New function.
1799 (Miso639_1, Miso639_2): New variables.
1801 * language.h (mlanguage__list): Extern it.
1803 * database.c (get_database_stream): Use SAFE_* macros for
1804 allocating and freeing path.
1805 (mdatabase__init): Likewise.
1807 * symbol.c (msymbol__fini): Don't free symbols here.
1808 (msymbol__free_table): New function.
1809 (msymbol_is_managing_key): New function.
1811 * symbol.h (msymbol__free_table): Extern it.
1812 (msymbol__list): Extern it.
1814 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1816 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1817 (struct _M17NObjectArray): New member name and next.
1818 (mdebug__add_object_array): Extern it.
1819 (M17N_OBJECT_ADD_ARRAY): New macro.
1820 (mdebug__report_object): Don't extern it.
1822 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1824 * m17n-gui.c (free_frame): Don't free frame->font.
1825 (null_device_fini): Fix code for freeing
1826 null_device.realized_font_list.
1827 (m17n_fini_win): Free interface.
1828 (mframe): Cast the return value of dlsym. Set frame->font here.
1829 (mframe_get_prop): Check frame->rface->rfont before accessing the
1832 * m17n-gui.h (Mfontfile): Extern it.
1833 (mfont_check): Extern it.
1834 (mface_equal): Extern it.
1836 * m17n-core.c: Include "symbol.h".
1837 (report_header_printed): This variable deleted.
1838 (object_array_root): New variable.
1839 (report_object_array): New function.
1840 (mdebug__report_object): This function deleted.
1841 (mdebug__add_object_array): New function.
1842 (m17n_init_core): Call mchartable_init () before mtext_init ().
1843 (m17n_fini_core): Call report_object_array (if necessary) and
1844 msymbol__free_atable at the end.
1846 * m17n-core.h (msymbol_is_managing_key): Extern it.
1847 (mtext_data): Extern it.
1848 (MTEXT_FORMAT_UTF_16): Correct type.
1849 (M17NLIB_MINOR_VERSION): Changed to 3.
1850 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1852 * chartab.c (mchartable__init): Initalize chartable_table.count.
1853 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1854 mdebug__report_object.
1856 2005-05-26 Kenichi Handa <handa@m17n.org>
1858 * m17n.h (Miso639_1, Miso639_2): Extern them.
1860 * symbol.h (msymbol__list): Extern it.
1862 * symbol.c (msymbol__list): New function.
1864 2005-05-19 Kenichi Handa <handa@m17n.org>
1866 * input-gui.c (minput__win_init): Don't change the value of
1869 2005-05-16 Kenichi Handa <handa@m17n.org>
1871 * m17n-core.c (m17n_object): Be sure to initialize all members.
1873 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1875 2005-05-09 Kenichi Handa <handa@m17n.org>
1877 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1879 2005-04-27 Kenichi Handa <handa@m17n.org>
1881 * language.c (mlang__init): Add "an" (Aragonese).
1883 * word-thai.c: Add support for libthai.
1884 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1885 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1887 * mtext.c: Include "word-thai.h" conditionaly.
1888 (mtext__init): Call mtext__word_thai_init conditionaly.
1889 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1891 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1892 not WORDCUT_LD_FLAGS.
1894 2005-04-19 Kenichi Handa <handa@m17n.org>
1896 * word-thai.c (wordseg_propertize): Always unref the attached
1898 (thai_wordseg): Don't unref the property.
1900 2005-04-18 Kenichi Handa <handa@m17n.org>
1902 * word-thai.c: Include stdlib.h.
1903 (wordseg_propertize): Add dummy function for the case that wordcut
1904 library doesn't exist.
1905 (wordseg_propertize): Fix for old wordcut library.
1907 2005-04-16 Kenichi Handa <handa@m17n.org>
1909 * word-thai.c: Include <stdio.h>.
1911 2005-04-15 Kenichi Handa <handa@m17n.org>
1913 * draw.c: Include mtext.h.
1914 (linebreak_table, M_break_at_space, M_break_at_word)
1915 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1916 (compose_glyph_string): Check POS before getting Mface text
1918 (truncate_gstring): Give correct TO arg to line_break function.
1919 (GET_LB_TYPE): New macro.
1920 (find_break_backward, find_break_forward): New functions.
1921 (mdraw__init): Initialize the above new variables.
1922 (mdraw__fini): Free linebreak_table.
1923 (mdraw_default_line_break): Use find_break_backward and
1926 * word-thai.c: New file.
1928 * word-thai.h: New file.
1930 * mtext.c: Include word-thai.h.
1931 (wordseg_func_table): New variable.
1932 (mtext__init): Initialize wordseg_func_table and call
1933 mtext__word_thai_init.
1934 (mtext__fini): Call mtext__word_thai_fini, free
1936 (MTextWordsegFunc): New type.
1937 (mtext__word_segment): New function.
1939 * mtext.h (wordseg_func_table): Extern it.
1940 (mtext__word_segment): Extern it.
1942 * m17n.c (m17n_init): Fix typo (== -> =).
1944 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1945 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1947 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1948 (MTEXTPROP_VAL): New macros.
1950 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1952 2005-04-07 Kenichi Handa <handa@m17n.org>
1954 * database.c (load_chartable): Fix pursing of symbol name.
1956 2005-03-24 Kenichi Handa <handa@m17n.org>
1958 * m17n.c (m17n_init): Fix typo (== -> =).
1960 2005-03-11 Kenichi Handa <handa@m17n.org>
1962 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1964 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1966 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1969 2005-03-09 handa <handa@m17n.org>
1971 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1972 calling m17n_init ().
1974 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1975 calling m17n_init_core ().
1977 2005-02-28 Kenichi Handa <handa@m17n.org>
1979 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1982 2005-02-17 Kenichi Handa <handa@m17n.org>
1984 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1985 (M_description, M_command, M_variable): New variables.
1986 (load_im_info_keys): New variables.
1987 (load_im_info, check_command_keyseq, get_description_advance)
1988 (parse_command_list, get_command_list, parse_variable_list)
1989 (get_variable_list, input_method_hook): New functions.
1990 (command_list, variable_list): New variables.
1991 (minput__init): Put input_method_hook to Minput_method.
1992 Initialize M_description, M_command, M_variable, Mdetail_text,
1993 load_im_info_keys, command_list, variable_list.
1994 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1995 (Mdetail_text): New variable.
1996 (minput_get_description, minput_get_commands)
1997 (minput_assign_command_keys, minput_get_variables)
1998 (minput_set_variable): New functions.
2000 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2001 (minput_assign_command_keys, minput_get_variables)
2002 (minput_set_variable): Extern them.
2004 * plist.c (UNGETC): Just decrement st->p.
2005 (read_mtext_element): New arg skip.
2006 (read_integer_element): Likewise.
2007 (read_symbol_element): Likewise.
2008 (read_element): New arg KEYS.
2009 (mplist__from_plist): Don't increment ref-count of NULL object.
2010 (mplist__from_file): New arg KEYS.
2011 (mplist_put): Don't increment ref-count of NULL object.
2012 (mplist_add): Likewise.
2013 (mplist_push): Likewise.
2014 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2016 * plist.h (mplist__from_file): Prototype adjusted.
2018 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2019 (get_database_stream): New function.
2020 (load_database): Use get_database_stream.
2021 (M_database_hook): New variable
2022 (mdatabase__init): Initialize M_database_hook.
2023 (mdatabase__load_for_keys): New function.
2024 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2026 (mdatabase_define): Free mdb->extra_info if necessary.
2028 * database.h (mdatabase__dir_list, M_database_hook)
2029 (mdatabase__load_for_keys): Extern them.
2030 (MDatabaseHookFunc): New type.
2032 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2034 2004-12-27 Kenichi Handa <handa@m17n.org>
2036 * Version 1.2.0 released.
2038 2004-12-27 Kenichi Handa <handa@m17n.org>
2040 * input.c (minput_filter): Don't reset ic->xxx_changed.
2042 * mtext.c (mtext_from_data): Fix documentation.
2044 2004-12-25 Kenichi Handa <handa@m17n.org>
2046 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2047 (M17NLIB_VERSION_NAME): Update to "1.2.".
2049 2004-12-24 Kenichi Handa <handa@m17n.org>
2051 * input.c (reset_ic): Set key_unhandled to 0.
2053 2004-12-21 Kenichi Handa <handa@m17n.org>
2055 * m17n-gui.h (mfont_from_spec): Delete extern.
2057 * input-gui.c (win_callback): Handle Minput_reset.
2058 (minput__win_init): Register reset_ic as a callback for
2061 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2062 changed. At first, shift to the initial state.
2063 (minput__init): Initialize Minput_reset. Register reset_ic as a
2064 callback for Minput_reset.
2065 (Minput_reset): New variable.
2066 (minput_filter): Always set ic->xxx_changed to 0.
2067 (minput_reset_ic): New function.
2068 (integer_value): Fix typo ('>' -> '<') and calculation of length
2071 * m17n-core.c (merror_code): Change type to `int'.
2073 * m17n-misc.h (merror_code): Adjust type.
2075 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2077 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2078 (mtext_change_prop): Delete extern.
2080 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2081 to `int'. Move the documents to m17n-core.h.
2083 2004-12-13 Kenichi Handa <handa@m17n.org>
2085 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2086 (MTextProperty): Document it.
2088 2004-12-09 Kenichi Handa <handa@m17n.org>
2090 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2092 2004-12-03 Kenichi Handa <handa@m17n.org>
2094 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2095 m17n__gui_initialized): New externs.
2097 * m17n-core.h (enum M17NStatus): New enum.
2098 (m17n_status): Extern it.
2100 * m17n-core.c (core_initialized): Delete this variable.
2101 (m17n__core_initialized, m17n__shell_initialized,
2102 m17n__gui_initialized): New variables.
2103 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2104 instead of core_initialized.
2105 (m17n_status): New function.
2107 * m17n.c (shell_initialized): Delete this variable.
2108 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2111 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2113 * m17n-gui.c (win_initialized): Delete this variable.
2114 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2115 instead of gui_initialized.
2117 2004-11-19 Kenichi Handa <handa@m17n.org>
2119 * input.c (reset_ic): Check if ic_info->state is NULL.
2120 (filter): If ic_info->state is NULL, return 0.
2121 (load_input_method): Don't unref `maps' it it's not created.
2123 2004-11-15 Kenichi Handa <handa@m17n.org>
2125 * input.c (find_candidates_group): If INDEX is -1, find the last
2127 (take_action_list): If the previous of the first candidate is
2128 requested, select the last candidate.
2130 2004-11-08 Kenichi Handa <handa@m17n.org>
2132 * m17n-X.c (device_open): Try at most 32 fonts to find a
2133 non-autoscaled font.
2135 * font.c (xlfd_parse_name): Fix previous change.
2137 2004-11-05 Kenichi Handa <handa@m17n.org>
2139 * font.c: (commont_style): Include dummy elements "slanted" and
2140 "rslanted" to prefer "o" to "r" if "i" is requested.
2142 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2144 2004-10-29 Kenichi Handa <handa@m17n.org>
2146 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2148 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2149 New members smallest and larger.
2150 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2151 (xfont_registry_list): Likewise.
2152 (xfont_select): Likewise.
2155 2004-10-28 Kenichi Handa <handa@m17n.org>
2157 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2158 font name comparison.
2159 (xfont_select): Fix logic for selecting a larger size font.
2161 2004-10-25 Kenichi Handa <handa@m17n.org>
2163 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2166 2004-10-22 Kenichi Handa <handa@m17n.org>
2168 * input.c (update_candidate): Renamed from udpate_candidate.
2169 (take_action_list): Show more debugging info on arithmetic commands.
2171 * m17n-X.c (device_open): Fix previous change.
2173 * draw.c (compose_glyph_string): Don't get face property at the
2176 2004-10-21 Kenichi Handa <handa@m17n.org>
2178 * draw.c (compose_glyph_string): Fix for the case of category
2181 2004-10-19 Kenichi Handa <handa@m17n.org>
2183 * input.c (mdebug_mask): New variable.
2184 (shift_state): Print debug information.
2185 (take_action_list): Likewise.
2186 (handle_key): Likewise.
2188 2004-10-14 Kenichi Handa <handa@m17n.org>
2190 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2192 2004-10-13 Kenichi Handa <handa@m17n.org>
2194 * m17n-X.c (device_open): Be sure to register at least one font
2197 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2198 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2200 2004-10-12 Kenichi Handa <handa@m17n.org>
2202 * draw.c (alloc_gstring): Fix previous change.
2204 * font-ft.c (ft_list_generic): Fix for the case of not
2207 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2209 * font.c (mfont_list): If no font is found, return NULL.
2210 (load_font_encoding_table): Put entries of nil registry first.
2211 (find_encoding): Adjust for the above change.
2213 2004-10-11 Kenichi Handa <handa@m17n.org>
2215 * m17n-gui.h (mfont_list): Adjust prototype.
2217 * m17n-X.c (xfont_list): New arg maxnum.
2219 * font.h (struct MFontDriver): Change prototype of <list>.
2221 * font-ft.c (fc_generic_family_list): Delete it.
2222 (Mserif, Msans_serif, Mmonospace): Delete them.
2223 (M_generic_family_info): New variable.
2224 (enum GenericFamilyType): New enum.
2225 (struct GenericFamilyInfo): New struct.
2226 (generic_family_table): New variable.
2227 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2229 (add_font_info): Get style here.
2230 (ft_list_family): Don't initialize fc_config here. Don't list
2232 (ft_list_generic): New function.
2233 (ft_select): Pay attention to generic familes here.
2234 (ft_open): Fix calculation of ascent and descent.
2235 (ft_list): Pay attention to generic families.
2236 (mfont__ft_init): Initialize M_generic_family_info,
2237 generic_family_table, and fc_config..
2238 (mfont__ft_fini): Finalize generic_family_table.
2240 * draw.c (compose_glyph_string): Use more constant font for
2241 glyphs. Adjust for the member change in MGlyph.
2242 (layout_glyph_string): Adjust for the member change in MGlyph.
2243 (alloc_gstring): Intilize scracth_glyph to avoid
2244 compose_glyph_string on it.
2245 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2246 (mdraw_coordinates_position): Fix previous change.
2248 * internal-gui.h (glyph_category): New enum.
2249 (MGlyph): Change type of <category> to enum glyph_category.
2251 * face.c (mface__realize): Delete args langauge and charset.
2252 (mface__for_chars): Fix for the case that glyphs have different
2254 (mface__update_frame_face): Adjust for mface__realize change.
2256 * face.h (mface__realize): Adjust prototype.
2258 2004-10-05 Kenichi Handa <handa@m17n.org>
2260 * language.c (mlang__init): Add Akan.
2262 2004-10-04 Kenichi Handa <handa@m17n.org>
2264 * font-ft.c (add_font_info): Add instead of push the element.
2265 (ft_list_family): For generic fonts, try all
2266 substituted. families.
2268 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2269 (run_rule): Don't update cluster range here.
2270 (run_command): Update cluster range on appending a glyph.
2271 (run_otf): Update cluster range for glyphs generated by OTF.
2273 2004-10-02 Kenichi Handa <handa@m17n.org>
2275 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2277 2004-09-30 Kenichi Handa <handa@m17n.org>
2279 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2281 2004-09-30 Kenichi Handa <handa@m17n.org>
2283 * font.h: Include <fontconfig/fontconfig.h>.
2284 (MFTInfo): New member langset.
2285 (mfont__encoding_list): Extern it.
2287 * font.c (mfont__encoding_list): New function.
2288 (mdebug_dump_font_list): New function.
2290 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2291 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2293 (ft_family_list): New variable.
2294 (set_font_info): New arg basep. Callers changed.
2295 (fc_list): Check the return value of FcPatternGetString.
2296 (add_font_info): New arg plist. Callers changed. Update
2298 (ft_list_family): New function (merged fc_list and ft_list_all).
2299 (ft_select): Use ft_list_family.
2300 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2302 (mfont__ft_init): Initialize above new variables.
2303 (mfont__ft_fini): Free ft_family_list.
2304 (STRDUP_LOWER): New macro.
2305 (set_font_info): Use STRDUP_LOWER.
2306 (ft_list_family): Avoid duplicate addition of font path. Use
2308 (fc_decode_prop): Fix typo.
2310 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2311 (xfont_registry_list): Change argument disp_info to frame.
2313 (xfont_list_all): New function.
2314 (xfont_list): If FONT is not NULL, check all fonts.
2316 2004-09-28 Kenichi Handa <handa@m17n.org>
2318 * m17n-X.c (MXFont, MXFontList): New types.
2319 (MDisplayInfo): Delete members font_registry_list,
2320 iso8859_1_family_list, iso10646_1_family_list, new members
2321 font_list, base_font_list.
2322 (free_display_info): Adusted for the change of MDisplayInfo.
2323 (xfont_driver): Initialize with xfont_list.
2324 (font_compare): New function.
2325 (build_font_list): Deleted.
2326 (xfont_registry_list): New function.
2327 (xfont_select): Use xfont_registry_list.
2328 (xfont_list): New function.
2329 (device_open): Adusted for the change of MDisplayInfo.
2331 * font-ft.c (add_font_info): New arg languages. Callers changed.
2332 (fc_list): Get languages from fonts..
2333 (ft_list_all): Renamed from ft_list. Callers changed.
2334 (ft_list): New function.
2335 (mfont__ft_driver): Initalize with ft_list.
2337 * font.c (mfont_list): New function.
2339 * font.h (struct MFontDriver): New member `list'.
2340 (MFTInfo): New member languages.
2342 * m17n-gui.h (mfont_list): Extern it.
2344 2004-09-27 Kenichi Handa <handa@m17n.org>
2346 * internal-gui.h (struct MGlyphString): Delete members mt,
2347 sub_width, sub_lbrearing, sub_rbearing, and region.
2349 * draw.c (MSubTextExtents): New type.
2350 (layout_glyphs): New arg extents. Set its members.
2351 (layout_glyph_string): Adjusted for the above change.
2352 (alloc_gstring): Don't set gstring->mt.
2353 (truncate_gstring): Call line_break function with mt instead of
2356 2004-09-22 Kenichi Handa <handa@m17n.org>
2358 * mtext.c (count_utf_16_chars): Count each code of invalid
2361 2004-09-19 Kenichi Handa <handa@m17n.org>
2363 * mtext.c (default_utf_16, default_utf_32): Rename them to
2364 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
2367 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
2370 2004-09-13 Kenichi Handa <handa@m17n.org>
2372 * draw.c (Mlatin): Don't declare it here.
2373 (visual_order): Fix reordering of combining characters.
2374 (compose_glyph_string): Fix detection of script.
2375 (layout_glyphs): Don't fix reordering of combining characters
2377 (layout_glyph_string): Pay attention to
2378 control->disable_overlapping_adjustment.
2379 (truncate_gstring): Include at least on character in a line.
2380 (get_gstring): Always scan one full line.
2381 (mdraw__init): Don't initialize Mlatin here.
2382 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
2383 have a font, use ascent/descent of an ASCII font. Allow
2384 ink_array_return and logical_array_return to be NULL.
2385 (mdraw_coordinates_position): Fix iteration.
2387 * font-ft.c (MFTtoProp): Member completely changed.
2388 (ft_to_prop): Adjusted for the above change.
2389 (ft_to_prop_size): Likewise.
2390 (set_font_info): Adjusted for the change of MFTtoProp.
2391 (fc_generic_family_list): New variable.
2392 (fc_list): Add special handling of generic font names.
2393 (mfont__ft_init): Adjusted for the change of MFTtoProp.
2394 Initialize fc_generic_family_list.
2395 (mfont__ft_fini): Don't free ft_to_prop. Free
2396 fc_generic_family_list.
2397 (FC_vs_M17N_font_prop): New type.
2398 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
2399 (fc_decode_prop, fc_encode_prop): New functions.
2400 (mfont__ft_parse_name): Use fc_decode_prop.
2401 (mfont__ft_unparse_name): Use fc_encode_prop.
2403 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
2404 (MWDevice): Add member realized_font_list.
2405 (free_display_info): Don't free disp_info->realized_font_list.
2406 (free_device): Free device->realized_fontset_list.
2407 (xft_find_metric): Use gstring->frame instead of rfont->frame.
2408 (device_open): Don't initialize disp_info->realized_font_list.
2409 (device_open): Initialize device->realized_font_list and set it to
2410 frame->realized_font_list.
2412 * fontset.c (try_font_group): New function.
2413 (mfont__lookup_fontset): Use try_font_group.
2415 * font.c (common_weight): Change the order of "regular".
2417 * face.c (Mlatin): Don't make it static.
2418 (mface__realize): Be sure to set work_gstring.frame.
2419 (mface__for_chars): Likewise.
2421 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
2424 * internal-gui.h (Mlatin): Extern it.
2426 * m17n-gui.h (MDrawControl): New member
2427 disable_overlapping_adjustment.
2429 2004-09-06 Kenichi Handa <handa@m17n.org>
2431 * font-flt.c (run_otf): Fix typo ('}'->']').
2433 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
2434 (COMBINING_PRECOMPUTED_P): New macros.
2436 * draw.c (layout_glyphs): Handle precomputed combining code.
2438 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
2439 precomupted combining code.
2441 2004-09-03 Kenichi Handa <handa@m17n.org>
2443 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
2446 2004-08-27 Kenichi Handa <handa@m17n.org>
2448 * face.c (mface_put_prop): If the new value is the same as the
2449 current one, don't increment frame->tick.
2451 2004-08-25 Kenichi Handa <handa@m17n.org>
2453 * fontset.c (mfontset): Initialize font_spec_list member.
2454 (mfontset_copy): Load fontset if necessary.
2456 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
2457 'metrics' to for C++.
2459 * draw.c (mdraw_glyph_info): Adjusted for the member name change
2462 2004-08-16 Kenichi Handa <handa@m17n.org>
2464 * Version 1.1.0 released.
2466 2004-08-13 Kenichi Handa <handa@m17n.org>
2468 * language.c (mlang__init): Add Dhivehi.
2470 * m17n-gui.c (Mx, Mfreetype): Delete it.
2471 (m17n_init_win): Don't initialize Mx and Mfreetype here.
2473 * m17n-gui.h (Mfreetype, Mxft): Extern them.
2474 (mfont_resize_ratio): Extern it.
2475 (MDrawGlyphInfo): New member logical_width;
2476 (MDrawGlyph): New type.
2477 (mdraw_glyph_list): Prototype adjusted.
2479 * m17n-X.c (xfont_open): Set type and fontp members.
2480 (xft_open): Likewise.
2482 * internal-gui.h (Mx, Mfreetype): Delete extern.
2484 * font.h (struct MRealizedFont): New member type and fontp.
2486 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
2487 (Mx, Mfreetype): Declare here.
2488 (Mxft): New variable.
2489 (mfont_resize_ratio): New function.
2491 * font-ft.c (ft_open): Set type and fontp members.
2493 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
2496 2004-08-11 Kenichi Handa <handa@m17n.org>
2498 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
2501 2004-08-06 Kenichi Handa <handa@m17n.org>
2503 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
2506 * font-flt.c (run_otf): Print debugging information if necessary.
2508 2004-08-05 Kenichi Handa <handa@m17n.org>
2510 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
2511 positioning_type 5 and 6. Switch simplified.
2513 2004-08-04 Kenichi Handa <handa@m17n.org>
2515 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
2517 2004-08-02 Kenichi Handa <handa@m17n.org>
2519 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
2520 set val to 1 even if it is greater than 1.
2522 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
2524 2004-07-29 Kenichi Handa <handa@m17n.org>
2526 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
2527 debugging information.
2529 * internal.h (MDEBUG_PRINT5): New macro.
2531 * draw.c (layout_glyphs): Don't combine a zero width glyph with
2532 the previous one if the zero width glyph has left or right
2535 2004-07-26 Kenichi Handa <handa@m17n.org>
2537 * m17n-X.c (xft_render): Pay attention to members left_padding and
2538 right_padding of MGlyph.
2540 * draw.c (visual_order): Allocate one more elements for arrays as
2541 a workaround of fribidi bug.
2542 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
2543 instead of MGlyph->bidi_sensitive.
2544 (layout_glyph_string): Pay attentinon to
2545 control->orientation_reversed when padding at the head or tail.
2546 Fix adjustment of space glyph width.
2547 (get_gstring): If cursor_width or cursor_bidi is changed, don't
2550 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
2551 instead of MGlyph->bidi_sensitive.
2553 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
2555 2004-07-26 Kenichi Handa <handa@m17n.org>
2557 * draw.c (visual_order): Don't treat combined glyphs specially.
2558 (layout_glyphs): Don't get metrics glyphs that are already ready.
2559 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
2560 width with the previous one.
2561 (draw_background): Fix bar cursor position on a r2l glyph.
2563 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
2564 (run_rule): Fix place of updating cluster_begin_pos and
2565 cluster_end_pos here.
2566 (run_otf): Don't set left_padding.
2568 * font-ft.c (adjust_anchor): Type of argument `code' changed.
2570 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
2571 Fix handling of GPOS.
2572 (mfont__ft_drive_gpos): Delete this function.
2574 * font.h (mfont__ft_drive_otf): Renamed back from
2575 mfont__ft_drive_gsub.
2576 (mfont__ft_drive_gpos): Delete extern.
2578 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
2579 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
2581 2004-07-23 Kenichi Handa <handa@m17n.org>
2583 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
2584 the same bidi level.
2586 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
2588 2004-07-22 Kenichi Handa <handa@m17n.org>
2590 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
2592 2004-07-20 Kenichi Handa <handa@m17n.org>
2594 * draw.c (render_glyphs): Fix checking of g->code validity.
2596 * face.c (mface__realize): Set g.type.
2598 2004-07-18 Kenichi Handa <handa@m17n.org>
2600 * Makefile.am: Prepend ${top_srcdir} to all *.la in
2603 * m17n-gui.c (mframe): Print error message give by dlopen to
2606 2004-07-16 Kenichi Handa <handa@m17n.org>
2608 * draw.c (compose_glyph_string): Improve the way of deciding a
2609 script. For a character that doesn't have script property, use
2610 the last non-latin script.
2612 * font-ft.c (fc_list): Cancel previous change.
2613 (mfont__ft_init): Add more entries in ft_to_prop_name.
2615 2004-07-15 Kenichi Handa <handa@m17n.org>
2617 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
2618 previous or next character glyphs.
2620 2004-07-14 Kenichi Handa <handa@m17n.org>
2622 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
2623 of type GLYPH_SPACE.
2625 * fontset.c (mfont__lookup_fontset): If glyph type is
2626 GLYPH_SPACE, get codes for SPACE.
2628 * internal-gui.h (Mfont): Delete extern.
2630 * m17n-gui.h (Mfont): Delete duplicated extern.
2632 2004-07-13 Kenichi Handa <handa@m17n.org>
2634 * font-ft.c (DEVICE_DELTA): New macro.
2635 (adjust_anchor): New function.
2636 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
2638 (mfont__ft_drive_gpos): New function.
2640 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
2641 (FontLayoutContext): Delete member `rfont'.
2642 (run_otf): Set g->otf_cmd. Call
2643 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
2644 only whne HAVE_OTF is defined.
2646 * fontset.c: Include "config.h".
2648 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
2649 (MGlyph): New member otf_cmd.
2651 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
2652 (mfont__ft_drive_gpos): Extern it.
2654 * face.c: Include "config.h".
2656 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
2658 * input-gui.c: Include "config.h".
2660 * plist.c: Include "config.h".
2662 2004-07-06 Kenichi Handa <handa@m17n.org>
2664 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
2665 internal-gui.h: Cancel previous changes.
2667 * m17n-gd.h: Delete it.
2669 * Makefile.am (libm17n_core_la_LIBADD): New variable.
2670 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
2671 @XML2_LD_FLAGS@ to above.
2672 (libm17n_la_LIBADD): Add -ldl.
2673 (libm17n_la_LDFLAGS): Add -export-dynamic.
2674 (X_LD_FLAGS): Fix the order of linking.
2675 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
2676 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
2677 (libm17n_X_la_LDFLAGS): Add -module.
2678 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
2679 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2680 (libm17n_gd_la_LDFLAGS): Add -module.
2681 (include_HEADERS): Delete m17n-gd.h.
2683 2004-06-30 Kenichi Handa <handa@m17n.org>
2685 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
2686 (MDeviceLibraryInterface): Delete it.
2687 (register_device_library): Delete it.
2688 (m17n__device_library_list): Renamed from device_library_list.
2690 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
2691 (m17n_init_win): Adjust prototype.
2693 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
2694 (m17n_init_gd): New function.
2696 * m17n-gd.h: New file.
2698 * m17n-X.h: Include <m17n-gui.h>.
2699 (m17n_init_X): Extern it.
2700 (M17N_INIT): Redefine it.
2702 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
2703 (m17n_init_X): New function.
2705 * internal-gui.h (m17n__device_library_list): Extern it.
2706 (struct MDeviceDriver): New members initialized, init, and fini.
2708 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
2710 (libm17n_X_la_LIBADD): Delete aboves.
2711 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
2712 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
2713 (libm17n_gd_la_LDFLAGS): Delete it.
2714 (include_HEADERS): Add m17n-gd.h.
2716 2004-06-25 Kenichi Handa <handa@m17n.org>
2718 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
2719 (libm17n_gd_la_LDFLAGS): Cancel previous change.
2721 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
2723 * font-ft.c (fc_list): If FcFontList finds no font, try
2726 * draw.c (compose_glyph_string): Terminate the last loop after
2727 doing default combining if necessary.
2729 2004-06-24 Kenichi Handa <handa@m17n.org>
2731 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
2733 * character.c (mchar_define_property): Add const to an arg.
2735 * charset.c (mchar_define_charset): Add const to an arg.
2737 * coding.c (MCodingSystem): Add const to an arg or decoder.
2738 (finish_decoding): Add const to an arg.
2739 (decode_coding_charset, decode_coding_utf_8)
2740 (decode_coding_utf_16, decode_coding_utf_32)
2741 (decode_coding_iso_2022, decode_coding_sjis)
2742 (mconv_define_coding): Likewise.
2744 * m17n-X.c (xft_find_metric): Delete unused variable.
2746 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2749 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2752 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2753 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2755 * mtext.h (mtext__from_data): Ajust prototype.
2757 2004-06-23 Kenichi Handa <handa@m17n.org>
2759 * draw.c (compose_glyph_string): Always get glyph codes by
2761 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2762 (mdraw_glyph_list): New function.
2764 * font-flt.c (mfont__flt_run): Be sure to call
2765 rfont->driver->encode_char.
2767 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2768 (ft_encode_char): Delete arg C.
2769 (ft_render): Don't call FT_Get_Char_Index.
2771 * font.c (mfont__encodable_p): Delete it.
2772 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2774 * font.h (struct MFontDriver): Delete arg C of encode_char.
2775 (mfont__encodable_p): Delete extern.
2777 * m17n-X.c (xfont_encode_char): Delete arg C.
2778 (xft_find_metric): Don't cal FT_Get_Char_Index.
2779 (xft_render): Likewise.
2781 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2783 (mdraw_glyph_list): Extern it.
2785 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2787 2004-06-22 Kenichi Handa <handa@m17n.org>
2789 * m17n-gui.h (mfontset_lookup): Extern it.
2791 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2793 * fontset.c (realize_fontset_elements)
2794 (free_realized_fontset_elements, update_fontset_elements): New
2796 (mfont__realize_fontset): Call realize_fontset_elements.
2797 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2798 (mfont__lookup_fontset): If a fontset was modified, update
2799 the realized fontset.
2800 (mfontset_modify_entry): Increment fontset->tick.
2801 (mfontset_lookup): New function.
2803 2004-06-21 Kenichi Handa <handa@m17n.org>
2805 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2807 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2808 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2809 length of source text 0.
2811 2004-06-21 Kenichi Handa <handa@m17n.org>
2813 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2814 (compare): Pay attention to format other than utf-8.
2815 (copy): Delete this function.
2816 (count_by_utf_8, count_by_utf_16, insert): New functions.
2817 (count_utf_16_chars): Fix handling of a surrogate pair.
2818 (find_char_forward, find_char_backward): Likewise.
2819 (mtext__from_data): Delete unnecessary check. Fix number of
2821 (mtext_from_data): Don't count items.
2822 (mtext_ref_char): Optimize the code.
2823 (mtext_set_char): Pay attention to format other than utf-8.
2824 (mtext_cat_char): Likewise.
2825 (mtext_dup): Don't call copy, instead do allocation here.
2826 (mtext_cat): Call insert instead of copy.
2827 (mtext_ncat): Likewise.
2828 (mtext_cpy): Delete character at first and call insert instead of
2830 (mtext_ncpy): Likewise.
2831 (mtext_copy): Likewise.
2832 (mtext_duplicate): Call insert instead of copy.
2833 (mtext_del): Pay attention to format other than utf-8.
2834 (mtext_ins): Simply call insert.
2835 (mtext_ins_char): Pay attention to format other than utf-8.
2836 (mtext_tok): Call insert instead of copy.
2837 (mtext_text): Call UNIT_BYTES.
2839 * textprop.c (mtext__adjust_plist_for_change): New function.
2841 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2842 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2843 (CHAR_UNITS_AT): Fix typo.
2844 (CHAR_UNITS_BY_HEAD): Fix typo.
2845 (STRING_CHAR_AND_UNITS): Fix typo.
2847 * internal.h (MTEXT_READ_ONLY_P): New macro.
2849 * mtext.h (mtext__replace): Delete the extern.
2850 (mtext__adjust_foramt): Adjust prototype.
2852 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2853 if possible. Otherwise make a copy of mmt.
2855 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2858 2004-06-18 Kenichi Handa <handa@m17n.org>
2860 * character.h (CHAR_STRING_UTF16): Fix syntax.
2862 2004-06-16 Kenichi Handa <handa@m17n.org>
2864 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2865 (libm17n_X_la_LIBADD): Delete it.
2866 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2868 * m17n-X.c (device_open): Add parens in `if' condition.
2870 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2871 (DEC_POSITION): Likewise.
2872 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2874 2004-06-15 Kenichi Handa <handa@m17n.org>
2876 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2879 * draw.c (compose_glyph_string): If langauge is specified, call
2880 mface__for_chars even if a text is all latin. Fix condition for
2881 setting non_ascii_found.
2883 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2885 * m17n.h (minput_char_to_key): Delete extern.
2887 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2889 * m17n-gui.c (null_device_open): Set several members of frame.
2891 2004-06-14 Kenichi Handa <handa@m17n.org>
2893 * m17n-gui.h (minput_event_to_key): Delete extern.
2895 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2897 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2899 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2901 2004-06-08 Kenichi Handa <handa@m17n.org>
2903 * character.c (mchar_put_prop): Don't increment the ref-count of
2906 2004-06-04 Kenichi Handa <handa@m17n.org>
2908 * m17n-core.c (mdebug__register_object): New function.
2909 (mdebug__unregister_object): Likewise.
2911 * internal.h (mdebug__register_object, mdebug__unregister_object):
2913 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2916 * charset.c (mcharset__load_from_database): Don't call
2917 mconv__register_charset_coding here.
2919 * coding.c (find_coding): Get a real name from an element of
2920 coding_definition_list.
2921 (mconv__register_charset_coding): Set the real name at the top of
2923 (mcoding__load_from_database): Likewise.
2924 (mconv_list_codings): Adjusted for the above change.
2926 2004-06-03 Kenichi Handa <handa@m17n.org>
2928 * coding.c (find_coding): Find by canonicalized name. Don't have
2929 to modify the element of coding_definition_list by
2931 (mconv__define_coding_from_charset): Delete it.
2932 (mconv__register_charset_coding): Canonicalize sym.
2933 (mcoding__load_from_database): Register plist modified by
2936 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2938 * font-ft.c (ft_open): Fix setting of rfont->descent.
2940 2004-06-02 Kenichi Handa <handa@m17n.org>
2942 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2943 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2944 (xlfd_unparse_name): Renamed from xfont_build_name.
2945 (mfont__init): Initialized Mfontconfig.
2946 (mfont__free_realized): Unconditionally unref rfont->info.
2947 (mfont__select): Free `this' if it's not best.
2948 (mfont__open): Don't check frame->realized_font_list.
2949 (mfont__parse_name_into_font): New function.
2950 (Mfontconfig): New variable.
2951 (mfont_from_name): Call mfont_parse_name.
2952 (mfont_name): Call mfont_unparse_name.
2953 (mdebug_dump_font): Likewise.
2955 * font.h (struct MFontDriver): Delete members parse_name and
2957 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2958 (mfont__parse_name_into_font): Extern it.
2960 * font-ft.c: Include "symbol.h".
2961 (close_ft): Unconditionally free filename and charmap_list of
2963 (ft_open): Duplicate base->filename. Increment ref-count of
2964 ft_info->charmap_list. Free ft_info->charmap_list and
2965 ft_info->filename on error.
2966 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2968 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2970 (enum xlfd_field_idx): Moved to font.c.
2971 (split_font_name, build_font_name): Likewise.
2972 (build_font_list): Call mfont__parse_name_info_font.
2973 (xfont_open): Call mfont__unparse_name. Free name.
2974 (xfont_parse_name, xfont_build_name): Moved to font.c
2975 (xft_select): Prototype deleted.
2976 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2977 Call mfont_pase_name.
2979 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2980 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2983 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2986 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2988 2004-06-01 Kenichi Handa <handa@m17n.org>
2990 * fontset.c (mfontset_modify_entry): Pay attention to the case
2991 that fontset->font_spec_list is NULL.
2993 2004-05-31 Kenichi Handa <handa@m17n.org>
2995 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2997 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2999 * font.c (mfont__select): Print score the a font for debugging.
3001 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3003 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3004 kanji_sym and kana_sym.
3006 2004-05-28 Kenichi Handa <handa@m17n.org>
3008 * Makefile.am (VINFO): New variable.
3009 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3010 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3012 2004-05-27 Kenichi Handa <handa@m17n.org>
3014 The following chanages are to make device dependent functions
3015 accessible only from MDeviceDriver structure, and to add GD and
3016 null device drivers. Font drivers get also device dependent.
3018 * m17n.c (m17n_init): Increament shell_initialized.
3019 (m17n_fini): Decremented shell_initialized.
3021 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3023 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3024 (Mwidget, Mcolormap, Mx): Extern them.
3026 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3027 (free_frame): Call frame->driver->close instead of
3029 (DLOPEN_SHLIB_EXT): New macro.
3030 (MDeviceLibraryInterface): New type.
3031 (device_library_list): New variable.
3032 (register_device_library): New function.
3033 (null_device): New variable.
3034 (null_device_close, null_device_get_prop)
3035 (null_device_realize_face, null_device_free_realized_face): New
3037 (null_driver): New variable.
3038 (null_device_init, null_device_fini, null_device_open): New
3040 (null_interface): New variable.
3041 (Mfreetype, Mdevice): Declare them.
3042 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3043 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3044 Mwin__Close_Device. Register drivers for Mx and Mgd.
3045 (m17n_fini_win): Decremented win_initialized. Call "fini"
3046 function of all opened devices. Don't call mwin__fini.
3047 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3049 (mframe): Handle Mdevice key of PLIST.
3050 (mframe_get_prop): Call frame->device->get_prop instead of
3051 mwin__device_get_prop.
3053 * m17n-gd.c: New file.
3055 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3056 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3058 * m17n-core.c (m17n_init_core): Increate core_initialized.
3059 (m17n_fini_core): Decremented core_initialized.
3061 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3062 (Mcolormap): Don't extern them here.
3064 * m17n-X.c (FRAME_DEVICE): New macro.
3065 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3066 (free_display_info): Use MPLIST_DO.
3067 (free_device): Free rface->info.
3068 (xft_close): Delete it.
3069 (device_init): Renamed from mwin__init.
3070 (device_fini): Renamed from mwin__fini.
3071 (device_open): Renamed from mwin__open_device.
3072 (x_driver): New variable.
3073 (MXFontInfo): Delete member frame, add member display.
3074 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3075 Don't declare them here.
3077 * internal-gui.h (MDeviceType): New enum.
3078 (MWDefice): Delete it.
3079 (struct MFrame): Change type of device to void *. New members
3080 device_type, driver, font_driver_list.
3081 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3082 (MDeviceDriver): New type.
3083 (Mx, Mgd, Mfreetype): Extern them.
3084 (mwin__XXX): Delete all of them.
3086 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3088 (win_destroy_ic): Likewise.
3089 (adjust_window_and_draw): Likewise.
3090 (win_callback): Likewise.
3091 (Mxim): Declare it here.
3092 (minput_event_to_key): Call M_CHECK_READABLE.
3094 * fontset.c (mfont__lookup_fontset): Delete local variable
3097 * font.h (struct MFontDriver): Delete member close, add members
3098 parse_name and build_name.
3099 (mfont__driver_list): Delete extern.
3100 (mfont__close): Delete extern.
3102 * font.c (mfont__init): Don't set mfont__driver_list.
3103 (mfont__fini): Don't unref mfont__driver_list.
3104 (mfont__select): Try font drivers in frame->font_driver_list. Set
3105 driver member of a realized font.
3106 (mfont__close): Delete it.
3107 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3108 functions of the default frame.
3110 * font-ft.c (close_ft): Check ft_info->ft_face and work
3112 (add_font_info): Allocate ft_info by M17N_OBJECT.
3113 (ft_close): Delete it.
3114 (mfont__ft_driver): Don't set ft_close.
3115 (ft_select): Increment ref-count of best_font.
3116 (ft_open): Decremented ref-count of base. On error, call
3117 FT_Done_Face and free ft_info.
3118 (ft_find_metric): Always use XXX_MONO in load_flags.
3119 (ft_render): Fix setting of width. Call
3120 frame->driver->draw_points instead of mwin__draw_points.
3121 (ft_to_prop): Don't set mfont__driver_list.
3122 (mfont__ft_fini): Just unref ft_info.
3124 * face.c (mface__init): Exchange foreground and background of
3125 mface__default. Call mface_put_prop to set hline of
3127 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3128 (mface__free_realized): Don't call mwin__free_realized_face.
3130 * draw.c (Mdepth): Don't declare it here.
3131 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3132 (render_glyphs, render_glyph_string): Likewise.
3133 (mdraw__init): Don't set Mdepth.
3134 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3136 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3138 (mdraw_text_items): Check FRAME is writable.
3139 (mdraw_per_char_extents): Implement body.
3141 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3143 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3144 (GUI_SOURCES): Delete it.
3145 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3146 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3147 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3148 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3149 (linkgui_LDADD): Set to libm17n-gui.la
3150 (linkgui_LDFLAGS): New target.
3151 (SRC): Include ${libm17n_gui_la_SOURCES} and
3152 ${libm17n_gd_la_SOURCES}.
3154 2004-05-24 Kenichi Handa <handa@m17n.org>
3156 * draw.c (draw_background): Don't draw background even if
3157 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3159 2004-05-22 Kenichi Handa <handa@m17n.org>
3161 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3163 2004-05-20 Kenichi Handa <handa@m17n.org>
3165 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3167 * m17n-gui.c: Include "plist.h".
3168 (mframe): If PLIST is NULL, initialize it to emply plist.
3170 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3171 (xft_driver): New variable.
3172 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3173 (xft_find_metric, xft_render): New function.
3174 (mwin__init): Adjusted for the new mfont__driver_list.
3175 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3176 generated face to PARAM.
3177 (mwin__realize_face): Fix setting of box colors. Don't call hook
3179 (mwin__draw_hline): New function.
3180 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3181 (mwin__xft_render): Delete these function.
3183 * internal-gui.h (struct MFrame): New member tick.
3184 (struct MGlyphString): New member tick.
3185 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3186 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3187 (mwin__xft_render): Delete extern.
3189 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3190 (mfontset): Always increment the reference count of returned
3193 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3194 (MFTInfo): Moved to font.h.
3195 (ft_iso8859_1_font_list): Delete this variable.
3196 (set_font_info): Don't set font->property[MFONT_TYPE].
3197 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3198 (add_font_info): Change type to void.
3199 (fc_list): Change anme from xft_list. Caller changed. Include
3200 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3201 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3202 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3203 (close_ft): Don't call mwin__xft_close. Unref
3204 ft_info->extra_info.
3205 (ft_open): Don't setup ft_info->fontname. Don't call
3207 (ft_find_metric): Don't call mwin__xft_get_metric.
3208 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3209 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3210 (mfont__ft_init): Adjusted for new mfont__driver_list.
3211 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3213 * font.c (mfont__driver_list): Make it MPlist.
3214 (mfont__init): Adjust initialization of mfont__driver_list.
3215 (mfont__fini): Free mfont__driver_list.
3216 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3217 (mfont__select): Adjusted for the new mfont__driver_list.
3219 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3220 (mfont__drirver_list): Adjust prototype.
3221 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3223 * face.h (struct MFace): Delete member realized_face_list, add
3225 (struct MRealizedFace): Delete member need_update
3226 andnofont_rface, add member non_ascii_list.
3227 (mface__update_frame_face): Extern it.
3229 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3231 (get_hline_create, get_box_create): New functions.
3232 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3234 (free_face): Cancep previous change. Free face->frame_list.
3235 (serialize_hline): Do nothing if hline->width is zero.
3236 (serialize_box): Do nothing if box->width is zero.
3237 (mface__init): Setup all properties of mface__default.
3238 (mface__fini): Free hline_prop_list and box_prop_list.
3239 (mface__realize): Cancel previous change. Update
3240 face->frame_list. Setup rface->non_ascii_list.
3241 (mface__for_chars): Update rface->non_ascii_list.
3242 (mface__free_realized): Free rface->non_ascii_list.
3243 (mface__update_frame_face): New function.
3244 (mface): Initialize face->frame_list.
3245 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3247 (mface_merge): Likewise.
3248 (mface_put_prop): If key is Mhline or Mbox, get value by
3249 get_hline_create or get_box_create respectively.
3250 (mface_put_prop): Update frame->tick and call
3251 mface__update_frame_face if necessary.
3252 (mface_update): Do nothing if func is noop_hook.
3254 * draw.c (render_glyphs): If a font is not found, use
3255 mwin__draw_empty_boxes.
3256 (alloc_gstring): Initialize gstring->tick.
3257 (get_gstring): Check gstring->tick.
3259 2004-05-17 Kenichi Handa <handa@m17n.org>
3261 * face.c (find_realized_face): Return value changed. If RFONT is
3262 NULL, avoid unnecessary checking.
3263 (free_face): Free face->realized_face_list.
3264 (mface__realize): Adjusted for the change of find_realized_face.
3265 If it returns a realized face that needs update, free it and
3266 realize a new one. Push a new realized face to
3267 frame->realized_face_list instead of appending.
3268 (mface__for_chars): Adjusted for the change of find_realized_face.
3269 Short cut if the required font is in rface->ascii_rface.
3270 (mface_put_prop): Free old value if necessary. Set need_update
3271 member of realized faces to 1.
3273 * face.h (struct MFace): Delete member tick, add member
3275 (struct MRealizedFace): Delete member tick, add member
3278 2004-05-13 Kenichi Handa <handa@m17n.org>
3280 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3282 2004-05-12 Kenichi Handa <handa@m17n.org>
3284 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3286 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3287 parse it XftNameParse.
3289 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3290 (all_fonts_scaned): New variable.
3291 (set_font_info): FAMILY may be Mnil.
3292 (add_font_info): Argument changed.
3293 (xft_list): Call add_font_info in it.
3294 (ft_list): Likewise.
3295 (ft_select): Make it work in the case family is Mnil.
3296 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3297 (mfont__ft_fini): Set all_fonts_scaned to 0.
3299 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3300 that is failed to open.
3302 2004-05-10 Kenichi Handa <handa@m17n.org>
3304 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3305 device's depth is 1 (i.e. monochrome).
3307 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3308 to work around the problem of libtool.
3310 * font-ft.c: Include <freetype/ftbdf.h>.
3311 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3313 (mfont__ft_init): Initialize them.
3314 (ft_iso8859_1_font_list): New variable.
3315 (set_font_info): Detect a font containing iso8859-1 glyphs and
3316 register it in ft_iso8859_1_font_list. If the font is not
3317 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3318 properties of the font from its properties.
3319 (add_font_list): If the font is not scalable, check if it is BDF
3320 or PCF font. If not, ignore it.
3321 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3322 registry is not iso8859-1.
3323 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3324 ft_iso8859_1_font_list.
3325 (ft_find_metric): If the font is not scalable, assume it as BDF
3326 or PCF, and get a metric from its properties.
3327 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3329 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3331 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3332 (libm17n_la_LDFLAGS): Delete it.
3333 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3334 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3336 2004-05-06 Kenichi Handa <handa@m17n.org>
3338 * draw.c (compose_glyph_string): Fix previous change.
3340 2004-04-30 Kenichi Handa <handa@m17n.org>
3342 * font-ft.c (ft_list): Delete unused variable `result'.
3343 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
3345 2004-04-27 Kenichi Handa <handa@m17n.org>
3347 * m17n-X.c: Include config.h
3348 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
3349 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
3350 (MWDevice) [HAVE_XFT2]: New member xft_draw.
3351 (FRAME_CMAP, FRAME_VISUAL): New macros.
3352 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
3353 (xfont_driver): Make it static.
3354 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
3355 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
3356 info->xft_color_back.
3357 (MXftFontInfo) [HAVE_XFT2]: New type.
3358 (mwin__xft_close) [HAVE_XFT2]: New function.
3359 (mwin__xft_open) [HAVE_XFT2]: New function.
3360 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
3361 (mwin__xft_render) [HAVE_XFT2]: New function.
3363 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3364 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
3365 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
3368 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
3370 * font-ft.c: Don't include FT_FREETYPE_H here.
3371 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
3372 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
3373 (MFTInfo): New member charmap_index.
3374 (MFTInfo) [HAVE_XFT2]: New member xft_info.
3375 (check_otf_filename): Renamed from check_filename. Return value
3377 (ft_set_property): This function deleted.
3378 (set_font_info): New function.
3379 (add_font_list): Argument changed. Add multiple fonts.
3380 (xft_list) [HAVE_XFT2]: New function.
3381 (ft_list) [not HAVE_XFT2]: New function.
3382 (ft_select): Add code for Xft.
3383 (close_ft): Likewise.
3384 (ft_open): Likewise.
3385 (ft_find_metric): Likewise.
3386 (ft_encode_char): Likewise.
3387 (ft_render): Likewise.
3389 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
3391 2004-04-26 Kenichi Handa <handa@m17n.org>
3393 * textprop.c (mtext_attach_property): Declare the return type as
3396 2004-04-21 Kenichi Handa <handa@m17n.org>
3398 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
3400 2004-04-09 Kenichi Handa <handa@m17n.org>
3402 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
3404 (load_command): Setup above members.
3406 2004-04-05 Kenichi Handa <handa@m17n.org>
3408 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
3410 2004-03-30 Kenichi Handa <handa@m17n.org>
3412 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
3415 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
3416 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
3418 2004-03-29 Kenichi Handa <handa@m17n.org>
3420 * Version 1.0 Patch Level 2 released.
3422 2004-03-29 Kenichi Handa <handa@m17n.org>
3424 * charset.c (make_charset): Set charset->fully_loaded and
3425 charset->simple correctly. Don't try to get charset->min_char and
3426 charset->max_char for a charset of method subset and superset.
3427 Don't load a mapping file here.
3428 (mcharset__init): Set unified_max.
3429 (mcharset__load_from_database): Free a working plist.
3431 * coding.c (mcoding__fini): Free all malloced data.
3433 * input-gui.c (win_create_ic): Set control.as_image for preediting
3436 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
3437 `count') to initialize the array.
3439 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
3442 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
3444 (mwin__create_window): Fix bug of setting a background pixel of a
3446 (mwin__adjust_window): Clear the window before drawing.
3448 * m17n-core.c (mdebug__report_object): Free array->objectes if
3450 (m17n_init_core): Don't set report_header_printed to 0 here.
3451 Fix debugging information.
3452 (m17n_fini_core): Set report_header_printed to 0 here.
3454 * m17n-core.h (mplist_deserialize): Extern it.
3456 * m17n-gui.c (m17n_fini_win): Fix debugging information.
3458 * m17n.c (m17n_fini): Fix debugging information.
3460 * mtext.c (mtext__adjust_foramt): New function.
3462 * mtext.h (mtext__adjust_foramt): Extern it.
3464 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
3466 * plist.h (mplist__deserialize): Don't extern it.
3468 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
3469 elements of symbol_table to NULL. Report about created and freed
3470 symbols if MDEBUG_FINI is set.
3472 2004-03-22 Kenichi Handa <handa@m17n.org>
3474 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
3476 * m17n.c (m17n_init): Fix the way of checking merror_code.
3478 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
3480 2004-03-22 Kenichi Handa <handa@m17n.org>
3482 * fontset.c (realize_font_group): Adjust the font size by
3483 mfont__resize before selecting a font.
3485 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
3487 2004-03-19 Kenichi Handa <handa@m17n.org>
3489 * Version 1.0 Patch Level 1 released.
3491 2004-03-19 Kenichi Handa <handa@m17n.org>
3493 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
3495 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
3497 2004-03-19 Kenichi Handa <handa@m17n.org>
3499 Re-apply the changes forgotten in the released version.
3501 * charset.c (mcharset__load_from_database): Call
3502 mchar_define_charset.
3504 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
3505 (mconv_encode_range): Put Mcoding text property.
3507 2004-03-18 Kenichi Handa <handa@m17n.org>
3509 * draw.c (Mdepth): New variable.
3510 (visual_order): Delete unused local var `pos'.
3511 (compose_glyph_string): Fix for the case that gstring->glyphs is
3512 realloced. Stop generating glyphs at TO. Fix handling of
3514 (layout_glyphs): Get metrics of all glyphs in advance. Set
3515 lbearing and rbearing of base of composition glyph correctly.
3516 Handle left-overhang glyphs correctly.
3517 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
3519 (dump_combining_code): Change the defualt off_x character to ".".
3520 (mdraw__init): Initialize Mdepth.
3522 * face.c (work_gstring): New variable
3523 (mface__init): Initialize work_gstring.
3524 (mface__fini): Free work_gstring.glyphs.
3525 (mface__realize): Don't handle videomode property here. Adjusted
3526 for the change of mfont__get_metric.
3527 (mface__for_chars): Adjusted for the change of mfont__get_metric.
3529 * face.h (enum face_gc): Moved to m17n-X.c.
3531 * font.h (struct MFontDriver): Arguments of find_metric changed.
3532 (mfont__select): Prototype adjusted.
3533 (mfont__get_metric): Likewise.
3534 (mfont__ft_drive_otf): Likewise.
3535 (mfont__flt_run): Likewise.
3537 * font.c (mfont__select): New argument layouter. If layouter is
3538 different in the registered font, make a new copy of realized
3540 (mfont__get_metric): Argument changed. Get metrics of multiple
3542 (mfont_find): Call mfont__select with layouter as Mnil.
3544 * font-flt.c (FontLayoutContext): New member rfont.
3545 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
3546 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
3548 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
3550 (NUM_POINTS): New macro.
3551 (MPointTable): New type.
3552 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
3553 (mfont__ft_drive_otf): New argument rfont.
3555 * fontset.c (realize_font_group): Adjusted for the changed of
3557 (check_fontset_element): This function deleted.
3559 * input-gui.c (adjust_window_and_draw): Locate a preedit window
3560 off the parent window if the preedit text is zero length.
3562 * internal-gui.h (struct MFrame): New members foreground,
3563 background, videomode, font.
3564 (struct MGlyphString): New member anti_alias.
3565 (MDrawPoint): New type.
3566 (mwin__draw_bitmap): Prototype deleted.
3567 (mwin__draw_points): Prototype added.
3569 * m17n-gui.h (MDrawControl): New member anti_alias.
3571 * m17n-gui.c (free_frame): Free frame->font.
3572 (mframe): Set the fontset of frame->face to the default fontset.
3574 * m17n-X.c (RGB_GC): New type.
3575 (enum gc_index): Renamed from enum face_gc. Member names changed.
3577 (struct MWDevice): Members foreground and background deleted. New
3578 member scratch_gc, gc_list.
3579 (DEFAULT_FONT, FALLBACK_FONT): New macros.
3580 (free_device): Free GCs in device->gc_list.
3581 (get_rgb_gc): New function.
3582 (get_gc): Renamed and argument changed from get_color.
3583 (get_gc_for_anti_alias): New function.
3584 (xfont_find_metric): Arguments changed. Get metrics of multiple
3586 (set_region): Argument changed. Caller changed.
3587 (xfont_render): Allways set a font in gc.
3588 (x_error_handler, x_io_error_handler): Define only if
3589 X_SET_ERROR_HANDLER is defined.
3590 (mwin__open_device): Create device->scratch_gc. Set members
3591 foreground, background, and videomode of frame. Call
3592 XSetErrorHandler and XSetIOErrorHandler only if
3593 X_SET_ERROR_HANDLER is defined.
3594 (struct gc_list): Deleted.
3595 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
3596 (mwin__realize_face): Adjusted for the change of the format of
3597 rface->info and the charge of set_region.
3598 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
3599 (mwin__draw_box): Likewise.
3600 (mwin__draw_bitmap): This function deleted.
3601 (mwin__draw_points): New function.
3602 (mwin__verify_region): Adjusted for the change of the format of
3603 rface->info and the charge of set_region.
3604 (mwin__create_window): Inherit backgound pixel from parent.
3605 (mwin__dump_gc): Adjusted for the change of the format of
3608 2004-03-16 Kenichi Handa <handa@m17n.org>
3610 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
3612 * input.c (M_key_alias): New variable.
3613 (handle_key): Try M_key_alias property of a key too.
3614 (minput__init): Initialize M_key_alias. Give that property to
3615 symbols in one_char_symbol. Fix bug of initializing
3618 * draw.c (compose_glyph_string): Don't handle
3619 ignore_formatting_char here. Include formatting characters in the
3620 range processed by a FTL.
3621 (layout_glyph_string): Handle ignore_formatting_char here.
3623 2004-03-12 Kenichi Handa <handa@m17n.org>
3625 * input-gui.c (win_create_ic): Enable bidi in status control.
3627 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
3629 2004-03-09 Kenichi Handa <handa@m17n.org>
3631 * input.c (load_input_method): If title is not specified, use the
3632 input method name as title.
3634 * m17n-X.c (get_color): Make it static.
3635 (xim_create_ic, xim_destroy_ic, x_error_handler)
3636 (x_io_error_handler): Likewise.
3638 2004-03-01 Kenichi Handa <handa@m17n.org>
3640 * Version 1.0 released.
3643 Copyright (C) 2003, 2004
3644 National Institute of Advanced Industrial Science and Technology (AIST)
3645 Registration Number H15PRO112
3647 This file is part of the m17n library.
3649 The m17n library is free software; you can redistribute it and/or
3650 modify it under the terms of the GNU Lesser General Public License
3651 as published by the Free Software Foundation; either version 2.1 of
3652 the License, or (at your option) any later version.
3654 The m17n library is distributed in the hope that it will be useful,
3655 but WITHOUT ANY WARRANTY; without even the implied warranty of
3656 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3657 Lesser General Public License for more details.
3659 You should have received a copy of the GNU Lesser General Public
3660 License along with the m17n library; if not, write to the Free
3661 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3662 Boston, MA 02110-1301, USA.