1 2005-10-28 Kenichi Handa <handa@m17n.org>
3 * input.c (load_branch): Ignore an undefined map name.
4 (load_im_info): Set im_info->title from `name' only if it's not
6 (shift_state): Always update ic->status.
7 (adjust_candidates): Renamed from adjust_candidate_command.
8 Argument changed. Caller changed.
9 (get_candidate_list, regularize_action): New functions.
10 (take_action_list): Use them. On handling Munhandle, don't set
12 (handle_key): If KEY is not handled by MAP, and MAP has
13 branch_actions, perform them.
15 * database.c (mdatabase__fini): Free dir_info->filename;
17 2005-10-20 Kenichi Handa <handa@m17n.org>
19 * input.c (marker_code): Accept '@@'.
20 (integer_value): Handle '@@'.
21 (parse_action_list): Accept a symbol argument.
22 (take_action_list): Resolve the symbol argument. Handle the
25 2005-10-18 Kenichi Handa <handa@m17n.org>
27 * input.c: Include "charset.h".
28 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
30 (MIMState): New member (M17NObject control).
31 (lookup_nested_list, set_nested_list, parse_nested_list_value)
32 (get_nested_list, resolve_variable): New functions.
33 (integer_value): New arg (MPlist **value). Set it to the plist
34 element containing the value.
35 (resolve_command): New function.
36 (load_translation): New arg (MPlist *map_actions).
37 (load_branch): New args language and name. If `keylist' is a
38 symbol, resolved that as a command name.
39 (free_map): New arg top. Free map->map_actions only if top is
41 (free_state): New function.
42 (load_state): New arg name.
43 (im_info_list): New variable.
44 (free_im_info, get_im_info_by_tags): New functions.
45 (load_im_info): Arg key changed to plist. Handle `include'.
46 Return (MInputMethodInfo *).
47 (preedit_commit): Ref ic->candidate_list.
48 (get_select_charset, adjust_candidate_command): New functions.
49 (take_action_list): Handle `include'. Adjust candidate action
50 properly. Handle control variables `candidates-charset' and
51 `candidates-group-size'.
52 (open_im): Use get_im_info.
53 (create_ic): Get global variables.
54 (load_partial_im_info): New function.
55 (get_im_info): New function.
56 (check_command_keyseq, check_command_list, check_variable_list):
58 (minput__init): Don't handle M_database_hook and Mdetail_text.
59 Initialize M_candidates, Mcandidates_group_size,
61 (parse_variable_list, get_variable_list, parse_command_list)
62 (get_command_list): Delete them.
63 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
64 (minput__fini): Simply unref command_list and variable_list.
65 (minput_get_description): Adjusted for the new form of description.
66 (minput_get_commands): Use get_nested_list.
67 (minput_assign_command_keys): Likewise.
68 (minput_get_variables, minput_set_variable): Likewise.
70 * input.h (MInputMethodInfo): New members im and maps.
72 * database.h (M_database_hook): Delete extern.
73 (MDatabaseHookFunc): Delete extern.
74 (mdatabase__check): Extern it.
76 * database.c: Include <glob.h>.
77 (MAX_TIME): New macro.
78 (Masterisk): New variable.
79 (get_database_stream): Argument changed to (MDatabaseInfo *).
81 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
82 (find_database): New function.
83 (update_database_list): New function.
84 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
85 calling update_database_list.
86 (mdatabase__check): New function.
87 (mdatabase_find): Use update_database and find_database. Don't
88 handle MDatabaseHookFunc.
89 (mdatabase_list): Call update_database at first.
90 (mdatabase_define): Adjusted for the change of mdb->extra_info.
91 (MDatabaseList): New type.
93 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
95 * m17n.h (Mdetail_text): Delete extern.
97 * m17n-core.h (mplist_conc): Delete extern.
99 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
101 (mplist_conc): Renamed to mplist__conc.
102 (mplist__pop_unref): New function.
104 2005-10-14 Kenichi Handa <handa@m17n.org>
106 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
108 (read_element): If keys is an empty plist, return any element
110 (dump_plist_element): Check if plist is nested.
111 (mplist_conc): Always ref tail.
112 (mplist_set): If key is a managing key, ref val in advance.
114 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
115 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
116 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
119 * fontset.c (free_fontset): Unref fontset_list if necessary.
120 (mfont__fontset_fini): Don't free fontset_list. Unref
122 (mfont__realize_fontset): Initialize request.
123 (mfontset): Ref default_fontset or fontset only if necessary.
124 (mfontset_copy): Don't ref copy.
126 * draw.c (render_glyphs): Check gend->type before checking
129 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
130 unrefed plists to NULL.
132 2005-10-04 Kenichi Handa <handa@m17n.org>
134 * textprop.c (mtext_serialize): Be sure to make mt
135 MTEXT_FORMAT_UTF_8 and NULL terminated.
137 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
139 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
141 2005-10-03 Kenichi Handa <handa@m17n.org>
143 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
144 is not at the beginning of line.
146 2005-09-22 Kenichi Handa <handa@m17n.org>
148 * input.c: Include <sys/stat.h> and <unistd.h>.
149 (Minclude, Mcommit, Munhandle): New variables.
150 (minput__init): Initialize them. Push only Mstate to
151 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
152 (parse_action_list): Allow integer arg for undo. Handle Mcommit
154 (load_input_method): Handle "include" directive. If no states are
156 (shift_state): If state_name is Mt, shift back to the previous
157 state. Call preedit_commit to commit preedit text.
158 (preedit_commit): New function.
159 (take_action_list): Improve debug printing. Handle commit and
161 (handle_key): Check the return value of take_action_list. Don't
162 take branch_actions just after changing to the root map.
163 (reset_ic): Reset all ic_info members.
164 (filter): When a key is not handled, just move ic_info->keys
165 instead fo calling reset_ic.
166 (load_im_info): If key is not Mstate, push Mmap to
168 (MDatabaseStatList): New type.
169 (imdir_stat_list): New variable.
170 (input_method_hook): Don't cancel the hook. Check the
171 modification time of directories.
172 (minput__fini): Free imdir_stat_list;
174 * input.h (MInputContextInfo): New member prev_state.
176 * m17n-core.h (mplist_conc): Extern it.
178 * plist.c (mplist_conc): New function.
180 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
182 * font.h (MRealizedFont): New member average_width.
184 * font-ft.c (ft_open): Set rface->average_width.
186 * font.c (xlfd_unparse_name): Print '*' before registry name.
188 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
189 (xfont_open): Set rfont->average_width.
190 (xft_open): Likewise.
191 (device_open): Initialize disp_info->AVERAGE_WIDTH.
193 * internal-gui.h (struct MFrame): New member average_width.
195 * m17n-gui.c (mframe): Fix setting of frame->rfont.
196 (mframe_get_prop): Return the average_width of a font.
198 * face.c (mface__realize): Set rface->average_width.
199 (mface__update_frame_face): Set frame->average_width.
201 * face.h (MRealizedFace): New member average_width.
203 2005-09-19 Kenichi Handa <handa@m17n.org>
205 * font.c (xlfd_unparse_name): New arg full_xlfd.
206 (mfont__encode_char): Use shortcut only for X core fonts.
207 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
208 (mfont_put_prop): Handle `language' property.
209 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
210 Print file can capability info too.
212 * m17n-core.c (mdebug__output): New variable.
213 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
214 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
215 (m17n_fini_core): Close mdebug__output if it's not stderr.
217 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
218 (xfont_open): Handle baseline_offset.
219 (xfont_find_metric): Likewise.
220 (xfont_render): Likewise.
221 (xft_open): Likewise.
222 (xft_render): Likewise.
224 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
225 (mdebug__output): Extern it.
226 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
227 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
228 (MDEBUG_DUMP): New macro.
229 (MDEBUG_PRINT_TIME): Print to medebug__output.
231 * font.h (MRealizedFont): New member baseline_offset.
233 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
235 (fc_weight_table): Add FC_WEIGHT_REGULAR.
236 (ft_list_family): Check alias.
237 (ft_list_language): If language is "en", don't try to the second
239 (ft_default_list): New variable.
240 (ft_list_default): New function.
241 (ft_select): If family is not specified, try only the default
242 fonts. Treat the weights normal and medium same.
243 (ft_open): Fix debug message. If registry is not specified, try
244 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
245 (ft_find_metric): Likewise.
246 (ft_render): Likewise.
247 (ft_list): Fix debug message. Accept the registring iso8859-1.
248 If family is not specified, try only the default fonts.
250 * face.c (mface__realize): Fix logic of opening a font.
252 2005-09-16 Kenichi Handa <handa@m17n.org>
254 * face.c (mface__realize):
256 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
259 * input.c (shift_state): Fix the condition of taking init actions.
260 (take_action_list): Fix handling of pushback action.
261 (handle_key): Don't change key while checking its alias.
262 (minput__init): Initialize new variables.
263 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
266 2005-09-12 Kenichi Handa <handa@m17n.org>
268 * mtext.c (mtext__uppercase): Add proper open/close parens.
269 (mtext_titlecase): Add proper casting.
271 * input.c (parse_action_list): Handle the case that the arg is a
272 key sequence (MText or MPlist).
273 (take_action_list): Likewise.
274 (shift_state): Shorter debug message.
275 (handle_key): Terminate a debug message by "\n".
276 (reset_ic): Don't take initial actions here.
277 (minput_open_im): Print a debug message.
278 (minput_close_im): Likewise.
279 (minput_create_ic): Likewise.
280 (minput_destroy_ic): Likewise.
282 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
284 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
287 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
288 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
291 * character.c: Add Japanese documentation for
292 mchar_get_prop_table ().
294 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
296 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
297 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
298 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
300 (init_case_conversion): New function.
301 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
302 (uppercase_precheck, lowercase_precheck, final_sigma)
303 (after_soft_dotted, more_above, before_dot, after_i)
304 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
306 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
308 * plist.c (read_mtext_element): Fix previous change.
310 2005-09-05 Kenichi Handa <handa@m17n.org>
312 * plist.c (read_mtext_element): Handle \uXXXX notation.
314 * internal.h (MTABLE_MALLOC): Don't use a local variable.
315 (MTABLE_ALLOCA): Change the name of local variable.
317 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
318 HAVE_FREETYPE are defined.
320 * m17n-X.c: Check HAVE_X11.
322 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
323 directory listing libraries.
324 (noinst_PROGRAMS): Define it only in maintainer mode.
326 2005-09-02 Kenichi Handa <handa@m17n.org>
328 * m17n-gui.h (mdraw_line_break_option): Extern it.
330 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
331 end of the first glyph.
332 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
334 (mdraw_line_break_option): New variable.
335 (mdraw_default_line_break): Use mtext_line_break.
337 * mtext.h (wordseg_func_table): Don't extern it.
338 (mtext__wseg_fini): Extern it.
340 * mtext.c: Don't include word-thai.h.
341 (wordseg_func_table): Delete this variable.
342 (mtext__init): Don't initialize above. Don't call
343 mtext__word_thai_init.
344 (mtext__fini): Don't free wordseg_func_table. Call
345 mtext__wseg_fini instead fo mtext__word_thai_fini.
346 (MTextWordsegFunc): Don't typedef it.
347 (mtext__word_segment): Moved to mtext-wseg.c.
349 * m17n-core.h (enum MTextLineBreakOption): New enum.
350 (mtext_line_break): Extern it.
352 * mtext-wseg.c: New file.
354 * mtext-lbrk.c: New file.
356 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
357 add mtext-lbrk.c and mtext-wseg.c.
359 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
360 the case that head is NULL.
362 2005-09-01 Kenichi Handa <handa@m17n.org>
364 * word-thai.c (wordseg_propertize): If the property value is nil,
365 don't make the property no-merge.
366 (thai_wordseg): Don't require *from and *to are set a priori. Pay
367 attention to the case that they are NULL.
368 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
371 * character.c (mchar_get_prop_table): New function.
373 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
375 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
376 (mchar_get_prop_table): Extern it.
378 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
379 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
381 * internal.h (enum MTextCoverage): New enum.
382 (MText): New member coverage.
384 * mtext.c (FORMAT_COVERAGE): New macro.
385 (insert): Copy mt2->coverage.
386 (mtext__from_data): Initialize mt->coverage.
387 (mtext__adjust_format): Update mt->coverage.
388 (mtext): Initialize mt->coverage.
389 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
390 Update mt->coverage if necessary.
391 (mtext_duplicate): Copy mt->coverage.
392 (mtext_insert, mtext_replace): New functions.
393 (mtext_dup): Use mtext_duplicate.
394 (mtext__word_segment): Don't set *from and *to if a word
395 segmentation funcion is not found.
396 (mtext_ins_char): Fix typo.
398 2005-08-25 Kenichi Handa <handa@m17n.org>
400 * font.h (MFont): New member for_full_width.
402 * font.c (compare_font_score): Prefer a font of not
405 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
406 registry charset of a font is one of CJK charsets.
408 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
409 supports some of CJK.
411 2005-08-24 Kenichi Handa <handa@m17n.org>
413 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
415 * m17n-gui.c (null_device_open): Check Mresolution param and set
418 * m17n-gd.c (device_open): Check Mresolution param and set
421 * m17n-X.c (MWDevice): New member resy.
422 (xfont_open): Set ascent, descent, and max_advance members of
424 (xft_open): Likewise.
425 (device_open): Compare also screen_num to find a device. Set
426 device->resy and frame->dpi.
428 * internal-gui.h (MFrame): New member dpi.
430 * font.h (MRealizedFont): New member max_advance.
432 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
433 (mfont__init): Don't initialize Mascent, Mdescent.
434 (Mascent, Mdescent): Delete these variables.
435 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
436 Mfont_descent instead of Mascent and Mdescent.
437 (mfont_put_prop): Allow negative size.
438 (mfont_find): Handle the case of spec->size < 0. Fix previous
440 (mfont_list): Handle the case of spec->size < 0.
441 (mfont_check): Likewise.
443 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
444 (fc_get_pattern): Handle the case of font->size < 0.
445 (ft_open): Set ascent, descent, and max_advance members of rfont.
446 (ft_find_metric): Improve rounding.
447 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
450 * face.c (mface__realize): Handle the case of font->size < 0.
452 2005-08-22 Kenichi Handa <handa@m17n.org>
454 * coding.c (MConverterStatus): Change the member buf to union.
455 (mconv_buffer_converter): Add const to the arg buf.
456 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
457 (mconv_decode): Adjusted for the change of MConverterStatus.
458 (mconv_encode_range): Likewise.
460 * m17n.h (mconv_buffer_converter): Prototype adjusted.
461 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
463 2005-08-20 Kenichi Handa <handa@m17n.org>
465 * m17n-gui.h (mfont_from_name): Prototype adjusted.
466 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
468 * m17n-X.c (xfont_open): Set members ascent, descent, and
469 max_advance of rfont.
470 (xft_open): Likewise.
472 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
474 (mfont__ft_parse_name): Add const to the arg name.
476 * font.c (xlfd_parse_name): Add const to the arg name. Call
477 mfont__set_property instead of mfont_set_spec. Set font->spacing.
478 (xlfd_unparse_name): Handle spacing.
479 (mfont__init): Initialize new variables.
480 (mfont__id): Handle spacing.
481 (mfont__merge): Likewise.
482 (mfont__set_spec): This function deleted.
483 (mfont__parse_name_into_font): Add const to the arg name. Fix the
484 condition of calling mfont__ft_parse_name.
485 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
486 (mfont_get_prop): Handle properties spacing, ascent, descent,
488 (mfont_find): Return a realized font.
489 (mfont_from_name): Add const to the arg name.
491 * font.h (enum MFontProperty): New member MFONT_SPACING.
492 (enum MFontSpacing): New enum.
493 (MFont): New members spacing and max_advance.
494 (mfont__ft_parse_name): Prototype adjusted.
495 (mfont__set_spec): Extern deleted.
496 (mfont__parse_name_into_font): Prototype adjusted.
498 2005-08-19 Kenichi Handa <handa@m17n.org>
500 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
502 * font.c (mfont_list): If FONT is null, use a temporary font.
503 (mfont_parse_name): Add const to the arg name.
505 2005-08-18 Kenichi Handa <handa@m17n.org>
507 * word-thai.c: Surround code by #ifdef and #endif to escape from
510 * font-ft.c: Mostly re-written.
512 * font-flt.c (FontLayoutCmdOTF): This type deleted.
513 (FontLayoutCmd): Type of the member otf changed..
514 (load_otf_command): Adjusted for the format change of otf command.
515 (load_command): Likewise.
516 (free_flt_command): Unref cmd->body.otf.
517 (run_otf): Ajusted for the type change of otf_cmd.
518 (run_command): Ajusted for the type change of otf_cmd. On
519 debugging, print ctx->combining_code.
520 (mfont__flt_run): Initialize ctx's members code_offset,
521 combining_code, and left_padding to 0.
523 * face.h (struct MRealizedFace): New member font.
524 (mface__realize): Prototype adjusted.
526 * face.c (find_realized_face): New arg font.
527 (find_realized_face): Adjusted for the change of MFont.
528 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
529 (mface__fini): Don't call mdebug__report_object.
530 (mface__realize): New arg font.
531 (mface__for_chars): Adjusted for the change of mfont__encode_char.
532 Optimize the latin case.
533 (mface__free_realized): Free rface->font.
534 (mface__update_frame_face): Adjusted for the change of mface__realize.
535 (mface_equal): New function.
537 * draw.c (Mcommon): New variable.
538 (visual_order): Args to mfont__encode_char changed.
539 (compose_glyph_string): Handle Mfont text property.
540 (layout_glyphs): Adjusted for the change of MFont.
541 (mdraw__init): Initialize Mcommon.
542 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
544 * font.h (enum MFontType): Members completely changed.
545 (enum MFontProperty): Move MFONT_SIZE to the tail.
546 (enum MFontSource): New enum.
547 (struct MFont): New members type, source, sizes, file, capability,
549 (struct MRealizedFont): Type of member font changed. Members
550 score, status, and encoding deleted.
551 (MFontScore): New type.
552 (MFontList): Member changed.
553 (struct MFontDriver): New member has_char. Types of members
555 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
556 (Mapple_roman): Extern them.
557 (OTF_Tag): Typedefed if not HAVE_OTF.
558 (enum MFontOpenTypeTable): New enum.
559 (MFontCapability): New type.
560 (mfont__ft_drive_otf): Prototype adjusted.
561 (mfont__score): Extern deleted.
562 (mfont__merge): Extern it.
563 (mfont__has_char): Extern it.
564 (mfont__encode_char): Prototype adjusted.
565 (mfont__open): Extern it.
566 (mfont__set_spec): Prototype adjusted.
567 (mfont__get_capability): Extern it.
569 * font.c: Include "fontset.h".
570 (M_font_capability, M_font_list, M_font_list_len): New variables.
571 (font_score_priority): Change order of initial elements.
572 (font_score_shift_bits): Fix array size.
573 (common_weight): Add "thin", "semibold", and "heavy".
574 (common_stretch): Add "ultracondensed", "extracondensed",
575 "extraexpanded", and "utltraexpand".
576 (font_weight_regular, font_weight_normal, font_weight_medium): New
578 (gen_font_name): This function deleted.
579 (find_encoding): Set font->encoding.
580 (OTF_tag): New function.
581 (otf_script_list): New variable.
582 (load_otf_script_list): New function.
583 (find_script_from_otf_tag): New function.
584 (xlfd_parse_name): Set font->type and font->source.
585 (mfont__free_realized): Free chains rfonts.
586 (font_score): Renamed from mfont__score.
587 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
588 (Mapple_roman): New variables.
589 (mfont__init): Initilize new variables. Initalize
590 default_encoding.encoding_name and
591 default_encoding.encoding_charset to Municode_full and
592 mcharset__unicode. Use SAFE* macros for allocating filepath
594 (mfont__fini): Free otf_script_list.
595 (mfont__id): New function.
596 (mfont__match_p): Check also capability member of MFont.
597 (mfont__merge): New funciton.
598 (mfont__set_spec_from_face): Set type and source members.
599 (mfont__set_spec_from_plist): Set capability and type members.
600 (mfont__select): Argument changed.
601 (mfont__available): New function.
602 (compare_font_score): New function.
603 (mfont__list): New function.
604 (mfont__open): Return a realized font.
605 (mfont__resize): Adjusted for the change of MFont.
606 (mfont__has_char): New function.
607 (mfont__encode_char): Argument changed.
608 (mfont__set_spec): Argument changed.
609 (free_font_capability): New function.
610 (mfont__get_capability): New function.
611 (MFontfile): New variable.
612 (mfont_get_prop): Adjusted for the change of MFont.
613 (mfont_put_prop): Likewise.
614 (mfont_set_selection_priority): Fix the way of setting
615 font_score_priority[].
616 (mfont_find): Use mfont__list instead of mfont__select.
617 (mfont_resize_ratio): Adjusted for the change of MFont.
618 (mfont_list): Use mfont__list.
619 (mfont_check): New function.
620 (font_score): Make it static.
622 * fontset.h (mfont__realize_fontset): Prototype adjusted.
623 (mfont__lookup_fontset): Likewise.
625 * fontset.c (struct MFontset): Delete member font_spec_list.
626 (struct MRealizedFontset): Type of member spec changed. New
628 (load_font_group): Arg spec_list deleted.
629 (load_fontset_contents): Adjusted for the change of fontset_def.
630 (free_fontset): Fix the way of freeing fontset elements.
631 (realize_fontset_elements): Argument changed.
632 (get_per_script): New function.
633 (free_realized_fontset_elements): Fix the way of feeing rfontset
635 (update_fontset_elements): Fix args to realize_fontset_elements.
636 (mfont__realize_fontset): New arg spec.
637 (try_font_list): New function.
638 (try_font_group): New arg request. Use try_font_list.
639 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
641 (mfontset): Adjusted for the change of MFontset.
642 (mfontset_copy): Likewise. Don't share plists.
643 (mfontset_modify_entry): Adjusted for the change of MFontset.
644 (mfontset_lookup): Call get_per_script.
645 (mdebug_dump_fontset): Print also the address of fonts.
647 * input.c (shift_state): Don't reset ic_info->vars.
648 (take_action_list): Call MDEBUG_PRINT fore calling
651 * internal-gui.h (MFontDriver): Don't typedef it here.
653 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
654 (MXFont): This type deleted.
656 (struct _MFontX): New struct.
657 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
658 (MDisplayInfo): Member base_font_list deleted.
659 (DEFAULT_FONT): Definition changed.
660 (FALLBACK_FONT): This maclr deleted.
661 (free_display_info): Adjusted for the change of MDisplayInfo.
662 (free_device): Argument to mfont__free_realized changed.
663 (xfont_driver): Adjusted for the change of MFontDriver.
664 (xfont_registry_list): Use MFontX instead of MXFont.
665 (MRealizedFontX): Renamed from MXFontInfo.
666 (xfont_select): Return the font found first.
667 (close_xfont): Change MXFontInfo to MRealizedFontX.
668 (xfont_open): Return the realized font.
669 (xfont_find_metric): Get xfont from rfont->fontp.
670 (xfont_has_char): New function.
671 (xfont_encode_char): Adjusted for the argument change.
672 (xfont_render): Get xfont from rfont->fontp.
673 (xfont_list): Adjusted for the argument change.
674 (MRealizedFontXft): Renamed from MXftFontInfo.
675 (xft_driver): Ajusted for the change of MFontDriver.
676 (close_xft): Change MXtfFontInfo to MRealizedFontXft
677 (xft_open_font): Argument changed.
678 (xft_open): Argument changed. Return the realized font.
679 (xft_find_metric): Get xft_font from rfont->fontp.
680 (xft_has_char, xft_encode_char): New functions.
681 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
682 font if not yet opened.
683 (device_open): Don't set frame->font.
685 * m17n-gd.c (gd_font_driver): Adjusted for the change of
687 (gd_font_open): New function.
688 (gd_render): Don't use the local variable ft_info.
689 (device_init): Adjusted for the change of gd_font_driver.
691 * textprop.c (mtext__prop_init): Initialize text_property_table.
692 Call M17N_OBJECT_ADD_ARRAY.
693 (mtext__prop_fini): Don't call mdebug__report_object.
695 * plist.c (mplist__init): Initialize plist_table.
696 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
697 (mplist__fini): Don't call mdebug__report_object.
699 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
700 (mtext__fini): Don't call mdebug__report_object.
701 (MTEXT_FORMAT_UTF_16): Correct type.
702 (mtext_data): New function.
703 (mtext_text): Fix calculation of limit and args to
706 * language.c: Include "plist.h".
707 (M_script_lang_list): New variable.
708 (mlang__init): Read languages and their information from m17n
710 (mlanguage__list): New function.
711 (Miso639_1, Miso639_2): New variables.
713 * language.h (mlanguage__list): Extern it.
715 * database.c (get_database_stream): Use SAFE_* macros for
716 allocating and freeing path.
717 (mdatabase__init): Likewise.
719 * symbol.c (msymbol__fini): Don't free symbols here.
720 (msymbol__free_table): New function.
721 (msymbol_is_managing_key): New function.
723 * symbol.h (msymbol__free_table): Extern it.
724 (msymbol__list): Extern it.
726 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
728 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
729 (struct _M17NObjectArray): New member name and next.
730 (mdebug__add_object_array): Extern it.
731 (M17N_OBJECT_ADD_ARRAY): New macro.
732 (mdebug__report_object): Don't extern it.
734 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
736 * m17n-gui.c (free_frame): Don't free frame->font.
737 (null_device_fini): Fix code for freeing
738 null_device.realized_font_list.
739 (m17n_fini_win): Free interface.
740 (mframe): Cast the return value of dlsym. Set frame->font here.
741 (mframe_get_prop): Check frame->rface->rfont before accessing the
744 * m17n-gui.h (Mfontfile): Extern it.
745 (mfont_check): Extern it.
746 (mface_equal): Extern it.
748 * m17n-core.c: Include "symbol.h".
749 (report_header_printed): This variable deleted.
750 (object_array_root): New variable.
751 (report_object_array): New function.
752 (mdebug__report_object): This function deleted.
753 (mdebug__add_object_array): New function.
754 (m17n_init_core): Call mchartable_init () before mtext_init ().
755 (m17n_fini_core): Call report_object_array (if necessary) and
756 msymbol__free_atable at the end.
758 * m17n-core.h (msymbol_is_managing_key): Extern it.
759 (mtext_data): Extern it.
760 (MTEXT_FORMAT_UTF_16): Correct type.
761 (M17NLIB_MINOR_VERSION): Changed to 3.
762 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
764 * chartab.c (mchartable__init): Initalize chartable_table.count.
765 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
766 mdebug__report_object.
768 2005-05-26 Kenichi Handa <handa@m17n.org>
770 * m17n.h (Miso639_1, Miso639_2): Extern them.
772 * symbol.h (msymbol__list): Extern it.
774 * symbol.c (msymbol__list): New function.
776 2005-05-19 Kenichi Handa <handa@m17n.org>
778 * input-gui.c (minput__win_init): Don't change the value of
781 2005-05-16 Kenichi Handa <handa@m17n.org>
783 * m17n-core.c (m17n_object): Be sure to initialize all members.
785 * font-ft.c (fc_decode_prop): Fix args to msymbol.
787 2005-05-09 Kenichi Handa <handa@m17n.org>
789 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
791 2005-04-27 Kenichi Handa <handa@m17n.org>
793 * language.c (mlang__init): Add "an" (Aragonese).
795 * word-thai.c: Add support for libthai.
796 (mtext__word_thai_init): Initialize wordseg library conditionaly.
797 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
799 * mtext.c: Include "word-thai.h" conditionaly.
800 (mtext__init): Call mtext__word_thai_init conditionaly.
801 (mtext__fini): Call mtext__word_thai_fini conditionaly.
803 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
804 not WORDCUT_LD_FLAGS.
806 2005-04-19 Kenichi Handa <handa@m17n.org>
808 * word-thai.c (wordseg_propertize): Always unref the attached
810 (thai_wordseg): Don't unref the property.
812 2005-04-18 Kenichi Handa <handa@m17n.org>
814 * word-thai.c: Include stdlib.h.
815 (wordseg_propertize): Add dummy function for the case that wordcut
816 library doesn't exist.
817 (wordseg_propertize): Fix for old wordcut library.
819 2005-04-16 Kenichi Handa <handa@m17n.org>
821 * word-thai.c: Include <stdio.h>.
823 2005-04-15 Kenichi Handa <handa@m17n.org>
825 * draw.c: Include mtext.h.
826 (linebreak_table, M_break_at_space, M_break_at_word)
827 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
828 (compose_glyph_string): Check POS before getting Mface text
830 (truncate_gstring): Give correct TO arg to line_break function.
831 (GET_LB_TYPE): New macro.
832 (find_break_backward, find_break_forward): New functions.
833 (mdraw__init): Initialize the above new variables.
834 (mdraw__fini): Free linebreak_table.
835 (mdraw_default_line_break): Use find_break_backward and
838 * word-thai.c: New file.
840 * word-thai.h: New file.
842 * mtext.c: Include word-thai.h.
843 (wordseg_func_table): New variable.
844 (mtext__init): Initialize wordseg_func_table and call
845 mtext__word_thai_init.
846 (mtext__fini): Call mtext__word_thai_fini, free
848 (MTextWordsegFunc): New type.
849 (mtext__word_segment): New function.
851 * mtext.h (wordseg_func_table): Extern it.
852 (mtext__word_segment): Extern it.
854 * m17n.c (m17n_init): Fix typo (== -> =).
856 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
857 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
859 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
860 (MTEXTPROP_VAL): New macros.
862 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
864 2005-04-07 Kenichi Handa <handa@m17n.org>
866 * database.c (load_chartable): Fix pursing of symbol name.
868 2005-03-24 Kenichi Handa <handa@m17n.org>
870 * m17n.c (m17n_init): Fix typo (== -> =).
872 2005-03-11 Kenichi Handa <handa@m17n.org>
874 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
876 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
878 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
881 2005-03-09 handa <handa@m17n.org>
883 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
884 calling m17n_init ().
886 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
887 calling m17n_init_core ().
889 2005-02-28 Kenichi Handa <handa@m17n.org>
891 * font-flt.c (mfont__flt_run): Add resulting code sequence in
894 2005-02-17 Kenichi Handa <handa@m17n.org>
896 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
897 (M_description, M_command, M_variable): New variables.
898 (load_im_info_keys): New variables.
899 (load_im_info, check_command_keyseq, get_description_advance)
900 (parse_command_list, get_command_list, parse_variable_list)
901 (get_variable_list, input_method_hook): New functions.
902 (command_list, variable_list): New variables.
903 (minput__init): Put input_method_hook to Minput_method.
904 Initialize M_description, M_command, M_variable, Mdetail_text,
905 load_im_info_keys, command_list, variable_list.
906 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
907 (Mdetail_text): New variable.
908 (minput_get_description, minput_get_commands)
909 (minput_assign_command_keys, minput_get_variables)
910 (minput_set_variable): New functions.
912 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
913 (minput_assign_command_keys, minput_get_variables)
914 (minput_set_variable): Extern them.
916 * plist.c (UNGETC): Just decrement st->p.
917 (read_mtext_element): New arg skip.
918 (read_integer_element): Likewise.
919 (read_symbol_element): Likewise.
920 (read_element): New arg KEYS.
921 (mplist__from_plist): Don't increment ref-count of NULL object.
922 (mplist__from_file): New arg KEYS.
923 (mplist_put): Don't increment ref-count of NULL object.
924 (mplist_add): Likewise.
925 (mplist_push): Likewise.
926 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
928 * plist.h (mplist__from_file): Prototype adjusted.
930 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
931 (get_database_stream): New function.
932 (load_database): Use get_database_stream.
933 (M_database_hook): New variable
934 (mdatabase__init): Initialize M_database_hook.
935 (mdatabase__load_for_keys): New function.
936 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
938 (mdatabase_define): Free mdb->extra_info if necessary.
940 * database.h (mdatabase__dir_list, M_database_hook)
941 (mdatabase__load_for_keys): Extern them.
942 (MDatabaseHookFunc): New type.
944 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
946 2004-12-27 Kenichi Handa <handa@m17n.org>
948 * Version 1.2.0 released.
950 2004-12-27 Kenichi Handa <handa@m17n.org>
952 * input.c (minput_filter): Don't reset ic->xxx_changed.
954 * mtext.c (mtext_from_data): Fix documentation.
956 2004-12-25 Kenichi Handa <handa@m17n.org>
958 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
959 (M17NLIB_VERSION_NAME): Update to "1.2.".
961 2004-12-24 Kenichi Handa <handa@m17n.org>
963 * input.c (reset_ic): Set key_unhandled to 0.
965 2004-12-21 Kenichi Handa <handa@m17n.org>
967 * m17n-gui.h (mfont_from_spec): Delete extern.
969 * input-gui.c (win_callback): Handle Minput_reset.
970 (minput__win_init): Register reset_ic as a callback for
973 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
974 changed. At first, shift to the initial state.
975 (minput__init): Initialize Minput_reset. Register reset_ic as a
976 callback for Minput_reset.
977 (Minput_reset): New variable.
978 (minput_filter): Always set ic->xxx_changed to 0.
979 (minput_reset_ic): New function.
980 (integer_value): Fix typo ('>' -> '<') and calculation of length
983 * m17n-core.c (merror_code): Change type to `int'.
985 * m17n-misc.h (merror_code): Adjust type.
987 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
989 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
990 (mtext_change_prop): Delete extern.
992 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
993 to `int'. Move the documents to m17n-core.h.
995 2004-12-13 Kenichi Handa <handa@m17n.org>
997 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
998 (MTextProperty): Document it.
1000 2004-12-09 Kenichi Handa <handa@m17n.org>
1002 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1004 2004-12-03 Kenichi Handa <handa@m17n.org>
1006 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1007 m17n__gui_initialized): New externs.
1009 * m17n-core.h (enum M17NStatus): New enum.
1010 (m17n_status): Extern it.
1012 * m17n-core.c (core_initialized): Delete this variable.
1013 (m17n__core_initialized, m17n__shell_initialized,
1014 m17n__gui_initialized): New variables.
1015 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1016 instead of core_initialized.
1017 (m17n_status): New function.
1019 * m17n.c (shell_initialized): Delete this variable.
1020 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1023 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1025 * m17n-gui.c (win_initialized): Delete this variable.
1026 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1027 instead of gui_initialized.
1029 2004-11-19 Kenichi Handa <handa@m17n.org>
1031 * input.c (reset_ic): Check if ic_info->state is NULL.
1032 (filter): If ic_info->state is NULL, return 0.
1033 (load_input_method): Don't unref `maps' it it's not created.
1035 2004-11-15 Kenichi Handa <handa@m17n.org>
1037 * input.c (find_candidates_group): If INDEX is -1, find the last
1039 (take_action_list): If the previous of the first candidate is
1040 requested, select the last candidate.
1042 2004-11-08 Kenichi Handa <handa@m17n.org>
1044 * m17n-X.c (device_open): Try at most 32 fonts to find a
1045 non-autoscaled font.
1047 * font.c (xlfd_parse_name): Fix previous change.
1049 2004-11-05 Kenichi Handa <handa@m17n.org>
1051 * font.c: (commont_style): Include dummy elements "slanted" and
1052 "rslanted" to prefer "o" to "r" if "i" is requested.
1054 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1056 2004-10-29 Kenichi Handa <handa@m17n.org>
1058 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1060 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1061 New members smallest and larger.
1062 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1063 (xfont_registry_list): Likewise.
1064 (xfont_select): Likewise.
1067 2004-10-28 Kenichi Handa <handa@m17n.org>
1069 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1070 font name comparison.
1071 (xfont_select): Fix logic for selecting a larger size font.
1073 2004-10-25 Kenichi Handa <handa@m17n.org>
1075 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1078 2004-10-22 Kenichi Handa <handa@m17n.org>
1080 * input.c (update_candidate): Renamed from udpate_candidate.
1081 (take_action_list): Show more debugging info on arithmetic commands.
1083 * m17n-X.c (device_open): Fix previous change.
1085 * draw.c (compose_glyph_string): Don't get face property at the
1088 2004-10-21 Kenichi Handa <handa@m17n.org>
1090 * draw.c (compose_glyph_string): Fix for the case of category
1093 2004-10-19 Kenichi Handa <handa@m17n.org>
1095 * input.c (mdebug_mask): New variable.
1096 (shift_state): Print debug information.
1097 (take_action_list): Likewise.
1098 (handle_key): Likewise.
1100 2004-10-14 Kenichi Handa <handa@m17n.org>
1102 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1104 2004-10-13 Kenichi Handa <handa@m17n.org>
1106 * m17n-X.c (device_open): Be sure to register at least one font
1109 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1110 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1112 2004-10-12 Kenichi Handa <handa@m17n.org>
1114 * draw.c (alloc_gstring): Fix previous change.
1116 * font-ft.c (ft_list_generic): Fix for the case of not
1119 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1121 * font.c (mfont_list): If no font is found, return NULL.
1122 (load_font_encoding_table): Put entries of nil registry first.
1123 (find_encoding): Adjust for the above change.
1125 2004-10-11 Kenichi Handa <handa@m17n.org>
1127 * m17n-gui.h (mfont_list): Adjust prototype.
1129 * m17n-X.c (xfont_list): New arg maxnum.
1131 * font.h (struct MFontDriver): Change prototype of <list>.
1133 * font-ft.c (fc_generic_family_list): Delete it.
1134 (Mserif, Msans_serif, Mmonospace): Delete them.
1135 (M_generic_family_info): New variable.
1136 (enum GenericFamilyType): New enum.
1137 (struct GenericFamilyInfo): New struct.
1138 (generic_family_table): New variable.
1139 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1141 (add_font_info): Get style here.
1142 (ft_list_family): Don't initialize fc_config here. Don't list
1144 (ft_list_generic): New function.
1145 (ft_select): Pay attention to generic familes here.
1146 (ft_open): Fix calculation of ascent and descent.
1147 (ft_list): Pay attention to generic families.
1148 (mfont__ft_init): Initialize M_generic_family_info,
1149 generic_family_table, and fc_config..
1150 (mfont__ft_fini): Finalize generic_family_table.
1152 * draw.c (compose_glyph_string): Use more constant font for
1153 glyphs. Adjust for the member change in MGlyph.
1154 (layout_glyph_string): Adjust for the member change in MGlyph.
1155 (alloc_gstring): Intilize scracth_glyph to avoid
1156 compose_glyph_string on it.
1157 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1158 (mdraw_coordinates_position): Fix previous change.
1160 * internal-gui.h (glyph_category): New enum.
1161 (MGlyph): Change type of <category> to enum glyph_category.
1163 * face.c (mface__realize): Delete args langauge and charset.
1164 (mface__for_chars): Fix for the case that glyphs have different
1166 (mface__update_frame_face): Adjust for mface__realize change.
1168 * face.h (mface__realize): Adjust prototype.
1170 2004-10-05 Kenichi Handa <handa@m17n.org>
1172 * language.c (mlang__init): Add Akan.
1174 2004-10-04 Kenichi Handa <handa@m17n.org>
1176 * font-ft.c (add_font_info): Add instead of push the element.
1177 (ft_list_family): For generic fonts, try all
1178 substituted. families.
1180 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1181 (run_rule): Don't update cluster range here.
1182 (run_command): Update cluster range on appending a glyph.
1183 (run_otf): Update cluster range for glyphs generated by OTF.
1185 2004-10-02 Kenichi Handa <handa@m17n.org>
1187 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1189 2004-09-30 Kenichi Handa <handa@m17n.org>
1191 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1193 2004-09-30 Kenichi Handa <handa@m17n.org>
1195 * font.h: Include <fontconfig/fontconfig.h>.
1196 (MFTInfo): New member langset.
1197 (mfont__encoding_list): Extern it.
1199 * font.c (mfont__encoding_list): New function.
1200 (mdebug_dump_font_list): New function.
1202 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1203 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1205 (ft_family_list): New variable.
1206 (set_font_info): New arg basep. Callers changed.
1207 (fc_list): Check the return value of FcPatternGetString.
1208 (add_font_info): New arg plist. Callers changed. Update
1210 (ft_list_family): New function (merged fc_list and ft_list_all).
1211 (ft_select): Use ft_list_family.
1212 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
1214 (mfont__ft_init): Initialize above new variables.
1215 (mfont__ft_fini): Free ft_family_list.
1216 (STRDUP_LOWER): New macro.
1217 (set_font_info): Use STRDUP_LOWER.
1218 (ft_list_family): Avoid duplicate addition of font path. Use
1220 (fc_decode_prop): Fix typo.
1222 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1223 (xfont_registry_list): Change argument disp_info to frame.
1225 (xfont_list_all): New function.
1226 (xfont_list): If FONT is not NULL, check all fonts.
1228 2004-09-28 Kenichi Handa <handa@m17n.org>
1230 * m17n-X.c (MXFont, MXFontList): New types.
1231 (MDisplayInfo): Delete members font_registry_list,
1232 iso8859_1_family_list, iso10646_1_family_list, new members
1233 font_list, base_font_list.
1234 (free_display_info): Adusted for the change of MDisplayInfo.
1235 (xfont_driver): Initialize with xfont_list.
1236 (font_compare): New function.
1237 (build_font_list): Deleted.
1238 (xfont_registry_list): New function.
1239 (xfont_select): Use xfont_registry_list.
1240 (xfont_list): New function.
1241 (device_open): Adusted for the change of MDisplayInfo.
1243 * font-ft.c (add_font_info): New arg languages. Callers changed.
1244 (fc_list): Get languages from fonts..
1245 (ft_list_all): Renamed from ft_list. Callers changed.
1246 (ft_list): New function.
1247 (mfont__ft_driver): Initalize with ft_list.
1249 * font.c (mfont_list): New function.
1251 * font.h (struct MFontDriver): New member `list'.
1252 (MFTInfo): New member languages.
1254 * m17n-gui.h (mfont_list): Extern it.
1256 2004-09-27 Kenichi Handa <handa@m17n.org>
1258 * internal-gui.h (struct MGlyphString): Delete members mt,
1259 sub_width, sub_lbrearing, sub_rbearing, and region.
1261 * draw.c (MSubTextExtents): New type.
1262 (layout_glyphs): New arg extents. Set its members.
1263 (layout_glyph_string): Adjusted for the above change.
1264 (alloc_gstring): Don't set gstring->mt.
1265 (truncate_gstring): Call line_break function with mt instead of
1268 2004-09-22 Kenichi Handa <handa@m17n.org>
1270 * mtext.c (count_utf_16_chars): Count each code of invalid
1273 2004-09-19 Kenichi Handa <handa@m17n.org>
1275 * mtext.c (default_utf_16, default_utf_32): Rename them to
1276 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
1279 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
1282 2004-09-13 Kenichi Handa <handa@m17n.org>
1284 * draw.c (Mlatin): Don't declare it here.
1285 (visual_order): Fix reordering of combining characters.
1286 (compose_glyph_string): Fix detection of script.
1287 (layout_glyphs): Don't fix reordering of combining characters
1289 (layout_glyph_string): Pay attention to
1290 control->disable_overlapping_adjustment.
1291 (truncate_gstring): Include at least on character in a line.
1292 (get_gstring): Always scan one full line.
1293 (mdraw__init): Don't initialize Mlatin here.
1294 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
1295 have a font, use ascent/descent of an ASCII font. Allow
1296 ink_array_return and logical_array_return to be NULL.
1297 (mdraw_coordinates_position): Fix iteration.
1299 * font-ft.c (MFTtoProp): Member completely changed.
1300 (ft_to_prop): Adjusted for the above change.
1301 (ft_to_prop_size): Likewise.
1302 (set_font_info): Adjusted for the change of MFTtoProp.
1303 (fc_generic_family_list): New variable.
1304 (fc_list): Add special handling of generic font names.
1305 (mfont__ft_init): Adjusted for the change of MFTtoProp.
1306 Initialize fc_generic_family_list.
1307 (mfont__ft_fini): Don't free ft_to_prop. Free
1308 fc_generic_family_list.
1309 (FC_vs_M17N_font_prop): New type.
1310 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
1311 (fc_decode_prop, fc_encode_prop): New functions.
1312 (mfont__ft_parse_name): Use fc_decode_prop.
1313 (mfont__ft_unparse_name): Use fc_encode_prop.
1315 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
1316 (MWDevice): Add member realized_font_list.
1317 (free_display_info): Don't free disp_info->realized_font_list.
1318 (free_device): Free device->realized_fontset_list.
1319 (xft_find_metric): Use gstring->frame instead of rfont->frame.
1320 (device_open): Don't initialize disp_info->realized_font_list.
1321 (device_open): Initialize device->realized_font_list and set it to
1322 frame->realized_font_list.
1324 * fontset.c (try_font_group): New function.
1325 (mfont__lookup_fontset): Use try_font_group.
1327 * font.c (common_weight): Change the order of "regular".
1329 * face.c (Mlatin): Don't make it static.
1330 (mface__realize): Be sure to set work_gstring.frame.
1331 (mface__for_chars): Likewise.
1333 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
1336 * internal-gui.h (Mlatin): Extern it.
1338 * m17n-gui.h (MDrawControl): New member
1339 disable_overlapping_adjustment.
1341 2004-09-06 Kenichi Handa <handa@m17n.org>
1343 * font-flt.c (run_otf): Fix typo ('}'->']').
1345 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
1346 (COMBINING_PRECOMPUTED_P): New macros.
1348 * draw.c (layout_glyphs): Handle precomputed combining code.
1350 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
1351 precomupted combining code.
1353 2004-09-03 Kenichi Handa <handa@m17n.org>
1355 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
1358 2004-08-27 Kenichi Handa <handa@m17n.org>
1360 * face.c (mface_put_prop): If the new value is the same as the
1361 current one, don't increment frame->tick.
1363 2004-08-25 Kenichi Handa <handa@m17n.org>
1365 * fontset.c (mfontset): Initialize font_spec_list member.
1366 (mfontset_copy): Load fontset if necessary.
1368 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
1369 'metrics' to for C++.
1371 * draw.c (mdraw_glyph_info): Adjusted for the member name change
1374 2004-08-16 Kenichi Handa <handa@m17n.org>
1376 * Version 1.1.0 released.
1378 2004-08-13 Kenichi Handa <handa@m17n.org>
1380 * language.c (mlang__init): Add Dhivehi.
1382 * m17n-gui.c (Mx, Mfreetype): Delete it.
1383 (m17n_init_win): Don't initialize Mx and Mfreetype here.
1385 * m17n-gui.h (Mfreetype, Mxft): Extern them.
1386 (mfont_resize_ratio): Extern it.
1387 (MDrawGlyphInfo): New member logical_width;
1388 (MDrawGlyph): New type.
1389 (mdraw_glyph_list): Prototype adjusted.
1391 * m17n-X.c (xfont_open): Set type and fontp members.
1392 (xft_open): Likewise.
1394 * internal-gui.h (Mx, Mfreetype): Delete extern.
1396 * font.h (struct MRealizedFont): New member type and fontp.
1398 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1399 (Mx, Mfreetype): Declare here.
1400 (Mxft): New variable.
1401 (mfont_resize_ratio): New function.
1403 * font-ft.c (ft_open): Set type and fontp members.
1405 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
1408 2004-08-11 Kenichi Handa <handa@m17n.org>
1410 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
1413 2004-08-06 Kenichi Handa <handa@m17n.org>
1415 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
1418 * font-flt.c (run_otf): Print debugging information if necessary.
1420 2004-08-05 Kenichi Handa <handa@m17n.org>
1422 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
1423 positioning_type 5 and 6. Switch simplified.
1425 2004-08-04 Kenichi Handa <handa@m17n.org>
1427 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
1429 2004-08-02 Kenichi Handa <handa@m17n.org>
1431 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
1432 set val to 1 even if it is greater than 1.
1434 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
1436 2004-07-29 Kenichi Handa <handa@m17n.org>
1438 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
1439 debugging information.
1441 * internal.h (MDEBUG_PRINT5): New macro.
1443 * draw.c (layout_glyphs): Don't combine a zero width glyph with
1444 the previous one if the zero width glyph has left or right
1447 2004-07-26 Kenichi Handa <handa@m17n.org>
1449 * m17n-X.c (xft_render): Pay attention to members left_padding and
1450 right_padding of MGlyph.
1452 * draw.c (visual_order): Allocate one more elements for arrays as
1453 a workaround of fribidi bug.
1454 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
1455 instead of MGlyph->bidi_sensitive.
1456 (layout_glyph_string): Pay attentinon to
1457 control->orientation_reversed when padding at the head or tail.
1458 Fix adjustment of space glyph width.
1459 (get_gstring): If cursor_width or cursor_bidi is changed, don't
1462 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
1463 instead of MGlyph->bidi_sensitive.
1465 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
1467 2004-07-26 Kenichi Handa <handa@m17n.org>
1469 * draw.c (visual_order): Don't treat combined glyphs specially.
1470 (layout_glyphs): Don't get metrics glyphs that are already ready.
1471 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
1472 width with the previous one.
1473 (draw_background): Fix bar cursor position on a r2l glyph.
1475 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
1476 (run_rule): Fix place of updating cluster_begin_pos and
1477 cluster_end_pos here.
1478 (run_otf): Don't set left_padding.
1480 * font-ft.c (adjust_anchor): Type of argument `code' changed.
1482 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
1483 Fix handling of GPOS.
1484 (mfont__ft_drive_gpos): Delete this function.
1486 * font.h (mfont__ft_drive_otf): Renamed back from
1487 mfont__ft_drive_gsub.
1488 (mfont__ft_drive_gpos): Delete extern.
1490 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
1491 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
1493 2004-07-23 Kenichi Handa <handa@m17n.org>
1495 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
1496 the same bidi level.
1498 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
1500 2004-07-22 Kenichi Handa <handa@m17n.org>
1502 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
1504 2004-07-20 Kenichi Handa <handa@m17n.org>
1506 * draw.c (render_glyphs): Fix checking of g->code validity.
1508 * face.c (mface__realize): Set g.type.
1510 2004-07-18 Kenichi Handa <handa@m17n.org>
1512 * Makefile.am: Prepend ${top_srcdir} to all *.la in
1515 * m17n-gui.c (mframe): Print error message give by dlopen to
1518 2004-07-16 Kenichi Handa <handa@m17n.org>
1520 * draw.c (compose_glyph_string): Improve the way of deciding a
1521 script. For a character that doesn't have script property, use
1522 the last non-latin script.
1524 * font-ft.c (fc_list): Cancel previous change.
1525 (mfont__ft_init): Add more entries in ft_to_prop_name.
1527 2004-07-15 Kenichi Handa <handa@m17n.org>
1529 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
1530 previous or next character glyphs.
1532 2004-07-14 Kenichi Handa <handa@m17n.org>
1534 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
1535 of type GLYPH_SPACE.
1537 * fontset.c (mfont__lookup_fontset): If glyph type is
1538 GLYPH_SPACE, get codes for SPACE.
1540 * internal-gui.h (Mfont): Delete extern.
1542 * m17n-gui.h (Mfont): Delete duplicated extern.
1544 2004-07-13 Kenichi Handa <handa@m17n.org>
1546 * font-ft.c (DEVICE_DELTA): New macro.
1547 (adjust_anchor): New function.
1548 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
1550 (mfont__ft_drive_gpos): New function.
1552 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
1553 (FontLayoutContext): Delete member `rfont'.
1554 (run_otf): Set g->otf_cmd. Call
1555 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
1556 only whne HAVE_OTF is defined.
1558 * fontset.c: Include "config.h".
1560 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
1561 (MGlyph): New member otf_cmd.
1563 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
1564 (mfont__ft_drive_gpos): Extern it.
1566 * face.c: Include "config.h".
1568 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
1570 * input-gui.c: Include "config.h".
1572 * plist.c: Include "config.h".
1574 2004-07-06 Kenichi Handa <handa@m17n.org>
1576 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
1577 internal-gui.h: Cancel previous changes.
1579 * m17n-gd.h: Delete it.
1581 * Makefile.am (libm17n_core_la_LIBADD): New variable.
1582 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
1583 @XML2_LD_FLAGS@ to above.
1584 (libm17n_la_LIBADD): Add -ldl.
1585 (libm17n_la_LDFLAGS): Add -export-dynamic.
1586 (X_LD_FLAGS): Fix the order of linking.
1587 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
1588 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
1589 (libm17n_X_la_LDFLAGS): Add -module.
1590 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
1591 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1592 (libm17n_gd_la_LDFLAGS): Add -module.
1593 (include_HEADERS): Delete m17n-gd.h.
1595 2004-06-30 Kenichi Handa <handa@m17n.org>
1597 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
1598 (MDeviceLibraryInterface): Delete it.
1599 (register_device_library): Delete it.
1600 (m17n__device_library_list): Renamed from device_library_list.
1602 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
1603 (m17n_init_win): Adjust prototype.
1605 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
1606 (m17n_init_gd): New function.
1608 * m17n-gd.h: New file.
1610 * m17n-X.h: Include <m17n-gui.h>.
1611 (m17n_init_X): Extern it.
1612 (M17N_INIT): Redefine it.
1614 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
1615 (m17n_init_X): New function.
1617 * internal-gui.h (m17n__device_library_list): Extern it.
1618 (struct MDeviceDriver): New members initialized, init, and fini.
1620 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
1622 (libm17n_X_la_LIBADD): Delete aboves.
1623 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
1624 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1625 (libm17n_gd_la_LDFLAGS): Delete it.
1626 (include_HEADERS): Add m17n-gd.h.
1628 2004-06-25 Kenichi Handa <handa@m17n.org>
1630 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
1631 (libm17n_gd_la_LDFLAGS): Cancel previous change.
1633 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
1635 * font-ft.c (fc_list): If FcFontList finds no font, try
1638 * draw.c (compose_glyph_string): Terminate the last loop after
1639 doing default combining if necessary.
1641 2004-06-24 Kenichi Handa <handa@m17n.org>
1643 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
1645 * character.c (mchar_define_property): Add const to an arg.
1647 * charset.c (mchar_define_charset): Add const to an arg.
1649 * coding.c (MCodingSystem): Add const to an arg or decoder.
1650 (finish_decoding): Add const to an arg.
1651 (decode_coding_charset, decode_coding_utf_8)
1652 (decode_coding_utf_16, decode_coding_utf_32)
1653 (decode_coding_iso_2022, decode_coding_sjis)
1654 (mconv_define_coding): Likewise.
1656 * m17n-X.c (xft_find_metric): Delete unused variable.
1658 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
1661 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
1664 * mtext.c (count_utf_8_chars, count_utf_16_chars)
1665 (mtext__from_data, mtext_from_data): Add `const' to an arg.
1667 * mtext.h (mtext__from_data): Ajust prototype.
1669 2004-06-23 Kenichi Handa <handa@m17n.org>
1671 * draw.c (compose_glyph_string): Always get glyph codes by
1673 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
1674 (mdraw_glyph_list): New function.
1676 * font-flt.c (mfont__flt_run): Be sure to call
1677 rfont->driver->encode_char.
1679 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
1680 (ft_encode_char): Delete arg C.
1681 (ft_render): Don't call FT_Get_Char_Index.
1683 * font.c (mfont__encodable_p): Delete it.
1684 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
1686 * font.h (struct MFontDriver): Delete arg C of encode_char.
1687 (mfont__encodable_p): Delete extern.
1689 * m17n-X.c (xfont_encode_char): Delete arg C.
1690 (xft_find_metric): Don't cal FT_Get_Char_Index.
1691 (xft_render): Likewise.
1693 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
1695 (mdraw_glyph_list): Extern it.
1697 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
1699 2004-06-22 Kenichi Handa <handa@m17n.org>
1701 * m17n-gui.h (mfontset_lookup): Extern it.
1703 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
1705 * fontset.c (realize_fontset_elements)
1706 (free_realized_fontset_elements, update_fontset_elements): New
1708 (mfont__realize_fontset): Call realize_fontset_elements.
1709 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
1710 (mfont__lookup_fontset): If a fontset was modified, update
1711 the realized fontset.
1712 (mfontset_modify_entry): Increment fontset->tick.
1713 (mfontset_lookup): New function.
1715 2004-06-21 Kenichi Handa <handa@m17n.org>
1717 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
1719 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
1720 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
1721 length of source text 0.
1723 2004-06-21 Kenichi Handa <handa@m17n.org>
1725 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
1726 (compare): Pay attention to format other than utf-8.
1727 (copy): Delete this function.
1728 (count_by_utf_8, count_by_utf_16, insert): New functions.
1729 (count_utf_16_chars): Fix handling of a surrogate pair.
1730 (find_char_forward, find_char_backward): Likewise.
1731 (mtext__from_data): Delete unnecessary check. Fix number of
1733 (mtext_from_data): Don't count items.
1734 (mtext_ref_char): Optimize the code.
1735 (mtext_set_char): Pay attention to format other than utf-8.
1736 (mtext_cat_char): Likewise.
1737 (mtext_dup): Don't call copy, instead do allocation here.
1738 (mtext_cat): Call insert instead of copy.
1739 (mtext_ncat): Likewise.
1740 (mtext_cpy): Delete character at first and call insert instead of
1742 (mtext_ncpy): Likewise.
1743 (mtext_copy): Likewise.
1744 (mtext_duplicate): Call insert instead of copy.
1745 (mtext_del): Pay attention to format other than utf-8.
1746 (mtext_ins): Simply call insert.
1747 (mtext_ins_char): Pay attention to format other than utf-8.
1748 (mtext_tok): Call insert instead of copy.
1749 (mtext_text): Call UNIT_BYTES.
1751 * textprop.c (mtext__adjust_plist_for_change): New function.
1753 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
1754 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
1755 (CHAR_UNITS_AT): Fix typo.
1756 (CHAR_UNITS_BY_HEAD): Fix typo.
1757 (STRING_CHAR_AND_UNITS): Fix typo.
1759 * internal.h (MTEXT_READ_ONLY_P): New macro.
1761 * mtext.h (mtext__replace): Delete the extern.
1762 (mtext__adjust_foramt): Adjust prototype.
1764 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
1765 if possible. Otherwise make a copy of mmt.
1767 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
1770 2004-06-18 Kenichi Handa <handa@m17n.org>
1772 * character.h (CHAR_STRING_UTF16): Fix syntax.
1774 2004-06-16 Kenichi Handa <handa@m17n.org>
1776 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
1777 (libm17n_X_la_LIBADD): Delete it.
1778 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
1780 * m17n-X.c (device_open): Add parens in `if' condition.
1782 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
1783 (DEC_POSITION): Likewise.
1784 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
1786 2004-06-15 Kenichi Handa <handa@m17n.org>
1788 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
1791 * draw.c (compose_glyph_string): If langauge is specified, call
1792 mface__for_chars even if a text is all latin. Fix condition for
1793 setting non_ascii_found.
1795 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
1797 * m17n.h (minput_char_to_key): Delete extern.
1799 * m17n-gui.h (minput_event_to_key): Cancel previous change.
1801 * m17n-gui.c (null_device_open): Set several members of frame.
1803 2004-06-14 Kenichi Handa <handa@m17n.org>
1805 * m17n-gui.h (minput_event_to_key): Delete extern.
1807 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
1809 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
1811 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
1813 2004-06-08 Kenichi Handa <handa@m17n.org>
1815 * character.c (mchar_put_prop): Don't increment the ref-count of
1818 2004-06-04 Kenichi Handa <handa@m17n.org>
1820 * m17n-core.c (mdebug__register_object): New function.
1821 (mdebug__unregister_object): Likewise.
1823 * internal.h (mdebug__register_object, mdebug__unregister_object):
1825 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
1828 * charset.c (mcharset__load_from_database): Don't call
1829 mconv__register_charset_coding here.
1831 * coding.c (find_coding): Get a real name from an element of
1832 coding_definition_list.
1833 (mconv__register_charset_coding): Set the real name at the top of
1835 (mcoding__load_from_database): Likewise.
1836 (mconv_list_codings): Adjusted for the above change.
1838 2004-06-03 Kenichi Handa <handa@m17n.org>
1840 * coding.c (find_coding): Find by canonicalized name. Don't have
1841 to modify the element of coding_definition_list by
1843 (mconv__define_coding_from_charset): Delete it.
1844 (mconv__register_charset_coding): Canonicalize sym.
1845 (mcoding__load_from_database): Register plist modified by
1848 * coding.h (mconv__define_coding_from_charset): Don't extern it.
1850 * font-ft.c (ft_open): Fix setting of rfont->descent.
1852 2004-06-02 Kenichi Handa <handa@m17n.org>
1854 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
1855 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
1856 (xlfd_unparse_name): Renamed from xfont_build_name.
1857 (mfont__init): Initialized Mfontconfig.
1858 (mfont__free_realized): Unconditionally unref rfont->info.
1859 (mfont__select): Free `this' if it's not best.
1860 (mfont__open): Don't check frame->realized_font_list.
1861 (mfont__parse_name_into_font): New function.
1862 (Mfontconfig): New variable.
1863 (mfont_from_name): Call mfont_parse_name.
1864 (mfont_name): Call mfont_unparse_name.
1865 (mdebug_dump_font): Likewise.
1867 * font.h (struct MFontDriver): Delete members parse_name and
1869 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
1870 (mfont__parse_name_into_font): Extern it.
1872 * font-ft.c: Include "symbol.h".
1873 (close_ft): Unconditionally free filename and charmap_list of
1875 (ft_open): Duplicate base->filename. Increment ref-count of
1876 ft_info->charmap_list. Free ft_info->charmap_list and
1877 ft_info->filename on error.
1878 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
1880 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
1882 (enum xlfd_field_idx): Moved to font.c.
1883 (split_font_name, build_font_name): Likewise.
1884 (build_font_list): Call mfont__parse_name_info_font.
1885 (xfont_open): Call mfont__unparse_name. Free name.
1886 (xfont_parse_name, xfont_build_name): Moved to font.c
1887 (xft_select): Prototype deleted.
1888 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
1889 Call mfont_pase_name.
1891 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
1892 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
1895 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
1898 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
1900 2004-06-01 Kenichi Handa <handa@m17n.org>
1902 * fontset.c (mfontset_modify_entry): Pay attention to the case
1903 that fontset->font_spec_list is NULL.
1905 2004-05-31 Kenichi Handa <handa@m17n.org>
1907 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1909 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1911 * font.c (mfont__select): Print score the a font for debugging.
1913 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
1915 * coding.c (reset_coding_sjis): Check kanji and kana instead of
1916 kanji_sym and kana_sym.
1918 2004-05-28 Kenichi Handa <handa@m17n.org>
1920 * Makefile.am (VINFO): New variable.
1921 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
1922 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
1924 2004-05-27 Kenichi Handa <handa@m17n.org>
1926 The following chanages are to make device dependent functions
1927 accessible only from MDeviceDriver structure, and to add GD and
1928 null device drivers. Font drivers get also device dependent.
1930 * m17n.c (m17n_init): Increament shell_initialized.
1931 (m17n_fini): Decremented shell_initialized.
1933 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
1935 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
1936 (Mwidget, Mcolormap, Mx): Extern them.
1938 * m17n-gui.c: Include <dlfcn.h> and "config.h".
1939 (free_frame): Call frame->driver->close instead of
1941 (DLOPEN_SHLIB_EXT): New macro.
1942 (MDeviceLibraryInterface): New type.
1943 (device_library_list): New variable.
1944 (register_device_library): New function.
1945 (null_device): New variable.
1946 (null_device_close, null_device_get_prop)
1947 (null_device_realize_face, null_device_free_realized_face): New
1949 (null_driver): New variable.
1950 (null_device_init, null_device_fini, null_device_open): New
1952 (null_interface): New variable.
1953 (Mfreetype, Mdevice): Declare them.
1954 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
1955 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
1956 Mwin__Close_Device. Register drivers for Mx and Mgd.
1957 (m17n_fini_win): Decremented win_initialized. Call "fini"
1958 function of all opened devices. Don't call mwin__fini.
1959 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
1961 (mframe): Handle Mdevice key of PLIST.
1962 (mframe_get_prop): Call frame->device->get_prop instead of
1963 mwin__device_get_prop.
1965 * m17n-gd.c: New file.
1967 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
1968 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
1970 * m17n-core.c (m17n_init_core): Increate core_initialized.
1971 (m17n_fini_core): Decremented core_initialized.
1973 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
1974 (Mcolormap): Don't extern them here.
1976 * m17n-X.c (FRAME_DEVICE): New macro.
1977 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
1978 (free_display_info): Use MPLIST_DO.
1979 (free_device): Free rface->info.
1980 (xft_close): Delete it.
1981 (device_init): Renamed from mwin__init.
1982 (device_fini): Renamed from mwin__fini.
1983 (device_open): Renamed from mwin__open_device.
1984 (x_driver): New variable.
1985 (MXFontInfo): Delete member frame, add member display.
1986 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
1987 Don't declare them here.
1989 * internal-gui.h (MDeviceType): New enum.
1990 (MWDefice): Delete it.
1991 (struct MFrame): Change type of device to void *. New members
1992 device_type, driver, font_driver_list.
1993 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
1994 (MDeviceDriver): New type.
1995 (Mx, Mgd, Mfreetype): Extern them.
1996 (mwin__XXX): Delete all of them.
1998 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2000 (win_destroy_ic): Likewise.
2001 (adjust_window_and_draw): Likewise.
2002 (win_callback): Likewise.
2003 (Mxim): Declare it here.
2004 (minput_event_to_key): Call M_CHECK_READABLE.
2006 * fontset.c (mfont__lookup_fontset): Delete local variable
2009 * font.h (struct MFontDriver): Delete member close, add members
2010 parse_name and build_name.
2011 (mfont__driver_list): Delete extern.
2012 (mfont__close): Delete extern.
2014 * font.c (mfont__init): Don't set mfont__driver_list.
2015 (mfont__fini): Don't unref mfont__driver_list.
2016 (mfont__select): Try font drivers in frame->font_driver_list. Set
2017 driver member of a realized font.
2018 (mfont__close): Delete it.
2019 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2020 functions of the default frame.
2022 * font-ft.c (close_ft): Check ft_info->ft_face and work
2024 (add_font_info): Allocate ft_info by M17N_OBJECT.
2025 (ft_close): Delete it.
2026 (mfont__ft_driver): Don't set ft_close.
2027 (ft_select): Increment ref-count of best_font.
2028 (ft_open): Decremented ref-count of base. On error, call
2029 FT_Done_Face and free ft_info.
2030 (ft_find_metric): Always use XXX_MONO in load_flags.
2031 (ft_render): Fix setting of width. Call
2032 frame->driver->draw_points instead of mwin__draw_points.
2033 (ft_to_prop): Don't set mfont__driver_list.
2034 (mfont__ft_fini): Just unref ft_info.
2036 * face.c (mface__init): Exchange foreground and background of
2037 mface__default. Call mface_put_prop to set hline of
2039 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2040 (mface__free_realized): Don't call mwin__free_realized_face.
2042 * draw.c (Mdepth): Don't declare it here.
2043 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2044 (render_glyphs, render_glyph_string): Likewise.
2045 (mdraw__init): Don't set Mdepth.
2046 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2048 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2050 (mdraw_text_items): Check FRAME is writable.
2051 (mdraw_per_char_extents): Implement body.
2053 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2055 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2056 (GUI_SOURCES): Delete it.
2057 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2058 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2059 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2060 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2061 (linkgui_LDADD): Set to libm17n-gui.la
2062 (linkgui_LDFLAGS): New target.
2063 (SRC): Include ${libm17n_gui_la_SOURCES} and
2064 ${libm17n_gd_la_SOURCES}.
2066 2004-05-24 Kenichi Handa <handa@m17n.org>
2068 * draw.c (draw_background): Don't draw background even if
2069 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2071 2004-05-22 Kenichi Handa <handa@m17n.org>
2073 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2075 2004-05-20 Kenichi Handa <handa@m17n.org>
2077 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2079 * m17n-gui.c: Include "plist.h".
2080 (mframe): If PLIST is NULL, initialize it to emply plist.
2082 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2083 (xft_driver): New variable.
2084 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2085 (xft_find_metric, xft_render): New function.
2086 (mwin__init): Adjusted for the new mfont__driver_list.
2087 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2088 generated face to PARAM.
2089 (mwin__realize_face): Fix setting of box colors. Don't call hook
2091 (mwin__draw_hline): New function.
2092 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2093 (mwin__xft_render): Delete these function.
2095 * internal-gui.h (struct MFrame): New member tick.
2096 (struct MGlyphString): New member tick.
2097 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2098 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2099 (mwin__xft_render): Delete extern.
2101 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2102 (mfontset): Always increment the reference count of returned
2105 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2106 (MFTInfo): Moved to font.h.
2107 (ft_iso8859_1_font_list): Delete this variable.
2108 (set_font_info): Don't set font->property[MFONT_TYPE].
2109 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2110 (add_font_info): Change type to void.
2111 (fc_list): Change anme from xft_list. Caller changed. Include
2112 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2113 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2114 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2115 (close_ft): Don't call mwin__xft_close. Unref
2116 ft_info->extra_info.
2117 (ft_open): Don't setup ft_info->fontname. Don't call
2119 (ft_find_metric): Don't call mwin__xft_get_metric.
2120 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2121 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2122 (mfont__ft_init): Adjusted for new mfont__driver_list.
2123 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2125 * font.c (mfont__driver_list): Make it MPlist.
2126 (mfont__init): Adjust initialization of mfont__driver_list.
2127 (mfont__fini): Free mfont__driver_list.
2128 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2129 (mfont__select): Adjusted for the new mfont__driver_list.
2131 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2132 (mfont__drirver_list): Adjust prototype.
2133 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2135 * face.h (struct MFace): Delete member realized_face_list, add
2137 (struct MRealizedFace): Delete member need_update
2138 andnofont_rface, add member non_ascii_list.
2139 (mface__update_frame_face): Extern it.
2141 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2143 (get_hline_create, get_box_create): New functions.
2144 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2146 (free_face): Cancep previous change. Free face->frame_list.
2147 (serialize_hline): Do nothing if hline->width is zero.
2148 (serialize_box): Do nothing if box->width is zero.
2149 (mface__init): Setup all properties of mface__default.
2150 (mface__fini): Free hline_prop_list and box_prop_list.
2151 (mface__realize): Cancel previous change. Update
2152 face->frame_list. Setup rface->non_ascii_list.
2153 (mface__for_chars): Update rface->non_ascii_list.
2154 (mface__free_realized): Free rface->non_ascii_list.
2155 (mface__update_frame_face): New function.
2156 (mface): Initialize face->frame_list.
2157 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2159 (mface_merge): Likewise.
2160 (mface_put_prop): If key is Mhline or Mbox, get value by
2161 get_hline_create or get_box_create respectively.
2162 (mface_put_prop): Update frame->tick and call
2163 mface__update_frame_face if necessary.
2164 (mface_update): Do nothing if func is noop_hook.
2166 * draw.c (render_glyphs): If a font is not found, use
2167 mwin__draw_empty_boxes.
2168 (alloc_gstring): Initialize gstring->tick.
2169 (get_gstring): Check gstring->tick.
2171 2004-05-17 Kenichi Handa <handa@m17n.org>
2173 * face.c (find_realized_face): Return value changed. If RFONT is
2174 NULL, avoid unnecessary checking.
2175 (free_face): Free face->realized_face_list.
2176 (mface__realize): Adjusted for the change of find_realized_face.
2177 If it returns a realized face that needs update, free it and
2178 realize a new one. Push a new realized face to
2179 frame->realized_face_list instead of appending.
2180 (mface__for_chars): Adjusted for the change of find_realized_face.
2181 Short cut if the required font is in rface->ascii_rface.
2182 (mface_put_prop): Free old value if necessary. Set need_update
2183 member of realized faces to 1.
2185 * face.h (struct MFace): Delete member tick, add member
2187 (struct MRealizedFace): Delete member tick, add member
2190 2004-05-13 Kenichi Handa <handa@m17n.org>
2192 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2194 2004-05-12 Kenichi Handa <handa@m17n.org>
2196 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2198 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2199 parse it XftNameParse.
2201 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2202 (all_fonts_scaned): New variable.
2203 (set_font_info): FAMILY may be Mnil.
2204 (add_font_info): Argument changed.
2205 (xft_list): Call add_font_info in it.
2206 (ft_list): Likewise.
2207 (ft_select): Make it work in the case family is Mnil.
2208 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2209 (mfont__ft_fini): Set all_fonts_scaned to 0.
2211 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2212 that is failed to open.
2214 2004-05-10 Kenichi Handa <handa@m17n.org>
2216 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2217 device's depth is 1 (i.e. monochrome).
2219 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2220 to work around the problem of libtool.
2222 * font-ft.c: Include <freetype/ftbdf.h>.
2223 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2225 (mfont__ft_init): Initialize them.
2226 (ft_iso8859_1_font_list): New variable.
2227 (set_font_info): Detect a font containing iso8859-1 glyphs and
2228 register it in ft_iso8859_1_font_list. If the font is not
2229 scalable, assume it as BDF or PCF font and setup SIZE and RESY
2230 properties of the font from its properties.
2231 (add_font_list): If the font is not scalable, check if it is BDF
2232 or PCF font. If not, ignore it.
2233 (ft_select): If FAMILY is Mnil, return NULL only if the requested
2234 registry is not iso8859-1.
2235 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2236 ft_iso8859_1_font_list.
2237 (ft_find_metric): If the font is not scalable, assume it as BDF
2238 or PCF, and get a metric from its properties.
2239 (mfont__ft_fini): Free ft_iso8859_1_font_list.
2241 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
2243 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2244 (libm17n_la_LDFLAGS): Delete it.
2245 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2246 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2248 2004-05-06 Kenichi Handa <handa@m17n.org>
2250 * draw.c (compose_glyph_string): Fix previous change.
2252 2004-04-30 Kenichi Handa <handa@m17n.org>
2254 * font-ft.c (ft_list): Delete unused variable `result'.
2255 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
2257 2004-04-27 Kenichi Handa <handa@m17n.org>
2259 * m17n-X.c: Include config.h
2260 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
2261 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
2262 (MWDevice) [HAVE_XFT2]: New member xft_draw.
2263 (FRAME_CMAP, FRAME_VISUAL): New macros.
2264 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
2265 (xfont_driver): Make it static.
2266 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
2267 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
2268 info->xft_color_back.
2269 (MXftFontInfo) [HAVE_XFT2]: New type.
2270 (mwin__xft_close) [HAVE_XFT2]: New function.
2271 (mwin__xft_open) [HAVE_XFT2]: New function.
2272 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
2273 (mwin__xft_render) [HAVE_XFT2]: New function.
2275 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2276 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
2277 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
2280 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2282 * font-ft.c: Don't include FT_FREETYPE_H here.
2283 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
2284 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
2285 (MFTInfo): New member charmap_index.
2286 (MFTInfo) [HAVE_XFT2]: New member xft_info.
2287 (check_otf_filename): Renamed from check_filename. Return value
2289 (ft_set_property): This function deleted.
2290 (set_font_info): New function.
2291 (add_font_list): Argument changed. Add multiple fonts.
2292 (xft_list) [HAVE_XFT2]: New function.
2293 (ft_list) [not HAVE_XFT2]: New function.
2294 (ft_select): Add code for Xft.
2295 (close_ft): Likewise.
2296 (ft_open): Likewise.
2297 (ft_find_metric): Likewise.
2298 (ft_encode_char): Likewise.
2299 (ft_render): Likewise.
2301 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
2303 2004-04-26 Kenichi Handa <handa@m17n.org>
2305 * textprop.c (mtext_attach_property): Declare the return type as
2308 2004-04-21 Kenichi Handa <handa@m17n.org>
2310 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
2312 2004-04-09 Kenichi Handa <handa@m17n.org>
2314 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
2316 (load_command): Setup above members.
2318 2004-04-05 Kenichi Handa <handa@m17n.org>
2320 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
2322 2004-03-30 Kenichi Handa <handa@m17n.org>
2324 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
2327 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
2328 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
2330 2004-03-29 Kenichi Handa <handa@m17n.org>
2332 * Version 1.0 Patch Level 2 released.
2334 2004-03-29 Kenichi Handa <handa@m17n.org>
2336 * charset.c (make_charset): Set charset->fully_loaded and
2337 charset->simple correctly. Don't try to get charset->min_char and
2338 charset->max_char for a charset of method subset and superset.
2339 Don't load a mapping file here.
2340 (mcharset__init): Set unified_max.
2341 (mcharset__load_from_database): Free a working plist.
2343 * coding.c (mcoding__fini): Free all malloced data.
2345 * input-gui.c (win_create_ic): Set control.as_image for preediting
2348 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
2349 `count') to initialize the array.
2351 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
2354 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
2356 (mwin__create_window): Fix bug of setting a background pixel of a
2358 (mwin__adjust_window): Clear the window before drawing.
2360 * m17n-core.c (mdebug__report_object): Free array->objectes if
2362 (m17n_init_core): Don't set report_header_printed to 0 here.
2363 Fix debugging information.
2364 (m17n_fini_core): Set report_header_printed to 0 here.
2366 * m17n-core.h (mplist_deserialize): Extern it.
2368 * m17n-gui.c (m17n_fini_win): Fix debugging information.
2370 * m17n.c (m17n_fini): Fix debugging information.
2372 * mtext.c (mtext__adjust_foramt): New function.
2374 * mtext.h (mtext__adjust_foramt): Extern it.
2376 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2378 * plist.h (mplist__deserialize): Don't extern it.
2380 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
2381 elements of symbol_table to NULL. Report about created and freed
2382 symbols if MDEBUG_FINI is set.
2384 2004-03-22 Kenichi Handa <handa@m17n.org>
2386 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2388 * m17n.c (m17n_init): Fix the way of checking merror_code.
2390 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2392 2004-03-22 Kenichi Handa <handa@m17n.org>
2394 * fontset.c (realize_font_group): Adjust the font size by
2395 mfont__resize before selecting a font.
2397 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2399 2004-03-19 Kenichi Handa <handa@m17n.org>
2401 * Version 1.0 Patch Level 1 released.
2403 2004-03-19 Kenichi Handa <handa@m17n.org>
2405 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
2407 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
2409 2004-03-19 Kenichi Handa <handa@m17n.org>
2411 Re-apply the changes forgotten in the released version.
2413 * charset.c (mcharset__load_from_database): Call
2414 mchar_define_charset.
2416 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
2417 (mconv_encode_range): Put Mcoding text property.
2419 2004-03-18 Kenichi Handa <handa@m17n.org>
2421 * draw.c (Mdepth): New variable.
2422 (visual_order): Delete unused local var `pos'.
2423 (compose_glyph_string): Fix for the case that gstring->glyphs is
2424 realloced. Stop generating glyphs at TO. Fix handling of
2426 (layout_glyphs): Get metrics of all glyphs in advance. Set
2427 lbearing and rbearing of base of composition glyph correctly.
2428 Handle left-overhang glyphs correctly.
2429 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
2431 (dump_combining_code): Change the defualt off_x character to ".".
2432 (mdraw__init): Initialize Mdepth.
2434 * face.c (work_gstring): New variable
2435 (mface__init): Initialize work_gstring.
2436 (mface__fini): Free work_gstring.glyphs.
2437 (mface__realize): Don't handle videomode property here. Adjusted
2438 for the change of mfont__get_metric.
2439 (mface__for_chars): Adjusted for the change of mfont__get_metric.
2441 * face.h (enum face_gc): Moved to m17n-X.c.
2443 * font.h (struct MFontDriver): Arguments of find_metric changed.
2444 (mfont__select): Prototype adjusted.
2445 (mfont__get_metric): Likewise.
2446 (mfont__ft_drive_otf): Likewise.
2447 (mfont__flt_run): Likewise.
2449 * font.c (mfont__select): New argument layouter. If layouter is
2450 different in the registered font, make a new copy of realized
2452 (mfont__get_metric): Argument changed. Get metrics of multiple
2454 (mfont_find): Call mfont__select with layouter as Mnil.
2456 * font-flt.c (FontLayoutContext): New member rfont.
2457 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
2458 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
2460 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
2462 (NUM_POINTS): New macro.
2463 (MPointTable): New type.
2464 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
2465 (mfont__ft_drive_otf): New argument rfont.
2467 * fontset.c (realize_font_group): Adjusted for the changed of
2469 (check_fontset_element): This function deleted.
2471 * input-gui.c (adjust_window_and_draw): Locate a preedit window
2472 off the parent window if the preedit text is zero length.
2474 * internal-gui.h (struct MFrame): New members foreground,
2475 background, videomode, font.
2476 (struct MGlyphString): New member anti_alias.
2477 (MDrawPoint): New type.
2478 (mwin__draw_bitmap): Prototype deleted.
2479 (mwin__draw_points): Prototype added.
2481 * m17n-gui.h (MDrawControl): New member anti_alias.
2483 * m17n-gui.c (free_frame): Free frame->font.
2484 (mframe): Set the fontset of frame->face to the default fontset.
2486 * m17n-X.c (RGB_GC): New type.
2487 (enum gc_index): Renamed from enum face_gc. Member names changed.
2489 (struct MWDevice): Members foreground and background deleted. New
2490 member scratch_gc, gc_list.
2491 (DEFAULT_FONT, FALLBACK_FONT): New macros.
2492 (free_device): Free GCs in device->gc_list.
2493 (get_rgb_gc): New function.
2494 (get_gc): Renamed and argument changed from get_color.
2495 (get_gc_for_anti_alias): New function.
2496 (xfont_find_metric): Arguments changed. Get metrics of multiple
2498 (set_region): Argument changed. Caller changed.
2499 (xfont_render): Allways set a font in gc.
2500 (x_error_handler, x_io_error_handler): Define only if
2501 X_SET_ERROR_HANDLER is defined.
2502 (mwin__open_device): Create device->scratch_gc. Set members
2503 foreground, background, and videomode of frame. Call
2504 XSetErrorHandler and XSetIOErrorHandler only if
2505 X_SET_ERROR_HANDLER is defined.
2506 (struct gc_list): Deleted.
2507 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
2508 (mwin__realize_face): Adjusted for the change of the format of
2509 rface->info and the charge of set_region.
2510 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
2511 (mwin__draw_box): Likewise.
2512 (mwin__draw_bitmap): This function deleted.
2513 (mwin__draw_points): New function.
2514 (mwin__verify_region): Adjusted for the change of the format of
2515 rface->info and the charge of set_region.
2516 (mwin__create_window): Inherit backgound pixel from parent.
2517 (mwin__dump_gc): Adjusted for the change of the format of
2520 2004-03-16 Kenichi Handa <handa@m17n.org>
2522 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
2524 * input.c (M_key_alias): New variable.
2525 (handle_key): Try M_key_alias property of a key too.
2526 (minput__init): Initialize M_key_alias. Give that property to
2527 symbols in one_char_symbol. Fix bug of initializing
2530 * draw.c (compose_glyph_string): Don't handle
2531 ignore_formatting_char here. Include formatting characters in the
2532 range processed by a FTL.
2533 (layout_glyph_string): Handle ignore_formatting_char here.
2535 2004-03-12 Kenichi Handa <handa@m17n.org>
2537 * input-gui.c (win_create_ic): Enable bidi in status control.
2539 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
2541 2004-03-09 Kenichi Handa <handa@m17n.org>
2543 * input.c (load_input_method): If title is not specified, use the
2544 input method name as title.
2546 * m17n-X.c (get_color): Make it static.
2547 (xim_create_ic, xim_destroy_ic, x_error_handler)
2548 (x_io_error_handler): Likewise.
2550 2004-03-01 Kenichi Handa <handa@m17n.org>
2552 * Version 1.0 released.
2555 Copyright (C) 2003, 2004
2556 National Institute of Advanced Industrial Science and Technology (AIST)
2557 Registration Number H15PRO112
2559 This file is part of the m17n library.
2561 The m17n library is free software; you can redistribute it and/or
2562 modify it under the terms of the GNU Lesser General Public License
2563 as published by the Free Software Foundation; either version 2.1 of
2564 the License, or (at your option) any later version.
2566 The m17n library is distributed in the hope that it will be useful,
2567 but WITHOUT ANY WARRANTY; without even the implied warranty of
2568 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2569 Lesser General Public License for more details.
2571 You should have received a copy of the GNU Lesser General Public
2572 License along with the m17n library; if not, write to the Free
2573 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA