1 2006-01-16 Kenichi Handa <handa@m17n.org>
3 * Version 1.3.1 released.
5 2006-01-16 Kenichi Handa <handa@m17n.org>
7 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
8 simulating anti-aliasing.
10 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
11 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
13 2006-01-12 Kenichi Handa <handa@m17n.org>
15 * input.c (get_surrounding_text): Always pop ic->plist.
16 (reset_ic): Don't reset ic->plist.
18 2006-01-10 Kenichi Handa <handa@m17n.org>
20 * input.c (preedit_commit): For debugging, print only commiting
21 charactes. Don't set ic->candidate_show to 0.
22 (handle_key): Don't run branch-actions just by shifting to the
24 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
27 2006-01-07 Kenichi Handa <handa@m17n.org>
29 * input.c (load_branch): Confirm that maps is not NULL.
31 2006-01-05 Kenichi Handa <handa@m17n.org>
33 * input-gui.c (win_filter): Try to convert arg to key only when
36 * plist.c (read_integer_element): If '#' and '-' are followed by
37 non-integer-constituent, read them as a part of a symbol.
38 (read_symbol_element): New arg C.
39 (read_element): Adjust args to read_symbol_element.
41 * input.c (load_macros): On overwriting a macro, free the old
43 (minput__init): Store Mmap in load_im_info_keys.
44 (minput_get_title_icon): If the input method has no title, be sure
46 (minput_get_description): If the input method has no description,
47 be sure to return NULL.
48 (minput_get_variables): Fix documentation.
49 (handle_key): Pay attention to the case that key is Mnil.
50 (filter): Likewise. Fix handling of such symbol as S-A.
52 2005-12-22 Kenichi Handa <handa@m17n.org>
54 * Version 1.3.0 released.
56 2005-12-22 Kenichi Handa <handa@m17n.org>
58 * font-ft.c (ft_list): If the specified font has no property,
61 2005-12-20 Kenichi Handa <handa@m17n.org>
63 * character.c (mchar_get_prop): Check char_prop_list.
64 (mchar_put_prop, mchar_get_prop_table): Likewise.
66 2005-12-18 Kenichi Handa <handa@m17n.org>
68 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
69 file name sans language.
71 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
73 * input.c: Fix typo in comments.
75 2005-12-14 Kenichi Handa <handa@m17n.org>
77 * input.c (minput_get_title_icon): Check the default icon for the
80 2005-12-13 Kenichi Handa <handa@m17n.org>
82 * input.c (Mless_equal, Mgreater_equal): New variables.
83 (parse_expression, resolve_expression, parse_action_list)
84 (take_action_list): Handle the aboves.
85 (filter): Treat key S-X as X.
86 (minput__init): Initialize Mless_equal and Mgreater_equal.
87 (minput_get_title_icon): New function.
89 * m17n.h (minput_get_title_icon): Extern it.
91 * database.c (get_database_filename): Return a filename instead of
93 (load_database): Adjusted for the above change.
94 (mdatabase__load_for_keys): Likewise.
95 (mdatabase__find_file): New function.
97 * database.h (mdatabase__find_file): Extern it.
99 * font.h (mfont__resize): Delete extern.
101 * font.c (mfont__list): Check resize ratio.
102 (mfont__resize): Delete it.
103 (mfont_resize_ratio): Include the code of mfont__resize.
105 * font-ft.c (ft_open): Check resize ratio.
107 * m17n-X.c (xfont_open): Check resize ratio.
108 (xft_open): Likewise.
110 2005-12-07 Kenichi Handa <handa@m17n.org>
112 * input.c (take_action_list): If take_action_list return -1,
114 (handle_key): Likewise.
116 * face.c (mface__for_chars): When font is specified and layouter
117 is found for it, if the layouter doesn't support one of a
118 character, use a face sans layouter for it.
120 2005-12-06 Kenichi Handa <handa@m17n.org>
122 * fontset.c (mfont__lookup_fontset): If only a fallback font is
123 found, don't use it for more than one character.
125 2005-12-05 Kenichi Handa <handa@m17n.org>
127 * face.c (mface__realize): Set rfont->layouter to Mnil.
128 (mface__for_chars): Fix handling of layouter.
130 * character.h (mchar__define_prop): Extern it.
132 * database.c (update_database_list): Call mchar__define_prop if
135 * character.c (mchar__init): Don't call mchar_define_property.
136 Instead just initialize property keys.
137 (mchar__fini): Free char_prop_list only if it's not NULL.
138 (mchar__define_prop): New function.
139 (mchar_define_property): Call mchar__define_prop.
141 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
144 2005-12-02 Kenichi Handa <handa@m17n.org>
146 * language.c (mlang__init): Handle extra chars.
148 * m17n-gui.h (mfont_check): Adjust prototype.
150 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
151 (xfont_check_capability): New function.
152 (xft_driver): Specify xft_check_capability.
153 (xft_check_capability): New function.
155 * font-ft.c (M0_3): Delete it.
157 (ft_get_charmaps): Refer to M0.
158 (fc_parse_pattern): Fix previous change.
159 (ft_list_language): Check also extra chars.
160 (ft_check_otf): Define it even if HAVE_OTF is undef.
161 (ft_check_lang): Check the result of FcLangSetHasLang against
162 FcLangDifferentLang. Check also extra chars.
163 (ft_list_capability): Delete ifdef HAVE_OTF.
164 (ft_select): Likewise.
165 (ft_open): Improve debug information.
166 (ft_check_capability): New function.
167 (mfont__ft_driver): Specify ft_check_capability.
168 (mfont__ft_init): Initialize M0.
170 * fontset.c (get_font_from_group): New function.
171 (mfontset__get_font): New function.
173 * fontset.h (mfontset__get_font): Extern it.
175 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
176 (mfont__fini): Delete ifdef HAVE_OTF.
177 (free_font_capability): Likewise.
178 (mfont__get_capability): Likewise.
179 (mfont__check_capability): New function.
180 (mfont_check): Change the order of arguments. Use
183 * font.h (struct MFontDriver): New member check_capability.
184 (MFontCapability): Delete ifdef HAVE_OTF.
185 (mfont__check_capability): Extern it.
187 * face.c (mface__realize): Fix handling of FONT arg.
188 (mface__for_chars): Fix handling of explicitly specified font.
190 2005-11-25 Kenichi Handa <handa@m17n.org>
192 * font-flt.c (run_command): Print debug info for
195 * draw.c (layout_glyphs): Fix handling of left/right_padding.
197 * face.c (mface__for_chars): Check rfont before accessing the
200 2005-11-21 Kenichi Handa <handa@m17n.org>
202 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
205 * fontset.c (fontset_table): New variable.
206 (free_fontset): Call M17N_OBJECT_UNREGISTER.
207 (mfont__fontset_init): Add fontset_table as an object array.
208 (mfont__realize_fontset): Ref FONTSET.
209 (mfont__free_realized_fontset): Unref REALIZED->fontset.
210 (mfontset): Call M17N_OBJECT_REGISTER.
211 (mfontset_copy): Likewise.
213 * input.c (handle_key): For debugging, print information about
215 (filter): Add an alias for Meta and Alt modifiers.
216 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
218 (minput__init): Initialize them.
219 (parse_expression): New function.
220 (resolve_expression): New function.
221 (parse_action_list): Handle expressions by parse_expression.
222 (take_action_list): Handle expressions by resolve_expression.
223 (parse_nested_list_value): Fix previous change.
224 (resolve_command): Fix handling of the return value of
227 2005-11-18 Kenichi Handa <handa@m17n.org>
229 * font-ft.c (ft_check_otf, otf_script_list): Define only when
231 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
233 (ft_select): Likewise.
235 * font.c (mfont_list): Fix for the case that FONT is NULL.
236 (OTF_tag): Delete it.
237 (load_otf_script_list): Define only when HAVE_OTF is defined.
238 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
241 * draw.c (truncate_gstring): Be sure to truncate at
242 glapheme-cluster boundary.
244 2005-11-11 Kenichi Handa <handa@m17n.org>
246 * input.c (delete_surrounding_text): Clear cache if necessary.
248 2005-11-09 Kenichi Handa <handa@m17n.org>
250 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
251 glyph prev is also supported by the current flt.
253 2005-11-08 Kenichi Handa <handa@m17n.org>
255 * m17n-X.c (xft_render): Cancel previous change.
257 2005-11-07 Kenichi Handa <handa@m17n.org>
259 * input.c: Include <stdlib.h>.
260 (get_surrounding_text, delete_surrounding_text)
261 (get_preceding_char, get_following_char): New functions.
262 (integer_value): New arg surrounding. If it is nonzero, try to
263 get a surrounding character. Callers changed.
264 (take_action_list): Check `value' before setting an element.
265 (destroy_ic): Unref ic_info->preceding_text and
266 ic_info->following_text.
267 (minput__init): Initialize Minput_get_surrounding_text and
268 Minput_delete_surrounding_text.
269 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
271 (filter): Unref ic_info->preceding_text and
272 ic_info->following_text.
274 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
277 * input.h (MInputContextInfo): New members preceding_text and
280 2005-11-04 Kenichi Handa <handa@m17n.org>
282 * input.c (parse_nested_list_value): Fix handling of the global
284 (get_nested_list): Get global definitions by load_partial_im_info.
285 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
286 MInputCandidatesChanged.
287 (take_action_list): Likewise.
288 (reset_ic): Likewise.
289 (create_ic): Don't pay special attention to
290 Mcandidates_group_size.
291 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
292 (minput_set_variable): Get a definition of varible by
293 mplist_find_by_value, not mplist_get.
295 * m17n.h (enum MInputCandidatesChanged): New enum.
297 2005-11-01 Kenichi Handa <handa@m17n.org>
299 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
301 (mwin__destroy_window): If xft_draw's drawable is win, change it
302 to device->drawable before destroying win.
304 2005-10-31 Kenichi Handa <handa@m17n.org>
306 * input.c (load_im_info): Fix adding of state.
308 * m17n-core.c (m17n_fini_core): Fix reporting of module
311 * m17n.c (m17n_fini): Fix reporting of module finalization.
313 * m17n-gui.c (m17n_init_win): Fix reporting of module
316 2005-10-29 Kenichi Handa <handa@m17n.org>
318 * input.c (get_candidate_list): Fix the timing of referring plist.
320 2005-10-28 Kenichi Handa <handa@m17n.org>
322 * input.c (load_branch): Ignore an undefined map name.
323 (load_im_info): Set im_info->title from `name' only if it's not
325 (shift_state): Always update ic->status.
326 (adjust_candidates): Renamed from adjust_candidate_command.
327 Argument changed. Caller changed.
328 (get_candidate_list, regularize_action): New functions.
329 (take_action_list): Use them. On handling Munhandle, don't set
331 (handle_key): If KEY is not handled by MAP, and MAP has
332 branch_actions, perform them.
334 * database.c (mdatabase__fini): Free dir_info->filename;
336 2005-10-20 Kenichi Handa <handa@m17n.org>
338 * input.c (marker_code): Accept '@@'.
339 (integer_value): Handle '@@'.
340 (parse_action_list): Accept a symbol argument.
341 (take_action_list): Resolve the symbol argument. Handle the
344 2005-10-18 Kenichi Handa <handa@m17n.org>
346 * input.c: Include "charset.h".
347 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
349 (MIMState): New member (M17NObject control).
350 (lookup_nested_list, set_nested_list, parse_nested_list_value)
351 (get_nested_list, resolve_variable): New functions.
352 (integer_value): New arg (MPlist **value). Set it to the plist
353 element containing the value.
354 (resolve_command): New function.
355 (load_translation): New arg (MPlist *map_actions).
356 (load_branch): New args language and name. If `keylist' is a
357 symbol, resolved that as a command name.
358 (free_map): New arg top. Free map->map_actions only if top is
360 (free_state): New function.
361 (load_state): New arg name.
362 (im_info_list): New variable.
363 (free_im_info, get_im_info_by_tags): New functions.
364 (load_im_info): Arg key changed to plist. Handle `include'.
365 Return (MInputMethodInfo *).
366 (preedit_commit): Ref ic->candidate_list.
367 (get_select_charset, adjust_candidate_command): New functions.
368 (take_action_list): Handle `include'. Adjust candidate action
369 properly. Handle control variables `candidates-charset' and
370 `candidates-group-size'.
371 (open_im): Use get_im_info.
372 (create_ic): Get global variables.
373 (load_partial_im_info): New function.
374 (get_im_info): New function.
375 (check_command_keyseq, check_command_list, check_variable_list):
377 (minput__init): Don't handle M_database_hook and Mdetail_text.
378 Initialize M_candidates, Mcandidates_group_size,
380 (parse_variable_list, get_variable_list, parse_command_list)
381 (get_command_list): Delete them.
382 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
383 (minput__fini): Simply unref command_list and variable_list.
384 (minput_get_description): Adjusted for the new form of description.
385 (minput_get_commands): Use get_nested_list.
386 (minput_assign_command_keys): Likewise.
387 (minput_get_variables, minput_set_variable): Likewise.
389 * input.h (MInputMethodInfo): New members im and maps.
391 * database.h (M_database_hook): Delete extern.
392 (MDatabaseHookFunc): Delete extern.
393 (mdatabase__check): Extern it.
395 * database.c: Include <glob.h>.
396 (MAX_TIME): New macro.
397 (Masterisk): New variable.
398 (get_database_stream): Argument changed to (MDatabaseInfo *).
400 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
401 (find_database): New function.
402 (update_database_list): New function.
403 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
404 calling update_database_list.
405 (mdatabase__check): New function.
406 (mdatabase_find): Use update_database and find_database. Don't
407 handle MDatabaseHookFunc.
408 (mdatabase_list): Call update_database at first.
409 (mdatabase_define): Adjusted for the change of mdb->extra_info.
410 (MDatabaseList): New type.
412 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
414 * m17n.h (Mdetail_text): Delete extern.
416 * m17n-core.h (mplist_conc): Delete extern.
418 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
420 (mplist_conc): Renamed to mplist__conc.
421 (mplist__pop_unref): New function.
423 2005-10-14 Kenichi Handa <handa@m17n.org>
425 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
427 (read_element): If keys is an empty plist, return any element
429 (dump_plist_element): Check if plist is nested.
430 (mplist_conc): Always ref tail.
431 (mplist_set): If key is a managing key, ref val in advance.
433 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
434 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
435 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
438 * fontset.c (free_fontset): Unref fontset_list if necessary.
439 (mfont__fontset_fini): Don't free fontset_list. Unref
441 (mfont__realize_fontset): Initialize request.
442 (mfontset): Ref default_fontset or fontset only if necessary.
443 (mfontset_copy): Don't ref copy.
445 * draw.c (render_glyphs): Check gend->type before checking
448 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
449 unrefed plists to NULL.
451 2005-10-04 Kenichi Handa <handa@m17n.org>
453 * textprop.c (mtext_serialize): Be sure to make mt
454 MTEXT_FORMAT_UTF_8 and NULL terminated.
456 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
458 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
460 2005-10-03 Kenichi Handa <handa@m17n.org>
462 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
463 is not at the beginning of line.
465 2005-09-22 Kenichi Handa <handa@m17n.org>
467 * input.c: Include <sys/stat.h> and <unistd.h>.
468 (Minclude, Mcommit, Munhandle): New variables.
469 (minput__init): Initialize them. Push only Mstate to
470 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
471 (parse_action_list): Allow integer arg for undo. Handle Mcommit
473 (load_input_method): Handle "include" directive. If no states are
475 (shift_state): If state_name is Mt, shift back to the previous
476 state. Call preedit_commit to commit preedit text.
477 (preedit_commit): New function.
478 (take_action_list): Improve debug printing. Handle commit and
480 (handle_key): Check the return value of take_action_list. Don't
481 take branch_actions just after changing to the root map.
482 (reset_ic): Reset all ic_info members.
483 (filter): When a key is not handled, just move ic_info->keys
484 instead fo calling reset_ic.
485 (load_im_info): If key is not Mstate, push Mmap to
487 (MDatabaseStatList): New type.
488 (imdir_stat_list): New variable.
489 (input_method_hook): Don't cancel the hook. Check the
490 modification time of directories.
491 (minput__fini): Free imdir_stat_list;
493 * input.h (MInputContextInfo): New member prev_state.
495 * m17n-core.h (mplist_conc): Extern it.
497 * plist.c (mplist_conc): New function.
499 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
501 * font.h (MRealizedFont): New member average_width.
503 * font-ft.c (ft_open): Set rface->average_width.
505 * font.c (xlfd_unparse_name): Print '*' before registry name.
507 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
508 (xfont_open): Set rfont->average_width.
509 (xft_open): Likewise.
510 (device_open): Initialize disp_info->AVERAGE_WIDTH.
512 * internal-gui.h (struct MFrame): New member average_width.
514 * m17n-gui.c (mframe): Fix setting of frame->rfont.
515 (mframe_get_prop): Return the average_width of a font.
517 * face.c (mface__realize): Set rface->average_width.
518 (mface__update_frame_face): Set frame->average_width.
520 * face.h (MRealizedFace): New member average_width.
522 2005-09-19 Kenichi Handa <handa@m17n.org>
524 * font.c (xlfd_unparse_name): New arg full_xlfd.
525 (mfont__encode_char): Use shortcut only for X core fonts.
526 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
527 (mfont_put_prop): Handle `language' property.
528 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
529 Print file can capability info too.
531 * m17n-core.c (mdebug__output): New variable.
532 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
533 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
534 (m17n_fini_core): Close mdebug__output if it's not stderr.
536 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
537 (xfont_open): Handle baseline_offset.
538 (xfont_find_metric): Likewise.
539 (xfont_render): Likewise.
540 (xft_open): Likewise.
541 (xft_render): Likewise.
543 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
544 (mdebug__output): Extern it.
545 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
546 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
547 (MDEBUG_DUMP): New macro.
548 (MDEBUG_PRINT_TIME): Print to medebug__output.
550 * font.h (MRealizedFont): New member baseline_offset.
552 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
554 (fc_weight_table): Add FC_WEIGHT_REGULAR.
555 (ft_list_family): Check alias.
556 (ft_list_language): If language is "en", don't try to the second
558 (ft_default_list): New variable.
559 (ft_list_default): New function.
560 (ft_select): If family is not specified, try only the default
561 fonts. Treat the weights normal and medium same.
562 (ft_open): Fix debug message. If registry is not specified, try
563 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
564 (ft_find_metric): Likewise.
565 (ft_render): Likewise.
566 (ft_list): Fix debug message. Accept the registring iso8859-1.
567 If family is not specified, try only the default fonts.
569 * face.c (mface__realize): Fix logic of opening a font.
571 2005-09-16 Kenichi Handa <handa@m17n.org>
573 * face.c (mface__realize):
575 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
578 * input.c (shift_state): Fix the condition of taking init actions.
579 (take_action_list): Fix handling of pushback action.
580 (handle_key): Don't change key while checking its alias.
581 (minput__init): Initialize new variables.
582 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
585 2005-09-12 Kenichi Handa <handa@m17n.org>
587 * mtext.c (mtext__uppercase): Add proper open/close parens.
588 (mtext_titlecase): Add proper casting.
590 * input.c (parse_action_list): Handle the case that the arg is a
591 key sequence (MText or MPlist).
592 (take_action_list): Likewise.
593 (shift_state): Shorter debug message.
594 (handle_key): Terminate a debug message by "\n".
595 (reset_ic): Don't take initial actions here.
596 (minput_open_im): Print a debug message.
597 (minput_close_im): Likewise.
598 (minput_create_ic): Likewise.
599 (minput_destroy_ic): Likewise.
601 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
603 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
606 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
607 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
610 * character.c: Add Japanese documentation for
611 mchar_get_prop_table ().
613 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
615 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
616 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
617 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
619 (init_case_conversion): New function.
620 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
621 (uppercase_precheck, lowercase_precheck, final_sigma)
622 (after_soft_dotted, more_above, before_dot, after_i)
623 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
625 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
627 * plist.c (read_mtext_element): Fix previous change.
629 2005-09-05 Kenichi Handa <handa@m17n.org>
631 * plist.c (read_mtext_element): Handle \uXXXX notation.
633 * internal.h (MTABLE_MALLOC): Don't use a local variable.
634 (MTABLE_ALLOCA): Change the name of local variable.
636 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
637 HAVE_FREETYPE are defined.
639 * m17n-X.c: Check HAVE_X11.
641 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
642 directory listing libraries.
643 (noinst_PROGRAMS): Define it only in maintainer mode.
645 2005-09-02 Kenichi Handa <handa@m17n.org>
647 * m17n-gui.h (mdraw_line_break_option): Extern it.
649 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
650 end of the first glyph.
651 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
653 (mdraw_line_break_option): New variable.
654 (mdraw_default_line_break): Use mtext_line_break.
656 * mtext.h (wordseg_func_table): Don't extern it.
657 (mtext__wseg_fini): Extern it.
659 * mtext.c: Don't include word-thai.h.
660 (wordseg_func_table): Delete this variable.
661 (mtext__init): Don't initialize above. Don't call
662 mtext__word_thai_init.
663 (mtext__fini): Don't free wordseg_func_table. Call
664 mtext__wseg_fini instead fo mtext__word_thai_fini.
665 (MTextWordsegFunc): Don't typedef it.
666 (mtext__word_segment): Moved to mtext-wseg.c.
668 * m17n-core.h (enum MTextLineBreakOption): New enum.
669 (mtext_line_break): Extern it.
671 * mtext-wseg.c: New file.
673 * mtext-lbrk.c: New file.
675 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
676 add mtext-lbrk.c and mtext-wseg.c.
678 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
679 the case that head is NULL.
681 2005-09-01 Kenichi Handa <handa@m17n.org>
683 * word-thai.c (wordseg_propertize): If the property value is nil,
684 don't make the property no-merge.
685 (thai_wordseg): Don't require *from and *to are set a priori. Pay
686 attention to the case that they are NULL.
687 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
690 * character.c (mchar_get_prop_table): New function.
692 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
694 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
695 (mchar_get_prop_table): Extern it.
697 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
698 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
700 * internal.h (enum MTextCoverage): New enum.
701 (MText): New member coverage.
703 * mtext.c (FORMAT_COVERAGE): New macro.
704 (insert): Copy mt2->coverage.
705 (mtext__from_data): Initialize mt->coverage.
706 (mtext__adjust_format): Update mt->coverage.
707 (mtext): Initialize mt->coverage.
708 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
709 Update mt->coverage if necessary.
710 (mtext_duplicate): Copy mt->coverage.
711 (mtext_insert, mtext_replace): New functions.
712 (mtext_dup): Use mtext_duplicate.
713 (mtext__word_segment): Don't set *from and *to if a word
714 segmentation funcion is not found.
715 (mtext_ins_char): Fix typo.
717 2005-08-25 Kenichi Handa <handa@m17n.org>
719 * font.h (MFont): New member for_full_width.
721 * font.c (compare_font_score): Prefer a font of not
724 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
725 registry charset of a font is one of CJK charsets.
727 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
728 supports some of CJK.
730 2005-08-24 Kenichi Handa <handa@m17n.org>
732 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
734 * m17n-gui.c (null_device_open): Check Mresolution param and set
737 * m17n-gd.c (device_open): Check Mresolution param and set
740 * m17n-X.c (MWDevice): New member resy.
741 (xfont_open): Set ascent, descent, and max_advance members of
743 (xft_open): Likewise.
744 (device_open): Compare also screen_num to find a device. Set
745 device->resy and frame->dpi.
747 * internal-gui.h (MFrame): New member dpi.
749 * font.h (MRealizedFont): New member max_advance.
751 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
752 (mfont__init): Don't initialize Mascent, Mdescent.
753 (Mascent, Mdescent): Delete these variables.
754 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
755 Mfont_descent instead of Mascent and Mdescent.
756 (mfont_put_prop): Allow negative size.
757 (mfont_find): Handle the case of spec->size < 0. Fix previous
759 (mfont_list): Handle the case of spec->size < 0.
760 (mfont_check): Likewise.
762 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
763 (fc_get_pattern): Handle the case of font->size < 0.
764 (ft_open): Set ascent, descent, and max_advance members of rfont.
765 (ft_find_metric): Improve rounding.
766 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
769 * face.c (mface__realize): Handle the case of font->size < 0.
771 2005-08-22 Kenichi Handa <handa@m17n.org>
773 * coding.c (MConverterStatus): Change the member buf to union.
774 (mconv_buffer_converter): Add const to the arg buf.
775 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
776 (mconv_decode): Adjusted for the change of MConverterStatus.
777 (mconv_encode_range): Likewise.
779 * m17n.h (mconv_buffer_converter): Prototype adjusted.
780 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
782 2005-08-20 Kenichi Handa <handa@m17n.org>
784 * m17n-gui.h (mfont_from_name): Prototype adjusted.
785 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
787 * m17n-X.c (xfont_open): Set members ascent, descent, and
788 max_advance of rfont.
789 (xft_open): Likewise.
791 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
793 (mfont__ft_parse_name): Add const to the arg name.
795 * font.c (xlfd_parse_name): Add const to the arg name. Call
796 mfont__set_property instead of mfont_set_spec. Set font->spacing.
797 (xlfd_unparse_name): Handle spacing.
798 (mfont__init): Initialize new variables.
799 (mfont__id): Handle spacing.
800 (mfont__merge): Likewise.
801 (mfont__set_spec): This function deleted.
802 (mfont__parse_name_into_font): Add const to the arg name. Fix the
803 condition of calling mfont__ft_parse_name.
804 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
805 (mfont_get_prop): Handle properties spacing, ascent, descent,
807 (mfont_find): Return a realized font.
808 (mfont_from_name): Add const to the arg name.
810 * font.h (enum MFontProperty): New member MFONT_SPACING.
811 (enum MFontSpacing): New enum.
812 (MFont): New members spacing and max_advance.
813 (mfont__ft_parse_name): Prototype adjusted.
814 (mfont__set_spec): Extern deleted.
815 (mfont__parse_name_into_font): Prototype adjusted.
817 2005-08-19 Kenichi Handa <handa@m17n.org>
819 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
821 * font.c (mfont_list): If FONT is null, use a temporary font.
822 (mfont_parse_name): Add const to the arg name.
824 2005-08-18 Kenichi Handa <handa@m17n.org>
826 * word-thai.c: Surround code by #ifdef and #endif to escape from
829 * font-ft.c: Mostly re-written.
831 * font-flt.c (FontLayoutCmdOTF): This type deleted.
832 (FontLayoutCmd): Type of the member otf changed..
833 (load_otf_command): Adjusted for the format change of otf command.
834 (load_command): Likewise.
835 (free_flt_command): Unref cmd->body.otf.
836 (run_otf): Ajusted for the type change of otf_cmd.
837 (run_command): Ajusted for the type change of otf_cmd. On
838 debugging, print ctx->combining_code.
839 (mfont__flt_run): Initialize ctx's members code_offset,
840 combining_code, and left_padding to 0.
842 * face.h (struct MRealizedFace): New member font.
843 (mface__realize): Prototype adjusted.
845 * face.c (find_realized_face): New arg font.
846 (find_realized_face): Adjusted for the change of MFont.
847 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
848 (mface__fini): Don't call mdebug__report_object.
849 (mface__realize): New arg font.
850 (mface__for_chars): Adjusted for the change of mfont__encode_char.
851 Optimize the latin case.
852 (mface__free_realized): Free rface->font.
853 (mface__update_frame_face): Adjusted for the change of mface__realize.
854 (mface_equal): New function.
856 * draw.c (Mcommon): New variable.
857 (visual_order): Args to mfont__encode_char changed.
858 (compose_glyph_string): Handle Mfont text property.
859 (layout_glyphs): Adjusted for the change of MFont.
860 (mdraw__init): Initialize Mcommon.
861 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
863 * font.h (enum MFontType): Members completely changed.
864 (enum MFontProperty): Move MFONT_SIZE to the tail.
865 (enum MFontSource): New enum.
866 (struct MFont): New members type, source, sizes, file, capability,
868 (struct MRealizedFont): Type of member font changed. Members
869 score, status, and encoding deleted.
870 (MFontScore): New type.
871 (MFontList): Member changed.
872 (struct MFontDriver): New member has_char. Types of members
874 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
875 (Mapple_roman): Extern them.
876 (OTF_Tag): Typedefed if not HAVE_OTF.
877 (enum MFontOpenTypeTable): New enum.
878 (MFontCapability): New type.
879 (mfont__ft_drive_otf): Prototype adjusted.
880 (mfont__score): Extern deleted.
881 (mfont__merge): Extern it.
882 (mfont__has_char): Extern it.
883 (mfont__encode_char): Prototype adjusted.
884 (mfont__open): Extern it.
885 (mfont__set_spec): Prototype adjusted.
886 (mfont__get_capability): Extern it.
888 * font.c: Include "fontset.h".
889 (M_font_capability, M_font_list, M_font_list_len): New variables.
890 (font_score_priority): Change order of initial elements.
891 (font_score_shift_bits): Fix array size.
892 (common_weight): Add "thin", "semibold", and "heavy".
893 (common_stretch): Add "ultracondensed", "extracondensed",
894 "extraexpanded", and "utltraexpand".
895 (font_weight_regular, font_weight_normal, font_weight_medium): New
897 (gen_font_name): This function deleted.
898 (find_encoding): Set font->encoding.
899 (OTF_tag): New function.
900 (otf_script_list): New variable.
901 (load_otf_script_list): New function.
902 (find_script_from_otf_tag): New function.
903 (xlfd_parse_name): Set font->type and font->source.
904 (mfont__free_realized): Free chains rfonts.
905 (font_score): Renamed from mfont__score.
906 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
907 (Mapple_roman): New variables.
908 (mfont__init): Initilize new variables. Initalize
909 default_encoding.encoding_name and
910 default_encoding.encoding_charset to Municode_full and
911 mcharset__unicode. Use SAFE* macros for allocating filepath
913 (mfont__fini): Free otf_script_list.
914 (mfont__id): New function.
915 (mfont__match_p): Check also capability member of MFont.
916 (mfont__merge): New funciton.
917 (mfont__set_spec_from_face): Set type and source members.
918 (mfont__set_spec_from_plist): Set capability and type members.
919 (mfont__select): Argument changed.
920 (mfont__available): New function.
921 (compare_font_score): New function.
922 (mfont__list): New function.
923 (mfont__open): Return a realized font.
924 (mfont__resize): Adjusted for the change of MFont.
925 (mfont__has_char): New function.
926 (mfont__encode_char): Argument changed.
927 (mfont__set_spec): Argument changed.
928 (free_font_capability): New function.
929 (mfont__get_capability): New function.
930 (MFontfile): New variable.
931 (mfont_get_prop): Adjusted for the change of MFont.
932 (mfont_put_prop): Likewise.
933 (mfont_set_selection_priority): Fix the way of setting
934 font_score_priority[].
935 (mfont_find): Use mfont__list instead of mfont__select.
936 (mfont_resize_ratio): Adjusted for the change of MFont.
937 (mfont_list): Use mfont__list.
938 (mfont_check): New function.
939 (font_score): Make it static.
941 * fontset.h (mfont__realize_fontset): Prototype adjusted.
942 (mfont__lookup_fontset): Likewise.
944 * fontset.c (struct MFontset): Delete member font_spec_list.
945 (struct MRealizedFontset): Type of member spec changed. New
947 (load_font_group): Arg spec_list deleted.
948 (load_fontset_contents): Adjusted for the change of fontset_def.
949 (free_fontset): Fix the way of freeing fontset elements.
950 (realize_fontset_elements): Argument changed.
951 (get_per_script): New function.
952 (free_realized_fontset_elements): Fix the way of feeing rfontset
954 (update_fontset_elements): Fix args to realize_fontset_elements.
955 (mfont__realize_fontset): New arg spec.
956 (try_font_list): New function.
957 (try_font_group): New arg request. Use try_font_list.
958 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
960 (mfontset): Adjusted for the change of MFontset.
961 (mfontset_copy): Likewise. Don't share plists.
962 (mfontset_modify_entry): Adjusted for the change of MFontset.
963 (mfontset_lookup): Call get_per_script.
964 (mdebug_dump_fontset): Print also the address of fonts.
966 * input.c (shift_state): Don't reset ic_info->vars.
967 (take_action_list): Call MDEBUG_PRINT fore calling
970 * internal-gui.h (MFontDriver): Don't typedef it here.
972 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
973 (MXFont): This type deleted.
975 (struct _MFontX): New struct.
976 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
977 (MDisplayInfo): Member base_font_list deleted.
978 (DEFAULT_FONT): Definition changed.
979 (FALLBACK_FONT): This maclr deleted.
980 (free_display_info): Adjusted for the change of MDisplayInfo.
981 (free_device): Argument to mfont__free_realized changed.
982 (xfont_driver): Adjusted for the change of MFontDriver.
983 (xfont_registry_list): Use MFontX instead of MXFont.
984 (MRealizedFontX): Renamed from MXFontInfo.
985 (xfont_select): Return the font found first.
986 (close_xfont): Change MXFontInfo to MRealizedFontX.
987 (xfont_open): Return the realized font.
988 (xfont_find_metric): Get xfont from rfont->fontp.
989 (xfont_has_char): New function.
990 (xfont_encode_char): Adjusted for the argument change.
991 (xfont_render): Get xfont from rfont->fontp.
992 (xfont_list): Adjusted for the argument change.
993 (MRealizedFontXft): Renamed from MXftFontInfo.
994 (xft_driver): Ajusted for the change of MFontDriver.
995 (close_xft): Change MXtfFontInfo to MRealizedFontXft
996 (xft_open_font): Argument changed.
997 (xft_open): Argument changed. Return the realized font.
998 (xft_find_metric): Get xft_font from rfont->fontp.
999 (xft_has_char, xft_encode_char): New functions.
1000 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
1001 font if not yet opened.
1002 (device_open): Don't set frame->font.
1004 * m17n-gd.c (gd_font_driver): Adjusted for the change of
1006 (gd_font_open): New function.
1007 (gd_render): Don't use the local variable ft_info.
1008 (device_init): Adjusted for the change of gd_font_driver.
1010 * textprop.c (mtext__prop_init): Initialize text_property_table.
1011 Call M17N_OBJECT_ADD_ARRAY.
1012 (mtext__prop_fini): Don't call mdebug__report_object.
1014 * plist.c (mplist__init): Initialize plist_table.
1015 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
1016 (mplist__fini): Don't call mdebug__report_object.
1018 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
1019 (mtext__fini): Don't call mdebug__report_object.
1020 (MTEXT_FORMAT_UTF_16): Correct type.
1021 (mtext_data): New function.
1022 (mtext_text): Fix calculation of limit and args to
1025 * language.c: Include "plist.h".
1026 (M_script_lang_list): New variable.
1027 (mlang__init): Read languages and their information from m17n
1029 (mlanguage__list): New function.
1030 (Miso639_1, Miso639_2): New variables.
1032 * language.h (mlanguage__list): Extern it.
1034 * database.c (get_database_stream): Use SAFE_* macros for
1035 allocating and freeing path.
1036 (mdatabase__init): Likewise.
1038 * symbol.c (msymbol__fini): Don't free symbols here.
1039 (msymbol__free_table): New function.
1040 (msymbol_is_managing_key): New function.
1042 * symbol.h (msymbol__free_table): Extern it.
1043 (msymbol__list): Extern it.
1045 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
1047 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
1048 (struct _M17NObjectArray): New member name and next.
1049 (mdebug__add_object_array): Extern it.
1050 (M17N_OBJECT_ADD_ARRAY): New macro.
1051 (mdebug__report_object): Don't extern it.
1053 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
1055 * m17n-gui.c (free_frame): Don't free frame->font.
1056 (null_device_fini): Fix code for freeing
1057 null_device.realized_font_list.
1058 (m17n_fini_win): Free interface.
1059 (mframe): Cast the return value of dlsym. Set frame->font here.
1060 (mframe_get_prop): Check frame->rface->rfont before accessing the
1063 * m17n-gui.h (Mfontfile): Extern it.
1064 (mfont_check): Extern it.
1065 (mface_equal): Extern it.
1067 * m17n-core.c: Include "symbol.h".
1068 (report_header_printed): This variable deleted.
1069 (object_array_root): New variable.
1070 (report_object_array): New function.
1071 (mdebug__report_object): This function deleted.
1072 (mdebug__add_object_array): New function.
1073 (m17n_init_core): Call mchartable_init () before mtext_init ().
1074 (m17n_fini_core): Call report_object_array (if necessary) and
1075 msymbol__free_atable at the end.
1077 * m17n-core.h (msymbol_is_managing_key): Extern it.
1078 (mtext_data): Extern it.
1079 (MTEXT_FORMAT_UTF_16): Correct type.
1080 (M17NLIB_MINOR_VERSION): Changed to 3.
1081 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
1083 * chartab.c (mchartable__init): Initalize chartable_table.count.
1084 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
1085 mdebug__report_object.
1087 2005-05-26 Kenichi Handa <handa@m17n.org>
1089 * m17n.h (Miso639_1, Miso639_2): Extern them.
1091 * symbol.h (msymbol__list): Extern it.
1093 * symbol.c (msymbol__list): New function.
1095 2005-05-19 Kenichi Handa <handa@m17n.org>
1097 * input-gui.c (minput__win_init): Don't change the value of
1100 2005-05-16 Kenichi Handa <handa@m17n.org>
1102 * m17n-core.c (m17n_object): Be sure to initialize all members.
1104 * font-ft.c (fc_decode_prop): Fix args to msymbol.
1106 2005-05-09 Kenichi Handa <handa@m17n.org>
1108 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1110 2005-04-27 Kenichi Handa <handa@m17n.org>
1112 * language.c (mlang__init): Add "an" (Aragonese).
1114 * word-thai.c: Add support for libthai.
1115 (mtext__word_thai_init): Initialize wordseg library conditionaly.
1116 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1118 * mtext.c: Include "word-thai.h" conditionaly.
1119 (mtext__init): Call mtext__word_thai_init conditionaly.
1120 (mtext__fini): Call mtext__word_thai_fini conditionaly.
1122 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1123 not WORDCUT_LD_FLAGS.
1125 2005-04-19 Kenichi Handa <handa@m17n.org>
1127 * word-thai.c (wordseg_propertize): Always unref the attached
1129 (thai_wordseg): Don't unref the property.
1131 2005-04-18 Kenichi Handa <handa@m17n.org>
1133 * word-thai.c: Include stdlib.h.
1134 (wordseg_propertize): Add dummy function for the case that wordcut
1135 library doesn't exist.
1136 (wordseg_propertize): Fix for old wordcut library.
1138 2005-04-16 Kenichi Handa <handa@m17n.org>
1140 * word-thai.c: Include <stdio.h>.
1142 2005-04-15 Kenichi Handa <handa@m17n.org>
1144 * draw.c: Include mtext.h.
1145 (linebreak_table, M_break_at_space, M_break_at_word)
1146 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1147 (compose_glyph_string): Check POS before getting Mface text
1149 (truncate_gstring): Give correct TO arg to line_break function.
1150 (GET_LB_TYPE): New macro.
1151 (find_break_backward, find_break_forward): New functions.
1152 (mdraw__init): Initialize the above new variables.
1153 (mdraw__fini): Free linebreak_table.
1154 (mdraw_default_line_break): Use find_break_backward and
1157 * word-thai.c: New file.
1159 * word-thai.h: New file.
1161 * mtext.c: Include word-thai.h.
1162 (wordseg_func_table): New variable.
1163 (mtext__init): Initialize wordseg_func_table and call
1164 mtext__word_thai_init.
1165 (mtext__fini): Call mtext__word_thai_fini, free
1167 (MTextWordsegFunc): New type.
1168 (mtext__word_segment): New function.
1170 * mtext.h (wordseg_func_table): Extern it.
1171 (mtext__word_segment): Extern it.
1173 * m17n.c (m17n_init): Fix typo (== -> =).
1175 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1176 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1178 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1179 (MTEXTPROP_VAL): New macros.
1181 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1183 2005-04-07 Kenichi Handa <handa@m17n.org>
1185 * database.c (load_chartable): Fix pursing of symbol name.
1187 2005-03-24 Kenichi Handa <handa@m17n.org>
1189 * m17n.c (m17n_init): Fix typo (== -> =).
1191 2005-03-11 Kenichi Handa <handa@m17n.org>
1193 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1195 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1197 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1200 2005-03-09 handa <handa@m17n.org>
1202 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1203 calling m17n_init ().
1205 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1206 calling m17n_init_core ().
1208 2005-02-28 Kenichi Handa <handa@m17n.org>
1210 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1213 2005-02-17 Kenichi Handa <handa@m17n.org>
1215 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1216 (M_description, M_command, M_variable): New variables.
1217 (load_im_info_keys): New variables.
1218 (load_im_info, check_command_keyseq, get_description_advance)
1219 (parse_command_list, get_command_list, parse_variable_list)
1220 (get_variable_list, input_method_hook): New functions.
1221 (command_list, variable_list): New variables.
1222 (minput__init): Put input_method_hook to Minput_method.
1223 Initialize M_description, M_command, M_variable, Mdetail_text,
1224 load_im_info_keys, command_list, variable_list.
1225 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1226 (Mdetail_text): New variable.
1227 (minput_get_description, minput_get_commands)
1228 (minput_assign_command_keys, minput_get_variables)
1229 (minput_set_variable): New functions.
1231 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1232 (minput_assign_command_keys, minput_get_variables)
1233 (minput_set_variable): Extern them.
1235 * plist.c (UNGETC): Just decrement st->p.
1236 (read_mtext_element): New arg skip.
1237 (read_integer_element): Likewise.
1238 (read_symbol_element): Likewise.
1239 (read_element): New arg KEYS.
1240 (mplist__from_plist): Don't increment ref-count of NULL object.
1241 (mplist__from_file): New arg KEYS.
1242 (mplist_put): Don't increment ref-count of NULL object.
1243 (mplist_add): Likewise.
1244 (mplist_push): Likewise.
1245 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1247 * plist.h (mplist__from_file): Prototype adjusted.
1249 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1250 (get_database_stream): New function.
1251 (load_database): Use get_database_stream.
1252 (M_database_hook): New variable
1253 (mdatabase__init): Initialize M_database_hook.
1254 (mdatabase__load_for_keys): New function.
1255 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1257 (mdatabase_define): Free mdb->extra_info if necessary.
1259 * database.h (mdatabase__dir_list, M_database_hook)
1260 (mdatabase__load_for_keys): Extern them.
1261 (MDatabaseHookFunc): New type.
1263 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1265 2004-12-27 Kenichi Handa <handa@m17n.org>
1267 * Version 1.2.0 released.
1269 2004-12-27 Kenichi Handa <handa@m17n.org>
1271 * input.c (minput_filter): Don't reset ic->xxx_changed.
1273 * mtext.c (mtext_from_data): Fix documentation.
1275 2004-12-25 Kenichi Handa <handa@m17n.org>
1277 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1278 (M17NLIB_VERSION_NAME): Update to "1.2.".
1280 2004-12-24 Kenichi Handa <handa@m17n.org>
1282 * input.c (reset_ic): Set key_unhandled to 0.
1284 2004-12-21 Kenichi Handa <handa@m17n.org>
1286 * m17n-gui.h (mfont_from_spec): Delete extern.
1288 * input-gui.c (win_callback): Handle Minput_reset.
1289 (minput__win_init): Register reset_ic as a callback for
1292 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1293 changed. At first, shift to the initial state.
1294 (minput__init): Initialize Minput_reset. Register reset_ic as a
1295 callback for Minput_reset.
1296 (Minput_reset): New variable.
1297 (minput_filter): Always set ic->xxx_changed to 0.
1298 (minput_reset_ic): New function.
1299 (integer_value): Fix typo ('>' -> '<') and calculation of length
1302 * m17n-core.c (merror_code): Change type to `int'.
1304 * m17n-misc.h (merror_code): Adjust type.
1306 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1308 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1309 (mtext_change_prop): Delete extern.
1311 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1312 to `int'. Move the documents to m17n-core.h.
1314 2004-12-13 Kenichi Handa <handa@m17n.org>
1316 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1317 (MTextProperty): Document it.
1319 2004-12-09 Kenichi Handa <handa@m17n.org>
1321 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1323 2004-12-03 Kenichi Handa <handa@m17n.org>
1325 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1326 m17n__gui_initialized): New externs.
1328 * m17n-core.h (enum M17NStatus): New enum.
1329 (m17n_status): Extern it.
1331 * m17n-core.c (core_initialized): Delete this variable.
1332 (m17n__core_initialized, m17n__shell_initialized,
1333 m17n__gui_initialized): New variables.
1334 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1335 instead of core_initialized.
1336 (m17n_status): New function.
1338 * m17n.c (shell_initialized): Delete this variable.
1339 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1342 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1344 * m17n-gui.c (win_initialized): Delete this variable.
1345 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1346 instead of gui_initialized.
1348 2004-11-19 Kenichi Handa <handa@m17n.org>
1350 * input.c (reset_ic): Check if ic_info->state is NULL.
1351 (filter): If ic_info->state is NULL, return 0.
1352 (load_input_method): Don't unref `maps' it it's not created.
1354 2004-11-15 Kenichi Handa <handa@m17n.org>
1356 * input.c (find_candidates_group): If INDEX is -1, find the last
1358 (take_action_list): If the previous of the first candidate is
1359 requested, select the last candidate.
1361 2004-11-08 Kenichi Handa <handa@m17n.org>
1363 * m17n-X.c (device_open): Try at most 32 fonts to find a
1364 non-autoscaled font.
1366 * font.c (xlfd_parse_name): Fix previous change.
1368 2004-11-05 Kenichi Handa <handa@m17n.org>
1370 * font.c: (commont_style): Include dummy elements "slanted" and
1371 "rslanted" to prefer "o" to "r" if "i" is requested.
1373 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1375 2004-10-29 Kenichi Handa <handa@m17n.org>
1377 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1379 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1380 New members smallest and larger.
1381 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1382 (xfont_registry_list): Likewise.
1383 (xfont_select): Likewise.
1386 2004-10-28 Kenichi Handa <handa@m17n.org>
1388 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1389 font name comparison.
1390 (xfont_select): Fix logic for selecting a larger size font.
1392 2004-10-25 Kenichi Handa <handa@m17n.org>
1394 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1397 2004-10-22 Kenichi Handa <handa@m17n.org>
1399 * input.c (update_candidate): Renamed from udpate_candidate.
1400 (take_action_list): Show more debugging info on arithmetic commands.
1402 * m17n-X.c (device_open): Fix previous change.
1404 * draw.c (compose_glyph_string): Don't get face property at the
1407 2004-10-21 Kenichi Handa <handa@m17n.org>
1409 * draw.c (compose_glyph_string): Fix for the case of category
1412 2004-10-19 Kenichi Handa <handa@m17n.org>
1414 * input.c (mdebug_mask): New variable.
1415 (shift_state): Print debug information.
1416 (take_action_list): Likewise.
1417 (handle_key): Likewise.
1419 2004-10-14 Kenichi Handa <handa@m17n.org>
1421 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1423 2004-10-13 Kenichi Handa <handa@m17n.org>
1425 * m17n-X.c (device_open): Be sure to register at least one font
1428 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1429 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1431 2004-10-12 Kenichi Handa <handa@m17n.org>
1433 * draw.c (alloc_gstring): Fix previous change.
1435 * font-ft.c (ft_list_generic): Fix for the case of not
1438 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1440 * font.c (mfont_list): If no font is found, return NULL.
1441 (load_font_encoding_table): Put entries of nil registry first.
1442 (find_encoding): Adjust for the above change.
1444 2004-10-11 Kenichi Handa <handa@m17n.org>
1446 * m17n-gui.h (mfont_list): Adjust prototype.
1448 * m17n-X.c (xfont_list): New arg maxnum.
1450 * font.h (struct MFontDriver): Change prototype of <list>.
1452 * font-ft.c (fc_generic_family_list): Delete it.
1453 (Mserif, Msans_serif, Mmonospace): Delete them.
1454 (M_generic_family_info): New variable.
1455 (enum GenericFamilyType): New enum.
1456 (struct GenericFamilyInfo): New struct.
1457 (generic_family_table): New variable.
1458 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1460 (add_font_info): Get style here.
1461 (ft_list_family): Don't initialize fc_config here. Don't list
1463 (ft_list_generic): New function.
1464 (ft_select): Pay attention to generic familes here.
1465 (ft_open): Fix calculation of ascent and descent.
1466 (ft_list): Pay attention to generic families.
1467 (mfont__ft_init): Initialize M_generic_family_info,
1468 generic_family_table, and fc_config..
1469 (mfont__ft_fini): Finalize generic_family_table.
1471 * draw.c (compose_glyph_string): Use more constant font for
1472 glyphs. Adjust for the member change in MGlyph.
1473 (layout_glyph_string): Adjust for the member change in MGlyph.
1474 (alloc_gstring): Intilize scracth_glyph to avoid
1475 compose_glyph_string on it.
1476 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1477 (mdraw_coordinates_position): Fix previous change.
1479 * internal-gui.h (glyph_category): New enum.
1480 (MGlyph): Change type of <category> to enum glyph_category.
1482 * face.c (mface__realize): Delete args langauge and charset.
1483 (mface__for_chars): Fix for the case that glyphs have different
1485 (mface__update_frame_face): Adjust for mface__realize change.
1487 * face.h (mface__realize): Adjust prototype.
1489 2004-10-05 Kenichi Handa <handa@m17n.org>
1491 * language.c (mlang__init): Add Akan.
1493 2004-10-04 Kenichi Handa <handa@m17n.org>
1495 * font-ft.c (add_font_info): Add instead of push the element.
1496 (ft_list_family): For generic fonts, try all
1497 substituted. families.
1499 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1500 (run_rule): Don't update cluster range here.
1501 (run_command): Update cluster range on appending a glyph.
1502 (run_otf): Update cluster range for glyphs generated by OTF.
1504 2004-10-02 Kenichi Handa <handa@m17n.org>
1506 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1508 2004-09-30 Kenichi Handa <handa@m17n.org>
1510 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1512 2004-09-30 Kenichi Handa <handa@m17n.org>
1514 * font.h: Include <fontconfig/fontconfig.h>.
1515 (MFTInfo): New member langset.
1516 (mfont__encoding_list): Extern it.
1518 * font.c (mfont__encoding_list): New function.
1519 (mdebug_dump_font_list): New function.
1521 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1522 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1524 (ft_family_list): New variable.
1525 (set_font_info): New arg basep. Callers changed.
1526 (fc_list): Check the return value of FcPatternGetString.
1527 (add_font_info): New arg plist. Callers changed. Update
1529 (ft_list_family): New function (merged fc_list and ft_list_all).
1530 (ft_select): Use ft_list_family.
1531 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
1533 (mfont__ft_init): Initialize above new variables.
1534 (mfont__ft_fini): Free ft_family_list.
1535 (STRDUP_LOWER): New macro.
1536 (set_font_info): Use STRDUP_LOWER.
1537 (ft_list_family): Avoid duplicate addition of font path. Use
1539 (fc_decode_prop): Fix typo.
1541 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1542 (xfont_registry_list): Change argument disp_info to frame.
1544 (xfont_list_all): New function.
1545 (xfont_list): If FONT is not NULL, check all fonts.
1547 2004-09-28 Kenichi Handa <handa@m17n.org>
1549 * m17n-X.c (MXFont, MXFontList): New types.
1550 (MDisplayInfo): Delete members font_registry_list,
1551 iso8859_1_family_list, iso10646_1_family_list, new members
1552 font_list, base_font_list.
1553 (free_display_info): Adusted for the change of MDisplayInfo.
1554 (xfont_driver): Initialize with xfont_list.
1555 (font_compare): New function.
1556 (build_font_list): Deleted.
1557 (xfont_registry_list): New function.
1558 (xfont_select): Use xfont_registry_list.
1559 (xfont_list): New function.
1560 (device_open): Adusted for the change of MDisplayInfo.
1562 * font-ft.c (add_font_info): New arg languages. Callers changed.
1563 (fc_list): Get languages from fonts..
1564 (ft_list_all): Renamed from ft_list. Callers changed.
1565 (ft_list): New function.
1566 (mfont__ft_driver): Initalize with ft_list.
1568 * font.c (mfont_list): New function.
1570 * font.h (struct MFontDriver): New member `list'.
1571 (MFTInfo): New member languages.
1573 * m17n-gui.h (mfont_list): Extern it.
1575 2004-09-27 Kenichi Handa <handa@m17n.org>
1577 * internal-gui.h (struct MGlyphString): Delete members mt,
1578 sub_width, sub_lbrearing, sub_rbearing, and region.
1580 * draw.c (MSubTextExtents): New type.
1581 (layout_glyphs): New arg extents. Set its members.
1582 (layout_glyph_string): Adjusted for the above change.
1583 (alloc_gstring): Don't set gstring->mt.
1584 (truncate_gstring): Call line_break function with mt instead of
1587 2004-09-22 Kenichi Handa <handa@m17n.org>
1589 * mtext.c (count_utf_16_chars): Count each code of invalid
1592 2004-09-19 Kenichi Handa <handa@m17n.org>
1594 * mtext.c (default_utf_16, default_utf_32): Rename them to
1595 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
1598 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
1601 2004-09-13 Kenichi Handa <handa@m17n.org>
1603 * draw.c (Mlatin): Don't declare it here.
1604 (visual_order): Fix reordering of combining characters.
1605 (compose_glyph_string): Fix detection of script.
1606 (layout_glyphs): Don't fix reordering of combining characters
1608 (layout_glyph_string): Pay attention to
1609 control->disable_overlapping_adjustment.
1610 (truncate_gstring): Include at least on character in a line.
1611 (get_gstring): Always scan one full line.
1612 (mdraw__init): Don't initialize Mlatin here.
1613 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
1614 have a font, use ascent/descent of an ASCII font. Allow
1615 ink_array_return and logical_array_return to be NULL.
1616 (mdraw_coordinates_position): Fix iteration.
1618 * font-ft.c (MFTtoProp): Member completely changed.
1619 (ft_to_prop): Adjusted for the above change.
1620 (ft_to_prop_size): Likewise.
1621 (set_font_info): Adjusted for the change of MFTtoProp.
1622 (fc_generic_family_list): New variable.
1623 (fc_list): Add special handling of generic font names.
1624 (mfont__ft_init): Adjusted for the change of MFTtoProp.
1625 Initialize fc_generic_family_list.
1626 (mfont__ft_fini): Don't free ft_to_prop. Free
1627 fc_generic_family_list.
1628 (FC_vs_M17N_font_prop): New type.
1629 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
1630 (fc_decode_prop, fc_encode_prop): New functions.
1631 (mfont__ft_parse_name): Use fc_decode_prop.
1632 (mfont__ft_unparse_name): Use fc_encode_prop.
1634 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
1635 (MWDevice): Add member realized_font_list.
1636 (free_display_info): Don't free disp_info->realized_font_list.
1637 (free_device): Free device->realized_fontset_list.
1638 (xft_find_metric): Use gstring->frame instead of rfont->frame.
1639 (device_open): Don't initialize disp_info->realized_font_list.
1640 (device_open): Initialize device->realized_font_list and set it to
1641 frame->realized_font_list.
1643 * fontset.c (try_font_group): New function.
1644 (mfont__lookup_fontset): Use try_font_group.
1646 * font.c (common_weight): Change the order of "regular".
1648 * face.c (Mlatin): Don't make it static.
1649 (mface__realize): Be sure to set work_gstring.frame.
1650 (mface__for_chars): Likewise.
1652 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
1655 * internal-gui.h (Mlatin): Extern it.
1657 * m17n-gui.h (MDrawControl): New member
1658 disable_overlapping_adjustment.
1660 2004-09-06 Kenichi Handa <handa@m17n.org>
1662 * font-flt.c (run_otf): Fix typo ('}'->']').
1664 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
1665 (COMBINING_PRECOMPUTED_P): New macros.
1667 * draw.c (layout_glyphs): Handle precomputed combining code.
1669 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
1670 precomupted combining code.
1672 2004-09-03 Kenichi Handa <handa@m17n.org>
1674 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
1677 2004-08-27 Kenichi Handa <handa@m17n.org>
1679 * face.c (mface_put_prop): If the new value is the same as the
1680 current one, don't increment frame->tick.
1682 2004-08-25 Kenichi Handa <handa@m17n.org>
1684 * fontset.c (mfontset): Initialize font_spec_list member.
1685 (mfontset_copy): Load fontset if necessary.
1687 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
1688 'metrics' to for C++.
1690 * draw.c (mdraw_glyph_info): Adjusted for the member name change
1693 2004-08-16 Kenichi Handa <handa@m17n.org>
1695 * Version 1.1.0 released.
1697 2004-08-13 Kenichi Handa <handa@m17n.org>
1699 * language.c (mlang__init): Add Dhivehi.
1701 * m17n-gui.c (Mx, Mfreetype): Delete it.
1702 (m17n_init_win): Don't initialize Mx and Mfreetype here.
1704 * m17n-gui.h (Mfreetype, Mxft): Extern them.
1705 (mfont_resize_ratio): Extern it.
1706 (MDrawGlyphInfo): New member logical_width;
1707 (MDrawGlyph): New type.
1708 (mdraw_glyph_list): Prototype adjusted.
1710 * m17n-X.c (xfont_open): Set type and fontp members.
1711 (xft_open): Likewise.
1713 * internal-gui.h (Mx, Mfreetype): Delete extern.
1715 * font.h (struct MRealizedFont): New member type and fontp.
1717 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1718 (Mx, Mfreetype): Declare here.
1719 (Mxft): New variable.
1720 (mfont_resize_ratio): New function.
1722 * font-ft.c (ft_open): Set type and fontp members.
1724 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
1727 2004-08-11 Kenichi Handa <handa@m17n.org>
1729 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
1732 2004-08-06 Kenichi Handa <handa@m17n.org>
1734 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
1737 * font-flt.c (run_otf): Print debugging information if necessary.
1739 2004-08-05 Kenichi Handa <handa@m17n.org>
1741 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
1742 positioning_type 5 and 6. Switch simplified.
1744 2004-08-04 Kenichi Handa <handa@m17n.org>
1746 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
1748 2004-08-02 Kenichi Handa <handa@m17n.org>
1750 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
1751 set val to 1 even if it is greater than 1.
1753 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
1755 2004-07-29 Kenichi Handa <handa@m17n.org>
1757 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
1758 debugging information.
1760 * internal.h (MDEBUG_PRINT5): New macro.
1762 * draw.c (layout_glyphs): Don't combine a zero width glyph with
1763 the previous one if the zero width glyph has left or right
1766 2004-07-26 Kenichi Handa <handa@m17n.org>
1768 * m17n-X.c (xft_render): Pay attention to members left_padding and
1769 right_padding of MGlyph.
1771 * draw.c (visual_order): Allocate one more elements for arrays as
1772 a workaround of fribidi bug.
1773 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
1774 instead of MGlyph->bidi_sensitive.
1775 (layout_glyph_string): Pay attentinon to
1776 control->orientation_reversed when padding at the head or tail.
1777 Fix adjustment of space glyph width.
1778 (get_gstring): If cursor_width or cursor_bidi is changed, don't
1781 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
1782 instead of MGlyph->bidi_sensitive.
1784 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
1786 2004-07-26 Kenichi Handa <handa@m17n.org>
1788 * draw.c (visual_order): Don't treat combined glyphs specially.
1789 (layout_glyphs): Don't get metrics glyphs that are already ready.
1790 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
1791 width with the previous one.
1792 (draw_background): Fix bar cursor position on a r2l glyph.
1794 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
1795 (run_rule): Fix place of updating cluster_begin_pos and
1796 cluster_end_pos here.
1797 (run_otf): Don't set left_padding.
1799 * font-ft.c (adjust_anchor): Type of argument `code' changed.
1801 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
1802 Fix handling of GPOS.
1803 (mfont__ft_drive_gpos): Delete this function.
1805 * font.h (mfont__ft_drive_otf): Renamed back from
1806 mfont__ft_drive_gsub.
1807 (mfont__ft_drive_gpos): Delete extern.
1809 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
1810 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
1812 2004-07-23 Kenichi Handa <handa@m17n.org>
1814 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
1815 the same bidi level.
1817 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
1819 2004-07-22 Kenichi Handa <handa@m17n.org>
1821 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
1823 2004-07-20 Kenichi Handa <handa@m17n.org>
1825 * draw.c (render_glyphs): Fix checking of g->code validity.
1827 * face.c (mface__realize): Set g.type.
1829 2004-07-18 Kenichi Handa <handa@m17n.org>
1831 * Makefile.am: Prepend ${top_srcdir} to all *.la in
1834 * m17n-gui.c (mframe): Print error message give by dlopen to
1837 2004-07-16 Kenichi Handa <handa@m17n.org>
1839 * draw.c (compose_glyph_string): Improve the way of deciding a
1840 script. For a character that doesn't have script property, use
1841 the last non-latin script.
1843 * font-ft.c (fc_list): Cancel previous change.
1844 (mfont__ft_init): Add more entries in ft_to_prop_name.
1846 2004-07-15 Kenichi Handa <handa@m17n.org>
1848 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
1849 previous or next character glyphs.
1851 2004-07-14 Kenichi Handa <handa@m17n.org>
1853 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
1854 of type GLYPH_SPACE.
1856 * fontset.c (mfont__lookup_fontset): If glyph type is
1857 GLYPH_SPACE, get codes for SPACE.
1859 * internal-gui.h (Mfont): Delete extern.
1861 * m17n-gui.h (Mfont): Delete duplicated extern.
1863 2004-07-13 Kenichi Handa <handa@m17n.org>
1865 * font-ft.c (DEVICE_DELTA): New macro.
1866 (adjust_anchor): New function.
1867 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
1869 (mfont__ft_drive_gpos): New function.
1871 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
1872 (FontLayoutContext): Delete member `rfont'.
1873 (run_otf): Set g->otf_cmd. Call
1874 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
1875 only whne HAVE_OTF is defined.
1877 * fontset.c: Include "config.h".
1879 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
1880 (MGlyph): New member otf_cmd.
1882 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
1883 (mfont__ft_drive_gpos): Extern it.
1885 * face.c: Include "config.h".
1887 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
1889 * input-gui.c: Include "config.h".
1891 * plist.c: Include "config.h".
1893 2004-07-06 Kenichi Handa <handa@m17n.org>
1895 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
1896 internal-gui.h: Cancel previous changes.
1898 * m17n-gd.h: Delete it.
1900 * Makefile.am (libm17n_core_la_LIBADD): New variable.
1901 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
1902 @XML2_LD_FLAGS@ to above.
1903 (libm17n_la_LIBADD): Add -ldl.
1904 (libm17n_la_LDFLAGS): Add -export-dynamic.
1905 (X_LD_FLAGS): Fix the order of linking.
1906 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
1907 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
1908 (libm17n_X_la_LDFLAGS): Add -module.
1909 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
1910 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1911 (libm17n_gd_la_LDFLAGS): Add -module.
1912 (include_HEADERS): Delete m17n-gd.h.
1914 2004-06-30 Kenichi Handa <handa@m17n.org>
1916 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
1917 (MDeviceLibraryInterface): Delete it.
1918 (register_device_library): Delete it.
1919 (m17n__device_library_list): Renamed from device_library_list.
1921 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
1922 (m17n_init_win): Adjust prototype.
1924 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
1925 (m17n_init_gd): New function.
1927 * m17n-gd.h: New file.
1929 * m17n-X.h: Include <m17n-gui.h>.
1930 (m17n_init_X): Extern it.
1931 (M17N_INIT): Redefine it.
1933 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
1934 (m17n_init_X): New function.
1936 * internal-gui.h (m17n__device_library_list): Extern it.
1937 (struct MDeviceDriver): New members initialized, init, and fini.
1939 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
1941 (libm17n_X_la_LIBADD): Delete aboves.
1942 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
1943 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1944 (libm17n_gd_la_LDFLAGS): Delete it.
1945 (include_HEADERS): Add m17n-gd.h.
1947 2004-06-25 Kenichi Handa <handa@m17n.org>
1949 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
1950 (libm17n_gd_la_LDFLAGS): Cancel previous change.
1952 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
1954 * font-ft.c (fc_list): If FcFontList finds no font, try
1957 * draw.c (compose_glyph_string): Terminate the last loop after
1958 doing default combining if necessary.
1960 2004-06-24 Kenichi Handa <handa@m17n.org>
1962 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
1964 * character.c (mchar_define_property): Add const to an arg.
1966 * charset.c (mchar_define_charset): Add const to an arg.
1968 * coding.c (MCodingSystem): Add const to an arg or decoder.
1969 (finish_decoding): Add const to an arg.
1970 (decode_coding_charset, decode_coding_utf_8)
1971 (decode_coding_utf_16, decode_coding_utf_32)
1972 (decode_coding_iso_2022, decode_coding_sjis)
1973 (mconv_define_coding): Likewise.
1975 * m17n-X.c (xft_find_metric): Delete unused variable.
1977 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
1980 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
1983 * mtext.c (count_utf_8_chars, count_utf_16_chars)
1984 (mtext__from_data, mtext_from_data): Add `const' to an arg.
1986 * mtext.h (mtext__from_data): Ajust prototype.
1988 2004-06-23 Kenichi Handa <handa@m17n.org>
1990 * draw.c (compose_glyph_string): Always get glyph codes by
1992 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
1993 (mdraw_glyph_list): New function.
1995 * font-flt.c (mfont__flt_run): Be sure to call
1996 rfont->driver->encode_char.
1998 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
1999 (ft_encode_char): Delete arg C.
2000 (ft_render): Don't call FT_Get_Char_Index.
2002 * font.c (mfont__encodable_p): Delete it.
2003 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
2005 * font.h (struct MFontDriver): Delete arg C of encode_char.
2006 (mfont__encodable_p): Delete extern.
2008 * m17n-X.c (xfont_encode_char): Delete arg C.
2009 (xft_find_metric): Don't cal FT_Get_Char_Index.
2010 (xft_render): Likewise.
2012 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
2014 (mdraw_glyph_list): Extern it.
2016 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
2018 2004-06-22 Kenichi Handa <handa@m17n.org>
2020 * m17n-gui.h (mfontset_lookup): Extern it.
2022 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
2024 * fontset.c (realize_fontset_elements)
2025 (free_realized_fontset_elements, update_fontset_elements): New
2027 (mfont__realize_fontset): Call realize_fontset_elements.
2028 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
2029 (mfont__lookup_fontset): If a fontset was modified, update
2030 the realized fontset.
2031 (mfontset_modify_entry): Increment fontset->tick.
2032 (mfontset_lookup): New function.
2034 2004-06-21 Kenichi Handa <handa@m17n.org>
2036 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
2038 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
2039 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
2040 length of source text 0.
2042 2004-06-21 Kenichi Handa <handa@m17n.org>
2044 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
2045 (compare): Pay attention to format other than utf-8.
2046 (copy): Delete this function.
2047 (count_by_utf_8, count_by_utf_16, insert): New functions.
2048 (count_utf_16_chars): Fix handling of a surrogate pair.
2049 (find_char_forward, find_char_backward): Likewise.
2050 (mtext__from_data): Delete unnecessary check. Fix number of
2052 (mtext_from_data): Don't count items.
2053 (mtext_ref_char): Optimize the code.
2054 (mtext_set_char): Pay attention to format other than utf-8.
2055 (mtext_cat_char): Likewise.
2056 (mtext_dup): Don't call copy, instead do allocation here.
2057 (mtext_cat): Call insert instead of copy.
2058 (mtext_ncat): Likewise.
2059 (mtext_cpy): Delete character at first and call insert instead of
2061 (mtext_ncpy): Likewise.
2062 (mtext_copy): Likewise.
2063 (mtext_duplicate): Call insert instead of copy.
2064 (mtext_del): Pay attention to format other than utf-8.
2065 (mtext_ins): Simply call insert.
2066 (mtext_ins_char): Pay attention to format other than utf-8.
2067 (mtext_tok): Call insert instead of copy.
2068 (mtext_text): Call UNIT_BYTES.
2070 * textprop.c (mtext__adjust_plist_for_change): New function.
2072 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
2073 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
2074 (CHAR_UNITS_AT): Fix typo.
2075 (CHAR_UNITS_BY_HEAD): Fix typo.
2076 (STRING_CHAR_AND_UNITS): Fix typo.
2078 * internal.h (MTEXT_READ_ONLY_P): New macro.
2080 * mtext.h (mtext__replace): Delete the extern.
2081 (mtext__adjust_foramt): Adjust prototype.
2083 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
2084 if possible. Otherwise make a copy of mmt.
2086 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
2089 2004-06-18 Kenichi Handa <handa@m17n.org>
2091 * character.h (CHAR_STRING_UTF16): Fix syntax.
2093 2004-06-16 Kenichi Handa <handa@m17n.org>
2095 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2096 (libm17n_X_la_LIBADD): Delete it.
2097 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2099 * m17n-X.c (device_open): Add parens in `if' condition.
2101 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2102 (DEC_POSITION): Likewise.
2103 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2105 2004-06-15 Kenichi Handa <handa@m17n.org>
2107 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2110 * draw.c (compose_glyph_string): If langauge is specified, call
2111 mface__for_chars even if a text is all latin. Fix condition for
2112 setting non_ascii_found.
2114 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2116 * m17n.h (minput_char_to_key): Delete extern.
2118 * m17n-gui.h (minput_event_to_key): Cancel previous change.
2120 * m17n-gui.c (null_device_open): Set several members of frame.
2122 2004-06-14 Kenichi Handa <handa@m17n.org>
2124 * m17n-gui.h (minput_event_to_key): Delete extern.
2126 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2128 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2130 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2132 2004-06-08 Kenichi Handa <handa@m17n.org>
2134 * character.c (mchar_put_prop): Don't increment the ref-count of
2137 2004-06-04 Kenichi Handa <handa@m17n.org>
2139 * m17n-core.c (mdebug__register_object): New function.
2140 (mdebug__unregister_object): Likewise.
2142 * internal.h (mdebug__register_object, mdebug__unregister_object):
2144 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2147 * charset.c (mcharset__load_from_database): Don't call
2148 mconv__register_charset_coding here.
2150 * coding.c (find_coding): Get a real name from an element of
2151 coding_definition_list.
2152 (mconv__register_charset_coding): Set the real name at the top of
2154 (mcoding__load_from_database): Likewise.
2155 (mconv_list_codings): Adjusted for the above change.
2157 2004-06-03 Kenichi Handa <handa@m17n.org>
2159 * coding.c (find_coding): Find by canonicalized name. Don't have
2160 to modify the element of coding_definition_list by
2162 (mconv__define_coding_from_charset): Delete it.
2163 (mconv__register_charset_coding): Canonicalize sym.
2164 (mcoding__load_from_database): Register plist modified by
2167 * coding.h (mconv__define_coding_from_charset): Don't extern it.
2169 * font-ft.c (ft_open): Fix setting of rfont->descent.
2171 2004-06-02 Kenichi Handa <handa@m17n.org>
2173 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2174 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2175 (xlfd_unparse_name): Renamed from xfont_build_name.
2176 (mfont__init): Initialized Mfontconfig.
2177 (mfont__free_realized): Unconditionally unref rfont->info.
2178 (mfont__select): Free `this' if it's not best.
2179 (mfont__open): Don't check frame->realized_font_list.
2180 (mfont__parse_name_into_font): New function.
2181 (Mfontconfig): New variable.
2182 (mfont_from_name): Call mfont_parse_name.
2183 (mfont_name): Call mfont_unparse_name.
2184 (mdebug_dump_font): Likewise.
2186 * font.h (struct MFontDriver): Delete members parse_name and
2188 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2189 (mfont__parse_name_into_font): Extern it.
2191 * font-ft.c: Include "symbol.h".
2192 (close_ft): Unconditionally free filename and charmap_list of
2194 (ft_open): Duplicate base->filename. Increment ref-count of
2195 ft_info->charmap_list. Free ft_info->charmap_list and
2196 ft_info->filename on error.
2197 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2199 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2201 (enum xlfd_field_idx): Moved to font.c.
2202 (split_font_name, build_font_name): Likewise.
2203 (build_font_list): Call mfont__parse_name_info_font.
2204 (xfont_open): Call mfont__unparse_name. Free name.
2205 (xfont_parse_name, xfont_build_name): Moved to font.c
2206 (xft_select): Prototype deleted.
2207 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2208 Call mfont_pase_name.
2210 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2211 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2214 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2217 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2219 2004-06-01 Kenichi Handa <handa@m17n.org>
2221 * fontset.c (mfontset_modify_entry): Pay attention to the case
2222 that fontset->font_spec_list is NULL.
2224 2004-05-31 Kenichi Handa <handa@m17n.org>
2226 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2228 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2230 * font.c (mfont__select): Print score the a font for debugging.
2232 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2234 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2235 kanji_sym and kana_sym.
2237 2004-05-28 Kenichi Handa <handa@m17n.org>
2239 * Makefile.am (VINFO): New variable.
2240 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2241 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2243 2004-05-27 Kenichi Handa <handa@m17n.org>
2245 The following chanages are to make device dependent functions
2246 accessible only from MDeviceDriver structure, and to add GD and
2247 null device drivers. Font drivers get also device dependent.
2249 * m17n.c (m17n_init): Increament shell_initialized.
2250 (m17n_fini): Decremented shell_initialized.
2252 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2254 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2255 (Mwidget, Mcolormap, Mx): Extern them.
2257 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2258 (free_frame): Call frame->driver->close instead of
2260 (DLOPEN_SHLIB_EXT): New macro.
2261 (MDeviceLibraryInterface): New type.
2262 (device_library_list): New variable.
2263 (register_device_library): New function.
2264 (null_device): New variable.
2265 (null_device_close, null_device_get_prop)
2266 (null_device_realize_face, null_device_free_realized_face): New
2268 (null_driver): New variable.
2269 (null_device_init, null_device_fini, null_device_open): New
2271 (null_interface): New variable.
2272 (Mfreetype, Mdevice): Declare them.
2273 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2274 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2275 Mwin__Close_Device. Register drivers for Mx and Mgd.
2276 (m17n_fini_win): Decremented win_initialized. Call "fini"
2277 function of all opened devices. Don't call mwin__fini.
2278 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2280 (mframe): Handle Mdevice key of PLIST.
2281 (mframe_get_prop): Call frame->device->get_prop instead of
2282 mwin__device_get_prop.
2284 * m17n-gd.c: New file.
2286 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2287 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2289 * m17n-core.c (m17n_init_core): Increate core_initialized.
2290 (m17n_fini_core): Decremented core_initialized.
2292 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2293 (Mcolormap): Don't extern them here.
2295 * m17n-X.c (FRAME_DEVICE): New macro.
2296 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2297 (free_display_info): Use MPLIST_DO.
2298 (free_device): Free rface->info.
2299 (xft_close): Delete it.
2300 (device_init): Renamed from mwin__init.
2301 (device_fini): Renamed from mwin__fini.
2302 (device_open): Renamed from mwin__open_device.
2303 (x_driver): New variable.
2304 (MXFontInfo): Delete member frame, add member display.
2305 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2306 Don't declare them here.
2308 * internal-gui.h (MDeviceType): New enum.
2309 (MWDefice): Delete it.
2310 (struct MFrame): Change type of device to void *. New members
2311 device_type, driver, font_driver_list.
2312 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2313 (MDeviceDriver): New type.
2314 (Mx, Mgd, Mfreetype): Extern them.
2315 (mwin__XXX): Delete all of them.
2317 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2319 (win_destroy_ic): Likewise.
2320 (adjust_window_and_draw): Likewise.
2321 (win_callback): Likewise.
2322 (Mxim): Declare it here.
2323 (minput_event_to_key): Call M_CHECK_READABLE.
2325 * fontset.c (mfont__lookup_fontset): Delete local variable
2328 * font.h (struct MFontDriver): Delete member close, add members
2329 parse_name and build_name.
2330 (mfont__driver_list): Delete extern.
2331 (mfont__close): Delete extern.
2333 * font.c (mfont__init): Don't set mfont__driver_list.
2334 (mfont__fini): Don't unref mfont__driver_list.
2335 (mfont__select): Try font drivers in frame->font_driver_list. Set
2336 driver member of a realized font.
2337 (mfont__close): Delete it.
2338 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2339 functions of the default frame.
2341 * font-ft.c (close_ft): Check ft_info->ft_face and work
2343 (add_font_info): Allocate ft_info by M17N_OBJECT.
2344 (ft_close): Delete it.
2345 (mfont__ft_driver): Don't set ft_close.
2346 (ft_select): Increment ref-count of best_font.
2347 (ft_open): Decremented ref-count of base. On error, call
2348 FT_Done_Face and free ft_info.
2349 (ft_find_metric): Always use XXX_MONO in load_flags.
2350 (ft_render): Fix setting of width. Call
2351 frame->driver->draw_points instead of mwin__draw_points.
2352 (ft_to_prop): Don't set mfont__driver_list.
2353 (mfont__ft_fini): Just unref ft_info.
2355 * face.c (mface__init): Exchange foreground and background of
2356 mface__default. Call mface_put_prop to set hline of
2358 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2359 (mface__free_realized): Don't call mwin__free_realized_face.
2361 * draw.c (Mdepth): Don't declare it here.
2362 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2363 (render_glyphs, render_glyph_string): Likewise.
2364 (mdraw__init): Don't set Mdepth.
2365 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2367 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2369 (mdraw_text_items): Check FRAME is writable.
2370 (mdraw_per_char_extents): Implement body.
2372 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2374 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2375 (GUI_SOURCES): Delete it.
2376 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2377 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2378 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2379 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2380 (linkgui_LDADD): Set to libm17n-gui.la
2381 (linkgui_LDFLAGS): New target.
2382 (SRC): Include ${libm17n_gui_la_SOURCES} and
2383 ${libm17n_gd_la_SOURCES}.
2385 2004-05-24 Kenichi Handa <handa@m17n.org>
2387 * draw.c (draw_background): Don't draw background even if
2388 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2390 2004-05-22 Kenichi Handa <handa@m17n.org>
2392 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2394 2004-05-20 Kenichi Handa <handa@m17n.org>
2396 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2398 * m17n-gui.c: Include "plist.h".
2399 (mframe): If PLIST is NULL, initialize it to emply plist.
2401 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2402 (xft_driver): New variable.
2403 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2404 (xft_find_metric, xft_render): New function.
2405 (mwin__init): Adjusted for the new mfont__driver_list.
2406 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2407 generated face to PARAM.
2408 (mwin__realize_face): Fix setting of box colors. Don't call hook
2410 (mwin__draw_hline): New function.
2411 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2412 (mwin__xft_render): Delete these function.
2414 * internal-gui.h (struct MFrame): New member tick.
2415 (struct MGlyphString): New member tick.
2416 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2417 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2418 (mwin__xft_render): Delete extern.
2420 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2421 (mfontset): Always increment the reference count of returned
2424 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2425 (MFTInfo): Moved to font.h.
2426 (ft_iso8859_1_font_list): Delete this variable.
2427 (set_font_info): Don't set font->property[MFONT_TYPE].
2428 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2429 (add_font_info): Change type to void.
2430 (fc_list): Change anme from xft_list. Caller changed. Include
2431 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2432 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2433 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2434 (close_ft): Don't call mwin__xft_close. Unref
2435 ft_info->extra_info.
2436 (ft_open): Don't setup ft_info->fontname. Don't call
2438 (ft_find_metric): Don't call mwin__xft_get_metric.
2439 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2440 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2441 (mfont__ft_init): Adjusted for new mfont__driver_list.
2442 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2444 * font.c (mfont__driver_list): Make it MPlist.
2445 (mfont__init): Adjust initialization of mfont__driver_list.
2446 (mfont__fini): Free mfont__driver_list.
2447 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2448 (mfont__select): Adjusted for the new mfont__driver_list.
2450 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2451 (mfont__drirver_list): Adjust prototype.
2452 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2454 * face.h (struct MFace): Delete member realized_face_list, add
2456 (struct MRealizedFace): Delete member need_update
2457 andnofont_rface, add member non_ascii_list.
2458 (mface__update_frame_face): Extern it.
2460 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2462 (get_hline_create, get_box_create): New functions.
2463 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2465 (free_face): Cancep previous change. Free face->frame_list.
2466 (serialize_hline): Do nothing if hline->width is zero.
2467 (serialize_box): Do nothing if box->width is zero.
2468 (mface__init): Setup all properties of mface__default.
2469 (mface__fini): Free hline_prop_list and box_prop_list.
2470 (mface__realize): Cancel previous change. Update
2471 face->frame_list. Setup rface->non_ascii_list.
2472 (mface__for_chars): Update rface->non_ascii_list.
2473 (mface__free_realized): Free rface->non_ascii_list.
2474 (mface__update_frame_face): New function.
2475 (mface): Initialize face->frame_list.
2476 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2478 (mface_merge): Likewise.
2479 (mface_put_prop): If key is Mhline or Mbox, get value by
2480 get_hline_create or get_box_create respectively.
2481 (mface_put_prop): Update frame->tick and call
2482 mface__update_frame_face if necessary.
2483 (mface_update): Do nothing if func is noop_hook.
2485 * draw.c (render_glyphs): If a font is not found, use
2486 mwin__draw_empty_boxes.
2487 (alloc_gstring): Initialize gstring->tick.
2488 (get_gstring): Check gstring->tick.
2490 2004-05-17 Kenichi Handa <handa@m17n.org>
2492 * face.c (find_realized_face): Return value changed. If RFONT is
2493 NULL, avoid unnecessary checking.
2494 (free_face): Free face->realized_face_list.
2495 (mface__realize): Adjusted for the change of find_realized_face.
2496 If it returns a realized face that needs update, free it and
2497 realize a new one. Push a new realized face to
2498 frame->realized_face_list instead of appending.
2499 (mface__for_chars): Adjusted for the change of find_realized_face.
2500 Short cut if the required font is in rface->ascii_rface.
2501 (mface_put_prop): Free old value if necessary. Set need_update
2502 member of realized faces to 1.
2504 * face.h (struct MFace): Delete member tick, add member
2506 (struct MRealizedFace): Delete member tick, add member
2509 2004-05-13 Kenichi Handa <handa@m17n.org>
2511 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2513 2004-05-12 Kenichi Handa <handa@m17n.org>
2515 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2517 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2518 parse it XftNameParse.
2520 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2521 (all_fonts_scaned): New variable.
2522 (set_font_info): FAMILY may be Mnil.
2523 (add_font_info): Argument changed.
2524 (xft_list): Call add_font_info in it.
2525 (ft_list): Likewise.
2526 (ft_select): Make it work in the case family is Mnil.
2527 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2528 (mfont__ft_fini): Set all_fonts_scaned to 0.
2530 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2531 that is failed to open.
2533 2004-05-10 Kenichi Handa <handa@m17n.org>
2535 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2536 device's depth is 1 (i.e. monochrome).
2538 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2539 to work around the problem of libtool.
2541 * font-ft.c: Include <freetype/ftbdf.h>.
2542 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2544 (mfont__ft_init): Initialize them.
2545 (ft_iso8859_1_font_list): New variable.
2546 (set_font_info): Detect a font containing iso8859-1 glyphs and
2547 register it in ft_iso8859_1_font_list. If the font is not
2548 scalable, assume it as BDF or PCF font and setup SIZE and RESY
2549 properties of the font from its properties.
2550 (add_font_list): If the font is not scalable, check if it is BDF
2551 or PCF font. If not, ignore it.
2552 (ft_select): If FAMILY is Mnil, return NULL only if the requested
2553 registry is not iso8859-1.
2554 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2555 ft_iso8859_1_font_list.
2556 (ft_find_metric): If the font is not scalable, assume it as BDF
2557 or PCF, and get a metric from its properties.
2558 (mfont__ft_fini): Free ft_iso8859_1_font_list.
2560 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
2562 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2563 (libm17n_la_LDFLAGS): Delete it.
2564 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2565 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2567 2004-05-06 Kenichi Handa <handa@m17n.org>
2569 * draw.c (compose_glyph_string): Fix previous change.
2571 2004-04-30 Kenichi Handa <handa@m17n.org>
2573 * font-ft.c (ft_list): Delete unused variable `result'.
2574 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
2576 2004-04-27 Kenichi Handa <handa@m17n.org>
2578 * m17n-X.c: Include config.h
2579 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
2580 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
2581 (MWDevice) [HAVE_XFT2]: New member xft_draw.
2582 (FRAME_CMAP, FRAME_VISUAL): New macros.
2583 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
2584 (xfont_driver): Make it static.
2585 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
2586 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
2587 info->xft_color_back.
2588 (MXftFontInfo) [HAVE_XFT2]: New type.
2589 (mwin__xft_close) [HAVE_XFT2]: New function.
2590 (mwin__xft_open) [HAVE_XFT2]: New function.
2591 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
2592 (mwin__xft_render) [HAVE_XFT2]: New function.
2594 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2595 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
2596 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
2599 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2601 * font-ft.c: Don't include FT_FREETYPE_H here.
2602 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
2603 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
2604 (MFTInfo): New member charmap_index.
2605 (MFTInfo) [HAVE_XFT2]: New member xft_info.
2606 (check_otf_filename): Renamed from check_filename. Return value
2608 (ft_set_property): This function deleted.
2609 (set_font_info): New function.
2610 (add_font_list): Argument changed. Add multiple fonts.
2611 (xft_list) [HAVE_XFT2]: New function.
2612 (ft_list) [not HAVE_XFT2]: New function.
2613 (ft_select): Add code for Xft.
2614 (close_ft): Likewise.
2615 (ft_open): Likewise.
2616 (ft_find_metric): Likewise.
2617 (ft_encode_char): Likewise.
2618 (ft_render): Likewise.
2620 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
2622 2004-04-26 Kenichi Handa <handa@m17n.org>
2624 * textprop.c (mtext_attach_property): Declare the return type as
2627 2004-04-21 Kenichi Handa <handa@m17n.org>
2629 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
2631 2004-04-09 Kenichi Handa <handa@m17n.org>
2633 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
2635 (load_command): Setup above members.
2637 2004-04-05 Kenichi Handa <handa@m17n.org>
2639 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
2641 2004-03-30 Kenichi Handa <handa@m17n.org>
2643 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
2646 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
2647 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
2649 2004-03-29 Kenichi Handa <handa@m17n.org>
2651 * Version 1.0 Patch Level 2 released.
2653 2004-03-29 Kenichi Handa <handa@m17n.org>
2655 * charset.c (make_charset): Set charset->fully_loaded and
2656 charset->simple correctly. Don't try to get charset->min_char and
2657 charset->max_char for a charset of method subset and superset.
2658 Don't load a mapping file here.
2659 (mcharset__init): Set unified_max.
2660 (mcharset__load_from_database): Free a working plist.
2662 * coding.c (mcoding__fini): Free all malloced data.
2664 * input-gui.c (win_create_ic): Set control.as_image for preediting
2667 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
2668 `count') to initialize the array.
2670 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
2673 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
2675 (mwin__create_window): Fix bug of setting a background pixel of a
2677 (mwin__adjust_window): Clear the window before drawing.
2679 * m17n-core.c (mdebug__report_object): Free array->objectes if
2681 (m17n_init_core): Don't set report_header_printed to 0 here.
2682 Fix debugging information.
2683 (m17n_fini_core): Set report_header_printed to 0 here.
2685 * m17n-core.h (mplist_deserialize): Extern it.
2687 * m17n-gui.c (m17n_fini_win): Fix debugging information.
2689 * m17n.c (m17n_fini): Fix debugging information.
2691 * mtext.c (mtext__adjust_foramt): New function.
2693 * mtext.h (mtext__adjust_foramt): Extern it.
2695 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2697 * plist.h (mplist__deserialize): Don't extern it.
2699 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
2700 elements of symbol_table to NULL. Report about created and freed
2701 symbols if MDEBUG_FINI is set.
2703 2004-03-22 Kenichi Handa <handa@m17n.org>
2705 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2707 * m17n.c (m17n_init): Fix the way of checking merror_code.
2709 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2711 2004-03-22 Kenichi Handa <handa@m17n.org>
2713 * fontset.c (realize_font_group): Adjust the font size by
2714 mfont__resize before selecting a font.
2716 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2718 2004-03-19 Kenichi Handa <handa@m17n.org>
2720 * Version 1.0 Patch Level 1 released.
2722 2004-03-19 Kenichi Handa <handa@m17n.org>
2724 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
2726 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
2728 2004-03-19 Kenichi Handa <handa@m17n.org>
2730 Re-apply the changes forgotten in the released version.
2732 * charset.c (mcharset__load_from_database): Call
2733 mchar_define_charset.
2735 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
2736 (mconv_encode_range): Put Mcoding text property.
2738 2004-03-18 Kenichi Handa <handa@m17n.org>
2740 * draw.c (Mdepth): New variable.
2741 (visual_order): Delete unused local var `pos'.
2742 (compose_glyph_string): Fix for the case that gstring->glyphs is
2743 realloced. Stop generating glyphs at TO. Fix handling of
2745 (layout_glyphs): Get metrics of all glyphs in advance. Set
2746 lbearing and rbearing of base of composition glyph correctly.
2747 Handle left-overhang glyphs correctly.
2748 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
2750 (dump_combining_code): Change the defualt off_x character to ".".
2751 (mdraw__init): Initialize Mdepth.
2753 * face.c (work_gstring): New variable
2754 (mface__init): Initialize work_gstring.
2755 (mface__fini): Free work_gstring.glyphs.
2756 (mface__realize): Don't handle videomode property here. Adjusted
2757 for the change of mfont__get_metric.
2758 (mface__for_chars): Adjusted for the change of mfont__get_metric.
2760 * face.h (enum face_gc): Moved to m17n-X.c.
2762 * font.h (struct MFontDriver): Arguments of find_metric changed.
2763 (mfont__select): Prototype adjusted.
2764 (mfont__get_metric): Likewise.
2765 (mfont__ft_drive_otf): Likewise.
2766 (mfont__flt_run): Likewise.
2768 * font.c (mfont__select): New argument layouter. If layouter is
2769 different in the registered font, make a new copy of realized
2771 (mfont__get_metric): Argument changed. Get metrics of multiple
2773 (mfont_find): Call mfont__select with layouter as Mnil.
2775 * font-flt.c (FontLayoutContext): New member rfont.
2776 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
2777 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
2779 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
2781 (NUM_POINTS): New macro.
2782 (MPointTable): New type.
2783 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
2784 (mfont__ft_drive_otf): New argument rfont.
2786 * fontset.c (realize_font_group): Adjusted for the changed of
2788 (check_fontset_element): This function deleted.
2790 * input-gui.c (adjust_window_and_draw): Locate a preedit window
2791 off the parent window if the preedit text is zero length.
2793 * internal-gui.h (struct MFrame): New members foreground,
2794 background, videomode, font.
2795 (struct MGlyphString): New member anti_alias.
2796 (MDrawPoint): New type.
2797 (mwin__draw_bitmap): Prototype deleted.
2798 (mwin__draw_points): Prototype added.
2800 * m17n-gui.h (MDrawControl): New member anti_alias.
2802 * m17n-gui.c (free_frame): Free frame->font.
2803 (mframe): Set the fontset of frame->face to the default fontset.
2805 * m17n-X.c (RGB_GC): New type.
2806 (enum gc_index): Renamed from enum face_gc. Member names changed.
2808 (struct MWDevice): Members foreground and background deleted. New
2809 member scratch_gc, gc_list.
2810 (DEFAULT_FONT, FALLBACK_FONT): New macros.
2811 (free_device): Free GCs in device->gc_list.
2812 (get_rgb_gc): New function.
2813 (get_gc): Renamed and argument changed from get_color.
2814 (get_gc_for_anti_alias): New function.
2815 (xfont_find_metric): Arguments changed. Get metrics of multiple
2817 (set_region): Argument changed. Caller changed.
2818 (xfont_render): Allways set a font in gc.
2819 (x_error_handler, x_io_error_handler): Define only if
2820 X_SET_ERROR_HANDLER is defined.
2821 (mwin__open_device): Create device->scratch_gc. Set members
2822 foreground, background, and videomode of frame. Call
2823 XSetErrorHandler and XSetIOErrorHandler only if
2824 X_SET_ERROR_HANDLER is defined.
2825 (struct gc_list): Deleted.
2826 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
2827 (mwin__realize_face): Adjusted for the change of the format of
2828 rface->info and the charge of set_region.
2829 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
2830 (mwin__draw_box): Likewise.
2831 (mwin__draw_bitmap): This function deleted.
2832 (mwin__draw_points): New function.
2833 (mwin__verify_region): Adjusted for the change of the format of
2834 rface->info and the charge of set_region.
2835 (mwin__create_window): Inherit backgound pixel from parent.
2836 (mwin__dump_gc): Adjusted for the change of the format of
2839 2004-03-16 Kenichi Handa <handa@m17n.org>
2841 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
2843 * input.c (M_key_alias): New variable.
2844 (handle_key): Try M_key_alias property of a key too.
2845 (minput__init): Initialize M_key_alias. Give that property to
2846 symbols in one_char_symbol. Fix bug of initializing
2849 * draw.c (compose_glyph_string): Don't handle
2850 ignore_formatting_char here. Include formatting characters in the
2851 range processed by a FTL.
2852 (layout_glyph_string): Handle ignore_formatting_char here.
2854 2004-03-12 Kenichi Handa <handa@m17n.org>
2856 * input-gui.c (win_create_ic): Enable bidi in status control.
2858 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
2860 2004-03-09 Kenichi Handa <handa@m17n.org>
2862 * input.c (load_input_method): If title is not specified, use the
2863 input method name as title.
2865 * m17n-X.c (get_color): Make it static.
2866 (xim_create_ic, xim_destroy_ic, x_error_handler)
2867 (x_io_error_handler): Likewise.
2869 2004-03-01 Kenichi Handa <handa@m17n.org>
2871 * Version 1.0 released.
2874 Copyright (C) 2003, 2004
2875 National Institute of Advanced Industrial Science and Technology (AIST)
2876 Registration Number H15PRO112
2878 This file is part of the m17n library.
2880 The m17n library is free software; you can redistribute it and/or
2881 modify it under the terms of the GNU Lesser General Public License
2882 as published by the Free Software Foundation; either version 2.1 of
2883 the License, or (at your option) any later version.
2885 The m17n library is distributed in the hope that it will be useful,
2886 but WITHOUT ANY WARRANTY; without even the implied warranty of
2887 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2888 Lesser General Public License for more details.
2890 You should have received a copy of the GNU Lesser General Public
2891 License along with the m17n library; if not, write to the Free
2892 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA