1 2004-06-18 Kenichi Handa <handa@m17n.org>
3 * character.h (CHAR_STRING_UTF16): Fix syntax.
5 2004-06-16 Kenichi Handa <handa@m17n.org>
7 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
8 (libm17n_X_la_LIBADD): Delete it.
9 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
11 * m17n-X.c (device_open): Add parens in `if' condition.
13 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
14 (DEC_POSITION): Likewise.
15 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
17 2004-06-15 Kenichi Handa <handa@m17n.org>
19 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
22 * draw.c (compose_glyph_string): If langauge is specified, call
23 mface__for_chars even if a text is all latin. Fix condition for
24 setting non_ascii_found.
26 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
28 * m17n.h (minput_char_to_key): Delete extern.
30 * m17n-gui.h (minput_event_to_key): Cancel previous change.
32 * m17n-gui.c (null_device_open): Set several members of frame.
34 2004-06-14 Kenichi Handa <handa@m17n.org>
36 * m17n-gui.h (minput_event_to_key): Delete extern.
38 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
40 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
42 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
44 2004-06-08 Kenichi Handa <handa@m17n.org>
46 * character.c (mchar_put_prop): Don't increment the ref-count of
49 2004-06-04 Kenichi Handa <handa@m17n.org>
51 * m17n-core.c (mdebug__register_object): New function.
52 (mdebug__unregister_object): Likewise.
54 * internal.h (mdebug__register_object, mdebug__unregister_object):
56 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
59 * charset.c (mcharset__load_from_database): Don't call
60 mconv__register_charset_coding here.
62 * coding.c (find_coding): Get a real name from an element of
63 coding_definition_list.
64 (mconv__register_charset_coding): Set the real name at the top of
66 (mcoding__load_from_database): Likewise.
67 (mconv_list_codings): Adjusted for the above change.
69 2004-06-03 Kenichi Handa <handa@m17n.org>
71 * coding.c (find_coding): Find by canonicalized name. Don't have
72 to modify the element of coding_definition_list by
74 (mconv__define_coding_from_charset): Delete it.
75 (mconv__register_charset_coding): Canonicalize sym.
76 (mcoding__load_from_database): Register plist modified by
79 * coding.h (mconv__define_coding_from_charset): Don't extern it.
81 * font-ft.c (ft_open): Fix setting of rfont->descent.
83 2004-06-02 Kenichi Handa <handa@m17n.org>
85 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
86 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
87 (xlfd_unparse_name): Renamed from xfont_build_name.
88 (mfont__init): Initialized Mfontconfig.
89 (mfont__free_realized): Unconditionally unref rfont->info.
90 (mfont__select): Free `this' if it's not best.
91 (mfont__open): Don't check frame->realized_font_list.
92 (mfont__parse_name_into_font): New function.
93 (Mfontconfig): New variable.
94 (mfont_from_name): Call mfont_parse_name.
95 (mfont_name): Call mfont_unparse_name.
96 (mdebug_dump_font): Likewise.
98 * font.h (struct MFontDriver): Delete members parse_name and
100 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
101 (mfont__parse_name_into_font): Extern it.
103 * font-ft.c: Include "symbol.h".
104 (close_ft): Unconditionally free filename and charmap_list of
106 (ft_open): Duplicate base->filename. Increment ref-count of
107 ft_info->charmap_list. Free ft_info->charmap_list and
108 ft_info->filename on error.
109 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
111 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
113 (enum xlfd_field_idx): Moved to font.c.
114 (split_font_name, build_font_name): Likewise.
115 (build_font_list): Call mfont__parse_name_info_font.
116 (xfont_open): Call mfont__unparse_name. Free name.
117 (xfont_parse_name, xfont_build_name): Moved to font.c
118 (xft_select): Prototype deleted.
119 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
120 Call mfont_pase_name.
122 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
123 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
126 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
129 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
131 2004-06-01 Kenichi Handa <handa@m17n.org>
133 * fontset.c (mfontset_modify_entry): Pay attention to the case
134 that fontset->font_spec_list is NULL.
136 2004-05-31 Kenichi Handa <handa@m17n.org>
138 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
140 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
142 * font.c (mfont__select): Print score the a font for debugging.
144 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
146 * coding.c (reset_coding_sjis): Check kanji and kana instead of
147 kanji_sym and kana_sym.
149 2004-05-28 Kenichi Handa <handa@m17n.org>
151 * Makefile.am (VINFO): New variable.
152 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
153 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
155 2004-05-27 Kenichi Handa <handa@m17n.org>
157 The following chanages are to make device dependent functions
158 accessible only from MDeviceDriver structure, and to add GD and
159 null device drivers. Font drivers get also device dependent.
161 * m17n.c (m17n_init): Increament shell_initialized.
162 (m17n_fini): Decremented shell_initialized.
164 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
166 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
167 (Mwidget, Mcolormap, Mx): Extern them.
169 * m17n-gui.c: Include <dlfcn.h> and "config.h".
170 (free_frame): Call frame->driver->close instead of
172 (DLOPEN_SHLIB_EXT): New macro.
173 (MDeviceLibraryInterface): New type.
174 (device_library_list): New variable.
175 (register_device_library): New function.
176 (null_device): New variable.
177 (null_device_close, null_device_get_prop)
178 (null_device_realize_face, null_device_free_realized_face): New
180 (null_driver): New variable.
181 (null_device_init, null_device_fini, null_device_open): New
183 (null_interface): New variable.
184 (Mfreetype, Mdevice): Declare them.
185 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
186 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
187 Mwin__Close_Device. Register drivers for Mx and Mgd.
188 (m17n_fini_win): Decremented win_initialized. Call "fini"
189 function of all opened devices. Don't call mwin__fini.
190 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
192 (mframe): Handle Mdevice key of PLIST.
193 (mframe_get_prop): Call frame->device->get_prop instead of
194 mwin__device_get_prop.
196 * m17n-gd.c: New file.
198 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
199 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
201 * m17n-core.c (m17n_init_core): Increate core_initialized.
202 (m17n_fini_core): Decremented core_initialized.
204 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
205 (Mcolormap): Don't extern them here.
207 * m17n-X.c (FRAME_DEVICE): New macro.
208 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
209 (free_display_info): Use MPLIST_DO.
210 (free_device): Free rface->info.
211 (xft_close): Delete it.
212 (device_init): Renamed from mwin__init.
213 (device_fini): Renamed from mwin__fini.
214 (device_open): Renamed from mwin__open_device.
215 (x_driver): New variable.
216 (MXFontInfo): Delete member frame, add member display.
217 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
218 Don't declare them here.
220 * internal-gui.h (MDeviceType): New enum.
221 (MWDefice): Delete it.
222 (struct MFrame): Change type of device to void *. New members
223 device_type, driver, font_driver_list.
224 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
225 (MDeviceDriver): New type.
226 (Mx, Mgd, Mfreetype): Extern them.
227 (mwin__XXX): Delete all of them.
229 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
231 (win_destroy_ic): Likewise.
232 (adjust_window_and_draw): Likewise.
233 (win_callback): Likewise.
234 (Mxim): Declare it here.
235 (minput_event_to_key): Call M_CHECK_READABLE.
237 * fontset.c (mfont__lookup_fontset): Delete local variable
240 * font.h (struct MFontDriver): Delete member close, add members
241 parse_name and build_name.
242 (mfont__driver_list): Delete extern.
243 (mfont__close): Delete extern.
245 * font.c (mfont__init): Don't set mfont__driver_list.
246 (mfont__fini): Don't unref mfont__driver_list.
247 (mfont__select): Try font drivers in frame->font_driver_list. Set
248 driver member of a realized font.
249 (mfont__close): Delete it.
250 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
251 functions of the default frame.
253 * font-ft.c (close_ft): Check ft_info->ft_face and work
255 (add_font_info): Allocate ft_info by M17N_OBJECT.
256 (ft_close): Delete it.
257 (mfont__ft_driver): Don't set ft_close.
258 (ft_select): Increment ref-count of best_font.
259 (ft_open): Decremented ref-count of base. On error, call
260 FT_Done_Face and free ft_info.
261 (ft_find_metric): Always use XXX_MONO in load_flags.
262 (ft_render): Fix setting of width. Call
263 frame->driver->draw_points instead of mwin__draw_points.
264 (ft_to_prop): Don't set mfont__driver_list.
265 (mfont__ft_fini): Just unref ft_info.
267 * face.c (mface__init): Exchange foreground and background of
268 mface__default. Call mface_put_prop to set hline of
270 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
271 (mface__free_realized): Don't call mwin__free_realized_face.
273 * draw.c (Mdepth): Don't declare it here.
274 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
275 (render_glyphs, render_glyph_string): Likewise.
276 (mdraw__init): Don't set Mdepth.
277 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
279 (mdraw_text_per_char_extents): Return 0 on success and -1 on
281 (mdraw_text_items): Check FRAME is writable.
282 (mdraw_per_char_extents): Implement body.
284 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
286 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
287 (GUI_SOURCES): Delete it.
288 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
289 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
290 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
291 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
292 (linkgui_LDADD): Set to libm17n-gui.la
293 (linkgui_LDFLAGS): New target.
294 (SRC): Include ${libm17n_gui_la_SOURCES} and
295 ${libm17n_gd_la_SOURCES}.
297 2004-05-24 Kenichi Handa <handa@m17n.org>
299 * draw.c (draw_background): Don't draw background even if
300 rface->face.property[MFACE_BACKGROUND] is not Mnil.
302 2004-05-22 Kenichi Handa <handa@m17n.org>
304 * m17n-X.c (xft_open_font): Fix anti_alias setting.
306 2004-05-20 Kenichi Handa <handa@m17n.org>
308 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
310 * m17n-gui.c: Include "plist.h".
311 (mframe): If PLIST is NULL, initialize it to emply plist.
313 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
314 (xft_driver): New variable.
315 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
316 (xft_find_metric, xft_render): New function.
317 (mwin__init): Adjusted for the new mfont__driver_list.
318 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
319 generated face to PARAM.
320 (mwin__realize_face): Fix setting of box colors. Don't call hook
322 (mwin__draw_hline): New function.
323 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
324 (mwin__xft_render): Delete these function.
326 * internal-gui.h (struct MFrame): New member tick.
327 (struct MGlyphString): New member tick.
328 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
329 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
330 (mwin__xft_render): Delete extern.
332 * fontset.c (mfont__lookup_fontset): Make the code simpler.
333 (mfontset): Always increment the reference count of returned
336 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
337 (MFTInfo): Moved to font.h.
338 (ft_iso8859_1_font_list): Delete this variable.
339 (set_font_info): Don't set font->property[MFONT_TYPE].
340 (set_font_info): Don't udpate ft_iso8859_1_font_list.
341 (add_font_info): Change type to void.
342 (fc_list): Change anme from xft_list. Caller changed. Include
343 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
344 (mfont__ft_driver): Change name from ft_driver. Caller changed.
345 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
346 (close_ft): Don't call mwin__xft_close. Unref
348 (ft_open): Don't setup ft_info->fontname. Don't call
350 (ft_find_metric): Don't call mwin__xft_get_metric.
351 (ft_encode_char): Call rfont->driver->open instead of ft_open.
352 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
353 (mfont__ft_init): Adjusted for new mfont__driver_list.
354 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
356 * font.c (mfont__driver_list): Make it MPlist.
357 (mfont__init): Adjust initialization of mfont__driver_list.
358 (mfont__fini): Free mfont__driver_list.
359 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
360 (mfont__select): Adjusted for the new mfont__driver_list.
362 * font.h (enum MFontProperty): Delete MFONT_TYPE.
363 (mfont__drirver_list): Adjust prototype.
364 (MFTInfo): Move to here from fron.c. Deleve member fontname.
366 * face.h (struct MFace): Delete member realized_face_list, add
368 (struct MRealizedFace): Delete member need_update
369 andnofont_rface, add member non_ascii_list.
370 (mface__update_frame_face): Extern it.
372 * face.c (hline_prop_list, box_prop_list, noop_hook): New
374 (get_hline_create, get_box_create): New functions.
375 (find_realized_face): Cancel previous change. Arg RFONT deleted.
377 (free_face): Cancep previous change. Free face->frame_list.
378 (serialize_hline): Do nothing if hline->width is zero.
379 (serialize_box): Do nothing if box->width is zero.
380 (mface__init): Setup all properties of mface__default.
381 (mface__fini): Free hline_prop_list and box_prop_list.
382 (mface__realize): Cancel previous change. Update
383 face->frame_list. Setup rface->non_ascii_list.
384 (mface__for_chars): Update rface->non_ascii_list.
385 (mface__free_realized): Free rface->non_ascii_list.
386 (mface__update_frame_face): New function.
387 (mface): Initialize face->frame_list.
388 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
390 (mface_merge): Likewise.
391 (mface_put_prop): If key is Mhline or Mbox, get value by
392 get_hline_create or get_box_create respectively.
393 (mface_put_prop): Update frame->tick and call
394 mface__update_frame_face if necessary.
395 (mface_update): Do nothing if func is noop_hook.
397 * draw.c (render_glyphs): If a font is not found, use
398 mwin__draw_empty_boxes.
399 (alloc_gstring): Initialize gstring->tick.
400 (get_gstring): Check gstring->tick.
402 2004-05-17 Kenichi Handa <handa@m17n.org>
404 * face.c (find_realized_face): Return value changed. If RFONT is
405 NULL, avoid unnecessary checking.
406 (free_face): Free face->realized_face_list.
407 (mface__realize): Adjusted for the change of find_realized_face.
408 If it returns a realized face that needs update, free it and
409 realize a new one. Push a new realized face to
410 frame->realized_face_list instead of appending.
411 (mface__for_chars): Adjusted for the change of find_realized_face.
412 Short cut if the required font is in rface->ascii_rface.
413 (mface_put_prop): Free old value if necessary. Set need_update
414 member of realized faces to 1.
416 * face.h (struct MFace): Delete member tick, add member
418 (struct MRealizedFace): Delete member tick, add member
421 2004-05-13 Kenichi Handa <handa@m17n.org>
423 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
425 2004-05-12 Kenichi Handa <handa@m17n.org>
427 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
429 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
430 parse it XftNameParse.
432 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
433 (all_fonts_scaned): New variable.
434 (set_font_info): FAMILY may be Mnil.
435 (add_font_info): Argument changed.
436 (xft_list): Call add_font_info in it.
438 (ft_select): Make it work in the case family is Mnil.
439 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
440 (mfont__ft_fini): Set all_fonts_scaned to 0.
442 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
443 that is failed to open.
445 2004-05-10 Kenichi Handa <handa@m17n.org>
447 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
448 device's depth is 1 (i.e. monochrome).
450 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
451 to work around the problem of libtool.
453 * font-ft.c: Include <freetype/ftbdf.h>.
454 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
456 (mfont__ft_init): Initialize them.
457 (ft_iso8859_1_font_list): New variable.
458 (set_font_info): Detect a font containing iso8859-1 glyphs and
459 register it in ft_iso8859_1_font_list. If the font is not
460 scalable, assume it as BDF or PCF font and setup SIZE and RESY
461 properties of the font from its properties.
462 (add_font_list): If the font is not scalable, check if it is BDF
463 or PCF font. If not, ignore it.
464 (ft_select): If FAMILY is Mnil, return NULL only if the requested
465 registry is not iso8859-1.
466 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
467 ft_iso8859_1_font_list.
468 (ft_find_metric): If the font is not scalable, assume it as BDF
469 or PCF, and get a metric from its properties.
470 (mfont__ft_fini): Free ft_iso8859_1_font_list.
472 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
474 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
475 (libm17n_la_LDFLAGS): Delete it.
476 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
477 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
479 2004-05-06 Kenichi Handa <handa@m17n.org>
481 * draw.c (compose_glyph_string): Fix previous change.
483 2004-04-30 Kenichi Handa <handa@m17n.org>
485 * font-ft.c (ft_list): Delete unused variable `result'.
486 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
488 2004-04-27 Kenichi Handa <handa@m17n.org>
490 * m17n-X.c: Include config.h
491 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
492 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
493 (MWDevice) [HAVE_XFT2]: New member xft_draw.
494 (FRAME_CMAP, FRAME_VISUAL): New macros.
495 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
496 (xfont_driver): Make it static.
497 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
498 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
499 info->xft_color_back.
500 (MXftFontInfo) [HAVE_XFT2]: New type.
501 (mwin__xft_close) [HAVE_XFT2]: New function.
502 (mwin__xft_open) [HAVE_XFT2]: New function.
503 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
504 (mwin__xft_render) [HAVE_XFT2]: New function.
506 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
507 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
508 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
511 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
513 * font-ft.c: Don't include FT_FREETYPE_H here.
514 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
515 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
516 (MFTInfo): New member charmap_index.
517 (MFTInfo) [HAVE_XFT2]: New member xft_info.
518 (check_otf_filename): Renamed from check_filename. Return value
520 (ft_set_property): This function deleted.
521 (set_font_info): New function.
522 (add_font_list): Argument changed. Add multiple fonts.
523 (xft_list) [HAVE_XFT2]: New function.
524 (ft_list) [not HAVE_XFT2]: New function.
525 (ft_select): Add code for Xft.
526 (close_ft): Likewise.
528 (ft_find_metric): Likewise.
529 (ft_encode_char): Likewise.
530 (ft_render): Likewise.
532 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
534 2004-04-26 Kenichi Handa <handa@m17n.org>
536 * textprop.c (mtext_attach_property): Declare the return type as
539 2004-04-21 Kenichi Handa <handa@m17n.org>
541 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
543 2004-04-09 Kenichi Handa <handa@m17n.org>
545 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
547 (load_command): Setup above members.
549 2004-04-05 Kenichi Handa <handa@m17n.org>
551 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
553 2004-03-30 Kenichi Handa <handa@m17n.org>
555 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
558 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
559 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
561 2004-03-29 Kenichi Handa <handa@m17n.org>
563 * Version 1.0 Patch Level 2 released.
565 2004-03-29 Kenichi Handa <handa@m17n.org>
567 * charset.c (make_charset): Set charset->fully_loaded and
568 charset->simple correctly. Don't try to get charset->min_char and
569 charset->max_char for a charset of method subset and superset.
570 Don't load a mapping file here.
571 (mcharset__init): Set unified_max.
572 (mcharset__load_from_database): Free a working plist.
574 * coding.c (mcoding__fini): Free all malloced data.
576 * input-gui.c (win_create_ic): Set control.as_image for preediting
579 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
580 `count') to initialize the array.
582 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
585 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
587 (mwin__create_window): Fix bug of setting a background pixel of a
589 (mwin__adjust_window): Clear the window before drawing.
591 * m17n-core.c (mdebug__report_object): Free array->objectes if
593 (m17n_init_core): Don't set report_header_printed to 0 here.
594 Fix debugging information.
595 (m17n_fini_core): Set report_header_printed to 0 here.
597 * m17n-core.h (mplist_deserialize): Extern it.
599 * m17n-gui.c (m17n_fini_win): Fix debugging information.
601 * m17n.c (m17n_fini): Fix debugging information.
603 * mtext.c (mtext__adjust_foramt): New function.
605 * mtext.h (mtext__adjust_foramt): Extern it.
607 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
609 * plist.h (mplist__deserialize): Don't extern it.
611 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
612 elements of symbol_table to NULL. Report about created and freed
613 symbols if MDEBUG_FINI is set.
615 2004-03-22 Kenichi Handa <handa@m17n.org>
617 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
619 * m17n.c (m17n_init): Fix the way of checking merror_code.
621 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
623 2004-03-22 Kenichi Handa <handa@m17n.org>
625 * fontset.c (realize_font_group): Adjust the font size by
626 mfont__resize before selecting a font.
628 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
630 2004-03-19 Kenichi Handa <handa@m17n.org>
632 * Version 1.0 Patch Level 1 released.
634 2004-03-19 Kenichi Handa <handa@m17n.org>
636 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
638 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
640 2004-03-19 Kenichi Handa <handa@m17n.org>
642 Re-apply the changes forgotten in the released version.
644 * charset.c (mcharset__load_from_database): Call
645 mchar_define_charset.
647 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
648 (mconv_encode_range): Put Mcoding text property.
650 2004-03-18 Kenichi Handa <handa@m17n.org>
652 * draw.c (Mdepth): New variable.
653 (visual_order): Delete unused local var `pos'.
654 (compose_glyph_string): Fix for the case that gstring->glyphs is
655 realloced. Stop generating glyphs at TO. Fix handling of
657 (layout_glyphs): Get metrics of all glyphs in advance. Set
658 lbearing and rbearing of base of composition glyph correctly.
659 Handle left-overhang glyphs correctly.
660 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
662 (dump_combining_code): Change the defualt off_x character to ".".
663 (mdraw__init): Initialize Mdepth.
665 * face.c (work_gstring): New variable
666 (mface__init): Initialize work_gstring.
667 (mface__fini): Free work_gstring.glyphs.
668 (mface__realize): Don't handle videomode property here. Adjusted
669 for the change of mfont__get_metric.
670 (mface__for_chars): Adjusted for the change of mfont__get_metric.
672 * face.h (enum face_gc): Moved to m17n-X.c.
674 * font.h (struct MFontDriver): Arguments of find_metric changed.
675 (mfont__select): Prototype adjusted.
676 (mfont__get_metric): Likewise.
677 (mfont__ft_drive_otf): Likewise.
678 (mfont__flt_run): Likewise.
680 * font.c (mfont__select): New argument layouter. If layouter is
681 different in the registered font, make a new copy of realized
683 (mfont__get_metric): Argument changed. Get metrics of multiple
685 (mfont_find): Call mfont__select with layouter as Mnil.
687 * font-flt.c (FontLayoutContext): New member rfont.
688 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
689 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
691 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
693 (NUM_POINTS): New macro.
694 (MPointTable): New type.
695 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
696 (mfont__ft_drive_otf): New argument rfont.
698 * fontset.c (realize_font_group): Adjusted for the changed of
700 (check_fontset_element): This function deleted.
702 * input-gui.c (adjust_window_and_draw): Locate a preedit window
703 off the parent window if the preedit text is zero length.
705 * internal-gui.h (struct MFrame): New members foreground,
706 background, videomode, font.
707 (struct MGlyphString): New member anti_alias.
708 (MDrawPoint): New type.
709 (mwin__draw_bitmap): Prototype deleted.
710 (mwin__draw_points): Prototype added.
712 * m17n-gui.h (MDrawControl): New member anti_alias.
714 * m17n-gui.c (free_frame): Free frame->font.
715 (mframe): Set the fontset of frame->face to the default fontset.
717 * m17n-X.c (RGB_GC): New type.
718 (enum gc_index): Renamed from enum face_gc. Member names changed.
720 (struct MWDevice): Members foreground and background deleted. New
721 member scratch_gc, gc_list.
722 (DEFAULT_FONT, FALLBACK_FONT): New macros.
723 (free_device): Free GCs in device->gc_list.
724 (get_rgb_gc): New function.
725 (get_gc): Renamed and argument changed from get_color.
726 (get_gc_for_anti_alias): New function.
727 (xfont_find_metric): Arguments changed. Get metrics of multiple
729 (set_region): Argument changed. Caller changed.
730 (xfont_render): Allways set a font in gc.
731 (x_error_handler, x_io_error_handler): Define only if
732 X_SET_ERROR_HANDLER is defined.
733 (mwin__open_device): Create device->scratch_gc. Set members
734 foreground, background, and videomode of frame. Call
735 XSetErrorHandler and XSetIOErrorHandler only if
736 X_SET_ERROR_HANDLER is defined.
737 (struct gc_list): Deleted.
738 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
739 (mwin__realize_face): Adjusted for the change of the format of
740 rface->info and the charge of set_region.
741 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
742 (mwin__draw_box): Likewise.
743 (mwin__draw_bitmap): This function deleted.
744 (mwin__draw_points): New function.
745 (mwin__verify_region): Adjusted for the change of the format of
746 rface->info and the charge of set_region.
747 (mwin__create_window): Inherit backgound pixel from parent.
748 (mwin__dump_gc): Adjusted for the change of the format of
751 2004-03-16 Kenichi Handa <handa@m17n.org>
753 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
755 * input.c (M_key_alias): New variable.
756 (handle_key): Try M_key_alias property of a key too.
757 (minput__init): Initialize M_key_alias. Give that property to
758 symbols in one_char_symbol. Fix bug of initializing
761 * draw.c (compose_glyph_string): Don't handle
762 ignore_formatting_char here. Include formatting characters in the
763 range processed by a FTL.
764 (layout_glyph_string): Handle ignore_formatting_char here.
766 2004-03-12 Kenichi Handa <handa@m17n.org>
768 * input-gui.c (win_create_ic): Enable bidi in status control.
770 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
772 2004-03-09 Kenichi Handa <handa@m17n.org>
774 * input.c (load_input_method): If title is not specified, use the
775 input method name as title.
777 * m17n-X.c (get_color): Make it static.
778 (xim_create_ic, xim_destroy_ic, x_error_handler)
779 (x_io_error_handler): Likewise.
781 2004-03-01 Kenichi Handa <handa@m17n.org>
783 * Version 1.0 released.
786 Copyright (C) 2003, 2004
787 National Institute of Advanced Industrial Science and Technology (AIST)
788 Registration Number H15PRO112
790 This file is part of the m17n library.
792 The m17n library is free software; you can redistribute it and/or
793 modify it under the terms of the GNU Lesser General Public License
794 as published by the Free Software Foundation; either version 2.1 of
795 the License, or (at your option) any later version.
797 The m17n library is distributed in the hope that it will be useful,
798 but WITHOUT ANY WARRANTY; without even the implied warranty of
799 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
800 Lesser General Public License for more details.
802 You should have received a copy of the GNU Lesser General Public
803 License along with the m17n library; if not, write to the Free
804 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA