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