1 2004-07-06 Kenichi Handa <handa@m17n.org>
3 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
4 internal-gui.h: Cancel previous changes.
6 * m17n-gd.h: Delete it.
8 * Makefile.am (libm17n_core_la_LIBADD): New variable.
9 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
10 @XML2_LD_FLAGS@ to above.
11 (libm17n_la_LIBADD): Add -ldl.
12 (libm17n_la_LDFLAGS): Add -export-dynamic.
13 (X_LD_FLAGS): Fix the order of linking.
14 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
15 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
16 (libm17n_X_la_LDFLAGS): Add -module.
17 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
18 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
19 (libm17n_gd_la_LDFLAGS): Add -module.
20 (include_HEADERS): Delete m17n-gd.h.
22 2004-06-30 Kenichi Handa <handa@m17n.org>
24 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
25 (MDeviceLibraryInterface): Delete it.
26 (register_device_library): Delete it.
27 (m17n__device_library_list): Renamed from device_library_list.
29 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
30 (m17n_init_win): Adjust prototype.
32 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
33 (m17n_init_gd): New function.
35 * m17n-gd.h: New file.
37 * m17n-X.h: Include <m17n-gui.h>.
38 (m17n_init_X): Extern it.
39 (M17N_INIT): Redefine it.
41 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
42 (m17n_init_X): New function.
44 * internal-gui.h (m17n__device_library_list): Extern it.
45 (struct MDeviceDriver): New members initialized, init, and fini.
47 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
49 (libm17n_X_la_LIBADD): Delete aboves.
50 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
51 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
52 (libm17n_gd_la_LDFLAGS): Delete it.
53 (include_HEADERS): Add m17n-gd.h.
55 2004-06-25 Kenichi Handa <handa@m17n.org>
57 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
58 (libm17n_gd_la_LDFLAGS): Cancel previous change.
60 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
62 * font-ft.c (fc_list): If FcFontList finds no font, try
65 * draw.c (compose_glyph_string): Terminate the last loop after
66 doing default combining if necessary.
68 2004-06-24 Kenichi Handa <handa@m17n.org>
70 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
72 * character.c (mchar_define_property): Add const to an arg.
74 * charset.c (mchar_define_charset): Add const to an arg.
76 * coding.c (MCodingSystem): Add const to an arg or decoder.
77 (finish_decoding): Add const to an arg.
78 (decode_coding_charset, decode_coding_utf_8)
79 (decode_coding_utf_16, decode_coding_utf_32)
80 (decode_coding_iso_2022, decode_coding_sjis)
81 (mconv_define_coding): Likewise.
83 * m17n-X.c (xft_find_metric): Delete unused variable.
85 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
88 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
91 * mtext.c (count_utf_8_chars, count_utf_16_chars)
92 (mtext__from_data, mtext_from_data): Add `const' to an arg.
94 * mtext.h (mtext__from_data): Ajust prototype.
96 2004-06-23 Kenichi Handa <handa@m17n.org>
98 * draw.c (compose_glyph_string): Always get glyph codes by
100 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
101 (mdraw_glyph_list): New function.
103 * font-flt.c (mfont__flt_run): Be sure to call
104 rfont->driver->encode_char.
106 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
107 (ft_encode_char): Delete arg C.
108 (ft_render): Don't call FT_Get_Char_Index.
110 * font.c (mfont__encodable_p): Delete it.
111 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
113 * font.h (struct MFontDriver): Delete arg C of encode_char.
114 (mfont__encodable_p): Delete extern.
116 * m17n-X.c (xfont_encode_char): Delete arg C.
117 (xft_find_metric): Don't cal FT_Get_Char_Index.
118 (xft_render): Likewise.
120 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
122 (mdraw_glyph_list): Extern it.
124 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
126 2004-06-22 Kenichi Handa <handa@m17n.org>
128 * m17n-gui.h (mfontset_lookup): Extern it.
130 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
132 * fontset.c (realize_fontset_elements)
133 (free_realized_fontset_elements, update_fontset_elements): New
135 (mfont__realize_fontset): Call realize_fontset_elements.
136 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
137 (mfont__lookup_fontset): If a fontset was modified, update
138 the realized fontset.
139 (mfontset_modify_entry): Increment fontset->tick.
140 (mfontset_lookup): New function.
142 2004-06-21 Kenichi Handa <handa@m17n.org>
144 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
146 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
147 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
148 length of source text 0.
150 2004-06-21 Kenichi Handa <handa@m17n.org>
152 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
153 (compare): Pay attention to format other than utf-8.
154 (copy): Delete this function.
155 (count_by_utf_8, count_by_utf_16, insert): New functions.
156 (count_utf_16_chars): Fix handling of a surrogate pair.
157 (find_char_forward, find_char_backward): Likewise.
158 (mtext__from_data): Delete unnecessary check. Fix number of
160 (mtext_from_data): Don't count items.
161 (mtext_ref_char): Optimize the code.
162 (mtext_set_char): Pay attention to format other than utf-8.
163 (mtext_cat_char): Likewise.
164 (mtext_dup): Don't call copy, instead do allocation here.
165 (mtext_cat): Call insert instead of copy.
166 (mtext_ncat): Likewise.
167 (mtext_cpy): Delete character at first and call insert instead of
169 (mtext_ncpy): Likewise.
170 (mtext_copy): Likewise.
171 (mtext_duplicate): Call insert instead of copy.
172 (mtext_del): Pay attention to format other than utf-8.
173 (mtext_ins): Simply call insert.
174 (mtext_ins_char): Pay attention to format other than utf-8.
175 (mtext_tok): Call insert instead of copy.
176 (mtext_text): Call UNIT_BYTES.
178 * textprop.c (mtext__adjust_plist_for_change): New function.
180 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
181 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
182 (CHAR_UNITS_AT): Fix typo.
183 (CHAR_UNITS_BY_HEAD): Fix typo.
184 (STRING_CHAR_AND_UNITS): Fix typo.
186 * internal.h (MTEXT_READ_ONLY_P): New macro.
188 * mtext.h (mtext__replace): Delete the extern.
189 (mtext__adjust_foramt): Adjust prototype.
191 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
192 if possible. Otherwise make a copy of mmt.
194 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
197 2004-06-18 Kenichi Handa <handa@m17n.org>
199 * character.h (CHAR_STRING_UTF16): Fix syntax.
201 2004-06-16 Kenichi Handa <handa@m17n.org>
203 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
204 (libm17n_X_la_LIBADD): Delete it.
205 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
207 * m17n-X.c (device_open): Add parens in `if' condition.
209 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
210 (DEC_POSITION): Likewise.
211 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
213 2004-06-15 Kenichi Handa <handa@m17n.org>
215 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
218 * draw.c (compose_glyph_string): If langauge is specified, call
219 mface__for_chars even if a text is all latin. Fix condition for
220 setting non_ascii_found.
222 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
224 * m17n.h (minput_char_to_key): Delete extern.
226 * m17n-gui.h (minput_event_to_key): Cancel previous change.
228 * m17n-gui.c (null_device_open): Set several members of frame.
230 2004-06-14 Kenichi Handa <handa@m17n.org>
232 * m17n-gui.h (minput_event_to_key): Delete extern.
234 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
236 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
238 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
240 2004-06-08 Kenichi Handa <handa@m17n.org>
242 * character.c (mchar_put_prop): Don't increment the ref-count of
245 2004-06-04 Kenichi Handa <handa@m17n.org>
247 * m17n-core.c (mdebug__register_object): New function.
248 (mdebug__unregister_object): Likewise.
250 * internal.h (mdebug__register_object, mdebug__unregister_object):
252 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
255 * charset.c (mcharset__load_from_database): Don't call
256 mconv__register_charset_coding here.
258 * coding.c (find_coding): Get a real name from an element of
259 coding_definition_list.
260 (mconv__register_charset_coding): Set the real name at the top of
262 (mcoding__load_from_database): Likewise.
263 (mconv_list_codings): Adjusted for the above change.
265 2004-06-03 Kenichi Handa <handa@m17n.org>
267 * coding.c (find_coding): Find by canonicalized name. Don't have
268 to modify the element of coding_definition_list by
270 (mconv__define_coding_from_charset): Delete it.
271 (mconv__register_charset_coding): Canonicalize sym.
272 (mcoding__load_from_database): Register plist modified by
275 * coding.h (mconv__define_coding_from_charset): Don't extern it.
277 * font-ft.c (ft_open): Fix setting of rfont->descent.
279 2004-06-02 Kenichi Handa <handa@m17n.org>
281 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
282 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
283 (xlfd_unparse_name): Renamed from xfont_build_name.
284 (mfont__init): Initialized Mfontconfig.
285 (mfont__free_realized): Unconditionally unref rfont->info.
286 (mfont__select): Free `this' if it's not best.
287 (mfont__open): Don't check frame->realized_font_list.
288 (mfont__parse_name_into_font): New function.
289 (Mfontconfig): New variable.
290 (mfont_from_name): Call mfont_parse_name.
291 (mfont_name): Call mfont_unparse_name.
292 (mdebug_dump_font): Likewise.
294 * font.h (struct MFontDriver): Delete members parse_name and
296 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
297 (mfont__parse_name_into_font): Extern it.
299 * font-ft.c: Include "symbol.h".
300 (close_ft): Unconditionally free filename and charmap_list of
302 (ft_open): Duplicate base->filename. Increment ref-count of
303 ft_info->charmap_list. Free ft_info->charmap_list and
304 ft_info->filename on error.
305 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
307 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
309 (enum xlfd_field_idx): Moved to font.c.
310 (split_font_name, build_font_name): Likewise.
311 (build_font_list): Call mfont__parse_name_info_font.
312 (xfont_open): Call mfont__unparse_name. Free name.
313 (xfont_parse_name, xfont_build_name): Moved to font.c
314 (xft_select): Prototype deleted.
315 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
316 Call mfont_pase_name.
318 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
319 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
322 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
325 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
327 2004-06-01 Kenichi Handa <handa@m17n.org>
329 * fontset.c (mfontset_modify_entry): Pay attention to the case
330 that fontset->font_spec_list is NULL.
332 2004-05-31 Kenichi Handa <handa@m17n.org>
334 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
336 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
338 * font.c (mfont__select): Print score the a font for debugging.
340 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
342 * coding.c (reset_coding_sjis): Check kanji and kana instead of
343 kanji_sym and kana_sym.
345 2004-05-28 Kenichi Handa <handa@m17n.org>
347 * Makefile.am (VINFO): New variable.
348 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
349 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
351 2004-05-27 Kenichi Handa <handa@m17n.org>
353 The following chanages are to make device dependent functions
354 accessible only from MDeviceDriver structure, and to add GD and
355 null device drivers. Font drivers get also device dependent.
357 * m17n.c (m17n_init): Increament shell_initialized.
358 (m17n_fini): Decremented shell_initialized.
360 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
362 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
363 (Mwidget, Mcolormap, Mx): Extern them.
365 * m17n-gui.c: Include <dlfcn.h> and "config.h".
366 (free_frame): Call frame->driver->close instead of
368 (DLOPEN_SHLIB_EXT): New macro.
369 (MDeviceLibraryInterface): New type.
370 (device_library_list): New variable.
371 (register_device_library): New function.
372 (null_device): New variable.
373 (null_device_close, null_device_get_prop)
374 (null_device_realize_face, null_device_free_realized_face): New
376 (null_driver): New variable.
377 (null_device_init, null_device_fini, null_device_open): New
379 (null_interface): New variable.
380 (Mfreetype, Mdevice): Declare them.
381 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
382 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
383 Mwin__Close_Device. Register drivers for Mx and Mgd.
384 (m17n_fini_win): Decremented win_initialized. Call "fini"
385 function of all opened devices. Don't call mwin__fini.
386 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
388 (mframe): Handle Mdevice key of PLIST.
389 (mframe_get_prop): Call frame->device->get_prop instead of
390 mwin__device_get_prop.
392 * m17n-gd.c: New file.
394 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
395 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
397 * m17n-core.c (m17n_init_core): Increate core_initialized.
398 (m17n_fini_core): Decremented core_initialized.
400 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
401 (Mcolormap): Don't extern them here.
403 * m17n-X.c (FRAME_DEVICE): New macro.
404 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
405 (free_display_info): Use MPLIST_DO.
406 (free_device): Free rface->info.
407 (xft_close): Delete it.
408 (device_init): Renamed from mwin__init.
409 (device_fini): Renamed from mwin__fini.
410 (device_open): Renamed from mwin__open_device.
411 (x_driver): New variable.
412 (MXFontInfo): Delete member frame, add member display.
413 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
414 Don't declare them here.
416 * internal-gui.h (MDeviceType): New enum.
417 (MWDefice): Delete it.
418 (struct MFrame): Change type of device to void *. New members
419 device_type, driver, font_driver_list.
420 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
421 (MDeviceDriver): New type.
422 (Mx, Mgd, Mfreetype): Extern them.
423 (mwin__XXX): Delete all of them.
425 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
427 (win_destroy_ic): Likewise.
428 (adjust_window_and_draw): Likewise.
429 (win_callback): Likewise.
430 (Mxim): Declare it here.
431 (minput_event_to_key): Call M_CHECK_READABLE.
433 * fontset.c (mfont__lookup_fontset): Delete local variable
436 * font.h (struct MFontDriver): Delete member close, add members
437 parse_name and build_name.
438 (mfont__driver_list): Delete extern.
439 (mfont__close): Delete extern.
441 * font.c (mfont__init): Don't set mfont__driver_list.
442 (mfont__fini): Don't unref mfont__driver_list.
443 (mfont__select): Try font drivers in frame->font_driver_list. Set
444 driver member of a realized font.
445 (mfont__close): Delete it.
446 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
447 functions of the default frame.
449 * font-ft.c (close_ft): Check ft_info->ft_face and work
451 (add_font_info): Allocate ft_info by M17N_OBJECT.
452 (ft_close): Delete it.
453 (mfont__ft_driver): Don't set ft_close.
454 (ft_select): Increment ref-count of best_font.
455 (ft_open): Decremented ref-count of base. On error, call
456 FT_Done_Face and free ft_info.
457 (ft_find_metric): Always use XXX_MONO in load_flags.
458 (ft_render): Fix setting of width. Call
459 frame->driver->draw_points instead of mwin__draw_points.
460 (ft_to_prop): Don't set mfont__driver_list.
461 (mfont__ft_fini): Just unref ft_info.
463 * face.c (mface__init): Exchange foreground and background of
464 mface__default. Call mface_put_prop to set hline of
466 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
467 (mface__free_realized): Don't call mwin__free_realized_face.
469 * draw.c (Mdepth): Don't declare it here.
470 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
471 (render_glyphs, render_glyph_string): Likewise.
472 (mdraw__init): Don't set Mdepth.
473 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
475 (mdraw_text_per_char_extents): Return 0 on success and -1 on
477 (mdraw_text_items): Check FRAME is writable.
478 (mdraw_per_char_extents): Implement body.
480 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
482 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
483 (GUI_SOURCES): Delete it.
484 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
485 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
486 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
487 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
488 (linkgui_LDADD): Set to libm17n-gui.la
489 (linkgui_LDFLAGS): New target.
490 (SRC): Include ${libm17n_gui_la_SOURCES} and
491 ${libm17n_gd_la_SOURCES}.
493 2004-05-24 Kenichi Handa <handa@m17n.org>
495 * draw.c (draw_background): Don't draw background even if
496 rface->face.property[MFACE_BACKGROUND] is not Mnil.
498 2004-05-22 Kenichi Handa <handa@m17n.org>
500 * m17n-X.c (xft_open_font): Fix anti_alias setting.
502 2004-05-20 Kenichi Handa <handa@m17n.org>
504 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
506 * m17n-gui.c: Include "plist.h".
507 (mframe): If PLIST is NULL, initialize it to emply plist.
509 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
510 (xft_driver): New variable.
511 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
512 (xft_find_metric, xft_render): New function.
513 (mwin__init): Adjusted for the new mfont__driver_list.
514 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
515 generated face to PARAM.
516 (mwin__realize_face): Fix setting of box colors. Don't call hook
518 (mwin__draw_hline): New function.
519 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
520 (mwin__xft_render): Delete these function.
522 * internal-gui.h (struct MFrame): New member tick.
523 (struct MGlyphString): New member tick.
524 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
525 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
526 (mwin__xft_render): Delete extern.
528 * fontset.c (mfont__lookup_fontset): Make the code simpler.
529 (mfontset): Always increment the reference count of returned
532 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
533 (MFTInfo): Moved to font.h.
534 (ft_iso8859_1_font_list): Delete this variable.
535 (set_font_info): Don't set font->property[MFONT_TYPE].
536 (set_font_info): Don't udpate ft_iso8859_1_font_list.
537 (add_font_info): Change type to void.
538 (fc_list): Change anme from xft_list. Caller changed. Include
539 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
540 (mfont__ft_driver): Change name from ft_driver. Caller changed.
541 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
542 (close_ft): Don't call mwin__xft_close. Unref
544 (ft_open): Don't setup ft_info->fontname. Don't call
546 (ft_find_metric): Don't call mwin__xft_get_metric.
547 (ft_encode_char): Call rfont->driver->open instead of ft_open.
548 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
549 (mfont__ft_init): Adjusted for new mfont__driver_list.
550 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
552 * font.c (mfont__driver_list): Make it MPlist.
553 (mfont__init): Adjust initialization of mfont__driver_list.
554 (mfont__fini): Free mfont__driver_list.
555 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
556 (mfont__select): Adjusted for the new mfont__driver_list.
558 * font.h (enum MFontProperty): Delete MFONT_TYPE.
559 (mfont__drirver_list): Adjust prototype.
560 (MFTInfo): Move to here from fron.c. Deleve member fontname.
562 * face.h (struct MFace): Delete member realized_face_list, add
564 (struct MRealizedFace): Delete member need_update
565 andnofont_rface, add member non_ascii_list.
566 (mface__update_frame_face): Extern it.
568 * face.c (hline_prop_list, box_prop_list, noop_hook): New
570 (get_hline_create, get_box_create): New functions.
571 (find_realized_face): Cancel previous change. Arg RFONT deleted.
573 (free_face): Cancep previous change. Free face->frame_list.
574 (serialize_hline): Do nothing if hline->width is zero.
575 (serialize_box): Do nothing if box->width is zero.
576 (mface__init): Setup all properties of mface__default.
577 (mface__fini): Free hline_prop_list and box_prop_list.
578 (mface__realize): Cancel previous change. Update
579 face->frame_list. Setup rface->non_ascii_list.
580 (mface__for_chars): Update rface->non_ascii_list.
581 (mface__free_realized): Free rface->non_ascii_list.
582 (mface__update_frame_face): New function.
583 (mface): Initialize face->frame_list.
584 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
586 (mface_merge): Likewise.
587 (mface_put_prop): If key is Mhline or Mbox, get value by
588 get_hline_create or get_box_create respectively.
589 (mface_put_prop): Update frame->tick and call
590 mface__update_frame_face if necessary.
591 (mface_update): Do nothing if func is noop_hook.
593 * draw.c (render_glyphs): If a font is not found, use
594 mwin__draw_empty_boxes.
595 (alloc_gstring): Initialize gstring->tick.
596 (get_gstring): Check gstring->tick.
598 2004-05-17 Kenichi Handa <handa@m17n.org>
600 * face.c (find_realized_face): Return value changed. If RFONT is
601 NULL, avoid unnecessary checking.
602 (free_face): Free face->realized_face_list.
603 (mface__realize): Adjusted for the change of find_realized_face.
604 If it returns a realized face that needs update, free it and
605 realize a new one. Push a new realized face to
606 frame->realized_face_list instead of appending.
607 (mface__for_chars): Adjusted for the change of find_realized_face.
608 Short cut if the required font is in rface->ascii_rface.
609 (mface_put_prop): Free old value if necessary. Set need_update
610 member of realized faces to 1.
612 * face.h (struct MFace): Delete member tick, add member
614 (struct MRealizedFace): Delete member tick, add member
617 2004-05-13 Kenichi Handa <handa@m17n.org>
619 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
621 2004-05-12 Kenichi Handa <handa@m17n.org>
623 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
625 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
626 parse it XftNameParse.
628 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
629 (all_fonts_scaned): New variable.
630 (set_font_info): FAMILY may be Mnil.
631 (add_font_info): Argument changed.
632 (xft_list): Call add_font_info in it.
634 (ft_select): Make it work in the case family is Mnil.
635 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
636 (mfont__ft_fini): Set all_fonts_scaned to 0.
638 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
639 that is failed to open.
641 2004-05-10 Kenichi Handa <handa@m17n.org>
643 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
644 device's depth is 1 (i.e. monochrome).
646 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
647 to work around the problem of libtool.
649 * font-ft.c: Include <freetype/ftbdf.h>.
650 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
652 (mfont__ft_init): Initialize them.
653 (ft_iso8859_1_font_list): New variable.
654 (set_font_info): Detect a font containing iso8859-1 glyphs and
655 register it in ft_iso8859_1_font_list. If the font is not
656 scalable, assume it as BDF or PCF font and setup SIZE and RESY
657 properties of the font from its properties.
658 (add_font_list): If the font is not scalable, check if it is BDF
659 or PCF font. If not, ignore it.
660 (ft_select): If FAMILY is Mnil, return NULL only if the requested
661 registry is not iso8859-1.
662 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
663 ft_iso8859_1_font_list.
664 (ft_find_metric): If the font is not scalable, assume it as BDF
665 or PCF, and get a metric from its properties.
666 (mfont__ft_fini): Free ft_iso8859_1_font_list.
668 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
670 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
671 (libm17n_la_LDFLAGS): Delete it.
672 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
673 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
675 2004-05-06 Kenichi Handa <handa@m17n.org>
677 * draw.c (compose_glyph_string): Fix previous change.
679 2004-04-30 Kenichi Handa <handa@m17n.org>
681 * font-ft.c (ft_list): Delete unused variable `result'.
682 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
684 2004-04-27 Kenichi Handa <handa@m17n.org>
686 * m17n-X.c: Include config.h
687 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
688 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
689 (MWDevice) [HAVE_XFT2]: New member xft_draw.
690 (FRAME_CMAP, FRAME_VISUAL): New macros.
691 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
692 (xfont_driver): Make it static.
693 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
694 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
695 info->xft_color_back.
696 (MXftFontInfo) [HAVE_XFT2]: New type.
697 (mwin__xft_close) [HAVE_XFT2]: New function.
698 (mwin__xft_open) [HAVE_XFT2]: New function.
699 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
700 (mwin__xft_render) [HAVE_XFT2]: New function.
702 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
703 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
704 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
707 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
709 * font-ft.c: Don't include FT_FREETYPE_H here.
710 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
711 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
712 (MFTInfo): New member charmap_index.
713 (MFTInfo) [HAVE_XFT2]: New member xft_info.
714 (check_otf_filename): Renamed from check_filename. Return value
716 (ft_set_property): This function deleted.
717 (set_font_info): New function.
718 (add_font_list): Argument changed. Add multiple fonts.
719 (xft_list) [HAVE_XFT2]: New function.
720 (ft_list) [not HAVE_XFT2]: New function.
721 (ft_select): Add code for Xft.
722 (close_ft): Likewise.
724 (ft_find_metric): Likewise.
725 (ft_encode_char): Likewise.
726 (ft_render): Likewise.
728 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
730 2004-04-26 Kenichi Handa <handa@m17n.org>
732 * textprop.c (mtext_attach_property): Declare the return type as
735 2004-04-21 Kenichi Handa <handa@m17n.org>
737 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
739 2004-04-09 Kenichi Handa <handa@m17n.org>
741 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
743 (load_command): Setup above members.
745 2004-04-05 Kenichi Handa <handa@m17n.org>
747 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
749 2004-03-30 Kenichi Handa <handa@m17n.org>
751 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
754 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
755 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
757 2004-03-29 Kenichi Handa <handa@m17n.org>
759 * Version 1.0 Patch Level 2 released.
761 2004-03-29 Kenichi Handa <handa@m17n.org>
763 * charset.c (make_charset): Set charset->fully_loaded and
764 charset->simple correctly. Don't try to get charset->min_char and
765 charset->max_char for a charset of method subset and superset.
766 Don't load a mapping file here.
767 (mcharset__init): Set unified_max.
768 (mcharset__load_from_database): Free a working plist.
770 * coding.c (mcoding__fini): Free all malloced data.
772 * input-gui.c (win_create_ic): Set control.as_image for preediting
775 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
776 `count') to initialize the array.
778 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
781 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
783 (mwin__create_window): Fix bug of setting a background pixel of a
785 (mwin__adjust_window): Clear the window before drawing.
787 * m17n-core.c (mdebug__report_object): Free array->objectes if
789 (m17n_init_core): Don't set report_header_printed to 0 here.
790 Fix debugging information.
791 (m17n_fini_core): Set report_header_printed to 0 here.
793 * m17n-core.h (mplist_deserialize): Extern it.
795 * m17n-gui.c (m17n_fini_win): Fix debugging information.
797 * m17n.c (m17n_fini): Fix debugging information.
799 * mtext.c (mtext__adjust_foramt): New function.
801 * mtext.h (mtext__adjust_foramt): Extern it.
803 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
805 * plist.h (mplist__deserialize): Don't extern it.
807 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
808 elements of symbol_table to NULL. Report about created and freed
809 symbols if MDEBUG_FINI is set.
811 2004-03-22 Kenichi Handa <handa@m17n.org>
813 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
815 * m17n.c (m17n_init): Fix the way of checking merror_code.
817 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
819 2004-03-22 Kenichi Handa <handa@m17n.org>
821 * fontset.c (realize_font_group): Adjust the font size by
822 mfont__resize before selecting a font.
824 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
826 2004-03-19 Kenichi Handa <handa@m17n.org>
828 * Version 1.0 Patch Level 1 released.
830 2004-03-19 Kenichi Handa <handa@m17n.org>
832 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
834 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
836 2004-03-19 Kenichi Handa <handa@m17n.org>
838 Re-apply the changes forgotten in the released version.
840 * charset.c (mcharset__load_from_database): Call
841 mchar_define_charset.
843 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
844 (mconv_encode_range): Put Mcoding text property.
846 2004-03-18 Kenichi Handa <handa@m17n.org>
848 * draw.c (Mdepth): New variable.
849 (visual_order): Delete unused local var `pos'.
850 (compose_glyph_string): Fix for the case that gstring->glyphs is
851 realloced. Stop generating glyphs at TO. Fix handling of
853 (layout_glyphs): Get metrics of all glyphs in advance. Set
854 lbearing and rbearing of base of composition glyph correctly.
855 Handle left-overhang glyphs correctly.
856 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
858 (dump_combining_code): Change the defualt off_x character to ".".
859 (mdraw__init): Initialize Mdepth.
861 * face.c (work_gstring): New variable
862 (mface__init): Initialize work_gstring.
863 (mface__fini): Free work_gstring.glyphs.
864 (mface__realize): Don't handle videomode property here. Adjusted
865 for the change of mfont__get_metric.
866 (mface__for_chars): Adjusted for the change of mfont__get_metric.
868 * face.h (enum face_gc): Moved to m17n-X.c.
870 * font.h (struct MFontDriver): Arguments of find_metric changed.
871 (mfont__select): Prototype adjusted.
872 (mfont__get_metric): Likewise.
873 (mfont__ft_drive_otf): Likewise.
874 (mfont__flt_run): Likewise.
876 * font.c (mfont__select): New argument layouter. If layouter is
877 different in the registered font, make a new copy of realized
879 (mfont__get_metric): Argument changed. Get metrics of multiple
881 (mfont_find): Call mfont__select with layouter as Mnil.
883 * font-flt.c (FontLayoutContext): New member rfont.
884 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
885 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
887 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
889 (NUM_POINTS): New macro.
890 (MPointTable): New type.
891 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
892 (mfont__ft_drive_otf): New argument rfont.
894 * fontset.c (realize_font_group): Adjusted for the changed of
896 (check_fontset_element): This function deleted.
898 * input-gui.c (adjust_window_and_draw): Locate a preedit window
899 off the parent window if the preedit text is zero length.
901 * internal-gui.h (struct MFrame): New members foreground,
902 background, videomode, font.
903 (struct MGlyphString): New member anti_alias.
904 (MDrawPoint): New type.
905 (mwin__draw_bitmap): Prototype deleted.
906 (mwin__draw_points): Prototype added.
908 * m17n-gui.h (MDrawControl): New member anti_alias.
910 * m17n-gui.c (free_frame): Free frame->font.
911 (mframe): Set the fontset of frame->face to the default fontset.
913 * m17n-X.c (RGB_GC): New type.
914 (enum gc_index): Renamed from enum face_gc. Member names changed.
916 (struct MWDevice): Members foreground and background deleted. New
917 member scratch_gc, gc_list.
918 (DEFAULT_FONT, FALLBACK_FONT): New macros.
919 (free_device): Free GCs in device->gc_list.
920 (get_rgb_gc): New function.
921 (get_gc): Renamed and argument changed from get_color.
922 (get_gc_for_anti_alias): New function.
923 (xfont_find_metric): Arguments changed. Get metrics of multiple
925 (set_region): Argument changed. Caller changed.
926 (xfont_render): Allways set a font in gc.
927 (x_error_handler, x_io_error_handler): Define only if
928 X_SET_ERROR_HANDLER is defined.
929 (mwin__open_device): Create device->scratch_gc. Set members
930 foreground, background, and videomode of frame. Call
931 XSetErrorHandler and XSetIOErrorHandler only if
932 X_SET_ERROR_HANDLER is defined.
933 (struct gc_list): Deleted.
934 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
935 (mwin__realize_face): Adjusted for the change of the format of
936 rface->info and the charge of set_region.
937 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
938 (mwin__draw_box): Likewise.
939 (mwin__draw_bitmap): This function deleted.
940 (mwin__draw_points): New function.
941 (mwin__verify_region): Adjusted for the change of the format of
942 rface->info and the charge of set_region.
943 (mwin__create_window): Inherit backgound pixel from parent.
944 (mwin__dump_gc): Adjusted for the change of the format of
947 2004-03-16 Kenichi Handa <handa@m17n.org>
949 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
951 * input.c (M_key_alias): New variable.
952 (handle_key): Try M_key_alias property of a key too.
953 (minput__init): Initialize M_key_alias. Give that property to
954 symbols in one_char_symbol. Fix bug of initializing
957 * draw.c (compose_glyph_string): Don't handle
958 ignore_formatting_char here. Include formatting characters in the
959 range processed by a FTL.
960 (layout_glyph_string): Handle ignore_formatting_char here.
962 2004-03-12 Kenichi Handa <handa@m17n.org>
964 * input-gui.c (win_create_ic): Enable bidi in status control.
966 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
968 2004-03-09 Kenichi Handa <handa@m17n.org>
970 * input.c (load_input_method): If title is not specified, use the
971 input method name as title.
973 * m17n-X.c (get_color): Make it static.
974 (xim_create_ic, xim_destroy_ic, x_error_handler)
975 (x_io_error_handler): Likewise.
977 2004-03-01 Kenichi Handa <handa@m17n.org>
979 * Version 1.0 released.
982 Copyright (C) 2003, 2004
983 National Institute of Advanced Industrial Science and Technology (AIST)
984 Registration Number H15PRO112
986 This file is part of the m17n library.
988 The m17n library is free software; you can redistribute it and/or
989 modify it under the terms of the GNU Lesser General Public License
990 as published by the Free Software Foundation; either version 2.1 of
991 the License, or (at your option) any later version.
993 The m17n library is distributed in the hope that it will be useful,
994 but WITHOUT ANY WARRANTY; without even the implied warranty of
995 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
996 Lesser General Public License for more details.
998 You should have received a copy of the GNU Lesser General Public
999 License along with the m17n library; if not, write to the Free
1000 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA