1 2006-02-06 Kenichi Handa <handa@m17n.org>
3 * Version 1.3.2 released.
5 2006-02-03 Kenichi Handa <handa@m17n.org>
7 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
8 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
10 * font.c (xlfd_parse_name): Fix handling of the name "nil".
12 * draw.c (layout_glyphs): Fix handling left_padding of
15 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
17 2006-02-02 Kenichi Handa <handa@m17n.org>
19 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
22 2006-01-25 Kenichi Handa <handa@m17n.org>
24 * input.c (resolve_expression): If the value of PLIST is a plist,
25 but the first element is not symbol, return 0.
27 2006-01-17 Kenichi Handa <handa@m17n.org>
29 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
30 HAVE_GD is 2 or the greater.
32 2006-01-16 Kenichi Handa <handa@m17n.org>
34 * Version 1.3.1 released.
36 2006-01-16 Kenichi Handa <handa@m17n.org>
38 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
39 simulating anti-aliasing.
41 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
42 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
44 2006-01-12 Kenichi Handa <handa@m17n.org>
46 * input.c (get_surrounding_text): Always pop ic->plist.
47 (reset_ic): Don't reset ic->plist.
49 2006-01-10 Kenichi Handa <handa@m17n.org>
51 * input.c (preedit_commit): For debugging, print only commiting
52 charactes. Don't set ic->candidate_show to 0.
53 (handle_key): Don't run branch-actions just by shifting to the
55 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
58 2006-01-07 Kenichi Handa <handa@m17n.org>
60 * input.c (load_branch): Confirm that maps is not NULL.
62 2006-01-05 Kenichi Handa <handa@m17n.org>
64 * input-gui.c (win_filter): Try to convert arg to key only when
67 * plist.c (read_integer_element): If '#' and '-' are followed by
68 non-integer-constituent, read them as a part of a symbol.
69 (read_symbol_element): New arg C.
70 (read_element): Adjust args to read_symbol_element.
72 * input.c (load_macros): On overwriting a macro, free the old
74 (minput__init): Store Mmap in load_im_info_keys.
75 (minput_get_title_icon): If the input method has no title, be sure
77 (minput_get_description): If the input method has no description,
78 be sure to return NULL.
79 (minput_get_variables): Fix documentation.
80 (handle_key): Pay attention to the case that key is Mnil.
81 (filter): Likewise. Fix handling of such symbol as S-A.
83 2005-12-22 Kenichi Handa <handa@m17n.org>
85 * Version 1.3.0 released.
87 2005-12-22 Kenichi Handa <handa@m17n.org>
89 * font-ft.c (ft_list): If the specified font has no property,
92 2005-12-20 Kenichi Handa <handa@m17n.org>
94 * character.c (mchar_get_prop): Check char_prop_list.
95 (mchar_put_prop, mchar_get_prop_table): Likewise.
97 2005-12-18 Kenichi Handa <handa@m17n.org>
99 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
100 file name sans language.
102 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
104 * input.c: Fix typo in comments.
106 2005-12-14 Kenichi Handa <handa@m17n.org>
108 * input.c (minput_get_title_icon): Check the default icon for the
111 2005-12-13 Kenichi Handa <handa@m17n.org>
113 * input.c (Mless_equal, Mgreater_equal): New variables.
114 (parse_expression, resolve_expression, parse_action_list)
115 (take_action_list): Handle the aboves.
116 (filter): Treat key S-X as X.
117 (minput__init): Initialize Mless_equal and Mgreater_equal.
118 (minput_get_title_icon): New function.
120 * m17n.h (minput_get_title_icon): Extern it.
122 * database.c (get_database_filename): Return a filename instead of
124 (load_database): Adjusted for the above change.
125 (mdatabase__load_for_keys): Likewise.
126 (mdatabase__find_file): New function.
128 * database.h (mdatabase__find_file): Extern it.
130 * font.h (mfont__resize): Delete extern.
132 * font.c (mfont__list): Check resize ratio.
133 (mfont__resize): Delete it.
134 (mfont_resize_ratio): Include the code of mfont__resize.
136 * font-ft.c (ft_open): Check resize ratio.
138 * m17n-X.c (xfont_open): Check resize ratio.
139 (xft_open): Likewise.
141 2005-12-07 Kenichi Handa <handa@m17n.org>
143 * input.c (take_action_list): If take_action_list return -1,
145 (handle_key): Likewise.
147 * face.c (mface__for_chars): When font is specified and layouter
148 is found for it, if the layouter doesn't support one of a
149 character, use a face sans layouter for it.
151 2005-12-06 Kenichi Handa <handa@m17n.org>
153 * fontset.c (mfont__lookup_fontset): If only a fallback font is
154 found, don't use it for more than one character.
156 2005-12-05 Kenichi Handa <handa@m17n.org>
158 * face.c (mface__realize): Set rfont->layouter to Mnil.
159 (mface__for_chars): Fix handling of layouter.
161 * character.h (mchar__define_prop): Extern it.
163 * database.c (update_database_list): Call mchar__define_prop if
166 * character.c (mchar__init): Don't call mchar_define_property.
167 Instead just initialize property keys.
168 (mchar__fini): Free char_prop_list only if it's not NULL.
169 (mchar__define_prop): New function.
170 (mchar_define_property): Call mchar__define_prop.
172 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
175 2005-12-02 Kenichi Handa <handa@m17n.org>
177 * language.c (mlang__init): Handle extra chars.
179 * m17n-gui.h (mfont_check): Adjust prototype.
181 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
182 (xfont_check_capability): New function.
183 (xft_driver): Specify xft_check_capability.
184 (xft_check_capability): New function.
186 * font-ft.c (M0_3): Delete it.
188 (ft_get_charmaps): Refer to M0.
189 (fc_parse_pattern): Fix previous change.
190 (ft_list_language): Check also extra chars.
191 (ft_check_otf): Define it even if HAVE_OTF is undef.
192 (ft_check_lang): Check the result of FcLangSetHasLang against
193 FcLangDifferentLang. Check also extra chars.
194 (ft_list_capability): Delete ifdef HAVE_OTF.
195 (ft_select): Likewise.
196 (ft_open): Improve debug information.
197 (ft_check_capability): New function.
198 (mfont__ft_driver): Specify ft_check_capability.
199 (mfont__ft_init): Initialize M0.
201 * fontset.c (get_font_from_group): New function.
202 (mfontset__get_font): New function.
204 * fontset.h (mfontset__get_font): Extern it.
206 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
207 (mfont__fini): Delete ifdef HAVE_OTF.
208 (free_font_capability): Likewise.
209 (mfont__get_capability): Likewise.
210 (mfont__check_capability): New function.
211 (mfont_check): Change the order of arguments. Use
214 * font.h (struct MFontDriver): New member check_capability.
215 (MFontCapability): Delete ifdef HAVE_OTF.
216 (mfont__check_capability): Extern it.
218 * face.c (mface__realize): Fix handling of FONT arg.
219 (mface__for_chars): Fix handling of explicitly specified font.
221 2005-11-25 Kenichi Handa <handa@m17n.org>
223 * font-flt.c (run_command): Print debug info for
226 * draw.c (layout_glyphs): Fix handling of left/right_padding.
228 * face.c (mface__for_chars): Check rfont before accessing the
231 2005-11-21 Kenichi Handa <handa@m17n.org>
233 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
236 * fontset.c (fontset_table): New variable.
237 (free_fontset): Call M17N_OBJECT_UNREGISTER.
238 (mfont__fontset_init): Add fontset_table as an object array.
239 (mfont__realize_fontset): Ref FONTSET.
240 (mfont__free_realized_fontset): Unref REALIZED->fontset.
241 (mfontset): Call M17N_OBJECT_REGISTER.
242 (mfontset_copy): Likewise.
244 * input.c (handle_key): For debugging, print information about
246 (filter): Add an alias for Meta and Alt modifiers.
247 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
249 (minput__init): Initialize them.
250 (parse_expression): New function.
251 (resolve_expression): New function.
252 (parse_action_list): Handle expressions by parse_expression.
253 (take_action_list): Handle expressions by resolve_expression.
254 (parse_nested_list_value): Fix previous change.
255 (resolve_command): Fix handling of the return value of
258 2005-11-18 Kenichi Handa <handa@m17n.org>
260 * font-ft.c (ft_check_otf, otf_script_list): Define only when
262 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
264 (ft_select): Likewise.
266 * font.c (mfont_list): Fix for the case that FONT is NULL.
267 (OTF_tag): Delete it.
268 (load_otf_script_list): Define only when HAVE_OTF is defined.
269 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
272 * draw.c (truncate_gstring): Be sure to truncate at
273 glapheme-cluster boundary.
275 2005-11-11 Kenichi Handa <handa@m17n.org>
277 * input.c (delete_surrounding_text): Clear cache if necessary.
279 2005-11-09 Kenichi Handa <handa@m17n.org>
281 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
282 glyph prev is also supported by the current flt.
284 2005-11-08 Kenichi Handa <handa@m17n.org>
286 * m17n-X.c (xft_render): Cancel previous change.
288 2005-11-07 Kenichi Handa <handa@m17n.org>
290 * input.c: Include <stdlib.h>.
291 (get_surrounding_text, delete_surrounding_text)
292 (get_preceding_char, get_following_char): New functions.
293 (integer_value): New arg surrounding. If it is nonzero, try to
294 get a surrounding character. Callers changed.
295 (take_action_list): Check `value' before setting an element.
296 (destroy_ic): Unref ic_info->preceding_text and
297 ic_info->following_text.
298 (minput__init): Initialize Minput_get_surrounding_text and
299 Minput_delete_surrounding_text.
300 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
302 (filter): Unref ic_info->preceding_text and
303 ic_info->following_text.
305 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
308 * input.h (MInputContextInfo): New members preceding_text and
311 2005-11-04 Kenichi Handa <handa@m17n.org>
313 * input.c (parse_nested_list_value): Fix handling of the global
315 (get_nested_list): Get global definitions by load_partial_im_info.
316 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
317 MInputCandidatesChanged.
318 (take_action_list): Likewise.
319 (reset_ic): Likewise.
320 (create_ic): Don't pay special attention to
321 Mcandidates_group_size.
322 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
323 (minput_set_variable): Get a definition of varible by
324 mplist_find_by_value, not mplist_get.
326 * m17n.h (enum MInputCandidatesChanged): New enum.
328 2005-11-01 Kenichi Handa <handa@m17n.org>
330 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
332 (mwin__destroy_window): If xft_draw's drawable is win, change it
333 to device->drawable before destroying win.
335 2005-10-31 Kenichi Handa <handa@m17n.org>
337 * input.c (load_im_info): Fix adding of state.
339 * m17n-core.c (m17n_fini_core): Fix reporting of module
342 * m17n.c (m17n_fini): Fix reporting of module finalization.
344 * m17n-gui.c (m17n_init_win): Fix reporting of module
347 2005-10-29 Kenichi Handa <handa@m17n.org>
349 * input.c (get_candidate_list): Fix the timing of referring plist.
351 2005-10-28 Kenichi Handa <handa@m17n.org>
353 * input.c (load_branch): Ignore an undefined map name.
354 (load_im_info): Set im_info->title from `name' only if it's not
356 (shift_state): Always update ic->status.
357 (adjust_candidates): Renamed from adjust_candidate_command.
358 Argument changed. Caller changed.
359 (get_candidate_list, regularize_action): New functions.
360 (take_action_list): Use them. On handling Munhandle, don't set
362 (handle_key): If KEY is not handled by MAP, and MAP has
363 branch_actions, perform them.
365 * database.c (mdatabase__fini): Free dir_info->filename;
367 2005-10-20 Kenichi Handa <handa@m17n.org>
369 * input.c (marker_code): Accept '@@'.
370 (integer_value): Handle '@@'.
371 (parse_action_list): Accept a symbol argument.
372 (take_action_list): Resolve the symbol argument. Handle the
375 2005-10-18 Kenichi Handa <handa@m17n.org>
377 * input.c: Include "charset.h".
378 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
380 (MIMState): New member (M17NObject control).
381 (lookup_nested_list, set_nested_list, parse_nested_list_value)
382 (get_nested_list, resolve_variable): New functions.
383 (integer_value): New arg (MPlist **value). Set it to the plist
384 element containing the value.
385 (resolve_command): New function.
386 (load_translation): New arg (MPlist *map_actions).
387 (load_branch): New args language and name. If `keylist' is a
388 symbol, resolved that as a command name.
389 (free_map): New arg top. Free map->map_actions only if top is
391 (free_state): New function.
392 (load_state): New arg name.
393 (im_info_list): New variable.
394 (free_im_info, get_im_info_by_tags): New functions.
395 (load_im_info): Arg key changed to plist. Handle `include'.
396 Return (MInputMethodInfo *).
397 (preedit_commit): Ref ic->candidate_list.
398 (get_select_charset, adjust_candidate_command): New functions.
399 (take_action_list): Handle `include'. Adjust candidate action
400 properly. Handle control variables `candidates-charset' and
401 `candidates-group-size'.
402 (open_im): Use get_im_info.
403 (create_ic): Get global variables.
404 (load_partial_im_info): New function.
405 (get_im_info): New function.
406 (check_command_keyseq, check_command_list, check_variable_list):
408 (minput__init): Don't handle M_database_hook and Mdetail_text.
409 Initialize M_candidates, Mcandidates_group_size,
411 (parse_variable_list, get_variable_list, parse_command_list)
412 (get_command_list): Delete them.
413 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
414 (minput__fini): Simply unref command_list and variable_list.
415 (minput_get_description): Adjusted for the new form of description.
416 (minput_get_commands): Use get_nested_list.
417 (minput_assign_command_keys): Likewise.
418 (minput_get_variables, minput_set_variable): Likewise.
420 * input.h (MInputMethodInfo): New members im and maps.
422 * database.h (M_database_hook): Delete extern.
423 (MDatabaseHookFunc): Delete extern.
424 (mdatabase__check): Extern it.
426 * database.c: Include <glob.h>.
427 (MAX_TIME): New macro.
428 (Masterisk): New variable.
429 (get_database_stream): Argument changed to (MDatabaseInfo *).
431 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
432 (find_database): New function.
433 (update_database_list): New function.
434 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
435 calling update_database_list.
436 (mdatabase__check): New function.
437 (mdatabase_find): Use update_database and find_database. Don't
438 handle MDatabaseHookFunc.
439 (mdatabase_list): Call update_database at first.
440 (mdatabase_define): Adjusted for the change of mdb->extra_info.
441 (MDatabaseList): New type.
443 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
445 * m17n.h (Mdetail_text): Delete extern.
447 * m17n-core.h (mplist_conc): Delete extern.
449 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
451 (mplist_conc): Renamed to mplist__conc.
452 (mplist__pop_unref): New function.
454 2005-10-14 Kenichi Handa <handa@m17n.org>
456 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
458 (read_element): If keys is an empty plist, return any element
460 (dump_plist_element): Check if plist is nested.
461 (mplist_conc): Always ref tail.
462 (mplist_set): If key is a managing key, ref val in advance.
464 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
465 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
466 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
469 * fontset.c (free_fontset): Unref fontset_list if necessary.
470 (mfont__fontset_fini): Don't free fontset_list. Unref
472 (mfont__realize_fontset): Initialize request.
473 (mfontset): Ref default_fontset or fontset only if necessary.
474 (mfontset_copy): Don't ref copy.
476 * draw.c (render_glyphs): Check gend->type before checking
479 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
480 unrefed plists to NULL.
482 2005-10-04 Kenichi Handa <handa@m17n.org>
484 * textprop.c (mtext_serialize): Be sure to make mt
485 MTEXT_FORMAT_UTF_8 and NULL terminated.
487 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
489 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
491 2005-10-03 Kenichi Handa <handa@m17n.org>
493 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
494 is not at the beginning of line.
496 2005-09-22 Kenichi Handa <handa@m17n.org>
498 * input.c: Include <sys/stat.h> and <unistd.h>.
499 (Minclude, Mcommit, Munhandle): New variables.
500 (minput__init): Initialize them. Push only Mstate to
501 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
502 (parse_action_list): Allow integer arg for undo. Handle Mcommit
504 (load_input_method): Handle "include" directive. If no states are
506 (shift_state): If state_name is Mt, shift back to the previous
507 state. Call preedit_commit to commit preedit text.
508 (preedit_commit): New function.
509 (take_action_list): Improve debug printing. Handle commit and
511 (handle_key): Check the return value of take_action_list. Don't
512 take branch_actions just after changing to the root map.
513 (reset_ic): Reset all ic_info members.
514 (filter): When a key is not handled, just move ic_info->keys
515 instead fo calling reset_ic.
516 (load_im_info): If key is not Mstate, push Mmap to
518 (MDatabaseStatList): New type.
519 (imdir_stat_list): New variable.
520 (input_method_hook): Don't cancel the hook. Check the
521 modification time of directories.
522 (minput__fini): Free imdir_stat_list;
524 * input.h (MInputContextInfo): New member prev_state.
526 * m17n-core.h (mplist_conc): Extern it.
528 * plist.c (mplist_conc): New function.
530 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
532 * font.h (MRealizedFont): New member average_width.
534 * font-ft.c (ft_open): Set rface->average_width.
536 * font.c (xlfd_unparse_name): Print '*' before registry name.
538 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
539 (xfont_open): Set rfont->average_width.
540 (xft_open): Likewise.
541 (device_open): Initialize disp_info->AVERAGE_WIDTH.
543 * internal-gui.h (struct MFrame): New member average_width.
545 * m17n-gui.c (mframe): Fix setting of frame->rfont.
546 (mframe_get_prop): Return the average_width of a font.
548 * face.c (mface__realize): Set rface->average_width.
549 (mface__update_frame_face): Set frame->average_width.
551 * face.h (MRealizedFace): New member average_width.
553 2005-09-19 Kenichi Handa <handa@m17n.org>
555 * font.c (xlfd_unparse_name): New arg full_xlfd.
556 (mfont__encode_char): Use shortcut only for X core fonts.
557 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
558 (mfont_put_prop): Handle `language' property.
559 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
560 Print file can capability info too.
562 * m17n-core.c (mdebug__output): New variable.
563 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
564 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
565 (m17n_fini_core): Close mdebug__output if it's not stderr.
567 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
568 (xfont_open): Handle baseline_offset.
569 (xfont_find_metric): Likewise.
570 (xfont_render): Likewise.
571 (xft_open): Likewise.
572 (xft_render): Likewise.
574 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
575 (mdebug__output): Extern it.
576 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
577 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
578 (MDEBUG_DUMP): New macro.
579 (MDEBUG_PRINT_TIME): Print to medebug__output.
581 * font.h (MRealizedFont): New member baseline_offset.
583 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
585 (fc_weight_table): Add FC_WEIGHT_REGULAR.
586 (ft_list_family): Check alias.
587 (ft_list_language): If language is "en", don't try to the second
589 (ft_default_list): New variable.
590 (ft_list_default): New function.
591 (ft_select): If family is not specified, try only the default
592 fonts. Treat the weights normal and medium same.
593 (ft_open): Fix debug message. If registry is not specified, try
594 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
595 (ft_find_metric): Likewise.
596 (ft_render): Likewise.
597 (ft_list): Fix debug message. Accept the registring iso8859-1.
598 If family is not specified, try only the default fonts.
600 * face.c (mface__realize): Fix logic of opening a font.
602 2005-09-16 Kenichi Handa <handa@m17n.org>
604 * face.c (mface__realize):
606 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
609 * input.c (shift_state): Fix the condition of taking init actions.
610 (take_action_list): Fix handling of pushback action.
611 (handle_key): Don't change key while checking its alias.
612 (minput__init): Initialize new variables.
613 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
616 2005-09-12 Kenichi Handa <handa@m17n.org>
618 * mtext.c (mtext__uppercase): Add proper open/close parens.
619 (mtext_titlecase): Add proper casting.
621 * input.c (parse_action_list): Handle the case that the arg is a
622 key sequence (MText or MPlist).
623 (take_action_list): Likewise.
624 (shift_state): Shorter debug message.
625 (handle_key): Terminate a debug message by "\n".
626 (reset_ic): Don't take initial actions here.
627 (minput_open_im): Print a debug message.
628 (minput_close_im): Likewise.
629 (minput_create_ic): Likewise.
630 (minput_destroy_ic): Likewise.
632 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
634 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
637 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
638 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
641 * character.c: Add Japanese documentation for
642 mchar_get_prop_table ().
644 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
646 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
647 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
648 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
650 (init_case_conversion): New function.
651 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
652 (uppercase_precheck, lowercase_precheck, final_sigma)
653 (after_soft_dotted, more_above, before_dot, after_i)
654 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
656 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
658 * plist.c (read_mtext_element): Fix previous change.
660 2005-09-05 Kenichi Handa <handa@m17n.org>
662 * plist.c (read_mtext_element): Handle \uXXXX notation.
664 * internal.h (MTABLE_MALLOC): Don't use a local variable.
665 (MTABLE_ALLOCA): Change the name of local variable.
667 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
668 HAVE_FREETYPE are defined.
670 * m17n-X.c: Check HAVE_X11.
672 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
673 directory listing libraries.
674 (noinst_PROGRAMS): Define it only in maintainer mode.
676 2005-09-02 Kenichi Handa <handa@m17n.org>
678 * m17n-gui.h (mdraw_line_break_option): Extern it.
680 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
681 end of the first glyph.
682 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
684 (mdraw_line_break_option): New variable.
685 (mdraw_default_line_break): Use mtext_line_break.
687 * mtext.h (wordseg_func_table): Don't extern it.
688 (mtext__wseg_fini): Extern it.
690 * mtext.c: Don't include word-thai.h.
691 (wordseg_func_table): Delete this variable.
692 (mtext__init): Don't initialize above. Don't call
693 mtext__word_thai_init.
694 (mtext__fini): Don't free wordseg_func_table. Call
695 mtext__wseg_fini instead fo mtext__word_thai_fini.
696 (MTextWordsegFunc): Don't typedef it.
697 (mtext__word_segment): Moved to mtext-wseg.c.
699 * m17n-core.h (enum MTextLineBreakOption): New enum.
700 (mtext_line_break): Extern it.
702 * mtext-wseg.c: New file.
704 * mtext-lbrk.c: New file.
706 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
707 add mtext-lbrk.c and mtext-wseg.c.
709 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
710 the case that head is NULL.
712 2005-09-01 Kenichi Handa <handa@m17n.org>
714 * word-thai.c (wordseg_propertize): If the property value is nil,
715 don't make the property no-merge.
716 (thai_wordseg): Don't require *from and *to are set a priori. Pay
717 attention to the case that they are NULL.
718 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
721 * character.c (mchar_get_prop_table): New function.
723 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
725 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
726 (mchar_get_prop_table): Extern it.
728 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
729 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
731 * internal.h (enum MTextCoverage): New enum.
732 (MText): New member coverage.
734 * mtext.c (FORMAT_COVERAGE): New macro.
735 (insert): Copy mt2->coverage.
736 (mtext__from_data): Initialize mt->coverage.
737 (mtext__adjust_format): Update mt->coverage.
738 (mtext): Initialize mt->coverage.
739 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
740 Update mt->coverage if necessary.
741 (mtext_duplicate): Copy mt->coverage.
742 (mtext_insert, mtext_replace): New functions.
743 (mtext_dup): Use mtext_duplicate.
744 (mtext__word_segment): Don't set *from and *to if a word
745 segmentation funcion is not found.
746 (mtext_ins_char): Fix typo.
748 2005-08-25 Kenichi Handa <handa@m17n.org>
750 * font.h (MFont): New member for_full_width.
752 * font.c (compare_font_score): Prefer a font of not
755 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
756 registry charset of a font is one of CJK charsets.
758 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
759 supports some of CJK.
761 2005-08-24 Kenichi Handa <handa@m17n.org>
763 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
765 * m17n-gui.c (null_device_open): Check Mresolution param and set
768 * m17n-gd.c (device_open): Check Mresolution param and set
771 * m17n-X.c (MWDevice): New member resy.
772 (xfont_open): Set ascent, descent, and max_advance members of
774 (xft_open): Likewise.
775 (device_open): Compare also screen_num to find a device. Set
776 device->resy and frame->dpi.
778 * internal-gui.h (MFrame): New member dpi.
780 * font.h (MRealizedFont): New member max_advance.
782 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
783 (mfont__init): Don't initialize Mascent, Mdescent.
784 (Mascent, Mdescent): Delete these variables.
785 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
786 Mfont_descent instead of Mascent and Mdescent.
787 (mfont_put_prop): Allow negative size.
788 (mfont_find): Handle the case of spec->size < 0. Fix previous
790 (mfont_list): Handle the case of spec->size < 0.
791 (mfont_check): Likewise.
793 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
794 (fc_get_pattern): Handle the case of font->size < 0.
795 (ft_open): Set ascent, descent, and max_advance members of rfont.
796 (ft_find_metric): Improve rounding.
797 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
800 * face.c (mface__realize): Handle the case of font->size < 0.
802 2005-08-22 Kenichi Handa <handa@m17n.org>
804 * coding.c (MConverterStatus): Change the member buf to union.
805 (mconv_buffer_converter): Add const to the arg buf.
806 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
807 (mconv_decode): Adjusted for the change of MConverterStatus.
808 (mconv_encode_range): Likewise.
810 * m17n.h (mconv_buffer_converter): Prototype adjusted.
811 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
813 2005-08-20 Kenichi Handa <handa@m17n.org>
815 * m17n-gui.h (mfont_from_name): Prototype adjusted.
816 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
818 * m17n-X.c (xfont_open): Set members ascent, descent, and
819 max_advance of rfont.
820 (xft_open): Likewise.
822 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
824 (mfont__ft_parse_name): Add const to the arg name.
826 * font.c (xlfd_parse_name): Add const to the arg name. Call
827 mfont__set_property instead of mfont_set_spec. Set font->spacing.
828 (xlfd_unparse_name): Handle spacing.
829 (mfont__init): Initialize new variables.
830 (mfont__id): Handle spacing.
831 (mfont__merge): Likewise.
832 (mfont__set_spec): This function deleted.
833 (mfont__parse_name_into_font): Add const to the arg name. Fix the
834 condition of calling mfont__ft_parse_name.
835 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
836 (mfont_get_prop): Handle properties spacing, ascent, descent,
838 (mfont_find): Return a realized font.
839 (mfont_from_name): Add const to the arg name.
841 * font.h (enum MFontProperty): New member MFONT_SPACING.
842 (enum MFontSpacing): New enum.
843 (MFont): New members spacing and max_advance.
844 (mfont__ft_parse_name): Prototype adjusted.
845 (mfont__set_spec): Extern deleted.
846 (mfont__parse_name_into_font): Prototype adjusted.
848 2005-08-19 Kenichi Handa <handa@m17n.org>
850 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
852 * font.c (mfont_list): If FONT is null, use a temporary font.
853 (mfont_parse_name): Add const to the arg name.
855 2005-08-18 Kenichi Handa <handa@m17n.org>
857 * word-thai.c: Surround code by #ifdef and #endif to escape from
860 * font-ft.c: Mostly re-written.
862 * font-flt.c (FontLayoutCmdOTF): This type deleted.
863 (FontLayoutCmd): Type of the member otf changed..
864 (load_otf_command): Adjusted for the format change of otf command.
865 (load_command): Likewise.
866 (free_flt_command): Unref cmd->body.otf.
867 (run_otf): Ajusted for the type change of otf_cmd.
868 (run_command): Ajusted for the type change of otf_cmd. On
869 debugging, print ctx->combining_code.
870 (mfont__flt_run): Initialize ctx's members code_offset,
871 combining_code, and left_padding to 0.
873 * face.h (struct MRealizedFace): New member font.
874 (mface__realize): Prototype adjusted.
876 * face.c (find_realized_face): New arg font.
877 (find_realized_face): Adjusted for the change of MFont.
878 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
879 (mface__fini): Don't call mdebug__report_object.
880 (mface__realize): New arg font.
881 (mface__for_chars): Adjusted for the change of mfont__encode_char.
882 Optimize the latin case.
883 (mface__free_realized): Free rface->font.
884 (mface__update_frame_face): Adjusted for the change of mface__realize.
885 (mface_equal): New function.
887 * draw.c (Mcommon): New variable.
888 (visual_order): Args to mfont__encode_char changed.
889 (compose_glyph_string): Handle Mfont text property.
890 (layout_glyphs): Adjusted for the change of MFont.
891 (mdraw__init): Initialize Mcommon.
892 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
894 * font.h (enum MFontType): Members completely changed.
895 (enum MFontProperty): Move MFONT_SIZE to the tail.
896 (enum MFontSource): New enum.
897 (struct MFont): New members type, source, sizes, file, capability,
899 (struct MRealizedFont): Type of member font changed. Members
900 score, status, and encoding deleted.
901 (MFontScore): New type.
902 (MFontList): Member changed.
903 (struct MFontDriver): New member has_char. Types of members
905 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
906 (Mapple_roman): Extern them.
907 (OTF_Tag): Typedefed if not HAVE_OTF.
908 (enum MFontOpenTypeTable): New enum.
909 (MFontCapability): New type.
910 (mfont__ft_drive_otf): Prototype adjusted.
911 (mfont__score): Extern deleted.
912 (mfont__merge): Extern it.
913 (mfont__has_char): Extern it.
914 (mfont__encode_char): Prototype adjusted.
915 (mfont__open): Extern it.
916 (mfont__set_spec): Prototype adjusted.
917 (mfont__get_capability): Extern it.
919 * font.c: Include "fontset.h".
920 (M_font_capability, M_font_list, M_font_list_len): New variables.
921 (font_score_priority): Change order of initial elements.
922 (font_score_shift_bits): Fix array size.
923 (common_weight): Add "thin", "semibold", and "heavy".
924 (common_stretch): Add "ultracondensed", "extracondensed",
925 "extraexpanded", and "utltraexpand".
926 (font_weight_regular, font_weight_normal, font_weight_medium): New
928 (gen_font_name): This function deleted.
929 (find_encoding): Set font->encoding.
930 (OTF_tag): New function.
931 (otf_script_list): New variable.
932 (load_otf_script_list): New function.
933 (find_script_from_otf_tag): New function.
934 (xlfd_parse_name): Set font->type and font->source.
935 (mfont__free_realized): Free chains rfonts.
936 (font_score): Renamed from mfont__score.
937 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
938 (Mapple_roman): New variables.
939 (mfont__init): Initilize new variables. Initalize
940 default_encoding.encoding_name and
941 default_encoding.encoding_charset to Municode_full and
942 mcharset__unicode. Use SAFE* macros for allocating filepath
944 (mfont__fini): Free otf_script_list.
945 (mfont__id): New function.
946 (mfont__match_p): Check also capability member of MFont.
947 (mfont__merge): New funciton.
948 (mfont__set_spec_from_face): Set type and source members.
949 (mfont__set_spec_from_plist): Set capability and type members.
950 (mfont__select): Argument changed.
951 (mfont__available): New function.
952 (compare_font_score): New function.
953 (mfont__list): New function.
954 (mfont__open): Return a realized font.
955 (mfont__resize): Adjusted for the change of MFont.
956 (mfont__has_char): New function.
957 (mfont__encode_char): Argument changed.
958 (mfont__set_spec): Argument changed.
959 (free_font_capability): New function.
960 (mfont__get_capability): New function.
961 (MFontfile): New variable.
962 (mfont_get_prop): Adjusted for the change of MFont.
963 (mfont_put_prop): Likewise.
964 (mfont_set_selection_priority): Fix the way of setting
965 font_score_priority[].
966 (mfont_find): Use mfont__list instead of mfont__select.
967 (mfont_resize_ratio): Adjusted for the change of MFont.
968 (mfont_list): Use mfont__list.
969 (mfont_check): New function.
970 (font_score): Make it static.
972 * fontset.h (mfont__realize_fontset): Prototype adjusted.
973 (mfont__lookup_fontset): Likewise.
975 * fontset.c (struct MFontset): Delete member font_spec_list.
976 (struct MRealizedFontset): Type of member spec changed. New
978 (load_font_group): Arg spec_list deleted.
979 (load_fontset_contents): Adjusted for the change of fontset_def.
980 (free_fontset): Fix the way of freeing fontset elements.
981 (realize_fontset_elements): Argument changed.
982 (get_per_script): New function.
983 (free_realized_fontset_elements): Fix the way of feeing rfontset
985 (update_fontset_elements): Fix args to realize_fontset_elements.
986 (mfont__realize_fontset): New arg spec.
987 (try_font_list): New function.
988 (try_font_group): New arg request. Use try_font_list.
989 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
991 (mfontset): Adjusted for the change of MFontset.
992 (mfontset_copy): Likewise. Don't share plists.
993 (mfontset_modify_entry): Adjusted for the change of MFontset.
994 (mfontset_lookup): Call get_per_script.
995 (mdebug_dump_fontset): Print also the address of fonts.
997 * input.c (shift_state): Don't reset ic_info->vars.
998 (take_action_list): Call MDEBUG_PRINT fore calling
1001 * internal-gui.h (MFontDriver): Don't typedef it here.
1003 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
1004 (MXFont): This type deleted.
1006 (struct _MFontX): New struct.
1007 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
1008 (MDisplayInfo): Member base_font_list deleted.
1009 (DEFAULT_FONT): Definition changed.
1010 (FALLBACK_FONT): This maclr deleted.
1011 (free_display_info): Adjusted for the change of MDisplayInfo.
1012 (free_device): Argument to mfont__free_realized changed.
1013 (xfont_driver): Adjusted for the change of MFontDriver.
1014 (xfont_registry_list): Use MFontX instead of MXFont.
1015 (MRealizedFontX): Renamed from MXFontInfo.
1016 (xfont_select): Return the font found first.
1017 (close_xfont): Change MXFontInfo to MRealizedFontX.
1018 (xfont_open): Return the realized font.
1019 (xfont_find_metric): Get xfont from rfont->fontp.
1020 (xfont_has_char): New function.
1021 (xfont_encode_char): Adjusted for the argument change.
1022 (xfont_render): Get xfont from rfont->fontp.
1023 (xfont_list): Adjusted for the argument change.
1024 (MRealizedFontXft): Renamed from MXftFontInfo.
1025 (xft_driver): Ajusted for the change of MFontDriver.
1026 (close_xft): Change MXtfFontInfo to MRealizedFontXft
1027 (xft_open_font): Argument changed.
1028 (xft_open): Argument changed. Return the realized font.
1029 (xft_find_metric): Get xft_font from rfont->fontp.
1030 (xft_has_char, xft_encode_char): New functions.
1031 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1032 font if not yet opened.
1033 (device_open): Don't set frame->font.
1035 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1037 (gd_font_open): New function.
1038 (gd_render): Don't use the local variable ft_info.
1039 (device_init): Adjusted for the change of gd_font_driver.
1041 * textprop.c (mtext__prop_init): Initialize text_property_table.
1042 Call M17N_OBJECT_ADD_ARRAY.
1043 (mtext__prop_fini): Don't call mdebug__report_object.
1045 * plist.c (mplist__init): Initialize plist_table.
1046 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1047 (mplist__fini): Don't call mdebug__report_object.
1049 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1050 (mtext__fini): Don't call mdebug__report_object.
1051 (MTEXT_FORMAT_UTF_16): Correct type.
1052 (mtext_data): New function.
1053 (mtext_text): Fix calculation of limit and args to
1056 * language.c: Include "plist.h".
1057 (M_script_lang_list): New variable.
1058 (mlang__init): Read languages and their information from m17n
1060 (mlanguage__list): New function.
1061 (Miso639_1, Miso639_2): New variables.
1063 * language.h (mlanguage__list): Extern it.
1065 * database.c (get_database_stream): Use SAFE_* macros for
1066 allocating and freeing path.
1067 (mdatabase__init): Likewise.
1069 * symbol.c (msymbol__fini): Don't free symbols here.
1070 (msymbol__free_table): New function.
1071 (msymbol_is_managing_key): New function.
1073 * symbol.h (msymbol__free_table): Extern it.
1074 (msymbol__list): Extern it.
1076 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1078 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1079 (struct _M17NObjectArray): New member name and next.
1080 (mdebug__add_object_array): Extern it.
1081 (M17N_OBJECT_ADD_ARRAY): New macro.
1082 (mdebug__report_object): Don't extern it.
1084 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1086 * m17n-gui.c (free_frame): Don't free frame->font.
1087 (null_device_fini): Fix code for freeing
1088 null_device.realized_font_list.
1089 (m17n_fini_win): Free interface.
1090 (mframe): Cast the return value of dlsym. Set frame->font here.
1091 (mframe_get_prop): Check frame->rface->rfont before accessing the
1094 * m17n-gui.h (Mfontfile): Extern it.
1095 (mfont_check): Extern it.
1096 (mface_equal): Extern it.
1098 * m17n-core.c: Include "symbol.h".
1099 (report_header_printed): This variable deleted.
1100 (object_array_root): New variable.
1101 (report_object_array): New function.
1102 (mdebug__report_object): This function deleted.
1103 (mdebug__add_object_array): New function.
1104 (m17n_init_core): Call mchartable_init () before mtext_init ().
1105 (m17n_fini_core): Call report_object_array (if necessary) and
1106 msymbol__free_atable at the end.
1108 * m17n-core.h (msymbol_is_managing_key): Extern it.
1109 (mtext_data): Extern it.
1110 (MTEXT_FORMAT_UTF_16): Correct type.
1111 (M17NLIB_MINOR_VERSION): Changed to 3.
1112 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1114 * chartab.c (mchartable__init): Initalize chartable_table.count.
1115 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1116 mdebug__report_object.
1118 2005-05-26 Kenichi Handa <handa@m17n.org>
1120 * m17n.h (Miso639_1, Miso639_2): Extern them.
1122 * symbol.h (msymbol__list): Extern it.
1124 * symbol.c (msymbol__list): New function.
1126 2005-05-19 Kenichi Handa <handa@m17n.org>
1128 * input-gui.c (minput__win_init): Don't change the value of
1131 2005-05-16 Kenichi Handa <handa@m17n.org>
1133 * m17n-core.c (m17n_object): Be sure to initialize all members.
1135 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1137 2005-05-09 Kenichi Handa <handa@m17n.org>
1139 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1141 2005-04-27 Kenichi Handa <handa@m17n.org>
1143 * language.c (mlang__init): Add "an" (Aragonese).
1145 * word-thai.c: Add support for libthai.
1146 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1147 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1149 * mtext.c: Include "word-thai.h" conditionaly.
1150 (mtext__init): Call mtext__word_thai_init conditionaly.
1151 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1153 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1154 not WORDCUT_LD_FLAGS.
1156 2005-04-19 Kenichi Handa <handa@m17n.org>
1158 * word-thai.c (wordseg_propertize): Always unref the attached
1160 (thai_wordseg): Don't unref the property.
1162 2005-04-18 Kenichi Handa <handa@m17n.org>
1164 * word-thai.c: Include stdlib.h.
1165 (wordseg_propertize): Add dummy function for the case that wordcut
1166 library doesn't exist.
1167 (wordseg_propertize): Fix for old wordcut library.
1169 2005-04-16 Kenichi Handa <handa@m17n.org>
1171 * word-thai.c: Include <stdio.h>.
1173 2005-04-15 Kenichi Handa <handa@m17n.org>
1175 * draw.c: Include mtext.h.
1176 (linebreak_table, M_break_at_space, M_break_at_word)
1177 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1178 (compose_glyph_string): Check POS before getting Mface text
1180 (truncate_gstring): Give correct TO arg to line_break function.
1181 (GET_LB_TYPE): New macro.
1182 (find_break_backward, find_break_forward): New functions.
1183 (mdraw__init): Initialize the above new variables.
1184 (mdraw__fini): Free linebreak_table.
1185 (mdraw_default_line_break): Use find_break_backward and
1188 * word-thai.c: New file.
1190 * word-thai.h: New file.
1192 * mtext.c: Include word-thai.h.
1193 (wordseg_func_table): New variable.
1194 (mtext__init): Initialize wordseg_func_table and call
1195 mtext__word_thai_init.
1196 (mtext__fini): Call mtext__word_thai_fini, free
1198 (MTextWordsegFunc): New type.
1199 (mtext__word_segment): New function.
1201 * mtext.h (wordseg_func_table): Extern it.
1202 (mtext__word_segment): Extern it.
1204 * m17n.c (m17n_init): Fix typo (== -> =).
1206 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1207 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1209 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1210 (MTEXTPROP_VAL): New macros.
1212 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1214 2005-04-07 Kenichi Handa <handa@m17n.org>
1216 * database.c (load_chartable): Fix pursing of symbol name.
1218 2005-03-24 Kenichi Handa <handa@m17n.org>
1220 * m17n.c (m17n_init): Fix typo (== -> =).
1222 2005-03-11 Kenichi Handa <handa@m17n.org>
1224 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1226 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1228 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1231 2005-03-09 handa <handa@m17n.org>
1233 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1234 calling m17n_init ().
1236 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1237 calling m17n_init_core ().
1239 2005-02-28 Kenichi Handa <handa@m17n.org>
1241 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1244 2005-02-17 Kenichi Handa <handa@m17n.org>
1246 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1247 (M_description, M_command, M_variable): New variables.
1248 (load_im_info_keys): New variables.
1249 (load_im_info, check_command_keyseq, get_description_advance)
1250 (parse_command_list, get_command_list, parse_variable_list)
1251 (get_variable_list, input_method_hook): New functions.
1252 (command_list, variable_list): New variables.
1253 (minput__init): Put input_method_hook to Minput_method.
1254 Initialize M_description, M_command, M_variable, Mdetail_text,
1255 load_im_info_keys, command_list, variable_list.
1256 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1257 (Mdetail_text): New variable.
1258 (minput_get_description, minput_get_commands)
1259 (minput_assign_command_keys, minput_get_variables)
1260 (minput_set_variable): New functions.
1262 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1263 (minput_assign_command_keys, minput_get_variables)
1264 (minput_set_variable): Extern them.
1266 * plist.c (UNGETC): Just decrement st->p.
1267 (read_mtext_element): New arg skip.
1268 (read_integer_element): Likewise.
1269 (read_symbol_element): Likewise.
1270 (read_element): New arg KEYS.
1271 (mplist__from_plist): Don't increment ref-count of NULL object.
1272 (mplist__from_file): New arg KEYS.
1273 (mplist_put): Don't increment ref-count of NULL object.
1274 (mplist_add): Likewise.
1275 (mplist_push): Likewise.
1276 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1278 * plist.h (mplist__from_file): Prototype adjusted.
1280 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1281 (get_database_stream): New function.
1282 (load_database): Use get_database_stream.
1283 (M_database_hook): New variable
1284 (mdatabase__init): Initialize M_database_hook.
1285 (mdatabase__load_for_keys): New function.
1286 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1288 (mdatabase_define): Free mdb->extra_info if necessary.
1290 * database.h (mdatabase__dir_list, M_database_hook)
1291 (mdatabase__load_for_keys): Extern them.
1292 (MDatabaseHookFunc): New type.
1294 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1296 2004-12-27 Kenichi Handa <handa@m17n.org>
1298 * Version 1.2.0 released.
1300 2004-12-27 Kenichi Handa <handa@m17n.org>
1302 * input.c (minput_filter): Don't reset ic->xxx_changed.
1304 * mtext.c (mtext_from_data): Fix documentation.
1306 2004-12-25 Kenichi Handa <handa@m17n.org>
1308 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1309 (M17NLIB_VERSION_NAME): Update to "1.2.".
1311 2004-12-24 Kenichi Handa <handa@m17n.org>
1313 * input.c (reset_ic): Set key_unhandled to 0.
1315 2004-12-21 Kenichi Handa <handa@m17n.org>
1317 * m17n-gui.h (mfont_from_spec): Delete extern.
1319 * input-gui.c (win_callback): Handle Minput_reset.
1320 (minput__win_init): Register reset_ic as a callback for
1323 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1324 changed. At first, shift to the initial state.
1325 (minput__init): Initialize Minput_reset. Register reset_ic as a
1326 callback for Minput_reset.
1327 (Minput_reset): New variable.
1328 (minput_filter): Always set ic->xxx_changed to 0.
1329 (minput_reset_ic): New function.
1330 (integer_value): Fix typo ('>' -> '<') and calculation of length
1333 * m17n-core.c (merror_code): Change type to `int'.
1335 * m17n-misc.h (merror_code): Adjust type.
1337 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1339 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1340 (mtext_change_prop): Delete extern.
1342 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1343 to `int'. Move the documents to m17n-core.h.
1345 2004-12-13 Kenichi Handa <handa@m17n.org>
1347 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1348 (MTextProperty): Document it.
1350 2004-12-09 Kenichi Handa <handa@m17n.org>
1352 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1354 2004-12-03 Kenichi Handa <handa@m17n.org>
1356 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1357 m17n__gui_initialized): New externs.
1359 * m17n-core.h (enum M17NStatus): New enum.
1360 (m17n_status): Extern it.
1362 * m17n-core.c (core_initialized): Delete this variable.
1363 (m17n__core_initialized, m17n__shell_initialized,
1364 m17n__gui_initialized): New variables.
1365 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1366 instead of core_initialized.
1367 (m17n_status): New function.
1369 * m17n.c (shell_initialized): Delete this variable.
1370 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1373 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1375 * m17n-gui.c (win_initialized): Delete this variable.
1376 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1377 instead of gui_initialized.
1379 2004-11-19 Kenichi Handa <handa@m17n.org>
1381 * input.c (reset_ic): Check if ic_info->state is NULL.
1382 (filter): If ic_info->state is NULL, return 0.
1383 (load_input_method): Don't unref `maps' it it's not created.
1385 2004-11-15 Kenichi Handa <handa@m17n.org>
1387 * input.c (find_candidates_group): If INDEX is -1, find the last
1389 (take_action_list): If the previous of the first candidate is
1390 requested, select the last candidate.
1392 2004-11-08 Kenichi Handa <handa@m17n.org>
1394 * m17n-X.c (device_open): Try at most 32 fonts to find a
1395 non-autoscaled font.
1397 * font.c (xlfd_parse_name): Fix previous change.
1399 2004-11-05 Kenichi Handa <handa@m17n.org>
1401 * font.c: (commont_style): Include dummy elements "slanted" and
1402 "rslanted" to prefer "o" to "r" if "i" is requested.
1404 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1406 2004-10-29 Kenichi Handa <handa@m17n.org>
1408 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1410 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1411 New members smallest and larger.
1412 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1413 (xfont_registry_list): Likewise.
1414 (xfont_select): Likewise.
1417 2004-10-28 Kenichi Handa <handa@m17n.org>
1419 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1420 font name comparison.
1421 (xfont_select): Fix logic for selecting a larger size font.
1423 2004-10-25 Kenichi Handa <handa@m17n.org>
1425 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1428 2004-10-22 Kenichi Handa <handa@m17n.org>
1430 * input.c (update_candidate): Renamed from udpate_candidate.
1431 (take_action_list): Show more debugging info on arithmetic commands.
1433 * m17n-X.c (device_open): Fix previous change.
1435 * draw.c (compose_glyph_string): Don't get face property at the
1438 2004-10-21 Kenichi Handa <handa@m17n.org>
1440 * draw.c (compose_glyph_string): Fix for the case of category
1443 2004-10-19 Kenichi Handa <handa@m17n.org>
1445 * input.c (mdebug_mask): New variable.
1446 (shift_state): Print debug information.
1447 (take_action_list): Likewise.
1448 (handle_key): Likewise.
1450 2004-10-14 Kenichi Handa <handa@m17n.org>
1452 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1454 2004-10-13 Kenichi Handa <handa@m17n.org>
1456 * m17n-X.c (device_open): Be sure to register at least one font
1459 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1460 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1462 2004-10-12 Kenichi Handa <handa@m17n.org>
1464 * draw.c (alloc_gstring): Fix previous change.
1466 * font-ft.c (ft_list_generic): Fix for the case of not
1469 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1471 * font.c (mfont_list): If no font is found, return NULL.
1472 (load_font_encoding_table): Put entries of nil registry first.
1473 (find_encoding): Adjust for the above change.
1475 2004-10-11 Kenichi Handa <handa@m17n.org>
1477 * m17n-gui.h (mfont_list): Adjust prototype.
1479 * m17n-X.c (xfont_list): New arg maxnum.
1481 * font.h (struct MFontDriver): Change prototype of <list>.
1483 * font-ft.c (fc_generic_family_list): Delete it.
1484 (Mserif, Msans_serif, Mmonospace): Delete them.
1485 (M_generic_family_info): New variable.
1486 (enum GenericFamilyType): New enum.
1487 (struct GenericFamilyInfo): New struct.
1488 (generic_family_table): New variable.
1489 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1491 (add_font_info): Get style here.
1492 (ft_list_family): Don't initialize fc_config here. Don't list
1494 (ft_list_generic): New function.
1495 (ft_select): Pay attention to generic familes here.
1496 (ft_open): Fix calculation of ascent and descent.
1497 (ft_list): Pay attention to generic families.
1498 (mfont__ft_init): Initialize M_generic_family_info,
1499 generic_family_table, and fc_config..
1500 (mfont__ft_fini): Finalize generic_family_table.
1502 * draw.c (compose_glyph_string): Use more constant font for
1503 glyphs. Adjust for the member change in MGlyph.
1504 (layout_glyph_string): Adjust for the member change in MGlyph.
1505 (alloc_gstring): Intilize scracth_glyph to avoid
1506 compose_glyph_string on it.
1507 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1508 (mdraw_coordinates_position): Fix previous change.
1510 * internal-gui.h (glyph_category): New enum.
1511 (MGlyph): Change type of <category> to enum glyph_category.
1513 * face.c (mface__realize): Delete args langauge and charset.
1514 (mface__for_chars): Fix for the case that glyphs have different
1516 (mface__update_frame_face): Adjust for mface__realize change.
1518 * face.h (mface__realize): Adjust prototype.
1520 2004-10-05 Kenichi Handa <handa@m17n.org>
1522 * language.c (mlang__init): Add Akan.
1524 2004-10-04 Kenichi Handa <handa@m17n.org>
1526 * font-ft.c (add_font_info): Add instead of push the element.
1527 (ft_list_family): For generic fonts, try all
1528 substituted. families.
1530 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1531 (run_rule): Don't update cluster range here.
1532 (run_command): Update cluster range on appending a glyph.
1533 (run_otf): Update cluster range for glyphs generated by OTF.
1535 2004-10-02 Kenichi Handa <handa@m17n.org>
1537 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1539 2004-09-30 Kenichi Handa <handa@m17n.org>
1541 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1543 2004-09-30 Kenichi Handa <handa@m17n.org>
1545 * font.h: Include <fontconfig/fontconfig.h>.
1546 (MFTInfo): New member langset.
1547 (mfont__encoding_list): Extern it.
1549 * font.c (mfont__encoding_list): New function.
1550 (mdebug_dump_font_list): New function.
1552 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1553 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1555 (ft_family_list): New variable.
1556 (set_font_info): New arg basep. Callers changed.
1557 (fc_list): Check the return value of FcPatternGetString.
1558 (add_font_info): New arg plist. Callers changed. Update
1560 (ft_list_family): New function (merged fc_list and ft_list_all).
1561 (ft_select): Use ft_list_family.
1562 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
1564 (mfont__ft_init): Initialize above new variables.
1565 (mfont__ft_fini): Free ft_family_list.
1566 (STRDUP_LOWER): New macro.
1567 (set_font_info): Use STRDUP_LOWER.
1568 (ft_list_family): Avoid duplicate addition of font path. Use
1570 (fc_decode_prop): Fix typo.
1572 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1573 (xfont_registry_list): Change argument disp_info to frame.
1575 (xfont_list_all): New function.
1576 (xfont_list): If FONT is not NULL, check all fonts.
1578 2004-09-28 Kenichi Handa <handa@m17n.org>
1580 * m17n-X.c (MXFont, MXFontList): New types.
1581 (MDisplayInfo): Delete members font_registry_list,
1582 iso8859_1_family_list, iso10646_1_family_list, new members
1583 font_list, base_font_list.
1584 (free_display_info): Adusted for the change of MDisplayInfo.
1585 (xfont_driver): Initialize with xfont_list.
1586 (font_compare): New function.
1587 (build_font_list): Deleted.
1588 (xfont_registry_list): New function.
1589 (xfont_select): Use xfont_registry_list.
1590 (xfont_list): New function.
1591 (device_open): Adusted for the change of MDisplayInfo.
1593 * font-ft.c (add_font_info): New arg languages. Callers changed.
1594 (fc_list): Get languages from fonts..
1595 (ft_list_all): Renamed from ft_list. Callers changed.
1596 (ft_list): New function.
1597 (mfont__ft_driver): Initalize with ft_list.
1599 * font.c (mfont_list): New function.
1601 * font.h (struct MFontDriver): New member `list'.
1602 (MFTInfo): New member languages.
1604 * m17n-gui.h (mfont_list): Extern it.
1606 2004-09-27 Kenichi Handa <handa@m17n.org>
1608 * internal-gui.h (struct MGlyphString): Delete members mt,
1609 sub_width, sub_lbrearing, sub_rbearing, and region.
1611 * draw.c (MSubTextExtents): New type.
1612 (layout_glyphs): New arg extents. Set its members.
1613 (layout_glyph_string): Adjusted for the above change.
1614 (alloc_gstring): Don't set gstring->mt.
1615 (truncate_gstring): Call line_break function with mt instead of
1618 2004-09-22 Kenichi Handa <handa@m17n.org>
1620 * mtext.c (count_utf_16_chars): Count each code of invalid
1623 2004-09-19 Kenichi Handa <handa@m17n.org>
1625 * mtext.c (default_utf_16, default_utf_32): Rename them to
1626 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
1629 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
1632 2004-09-13 Kenichi Handa <handa@m17n.org>
1634 * draw.c (Mlatin): Don't declare it here.
1635 (visual_order): Fix reordering of combining characters.
1636 (compose_glyph_string): Fix detection of script.
1637 (layout_glyphs): Don't fix reordering of combining characters
1639 (layout_glyph_string): Pay attention to
1640 control->disable_overlapping_adjustment.
1641 (truncate_gstring): Include at least on character in a line.
1642 (get_gstring): Always scan one full line.
1643 (mdraw__init): Don't initialize Mlatin here.
1644 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
1645 have a font, use ascent/descent of an ASCII font. Allow
1646 ink_array_return and logical_array_return to be NULL.
1647 (mdraw_coordinates_position): Fix iteration.
1649 * font-ft.c (MFTtoProp): Member completely changed.
1650 (ft_to_prop): Adjusted for the above change.
1651 (ft_to_prop_size): Likewise.
1652 (set_font_info): Adjusted for the change of MFTtoProp.
1653 (fc_generic_family_list): New variable.
1654 (fc_list): Add special handling of generic font names.
1655 (mfont__ft_init): Adjusted for the change of MFTtoProp.
1656 Initialize fc_generic_family_list.
1657 (mfont__ft_fini): Don't free ft_to_prop. Free
1658 fc_generic_family_list.
1659 (FC_vs_M17N_font_prop): New type.
1660 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
1661 (fc_decode_prop, fc_encode_prop): New functions.
1662 (mfont__ft_parse_name): Use fc_decode_prop.
1663 (mfont__ft_unparse_name): Use fc_encode_prop.
1665 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
1666 (MWDevice): Add member realized_font_list.
1667 (free_display_info): Don't free disp_info->realized_font_list.
1668 (free_device): Free device->realized_fontset_list.
1669 (xft_find_metric): Use gstring->frame instead of rfont->frame.
1670 (device_open): Don't initialize disp_info->realized_font_list.
1671 (device_open): Initialize device->realized_font_list and set it to
1672 frame->realized_font_list.
1674 * fontset.c (try_font_group): New function.
1675 (mfont__lookup_fontset): Use try_font_group.
1677 * font.c (common_weight): Change the order of "regular".
1679 * face.c (Mlatin): Don't make it static.
1680 (mface__realize): Be sure to set work_gstring.frame.
1681 (mface__for_chars): Likewise.
1683 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
1686 * internal-gui.h (Mlatin): Extern it.
1688 * m17n-gui.h (MDrawControl): New member
1689 disable_overlapping_adjustment.
1691 2004-09-06 Kenichi Handa <handa@m17n.org>
1693 * font-flt.c (run_otf): Fix typo ('}'->']').
1695 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
1696 (COMBINING_PRECOMPUTED_P): New macros.
1698 * draw.c (layout_glyphs): Handle precomputed combining code.
1700 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
1701 precomupted combining code.
1703 2004-09-03 Kenichi Handa <handa@m17n.org>
1705 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
1708 2004-08-27 Kenichi Handa <handa@m17n.org>
1710 * face.c (mface_put_prop): If the new value is the same as the
1711 current one, don't increment frame->tick.
1713 2004-08-25 Kenichi Handa <handa@m17n.org>
1715 * fontset.c (mfontset): Initialize font_spec_list member.
1716 (mfontset_copy): Load fontset if necessary.
1718 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
1719 'metrics' to for C++.
1721 * draw.c (mdraw_glyph_info): Adjusted for the member name change
1724 2004-08-16 Kenichi Handa <handa@m17n.org>
1726 * Version 1.1.0 released.
1728 2004-08-13 Kenichi Handa <handa@m17n.org>
1730 * language.c (mlang__init): Add Dhivehi.
1732 * m17n-gui.c (Mx, Mfreetype): Delete it.
1733 (m17n_init_win): Don't initialize Mx and Mfreetype here.
1735 * m17n-gui.h (Mfreetype, Mxft): Extern them.
1736 (mfont_resize_ratio): Extern it.
1737 (MDrawGlyphInfo): New member logical_width;
1738 (MDrawGlyph): New type.
1739 (mdraw_glyph_list): Prototype adjusted.
1741 * m17n-X.c (xfont_open): Set type and fontp members.
1742 (xft_open): Likewise.
1744 * internal-gui.h (Mx, Mfreetype): Delete extern.
1746 * font.h (struct MRealizedFont): New member type and fontp.
1748 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1749 (Mx, Mfreetype): Declare here.
1750 (Mxft): New variable.
1751 (mfont_resize_ratio): New function.
1753 * font-ft.c (ft_open): Set type and fontp members.
1755 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
1758 2004-08-11 Kenichi Handa <handa@m17n.org>
1760 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
1763 2004-08-06 Kenichi Handa <handa@m17n.org>
1765 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
1768 * font-flt.c (run_otf): Print debugging information if necessary.
1770 2004-08-05 Kenichi Handa <handa@m17n.org>
1772 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
1773 positioning_type 5 and 6. Switch simplified.
1775 2004-08-04 Kenichi Handa <handa@m17n.org>
1777 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
1779 2004-08-02 Kenichi Handa <handa@m17n.org>
1781 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
1782 set val to 1 even if it is greater than 1.
1784 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
1786 2004-07-29 Kenichi Handa <handa@m17n.org>
1788 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
1789 debugging information.
1791 * internal.h (MDEBUG_PRINT5): New macro.
1793 * draw.c (layout_glyphs): Don't combine a zero width glyph with
1794 the previous one if the zero width glyph has left or right
1797 2004-07-26 Kenichi Handa <handa@m17n.org>
1799 * m17n-X.c (xft_render): Pay attention to members left_padding and
1800 right_padding of MGlyph.
1802 * draw.c (visual_order): Allocate one more elements for arrays as
1803 a workaround of fribidi bug.
1804 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
1805 instead of MGlyph->bidi_sensitive.
1806 (layout_glyph_string): Pay attentinon to
1807 control->orientation_reversed when padding at the head or tail.
1808 Fix adjustment of space glyph width.
1809 (get_gstring): If cursor_width or cursor_bidi is changed, don't
1812 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
1813 instead of MGlyph->bidi_sensitive.
1815 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
1817 2004-07-26 Kenichi Handa <handa@m17n.org>
1819 * draw.c (visual_order): Don't treat combined glyphs specially.
1820 (layout_glyphs): Don't get metrics glyphs that are already ready.
1821 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
1822 width with the previous one.
1823 (draw_background): Fix bar cursor position on a r2l glyph.
1825 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
1826 (run_rule): Fix place of updating cluster_begin_pos and
1827 cluster_end_pos here.
1828 (run_otf): Don't set left_padding.
1830 * font-ft.c (adjust_anchor): Type of argument `code' changed.
1832 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
1833 Fix handling of GPOS.
1834 (mfont__ft_drive_gpos): Delete this function.
1836 * font.h (mfont__ft_drive_otf): Renamed back from
1837 mfont__ft_drive_gsub.
1838 (mfont__ft_drive_gpos): Delete extern.
1840 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
1841 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
1843 2004-07-23 Kenichi Handa <handa@m17n.org>
1845 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
1846 the same bidi level.
1848 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
1850 2004-07-22 Kenichi Handa <handa@m17n.org>
1852 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
1854 2004-07-20 Kenichi Handa <handa@m17n.org>
1856 * draw.c (render_glyphs): Fix checking of g->code validity.
1858 * face.c (mface__realize): Set g.type.
1860 2004-07-18 Kenichi Handa <handa@m17n.org>
1862 * Makefile.am: Prepend ${top_srcdir} to all *.la in
1865 * m17n-gui.c (mframe): Print error message give by dlopen to
1868 2004-07-16 Kenichi Handa <handa@m17n.org>
1870 * draw.c (compose_glyph_string): Improve the way of deciding a
1871 script. For a character that doesn't have script property, use
1872 the last non-latin script.
1874 * font-ft.c (fc_list): Cancel previous change.
1875 (mfont__ft_init): Add more entries in ft_to_prop_name.
1877 2004-07-15 Kenichi Handa <handa@m17n.org>
1879 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
1880 previous or next character glyphs.
1882 2004-07-14 Kenichi Handa <handa@m17n.org>
1884 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
1885 of type GLYPH_SPACE.
1887 * fontset.c (mfont__lookup_fontset): If glyph type is
1888 GLYPH_SPACE, get codes for SPACE.
1890 * internal-gui.h (Mfont): Delete extern.
1892 * m17n-gui.h (Mfont): Delete duplicated extern.
1894 2004-07-13 Kenichi Handa <handa@m17n.org>
1896 * font-ft.c (DEVICE_DELTA): New macro.
1897 (adjust_anchor): New function.
1898 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
1900 (mfont__ft_drive_gpos): New function.
1902 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
1903 (FontLayoutContext): Delete member `rfont'.
1904 (run_otf): Set g->otf_cmd. Call
1905 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
1906 only whne HAVE_OTF is defined.
1908 * fontset.c: Include "config.h".
1910 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
1911 (MGlyph): New member otf_cmd.
1913 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
1914 (mfont__ft_drive_gpos): Extern it.
1916 * face.c: Include "config.h".
1918 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
1920 * input-gui.c: Include "config.h".
1922 * plist.c: Include "config.h".
1924 2004-07-06 Kenichi Handa <handa@m17n.org>
1926 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
1927 internal-gui.h: Cancel previous changes.
1929 * m17n-gd.h: Delete it.
1931 * Makefile.am (libm17n_core_la_LIBADD): New variable.
1932 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
1933 @XML2_LD_FLAGS@ to above.
1934 (libm17n_la_LIBADD): Add -ldl.
1935 (libm17n_la_LDFLAGS): Add -export-dynamic.
1936 (X_LD_FLAGS): Fix the order of linking.
1937 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
1938 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
1939 (libm17n_X_la_LDFLAGS): Add -module.
1940 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
1941 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1942 (libm17n_gd_la_LDFLAGS): Add -module.
1943 (include_HEADERS): Delete m17n-gd.h.
1945 2004-06-30 Kenichi Handa <handa@m17n.org>
1947 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
1948 (MDeviceLibraryInterface): Delete it.
1949 (register_device_library): Delete it.
1950 (m17n__device_library_list): Renamed from device_library_list.
1952 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
1953 (m17n_init_win): Adjust prototype.
1955 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
1956 (m17n_init_gd): New function.
1958 * m17n-gd.h: New file.
1960 * m17n-X.h: Include <m17n-gui.h>.
1961 (m17n_init_X): Extern it.
1962 (M17N_INIT): Redefine it.
1964 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
1965 (m17n_init_X): New function.
1967 * internal-gui.h (m17n__device_library_list): Extern it.
1968 (struct MDeviceDriver): New members initialized, init, and fini.
1970 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
1972 (libm17n_X_la_LIBADD): Delete aboves.
1973 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
1974 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1975 (libm17n_gd_la_LDFLAGS): Delete it.
1976 (include_HEADERS): Add m17n-gd.h.
1978 2004-06-25 Kenichi Handa <handa@m17n.org>
1980 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
1981 (libm17n_gd_la_LDFLAGS): Cancel previous change.
1983 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
1985 * font-ft.c (fc_list): If FcFontList finds no font, try
1988 * draw.c (compose_glyph_string): Terminate the last loop after
1989 doing default combining if necessary.
1991 2004-06-24 Kenichi Handa <handa@m17n.org>
1993 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
1995 * character.c (mchar_define_property): Add const to an arg.
1997 * charset.c (mchar_define_charset): Add const to an arg.
1999 * coding.c (MCodingSystem): Add const to an arg or decoder.
2000 (finish_decoding): Add const to an arg.
2001 (decode_coding_charset, decode_coding_utf_8)
2002 (decode_coding_utf_16, decode_coding_utf_32)
2003 (decode_coding_iso_2022, decode_coding_sjis)
2004 (mconv_define_coding): Likewise.
2006 * m17n-X.c (xft_find_metric): Delete unused variable.
2008 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
2011 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
2014 * mtext.c (count_utf_8_chars, count_utf_16_chars)
2015 (mtext__from_data, mtext_from_data): Add `const' to an arg.
2017 * mtext.h (mtext__from_data): Ajust prototype.
2019 2004-06-23 Kenichi Handa <handa@m17n.org>
2021 * draw.c (compose_glyph_string): Always get glyph codes by
2023 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
2024 (mdraw_glyph_list): New function.
2026 * font-flt.c (mfont__flt_run): Be sure to call
2027 rfont->driver->encode_char.
2029 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
2030 (ft_encode_char): Delete arg C.
2031 (ft_render): Don't call FT_Get_Char_Index.
2033 * font.c (mfont__encodable_p): Delete it.
2034 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2036 * font.h (struct MFontDriver): Delete arg C of encode_char.
2037 (mfont__encodable_p): Delete extern.
2039 * m17n-X.c (xfont_encode_char): Delete arg C.
2040 (xft_find_metric): Don't cal FT_Get_Char_Index.
2041 (xft_render): Likewise.
2043 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2045 (mdraw_glyph_list): Extern it.
2047 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2049 2004-06-22 Kenichi Handa <handa@m17n.org>
2051 * m17n-gui.h (mfontset_lookup): Extern it.
2053 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2055 * fontset.c (realize_fontset_elements)
2056 (free_realized_fontset_elements, update_fontset_elements): New
2058 (mfont__realize_fontset): Call realize_fontset_elements.
2059 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2060 (mfont__lookup_fontset): If a fontset was modified, update
2061 the realized fontset.
2062 (mfontset_modify_entry): Increment fontset->tick.
2063 (mfontset_lookup): New function.
2065 2004-06-21 Kenichi Handa <handa@m17n.org>
2067 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2069 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2070 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2071 length of source text 0.
2073 2004-06-21 Kenichi Handa <handa@m17n.org>
2075 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2076 (compare): Pay attention to format other than utf-8.
2077 (copy): Delete this function.
2078 (count_by_utf_8, count_by_utf_16, insert): New functions.
2079 (count_utf_16_chars): Fix handling of a surrogate pair.
2080 (find_char_forward, find_char_backward): Likewise.
2081 (mtext__from_data): Delete unnecessary check. Fix number of
2083 (mtext_from_data): Don't count items.
2084 (mtext_ref_char): Optimize the code.
2085 (mtext_set_char): Pay attention to format other than utf-8.
2086 (mtext_cat_char): Likewise.
2087 (mtext_dup): Don't call copy, instead do allocation here.
2088 (mtext_cat): Call insert instead of copy.
2089 (mtext_ncat): Likewise.
2090 (mtext_cpy): Delete character at first and call insert instead of
2092 (mtext_ncpy): Likewise.
2093 (mtext_copy): Likewise.
2094 (mtext_duplicate): Call insert instead of copy.
2095 (mtext_del): Pay attention to format other than utf-8.
2096 (mtext_ins): Simply call insert.
2097 (mtext_ins_char): Pay attention to format other than utf-8.
2098 (mtext_tok): Call insert instead of copy.
2099 (mtext_text): Call UNIT_BYTES.
2101 * textprop.c (mtext__adjust_plist_for_change): New function.
2103 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2104 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2105 (CHAR_UNITS_AT): Fix typo.
2106 (CHAR_UNITS_BY_HEAD): Fix typo.
2107 (STRING_CHAR_AND_UNITS): Fix typo.
2109 * internal.h (MTEXT_READ_ONLY_P): New macro.
2111 * mtext.h (mtext__replace): Delete the extern.
2112 (mtext__adjust_foramt): Adjust prototype.
2114 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2115 if possible. Otherwise make a copy of mmt.
2117 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2120 2004-06-18 Kenichi Handa <handa@m17n.org>
2122 * character.h (CHAR_STRING_UTF16): Fix syntax.
2124 2004-06-16 Kenichi Handa <handa@m17n.org>
2126 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2127 (libm17n_X_la_LIBADD): Delete it.
2128 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2130 * m17n-X.c (device_open): Add parens in `if' condition.
2132 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2133 (DEC_POSITION): Likewise.
2134 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2136 2004-06-15 Kenichi Handa <handa@m17n.org>
2138 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2141 * draw.c (compose_glyph_string): If langauge is specified, call
2142 mface__for_chars even if a text is all latin. Fix condition for
2143 setting non_ascii_found.
2145 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2147 * m17n.h (minput_char_to_key): Delete extern.
2149 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2151 * m17n-gui.c (null_device_open): Set several members of frame.
2153 2004-06-14 Kenichi Handa <handa@m17n.org>
2155 * m17n-gui.h (minput_event_to_key): Delete extern.
2157 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2159 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2161 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2163 2004-06-08 Kenichi Handa <handa@m17n.org>
2165 * character.c (mchar_put_prop): Don't increment the ref-count of
2168 2004-06-04 Kenichi Handa <handa@m17n.org>
2170 * m17n-core.c (mdebug__register_object): New function.
2171 (mdebug__unregister_object): Likewise.
2173 * internal.h (mdebug__register_object, mdebug__unregister_object):
2175 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2178 * charset.c (mcharset__load_from_database): Don't call
2179 mconv__register_charset_coding here.
2181 * coding.c (find_coding): Get a real name from an element of
2182 coding_definition_list.
2183 (mconv__register_charset_coding): Set the real name at the top of
2185 (mcoding__load_from_database): Likewise.
2186 (mconv_list_codings): Adjusted for the above change.
2188 2004-06-03 Kenichi Handa <handa@m17n.org>
2190 * coding.c (find_coding): Find by canonicalized name. Don't have
2191 to modify the element of coding_definition_list by
2193 (mconv__define_coding_from_charset): Delete it.
2194 (mconv__register_charset_coding): Canonicalize sym.
2195 (mcoding__load_from_database): Register plist modified by
2198 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2200 * font-ft.c (ft_open): Fix setting of rfont->descent.
2202 2004-06-02 Kenichi Handa <handa@m17n.org>
2204 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2205 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2206 (xlfd_unparse_name): Renamed from xfont_build_name.
2207 (mfont__init): Initialized Mfontconfig.
2208 (mfont__free_realized): Unconditionally unref rfont->info.
2209 (mfont__select): Free `this' if it's not best.
2210 (mfont__open): Don't check frame->realized_font_list.
2211 (mfont__parse_name_into_font): New function.
2212 (Mfontconfig): New variable.
2213 (mfont_from_name): Call mfont_parse_name.
2214 (mfont_name): Call mfont_unparse_name.
2215 (mdebug_dump_font): Likewise.
2217 * font.h (struct MFontDriver): Delete members parse_name and
2219 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2220 (mfont__parse_name_into_font): Extern it.
2222 * font-ft.c: Include "symbol.h".
2223 (close_ft): Unconditionally free filename and charmap_list of
2225 (ft_open): Duplicate base->filename. Increment ref-count of
2226 ft_info->charmap_list. Free ft_info->charmap_list and
2227 ft_info->filename on error.
2228 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2230 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2232 (enum xlfd_field_idx): Moved to font.c.
2233 (split_font_name, build_font_name): Likewise.
2234 (build_font_list): Call mfont__parse_name_info_font.
2235 (xfont_open): Call mfont__unparse_name. Free name.
2236 (xfont_parse_name, xfont_build_name): Moved to font.c
2237 (xft_select): Prototype deleted.
2238 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2239 Call mfont_pase_name.
2241 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2242 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2245 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2248 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2250 2004-06-01 Kenichi Handa <handa@m17n.org>
2252 * fontset.c (mfontset_modify_entry): Pay attention to the case
2253 that fontset->font_spec_list is NULL.
2255 2004-05-31 Kenichi Handa <handa@m17n.org>
2257 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2259 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2261 * font.c (mfont__select): Print score the a font for debugging.
2263 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2265 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2266 kanji_sym and kana_sym.
2268 2004-05-28 Kenichi Handa <handa@m17n.org>
2270 * Makefile.am (VINFO): New variable.
2271 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2272 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2274 2004-05-27 Kenichi Handa <handa@m17n.org>
2276 The following chanages are to make device dependent functions
2277 accessible only from MDeviceDriver structure, and to add GD and
2278 null device drivers. Font drivers get also device dependent.
2280 * m17n.c (m17n_init): Increament shell_initialized.
2281 (m17n_fini): Decremented shell_initialized.
2283 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2285 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2286 (Mwidget, Mcolormap, Mx): Extern them.
2288 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2289 (free_frame): Call frame->driver->close instead of
2291 (DLOPEN_SHLIB_EXT): New macro.
2292 (MDeviceLibraryInterface): New type.
2293 (device_library_list): New variable.
2294 (register_device_library): New function.
2295 (null_device): New variable.
2296 (null_device_close, null_device_get_prop)
2297 (null_device_realize_face, null_device_free_realized_face): New
2299 (null_driver): New variable.
2300 (null_device_init, null_device_fini, null_device_open): New
2302 (null_interface): New variable.
2303 (Mfreetype, Mdevice): Declare them.
2304 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2305 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2306 Mwin__Close_Device. Register drivers for Mx and Mgd.
2307 (m17n_fini_win): Decremented win_initialized. Call "fini"
2308 function of all opened devices. Don't call mwin__fini.
2309 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2311 (mframe): Handle Mdevice key of PLIST.
2312 (mframe_get_prop): Call frame->device->get_prop instead of
2313 mwin__device_get_prop.
2315 * m17n-gd.c: New file.
2317 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2318 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2320 * m17n-core.c (m17n_init_core): Increate core_initialized.
2321 (m17n_fini_core): Decremented core_initialized.
2323 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2324 (Mcolormap): Don't extern them here.
2326 * m17n-X.c (FRAME_DEVICE): New macro.
2327 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2328 (free_display_info): Use MPLIST_DO.
2329 (free_device): Free rface->info.
2330 (xft_close): Delete it.
2331 (device_init): Renamed from mwin__init.
2332 (device_fini): Renamed from mwin__fini.
2333 (device_open): Renamed from mwin__open_device.
2334 (x_driver): New variable.
2335 (MXFontInfo): Delete member frame, add member display.
2336 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2337 Don't declare them here.
2339 * internal-gui.h (MDeviceType): New enum.
2340 (MWDefice): Delete it.
2341 (struct MFrame): Change type of device to void *. New members
2342 device_type, driver, font_driver_list.
2343 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2344 (MDeviceDriver): New type.
2345 (Mx, Mgd, Mfreetype): Extern them.
2346 (mwin__XXX): Delete all of them.
2348 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2350 (win_destroy_ic): Likewise.
2351 (adjust_window_and_draw): Likewise.
2352 (win_callback): Likewise.
2353 (Mxim): Declare it here.
2354 (minput_event_to_key): Call M_CHECK_READABLE.
2356 * fontset.c (mfont__lookup_fontset): Delete local variable
2359 * font.h (struct MFontDriver): Delete member close, add members
2360 parse_name and build_name.
2361 (mfont__driver_list): Delete extern.
2362 (mfont__close): Delete extern.
2364 * font.c (mfont__init): Don't set mfont__driver_list.
2365 (mfont__fini): Don't unref mfont__driver_list.
2366 (mfont__select): Try font drivers in frame->font_driver_list. Set
2367 driver member of a realized font.
2368 (mfont__close): Delete it.
2369 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2370 functions of the default frame.
2372 * font-ft.c (close_ft): Check ft_info->ft_face and work
2374 (add_font_info): Allocate ft_info by M17N_OBJECT.
2375 (ft_close): Delete it.
2376 (mfont__ft_driver): Don't set ft_close.
2377 (ft_select): Increment ref-count of best_font.
2378 (ft_open): Decremented ref-count of base. On error, call
2379 FT_Done_Face and free ft_info.
2380 (ft_find_metric): Always use XXX_MONO in load_flags.
2381 (ft_render): Fix setting of width. Call
2382 frame->driver->draw_points instead of mwin__draw_points.
2383 (ft_to_prop): Don't set mfont__driver_list.
2384 (mfont__ft_fini): Just unref ft_info.
2386 * face.c (mface__init): Exchange foreground and background of
2387 mface__default. Call mface_put_prop to set hline of
2389 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2390 (mface__free_realized): Don't call mwin__free_realized_face.
2392 * draw.c (Mdepth): Don't declare it here.
2393 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2394 (render_glyphs, render_glyph_string): Likewise.
2395 (mdraw__init): Don't set Mdepth.
2396 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2398 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2400 (mdraw_text_items): Check FRAME is writable.
2401 (mdraw_per_char_extents): Implement body.
2403 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2405 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2406 (GUI_SOURCES): Delete it.
2407 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2408 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2409 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2410 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2411 (linkgui_LDADD): Set to libm17n-gui.la
2412 (linkgui_LDFLAGS): New target.
2413 (SRC): Include ${libm17n_gui_la_SOURCES} and
2414 ${libm17n_gd_la_SOURCES}.
2416 2004-05-24 Kenichi Handa <handa@m17n.org>
2418 * draw.c (draw_background): Don't draw background even if
2419 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2421 2004-05-22 Kenichi Handa <handa@m17n.org>
2423 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2425 2004-05-20 Kenichi Handa <handa@m17n.org>
2427 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2429 * m17n-gui.c: Include "plist.h".
2430 (mframe): If PLIST is NULL, initialize it to emply plist.
2432 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2433 (xft_driver): New variable.
2434 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2435 (xft_find_metric, xft_render): New function.
2436 (mwin__init): Adjusted for the new mfont__driver_list.
2437 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2438 generated face to PARAM.
2439 (mwin__realize_face): Fix setting of box colors. Don't call hook
2441 (mwin__draw_hline): New function.
2442 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2443 (mwin__xft_render): Delete these function.
2445 * internal-gui.h (struct MFrame): New member tick.
2446 (struct MGlyphString): New member tick.
2447 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2448 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2449 (mwin__xft_render): Delete extern.
2451 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2452 (mfontset): Always increment the reference count of returned
2455 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2456 (MFTInfo): Moved to font.h.
2457 (ft_iso8859_1_font_list): Delete this variable.
2458 (set_font_info): Don't set font->property[MFONT_TYPE].
2459 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2460 (add_font_info): Change type to void.
2461 (fc_list): Change anme from xft_list. Caller changed. Include
2462 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2463 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2464 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2465 (close_ft): Don't call mwin__xft_close. Unref
2466 ft_info->extra_info.
2467 (ft_open): Don't setup ft_info->fontname. Don't call
2469 (ft_find_metric): Don't call mwin__xft_get_metric.
2470 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2471 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2472 (mfont__ft_init): Adjusted for new mfont__driver_list.
2473 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2475 * font.c (mfont__driver_list): Make it MPlist.
2476 (mfont__init): Adjust initialization of mfont__driver_list.
2477 (mfont__fini): Free mfont__driver_list.
2478 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2479 (mfont__select): Adjusted for the new mfont__driver_list.
2481 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2482 (mfont__drirver_list): Adjust prototype.
2483 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2485 * face.h (struct MFace): Delete member realized_face_list, add
2487 (struct MRealizedFace): Delete member need_update
2488 andnofont_rface, add member non_ascii_list.
2489 (mface__update_frame_face): Extern it.
2491 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2493 (get_hline_create, get_box_create): New functions.
2494 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2496 (free_face): Cancep previous change. Free face->frame_list.
2497 (serialize_hline): Do nothing if hline->width is zero.
2498 (serialize_box): Do nothing if box->width is zero.
2499 (mface__init): Setup all properties of mface__default.
2500 (mface__fini): Free hline_prop_list and box_prop_list.
2501 (mface__realize): Cancel previous change. Update
2502 face->frame_list. Setup rface->non_ascii_list.
2503 (mface__for_chars): Update rface->non_ascii_list.
2504 (mface__free_realized): Free rface->non_ascii_list.
2505 (mface__update_frame_face): New function.
2506 (mface): Initialize face->frame_list.
2507 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2509 (mface_merge): Likewise.
2510 (mface_put_prop): If key is Mhline or Mbox, get value by
2511 get_hline_create or get_box_create respectively.
2512 (mface_put_prop): Update frame->tick and call
2513 mface__update_frame_face if necessary.
2514 (mface_update): Do nothing if func is noop_hook.
2516 * draw.c (render_glyphs): If a font is not found, use
2517 mwin__draw_empty_boxes.
2518 (alloc_gstring): Initialize gstring->tick.
2519 (get_gstring): Check gstring->tick.
2521 2004-05-17 Kenichi Handa <handa@m17n.org>
2523 * face.c (find_realized_face): Return value changed. If RFONT is
2524 NULL, avoid unnecessary checking.
2525 (free_face): Free face->realized_face_list.
2526 (mface__realize): Adjusted for the change of find_realized_face.
2527 If it returns a realized face that needs update, free it and
2528 realize a new one. Push a new realized face to
2529 frame->realized_face_list instead of appending.
2530 (mface__for_chars): Adjusted for the change of find_realized_face.
2531 Short cut if the required font is in rface->ascii_rface.
2532 (mface_put_prop): Free old value if necessary. Set need_update
2533 member of realized faces to 1.
2535 * face.h (struct MFace): Delete member tick, add member
2537 (struct MRealizedFace): Delete member tick, add member
2540 2004-05-13 Kenichi Handa <handa@m17n.org>
2542 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2544 2004-05-12 Kenichi Handa <handa@m17n.org>
2546 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2548 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2549 parse it XftNameParse.
2551 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2552 (all_fonts_scaned): New variable.
2553 (set_font_info): FAMILY may be Mnil.
2554 (add_font_info): Argument changed.
2555 (xft_list): Call add_font_info in it.
2556 (ft_list): Likewise.
2557 (ft_select): Make it work in the case family is Mnil.
2558 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2559 (mfont__ft_fini): Set all_fonts_scaned to 0.
2561 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2562 that is failed to open.
2564 2004-05-10 Kenichi Handa <handa@m17n.org>
2566 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2567 device's depth is 1 (i.e. monochrome).
2569 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2570 to work around the problem of libtool.
2572 * font-ft.c: Include <freetype/ftbdf.h>.
2573 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2575 (mfont__ft_init): Initialize them.
2576 (ft_iso8859_1_font_list): New variable.
2577 (set_font_info): Detect a font containing iso8859-1 glyphs and
2578 register it in ft_iso8859_1_font_list. If the font is not
2579 scalable, assume it as BDF or PCF font and setup SIZE and RESY
2580 properties of the font from its properties.
2581 (add_font_list): If the font is not scalable, check if it is BDF
2582 or PCF font. If not, ignore it.
2583 (ft_select): If FAMILY is Mnil, return NULL only if the requested
2584 registry is not iso8859-1.
2585 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2586 ft_iso8859_1_font_list.
2587 (ft_find_metric): If the font is not scalable, assume it as BDF
2588 or PCF, and get a metric from its properties.
2589 (mfont__ft_fini): Free ft_iso8859_1_font_list.
2591 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
2593 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2594 (libm17n_la_LDFLAGS): Delete it.
2595 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2596 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2598 2004-05-06 Kenichi Handa <handa@m17n.org>
2600 * draw.c (compose_glyph_string): Fix previous change.
2602 2004-04-30 Kenichi Handa <handa@m17n.org>
2604 * font-ft.c (ft_list): Delete unused variable `result'.
2605 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
2607 2004-04-27 Kenichi Handa <handa@m17n.org>
2609 * m17n-X.c: Include config.h
2610 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
2611 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
2612 (MWDevice) [HAVE_XFT2]: New member xft_draw.
2613 (FRAME_CMAP, FRAME_VISUAL): New macros.
2614 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
2615 (xfont_driver): Make it static.
2616 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
2617 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
2618 info->xft_color_back.
2619 (MXftFontInfo) [HAVE_XFT2]: New type.
2620 (mwin__xft_close) [HAVE_XFT2]: New function.
2621 (mwin__xft_open) [HAVE_XFT2]: New function.
2622 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
2623 (mwin__xft_render) [HAVE_XFT2]: New function.
2625 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2626 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
2627 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
2630 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2632 * font-ft.c: Don't include FT_FREETYPE_H here.
2633 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
2634 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
2635 (MFTInfo): New member charmap_index.
2636 (MFTInfo) [HAVE_XFT2]: New member xft_info.
2637 (check_otf_filename): Renamed from check_filename. Return value
2639 (ft_set_property): This function deleted.
2640 (set_font_info): New function.
2641 (add_font_list): Argument changed. Add multiple fonts.
2642 (xft_list) [HAVE_XFT2]: New function.
2643 (ft_list) [not HAVE_XFT2]: New function.
2644 (ft_select): Add code for Xft.
2645 (close_ft): Likewise.
2646 (ft_open): Likewise.
2647 (ft_find_metric): Likewise.
2648 (ft_encode_char): Likewise.
2649 (ft_render): Likewise.
2651 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
2653 2004-04-26 Kenichi Handa <handa@m17n.org>
2655 * textprop.c (mtext_attach_property): Declare the return type as
2658 2004-04-21 Kenichi Handa <handa@m17n.org>
2660 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
2662 2004-04-09 Kenichi Handa <handa@m17n.org>
2664 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
2666 (load_command): Setup above members.
2668 2004-04-05 Kenichi Handa <handa@m17n.org>
2670 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
2672 2004-03-30 Kenichi Handa <handa@m17n.org>
2674 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
2677 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
2678 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
2680 2004-03-29 Kenichi Handa <handa@m17n.org>
2682 * Version 1.0 Patch Level 2 released.
2684 2004-03-29 Kenichi Handa <handa@m17n.org>
2686 * charset.c (make_charset): Set charset->fully_loaded and
2687 charset->simple correctly. Don't try to get charset->min_char and
2688 charset->max_char for a charset of method subset and superset.
2689 Don't load a mapping file here.
2690 (mcharset__init): Set unified_max.
2691 (mcharset__load_from_database): Free a working plist.
2693 * coding.c (mcoding__fini): Free all malloced data.
2695 * input-gui.c (win_create_ic): Set control.as_image for preediting
2698 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
2699 `count') to initialize the array.
2701 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
2704 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
2706 (mwin__create_window): Fix bug of setting a background pixel of a
2708 (mwin__adjust_window): Clear the window before drawing.
2710 * m17n-core.c (mdebug__report_object): Free array->objectes if
2712 (m17n_init_core): Don't set report_header_printed to 0 here.
2713 Fix debugging information.
2714 (m17n_fini_core): Set report_header_printed to 0 here.
2716 * m17n-core.h (mplist_deserialize): Extern it.
2718 * m17n-gui.c (m17n_fini_win): Fix debugging information.
2720 * m17n.c (m17n_fini): Fix debugging information.
2722 * mtext.c (mtext__adjust_foramt): New function.
2724 * mtext.h (mtext__adjust_foramt): Extern it.
2726 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2728 * plist.h (mplist__deserialize): Don't extern it.
2730 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
2731 elements of symbol_table to NULL. Report about created and freed
2732 symbols if MDEBUG_FINI is set.
2734 2004-03-22 Kenichi Handa <handa@m17n.org>
2736 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2738 * m17n.c (m17n_init): Fix the way of checking merror_code.
2740 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2742 2004-03-22 Kenichi Handa <handa@m17n.org>
2744 * fontset.c (realize_font_group): Adjust the font size by
2745 mfont__resize before selecting a font.
2747 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2749 2004-03-19 Kenichi Handa <handa@m17n.org>
2751 * Version 1.0 Patch Level 1 released.
2753 2004-03-19 Kenichi Handa <handa@m17n.org>
2755 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
2757 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
2759 2004-03-19 Kenichi Handa <handa@m17n.org>
2761 Re-apply the changes forgotten in the released version.
2763 * charset.c (mcharset__load_from_database): Call
2764 mchar_define_charset.
2766 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
2767 (mconv_encode_range): Put Mcoding text property.
2769 2004-03-18 Kenichi Handa <handa@m17n.org>
2771 * draw.c (Mdepth): New variable.
2772 (visual_order): Delete unused local var `pos'.
2773 (compose_glyph_string): Fix for the case that gstring->glyphs is
2774 realloced. Stop generating glyphs at TO. Fix handling of
2776 (layout_glyphs): Get metrics of all glyphs in advance. Set
2777 lbearing and rbearing of base of composition glyph correctly.
2778 Handle left-overhang glyphs correctly.
2779 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
2781 (dump_combining_code): Change the defualt off_x character to ".".
2782 (mdraw__init): Initialize Mdepth.
2784 * face.c (work_gstring): New variable
2785 (mface__init): Initialize work_gstring.
2786 (mface__fini): Free work_gstring.glyphs.
2787 (mface__realize): Don't handle videomode property here. Adjusted
2788 for the change of mfont__get_metric.
2789 (mface__for_chars): Adjusted for the change of mfont__get_metric.
2791 * face.h (enum face_gc): Moved to m17n-X.c.
2793 * font.h (struct MFontDriver): Arguments of find_metric changed.
2794 (mfont__select): Prototype adjusted.
2795 (mfont__get_metric): Likewise.
2796 (mfont__ft_drive_otf): Likewise.
2797 (mfont__flt_run): Likewise.
2799 * font.c (mfont__select): New argument layouter. If layouter is
2800 different in the registered font, make a new copy of realized
2802 (mfont__get_metric): Argument changed. Get metrics of multiple
2804 (mfont_find): Call mfont__select with layouter as Mnil.
2806 * font-flt.c (FontLayoutContext): New member rfont.
2807 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
2808 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
2810 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
2812 (NUM_POINTS): New macro.
2813 (MPointTable): New type.
2814 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
2815 (mfont__ft_drive_otf): New argument rfont.
2817 * fontset.c (realize_font_group): Adjusted for the changed of
2819 (check_fontset_element): This function deleted.
2821 * input-gui.c (adjust_window_and_draw): Locate a preedit window
2822 off the parent window if the preedit text is zero length.
2824 * internal-gui.h (struct MFrame): New members foreground,
2825 background, videomode, font.
2826 (struct MGlyphString): New member anti_alias.
2827 (MDrawPoint): New type.
2828 (mwin__draw_bitmap): Prototype deleted.
2829 (mwin__draw_points): Prototype added.
2831 * m17n-gui.h (MDrawControl): New member anti_alias.
2833 * m17n-gui.c (free_frame): Free frame->font.
2834 (mframe): Set the fontset of frame->face to the default fontset.
2836 * m17n-X.c (RGB_GC): New type.
2837 (enum gc_index): Renamed from enum face_gc. Member names changed.
2839 (struct MWDevice): Members foreground and background deleted. New
2840 member scratch_gc, gc_list.
2841 (DEFAULT_FONT, FALLBACK_FONT): New macros.
2842 (free_device): Free GCs in device->gc_list.
2843 (get_rgb_gc): New function.
2844 (get_gc): Renamed and argument changed from get_color.
2845 (get_gc_for_anti_alias): New function.
2846 (xfont_find_metric): Arguments changed. Get metrics of multiple
2848 (set_region): Argument changed. Caller changed.
2849 (xfont_render): Allways set a font in gc.
2850 (x_error_handler, x_io_error_handler): Define only if
2851 X_SET_ERROR_HANDLER is defined.
2852 (mwin__open_device): Create device->scratch_gc. Set members
2853 foreground, background, and videomode of frame. Call
2854 XSetErrorHandler and XSetIOErrorHandler only if
2855 X_SET_ERROR_HANDLER is defined.
2856 (struct gc_list): Deleted.
2857 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
2858 (mwin__realize_face): Adjusted for the change of the format of
2859 rface->info and the charge of set_region.
2860 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
2861 (mwin__draw_box): Likewise.
2862 (mwin__draw_bitmap): This function deleted.
2863 (mwin__draw_points): New function.
2864 (mwin__verify_region): Adjusted for the change of the format of
2865 rface->info and the charge of set_region.
2866 (mwin__create_window): Inherit backgound pixel from parent.
2867 (mwin__dump_gc): Adjusted for the change of the format of
2870 2004-03-16 Kenichi Handa <handa@m17n.org>
2872 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
2874 * input.c (M_key_alias): New variable.
2875 (handle_key): Try M_key_alias property of a key too.
2876 (minput__init): Initialize M_key_alias. Give that property to
2877 symbols in one_char_symbol. Fix bug of initializing
2880 * draw.c (compose_glyph_string): Don't handle
2881 ignore_formatting_char here. Include formatting characters in the
2882 range processed by a FTL.
2883 (layout_glyph_string): Handle ignore_formatting_char here.
2885 2004-03-12 Kenichi Handa <handa@m17n.org>
2887 * input-gui.c (win_create_ic): Enable bidi in status control.
2889 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
2891 2004-03-09 Kenichi Handa <handa@m17n.org>
2893 * input.c (load_input_method): If title is not specified, use the
2894 input method name as title.
2896 * m17n-X.c (get_color): Make it static.
2897 (xim_create_ic, xim_destroy_ic, x_error_handler)
2898 (x_io_error_handler): Likewise.
2900 2004-03-01 Kenichi Handa <handa@m17n.org>
2902 * Version 1.0 released.
2905 Copyright (C) 2003, 2004
2906 National Institute of Advanced Industrial Science and Technology (AIST)
2907 Registration Number H15PRO112
2909 This file is part of the m17n library.
2911 The m17n library is free software; you can redistribute it and/or
2912 modify it under the terms of the GNU Lesser General Public License
2913 as published by the Free Software Foundation; either version 2.1 of
2914 the License, or (at your option) any later version.
2916 The m17n library is distributed in the hope that it will be useful,
2917 but WITHOUT ANY WARRANTY; without even the implied warranty of
2918 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2919 Lesser General Public License for more details.
2921 You should have received a copy of the GNU Lesser General Public
2922 License along with the m17n library; if not, write to the Free
2923 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA