+2004-08-16 Kenichi Handa <handa@m17n.org>
+
+ * Version 1.1.0 released.
+
+2004-08-13 Kenichi Handa <handa@m17n.org>
+
+ * language.c (mlang__init): Add Dhivehi.
+
+ * m17n-gui.c (Mx, Mfreetype): Delete it.
+ (m17n_init_win): Don't initialize Mx and Mfreetype here.
+
+ * m17n-gui.h (Mfreetype, Mxft): Extern them.
+ (mfont_resize_ratio): Extern it.
+ (MDrawGlyphInfo): New member logical_width;
+ (MDrawGlyph): New type.
+ (mdraw_glyph_list): Prototype adjusted.
+
+ * m17n-X.c (xfont_open): Set type and fontp members.
+ (xft_open): Likewise.
+
+ * internal-gui.h (Mx, Mfreetype): Delete extern.
+
+ * font.h (struct MRealizedFont): New member type and fontp.
+
+ * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
+ (Mx, Mfreetype): Declare here.
+ (Mxft): New variable.
+ (mfont_resize_ratio): New function.
+
+ * font-ft.c (ft_open): Set type and fontp members.
+
+ * draw.c (mdraw_glyph_list): Argument type changed. Don't set
+ glyph_code member.
+
+2004-08-11 Kenichi Handa <handa@m17n.org>
+
+ * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
+ FT_LOAD_DEFAULT.
+
+2004-08-06 Kenichi Handa <handa@m17n.org>
+
+ * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
+ feature to apply.
+
+ * font-flt.c (run_otf): Print debugging information if necessary.
+
+2004-08-05 Kenichi Handa <handa@m17n.org>
+
+ * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
+ positioning_type 5 and 6. Switch simplified.
+
+2004-08-04 Kenichi Handa <handa@m17n.org>
+
+ * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
+
+2004-08-02 Kenichi Handa <handa@m17n.org>
+
+ * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
+ set val to 1 even if it is greater than 1.
+
+ * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
+
+2004-07-29 Kenichi Handa <handa@m17n.org>
+
+ * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
+ debugging information.
+
+ * internal.h (MDEBUG_PRINT5): New macro.
+
+ * draw.c (layout_glyphs): Don't combine a zero width glyph with
+ the previous one if the zero width glyph has left or right
+ padding.
+
+2004-07-26 Kenichi Handa <handa@m17n.org>
+
+ * m17n-X.c (xft_render): Pay attention to members left_padding and
+ right_padding of MGlyph.
+
+ * draw.c (visual_order): Allocate one more elements for arrays as
+ a workaround of fribidi bug.
+ (layout_glyphs): Fix previous change. Check MGlyph->combining_code
+ instead of MGlyph->bidi_sensitive.
+ (layout_glyph_string): Pay attentinon to
+ control->orientation_reversed when padding at the head or tail.
+ Fix adjustment of space glyph width.
+ (get_gstring): If cursor_width or cursor_bidi is changed, don't
+ use a cache.
+
+ * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
+ instead of MGlyph->bidi_sensitive.
+
+ * internal-gui.h (MGlyph): Delete member bidi_sensitive.
+
+2004-07-26 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (visual_order): Don't treat combined glyphs specially.
+ (layout_glyphs): Don't get metrics glyphs that are already ready.
+ Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
+ width with the previous one.
+ (draw_background): Fix bar cursor position on a r2l glyph.
+
+ * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
+ (run_rule): Fix place of updating cluster_begin_pos and
+ cluster_end_pos here.
+ (run_otf): Don't set left_padding.
+
+ * font-ft.c (adjust_anchor): Type of argument `code' changed.
+ Caller changed.
+ (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
+ Fix handling of GPOS.
+ (mfont__ft_drive_gpos): Delete this function.
+
+ * font.h (mfont__ft_drive_otf): Renamed back from
+ mfont__ft_drive_gsub.
+ (mfont__ft_drive_gpos): Delete extern.
+
+ * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
+ (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
+
+2004-07-23 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
+ the same bidi level.
+
+ * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
+
+2004-07-22 Kenichi Handa <handa@m17n.org>
+
+ * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
+
+2004-07-20 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (render_glyphs): Fix checking of g->code validity.
+
+ * face.c (mface__realize): Set g.type.
+
+2004-07-18 Kenichi Handa <handa@m17n.org>
+
+ * Makefile.am: Prepend ${top_srcdir} to all *.la in
+ *_LIBADD/*_LDADD.
+
+ * m17n-gui.c (mframe): Print error message give by dlopen to
+ stderr.
+
+2004-07-16 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (compose_glyph_string): Improve the way of deciding a
+ script. For a character that doesn't have script property, use
+ the last non-latin script.
+
+ * font-ft.c (fc_list): Cancel previous change.
+ (mfont__ft_init): Add more entries in ft_to_prop_name.
+
+2004-07-15 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
+ previous or next character glyphs.
+
+2004-07-14 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (compose_glyph_string): Be sure to set codes for glyphs
+ of type GLYPH_SPACE.
+
+ * fontset.c (mfont__lookup_fontset): If glyph type is
+ GLYPH_SPACE, get codes for SPACE.
+
+ * internal-gui.h (Mfont): Delete extern.
+
+ * m17n-gui.h (Mfont): Delete duplicated extern.
+
+2004-07-13 Kenichi Handa <handa@m17n.org>
+
+ * font-ft.c (DEVICE_DELTA): New macro.
+ (adjust_anchor): New function.
+ (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
+ only GSUB.
+ (mfont__ft_drive_gpos): New function.
+
+ * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
+ (FontLayoutContext): Delete member `rfont'.
+ (run_otf): Set g->otf_cmd. Call
+ (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
+ only whne HAVE_OTF is defined.
+
+ * fontset.c: Include "config.h".
+
+ * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
+ (MGlyph): New member otf_cmd.
+
+ * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
+ (mfont__ft_drive_gpos): Extern it.
+
+ * face.c: Include "config.h".
+
+ * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
+
+ * input-gui.c: Include "config.h".
+
+ * plist.c: Include "config.h".
+
+2004-07-06 Kenichi Handa <handa@m17n.org>
+
+ * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
+ internal-gui.h: Cancel previous changes.
+
+ * m17n-gd.h: Delete it.
+
+ * Makefile.am (libm17n_core_la_LIBADD): New variable.
+ (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
+ @XML2_LD_FLAGS@ to above.
+ (libm17n_la_LIBADD): Add -ldl.
+ (libm17n_la_LDFLAGS): Add -export-dynamic.
+ (X_LD_FLAGS): Fix the order of linking.
+ (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
+ (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
+ (libm17n_X_la_LDFLAGS): Add -module.
+ (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
+ (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
+ (libm17n_gd_la_LDFLAGS): Add -module.
+ (include_HEADERS): Delete m17n-gd.h.
+
+2004-06-30 Kenichi Handa <handa@m17n.org>
+
+ * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
+ (MDeviceLibraryInterface): Delete it.
+ (register_device_library): Delete it.
+ (m17n__device_library_list): Renamed from device_library_list.
+
+ * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
+ (m17n_init_win): Adjust prototype.
+
+ * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
+ (m17n_init_gd): New function.
+
+ * m17n-gd.h: New file.
+
+ * m17n-X.h: Include <m17n-gui.h>.
+ (m17n_init_X): Extern it.
+ (M17N_INIT): Redefine it.
+
+ * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
+ (m17n_init_X): New function.
+
+ * internal-gui.h (m17n__device_library_list): Extern it.
+ (struct MDeviceDriver): New members initialized, init, and fini.
+
+ * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
+ @XFT2_LD_FLAGS@.
+ (libm17n_X_la_LIBADD): Delete aboves.
+ (libm17n_gd_la_SOURCES): Add m17n-gd.h.
+ (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
+ (libm17n_gd_la_LDFLAGS): Delete it.
+ (include_HEADERS): Add m17n-gd.h.
+
+2004-06-25 Kenichi Handa <handa@m17n.org>
+
+ * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
+ (libm17n_gd_la_LDFLAGS): Cancel previous change.
+
+ * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
+
+ * font-ft.c (fc_list): If FcFontList finds no font, try
+ FcFontMatch.
+
+ * draw.c (compose_glyph_string): Terminate the last loop after
+ doing default combining if necessary.
+
+2004-06-24 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
+
+ * character.c (mchar_define_property): Add const to an arg.
+
+ * charset.c (mchar_define_charset): Add const to an arg.
+
+ * coding.c (MCodingSystem): Add const to an arg or decoder.
+ (finish_decoding): Add const to an arg.
+ (decode_coding_charset, decode_coding_utf_8)
+ (decode_coding_utf_16, decode_coding_utf_32)
+ (decode_coding_iso_2022, decode_coding_sjis)
+ (mconv_define_coding): Likewise.
+
+ * m17n-X.c (xft_find_metric): Delete unused variable.
+
+ * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
+ prototypes.
+
+ * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
+ prototypes.
+
+ * mtext.c (count_utf_8_chars, count_utf_16_chars)
+ (mtext__from_data, mtext_from_data): Add `const' to an arg.
+
+ * mtext.h (mtext__from_data): Ajust prototype.
+
+2004-06-23 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (compose_glyph_string): Always get glyph codes by
+ mface__for_char.
+ (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
+ (mdraw_glyph_list): New function.
+
+ * font-flt.c (mfont__flt_run): Be sure to call
+ rfont->driver->encode_char.
+
+ * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
+ (ft_encode_char): Delete arg C.
+ (ft_render): Don't call FT_Get_Char_Index.
+
+ * font.c (mfont__encodable_p): Delete it.
+ (mfont__encode_char): Be sure to call rfont->driver->encode_char.
+
+ * font.h (struct MFontDriver): Delete arg C of encode_char.
+ (mfont__encodable_p): Delete extern.
+
+ * m17n-X.c (xfont_encode_char): Delete arg C.
+ (xft_find_metric): Don't cal FT_Get_Char_Index.
+ (xft_render): Likewise.
+
+ * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
+ logical_width.
+ (mdraw_glyph_list): Extern it.
+
+ * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
+
+2004-06-22 Kenichi Handa <handa@m17n.org>
+
+ * m17n-gui.h (mfontset_lookup): Extern it.
+
+ * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
+
+ * fontset.c (realize_fontset_elements)
+ (free_realized_fontset_elements, update_fontset_elements): New
+ functions.
+ (mfont__realize_fontset): Call realize_fontset_elements.
+ (mfont__free_realized_fontset): Call free_realized_fontset_elements.
+ (mfont__lookup_fontset): If a fontset was modified, update
+ the realized fontset.
+ (mfontset_modify_entry): Increment fontset->tick.
+ (mfontset_lookup): New function.
+
+2004-06-21 Kenichi Handa <handa@m17n.org>
+
+ * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
+
+ * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
+ (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
+ length of source text 0.
+
+2004-06-21 Kenichi Handa <handa@m17n.org>
+
+ * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
+ (compare): Pay attention to format other than utf-8.
+ (copy): Delete this function.
+ (count_by_utf_8, count_by_utf_16, insert): New functions.
+ (count_utf_16_chars): Fix handling of a surrogate pair.
+ (find_char_forward, find_char_backward): Likewise.
+ (mtext__from_data): Delete unnecessary check. Fix number of
+ allocated bytes.
+ (mtext_from_data): Don't count items.
+ (mtext_ref_char): Optimize the code.
+ (mtext_set_char): Pay attention to format other than utf-8.
+ (mtext_cat_char): Likewise.
+ (mtext_dup): Don't call copy, instead do allocation here.
+ (mtext_cat): Call insert instead of copy.
+ (mtext_ncat): Likewise.
+ (mtext_cpy): Delete character at first and call insert instead of
+ copy.
+ (mtext_ncpy): Likewise.
+ (mtext_copy): Likewise.
+ (mtext_duplicate): Call insert instead of copy.
+ (mtext_del): Pay attention to format other than utf-8.
+ (mtext_ins): Simply call insert.
+ (mtext_ins_char): Pay attention to format other than utf-8.
+ (mtext_tok): Call insert instead of copy.
+ (mtext_text): Call UNIT_BYTES.
+
+ * textprop.c (mtext__adjust_plist_for_change): New function.
+
+ * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
+ (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
+ (CHAR_UNITS_AT): Fix typo.
+ (CHAR_UNITS_BY_HEAD): Fix typo.
+ (STRING_CHAR_AND_UNITS): Fix typo.
+
+ * internal.h (MTEXT_READ_ONLY_P): New macro.
+
+ * mtext.h (mtext__replace): Delete the extern.
+ (mtext__adjust_foramt): Adjust prototype.
+
+ * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
+ if possible. Otherwise make a copy of mmt.
+
+ * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
+ utf-8.
+
+2004-06-18 Kenichi Handa <handa@m17n.org>
+
+ * character.h (CHAR_STRING_UTF16): Fix syntax.
+
+2004-06-16 Kenichi Handa <handa@m17n.org>
+
+ * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
+ (libm17n_X_la_LIBADD): Delete it.
+ (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
+
+ * m17n-X.c (device_open): Add parens in `if' condition.
+
+ * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
+ (DEC_POSITION): Likewise.
+ (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
+
+2004-06-15 Kenichi Handa <handa@m17n.org>
+
+ * fontset.c (mfont__lookup_fontset): Fix selection of font groups
+ by language.
+
+ * draw.c (compose_glyph_string): If langauge is specified, call
+ mface__for_chars even if a text is all latin. Fix condition for
+ setting non_ascii_found.
+
+ * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
+
+ * m17n.h (minput_char_to_key): Delete extern.
+
+ * m17n-gui.h (minput_event_to_key): Cancel previous change.
+
+ * m17n-gui.c (null_device_open): Set several members of frame.
+
+2004-06-14 Kenichi Handa <handa@m17n.org>
+
+ * m17n-gui.h (minput_event_to_key): Delete extern.
+
+ * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
+
+ * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
+
+ * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
+
+2004-06-08 Kenichi Handa <handa@m17n.org>
+
+ * character.c (mchar_put_prop): Don't increment the ref-count of
+ record->table.
+
+2004-06-04 Kenichi Handa <handa@m17n.org>
+
+ * m17n-core.c (mdebug__register_object): New function.
+ (mdebug__unregister_object): Likewise.
+
+ * internal.h (mdebug__register_object, mdebug__unregister_object):
+ Extern them.
+ (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
+ respectively.
+
+ * charset.c (mcharset__load_from_database): Don't call
+ mconv__register_charset_coding here.
+
+ * coding.c (find_coding): Get a real name from an element of
+ coding_definition_list.
+ (mconv__register_charset_coding): Set the real name at the top of
+ param.
+ (mcoding__load_from_database): Likewise.
+ (mconv_list_codings): Adjusted for the above change.
+
+2004-06-03 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (find_coding): Find by canonicalized name. Don't have
+ to modify the element of coding_definition_list by
+ mplist__from_plist.
+ (mconv__define_coding_from_charset): Delete it.
+ (mconv__register_charset_coding): Canonicalize sym.
+ (mcoding__load_from_database): Register plist modified by
+ mplist__from_plist.
+
+ * coding.h (mconv__define_coding_from_charset): Don't extern it.
+
+ * font-ft.c (ft_open): Fix setting of rfont->descent.
+
+2004-06-02 Kenichi Handa <handa@m17n.org>
+
+ * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
+ (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
+ (xlfd_unparse_name): Renamed from xfont_build_name.
+ (mfont__init): Initialized Mfontconfig.
+ (mfont__free_realized): Unconditionally unref rfont->info.
+ (mfont__select): Free `this' if it's not best.
+ (mfont__open): Don't check frame->realized_font_list.
+ (mfont__parse_name_into_font): New function.
+ (Mfontconfig): New variable.
+ (mfont_from_name): Call mfont_parse_name.
+ (mfont_name): Call mfont_unparse_name.
+ (mdebug_dump_font): Likewise.
+
+ * font.h (struct MFontDriver): Delete members parse_name and
+ build_name.
+ (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
+ (mfont__parse_name_into_font): Extern it.
+
+ * font-ft.c: Include "symbol.h".
+ (close_ft): Unconditionally free filename and charmap_list of
+ ft_into.
+ (ft_open): Duplicate base->filename. Increment ref-count of
+ ft_info->charmap_list. Free ft_info->charmap_list and
+ ft_info->filename on error.
+ (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
+
+ * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
+ xfont_build_name.
+ (enum xlfd_field_idx): Moved to font.c.
+ (split_font_name, build_font_name): Likewise.
+ (build_font_list): Call mfont__parse_name_info_font.
+ (xfont_open): Call mfont__unparse_name. Free name.
+ (xfont_parse_name, xfont_build_name): Moved to font.c
+ (xft_select): Prototype deleted.
+ (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
+ Call mfont_pase_name.
+
+ * m17n-gui.c (free_frame): Unref frame->font_driver_list.
+ (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
+ (mframe): Likewise.
+
+ * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
+ Extern them.
+
+ * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
+
+2004-06-01 Kenichi Handa <handa@m17n.org>
+
+ * fontset.c (mfontset_modify_entry): Pay attention to the case
+ that fontset->font_spec_list is NULL.
+
+2004-05-31 Kenichi Handa <handa@m17n.org>
+
+ * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
+
+ * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
+
+ * font.c (mfont__select): Print score the a font for debugging.
+
+ * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
+
+ * coding.c (reset_coding_sjis): Check kanji and kana instead of
+ kanji_sym and kana_sym.
+
+2004-05-28 Kenichi Handa <handa@m17n.org>
+
+ * Makefile.am (VINFO): New variable.
+ (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
+ (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
+
+2004-05-27 Kenichi Handa <handa@m17n.org>
+
+ The following chanages are to make device dependent functions
+ accessible only from MDeviceDriver structure, and to add GD and
+ null device drivers. Font drivers get also device dependent.
+
+ * m17n.c (m17n_init): Increament shell_initialized.
+ (m17n_fini): Decremented shell_initialized.
+
+ * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
+
+ * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
+ (Mwidget, Mcolormap, Mx): Extern them.
+
+ * m17n-gui.c: Include <dlfcn.h> and "config.h".
+ (free_frame): Call frame->driver->close instead of
+ mwin__close_device.
+ (DLOPEN_SHLIB_EXT): New macro.
+ (MDeviceLibraryInterface): New type.
+ (device_library_list): New variable.
+ (register_device_library): New function.
+ (null_device): New variable.
+ (null_device_close, null_device_get_prop)
+ (null_device_realize_face, null_device_free_realized_face): New
+ function.
+ (null_driver): New variable.
+ (null_device_init, null_device_fini, null_device_open): New
+ functions.
+ (null_interface): New variable.
+ (Mfreetype, Mdevice): Declare them.
+ (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
+ Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
+ Mwin__Close_Device. Register drivers for Mx and Mgd.
+ (m17n_fini_win): Decremented win_initialized. Call "fini"
+ function of all opened devices. Don't call mwin__fini.
+ (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
+ Declare them here.
+ (mframe): Handle Mdevice key of PLIST.
+ (mframe_get_prop): Call frame->device->get_prop instead of
+ mwin__device_get_prop.
+
+ * m17n-gd.c: New file.
+
+ * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
+ (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
+
+ * m17n-core.c (m17n_init_core): Increate core_initialized.
+ (m17n_fini_core): Decremented core_initialized.
+
+ * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
+ (Mcolormap): Don't extern them here.
+
+ * m17n-X.c (FRAME_DEVICE): New macro.
+ (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
+ (free_display_info): Use MPLIST_DO.
+ (free_device): Free rface->info.
+ (xft_close): Delete it.
+ (device_init): Renamed from mwin__init.
+ (device_fini): Renamed from mwin__fini.
+ (device_open): Renamed from mwin__open_device.
+ (x_driver): New variable.
+ (MXFontInfo): Delete member frame, add member display.
+ (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
+ Don't declare them here.
+
+ * internal-gui.h (MDeviceType): New enum.
+ (MWDefice): Delete it.
+ (struct MFrame): Change type of device to void *. New members
+ device_type, driver, font_driver_list.
+ (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
+ (MDeviceDriver): New type.
+ (Mx, Mgd, Mfreetype): Extern them.
+ (mwin__XXX): Delete all of them.
+
+ * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
+ mwin__XXX.
+ (win_destroy_ic): Likewise.
+ (adjust_window_and_draw): Likewise.
+ (win_callback): Likewise.
+ (Mxim): Declare it here.
+ (minput_event_to_key): Call M_CHECK_READABLE.
+
+ * fontset.c (mfont__lookup_fontset): Delete local variable
+ font_group.
+
+ * font.h (struct MFontDriver): Delete member close, add members
+ parse_name and build_name.
+ (mfont__driver_list): Delete extern.
+ (mfont__close): Delete extern.
+
+ * font.c (mfont__init): Don't set mfont__driver_list.
+ (mfont__fini): Don't unref mfont__driver_list.
+ (mfont__select): Try font drivers in frame->font_driver_list. Set
+ driver member of a realized font.
+ (mfont__close): Delete it.
+ (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
+ functions of the default frame.
+
+ * font-ft.c (close_ft): Check ft_info->ft_face and work
+ differently.
+ (add_font_info): Allocate ft_info by M17N_OBJECT.
+ (ft_close): Delete it.
+ (mfont__ft_driver): Don't set ft_close.
+ (ft_select): Increment ref-count of best_font.
+ (ft_open): Decremented ref-count of base. On error, call
+ FT_Done_Face and free ft_info.
+ (ft_find_metric): Always use XXX_MONO in load_flags.
+ (ft_render): Fix setting of width. Call
+ frame->driver->draw_points instead of mwin__draw_points.
+ (ft_to_prop): Don't set mfont__driver_list.
+ (mfont__ft_fini): Just unref ft_info.
+
+ * face.c (mface__init): Exchange foreground and background of
+ mface__default. Call mface_put_prop to set hline of
+ mface_underline,
+ (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
+ (mface__free_realized): Don't call mwin__free_realized_face.
+
+ * draw.c (Mdepth): Don't declare it here.
+ (draw_background): Call frame->driver->XXX instead of mwin__XXX.
+ (render_glyphs, render_glyph_string): Likewise.
+ (mdraw__init): Don't set Mdepth.
+ (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
+ M_CHECK_WRITABLE.
+ (mdraw_text_per_char_extents): Return 0 on success and -1 on
+ error.
+ (mdraw_text_items): Check FRAME is writable.
+ (mdraw_per_char_extents): Implement body.
+
+ * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
+ libm17n-gd.la.
+ (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
+ (GUI_SOURCES): Delete it.
+ (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
+ (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
+ (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
+ (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
+ (linkgui_LDADD): Set to libm17n-gui.la
+ (linkgui_LDFLAGS): New target.
+ (SRC): Include ${libm17n_gui_la_SOURCES} and
+ ${libm17n_gd_la_SOURCES}.
+
+2004-05-24 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (draw_background): Don't draw background even if
+ rface->face.property[MFACE_BACKGROUND] is not Mnil.
+
+2004-05-22 Kenichi Handa <handa@m17n.org>
+
+ * m17n-X.c (xft_open_font): Fix anti_alias setting.
+
+2004-05-20 Kenichi Handa <handa@m17n.org>
+
+ * m17n-gui.h (MFaceHookFunc): Change this function type to void.
+
+ * m17n-gui.c: Include "plist.h".
+ (mframe): If PLIST is NULL, initialize it to emply plist.
+
+ * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
+ (xft_driver): New variable.
+ (xft_select, close_xft, xft_open_font, xft_open, xft_close)
+ (xft_find_metric, xft_render): New function.
+ (mwin__init): Adjusted for the new mfont__driver_list.
+ (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
+ generated face to PARAM.
+ (mwin__realize_face): Fix setting of box colors. Don't call hook
+ function here.
+ (mwin__draw_hline): New function.
+ (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
+ (mwin__xft_render): Delete these function.
+
+ * internal-gui.h (struct MFrame): New member tick.
+ (struct MGlyphString): New member tick.
+ (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
+ (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
+ (mwin__xft_render): Delete extern.
+
+ * fontset.c (mfont__lookup_fontset): Make the code simpler.
+ (mfontset): Always increment the reference count of returned
+ object.
+
+ * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
+ (MFTInfo): Moved to font.h.
+ (ft_iso8859_1_font_list): Delete this variable.
+ (set_font_info): Don't set font->property[MFONT_TYPE].
+ (set_font_info): Don't udpate ft_iso8859_1_font_list.
+ (add_font_info): Change type to void.
+ (fc_list): Change anme from xft_list. Caller changed. Include
+ FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
+ (mfont__ft_driver): Change name from ft_driver. Caller changed.
+ (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
+ (close_ft): Don't call mwin__xft_close. Unref
+ ft_info->extra_info.
+ (ft_open): Don't setup ft_info->fontname. Don't call
+ mwin__xft_open.
+ (ft_find_metric): Don't call mwin__xft_get_metric.
+ (ft_encode_char): Call rfont->driver->open instead of ft_open.
+ (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
+ (mfont__ft_init): Adjusted for new mfont__driver_list.
+ (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
+
+ * font.c (mfont__driver_list): Make it MPlist.
+ (mfont__init): Adjust initialization of mfont__driver_list.
+ (mfont__fini): Free mfont__driver_list.
+ (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
+ (mfont__select): Adjusted for the new mfont__driver_list.
+
+ * font.h (enum MFontProperty): Delete MFONT_TYPE.
+ (mfont__drirver_list): Adjust prototype.
+ (MFTInfo): Move to here from fron.c. Deleve member fontname.
+
+ * face.h (struct MFace): Delete member realized_face_list, add
+ member frame_list.
+ (struct MRealizedFace): Delete member need_update
+ andnofont_rface, add member non_ascii_list.
+ (mface__update_frame_face): Extern it.
+
+ * face.c (hline_prop_list, box_prop_list, noop_hook): New
+ variables.
+ (get_hline_create, get_box_create): New functions.
+ (find_realized_face): Cancel previous change. Arg RFONT deleted.
+ Use memcmp.
+ (free_face): Cancep previous change. Free face->frame_list.
+ (serialize_hline): Do nothing if hline->width is zero.
+ (serialize_box): Do nothing if box->width is zero.
+ (mface__init): Setup all properties of mface__default.
+ (mface__fini): Free hline_prop_list and box_prop_list.
+ (mface__realize): Cancel previous change. Update
+ face->frame_list. Setup rface->non_ascii_list.
+ (mface__for_chars): Update rface->non_ascii_list.
+ (mface__free_realized): Free rface->non_ascii_list.
+ (mface__update_frame_face): New function.
+ (mface): Initialize face->frame_list.
+ (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
+ properties.
+ (mface_merge): Likewise.
+ (mface_put_prop): If key is Mhline or Mbox, get value by
+ get_hline_create or get_box_create respectively.
+ (mface_put_prop): Update frame->tick and call
+ mface__update_frame_face if necessary.
+ (mface_update): Do nothing if func is noop_hook.
+
+ * draw.c (render_glyphs): If a font is not found, use
+ mwin__draw_empty_boxes.
+ (alloc_gstring): Initialize gstring->tick.
+ (get_gstring): Check gstring->tick.
+
+2004-05-17 Kenichi Handa <handa@m17n.org>
+
+ * face.c (find_realized_face): Return value changed. If RFONT is
+ NULL, avoid unnecessary checking.
+ (free_face): Free face->realized_face_list.
+ (mface__realize): Adjusted for the change of find_realized_face.
+ If it returns a realized face that needs update, free it and
+ realize a new one. Push a new realized face to
+ frame->realized_face_list instead of appending.
+ (mface__for_chars): Adjusted for the change of find_realized_face.
+ Short cut if the required font is in rface->ascii_rface.
+ (mface_put_prop): Free old value if necessary. Set need_update
+ member of realized faces to 1.
+
+ * face.h (struct MFace): Delete member tick, add member
+ realized_face_list.
+ (struct MRealizedFace): Delete member tick, add member
+ need_update.
+
+2004-05-13 Kenichi Handa <handa@m17n.org>
+
+ * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
+
+2004-05-12 Kenichi Handa <handa@m17n.org>
+
+ * internal-gui.h (mwin__xft_open): Arguemnt name changed.
+
+ * m17n-X.c (mwin__xft_open): Argument changed to fontname and
+ parse it XftNameParse.
+
+ * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
+ (all_fonts_scaned): New variable.
+ (set_font_info): FAMILY may be Mnil.
+ (add_font_info): Argument changed.
+ (xft_list): Call add_font_info in it.
+ (ft_list): Likewise.
+ (ft_select): Make it work in the case family is Mnil.
+ (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
+ (mfont__ft_fini): Set all_fonts_scaned to 0.
+
+ * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
+ that is failed to open.
+
+2004-05-10 Kenichi Handa <handa@m17n.org>
+
+ * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
+ device's depth is 1 (i.e. monochrome).
+
+ * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
+ to work around the problem of libtool.
+
+ * font-ft.c: Include <freetype/ftbdf.h>.
+ (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
+ variables.
+ (mfont__ft_init): Initialize them.
+ (ft_iso8859_1_font_list): New variable.
+ (set_font_info): Detect a font containing iso8859-1 glyphs and
+ register it in ft_iso8859_1_font_list. If the font is not
+ scalable, assume it as BDF or PCF font and setup SIZE and RESY
+ properties of the font from its properties.
+ (add_font_list): If the font is not scalable, check if it is BDF
+ or PCF font. If not, ignore it.
+ (ft_select): If FAMILY is Mnil, return NULL only if the requested
+ registry is not iso8859-1.
+ (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
+ ft_iso8859_1_font_list.
+ (ft_find_metric): If the font is not scalable, assume it as BDF
+ or PCF, and get a metric from its properties.
+ (mfont__ft_fini): Free ft_iso8859_1_font_list.
+
+2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
+
+ * Makefile.am (libm17n_la_LIBADD): Include -ldl.
+ (libm17n_la_LDFLAGS): Delete it.
+ (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
+ (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
+
+2004-05-06 Kenichi Handa <handa@m17n.org>
+
+ * draw.c (compose_glyph_string): Fix previous change.
+
+2004-04-30 Kenichi Handa <handa@m17n.org>
+
+ * font-ft.c (ft_list): Delete unused variable `result'.
+ (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
+
+2004-04-27 Kenichi Handa <handa@m17n.org>
+
+ * m17n-X.c: Include config.h
+ [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
+ (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
+ (MWDevice) [HAVE_XFT2]: New member xft_draw.
+ (FRAME_CMAP, FRAME_VISUAL): New macros.
+ (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
+ (xfont_driver): Make it static.
+ (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
+ (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
+ info->xft_color_back.
+ (MXftFontInfo) [HAVE_XFT2]: New type.
+ (mwin__xft_close) [HAVE_XFT2]: New function.
+ (mwin__xft_open) [HAVE_XFT2]: New function.
+ (mwin__xft_get_metric) [HAVE_XFT2]: New function.
+ (mwin__xft_render) [HAVE_XFT2]: New function.
+
+ * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
+ (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
+ (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
+ externs.
+
+ * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
+
+ * font-ft.c: Don't include FT_FREETYPE_H here.
+ [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
+ (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
+ (MFTInfo): New member charmap_index.
+ (MFTInfo) [HAVE_XFT2]: New member xft_info.
+ (check_otf_filename): Renamed from check_filename. Return value
+ changed.
+ (ft_set_property): This function deleted.
+ (set_font_info): New function.
+ (add_font_list): Argument changed. Add multiple fonts.
+ (xft_list) [HAVE_XFT2]: New function.
+ (ft_list) [not HAVE_XFT2]: New function.
+ (ft_select): Add code for Xft.
+ (close_ft): Likewise.
+ (ft_open): Likewise.
+ (ft_find_metric): Likewise.
+ (ft_encode_char): Likewise.
+ (ft_render): Likewise.
+
+ * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
+
+2004-04-26 Kenichi Handa <handa@m17n.org>
+
+ * textprop.c (mtext_attach_property): Declare the return type as
+ `int'.
+
+2004-04-21 Kenichi Handa <handa@m17n.org>
+
+ * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
+
+2004-04-09 Kenichi Handa <handa@m17n.org>
+
+ * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
+ seq_to.
+ (load_command): Setup above members.
+
+2004-04-05 Kenichi Handa <handa@m17n.org>
+
+ * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
+
+2004-03-30 Kenichi Handa <handa@m17n.org>
+
+ * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
+ >= 0x10000.
+
+ * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
+ (M17NLIB_VERSION_NAME): Changed to 1.0.2.
+
+2004-03-29 Kenichi Handa <handa@m17n.org>
+
+ * Version 1.0 Patch Level 2 released.
+
2004-03-29 Kenichi Handa <handa@m17n.org>
* charset.c (make_charset): Set charset->fully_loaded and
* locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
M17N_OBJECT_UNREF.
- * m17n-X.c (mwin__create_window): Fix bug of setting a background
- pixel of a new window.
+ * m17n-X.c (xfont_render): If rface->rfont is null, draw a
+ rectangle.
+ (mwin__create_window): Fix bug of setting a background pixel of a
+ new window.
(mwin__adjust_window): Clear the window before drawing.
* m17n-core.c (mdebug__report_object): Free array->objectes if
* m17n.c (m17n_fini): Fix debugging information.
+ * mtext.c (mtext__adjust_foramt): New function.
+
+ * mtext.h (mtext__adjust_foramt): Extern it.
+
* plist.c (mplist_deserialize): Renamed from mplist__deserialize.
+ * plist.h (mplist__deserialize): Don't extern it.
+
* symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
elements of symbol_table to NULL. Report about created and freed
symbols if MDEBUG_FINI is set.