2004-05-17 Kenichi Handa * 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 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns. 2004-05-12 Kenichi Handa * 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 * 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 . (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 * 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 * draw.c (compose_glyph_string): Fix previous change. 2004-04-30 Kenichi Handa * 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 * m17n-X.c: Include config.h [HAVE_XFT2]: Include . (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_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 * textprop.c (mtext_attach_property): Declare the return type as `int'. 2004-04-21 Kenichi Handa * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@ 2004-04-09 Kenichi Handa * font-flt.c (struct): New members seq_beg, seq_end, seq_from, seq_to. (load_command): Setup above members. 2004-04-05 Kenichi Handa * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2. 2004-03-30 Kenichi Handa * 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 * Version 1.0 Patch Level 2 released. 2004-03-29 Kenichi Handa * charset.c (make_charset): Set charset->fully_loaded and charset->simple correctly. Don't try to get charset->min_char and charset->max_char for a charset of method subset and superset. Don't load a mapping file here. (mcharset__init): Set unified_max. (mcharset__load_from_database): Free a working plist. * coding.c (mcoding__fini): Free all malloced data. * input-gui.c (win_create_ic): Set control.as_image for preediting to 0. * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not `count') to initialize the array. * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and M17N_OBJECT_UNREF. * 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 necessary. (m17n_init_core): Don't set report_header_printed to 0 here. Fix debugging information. (m17n_fini_core): Set report_header_printed to 0 here. * m17n-core.h (mplist_deserialize): Extern it. * m17n-gui.c (m17n_fini_win): Fix debugging information. * 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. 2004-03-22 Kenichi Handa * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE. * m17n.c (m17n_init): Fix the way of checking merror_code. * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code. 2004-03-22 Kenichi Handa * fontset.c (realize_font_group): Adjust the font size by mfont__resize before selecting a font. * font-ft.c (mfont__ft_init): Add oblique and boldoblique. 2004-03-19 Kenichi Handa * Version 1.0 Patch Level 1 released. 2004-03-19 Kenichi Handa * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro. * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it. 2004-03-19 Kenichi Handa Re-apply the changes forgotten in the released version. * charset.c (mcharset__load_from_database): Call mchar_define_charset. * coding.c (encode_unsupporeted_char): Put Mcoding text property. (mconv_encode_range): Put Mcoding text property. 2004-03-18 Kenichi Handa * draw.c (Mdepth): New variable. (visual_order): Delete unused local var `pos'. (compose_glyph_string): Fix for the case that gstring->glyphs is realloced. Stop generating glyphs at TO. Fix handling of control charaters. (layout_glyphs): Get metrics of all glyphs in advance. Set lbearing and rbearing of base of composition glyph correctly. Handle left-overhang glyphs correctly. (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller changed. (dump_combining_code): Change the defualt off_x character to ".". (mdraw__init): Initialize Mdepth. * face.c (work_gstring): New variable (mface__init): Initialize work_gstring. (mface__fini): Free work_gstring.glyphs. (mface__realize): Don't handle videomode property here. Adjusted for the change of mfont__get_metric. (mface__for_chars): Adjusted for the change of mfont__get_metric. * face.h (enum face_gc): Moved to m17n-X.c. * font.h (struct MFontDriver): Arguments of find_metric changed. (mfont__select): Prototype adjusted. (mfont__get_metric): Likewise. (mfont__ft_drive_otf): Likewise. (mfont__flt_run): Likewise. * font.c (mfont__select): New argument layouter. If layouter is different in the registered font, make a new copy of realized font. (mfont__get_metric): Argument changed. Get metrics of multiple glyphs. (mfont_find): Call mfont__select with layouter as Mnil. * font-flt.c (FontLayoutContext): New member rfont. (run_otf): Adjusted for the change of mfont__ft_drive_otf. (mfont__flt_run): Argument changed. Initialize ctx.rfont. * font-ft.c (ft_find_metric): Arguments changed. Get metrics of multiple glyphs. (NUM_POINTS): New macro. (MPointTable): New type. (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap. (mfont__ft_drive_otf): New argument rfont. * fontset.c (realize_font_group): Adjusted for the changed of mfont__select. (check_fontset_element): This function deleted. * input-gui.c (adjust_window_and_draw): Locate a preedit window off the parent window if the preedit text is zero length. * internal-gui.h (struct MFrame): New members foreground, background, videomode, font. (struct MGlyphString): New member anti_alias. (MDrawPoint): New type. (mwin__draw_bitmap): Prototype deleted. (mwin__draw_points): Prototype added. * m17n-gui.h (MDrawControl): New member anti_alias. * m17n-gui.c (free_frame): Free frame->font. (mframe): Set the fontset of frame->face to the default fontset. * m17n-X.c (RGB_GC): New type. (enum gc_index): Renamed from enum face_gc. Member names changed. (GCInfo): New typel (struct MWDevice): Members foreground and background deleted. New member scratch_gc, gc_list. (DEFAULT_FONT, FALLBACK_FONT): New macros. (free_device): Free GCs in device->gc_list. (get_rgb_gc): New function. (get_gc): Renamed and argument changed from get_color. (get_gc_for_anti_alias): New function. (xfont_find_metric): Arguments changed. Get metrics of multiple glyphs. (set_region): Argument changed. Caller changed. (xfont_render): Allways set a font in gc. (x_error_handler, x_io_error_handler): Define only if X_SET_ERROR_HANDLER is defined. (mwin__open_device): Create device->scratch_gc. Set members foreground, background, and videomode of frame. Call XSetErrorHandler and XSetIOErrorHandler only if X_SET_ERROR_HANDLER is defined. (struct gc_list): Deleted. (REGISTER_GC, UNREGISTER_GC): These macros deleted. (mwin__realize_face): Adjusted for the change of the format of rface->info and the charge of set_region. (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline) (mwin__draw_box): Likewise. (mwin__draw_bitmap): This function deleted. (mwin__draw_points): New function. (mwin__verify_region): Adjusted for the change of the format of rface->info and the charge of set_region. (mwin__create_window): Inherit backgound pixel from parent. (mwin__dump_gc): Adjusted for the change of the format of rface->info. 2004-03-16 Kenichi Handa * m17n-X.c (mwin__parse_event): Fix handling of modifier keys. * input.c (M_key_alias): New variable. (handle_key): Try M_key_alias property of a key too. (minput__init): Initialize M_key_alias. Give that property to symbols in one_char_symbol. Fix bug of initializing one_char_symbol. * draw.c (compose_glyph_string): Don't handle ignore_formatting_char here. Include formatting characters in the range processed by a FTL. (layout_glyph_string): Handle ignore_formatting_char here. 2004-03-12 Kenichi Handa * input-gui.c (win_create_ic): Enable bidi in status control. * draw.c (visual_order): Avoid re-ordering of combining glyphs only. 2004-03-09 Kenichi Handa * input.c (load_input_method): If title is not specified, use the input method name as title. * m17n-X.c (get_color): Make it static. (xim_create_ic, xim_destroy_ic, x_error_handler) (x_io_error_handler): Likewise. 2004-03-01 Kenichi Handa * Version 1.0 released. Copyright (C) 2003, 2004 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H15PRO112 This file is part of the m17n library. The m17n library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The m17n library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the m17n library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.