1 2004-06-25 Kenichi Handa <handa@m17n.org>
3 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
4 (libm17n_gd_la_LDFLAGS): Cancel previous change.
6 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
8 * font-ft.c (fc_list): If FcFontList finds no font, try
11 * draw.c (compose_glyph_string): Terminate the last loop after
12 doing default combining if necessary.
14 2004-06-24 Kenichi Handa <handa@m17n.org>
16 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
18 * character.c (mchar_define_property): Add const to an arg.
20 * charset.c (mchar_define_charset): Add const to an arg.
22 * coding.c (MCodingSystem): Add const to an arg or decoder.
23 (finish_decoding): Add const to an arg.
24 (decode_coding_charset, decode_coding_utf_8)
25 (decode_coding_utf_16, decode_coding_utf_32)
26 (decode_coding_iso_2022, decode_coding_sjis)
27 (mconv_define_coding): Likewise.
29 * m17n-X.c (xft_find_metric): Delete unused variable.
31 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
34 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
37 * mtext.c (count_utf_8_chars, count_utf_16_chars)
38 (mtext__from_data, mtext_from_data): Add `const' to an arg.
40 * mtext.h (mtext__from_data): Ajust prototype.
42 2004-06-23 Kenichi Handa <handa@m17n.org>
44 * draw.c (compose_glyph_string): Always get glyph codes by
46 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
47 (mdraw_glyph_list): New function.
49 * font-flt.c (mfont__flt_run): Be sure to call
50 rfont->driver->encode_char.
52 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
53 (ft_encode_char): Delete arg C.
54 (ft_render): Don't call FT_Get_Char_Index.
56 * font.c (mfont__encodable_p): Delete it.
57 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
59 * font.h (struct MFontDriver): Delete arg C of encode_char.
60 (mfont__encodable_p): Delete extern.
62 * m17n-X.c (xfont_encode_char): Delete arg C.
63 (xft_find_metric): Don't cal FT_Get_Char_Index.
64 (xft_render): Likewise.
66 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
68 (mdraw_glyph_list): Extern it.
70 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
72 2004-06-22 Kenichi Handa <handa@m17n.org>
74 * m17n-gui.h (mfontset_lookup): Extern it.
76 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
78 * fontset.c (realize_fontset_elements)
79 (free_realized_fontset_elements, update_fontset_elements): New
81 (mfont__realize_fontset): Call realize_fontset_elements.
82 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
83 (mfont__lookup_fontset): If a fontset was modified, update
85 (mfontset_modify_entry): Increment fontset->tick.
86 (mfontset_lookup): New function.
88 2004-06-21 Kenichi Handa <handa@m17n.org>
90 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
92 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
93 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
94 length of source text 0.
96 2004-06-21 Kenichi Handa <handa@m17n.org>
98 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
99 (compare): Pay attention to format other than utf-8.
100 (copy): Delete this function.
101 (count_by_utf_8, count_by_utf_16, insert): New functions.
102 (count_utf_16_chars): Fix handling of a surrogate pair.
103 (find_char_forward, find_char_backward): Likewise.
104 (mtext__from_data): Delete unnecessary check. Fix number of
106 (mtext_from_data): Don't count items.
107 (mtext_ref_char): Optimize the code.
108 (mtext_set_char): Pay attention to format other than utf-8.
109 (mtext_cat_char): Likewise.
110 (mtext_dup): Don't call copy, instead do allocation here.
111 (mtext_cat): Call insert instead of copy.
112 (mtext_ncat): Likewise.
113 (mtext_cpy): Delete character at first and call insert instead of
115 (mtext_ncpy): Likewise.
116 (mtext_copy): Likewise.
117 (mtext_duplicate): Call insert instead of copy.
118 (mtext_del): Pay attention to format other than utf-8.
119 (mtext_ins): Simply call insert.
120 (mtext_ins_char): Pay attention to format other than utf-8.
121 (mtext_tok): Call insert instead of copy.
122 (mtext_text): Call UNIT_BYTES.
124 * textprop.c (mtext__adjust_plist_for_change): New function.
126 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
127 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
128 (CHAR_UNITS_AT): Fix typo.
129 (CHAR_UNITS_BY_HEAD): Fix typo.
130 (STRING_CHAR_AND_UNITS): Fix typo.
132 * internal.h (MTEXT_READ_ONLY_P): New macro.
134 * mtext.h (mtext__replace): Delete the extern.
135 (mtext__adjust_foramt): Adjust prototype.
137 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
138 if possible. Otherwise make a copy of mmt.
140 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
143 2004-06-18 Kenichi Handa <handa@m17n.org>
145 * character.h (CHAR_STRING_UTF16): Fix syntax.
147 2004-06-16 Kenichi Handa <handa@m17n.org>
149 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
150 (libm17n_X_la_LIBADD): Delete it.
151 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
153 * m17n-X.c (device_open): Add parens in `if' condition.
155 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
156 (DEC_POSITION): Likewise.
157 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
159 2004-06-15 Kenichi Handa <handa@m17n.org>
161 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
164 * draw.c (compose_glyph_string): If langauge is specified, call
165 mface__for_chars even if a text is all latin. Fix condition for
166 setting non_ascii_found.
168 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
170 * m17n.h (minput_char_to_key): Delete extern.
172 * m17n-gui.h (minput_event_to_key): Cancel previous change.
174 * m17n-gui.c (null_device_open): Set several members of frame.
176 2004-06-14 Kenichi Handa <handa@m17n.org>
178 * m17n-gui.h (minput_event_to_key): Delete extern.
180 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
182 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
184 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
186 2004-06-08 Kenichi Handa <handa@m17n.org>
188 * character.c (mchar_put_prop): Don't increment the ref-count of
191 2004-06-04 Kenichi Handa <handa@m17n.org>
193 * m17n-core.c (mdebug__register_object): New function.
194 (mdebug__unregister_object): Likewise.
196 * internal.h (mdebug__register_object, mdebug__unregister_object):
198 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
201 * charset.c (mcharset__load_from_database): Don't call
202 mconv__register_charset_coding here.
204 * coding.c (find_coding): Get a real name from an element of
205 coding_definition_list.
206 (mconv__register_charset_coding): Set the real name at the top of
208 (mcoding__load_from_database): Likewise.
209 (mconv_list_codings): Adjusted for the above change.
211 2004-06-03 Kenichi Handa <handa@m17n.org>
213 * coding.c (find_coding): Find by canonicalized name. Don't have
214 to modify the element of coding_definition_list by
216 (mconv__define_coding_from_charset): Delete it.
217 (mconv__register_charset_coding): Canonicalize sym.
218 (mcoding__load_from_database): Register plist modified by
221 * coding.h (mconv__define_coding_from_charset): Don't extern it.
223 * font-ft.c (ft_open): Fix setting of rfont->descent.
225 2004-06-02 Kenichi Handa <handa@m17n.org>
227 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
228 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
229 (xlfd_unparse_name): Renamed from xfont_build_name.
230 (mfont__init): Initialized Mfontconfig.
231 (mfont__free_realized): Unconditionally unref rfont->info.
232 (mfont__select): Free `this' if it's not best.
233 (mfont__open): Don't check frame->realized_font_list.
234 (mfont__parse_name_into_font): New function.
235 (Mfontconfig): New variable.
236 (mfont_from_name): Call mfont_parse_name.
237 (mfont_name): Call mfont_unparse_name.
238 (mdebug_dump_font): Likewise.
240 * font.h (struct MFontDriver): Delete members parse_name and
242 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
243 (mfont__parse_name_into_font): Extern it.
245 * font-ft.c: Include "symbol.h".
246 (close_ft): Unconditionally free filename and charmap_list of
248 (ft_open): Duplicate base->filename. Increment ref-count of
249 ft_info->charmap_list. Free ft_info->charmap_list and
250 ft_info->filename on error.
251 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
253 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
255 (enum xlfd_field_idx): Moved to font.c.
256 (split_font_name, build_font_name): Likewise.
257 (build_font_list): Call mfont__parse_name_info_font.
258 (xfont_open): Call mfont__unparse_name. Free name.
259 (xfont_parse_name, xfont_build_name): Moved to font.c
260 (xft_select): Prototype deleted.
261 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
262 Call mfont_pase_name.
264 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
265 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
268 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
271 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
273 2004-06-01 Kenichi Handa <handa@m17n.org>
275 * fontset.c (mfontset_modify_entry): Pay attention to the case
276 that fontset->font_spec_list is NULL.
278 2004-05-31 Kenichi Handa <handa@m17n.org>
280 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
282 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
284 * font.c (mfont__select): Print score the a font for debugging.
286 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
288 * coding.c (reset_coding_sjis): Check kanji and kana instead of
289 kanji_sym and kana_sym.
291 2004-05-28 Kenichi Handa <handa@m17n.org>
293 * Makefile.am (VINFO): New variable.
294 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
295 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
297 2004-05-27 Kenichi Handa <handa@m17n.org>
299 The following chanages are to make device dependent functions
300 accessible only from MDeviceDriver structure, and to add GD and
301 null device drivers. Font drivers get also device dependent.
303 * m17n.c (m17n_init): Increament shell_initialized.
304 (m17n_fini): Decremented shell_initialized.
306 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
308 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
309 (Mwidget, Mcolormap, Mx): Extern them.
311 * m17n-gui.c: Include <dlfcn.h> and "config.h".
312 (free_frame): Call frame->driver->close instead of
314 (DLOPEN_SHLIB_EXT): New macro.
315 (MDeviceLibraryInterface): New type.
316 (device_library_list): New variable.
317 (register_device_library): New function.
318 (null_device): New variable.
319 (null_device_close, null_device_get_prop)
320 (null_device_realize_face, null_device_free_realized_face): New
322 (null_driver): New variable.
323 (null_device_init, null_device_fini, null_device_open): New
325 (null_interface): New variable.
326 (Mfreetype, Mdevice): Declare them.
327 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
328 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
329 Mwin__Close_Device. Register drivers for Mx and Mgd.
330 (m17n_fini_win): Decremented win_initialized. Call "fini"
331 function of all opened devices. Don't call mwin__fini.
332 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
334 (mframe): Handle Mdevice key of PLIST.
335 (mframe_get_prop): Call frame->device->get_prop instead of
336 mwin__device_get_prop.
338 * m17n-gd.c: New file.
340 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
341 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
343 * m17n-core.c (m17n_init_core): Increate core_initialized.
344 (m17n_fini_core): Decremented core_initialized.
346 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
347 (Mcolormap): Don't extern them here.
349 * m17n-X.c (FRAME_DEVICE): New macro.
350 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
351 (free_display_info): Use MPLIST_DO.
352 (free_device): Free rface->info.
353 (xft_close): Delete it.
354 (device_init): Renamed from mwin__init.
355 (device_fini): Renamed from mwin__fini.
356 (device_open): Renamed from mwin__open_device.
357 (x_driver): New variable.
358 (MXFontInfo): Delete member frame, add member display.
359 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
360 Don't declare them here.
362 * internal-gui.h (MDeviceType): New enum.
363 (MWDefice): Delete it.
364 (struct MFrame): Change type of device to void *. New members
365 device_type, driver, font_driver_list.
366 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
367 (MDeviceDriver): New type.
368 (Mx, Mgd, Mfreetype): Extern them.
369 (mwin__XXX): Delete all of them.
371 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
373 (win_destroy_ic): Likewise.
374 (adjust_window_and_draw): Likewise.
375 (win_callback): Likewise.
376 (Mxim): Declare it here.
377 (minput_event_to_key): Call M_CHECK_READABLE.
379 * fontset.c (mfont__lookup_fontset): Delete local variable
382 * font.h (struct MFontDriver): Delete member close, add members
383 parse_name and build_name.
384 (mfont__driver_list): Delete extern.
385 (mfont__close): Delete extern.
387 * font.c (mfont__init): Don't set mfont__driver_list.
388 (mfont__fini): Don't unref mfont__driver_list.
389 (mfont__select): Try font drivers in frame->font_driver_list. Set
390 driver member of a realized font.
391 (mfont__close): Delete it.
392 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
393 functions of the default frame.
395 * font-ft.c (close_ft): Check ft_info->ft_face and work
397 (add_font_info): Allocate ft_info by M17N_OBJECT.
398 (ft_close): Delete it.
399 (mfont__ft_driver): Don't set ft_close.
400 (ft_select): Increment ref-count of best_font.
401 (ft_open): Decremented ref-count of base. On error, call
402 FT_Done_Face and free ft_info.
403 (ft_find_metric): Always use XXX_MONO in load_flags.
404 (ft_render): Fix setting of width. Call
405 frame->driver->draw_points instead of mwin__draw_points.
406 (ft_to_prop): Don't set mfont__driver_list.
407 (mfont__ft_fini): Just unref ft_info.
409 * face.c (mface__init): Exchange foreground and background of
410 mface__default. Call mface_put_prop to set hline of
412 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
413 (mface__free_realized): Don't call mwin__free_realized_face.
415 * draw.c (Mdepth): Don't declare it here.
416 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
417 (render_glyphs, render_glyph_string): Likewise.
418 (mdraw__init): Don't set Mdepth.
419 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
421 (mdraw_text_per_char_extents): Return 0 on success and -1 on
423 (mdraw_text_items): Check FRAME is writable.
424 (mdraw_per_char_extents): Implement body.
426 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
428 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
429 (GUI_SOURCES): Delete it.
430 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
431 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
432 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
433 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
434 (linkgui_LDADD): Set to libm17n-gui.la
435 (linkgui_LDFLAGS): New target.
436 (SRC): Include ${libm17n_gui_la_SOURCES} and
437 ${libm17n_gd_la_SOURCES}.
439 2004-05-24 Kenichi Handa <handa@m17n.org>
441 * draw.c (draw_background): Don't draw background even if
442 rface->face.property[MFACE_BACKGROUND] is not Mnil.
444 2004-05-22 Kenichi Handa <handa@m17n.org>
446 * m17n-X.c (xft_open_font): Fix anti_alias setting.
448 2004-05-20 Kenichi Handa <handa@m17n.org>
450 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
452 * m17n-gui.c: Include "plist.h".
453 (mframe): If PLIST is NULL, initialize it to emply plist.
455 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
456 (xft_driver): New variable.
457 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
458 (xft_find_metric, xft_render): New function.
459 (mwin__init): Adjusted for the new mfont__driver_list.
460 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
461 generated face to PARAM.
462 (mwin__realize_face): Fix setting of box colors. Don't call hook
464 (mwin__draw_hline): New function.
465 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
466 (mwin__xft_render): Delete these function.
468 * internal-gui.h (struct MFrame): New member tick.
469 (struct MGlyphString): New member tick.
470 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
471 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
472 (mwin__xft_render): Delete extern.
474 * fontset.c (mfont__lookup_fontset): Make the code simpler.
475 (mfontset): Always increment the reference count of returned
478 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
479 (MFTInfo): Moved to font.h.
480 (ft_iso8859_1_font_list): Delete this variable.
481 (set_font_info): Don't set font->property[MFONT_TYPE].
482 (set_font_info): Don't udpate ft_iso8859_1_font_list.
483 (add_font_info): Change type to void.
484 (fc_list): Change anme from xft_list. Caller changed. Include
485 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
486 (mfont__ft_driver): Change name from ft_driver. Caller changed.
487 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
488 (close_ft): Don't call mwin__xft_close. Unref
490 (ft_open): Don't setup ft_info->fontname. Don't call
492 (ft_find_metric): Don't call mwin__xft_get_metric.
493 (ft_encode_char): Call rfont->driver->open instead of ft_open.
494 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
495 (mfont__ft_init): Adjusted for new mfont__driver_list.
496 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
498 * font.c (mfont__driver_list): Make it MPlist.
499 (mfont__init): Adjust initialization of mfont__driver_list.
500 (mfont__fini): Free mfont__driver_list.
501 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
502 (mfont__select): Adjusted for the new mfont__driver_list.
504 * font.h (enum MFontProperty): Delete MFONT_TYPE.
505 (mfont__drirver_list): Adjust prototype.
506 (MFTInfo): Move to here from fron.c. Deleve member fontname.
508 * face.h (struct MFace): Delete member realized_face_list, add
510 (struct MRealizedFace): Delete member need_update
511 andnofont_rface, add member non_ascii_list.
512 (mface__update_frame_face): Extern it.
514 * face.c (hline_prop_list, box_prop_list, noop_hook): New
516 (get_hline_create, get_box_create): New functions.
517 (find_realized_face): Cancel previous change. Arg RFONT deleted.
519 (free_face): Cancep previous change. Free face->frame_list.
520 (serialize_hline): Do nothing if hline->width is zero.
521 (serialize_box): Do nothing if box->width is zero.
522 (mface__init): Setup all properties of mface__default.
523 (mface__fini): Free hline_prop_list and box_prop_list.
524 (mface__realize): Cancel previous change. Update
525 face->frame_list. Setup rface->non_ascii_list.
526 (mface__for_chars): Update rface->non_ascii_list.
527 (mface__free_realized): Free rface->non_ascii_list.
528 (mface__update_frame_face): New function.
529 (mface): Initialize face->frame_list.
530 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
532 (mface_merge): Likewise.
533 (mface_put_prop): If key is Mhline or Mbox, get value by
534 get_hline_create or get_box_create respectively.
535 (mface_put_prop): Update frame->tick and call
536 mface__update_frame_face if necessary.
537 (mface_update): Do nothing if func is noop_hook.
539 * draw.c (render_glyphs): If a font is not found, use
540 mwin__draw_empty_boxes.
541 (alloc_gstring): Initialize gstring->tick.
542 (get_gstring): Check gstring->tick.
544 2004-05-17 Kenichi Handa <handa@m17n.org>
546 * face.c (find_realized_face): Return value changed. If RFONT is
547 NULL, avoid unnecessary checking.
548 (free_face): Free face->realized_face_list.
549 (mface__realize): Adjusted for the change of find_realized_face.
550 If it returns a realized face that needs update, free it and
551 realize a new one. Push a new realized face to
552 frame->realized_face_list instead of appending.
553 (mface__for_chars): Adjusted for the change of find_realized_face.
554 Short cut if the required font is in rface->ascii_rface.
555 (mface_put_prop): Free old value if necessary. Set need_update
556 member of realized faces to 1.
558 * face.h (struct MFace): Delete member tick, add member
560 (struct MRealizedFace): Delete member tick, add member
563 2004-05-13 Kenichi Handa <handa@m17n.org>
565 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
567 2004-05-12 Kenichi Handa <handa@m17n.org>
569 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
571 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
572 parse it XftNameParse.
574 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
575 (all_fonts_scaned): New variable.
576 (set_font_info): FAMILY may be Mnil.
577 (add_font_info): Argument changed.
578 (xft_list): Call add_font_info in it.
580 (ft_select): Make it work in the case family is Mnil.
581 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
582 (mfont__ft_fini): Set all_fonts_scaned to 0.
584 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
585 that is failed to open.
587 2004-05-10 Kenichi Handa <handa@m17n.org>
589 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
590 device's depth is 1 (i.e. monochrome).
592 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
593 to work around the problem of libtool.
595 * font-ft.c: Include <freetype/ftbdf.h>.
596 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
598 (mfont__ft_init): Initialize them.
599 (ft_iso8859_1_font_list): New variable.
600 (set_font_info): Detect a font containing iso8859-1 glyphs and
601 register it in ft_iso8859_1_font_list. If the font is not
602 scalable, assume it as BDF or PCF font and setup SIZE and RESY
603 properties of the font from its properties.
604 (add_font_list): If the font is not scalable, check if it is BDF
605 or PCF font. If not, ignore it.
606 (ft_select): If FAMILY is Mnil, return NULL only if the requested
607 registry is not iso8859-1.
608 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
609 ft_iso8859_1_font_list.
610 (ft_find_metric): If the font is not scalable, assume it as BDF
611 or PCF, and get a metric from its properties.
612 (mfont__ft_fini): Free ft_iso8859_1_font_list.
614 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
616 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
617 (libm17n_la_LDFLAGS): Delete it.
618 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
619 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
621 2004-05-06 Kenichi Handa <handa@m17n.org>
623 * draw.c (compose_glyph_string): Fix previous change.
625 2004-04-30 Kenichi Handa <handa@m17n.org>
627 * font-ft.c (ft_list): Delete unused variable `result'.
628 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
630 2004-04-27 Kenichi Handa <handa@m17n.org>
632 * m17n-X.c: Include config.h
633 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
634 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
635 (MWDevice) [HAVE_XFT2]: New member xft_draw.
636 (FRAME_CMAP, FRAME_VISUAL): New macros.
637 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
638 (xfont_driver): Make it static.
639 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
640 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
641 info->xft_color_back.
642 (MXftFontInfo) [HAVE_XFT2]: New type.
643 (mwin__xft_close) [HAVE_XFT2]: New function.
644 (mwin__xft_open) [HAVE_XFT2]: New function.
645 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
646 (mwin__xft_render) [HAVE_XFT2]: New function.
648 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
649 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
650 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
653 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
655 * font-ft.c: Don't include FT_FREETYPE_H here.
656 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
657 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
658 (MFTInfo): New member charmap_index.
659 (MFTInfo) [HAVE_XFT2]: New member xft_info.
660 (check_otf_filename): Renamed from check_filename. Return value
662 (ft_set_property): This function deleted.
663 (set_font_info): New function.
664 (add_font_list): Argument changed. Add multiple fonts.
665 (xft_list) [HAVE_XFT2]: New function.
666 (ft_list) [not HAVE_XFT2]: New function.
667 (ft_select): Add code for Xft.
668 (close_ft): Likewise.
670 (ft_find_metric): Likewise.
671 (ft_encode_char): Likewise.
672 (ft_render): Likewise.
674 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
676 2004-04-26 Kenichi Handa <handa@m17n.org>
678 * textprop.c (mtext_attach_property): Declare the return type as
681 2004-04-21 Kenichi Handa <handa@m17n.org>
683 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
685 2004-04-09 Kenichi Handa <handa@m17n.org>
687 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
689 (load_command): Setup above members.
691 2004-04-05 Kenichi Handa <handa@m17n.org>
693 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
695 2004-03-30 Kenichi Handa <handa@m17n.org>
697 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
700 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
701 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
703 2004-03-29 Kenichi Handa <handa@m17n.org>
705 * Version 1.0 Patch Level 2 released.
707 2004-03-29 Kenichi Handa <handa@m17n.org>
709 * charset.c (make_charset): Set charset->fully_loaded and
710 charset->simple correctly. Don't try to get charset->min_char and
711 charset->max_char for a charset of method subset and superset.
712 Don't load a mapping file here.
713 (mcharset__init): Set unified_max.
714 (mcharset__load_from_database): Free a working plist.
716 * coding.c (mcoding__fini): Free all malloced data.
718 * input-gui.c (win_create_ic): Set control.as_image for preediting
721 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
722 `count') to initialize the array.
724 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
727 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
729 (mwin__create_window): Fix bug of setting a background pixel of a
731 (mwin__adjust_window): Clear the window before drawing.
733 * m17n-core.c (mdebug__report_object): Free array->objectes if
735 (m17n_init_core): Don't set report_header_printed to 0 here.
736 Fix debugging information.
737 (m17n_fini_core): Set report_header_printed to 0 here.
739 * m17n-core.h (mplist_deserialize): Extern it.
741 * m17n-gui.c (m17n_fini_win): Fix debugging information.
743 * m17n.c (m17n_fini): Fix debugging information.
745 * mtext.c (mtext__adjust_foramt): New function.
747 * mtext.h (mtext__adjust_foramt): Extern it.
749 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
751 * plist.h (mplist__deserialize): Don't extern it.
753 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
754 elements of symbol_table to NULL. Report about created and freed
755 symbols if MDEBUG_FINI is set.
757 2004-03-22 Kenichi Handa <handa@m17n.org>
759 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
761 * m17n.c (m17n_init): Fix the way of checking merror_code.
763 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
765 2004-03-22 Kenichi Handa <handa@m17n.org>
767 * fontset.c (realize_font_group): Adjust the font size by
768 mfont__resize before selecting a font.
770 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
772 2004-03-19 Kenichi Handa <handa@m17n.org>
774 * Version 1.0 Patch Level 1 released.
776 2004-03-19 Kenichi Handa <handa@m17n.org>
778 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
780 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
782 2004-03-19 Kenichi Handa <handa@m17n.org>
784 Re-apply the changes forgotten in the released version.
786 * charset.c (mcharset__load_from_database): Call
787 mchar_define_charset.
789 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
790 (mconv_encode_range): Put Mcoding text property.
792 2004-03-18 Kenichi Handa <handa@m17n.org>
794 * draw.c (Mdepth): New variable.
795 (visual_order): Delete unused local var `pos'.
796 (compose_glyph_string): Fix for the case that gstring->glyphs is
797 realloced. Stop generating glyphs at TO. Fix handling of
799 (layout_glyphs): Get metrics of all glyphs in advance. Set
800 lbearing and rbearing of base of composition glyph correctly.
801 Handle left-overhang glyphs correctly.
802 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
804 (dump_combining_code): Change the defualt off_x character to ".".
805 (mdraw__init): Initialize Mdepth.
807 * face.c (work_gstring): New variable
808 (mface__init): Initialize work_gstring.
809 (mface__fini): Free work_gstring.glyphs.
810 (mface__realize): Don't handle videomode property here. Adjusted
811 for the change of mfont__get_metric.
812 (mface__for_chars): Adjusted for the change of mfont__get_metric.
814 * face.h (enum face_gc): Moved to m17n-X.c.
816 * font.h (struct MFontDriver): Arguments of find_metric changed.
817 (mfont__select): Prototype adjusted.
818 (mfont__get_metric): Likewise.
819 (mfont__ft_drive_otf): Likewise.
820 (mfont__flt_run): Likewise.
822 * font.c (mfont__select): New argument layouter. If layouter is
823 different in the registered font, make a new copy of realized
825 (mfont__get_metric): Argument changed. Get metrics of multiple
827 (mfont_find): Call mfont__select with layouter as Mnil.
829 * font-flt.c (FontLayoutContext): New member rfont.
830 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
831 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
833 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
835 (NUM_POINTS): New macro.
836 (MPointTable): New type.
837 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
838 (mfont__ft_drive_otf): New argument rfont.
840 * fontset.c (realize_font_group): Adjusted for the changed of
842 (check_fontset_element): This function deleted.
844 * input-gui.c (adjust_window_and_draw): Locate a preedit window
845 off the parent window if the preedit text is zero length.
847 * internal-gui.h (struct MFrame): New members foreground,
848 background, videomode, font.
849 (struct MGlyphString): New member anti_alias.
850 (MDrawPoint): New type.
851 (mwin__draw_bitmap): Prototype deleted.
852 (mwin__draw_points): Prototype added.
854 * m17n-gui.h (MDrawControl): New member anti_alias.
856 * m17n-gui.c (free_frame): Free frame->font.
857 (mframe): Set the fontset of frame->face to the default fontset.
859 * m17n-X.c (RGB_GC): New type.
860 (enum gc_index): Renamed from enum face_gc. Member names changed.
862 (struct MWDevice): Members foreground and background deleted. New
863 member scratch_gc, gc_list.
864 (DEFAULT_FONT, FALLBACK_FONT): New macros.
865 (free_device): Free GCs in device->gc_list.
866 (get_rgb_gc): New function.
867 (get_gc): Renamed and argument changed from get_color.
868 (get_gc_for_anti_alias): New function.
869 (xfont_find_metric): Arguments changed. Get metrics of multiple
871 (set_region): Argument changed. Caller changed.
872 (xfont_render): Allways set a font in gc.
873 (x_error_handler, x_io_error_handler): Define only if
874 X_SET_ERROR_HANDLER is defined.
875 (mwin__open_device): Create device->scratch_gc. Set members
876 foreground, background, and videomode of frame. Call
877 XSetErrorHandler and XSetIOErrorHandler only if
878 X_SET_ERROR_HANDLER is defined.
879 (struct gc_list): Deleted.
880 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
881 (mwin__realize_face): Adjusted for the change of the format of
882 rface->info and the charge of set_region.
883 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
884 (mwin__draw_box): Likewise.
885 (mwin__draw_bitmap): This function deleted.
886 (mwin__draw_points): New function.
887 (mwin__verify_region): Adjusted for the change of the format of
888 rface->info and the charge of set_region.
889 (mwin__create_window): Inherit backgound pixel from parent.
890 (mwin__dump_gc): Adjusted for the change of the format of
893 2004-03-16 Kenichi Handa <handa@m17n.org>
895 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
897 * input.c (M_key_alias): New variable.
898 (handle_key): Try M_key_alias property of a key too.
899 (minput__init): Initialize M_key_alias. Give that property to
900 symbols in one_char_symbol. Fix bug of initializing
903 * draw.c (compose_glyph_string): Don't handle
904 ignore_formatting_char here. Include formatting characters in the
905 range processed by a FTL.
906 (layout_glyph_string): Handle ignore_formatting_char here.
908 2004-03-12 Kenichi Handa <handa@m17n.org>
910 * input-gui.c (win_create_ic): Enable bidi in status control.
912 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
914 2004-03-09 Kenichi Handa <handa@m17n.org>
916 * input.c (load_input_method): If title is not specified, use the
917 input method name as title.
919 * m17n-X.c (get_color): Make it static.
920 (xim_create_ic, xim_destroy_ic, x_error_handler)
921 (x_io_error_handler): Likewise.
923 2004-03-01 Kenichi Handa <handa@m17n.org>
925 * Version 1.0 released.
928 Copyright (C) 2003, 2004
929 National Institute of Advanced Industrial Science and Technology (AIST)
930 Registration Number H15PRO112
932 This file is part of the m17n library.
934 The m17n library is free software; you can redistribute it and/or
935 modify it under the terms of the GNU Lesser General Public License
936 as published by the Free Software Foundation; either version 2.1 of
937 the License, or (at your option) any later version.
939 The m17n library is distributed in the hope that it will be useful,
940 but WITHOUT ANY WARRANTY; without even the implied warranty of
941 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
942 Lesser General Public License for more details.
944 You should have received a copy of the GNU Lesser General Public
945 License along with the m17n library; if not, write to the Free
946 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA