1 2005-10-29 Kenichi Handa <handa@m17n.org>
3 * input.c (get_candidate_list): Fix the timing of refering plist.
5 2005-10-28 Kenichi Handa <handa@m17n.org>
7 * input.c (load_branch): Ignore an undefined map name.
8 (load_im_info): Set im_info->title from `name' only if it's not
10 (shift_state): Always update ic->status.
11 (adjust_candidates): Renamed from adjust_candidate_command.
12 Argument changed. Caller changed.
13 (get_candidate_list, regularize_action): New functions.
14 (take_action_list): Use them. On handling Munhandle, don't set
16 (handle_key): If KEY is not handled by MAP, and MAP has
17 branch_actions, perform them.
19 * database.c (mdatabase__fini): Free dir_info->filename;
21 2005-10-20 Kenichi Handa <handa@m17n.org>
23 * input.c (marker_code): Accept '@@'.
24 (integer_value): Handle '@@'.
25 (parse_action_list): Accept a symbol argument.
26 (take_action_list): Resolve the symbol argument. Handle the
29 2005-10-18 Kenichi Handa <handa@m17n.org>
31 * input.c: Include "charset.h".
32 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
34 (MIMState): New member (M17NObject control).
35 (lookup_nested_list, set_nested_list, parse_nested_list_value)
36 (get_nested_list, resolve_variable): New functions.
37 (integer_value): New arg (MPlist **value). Set it to the plist
38 element containing the value.
39 (resolve_command): New function.
40 (load_translation): New arg (MPlist *map_actions).
41 (load_branch): New args language and name. If `keylist' is a
42 symbol, resolved that as a command name.
43 (free_map): New arg top. Free map->map_actions only if top is
45 (free_state): New function.
46 (load_state): New arg name.
47 (im_info_list): New variable.
48 (free_im_info, get_im_info_by_tags): New functions.
49 (load_im_info): Arg key changed to plist. Handle `include'.
50 Return (MInputMethodInfo *).
51 (preedit_commit): Ref ic->candidate_list.
52 (get_select_charset, adjust_candidate_command): New functions.
53 (take_action_list): Handle `include'. Adjust candidate action
54 properly. Handle control variables `candidates-charset' and
55 `candidates-group-size'.
56 (open_im): Use get_im_info.
57 (create_ic): Get global variables.
58 (load_partial_im_info): New function.
59 (get_im_info): New function.
60 (check_command_keyseq, check_command_list, check_variable_list):
62 (minput__init): Don't handle M_database_hook and Mdetail_text.
63 Initialize M_candidates, Mcandidates_group_size,
65 (parse_variable_list, get_variable_list, parse_command_list)
66 (get_command_list): Delete them.
67 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
68 (minput__fini): Simply unref command_list and variable_list.
69 (minput_get_description): Adjusted for the new form of description.
70 (minput_get_commands): Use get_nested_list.
71 (minput_assign_command_keys): Likewise.
72 (minput_get_variables, minput_set_variable): Likewise.
74 * input.h (MInputMethodInfo): New members im and maps.
76 * database.h (M_database_hook): Delete extern.
77 (MDatabaseHookFunc): Delete extern.
78 (mdatabase__check): Extern it.
80 * database.c: Include <glob.h>.
81 (MAX_TIME): New macro.
82 (Masterisk): New variable.
83 (get_database_stream): Argument changed to (MDatabaseInfo *).
85 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
86 (find_database): New function.
87 (update_database_list): New function.
88 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
89 calling update_database_list.
90 (mdatabase__check): New function.
91 (mdatabase_find): Use update_database and find_database. Don't
92 handle MDatabaseHookFunc.
93 (mdatabase_list): Call update_database at first.
94 (mdatabase_define): Adjusted for the change of mdb->extra_info.
95 (MDatabaseList): New type.
97 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
99 * m17n.h (Mdetail_text): Delete extern.
101 * m17n-core.h (mplist_conc): Delete extern.
103 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
105 (mplist_conc): Renamed to mplist__conc.
106 (mplist__pop_unref): New function.
108 2005-10-14 Kenichi Handa <handa@m17n.org>
110 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
112 (read_element): If keys is an empty plist, return any element
114 (dump_plist_element): Check if plist is nested.
115 (mplist_conc): Always ref tail.
116 (mplist_set): If key is a managing key, ref val in advance.
118 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
119 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
120 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
123 * fontset.c (free_fontset): Unref fontset_list if necessary.
124 (mfont__fontset_fini): Don't free fontset_list. Unref
126 (mfont__realize_fontset): Initialize request.
127 (mfontset): Ref default_fontset or fontset only if necessary.
128 (mfontset_copy): Don't ref copy.
130 * draw.c (render_glyphs): Check gend->type before checking
133 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
134 unrefed plists to NULL.
136 2005-10-04 Kenichi Handa <handa@m17n.org>
138 * textprop.c (mtext_serialize): Be sure to make mt
139 MTEXT_FORMAT_UTF_8 and NULL terminated.
141 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
143 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
145 2005-10-03 Kenichi Handa <handa@m17n.org>
147 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
148 is not at the beginning of line.
150 2005-09-22 Kenichi Handa <handa@m17n.org>
152 * input.c: Include <sys/stat.h> and <unistd.h>.
153 (Minclude, Mcommit, Munhandle): New variables.
154 (minput__init): Initialize them. Push only Mstate to
155 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
156 (parse_action_list): Allow integer arg for undo. Handle Mcommit
158 (load_input_method): Handle "include" directive. If no states are
160 (shift_state): If state_name is Mt, shift back to the previous
161 state. Call preedit_commit to commit preedit text.
162 (preedit_commit): New function.
163 (take_action_list): Improve debug printing. Handle commit and
165 (handle_key): Check the return value of take_action_list. Don't
166 take branch_actions just after changing to the root map.
167 (reset_ic): Reset all ic_info members.
168 (filter): When a key is not handled, just move ic_info->keys
169 instead fo calling reset_ic.
170 (load_im_info): If key is not Mstate, push Mmap to
172 (MDatabaseStatList): New type.
173 (imdir_stat_list): New variable.
174 (input_method_hook): Don't cancel the hook. Check the
175 modification time of directories.
176 (minput__fini): Free imdir_stat_list;
178 * input.h (MInputContextInfo): New member prev_state.
180 * m17n-core.h (mplist_conc): Extern it.
182 * plist.c (mplist_conc): New function.
184 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
186 * font.h (MRealizedFont): New member average_width.
188 * font-ft.c (ft_open): Set rface->average_width.
190 * font.c (xlfd_unparse_name): Print '*' before registry name.
192 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
193 (xfont_open): Set rfont->average_width.
194 (xft_open): Likewise.
195 (device_open): Initialize disp_info->AVERAGE_WIDTH.
197 * internal-gui.h (struct MFrame): New member average_width.
199 * m17n-gui.c (mframe): Fix setting of frame->rfont.
200 (mframe_get_prop): Return the average_width of a font.
202 * face.c (mface__realize): Set rface->average_width.
203 (mface__update_frame_face): Set frame->average_width.
205 * face.h (MRealizedFace): New member average_width.
207 2005-09-19 Kenichi Handa <handa@m17n.org>
209 * font.c (xlfd_unparse_name): New arg full_xlfd.
210 (mfont__encode_char): Use shortcut only for X core fonts.
211 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
212 (mfont_put_prop): Handle `language' property.
213 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
214 Print file can capability info too.
216 * m17n-core.c (mdebug__output): New variable.
217 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
218 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
219 (m17n_fini_core): Close mdebug__output if it's not stderr.
221 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
222 (xfont_open): Handle baseline_offset.
223 (xfont_find_metric): Likewise.
224 (xfont_render): Likewise.
225 (xft_open): Likewise.
226 (xft_render): Likewise.
228 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
229 (mdebug__output): Extern it.
230 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
231 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
232 (MDEBUG_DUMP): New macro.
233 (MDEBUG_PRINT_TIME): Print to medebug__output.
235 * font.h (MRealizedFont): New member baseline_offset.
237 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
239 (fc_weight_table): Add FC_WEIGHT_REGULAR.
240 (ft_list_family): Check alias.
241 (ft_list_language): If language is "en", don't try to the second
243 (ft_default_list): New variable.
244 (ft_list_default): New function.
245 (ft_select): If family is not specified, try only the default
246 fonts. Treat the weights normal and medium same.
247 (ft_open): Fix debug message. If registry is not specified, try
248 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
249 (ft_find_metric): Likewise.
250 (ft_render): Likewise.
251 (ft_list): Fix debug message. Accept the registring iso8859-1.
252 If family is not specified, try only the default fonts.
254 * face.c (mface__realize): Fix logic of opening a font.
256 2005-09-16 Kenichi Handa <handa@m17n.org>
258 * face.c (mface__realize):
260 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
263 * input.c (shift_state): Fix the condition of taking init actions.
264 (take_action_list): Fix handling of pushback action.
265 (handle_key): Don't change key while checking its alias.
266 (minput__init): Initialize new variables.
267 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
270 2005-09-12 Kenichi Handa <handa@m17n.org>
272 * mtext.c (mtext__uppercase): Add proper open/close parens.
273 (mtext_titlecase): Add proper casting.
275 * input.c (parse_action_list): Handle the case that the arg is a
276 key sequence (MText or MPlist).
277 (take_action_list): Likewise.
278 (shift_state): Shorter debug message.
279 (handle_key): Terminate a debug message by "\n".
280 (reset_ic): Don't take initial actions here.
281 (minput_open_im): Print a debug message.
282 (minput_close_im): Likewise.
283 (minput_create_ic): Likewise.
284 (minput_destroy_ic): Likewise.
286 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
288 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
291 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
292 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
295 * character.c: Add Japanese documentation for
296 mchar_get_prop_table ().
298 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
300 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
301 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
302 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
304 (init_case_conversion): New function.
305 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
306 (uppercase_precheck, lowercase_precheck, final_sigma)
307 (after_soft_dotted, more_above, before_dot, after_i)
308 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
310 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
312 * plist.c (read_mtext_element): Fix previous change.
314 2005-09-05 Kenichi Handa <handa@m17n.org>
316 * plist.c (read_mtext_element): Handle \uXXXX notation.
318 * internal.h (MTABLE_MALLOC): Don't use a local variable.
319 (MTABLE_ALLOCA): Change the name of local variable.
321 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
322 HAVE_FREETYPE are defined.
324 * m17n-X.c: Check HAVE_X11.
326 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
327 directory listing libraries.
328 (noinst_PROGRAMS): Define it only in maintainer mode.
330 2005-09-02 Kenichi Handa <handa@m17n.org>
332 * m17n-gui.h (mdraw_line_break_option): Extern it.
334 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
335 end of the first glyph.
336 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
338 (mdraw_line_break_option): New variable.
339 (mdraw_default_line_break): Use mtext_line_break.
341 * mtext.h (wordseg_func_table): Don't extern it.
342 (mtext__wseg_fini): Extern it.
344 * mtext.c: Don't include word-thai.h.
345 (wordseg_func_table): Delete this variable.
346 (mtext__init): Don't initialize above. Don't call
347 mtext__word_thai_init.
348 (mtext__fini): Don't free wordseg_func_table. Call
349 mtext__wseg_fini instead fo mtext__word_thai_fini.
350 (MTextWordsegFunc): Don't typedef it.
351 (mtext__word_segment): Moved to mtext-wseg.c.
353 * m17n-core.h (enum MTextLineBreakOption): New enum.
354 (mtext_line_break): Extern it.
356 * mtext-wseg.c: New file.
358 * mtext-lbrk.c: New file.
360 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
361 add mtext-lbrk.c and mtext-wseg.c.
363 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
364 the case that head is NULL.
366 2005-09-01 Kenichi Handa <handa@m17n.org>
368 * word-thai.c (wordseg_propertize): If the property value is nil,
369 don't make the property no-merge.
370 (thai_wordseg): Don't require *from and *to are set a priori. Pay
371 attention to the case that they are NULL.
372 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
375 * character.c (mchar_get_prop_table): New function.
377 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
379 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
380 (mchar_get_prop_table): Extern it.
382 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
383 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
385 * internal.h (enum MTextCoverage): New enum.
386 (MText): New member coverage.
388 * mtext.c (FORMAT_COVERAGE): New macro.
389 (insert): Copy mt2->coverage.
390 (mtext__from_data): Initialize mt->coverage.
391 (mtext__adjust_format): Update mt->coverage.
392 (mtext): Initialize mt->coverage.
393 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
394 Update mt->coverage if necessary.
395 (mtext_duplicate): Copy mt->coverage.
396 (mtext_insert, mtext_replace): New functions.
397 (mtext_dup): Use mtext_duplicate.
398 (mtext__word_segment): Don't set *from and *to if a word
399 segmentation funcion is not found.
400 (mtext_ins_char): Fix typo.
402 2005-08-25 Kenichi Handa <handa@m17n.org>
404 * font.h (MFont): New member for_full_width.
406 * font.c (compare_font_score): Prefer a font of not
409 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
410 registry charset of a font is one of CJK charsets.
412 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
413 supports some of CJK.
415 2005-08-24 Kenichi Handa <handa@m17n.org>
417 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
419 * m17n-gui.c (null_device_open): Check Mresolution param and set
422 * m17n-gd.c (device_open): Check Mresolution param and set
425 * m17n-X.c (MWDevice): New member resy.
426 (xfont_open): Set ascent, descent, and max_advance members of
428 (xft_open): Likewise.
429 (device_open): Compare also screen_num to find a device. Set
430 device->resy and frame->dpi.
432 * internal-gui.h (MFrame): New member dpi.
434 * font.h (MRealizedFont): New member max_advance.
436 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
437 (mfont__init): Don't initialize Mascent, Mdescent.
438 (Mascent, Mdescent): Delete these variables.
439 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
440 Mfont_descent instead of Mascent and Mdescent.
441 (mfont_put_prop): Allow negative size.
442 (mfont_find): Handle the case of spec->size < 0. Fix previous
444 (mfont_list): Handle the case of spec->size < 0.
445 (mfont_check): Likewise.
447 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
448 (fc_get_pattern): Handle the case of font->size < 0.
449 (ft_open): Set ascent, descent, and max_advance members of rfont.
450 (ft_find_metric): Improve rounding.
451 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
454 * face.c (mface__realize): Handle the case of font->size < 0.
456 2005-08-22 Kenichi Handa <handa@m17n.org>
458 * coding.c (MConverterStatus): Change the member buf to union.
459 (mconv_buffer_converter): Add const to the arg buf.
460 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
461 (mconv_decode): Adjusted for the change of MConverterStatus.
462 (mconv_encode_range): Likewise.
464 * m17n.h (mconv_buffer_converter): Prototype adjusted.
465 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
467 2005-08-20 Kenichi Handa <handa@m17n.org>
469 * m17n-gui.h (mfont_from_name): Prototype adjusted.
470 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
472 * m17n-X.c (xfont_open): Set members ascent, descent, and
473 max_advance of rfont.
474 (xft_open): Likewise.
476 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
478 (mfont__ft_parse_name): Add const to the arg name.
480 * font.c (xlfd_parse_name): Add const to the arg name. Call
481 mfont__set_property instead of mfont_set_spec. Set font->spacing.
482 (xlfd_unparse_name): Handle spacing.
483 (mfont__init): Initialize new variables.
484 (mfont__id): Handle spacing.
485 (mfont__merge): Likewise.
486 (mfont__set_spec): This function deleted.
487 (mfont__parse_name_into_font): Add const to the arg name. Fix the
488 condition of calling mfont__ft_parse_name.
489 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
490 (mfont_get_prop): Handle properties spacing, ascent, descent,
492 (mfont_find): Return a realized font.
493 (mfont_from_name): Add const to the arg name.
495 * font.h (enum MFontProperty): New member MFONT_SPACING.
496 (enum MFontSpacing): New enum.
497 (MFont): New members spacing and max_advance.
498 (mfont__ft_parse_name): Prototype adjusted.
499 (mfont__set_spec): Extern deleted.
500 (mfont__parse_name_into_font): Prototype adjusted.
502 2005-08-19 Kenichi Handa <handa@m17n.org>
504 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
506 * font.c (mfont_list): If FONT is null, use a temporary font.
507 (mfont_parse_name): Add const to the arg name.
509 2005-08-18 Kenichi Handa <handa@m17n.org>
511 * word-thai.c: Surround code by #ifdef and #endif to escape from
514 * font-ft.c: Mostly re-written.
516 * font-flt.c (FontLayoutCmdOTF): This type deleted.
517 (FontLayoutCmd): Type of the member otf changed..
518 (load_otf_command): Adjusted for the format change of otf command.
519 (load_command): Likewise.
520 (free_flt_command): Unref cmd->body.otf.
521 (run_otf): Ajusted for the type change of otf_cmd.
522 (run_command): Ajusted for the type change of otf_cmd. On
523 debugging, print ctx->combining_code.
524 (mfont__flt_run): Initialize ctx's members code_offset,
525 combining_code, and left_padding to 0.
527 * face.h (struct MRealizedFace): New member font.
528 (mface__realize): Prototype adjusted.
530 * face.c (find_realized_face): New arg font.
531 (find_realized_face): Adjusted for the change of MFont.
532 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
533 (mface__fini): Don't call mdebug__report_object.
534 (mface__realize): New arg font.
535 (mface__for_chars): Adjusted for the change of mfont__encode_char.
536 Optimize the latin case.
537 (mface__free_realized): Free rface->font.
538 (mface__update_frame_face): Adjusted for the change of mface__realize.
539 (mface_equal): New function.
541 * draw.c (Mcommon): New variable.
542 (visual_order): Args to mfont__encode_char changed.
543 (compose_glyph_string): Handle Mfont text property.
544 (layout_glyphs): Adjusted for the change of MFont.
545 (mdraw__init): Initialize Mcommon.
546 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
548 * font.h (enum MFontType): Members completely changed.
549 (enum MFontProperty): Move MFONT_SIZE to the tail.
550 (enum MFontSource): New enum.
551 (struct MFont): New members type, source, sizes, file, capability,
553 (struct MRealizedFont): Type of member font changed. Members
554 score, status, and encoding deleted.
555 (MFontScore): New type.
556 (MFontList): Member changed.
557 (struct MFontDriver): New member has_char. Types of members
559 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
560 (Mapple_roman): Extern them.
561 (OTF_Tag): Typedefed if not HAVE_OTF.
562 (enum MFontOpenTypeTable): New enum.
563 (MFontCapability): New type.
564 (mfont__ft_drive_otf): Prototype adjusted.
565 (mfont__score): Extern deleted.
566 (mfont__merge): Extern it.
567 (mfont__has_char): Extern it.
568 (mfont__encode_char): Prototype adjusted.
569 (mfont__open): Extern it.
570 (mfont__set_spec): Prototype adjusted.
571 (mfont__get_capability): Extern it.
573 * font.c: Include "fontset.h".
574 (M_font_capability, M_font_list, M_font_list_len): New variables.
575 (font_score_priority): Change order of initial elements.
576 (font_score_shift_bits): Fix array size.
577 (common_weight): Add "thin", "semibold", and "heavy".
578 (common_stretch): Add "ultracondensed", "extracondensed",
579 "extraexpanded", and "utltraexpand".
580 (font_weight_regular, font_weight_normal, font_weight_medium): New
582 (gen_font_name): This function deleted.
583 (find_encoding): Set font->encoding.
584 (OTF_tag): New function.
585 (otf_script_list): New variable.
586 (load_otf_script_list): New function.
587 (find_script_from_otf_tag): New function.
588 (xlfd_parse_name): Set font->type and font->source.
589 (mfont__free_realized): Free chains rfonts.
590 (font_score): Renamed from mfont__score.
591 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
592 (Mapple_roman): New variables.
593 (mfont__init): Initilize new variables. Initalize
594 default_encoding.encoding_name and
595 default_encoding.encoding_charset to Municode_full and
596 mcharset__unicode. Use SAFE* macros for allocating filepath
598 (mfont__fini): Free otf_script_list.
599 (mfont__id): New function.
600 (mfont__match_p): Check also capability member of MFont.
601 (mfont__merge): New funciton.
602 (mfont__set_spec_from_face): Set type and source members.
603 (mfont__set_spec_from_plist): Set capability and type members.
604 (mfont__select): Argument changed.
605 (mfont__available): New function.
606 (compare_font_score): New function.
607 (mfont__list): New function.
608 (mfont__open): Return a realized font.
609 (mfont__resize): Adjusted for the change of MFont.
610 (mfont__has_char): New function.
611 (mfont__encode_char): Argument changed.
612 (mfont__set_spec): Argument changed.
613 (free_font_capability): New function.
614 (mfont__get_capability): New function.
615 (MFontfile): New variable.
616 (mfont_get_prop): Adjusted for the change of MFont.
617 (mfont_put_prop): Likewise.
618 (mfont_set_selection_priority): Fix the way of setting
619 font_score_priority[].
620 (mfont_find): Use mfont__list instead of mfont__select.
621 (mfont_resize_ratio): Adjusted for the change of MFont.
622 (mfont_list): Use mfont__list.
623 (mfont_check): New function.
624 (font_score): Make it static.
626 * fontset.h (mfont__realize_fontset): Prototype adjusted.
627 (mfont__lookup_fontset): Likewise.
629 * fontset.c (struct MFontset): Delete member font_spec_list.
630 (struct MRealizedFontset): Type of member spec changed. New
632 (load_font_group): Arg spec_list deleted.
633 (load_fontset_contents): Adjusted for the change of fontset_def.
634 (free_fontset): Fix the way of freeing fontset elements.
635 (realize_fontset_elements): Argument changed.
636 (get_per_script): New function.
637 (free_realized_fontset_elements): Fix the way of feeing rfontset
639 (update_fontset_elements): Fix args to realize_fontset_elements.
640 (mfont__realize_fontset): New arg spec.
641 (try_font_list): New function.
642 (try_font_group): New arg request. Use try_font_list.
643 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
645 (mfontset): Adjusted for the change of MFontset.
646 (mfontset_copy): Likewise. Don't share plists.
647 (mfontset_modify_entry): Adjusted for the change of MFontset.
648 (mfontset_lookup): Call get_per_script.
649 (mdebug_dump_fontset): Print also the address of fonts.
651 * input.c (shift_state): Don't reset ic_info->vars.
652 (take_action_list): Call MDEBUG_PRINT fore calling
655 * internal-gui.h (MFontDriver): Don't typedef it here.
657 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
658 (MXFont): This type deleted.
660 (struct _MFontX): New struct.
661 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
662 (MDisplayInfo): Member base_font_list deleted.
663 (DEFAULT_FONT): Definition changed.
664 (FALLBACK_FONT): This maclr deleted.
665 (free_display_info): Adjusted for the change of MDisplayInfo.
666 (free_device): Argument to mfont__free_realized changed.
667 (xfont_driver): Adjusted for the change of MFontDriver.
668 (xfont_registry_list): Use MFontX instead of MXFont.
669 (MRealizedFontX): Renamed from MXFontInfo.
670 (xfont_select): Return the font found first.
671 (close_xfont): Change MXFontInfo to MRealizedFontX.
672 (xfont_open): Return the realized font.
673 (xfont_find_metric): Get xfont from rfont->fontp.
674 (xfont_has_char): New function.
675 (xfont_encode_char): Adjusted for the argument change.
676 (xfont_render): Get xfont from rfont->fontp.
677 (xfont_list): Adjusted for the argument change.
678 (MRealizedFontXft): Renamed from MXftFontInfo.
679 (xft_driver): Ajusted for the change of MFontDriver.
680 (close_xft): Change MXtfFontInfo to MRealizedFontXft
681 (xft_open_font): Argument changed.
682 (xft_open): Argument changed. Return the realized font.
683 (xft_find_metric): Get xft_font from rfont->fontp.
684 (xft_has_char, xft_encode_char): New functions.
685 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
686 font if not yet opened.
687 (device_open): Don't set frame->font.
689 * m17n-gd.c (gd_font_driver): Adjusted for the change of
691 (gd_font_open): New function.
692 (gd_render): Don't use the local variable ft_info.
693 (device_init): Adjusted for the change of gd_font_driver.
695 * textprop.c (mtext__prop_init): Initialize text_property_table.
696 Call M17N_OBJECT_ADD_ARRAY.
697 (mtext__prop_fini): Don't call mdebug__report_object.
699 * plist.c (mplist__init): Initialize plist_table.
700 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
701 (mplist__fini): Don't call mdebug__report_object.
703 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
704 (mtext__fini): Don't call mdebug__report_object.
705 (MTEXT_FORMAT_UTF_16): Correct type.
706 (mtext_data): New function.
707 (mtext_text): Fix calculation of limit and args to
710 * language.c: Include "plist.h".
711 (M_script_lang_list): New variable.
712 (mlang__init): Read languages and their information from m17n
714 (mlanguage__list): New function.
715 (Miso639_1, Miso639_2): New variables.
717 * language.h (mlanguage__list): Extern it.
719 * database.c (get_database_stream): Use SAFE_* macros for
720 allocating and freeing path.
721 (mdatabase__init): Likewise.
723 * symbol.c (msymbol__fini): Don't free symbols here.
724 (msymbol__free_table): New function.
725 (msymbol_is_managing_key): New function.
727 * symbol.h (msymbol__free_table): Extern it.
728 (msymbol__list): Extern it.
730 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
732 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
733 (struct _M17NObjectArray): New member name and next.
734 (mdebug__add_object_array): Extern it.
735 (M17N_OBJECT_ADD_ARRAY): New macro.
736 (mdebug__report_object): Don't extern it.
738 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
740 * m17n-gui.c (free_frame): Don't free frame->font.
741 (null_device_fini): Fix code for freeing
742 null_device.realized_font_list.
743 (m17n_fini_win): Free interface.
744 (mframe): Cast the return value of dlsym. Set frame->font here.
745 (mframe_get_prop): Check frame->rface->rfont before accessing the
748 * m17n-gui.h (Mfontfile): Extern it.
749 (mfont_check): Extern it.
750 (mface_equal): Extern it.
752 * m17n-core.c: Include "symbol.h".
753 (report_header_printed): This variable deleted.
754 (object_array_root): New variable.
755 (report_object_array): New function.
756 (mdebug__report_object): This function deleted.
757 (mdebug__add_object_array): New function.
758 (m17n_init_core): Call mchartable_init () before mtext_init ().
759 (m17n_fini_core): Call report_object_array (if necessary) and
760 msymbol__free_atable at the end.
762 * m17n-core.h (msymbol_is_managing_key): Extern it.
763 (mtext_data): Extern it.
764 (MTEXT_FORMAT_UTF_16): Correct type.
765 (M17NLIB_MINOR_VERSION): Changed to 3.
766 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
768 * chartab.c (mchartable__init): Initalize chartable_table.count.
769 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
770 mdebug__report_object.
772 2005-05-26 Kenichi Handa <handa@m17n.org>
774 * m17n.h (Miso639_1, Miso639_2): Extern them.
776 * symbol.h (msymbol__list): Extern it.
778 * symbol.c (msymbol__list): New function.
780 2005-05-19 Kenichi Handa <handa@m17n.org>
782 * input-gui.c (minput__win_init): Don't change the value of
785 2005-05-16 Kenichi Handa <handa@m17n.org>
787 * m17n-core.c (m17n_object): Be sure to initialize all members.
789 * font-ft.c (fc_decode_prop): Fix args to msymbol.
791 2005-05-09 Kenichi Handa <handa@m17n.org>
793 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
795 2005-04-27 Kenichi Handa <handa@m17n.org>
797 * language.c (mlang__init): Add "an" (Aragonese).
799 * word-thai.c: Add support for libthai.
800 (mtext__word_thai_init): Initialize wordseg library conditionaly.
801 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
803 * mtext.c: Include "word-thai.h" conditionaly.
804 (mtext__init): Call mtext__word_thai_init conditionaly.
805 (mtext__fini): Call mtext__word_thai_fini conditionaly.
807 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
808 not WORDCUT_LD_FLAGS.
810 2005-04-19 Kenichi Handa <handa@m17n.org>
812 * word-thai.c (wordseg_propertize): Always unref the attached
814 (thai_wordseg): Don't unref the property.
816 2005-04-18 Kenichi Handa <handa@m17n.org>
818 * word-thai.c: Include stdlib.h.
819 (wordseg_propertize): Add dummy function for the case that wordcut
820 library doesn't exist.
821 (wordseg_propertize): Fix for old wordcut library.
823 2005-04-16 Kenichi Handa <handa@m17n.org>
825 * word-thai.c: Include <stdio.h>.
827 2005-04-15 Kenichi Handa <handa@m17n.org>
829 * draw.c: Include mtext.h.
830 (linebreak_table, M_break_at_space, M_break_at_word)
831 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
832 (compose_glyph_string): Check POS before getting Mface text
834 (truncate_gstring): Give correct TO arg to line_break function.
835 (GET_LB_TYPE): New macro.
836 (find_break_backward, find_break_forward): New functions.
837 (mdraw__init): Initialize the above new variables.
838 (mdraw__fini): Free linebreak_table.
839 (mdraw_default_line_break): Use find_break_backward and
842 * word-thai.c: New file.
844 * word-thai.h: New file.
846 * mtext.c: Include word-thai.h.
847 (wordseg_func_table): New variable.
848 (mtext__init): Initialize wordseg_func_table and call
849 mtext__word_thai_init.
850 (mtext__fini): Call mtext__word_thai_fini, free
852 (MTextWordsegFunc): New type.
853 (mtext__word_segment): New function.
855 * mtext.h (wordseg_func_table): Extern it.
856 (mtext__word_segment): Extern it.
858 * m17n.c (m17n_init): Fix typo (== -> =).
860 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
861 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
863 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
864 (MTEXTPROP_VAL): New macros.
866 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
868 2005-04-07 Kenichi Handa <handa@m17n.org>
870 * database.c (load_chartable): Fix pursing of symbol name.
872 2005-03-24 Kenichi Handa <handa@m17n.org>
874 * m17n.c (m17n_init): Fix typo (== -> =).
876 2005-03-11 Kenichi Handa <handa@m17n.org>
878 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
880 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
882 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
885 2005-03-09 handa <handa@m17n.org>
887 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
888 calling m17n_init ().
890 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
891 calling m17n_init_core ().
893 2005-02-28 Kenichi Handa <handa@m17n.org>
895 * font-flt.c (mfont__flt_run): Add resulting code sequence in
898 2005-02-17 Kenichi Handa <handa@m17n.org>
900 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
901 (M_description, M_command, M_variable): New variables.
902 (load_im_info_keys): New variables.
903 (load_im_info, check_command_keyseq, get_description_advance)
904 (parse_command_list, get_command_list, parse_variable_list)
905 (get_variable_list, input_method_hook): New functions.
906 (command_list, variable_list): New variables.
907 (minput__init): Put input_method_hook to Minput_method.
908 Initialize M_description, M_command, M_variable, Mdetail_text,
909 load_im_info_keys, command_list, variable_list.
910 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
911 (Mdetail_text): New variable.
912 (minput_get_description, minput_get_commands)
913 (minput_assign_command_keys, minput_get_variables)
914 (minput_set_variable): New functions.
916 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
917 (minput_assign_command_keys, minput_get_variables)
918 (minput_set_variable): Extern them.
920 * plist.c (UNGETC): Just decrement st->p.
921 (read_mtext_element): New arg skip.
922 (read_integer_element): Likewise.
923 (read_symbol_element): Likewise.
924 (read_element): New arg KEYS.
925 (mplist__from_plist): Don't increment ref-count of NULL object.
926 (mplist__from_file): New arg KEYS.
927 (mplist_put): Don't increment ref-count of NULL object.
928 (mplist_add): Likewise.
929 (mplist_push): Likewise.
930 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
932 * plist.h (mplist__from_file): Prototype adjusted.
934 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
935 (get_database_stream): New function.
936 (load_database): Use get_database_stream.
937 (M_database_hook): New variable
938 (mdatabase__init): Initialize M_database_hook.
939 (mdatabase__load_for_keys): New function.
940 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
942 (mdatabase_define): Free mdb->extra_info if necessary.
944 * database.h (mdatabase__dir_list, M_database_hook)
945 (mdatabase__load_for_keys): Extern them.
946 (MDatabaseHookFunc): New type.
948 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
950 2004-12-27 Kenichi Handa <handa@m17n.org>
952 * Version 1.2.0 released.
954 2004-12-27 Kenichi Handa <handa@m17n.org>
956 * input.c (minput_filter): Don't reset ic->xxx_changed.
958 * mtext.c (mtext_from_data): Fix documentation.
960 2004-12-25 Kenichi Handa <handa@m17n.org>
962 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
963 (M17NLIB_VERSION_NAME): Update to "1.2.".
965 2004-12-24 Kenichi Handa <handa@m17n.org>
967 * input.c (reset_ic): Set key_unhandled to 0.
969 2004-12-21 Kenichi Handa <handa@m17n.org>
971 * m17n-gui.h (mfont_from_spec): Delete extern.
973 * input-gui.c (win_callback): Handle Minput_reset.
974 (minput__win_init): Register reset_ic as a callback for
977 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
978 changed. At first, shift to the initial state.
979 (minput__init): Initialize Minput_reset. Register reset_ic as a
980 callback for Minput_reset.
981 (Minput_reset): New variable.
982 (minput_filter): Always set ic->xxx_changed to 0.
983 (minput_reset_ic): New function.
984 (integer_value): Fix typo ('>' -> '<') and calculation of length
987 * m17n-core.c (merror_code): Change type to `int'.
989 * m17n-misc.h (merror_code): Adjust type.
991 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
993 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
994 (mtext_change_prop): Delete extern.
996 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
997 to `int'. Move the documents to m17n-core.h.
999 2004-12-13 Kenichi Handa <handa@m17n.org>
1001 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1002 (MTextProperty): Document it.
1004 2004-12-09 Kenichi Handa <handa@m17n.org>
1006 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1008 2004-12-03 Kenichi Handa <handa@m17n.org>
1010 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1011 m17n__gui_initialized): New externs.
1013 * m17n-core.h (enum M17NStatus): New enum.
1014 (m17n_status): Extern it.
1016 * m17n-core.c (core_initialized): Delete this variable.
1017 (m17n__core_initialized, m17n__shell_initialized,
1018 m17n__gui_initialized): New variables.
1019 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1020 instead of core_initialized.
1021 (m17n_status): New function.
1023 * m17n.c (shell_initialized): Delete this variable.
1024 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1027 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1029 * m17n-gui.c (win_initialized): Delete this variable.
1030 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1031 instead of gui_initialized.
1033 2004-11-19 Kenichi Handa <handa@m17n.org>
1035 * input.c (reset_ic): Check if ic_info->state is NULL.
1036 (filter): If ic_info->state is NULL, return 0.
1037 (load_input_method): Don't unref `maps' it it's not created.
1039 2004-11-15 Kenichi Handa <handa@m17n.org>
1041 * input.c (find_candidates_group): If INDEX is -1, find the last
1043 (take_action_list): If the previous of the first candidate is
1044 requested, select the last candidate.
1046 2004-11-08 Kenichi Handa <handa@m17n.org>
1048 * m17n-X.c (device_open): Try at most 32 fonts to find a
1049 non-autoscaled font.
1051 * font.c (xlfd_parse_name): Fix previous change.
1053 2004-11-05 Kenichi Handa <handa@m17n.org>
1055 * font.c: (commont_style): Include dummy elements "slanted" and
1056 "rslanted" to prefer "o" to "r" if "i" is requested.
1058 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1060 2004-10-29 Kenichi Handa <handa@m17n.org>
1062 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1064 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1065 New members smallest and larger.
1066 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1067 (xfont_registry_list): Likewise.
1068 (xfont_select): Likewise.
1071 2004-10-28 Kenichi Handa <handa@m17n.org>
1073 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1074 font name comparison.
1075 (xfont_select): Fix logic for selecting a larger size font.
1077 2004-10-25 Kenichi Handa <handa@m17n.org>
1079 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1082 2004-10-22 Kenichi Handa <handa@m17n.org>
1084 * input.c (update_candidate): Renamed from udpate_candidate.
1085 (take_action_list): Show more debugging info on arithmetic commands.
1087 * m17n-X.c (device_open): Fix previous change.
1089 * draw.c (compose_glyph_string): Don't get face property at the
1092 2004-10-21 Kenichi Handa <handa@m17n.org>
1094 * draw.c (compose_glyph_string): Fix for the case of category
1097 2004-10-19 Kenichi Handa <handa@m17n.org>
1099 * input.c (mdebug_mask): New variable.
1100 (shift_state): Print debug information.
1101 (take_action_list): Likewise.
1102 (handle_key): Likewise.
1104 2004-10-14 Kenichi Handa <handa@m17n.org>
1106 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1108 2004-10-13 Kenichi Handa <handa@m17n.org>
1110 * m17n-X.c (device_open): Be sure to register at least one font
1113 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1114 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1116 2004-10-12 Kenichi Handa <handa@m17n.org>
1118 * draw.c (alloc_gstring): Fix previous change.
1120 * font-ft.c (ft_list_generic): Fix for the case of not
1123 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1125 * font.c (mfont_list): If no font is found, return NULL.
1126 (load_font_encoding_table): Put entries of nil registry first.
1127 (find_encoding): Adjust for the above change.
1129 2004-10-11 Kenichi Handa <handa@m17n.org>
1131 * m17n-gui.h (mfont_list): Adjust prototype.
1133 * m17n-X.c (xfont_list): New arg maxnum.
1135 * font.h (struct MFontDriver): Change prototype of <list>.
1137 * font-ft.c (fc_generic_family_list): Delete it.
1138 (Mserif, Msans_serif, Mmonospace): Delete them.
1139 (M_generic_family_info): New variable.
1140 (enum GenericFamilyType): New enum.
1141 (struct GenericFamilyInfo): New struct.
1142 (generic_family_table): New variable.
1143 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1145 (add_font_info): Get style here.
1146 (ft_list_family): Don't initialize fc_config here. Don't list
1148 (ft_list_generic): New function.
1149 (ft_select): Pay attention to generic familes here.
1150 (ft_open): Fix calculation of ascent and descent.
1151 (ft_list): Pay attention to generic families.
1152 (mfont__ft_init): Initialize M_generic_family_info,
1153 generic_family_table, and fc_config..
1154 (mfont__ft_fini): Finalize generic_family_table.
1156 * draw.c (compose_glyph_string): Use more constant font for
1157 glyphs. Adjust for the member change in MGlyph.
1158 (layout_glyph_string): Adjust for the member change in MGlyph.
1159 (alloc_gstring): Intilize scracth_glyph to avoid
1160 compose_glyph_string on it.
1161 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1162 (mdraw_coordinates_position): Fix previous change.
1164 * internal-gui.h (glyph_category): New enum.
1165 (MGlyph): Change type of <category> to enum glyph_category.
1167 * face.c (mface__realize): Delete args langauge and charset.
1168 (mface__for_chars): Fix for the case that glyphs have different
1170 (mface__update_frame_face): Adjust for mface__realize change.
1172 * face.h (mface__realize): Adjust prototype.
1174 2004-10-05 Kenichi Handa <handa@m17n.org>
1176 * language.c (mlang__init): Add Akan.
1178 2004-10-04 Kenichi Handa <handa@m17n.org>
1180 * font-ft.c (add_font_info): Add instead of push the element.
1181 (ft_list_family): For generic fonts, try all
1182 substituted. families.
1184 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1185 (run_rule): Don't update cluster range here.
1186 (run_command): Update cluster range on appending a glyph.
1187 (run_otf): Update cluster range for glyphs generated by OTF.
1189 2004-10-02 Kenichi Handa <handa@m17n.org>
1191 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1193 2004-09-30 Kenichi Handa <handa@m17n.org>
1195 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1197 2004-09-30 Kenichi Handa <handa@m17n.org>
1199 * font.h: Include <fontconfig/fontconfig.h>.
1200 (MFTInfo): New member langset.
1201 (mfont__encoding_list): Extern it.
1203 * font.c (mfont__encoding_list): New function.
1204 (mdebug_dump_font_list): New function.
1206 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1207 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1209 (ft_family_list): New variable.
1210 (set_font_info): New arg basep. Callers changed.
1211 (fc_list): Check the return value of FcPatternGetString.
1212 (add_font_info): New arg plist. Callers changed. Update
1214 (ft_list_family): New function (merged fc_list and ft_list_all).
1215 (ft_select): Use ft_list_family.
1216 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
1218 (mfont__ft_init): Initialize above new variables.
1219 (mfont__ft_fini): Free ft_family_list.
1220 (STRDUP_LOWER): New macro.
1221 (set_font_info): Use STRDUP_LOWER.
1222 (ft_list_family): Avoid duplicate addition of font path. Use
1224 (fc_decode_prop): Fix typo.
1226 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1227 (xfont_registry_list): Change argument disp_info to frame.
1229 (xfont_list_all): New function.
1230 (xfont_list): If FONT is not NULL, check all fonts.
1232 2004-09-28 Kenichi Handa <handa@m17n.org>
1234 * m17n-X.c (MXFont, MXFontList): New types.
1235 (MDisplayInfo): Delete members font_registry_list,
1236 iso8859_1_family_list, iso10646_1_family_list, new members
1237 font_list, base_font_list.
1238 (free_display_info): Adusted for the change of MDisplayInfo.
1239 (xfont_driver): Initialize with xfont_list.
1240 (font_compare): New function.
1241 (build_font_list): Deleted.
1242 (xfont_registry_list): New function.
1243 (xfont_select): Use xfont_registry_list.
1244 (xfont_list): New function.
1245 (device_open): Adusted for the change of MDisplayInfo.
1247 * font-ft.c (add_font_info): New arg languages. Callers changed.
1248 (fc_list): Get languages from fonts..
1249 (ft_list_all): Renamed from ft_list. Callers changed.
1250 (ft_list): New function.
1251 (mfont__ft_driver): Initalize with ft_list.
1253 * font.c (mfont_list): New function.
1255 * font.h (struct MFontDriver): New member `list'.
1256 (MFTInfo): New member languages.
1258 * m17n-gui.h (mfont_list): Extern it.
1260 2004-09-27 Kenichi Handa <handa@m17n.org>
1262 * internal-gui.h (struct MGlyphString): Delete members mt,
1263 sub_width, sub_lbrearing, sub_rbearing, and region.
1265 * draw.c (MSubTextExtents): New type.
1266 (layout_glyphs): New arg extents. Set its members.
1267 (layout_glyph_string): Adjusted for the above change.
1268 (alloc_gstring): Don't set gstring->mt.
1269 (truncate_gstring): Call line_break function with mt instead of
1272 2004-09-22 Kenichi Handa <handa@m17n.org>
1274 * mtext.c (count_utf_16_chars): Count each code of invalid
1277 2004-09-19 Kenichi Handa <handa@m17n.org>
1279 * mtext.c (default_utf_16, default_utf_32): Rename them to
1280 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
1283 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
1286 2004-09-13 Kenichi Handa <handa@m17n.org>
1288 * draw.c (Mlatin): Don't declare it here.
1289 (visual_order): Fix reordering of combining characters.
1290 (compose_glyph_string): Fix detection of script.
1291 (layout_glyphs): Don't fix reordering of combining characters
1293 (layout_glyph_string): Pay attention to
1294 control->disable_overlapping_adjustment.
1295 (truncate_gstring): Include at least on character in a line.
1296 (get_gstring): Always scan one full line.
1297 (mdraw__init): Don't initialize Mlatin here.
1298 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
1299 have a font, use ascent/descent of an ASCII font. Allow
1300 ink_array_return and logical_array_return to be NULL.
1301 (mdraw_coordinates_position): Fix iteration.
1303 * font-ft.c (MFTtoProp): Member completely changed.
1304 (ft_to_prop): Adjusted for the above change.
1305 (ft_to_prop_size): Likewise.
1306 (set_font_info): Adjusted for the change of MFTtoProp.
1307 (fc_generic_family_list): New variable.
1308 (fc_list): Add special handling of generic font names.
1309 (mfont__ft_init): Adjusted for the change of MFTtoProp.
1310 Initialize fc_generic_family_list.
1311 (mfont__ft_fini): Don't free ft_to_prop. Free
1312 fc_generic_family_list.
1313 (FC_vs_M17N_font_prop): New type.
1314 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
1315 (fc_decode_prop, fc_encode_prop): New functions.
1316 (mfont__ft_parse_name): Use fc_decode_prop.
1317 (mfont__ft_unparse_name): Use fc_encode_prop.
1319 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
1320 (MWDevice): Add member realized_font_list.
1321 (free_display_info): Don't free disp_info->realized_font_list.
1322 (free_device): Free device->realized_fontset_list.
1323 (xft_find_metric): Use gstring->frame instead of rfont->frame.
1324 (device_open): Don't initialize disp_info->realized_font_list.
1325 (device_open): Initialize device->realized_font_list and set it to
1326 frame->realized_font_list.
1328 * fontset.c (try_font_group): New function.
1329 (mfont__lookup_fontset): Use try_font_group.
1331 * font.c (common_weight): Change the order of "regular".
1333 * face.c (Mlatin): Don't make it static.
1334 (mface__realize): Be sure to set work_gstring.frame.
1335 (mface__for_chars): Likewise.
1337 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
1340 * internal-gui.h (Mlatin): Extern it.
1342 * m17n-gui.h (MDrawControl): New member
1343 disable_overlapping_adjustment.
1345 2004-09-06 Kenichi Handa <handa@m17n.org>
1347 * font-flt.c (run_otf): Fix typo ('}'->']').
1349 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
1350 (COMBINING_PRECOMPUTED_P): New macros.
1352 * draw.c (layout_glyphs): Handle precomputed combining code.
1354 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
1355 precomupted combining code.
1357 2004-09-03 Kenichi Handa <handa@m17n.org>
1359 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
1362 2004-08-27 Kenichi Handa <handa@m17n.org>
1364 * face.c (mface_put_prop): If the new value is the same as the
1365 current one, don't increment frame->tick.
1367 2004-08-25 Kenichi Handa <handa@m17n.org>
1369 * fontset.c (mfontset): Initialize font_spec_list member.
1370 (mfontset_copy): Load fontset if necessary.
1372 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
1373 'metrics' to for C++.
1375 * draw.c (mdraw_glyph_info): Adjusted for the member name change
1378 2004-08-16 Kenichi Handa <handa@m17n.org>
1380 * Version 1.1.0 released.
1382 2004-08-13 Kenichi Handa <handa@m17n.org>
1384 * language.c (mlang__init): Add Dhivehi.
1386 * m17n-gui.c (Mx, Mfreetype): Delete it.
1387 (m17n_init_win): Don't initialize Mx and Mfreetype here.
1389 * m17n-gui.h (Mfreetype, Mxft): Extern them.
1390 (mfont_resize_ratio): Extern it.
1391 (MDrawGlyphInfo): New member logical_width;
1392 (MDrawGlyph): New type.
1393 (mdraw_glyph_list): Prototype adjusted.
1395 * m17n-X.c (xfont_open): Set type and fontp members.
1396 (xft_open): Likewise.
1398 * internal-gui.h (Mx, Mfreetype): Delete extern.
1400 * font.h (struct MRealizedFont): New member type and fontp.
1402 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1403 (Mx, Mfreetype): Declare here.
1404 (Mxft): New variable.
1405 (mfont_resize_ratio): New function.
1407 * font-ft.c (ft_open): Set type and fontp members.
1409 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
1412 2004-08-11 Kenichi Handa <handa@m17n.org>
1414 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
1417 2004-08-06 Kenichi Handa <handa@m17n.org>
1419 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
1422 * font-flt.c (run_otf): Print debugging information if necessary.
1424 2004-08-05 Kenichi Handa <handa@m17n.org>
1426 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
1427 positioning_type 5 and 6. Switch simplified.
1429 2004-08-04 Kenichi Handa <handa@m17n.org>
1431 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
1433 2004-08-02 Kenichi Handa <handa@m17n.org>
1435 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
1436 set val to 1 even if it is greater than 1.
1438 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
1440 2004-07-29 Kenichi Handa <handa@m17n.org>
1442 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
1443 debugging information.
1445 * internal.h (MDEBUG_PRINT5): New macro.
1447 * draw.c (layout_glyphs): Don't combine a zero width glyph with
1448 the previous one if the zero width glyph has left or right
1451 2004-07-26 Kenichi Handa <handa@m17n.org>
1453 * m17n-X.c (xft_render): Pay attention to members left_padding and
1454 right_padding of MGlyph.
1456 * draw.c (visual_order): Allocate one more elements for arrays as
1457 a workaround of fribidi bug.
1458 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
1459 instead of MGlyph->bidi_sensitive.
1460 (layout_glyph_string): Pay attentinon to
1461 control->orientation_reversed when padding at the head or tail.
1462 Fix adjustment of space glyph width.
1463 (get_gstring): If cursor_width or cursor_bidi is changed, don't
1466 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
1467 instead of MGlyph->bidi_sensitive.
1469 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
1471 2004-07-26 Kenichi Handa <handa@m17n.org>
1473 * draw.c (visual_order): Don't treat combined glyphs specially.
1474 (layout_glyphs): Don't get metrics glyphs that are already ready.
1475 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
1476 width with the previous one.
1477 (draw_background): Fix bar cursor position on a r2l glyph.
1479 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
1480 (run_rule): Fix place of updating cluster_begin_pos and
1481 cluster_end_pos here.
1482 (run_otf): Don't set left_padding.
1484 * font-ft.c (adjust_anchor): Type of argument `code' changed.
1486 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
1487 Fix handling of GPOS.
1488 (mfont__ft_drive_gpos): Delete this function.
1490 * font.h (mfont__ft_drive_otf): Renamed back from
1491 mfont__ft_drive_gsub.
1492 (mfont__ft_drive_gpos): Delete extern.
1494 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
1495 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
1497 2004-07-23 Kenichi Handa <handa@m17n.org>
1499 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
1500 the same bidi level.
1502 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
1504 2004-07-22 Kenichi Handa <handa@m17n.org>
1506 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
1508 2004-07-20 Kenichi Handa <handa@m17n.org>
1510 * draw.c (render_glyphs): Fix checking of g->code validity.
1512 * face.c (mface__realize): Set g.type.
1514 2004-07-18 Kenichi Handa <handa@m17n.org>
1516 * Makefile.am: Prepend ${top_srcdir} to all *.la in
1519 * m17n-gui.c (mframe): Print error message give by dlopen to
1522 2004-07-16 Kenichi Handa <handa@m17n.org>
1524 * draw.c (compose_glyph_string): Improve the way of deciding a
1525 script. For a character that doesn't have script property, use
1526 the last non-latin script.
1528 * font-ft.c (fc_list): Cancel previous change.
1529 (mfont__ft_init): Add more entries in ft_to_prop_name.
1531 2004-07-15 Kenichi Handa <handa@m17n.org>
1533 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
1534 previous or next character glyphs.
1536 2004-07-14 Kenichi Handa <handa@m17n.org>
1538 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
1539 of type GLYPH_SPACE.
1541 * fontset.c (mfont__lookup_fontset): If glyph type is
1542 GLYPH_SPACE, get codes for SPACE.
1544 * internal-gui.h (Mfont): Delete extern.
1546 * m17n-gui.h (Mfont): Delete duplicated extern.
1548 2004-07-13 Kenichi Handa <handa@m17n.org>
1550 * font-ft.c (DEVICE_DELTA): New macro.
1551 (adjust_anchor): New function.
1552 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
1554 (mfont__ft_drive_gpos): New function.
1556 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
1557 (FontLayoutContext): Delete member `rfont'.
1558 (run_otf): Set g->otf_cmd. Call
1559 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
1560 only whne HAVE_OTF is defined.
1562 * fontset.c: Include "config.h".
1564 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
1565 (MGlyph): New member otf_cmd.
1567 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
1568 (mfont__ft_drive_gpos): Extern it.
1570 * face.c: Include "config.h".
1572 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
1574 * input-gui.c: Include "config.h".
1576 * plist.c: Include "config.h".
1578 2004-07-06 Kenichi Handa <handa@m17n.org>
1580 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
1581 internal-gui.h: Cancel previous changes.
1583 * m17n-gd.h: Delete it.
1585 * Makefile.am (libm17n_core_la_LIBADD): New variable.
1586 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
1587 @XML2_LD_FLAGS@ to above.
1588 (libm17n_la_LIBADD): Add -ldl.
1589 (libm17n_la_LDFLAGS): Add -export-dynamic.
1590 (X_LD_FLAGS): Fix the order of linking.
1591 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
1592 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
1593 (libm17n_X_la_LDFLAGS): Add -module.
1594 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
1595 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1596 (libm17n_gd_la_LDFLAGS): Add -module.
1597 (include_HEADERS): Delete m17n-gd.h.
1599 2004-06-30 Kenichi Handa <handa@m17n.org>
1601 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
1602 (MDeviceLibraryInterface): Delete it.
1603 (register_device_library): Delete it.
1604 (m17n__device_library_list): Renamed from device_library_list.
1606 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
1607 (m17n_init_win): Adjust prototype.
1609 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
1610 (m17n_init_gd): New function.
1612 * m17n-gd.h: New file.
1614 * m17n-X.h: Include <m17n-gui.h>.
1615 (m17n_init_X): Extern it.
1616 (M17N_INIT): Redefine it.
1618 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
1619 (m17n_init_X): New function.
1621 * internal-gui.h (m17n__device_library_list): Extern it.
1622 (struct MDeviceDriver): New members initialized, init, and fini.
1624 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
1626 (libm17n_X_la_LIBADD): Delete aboves.
1627 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
1628 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1629 (libm17n_gd_la_LDFLAGS): Delete it.
1630 (include_HEADERS): Add m17n-gd.h.
1632 2004-06-25 Kenichi Handa <handa@m17n.org>
1634 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
1635 (libm17n_gd_la_LDFLAGS): Cancel previous change.
1637 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
1639 * font-ft.c (fc_list): If FcFontList finds no font, try
1642 * draw.c (compose_glyph_string): Terminate the last loop after
1643 doing default combining if necessary.
1645 2004-06-24 Kenichi Handa <handa@m17n.org>
1647 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
1649 * character.c (mchar_define_property): Add const to an arg.
1651 * charset.c (mchar_define_charset): Add const to an arg.
1653 * coding.c (MCodingSystem): Add const to an arg or decoder.
1654 (finish_decoding): Add const to an arg.
1655 (decode_coding_charset, decode_coding_utf_8)
1656 (decode_coding_utf_16, decode_coding_utf_32)
1657 (decode_coding_iso_2022, decode_coding_sjis)
1658 (mconv_define_coding): Likewise.
1660 * m17n-X.c (xft_find_metric): Delete unused variable.
1662 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
1665 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
1668 * mtext.c (count_utf_8_chars, count_utf_16_chars)
1669 (mtext__from_data, mtext_from_data): Add `const' to an arg.
1671 * mtext.h (mtext__from_data): Ajust prototype.
1673 2004-06-23 Kenichi Handa <handa@m17n.org>
1675 * draw.c (compose_glyph_string): Always get glyph codes by
1677 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
1678 (mdraw_glyph_list): New function.
1680 * font-flt.c (mfont__flt_run): Be sure to call
1681 rfont->driver->encode_char.
1683 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
1684 (ft_encode_char): Delete arg C.
1685 (ft_render): Don't call FT_Get_Char_Index.
1687 * font.c (mfont__encodable_p): Delete it.
1688 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
1690 * font.h (struct MFontDriver): Delete arg C of encode_char.
1691 (mfont__encodable_p): Delete extern.
1693 * m17n-X.c (xfont_encode_char): Delete arg C.
1694 (xft_find_metric): Don't cal FT_Get_Char_Index.
1695 (xft_render): Likewise.
1697 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
1699 (mdraw_glyph_list): Extern it.
1701 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
1703 2004-06-22 Kenichi Handa <handa@m17n.org>
1705 * m17n-gui.h (mfontset_lookup): Extern it.
1707 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
1709 * fontset.c (realize_fontset_elements)
1710 (free_realized_fontset_elements, update_fontset_elements): New
1712 (mfont__realize_fontset): Call realize_fontset_elements.
1713 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
1714 (mfont__lookup_fontset): If a fontset was modified, update
1715 the realized fontset.
1716 (mfontset_modify_entry): Increment fontset->tick.
1717 (mfontset_lookup): New function.
1719 2004-06-21 Kenichi Handa <handa@m17n.org>
1721 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
1723 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
1724 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
1725 length of source text 0.
1727 2004-06-21 Kenichi Handa <handa@m17n.org>
1729 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
1730 (compare): Pay attention to format other than utf-8.
1731 (copy): Delete this function.
1732 (count_by_utf_8, count_by_utf_16, insert): New functions.
1733 (count_utf_16_chars): Fix handling of a surrogate pair.
1734 (find_char_forward, find_char_backward): Likewise.
1735 (mtext__from_data): Delete unnecessary check. Fix number of
1737 (mtext_from_data): Don't count items.
1738 (mtext_ref_char): Optimize the code.
1739 (mtext_set_char): Pay attention to format other than utf-8.
1740 (mtext_cat_char): Likewise.
1741 (mtext_dup): Don't call copy, instead do allocation here.
1742 (mtext_cat): Call insert instead of copy.
1743 (mtext_ncat): Likewise.
1744 (mtext_cpy): Delete character at first and call insert instead of
1746 (mtext_ncpy): Likewise.
1747 (mtext_copy): Likewise.
1748 (mtext_duplicate): Call insert instead of copy.
1749 (mtext_del): Pay attention to format other than utf-8.
1750 (mtext_ins): Simply call insert.
1751 (mtext_ins_char): Pay attention to format other than utf-8.
1752 (mtext_tok): Call insert instead of copy.
1753 (mtext_text): Call UNIT_BYTES.
1755 * textprop.c (mtext__adjust_plist_for_change): New function.
1757 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
1758 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
1759 (CHAR_UNITS_AT): Fix typo.
1760 (CHAR_UNITS_BY_HEAD): Fix typo.
1761 (STRING_CHAR_AND_UNITS): Fix typo.
1763 * internal.h (MTEXT_READ_ONLY_P): New macro.
1765 * mtext.h (mtext__replace): Delete the extern.
1766 (mtext__adjust_foramt): Adjust prototype.
1768 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
1769 if possible. Otherwise make a copy of mmt.
1771 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
1774 2004-06-18 Kenichi Handa <handa@m17n.org>
1776 * character.h (CHAR_STRING_UTF16): Fix syntax.
1778 2004-06-16 Kenichi Handa <handa@m17n.org>
1780 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
1781 (libm17n_X_la_LIBADD): Delete it.
1782 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
1784 * m17n-X.c (device_open): Add parens in `if' condition.
1786 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
1787 (DEC_POSITION): Likewise.
1788 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
1790 2004-06-15 Kenichi Handa <handa@m17n.org>
1792 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
1795 * draw.c (compose_glyph_string): If langauge is specified, call
1796 mface__for_chars even if a text is all latin. Fix condition for
1797 setting non_ascii_found.
1799 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
1801 * m17n.h (minput_char_to_key): Delete extern.
1803 * m17n-gui.h (minput_event_to_key): Cancel previous change.
1805 * m17n-gui.c (null_device_open): Set several members of frame.
1807 2004-06-14 Kenichi Handa <handa@m17n.org>
1809 * m17n-gui.h (minput_event_to_key): Delete extern.
1811 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
1813 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
1815 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
1817 2004-06-08 Kenichi Handa <handa@m17n.org>
1819 * character.c (mchar_put_prop): Don't increment the ref-count of
1822 2004-06-04 Kenichi Handa <handa@m17n.org>
1824 * m17n-core.c (mdebug__register_object): New function.
1825 (mdebug__unregister_object): Likewise.
1827 * internal.h (mdebug__register_object, mdebug__unregister_object):
1829 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
1832 * charset.c (mcharset__load_from_database): Don't call
1833 mconv__register_charset_coding here.
1835 * coding.c (find_coding): Get a real name from an element of
1836 coding_definition_list.
1837 (mconv__register_charset_coding): Set the real name at the top of
1839 (mcoding__load_from_database): Likewise.
1840 (mconv_list_codings): Adjusted for the above change.
1842 2004-06-03 Kenichi Handa <handa@m17n.org>
1844 * coding.c (find_coding): Find by canonicalized name. Don't have
1845 to modify the element of coding_definition_list by
1847 (mconv__define_coding_from_charset): Delete it.
1848 (mconv__register_charset_coding): Canonicalize sym.
1849 (mcoding__load_from_database): Register plist modified by
1852 * coding.h (mconv__define_coding_from_charset): Don't extern it.
1854 * font-ft.c (ft_open): Fix setting of rfont->descent.
1856 2004-06-02 Kenichi Handa <handa@m17n.org>
1858 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
1859 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
1860 (xlfd_unparse_name): Renamed from xfont_build_name.
1861 (mfont__init): Initialized Mfontconfig.
1862 (mfont__free_realized): Unconditionally unref rfont->info.
1863 (mfont__select): Free `this' if it's not best.
1864 (mfont__open): Don't check frame->realized_font_list.
1865 (mfont__parse_name_into_font): New function.
1866 (Mfontconfig): New variable.
1867 (mfont_from_name): Call mfont_parse_name.
1868 (mfont_name): Call mfont_unparse_name.
1869 (mdebug_dump_font): Likewise.
1871 * font.h (struct MFontDriver): Delete members parse_name and
1873 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
1874 (mfont__parse_name_into_font): Extern it.
1876 * font-ft.c: Include "symbol.h".
1877 (close_ft): Unconditionally free filename and charmap_list of
1879 (ft_open): Duplicate base->filename. Increment ref-count of
1880 ft_info->charmap_list. Free ft_info->charmap_list and
1881 ft_info->filename on error.
1882 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
1884 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
1886 (enum xlfd_field_idx): Moved to font.c.
1887 (split_font_name, build_font_name): Likewise.
1888 (build_font_list): Call mfont__parse_name_info_font.
1889 (xfont_open): Call mfont__unparse_name. Free name.
1890 (xfont_parse_name, xfont_build_name): Moved to font.c
1891 (xft_select): Prototype deleted.
1892 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
1893 Call mfont_pase_name.
1895 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
1896 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
1899 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
1902 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
1904 2004-06-01 Kenichi Handa <handa@m17n.org>
1906 * fontset.c (mfontset_modify_entry): Pay attention to the case
1907 that fontset->font_spec_list is NULL.
1909 2004-05-31 Kenichi Handa <handa@m17n.org>
1911 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1913 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1915 * font.c (mfont__select): Print score the a font for debugging.
1917 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
1919 * coding.c (reset_coding_sjis): Check kanji and kana instead of
1920 kanji_sym and kana_sym.
1922 2004-05-28 Kenichi Handa <handa@m17n.org>
1924 * Makefile.am (VINFO): New variable.
1925 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
1926 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
1928 2004-05-27 Kenichi Handa <handa@m17n.org>
1930 The following chanages are to make device dependent functions
1931 accessible only from MDeviceDriver structure, and to add GD and
1932 null device drivers. Font drivers get also device dependent.
1934 * m17n.c (m17n_init): Increament shell_initialized.
1935 (m17n_fini): Decremented shell_initialized.
1937 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
1939 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
1940 (Mwidget, Mcolormap, Mx): Extern them.
1942 * m17n-gui.c: Include <dlfcn.h> and "config.h".
1943 (free_frame): Call frame->driver->close instead of
1945 (DLOPEN_SHLIB_EXT): New macro.
1946 (MDeviceLibraryInterface): New type.
1947 (device_library_list): New variable.
1948 (register_device_library): New function.
1949 (null_device): New variable.
1950 (null_device_close, null_device_get_prop)
1951 (null_device_realize_face, null_device_free_realized_face): New
1953 (null_driver): New variable.
1954 (null_device_init, null_device_fini, null_device_open): New
1956 (null_interface): New variable.
1957 (Mfreetype, Mdevice): Declare them.
1958 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
1959 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
1960 Mwin__Close_Device. Register drivers for Mx and Mgd.
1961 (m17n_fini_win): Decremented win_initialized. Call "fini"
1962 function of all opened devices. Don't call mwin__fini.
1963 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
1965 (mframe): Handle Mdevice key of PLIST.
1966 (mframe_get_prop): Call frame->device->get_prop instead of
1967 mwin__device_get_prop.
1969 * m17n-gd.c: New file.
1971 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
1972 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
1974 * m17n-core.c (m17n_init_core): Increate core_initialized.
1975 (m17n_fini_core): Decremented core_initialized.
1977 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
1978 (Mcolormap): Don't extern them here.
1980 * m17n-X.c (FRAME_DEVICE): New macro.
1981 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
1982 (free_display_info): Use MPLIST_DO.
1983 (free_device): Free rface->info.
1984 (xft_close): Delete it.
1985 (device_init): Renamed from mwin__init.
1986 (device_fini): Renamed from mwin__fini.
1987 (device_open): Renamed from mwin__open_device.
1988 (x_driver): New variable.
1989 (MXFontInfo): Delete member frame, add member display.
1990 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
1991 Don't declare them here.
1993 * internal-gui.h (MDeviceType): New enum.
1994 (MWDefice): Delete it.
1995 (struct MFrame): Change type of device to void *. New members
1996 device_type, driver, font_driver_list.
1997 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
1998 (MDeviceDriver): New type.
1999 (Mx, Mgd, Mfreetype): Extern them.
2000 (mwin__XXX): Delete all of them.
2002 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2004 (win_destroy_ic): Likewise.
2005 (adjust_window_and_draw): Likewise.
2006 (win_callback): Likewise.
2007 (Mxim): Declare it here.
2008 (minput_event_to_key): Call M_CHECK_READABLE.
2010 * fontset.c (mfont__lookup_fontset): Delete local variable
2013 * font.h (struct MFontDriver): Delete member close, add members
2014 parse_name and build_name.
2015 (mfont__driver_list): Delete extern.
2016 (mfont__close): Delete extern.
2018 * font.c (mfont__init): Don't set mfont__driver_list.
2019 (mfont__fini): Don't unref mfont__driver_list.
2020 (mfont__select): Try font drivers in frame->font_driver_list. Set
2021 driver member of a realized font.
2022 (mfont__close): Delete it.
2023 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2024 functions of the default frame.
2026 * font-ft.c (close_ft): Check ft_info->ft_face and work
2028 (add_font_info): Allocate ft_info by M17N_OBJECT.
2029 (ft_close): Delete it.
2030 (mfont__ft_driver): Don't set ft_close.
2031 (ft_select): Increment ref-count of best_font.
2032 (ft_open): Decremented ref-count of base. On error, call
2033 FT_Done_Face and free ft_info.
2034 (ft_find_metric): Always use XXX_MONO in load_flags.
2035 (ft_render): Fix setting of width. Call
2036 frame->driver->draw_points instead of mwin__draw_points.
2037 (ft_to_prop): Don't set mfont__driver_list.
2038 (mfont__ft_fini): Just unref ft_info.
2040 * face.c (mface__init): Exchange foreground and background of
2041 mface__default. Call mface_put_prop to set hline of
2043 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2044 (mface__free_realized): Don't call mwin__free_realized_face.
2046 * draw.c (Mdepth): Don't declare it here.
2047 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2048 (render_glyphs, render_glyph_string): Likewise.
2049 (mdraw__init): Don't set Mdepth.
2050 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2052 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2054 (mdraw_text_items): Check FRAME is writable.
2055 (mdraw_per_char_extents): Implement body.
2057 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2059 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2060 (GUI_SOURCES): Delete it.
2061 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2062 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2063 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2064 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2065 (linkgui_LDADD): Set to libm17n-gui.la
2066 (linkgui_LDFLAGS): New target.
2067 (SRC): Include ${libm17n_gui_la_SOURCES} and
2068 ${libm17n_gd_la_SOURCES}.
2070 2004-05-24 Kenichi Handa <handa@m17n.org>
2072 * draw.c (draw_background): Don't draw background even if
2073 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2075 2004-05-22 Kenichi Handa <handa@m17n.org>
2077 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2079 2004-05-20 Kenichi Handa <handa@m17n.org>
2081 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2083 * m17n-gui.c: Include "plist.h".
2084 (mframe): If PLIST is NULL, initialize it to emply plist.
2086 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2087 (xft_driver): New variable.
2088 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2089 (xft_find_metric, xft_render): New function.
2090 (mwin__init): Adjusted for the new mfont__driver_list.
2091 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2092 generated face to PARAM.
2093 (mwin__realize_face): Fix setting of box colors. Don't call hook
2095 (mwin__draw_hline): New function.
2096 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2097 (mwin__xft_render): Delete these function.
2099 * internal-gui.h (struct MFrame): New member tick.
2100 (struct MGlyphString): New member tick.
2101 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2102 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2103 (mwin__xft_render): Delete extern.
2105 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2106 (mfontset): Always increment the reference count of returned
2109 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2110 (MFTInfo): Moved to font.h.
2111 (ft_iso8859_1_font_list): Delete this variable.
2112 (set_font_info): Don't set font->property[MFONT_TYPE].
2113 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2114 (add_font_info): Change type to void.
2115 (fc_list): Change anme from xft_list. Caller changed. Include
2116 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2117 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2118 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2119 (close_ft): Don't call mwin__xft_close. Unref
2120 ft_info->extra_info.
2121 (ft_open): Don't setup ft_info->fontname. Don't call
2123 (ft_find_metric): Don't call mwin__xft_get_metric.
2124 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2125 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2126 (mfont__ft_init): Adjusted for new mfont__driver_list.
2127 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2129 * font.c (mfont__driver_list): Make it MPlist.
2130 (mfont__init): Adjust initialization of mfont__driver_list.
2131 (mfont__fini): Free mfont__driver_list.
2132 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2133 (mfont__select): Adjusted for the new mfont__driver_list.
2135 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2136 (mfont__drirver_list): Adjust prototype.
2137 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2139 * face.h (struct MFace): Delete member realized_face_list, add
2141 (struct MRealizedFace): Delete member need_update
2142 andnofont_rface, add member non_ascii_list.
2143 (mface__update_frame_face): Extern it.
2145 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2147 (get_hline_create, get_box_create): New functions.
2148 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2150 (free_face): Cancep previous change. Free face->frame_list.
2151 (serialize_hline): Do nothing if hline->width is zero.
2152 (serialize_box): Do nothing if box->width is zero.
2153 (mface__init): Setup all properties of mface__default.
2154 (mface__fini): Free hline_prop_list and box_prop_list.
2155 (mface__realize): Cancel previous change. Update
2156 face->frame_list. Setup rface->non_ascii_list.
2157 (mface__for_chars): Update rface->non_ascii_list.
2158 (mface__free_realized): Free rface->non_ascii_list.
2159 (mface__update_frame_face): New function.
2160 (mface): Initialize face->frame_list.
2161 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2163 (mface_merge): Likewise.
2164 (mface_put_prop): If key is Mhline or Mbox, get value by
2165 get_hline_create or get_box_create respectively.
2166 (mface_put_prop): Update frame->tick and call
2167 mface__update_frame_face if necessary.
2168 (mface_update): Do nothing if func is noop_hook.
2170 * draw.c (render_glyphs): If a font is not found, use
2171 mwin__draw_empty_boxes.
2172 (alloc_gstring): Initialize gstring->tick.
2173 (get_gstring): Check gstring->tick.
2175 2004-05-17 Kenichi Handa <handa@m17n.org>
2177 * face.c (find_realized_face): Return value changed. If RFONT is
2178 NULL, avoid unnecessary checking.
2179 (free_face): Free face->realized_face_list.
2180 (mface__realize): Adjusted for the change of find_realized_face.
2181 If it returns a realized face that needs update, free it and
2182 realize a new one. Push a new realized face to
2183 frame->realized_face_list instead of appending.
2184 (mface__for_chars): Adjusted for the change of find_realized_face.
2185 Short cut if the required font is in rface->ascii_rface.
2186 (mface_put_prop): Free old value if necessary. Set need_update
2187 member of realized faces to 1.
2189 * face.h (struct MFace): Delete member tick, add member
2191 (struct MRealizedFace): Delete member tick, add member
2194 2004-05-13 Kenichi Handa <handa@m17n.org>
2196 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2198 2004-05-12 Kenichi Handa <handa@m17n.org>
2200 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2202 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2203 parse it XftNameParse.
2205 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2206 (all_fonts_scaned): New variable.
2207 (set_font_info): FAMILY may be Mnil.
2208 (add_font_info): Argument changed.
2209 (xft_list): Call add_font_info in it.
2210 (ft_list): Likewise.
2211 (ft_select): Make it work in the case family is Mnil.
2212 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2213 (mfont__ft_fini): Set all_fonts_scaned to 0.
2215 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2216 that is failed to open.
2218 2004-05-10 Kenichi Handa <handa@m17n.org>
2220 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2221 device's depth is 1 (i.e. monochrome).
2223 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2224 to work around the problem of libtool.
2226 * font-ft.c: Include <freetype/ftbdf.h>.
2227 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2229 (mfont__ft_init): Initialize them.
2230 (ft_iso8859_1_font_list): New variable.
2231 (set_font_info): Detect a font containing iso8859-1 glyphs and
2232 register it in ft_iso8859_1_font_list. If the font is not
2233 scalable, assume it as BDF or PCF font and setup SIZE and RESY
2234 properties of the font from its properties.
2235 (add_font_list): If the font is not scalable, check if it is BDF
2236 or PCF font. If not, ignore it.
2237 (ft_select): If FAMILY is Mnil, return NULL only if the requested
2238 registry is not iso8859-1.
2239 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2240 ft_iso8859_1_font_list.
2241 (ft_find_metric): If the font is not scalable, assume it as BDF
2242 or PCF, and get a metric from its properties.
2243 (mfont__ft_fini): Free ft_iso8859_1_font_list.
2245 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
2247 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2248 (libm17n_la_LDFLAGS): Delete it.
2249 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2250 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2252 2004-05-06 Kenichi Handa <handa@m17n.org>
2254 * draw.c (compose_glyph_string): Fix previous change.
2256 2004-04-30 Kenichi Handa <handa@m17n.org>
2258 * font-ft.c (ft_list): Delete unused variable `result'.
2259 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
2261 2004-04-27 Kenichi Handa <handa@m17n.org>
2263 * m17n-X.c: Include config.h
2264 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
2265 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
2266 (MWDevice) [HAVE_XFT2]: New member xft_draw.
2267 (FRAME_CMAP, FRAME_VISUAL): New macros.
2268 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
2269 (xfont_driver): Make it static.
2270 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
2271 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
2272 info->xft_color_back.
2273 (MXftFontInfo) [HAVE_XFT2]: New type.
2274 (mwin__xft_close) [HAVE_XFT2]: New function.
2275 (mwin__xft_open) [HAVE_XFT2]: New function.
2276 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
2277 (mwin__xft_render) [HAVE_XFT2]: New function.
2279 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2280 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
2281 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
2284 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2286 * font-ft.c: Don't include FT_FREETYPE_H here.
2287 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
2288 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
2289 (MFTInfo): New member charmap_index.
2290 (MFTInfo) [HAVE_XFT2]: New member xft_info.
2291 (check_otf_filename): Renamed from check_filename. Return value
2293 (ft_set_property): This function deleted.
2294 (set_font_info): New function.
2295 (add_font_list): Argument changed. Add multiple fonts.
2296 (xft_list) [HAVE_XFT2]: New function.
2297 (ft_list) [not HAVE_XFT2]: New function.
2298 (ft_select): Add code for Xft.
2299 (close_ft): Likewise.
2300 (ft_open): Likewise.
2301 (ft_find_metric): Likewise.
2302 (ft_encode_char): Likewise.
2303 (ft_render): Likewise.
2305 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
2307 2004-04-26 Kenichi Handa <handa@m17n.org>
2309 * textprop.c (mtext_attach_property): Declare the return type as
2312 2004-04-21 Kenichi Handa <handa@m17n.org>
2314 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
2316 2004-04-09 Kenichi Handa <handa@m17n.org>
2318 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
2320 (load_command): Setup above members.
2322 2004-04-05 Kenichi Handa <handa@m17n.org>
2324 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
2326 2004-03-30 Kenichi Handa <handa@m17n.org>
2328 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
2331 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
2332 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
2334 2004-03-29 Kenichi Handa <handa@m17n.org>
2336 * Version 1.0 Patch Level 2 released.
2338 2004-03-29 Kenichi Handa <handa@m17n.org>
2340 * charset.c (make_charset): Set charset->fully_loaded and
2341 charset->simple correctly. Don't try to get charset->min_char and
2342 charset->max_char for a charset of method subset and superset.
2343 Don't load a mapping file here.
2344 (mcharset__init): Set unified_max.
2345 (mcharset__load_from_database): Free a working plist.
2347 * coding.c (mcoding__fini): Free all malloced data.
2349 * input-gui.c (win_create_ic): Set control.as_image for preediting
2352 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
2353 `count') to initialize the array.
2355 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
2358 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
2360 (mwin__create_window): Fix bug of setting a background pixel of a
2362 (mwin__adjust_window): Clear the window before drawing.
2364 * m17n-core.c (mdebug__report_object): Free array->objectes if
2366 (m17n_init_core): Don't set report_header_printed to 0 here.
2367 Fix debugging information.
2368 (m17n_fini_core): Set report_header_printed to 0 here.
2370 * m17n-core.h (mplist_deserialize): Extern it.
2372 * m17n-gui.c (m17n_fini_win): Fix debugging information.
2374 * m17n.c (m17n_fini): Fix debugging information.
2376 * mtext.c (mtext__adjust_foramt): New function.
2378 * mtext.h (mtext__adjust_foramt): Extern it.
2380 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2382 * plist.h (mplist__deserialize): Don't extern it.
2384 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
2385 elements of symbol_table to NULL. Report about created and freed
2386 symbols if MDEBUG_FINI is set.
2388 2004-03-22 Kenichi Handa <handa@m17n.org>
2390 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2392 * m17n.c (m17n_init): Fix the way of checking merror_code.
2394 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2396 2004-03-22 Kenichi Handa <handa@m17n.org>
2398 * fontset.c (realize_font_group): Adjust the font size by
2399 mfont__resize before selecting a font.
2401 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2403 2004-03-19 Kenichi Handa <handa@m17n.org>
2405 * Version 1.0 Patch Level 1 released.
2407 2004-03-19 Kenichi Handa <handa@m17n.org>
2409 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
2411 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
2413 2004-03-19 Kenichi Handa <handa@m17n.org>
2415 Re-apply the changes forgotten in the released version.
2417 * charset.c (mcharset__load_from_database): Call
2418 mchar_define_charset.
2420 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
2421 (mconv_encode_range): Put Mcoding text property.
2423 2004-03-18 Kenichi Handa <handa@m17n.org>
2425 * draw.c (Mdepth): New variable.
2426 (visual_order): Delete unused local var `pos'.
2427 (compose_glyph_string): Fix for the case that gstring->glyphs is
2428 realloced. Stop generating glyphs at TO. Fix handling of
2430 (layout_glyphs): Get metrics of all glyphs in advance. Set
2431 lbearing and rbearing of base of composition glyph correctly.
2432 Handle left-overhang glyphs correctly.
2433 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
2435 (dump_combining_code): Change the defualt off_x character to ".".
2436 (mdraw__init): Initialize Mdepth.
2438 * face.c (work_gstring): New variable
2439 (mface__init): Initialize work_gstring.
2440 (mface__fini): Free work_gstring.glyphs.
2441 (mface__realize): Don't handle videomode property here. Adjusted
2442 for the change of mfont__get_metric.
2443 (mface__for_chars): Adjusted for the change of mfont__get_metric.
2445 * face.h (enum face_gc): Moved to m17n-X.c.
2447 * font.h (struct MFontDriver): Arguments of find_metric changed.
2448 (mfont__select): Prototype adjusted.
2449 (mfont__get_metric): Likewise.
2450 (mfont__ft_drive_otf): Likewise.
2451 (mfont__flt_run): Likewise.
2453 * font.c (mfont__select): New argument layouter. If layouter is
2454 different in the registered font, make a new copy of realized
2456 (mfont__get_metric): Argument changed. Get metrics of multiple
2458 (mfont_find): Call mfont__select with layouter as Mnil.
2460 * font-flt.c (FontLayoutContext): New member rfont.
2461 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
2462 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
2464 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
2466 (NUM_POINTS): New macro.
2467 (MPointTable): New type.
2468 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
2469 (mfont__ft_drive_otf): New argument rfont.
2471 * fontset.c (realize_font_group): Adjusted for the changed of
2473 (check_fontset_element): This function deleted.
2475 * input-gui.c (adjust_window_and_draw): Locate a preedit window
2476 off the parent window if the preedit text is zero length.
2478 * internal-gui.h (struct MFrame): New members foreground,
2479 background, videomode, font.
2480 (struct MGlyphString): New member anti_alias.
2481 (MDrawPoint): New type.
2482 (mwin__draw_bitmap): Prototype deleted.
2483 (mwin__draw_points): Prototype added.
2485 * m17n-gui.h (MDrawControl): New member anti_alias.
2487 * m17n-gui.c (free_frame): Free frame->font.
2488 (mframe): Set the fontset of frame->face to the default fontset.
2490 * m17n-X.c (RGB_GC): New type.
2491 (enum gc_index): Renamed from enum face_gc. Member names changed.
2493 (struct MWDevice): Members foreground and background deleted. New
2494 member scratch_gc, gc_list.
2495 (DEFAULT_FONT, FALLBACK_FONT): New macros.
2496 (free_device): Free GCs in device->gc_list.
2497 (get_rgb_gc): New function.
2498 (get_gc): Renamed and argument changed from get_color.
2499 (get_gc_for_anti_alias): New function.
2500 (xfont_find_metric): Arguments changed. Get metrics of multiple
2502 (set_region): Argument changed. Caller changed.
2503 (xfont_render): Allways set a font in gc.
2504 (x_error_handler, x_io_error_handler): Define only if
2505 X_SET_ERROR_HANDLER is defined.
2506 (mwin__open_device): Create device->scratch_gc. Set members
2507 foreground, background, and videomode of frame. Call
2508 XSetErrorHandler and XSetIOErrorHandler only if
2509 X_SET_ERROR_HANDLER is defined.
2510 (struct gc_list): Deleted.
2511 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
2512 (mwin__realize_face): Adjusted for the change of the format of
2513 rface->info and the charge of set_region.
2514 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
2515 (mwin__draw_box): Likewise.
2516 (mwin__draw_bitmap): This function deleted.
2517 (mwin__draw_points): New function.
2518 (mwin__verify_region): Adjusted for the change of the format of
2519 rface->info and the charge of set_region.
2520 (mwin__create_window): Inherit backgound pixel from parent.
2521 (mwin__dump_gc): Adjusted for the change of the format of
2524 2004-03-16 Kenichi Handa <handa@m17n.org>
2526 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
2528 * input.c (M_key_alias): New variable.
2529 (handle_key): Try M_key_alias property of a key too.
2530 (minput__init): Initialize M_key_alias. Give that property to
2531 symbols in one_char_symbol. Fix bug of initializing
2534 * draw.c (compose_glyph_string): Don't handle
2535 ignore_formatting_char here. Include formatting characters in the
2536 range processed by a FTL.
2537 (layout_glyph_string): Handle ignore_formatting_char here.
2539 2004-03-12 Kenichi Handa <handa@m17n.org>
2541 * input-gui.c (win_create_ic): Enable bidi in status control.
2543 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
2545 2004-03-09 Kenichi Handa <handa@m17n.org>
2547 * input.c (load_input_method): If title is not specified, use the
2548 input method name as title.
2550 * m17n-X.c (get_color): Make it static.
2551 (xim_create_ic, xim_destroy_ic, x_error_handler)
2552 (x_io_error_handler): Likewise.
2554 2004-03-01 Kenichi Handa <handa@m17n.org>
2556 * Version 1.0 released.
2559 Copyright (C) 2003, 2004
2560 National Institute of Advanced Industrial Science and Technology (AIST)
2561 Registration Number H15PRO112
2563 This file is part of the m17n library.
2565 The m17n library is free software; you can redistribute it and/or
2566 modify it under the terms of the GNU Lesser General Public License
2567 as published by the Free Software Foundation; either version 2.1 of
2568 the License, or (at your option) any later version.
2570 The m17n library is distributed in the hope that it will be useful,
2571 but WITHOUT ANY WARRANTY; without even the implied warranty of
2572 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2573 Lesser General Public License for more details.
2575 You should have received a copy of the GNU Lesser General Public
2576 License along with the m17n library; if not, write to the Free
2577 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA