1 2004-07-22 Kenichi Handa <handa@m17n.org>
3 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
5 2004-07-20 Kenichi Handa <handa@m17n.org>
7 * draw.c (render_glyphs): Fix checking of g->code validity.
9 * face.c (mface__realize): Set g.type.
11 2004-07-18 Kenichi Handa <handa@m17n.org>
13 * Makefile.am: Prepend ${top_srcdir} to all *.la in
16 * m17n-gui.c (mframe): Print error message give by dlopen to
19 2004-07-16 Kenichi Handa <handa@m17n.org>
21 * draw.c (compose_glyph_string): Improve the way of deciding a
22 script. For a character that doesn't have script property, use
23 the last non-latin script.
25 * font-ft.c (fc_list): Cancel previous change.
26 (mfont__ft_init): Add more entries in ft_to_prop_name.
28 2004-07-15 Kenichi Handa <handa@m17n.org>
30 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
31 previous or next character glyphs.
33 2004-07-14 Kenichi Handa <handa@m17n.org>
35 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
38 * fontset.c (mfont__lookup_fontset): If glyph type is
39 GLYPH_SPACE, get codes for SPACE.
41 * internal-gui.h (Mfont): Delete extern.
43 * m17n-gui.h (Mfont): Delete duplicated extern.
45 2004-07-13 Kenichi Handa <handa@m17n.org>
47 * font-ft.c (DEVICE_DELTA): New macro.
48 (adjust_anchor): New function.
49 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
51 (mfont__ft_drive_gpos): New function.
53 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
54 (FontLayoutContext): Delete member `rfont'.
55 (run_otf): Set g->otf_cmd. Call
56 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
57 only whne HAVE_OTF is defined.
59 * fontset.c: Include "config.h".
61 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
62 (MGlyph): New member otf_cmd.
64 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
65 (mfont__ft_drive_gpos): Extern it.
67 * face.c: Include "config.h".
69 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
71 * input-gui.c: Include "config.h".
73 * plist.c: Include "config.h".
75 2004-07-06 Kenichi Handa <handa@m17n.org>
77 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
78 internal-gui.h: Cancel previous changes.
80 * m17n-gd.h: Delete it.
82 * Makefile.am (libm17n_core_la_LIBADD): New variable.
83 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
84 @XML2_LD_FLAGS@ to above.
85 (libm17n_la_LIBADD): Add -ldl.
86 (libm17n_la_LDFLAGS): Add -export-dynamic.
87 (X_LD_FLAGS): Fix the order of linking.
88 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
89 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
90 (libm17n_X_la_LDFLAGS): Add -module.
91 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
92 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
93 (libm17n_gd_la_LDFLAGS): Add -module.
94 (include_HEADERS): Delete m17n-gd.h.
96 2004-06-30 Kenichi Handa <handa@m17n.org>
98 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
99 (MDeviceLibraryInterface): Delete it.
100 (register_device_library): Delete it.
101 (m17n__device_library_list): Renamed from device_library_list.
103 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
104 (m17n_init_win): Adjust prototype.
106 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
107 (m17n_init_gd): New function.
109 * m17n-gd.h: New file.
111 * m17n-X.h: Include <m17n-gui.h>.
112 (m17n_init_X): Extern it.
113 (M17N_INIT): Redefine it.
115 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
116 (m17n_init_X): New function.
118 * internal-gui.h (m17n__device_library_list): Extern it.
119 (struct MDeviceDriver): New members initialized, init, and fini.
121 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
123 (libm17n_X_la_LIBADD): Delete aboves.
124 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
125 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
126 (libm17n_gd_la_LDFLAGS): Delete it.
127 (include_HEADERS): Add m17n-gd.h.
129 2004-06-25 Kenichi Handa <handa@m17n.org>
131 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
132 (libm17n_gd_la_LDFLAGS): Cancel previous change.
134 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
136 * font-ft.c (fc_list): If FcFontList finds no font, try
139 * draw.c (compose_glyph_string): Terminate the last loop after
140 doing default combining if necessary.
142 2004-06-24 Kenichi Handa <handa@m17n.org>
144 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
146 * character.c (mchar_define_property): Add const to an arg.
148 * charset.c (mchar_define_charset): Add const to an arg.
150 * coding.c (MCodingSystem): Add const to an arg or decoder.
151 (finish_decoding): Add const to an arg.
152 (decode_coding_charset, decode_coding_utf_8)
153 (decode_coding_utf_16, decode_coding_utf_32)
154 (decode_coding_iso_2022, decode_coding_sjis)
155 (mconv_define_coding): Likewise.
157 * m17n-X.c (xft_find_metric): Delete unused variable.
159 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
162 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
165 * mtext.c (count_utf_8_chars, count_utf_16_chars)
166 (mtext__from_data, mtext_from_data): Add `const' to an arg.
168 * mtext.h (mtext__from_data): Ajust prototype.
170 2004-06-23 Kenichi Handa <handa@m17n.org>
172 * draw.c (compose_glyph_string): Always get glyph codes by
174 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
175 (mdraw_glyph_list): New function.
177 * font-flt.c (mfont__flt_run): Be sure to call
178 rfont->driver->encode_char.
180 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
181 (ft_encode_char): Delete arg C.
182 (ft_render): Don't call FT_Get_Char_Index.
184 * font.c (mfont__encodable_p): Delete it.
185 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
187 * font.h (struct MFontDriver): Delete arg C of encode_char.
188 (mfont__encodable_p): Delete extern.
190 * m17n-X.c (xfont_encode_char): Delete arg C.
191 (xft_find_metric): Don't cal FT_Get_Char_Index.
192 (xft_render): Likewise.
194 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
196 (mdraw_glyph_list): Extern it.
198 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
200 2004-06-22 Kenichi Handa <handa@m17n.org>
202 * m17n-gui.h (mfontset_lookup): Extern it.
204 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
206 * fontset.c (realize_fontset_elements)
207 (free_realized_fontset_elements, update_fontset_elements): New
209 (mfont__realize_fontset): Call realize_fontset_elements.
210 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
211 (mfont__lookup_fontset): If a fontset was modified, update
212 the realized fontset.
213 (mfontset_modify_entry): Increment fontset->tick.
214 (mfontset_lookup): New function.
216 2004-06-21 Kenichi Handa <handa@m17n.org>
218 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
220 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
221 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
222 length of source text 0.
224 2004-06-21 Kenichi Handa <handa@m17n.org>
226 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
227 (compare): Pay attention to format other than utf-8.
228 (copy): Delete this function.
229 (count_by_utf_8, count_by_utf_16, insert): New functions.
230 (count_utf_16_chars): Fix handling of a surrogate pair.
231 (find_char_forward, find_char_backward): Likewise.
232 (mtext__from_data): Delete unnecessary check. Fix number of
234 (mtext_from_data): Don't count items.
235 (mtext_ref_char): Optimize the code.
236 (mtext_set_char): Pay attention to format other than utf-8.
237 (mtext_cat_char): Likewise.
238 (mtext_dup): Don't call copy, instead do allocation here.
239 (mtext_cat): Call insert instead of copy.
240 (mtext_ncat): Likewise.
241 (mtext_cpy): Delete character at first and call insert instead of
243 (mtext_ncpy): Likewise.
244 (mtext_copy): Likewise.
245 (mtext_duplicate): Call insert instead of copy.
246 (mtext_del): Pay attention to format other than utf-8.
247 (mtext_ins): Simply call insert.
248 (mtext_ins_char): Pay attention to format other than utf-8.
249 (mtext_tok): Call insert instead of copy.
250 (mtext_text): Call UNIT_BYTES.
252 * textprop.c (mtext__adjust_plist_for_change): New function.
254 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
255 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
256 (CHAR_UNITS_AT): Fix typo.
257 (CHAR_UNITS_BY_HEAD): Fix typo.
258 (STRING_CHAR_AND_UNITS): Fix typo.
260 * internal.h (MTEXT_READ_ONLY_P): New macro.
262 * mtext.h (mtext__replace): Delete the extern.
263 (mtext__adjust_foramt): Adjust prototype.
265 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
266 if possible. Otherwise make a copy of mmt.
268 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
271 2004-06-18 Kenichi Handa <handa@m17n.org>
273 * character.h (CHAR_STRING_UTF16): Fix syntax.
275 2004-06-16 Kenichi Handa <handa@m17n.org>
277 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
278 (libm17n_X_la_LIBADD): Delete it.
279 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
281 * m17n-X.c (device_open): Add parens in `if' condition.
283 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
284 (DEC_POSITION): Likewise.
285 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
287 2004-06-15 Kenichi Handa <handa@m17n.org>
289 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
292 * draw.c (compose_glyph_string): If langauge is specified, call
293 mface__for_chars even if a text is all latin. Fix condition for
294 setting non_ascii_found.
296 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
298 * m17n.h (minput_char_to_key): Delete extern.
300 * m17n-gui.h (minput_event_to_key): Cancel previous change.
302 * m17n-gui.c (null_device_open): Set several members of frame.
304 2004-06-14 Kenichi Handa <handa@m17n.org>
306 * m17n-gui.h (minput_event_to_key): Delete extern.
308 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
310 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
312 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
314 2004-06-08 Kenichi Handa <handa@m17n.org>
316 * character.c (mchar_put_prop): Don't increment the ref-count of
319 2004-06-04 Kenichi Handa <handa@m17n.org>
321 * m17n-core.c (mdebug__register_object): New function.
322 (mdebug__unregister_object): Likewise.
324 * internal.h (mdebug__register_object, mdebug__unregister_object):
326 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
329 * charset.c (mcharset__load_from_database): Don't call
330 mconv__register_charset_coding here.
332 * coding.c (find_coding): Get a real name from an element of
333 coding_definition_list.
334 (mconv__register_charset_coding): Set the real name at the top of
336 (mcoding__load_from_database): Likewise.
337 (mconv_list_codings): Adjusted for the above change.
339 2004-06-03 Kenichi Handa <handa@m17n.org>
341 * coding.c (find_coding): Find by canonicalized name. Don't have
342 to modify the element of coding_definition_list by
344 (mconv__define_coding_from_charset): Delete it.
345 (mconv__register_charset_coding): Canonicalize sym.
346 (mcoding__load_from_database): Register plist modified by
349 * coding.h (mconv__define_coding_from_charset): Don't extern it.
351 * font-ft.c (ft_open): Fix setting of rfont->descent.
353 2004-06-02 Kenichi Handa <handa@m17n.org>
355 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
356 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
357 (xlfd_unparse_name): Renamed from xfont_build_name.
358 (mfont__init): Initialized Mfontconfig.
359 (mfont__free_realized): Unconditionally unref rfont->info.
360 (mfont__select): Free `this' if it's not best.
361 (mfont__open): Don't check frame->realized_font_list.
362 (mfont__parse_name_into_font): New function.
363 (Mfontconfig): New variable.
364 (mfont_from_name): Call mfont_parse_name.
365 (mfont_name): Call mfont_unparse_name.
366 (mdebug_dump_font): Likewise.
368 * font.h (struct MFontDriver): Delete members parse_name and
370 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
371 (mfont__parse_name_into_font): Extern it.
373 * font-ft.c: Include "symbol.h".
374 (close_ft): Unconditionally free filename and charmap_list of
376 (ft_open): Duplicate base->filename. Increment ref-count of
377 ft_info->charmap_list. Free ft_info->charmap_list and
378 ft_info->filename on error.
379 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
381 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
383 (enum xlfd_field_idx): Moved to font.c.
384 (split_font_name, build_font_name): Likewise.
385 (build_font_list): Call mfont__parse_name_info_font.
386 (xfont_open): Call mfont__unparse_name. Free name.
387 (xfont_parse_name, xfont_build_name): Moved to font.c
388 (xft_select): Prototype deleted.
389 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
390 Call mfont_pase_name.
392 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
393 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
396 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
399 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
401 2004-06-01 Kenichi Handa <handa@m17n.org>
403 * fontset.c (mfontset_modify_entry): Pay attention to the case
404 that fontset->font_spec_list is NULL.
406 2004-05-31 Kenichi Handa <handa@m17n.org>
408 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
410 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
412 * font.c (mfont__select): Print score the a font for debugging.
414 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
416 * coding.c (reset_coding_sjis): Check kanji and kana instead of
417 kanji_sym and kana_sym.
419 2004-05-28 Kenichi Handa <handa@m17n.org>
421 * Makefile.am (VINFO): New variable.
422 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
423 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
425 2004-05-27 Kenichi Handa <handa@m17n.org>
427 The following chanages are to make device dependent functions
428 accessible only from MDeviceDriver structure, and to add GD and
429 null device drivers. Font drivers get also device dependent.
431 * m17n.c (m17n_init): Increament shell_initialized.
432 (m17n_fini): Decremented shell_initialized.
434 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
436 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
437 (Mwidget, Mcolormap, Mx): Extern them.
439 * m17n-gui.c: Include <dlfcn.h> and "config.h".
440 (free_frame): Call frame->driver->close instead of
442 (DLOPEN_SHLIB_EXT): New macro.
443 (MDeviceLibraryInterface): New type.
444 (device_library_list): New variable.
445 (register_device_library): New function.
446 (null_device): New variable.
447 (null_device_close, null_device_get_prop)
448 (null_device_realize_face, null_device_free_realized_face): New
450 (null_driver): New variable.
451 (null_device_init, null_device_fini, null_device_open): New
453 (null_interface): New variable.
454 (Mfreetype, Mdevice): Declare them.
455 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
456 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
457 Mwin__Close_Device. Register drivers for Mx and Mgd.
458 (m17n_fini_win): Decremented win_initialized. Call "fini"
459 function of all opened devices. Don't call mwin__fini.
460 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
462 (mframe): Handle Mdevice key of PLIST.
463 (mframe_get_prop): Call frame->device->get_prop instead of
464 mwin__device_get_prop.
466 * m17n-gd.c: New file.
468 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
469 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
471 * m17n-core.c (m17n_init_core): Increate core_initialized.
472 (m17n_fini_core): Decremented core_initialized.
474 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
475 (Mcolormap): Don't extern them here.
477 * m17n-X.c (FRAME_DEVICE): New macro.
478 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
479 (free_display_info): Use MPLIST_DO.
480 (free_device): Free rface->info.
481 (xft_close): Delete it.
482 (device_init): Renamed from mwin__init.
483 (device_fini): Renamed from mwin__fini.
484 (device_open): Renamed from mwin__open_device.
485 (x_driver): New variable.
486 (MXFontInfo): Delete member frame, add member display.
487 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
488 Don't declare them here.
490 * internal-gui.h (MDeviceType): New enum.
491 (MWDefice): Delete it.
492 (struct MFrame): Change type of device to void *. New members
493 device_type, driver, font_driver_list.
494 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
495 (MDeviceDriver): New type.
496 (Mx, Mgd, Mfreetype): Extern them.
497 (mwin__XXX): Delete all of them.
499 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
501 (win_destroy_ic): Likewise.
502 (adjust_window_and_draw): Likewise.
503 (win_callback): Likewise.
504 (Mxim): Declare it here.
505 (minput_event_to_key): Call M_CHECK_READABLE.
507 * fontset.c (mfont__lookup_fontset): Delete local variable
510 * font.h (struct MFontDriver): Delete member close, add members
511 parse_name and build_name.
512 (mfont__driver_list): Delete extern.
513 (mfont__close): Delete extern.
515 * font.c (mfont__init): Don't set mfont__driver_list.
516 (mfont__fini): Don't unref mfont__driver_list.
517 (mfont__select): Try font drivers in frame->font_driver_list. Set
518 driver member of a realized font.
519 (mfont__close): Delete it.
520 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
521 functions of the default frame.
523 * font-ft.c (close_ft): Check ft_info->ft_face and work
525 (add_font_info): Allocate ft_info by M17N_OBJECT.
526 (ft_close): Delete it.
527 (mfont__ft_driver): Don't set ft_close.
528 (ft_select): Increment ref-count of best_font.
529 (ft_open): Decremented ref-count of base. On error, call
530 FT_Done_Face and free ft_info.
531 (ft_find_metric): Always use XXX_MONO in load_flags.
532 (ft_render): Fix setting of width. Call
533 frame->driver->draw_points instead of mwin__draw_points.
534 (ft_to_prop): Don't set mfont__driver_list.
535 (mfont__ft_fini): Just unref ft_info.
537 * face.c (mface__init): Exchange foreground and background of
538 mface__default. Call mface_put_prop to set hline of
540 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
541 (mface__free_realized): Don't call mwin__free_realized_face.
543 * draw.c (Mdepth): Don't declare it here.
544 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
545 (render_glyphs, render_glyph_string): Likewise.
546 (mdraw__init): Don't set Mdepth.
547 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
549 (mdraw_text_per_char_extents): Return 0 on success and -1 on
551 (mdraw_text_items): Check FRAME is writable.
552 (mdraw_per_char_extents): Implement body.
554 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
556 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
557 (GUI_SOURCES): Delete it.
558 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
559 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
560 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
561 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
562 (linkgui_LDADD): Set to libm17n-gui.la
563 (linkgui_LDFLAGS): New target.
564 (SRC): Include ${libm17n_gui_la_SOURCES} and
565 ${libm17n_gd_la_SOURCES}.
567 2004-05-24 Kenichi Handa <handa@m17n.org>
569 * draw.c (draw_background): Don't draw background even if
570 rface->face.property[MFACE_BACKGROUND] is not Mnil.
572 2004-05-22 Kenichi Handa <handa@m17n.org>
574 * m17n-X.c (xft_open_font): Fix anti_alias setting.
576 2004-05-20 Kenichi Handa <handa@m17n.org>
578 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
580 * m17n-gui.c: Include "plist.h".
581 (mframe): If PLIST is NULL, initialize it to emply plist.
583 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
584 (xft_driver): New variable.
585 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
586 (xft_find_metric, xft_render): New function.
587 (mwin__init): Adjusted for the new mfont__driver_list.
588 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
589 generated face to PARAM.
590 (mwin__realize_face): Fix setting of box colors. Don't call hook
592 (mwin__draw_hline): New function.
593 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
594 (mwin__xft_render): Delete these function.
596 * internal-gui.h (struct MFrame): New member tick.
597 (struct MGlyphString): New member tick.
598 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
599 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
600 (mwin__xft_render): Delete extern.
602 * fontset.c (mfont__lookup_fontset): Make the code simpler.
603 (mfontset): Always increment the reference count of returned
606 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
607 (MFTInfo): Moved to font.h.
608 (ft_iso8859_1_font_list): Delete this variable.
609 (set_font_info): Don't set font->property[MFONT_TYPE].
610 (set_font_info): Don't udpate ft_iso8859_1_font_list.
611 (add_font_info): Change type to void.
612 (fc_list): Change anme from xft_list. Caller changed. Include
613 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
614 (mfont__ft_driver): Change name from ft_driver. Caller changed.
615 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
616 (close_ft): Don't call mwin__xft_close. Unref
618 (ft_open): Don't setup ft_info->fontname. Don't call
620 (ft_find_metric): Don't call mwin__xft_get_metric.
621 (ft_encode_char): Call rfont->driver->open instead of ft_open.
622 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
623 (mfont__ft_init): Adjusted for new mfont__driver_list.
624 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
626 * font.c (mfont__driver_list): Make it MPlist.
627 (mfont__init): Adjust initialization of mfont__driver_list.
628 (mfont__fini): Free mfont__driver_list.
629 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
630 (mfont__select): Adjusted for the new mfont__driver_list.
632 * font.h (enum MFontProperty): Delete MFONT_TYPE.
633 (mfont__drirver_list): Adjust prototype.
634 (MFTInfo): Move to here from fron.c. Deleve member fontname.
636 * face.h (struct MFace): Delete member realized_face_list, add
638 (struct MRealizedFace): Delete member need_update
639 andnofont_rface, add member non_ascii_list.
640 (mface__update_frame_face): Extern it.
642 * face.c (hline_prop_list, box_prop_list, noop_hook): New
644 (get_hline_create, get_box_create): New functions.
645 (find_realized_face): Cancel previous change. Arg RFONT deleted.
647 (free_face): Cancep previous change. Free face->frame_list.
648 (serialize_hline): Do nothing if hline->width is zero.
649 (serialize_box): Do nothing if box->width is zero.
650 (mface__init): Setup all properties of mface__default.
651 (mface__fini): Free hline_prop_list and box_prop_list.
652 (mface__realize): Cancel previous change. Update
653 face->frame_list. Setup rface->non_ascii_list.
654 (mface__for_chars): Update rface->non_ascii_list.
655 (mface__free_realized): Free rface->non_ascii_list.
656 (mface__update_frame_face): New function.
657 (mface): Initialize face->frame_list.
658 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
660 (mface_merge): Likewise.
661 (mface_put_prop): If key is Mhline or Mbox, get value by
662 get_hline_create or get_box_create respectively.
663 (mface_put_prop): Update frame->tick and call
664 mface__update_frame_face if necessary.
665 (mface_update): Do nothing if func is noop_hook.
667 * draw.c (render_glyphs): If a font is not found, use
668 mwin__draw_empty_boxes.
669 (alloc_gstring): Initialize gstring->tick.
670 (get_gstring): Check gstring->tick.
672 2004-05-17 Kenichi Handa <handa@m17n.org>
674 * face.c (find_realized_face): Return value changed. If RFONT is
675 NULL, avoid unnecessary checking.
676 (free_face): Free face->realized_face_list.
677 (mface__realize): Adjusted for the change of find_realized_face.
678 If it returns a realized face that needs update, free it and
679 realize a new one. Push a new realized face to
680 frame->realized_face_list instead of appending.
681 (mface__for_chars): Adjusted for the change of find_realized_face.
682 Short cut if the required font is in rface->ascii_rface.
683 (mface_put_prop): Free old value if necessary. Set need_update
684 member of realized faces to 1.
686 * face.h (struct MFace): Delete member tick, add member
688 (struct MRealizedFace): Delete member tick, add member
691 2004-05-13 Kenichi Handa <handa@m17n.org>
693 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
695 2004-05-12 Kenichi Handa <handa@m17n.org>
697 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
699 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
700 parse it XftNameParse.
702 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
703 (all_fonts_scaned): New variable.
704 (set_font_info): FAMILY may be Mnil.
705 (add_font_info): Argument changed.
706 (xft_list): Call add_font_info in it.
708 (ft_select): Make it work in the case family is Mnil.
709 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
710 (mfont__ft_fini): Set all_fonts_scaned to 0.
712 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
713 that is failed to open.
715 2004-05-10 Kenichi Handa <handa@m17n.org>
717 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
718 device's depth is 1 (i.e. monochrome).
720 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
721 to work around the problem of libtool.
723 * font-ft.c: Include <freetype/ftbdf.h>.
724 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
726 (mfont__ft_init): Initialize them.
727 (ft_iso8859_1_font_list): New variable.
728 (set_font_info): Detect a font containing iso8859-1 glyphs and
729 register it in ft_iso8859_1_font_list. If the font is not
730 scalable, assume it as BDF or PCF font and setup SIZE and RESY
731 properties of the font from its properties.
732 (add_font_list): If the font is not scalable, check if it is BDF
733 or PCF font. If not, ignore it.
734 (ft_select): If FAMILY is Mnil, return NULL only if the requested
735 registry is not iso8859-1.
736 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
737 ft_iso8859_1_font_list.
738 (ft_find_metric): If the font is not scalable, assume it as BDF
739 or PCF, and get a metric from its properties.
740 (mfont__ft_fini): Free ft_iso8859_1_font_list.
742 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
744 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
745 (libm17n_la_LDFLAGS): Delete it.
746 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
747 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
749 2004-05-06 Kenichi Handa <handa@m17n.org>
751 * draw.c (compose_glyph_string): Fix previous change.
753 2004-04-30 Kenichi Handa <handa@m17n.org>
755 * font-ft.c (ft_list): Delete unused variable `result'.
756 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
758 2004-04-27 Kenichi Handa <handa@m17n.org>
760 * m17n-X.c: Include config.h
761 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
762 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
763 (MWDevice) [HAVE_XFT2]: New member xft_draw.
764 (FRAME_CMAP, FRAME_VISUAL): New macros.
765 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
766 (xfont_driver): Make it static.
767 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
768 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
769 info->xft_color_back.
770 (MXftFontInfo) [HAVE_XFT2]: New type.
771 (mwin__xft_close) [HAVE_XFT2]: New function.
772 (mwin__xft_open) [HAVE_XFT2]: New function.
773 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
774 (mwin__xft_render) [HAVE_XFT2]: New function.
776 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
777 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
778 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
781 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
783 * font-ft.c: Don't include FT_FREETYPE_H here.
784 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
785 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
786 (MFTInfo): New member charmap_index.
787 (MFTInfo) [HAVE_XFT2]: New member xft_info.
788 (check_otf_filename): Renamed from check_filename. Return value
790 (ft_set_property): This function deleted.
791 (set_font_info): New function.
792 (add_font_list): Argument changed. Add multiple fonts.
793 (xft_list) [HAVE_XFT2]: New function.
794 (ft_list) [not HAVE_XFT2]: New function.
795 (ft_select): Add code for Xft.
796 (close_ft): Likewise.
798 (ft_find_metric): Likewise.
799 (ft_encode_char): Likewise.
800 (ft_render): Likewise.
802 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
804 2004-04-26 Kenichi Handa <handa@m17n.org>
806 * textprop.c (mtext_attach_property): Declare the return type as
809 2004-04-21 Kenichi Handa <handa@m17n.org>
811 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
813 2004-04-09 Kenichi Handa <handa@m17n.org>
815 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
817 (load_command): Setup above members.
819 2004-04-05 Kenichi Handa <handa@m17n.org>
821 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
823 2004-03-30 Kenichi Handa <handa@m17n.org>
825 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
828 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
829 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
831 2004-03-29 Kenichi Handa <handa@m17n.org>
833 * Version 1.0 Patch Level 2 released.
835 2004-03-29 Kenichi Handa <handa@m17n.org>
837 * charset.c (make_charset): Set charset->fully_loaded and
838 charset->simple correctly. Don't try to get charset->min_char and
839 charset->max_char for a charset of method subset and superset.
840 Don't load a mapping file here.
841 (mcharset__init): Set unified_max.
842 (mcharset__load_from_database): Free a working plist.
844 * coding.c (mcoding__fini): Free all malloced data.
846 * input-gui.c (win_create_ic): Set control.as_image for preediting
849 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
850 `count') to initialize the array.
852 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
855 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
857 (mwin__create_window): Fix bug of setting a background pixel of a
859 (mwin__adjust_window): Clear the window before drawing.
861 * m17n-core.c (mdebug__report_object): Free array->objectes if
863 (m17n_init_core): Don't set report_header_printed to 0 here.
864 Fix debugging information.
865 (m17n_fini_core): Set report_header_printed to 0 here.
867 * m17n-core.h (mplist_deserialize): Extern it.
869 * m17n-gui.c (m17n_fini_win): Fix debugging information.
871 * m17n.c (m17n_fini): Fix debugging information.
873 * mtext.c (mtext__adjust_foramt): New function.
875 * mtext.h (mtext__adjust_foramt): Extern it.
877 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
879 * plist.h (mplist__deserialize): Don't extern it.
881 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
882 elements of symbol_table to NULL. Report about created and freed
883 symbols if MDEBUG_FINI is set.
885 2004-03-22 Kenichi Handa <handa@m17n.org>
887 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
889 * m17n.c (m17n_init): Fix the way of checking merror_code.
891 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
893 2004-03-22 Kenichi Handa <handa@m17n.org>
895 * fontset.c (realize_font_group): Adjust the font size by
896 mfont__resize before selecting a font.
898 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
900 2004-03-19 Kenichi Handa <handa@m17n.org>
902 * Version 1.0 Patch Level 1 released.
904 2004-03-19 Kenichi Handa <handa@m17n.org>
906 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
908 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
910 2004-03-19 Kenichi Handa <handa@m17n.org>
912 Re-apply the changes forgotten in the released version.
914 * charset.c (mcharset__load_from_database): Call
915 mchar_define_charset.
917 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
918 (mconv_encode_range): Put Mcoding text property.
920 2004-03-18 Kenichi Handa <handa@m17n.org>
922 * draw.c (Mdepth): New variable.
923 (visual_order): Delete unused local var `pos'.
924 (compose_glyph_string): Fix for the case that gstring->glyphs is
925 realloced. Stop generating glyphs at TO. Fix handling of
927 (layout_glyphs): Get metrics of all glyphs in advance. Set
928 lbearing and rbearing of base of composition glyph correctly.
929 Handle left-overhang glyphs correctly.
930 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
932 (dump_combining_code): Change the defualt off_x character to ".".
933 (mdraw__init): Initialize Mdepth.
935 * face.c (work_gstring): New variable
936 (mface__init): Initialize work_gstring.
937 (mface__fini): Free work_gstring.glyphs.
938 (mface__realize): Don't handle videomode property here. Adjusted
939 for the change of mfont__get_metric.
940 (mface__for_chars): Adjusted for the change of mfont__get_metric.
942 * face.h (enum face_gc): Moved to m17n-X.c.
944 * font.h (struct MFontDriver): Arguments of find_metric changed.
945 (mfont__select): Prototype adjusted.
946 (mfont__get_metric): Likewise.
947 (mfont__ft_drive_otf): Likewise.
948 (mfont__flt_run): Likewise.
950 * font.c (mfont__select): New argument layouter. If layouter is
951 different in the registered font, make a new copy of realized
953 (mfont__get_metric): Argument changed. Get metrics of multiple
955 (mfont_find): Call mfont__select with layouter as Mnil.
957 * font-flt.c (FontLayoutContext): New member rfont.
958 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
959 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
961 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
963 (NUM_POINTS): New macro.
964 (MPointTable): New type.
965 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
966 (mfont__ft_drive_otf): New argument rfont.
968 * fontset.c (realize_font_group): Adjusted for the changed of
970 (check_fontset_element): This function deleted.
972 * input-gui.c (adjust_window_and_draw): Locate a preedit window
973 off the parent window if the preedit text is zero length.
975 * internal-gui.h (struct MFrame): New members foreground,
976 background, videomode, font.
977 (struct MGlyphString): New member anti_alias.
978 (MDrawPoint): New type.
979 (mwin__draw_bitmap): Prototype deleted.
980 (mwin__draw_points): Prototype added.
982 * m17n-gui.h (MDrawControl): New member anti_alias.
984 * m17n-gui.c (free_frame): Free frame->font.
985 (mframe): Set the fontset of frame->face to the default fontset.
987 * m17n-X.c (RGB_GC): New type.
988 (enum gc_index): Renamed from enum face_gc. Member names changed.
990 (struct MWDevice): Members foreground and background deleted. New
991 member scratch_gc, gc_list.
992 (DEFAULT_FONT, FALLBACK_FONT): New macros.
993 (free_device): Free GCs in device->gc_list.
994 (get_rgb_gc): New function.
995 (get_gc): Renamed and argument changed from get_color.
996 (get_gc_for_anti_alias): New function.
997 (xfont_find_metric): Arguments changed. Get metrics of multiple
999 (set_region): Argument changed. Caller changed.
1000 (xfont_render): Allways set a font in gc.
1001 (x_error_handler, x_io_error_handler): Define only if
1002 X_SET_ERROR_HANDLER is defined.
1003 (mwin__open_device): Create device->scratch_gc. Set members
1004 foreground, background, and videomode of frame. Call
1005 XSetErrorHandler and XSetIOErrorHandler only if
1006 X_SET_ERROR_HANDLER is defined.
1007 (struct gc_list): Deleted.
1008 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1009 (mwin__realize_face): Adjusted for the change of the format of
1010 rface->info and the charge of set_region.
1011 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1012 (mwin__draw_box): Likewise.
1013 (mwin__draw_bitmap): This function deleted.
1014 (mwin__draw_points): New function.
1015 (mwin__verify_region): Adjusted for the change of the format of
1016 rface->info and the charge of set_region.
1017 (mwin__create_window): Inherit backgound pixel from parent.
1018 (mwin__dump_gc): Adjusted for the change of the format of
1021 2004-03-16 Kenichi Handa <handa@m17n.org>
1023 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1025 * input.c (M_key_alias): New variable.
1026 (handle_key): Try M_key_alias property of a key too.
1027 (minput__init): Initialize M_key_alias. Give that property to
1028 symbols in one_char_symbol. Fix bug of initializing
1031 * draw.c (compose_glyph_string): Don't handle
1032 ignore_formatting_char here. Include formatting characters in the
1033 range processed by a FTL.
1034 (layout_glyph_string): Handle ignore_formatting_char here.
1036 2004-03-12 Kenichi Handa <handa@m17n.org>
1038 * input-gui.c (win_create_ic): Enable bidi in status control.
1040 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1042 2004-03-09 Kenichi Handa <handa@m17n.org>
1044 * input.c (load_input_method): If title is not specified, use the
1045 input method name as title.
1047 * m17n-X.c (get_color): Make it static.
1048 (xim_create_ic, xim_destroy_ic, x_error_handler)
1049 (x_io_error_handler): Likewise.
1051 2004-03-01 Kenichi Handa <handa@m17n.org>
1053 * Version 1.0 released.
1056 Copyright (C) 2003, 2004
1057 National Institute of Advanced Industrial Science and Technology (AIST)
1058 Registration Number H15PRO112
1060 This file is part of the m17n library.
1062 The m17n library is free software; you can redistribute it and/or
1063 modify it under the terms of the GNU Lesser General Public License
1064 as published by the Free Software Foundation; either version 2.1 of
1065 the License, or (at your option) any later version.
1067 The m17n library is distributed in the hope that it will be useful,
1068 but WITHOUT ANY WARRANTY; without even the implied warranty of
1069 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1070 Lesser General Public License for more details.
1072 You should have received a copy of the GNU Lesser General Public
1073 License along with the m17n library; if not, write to the Free
1074 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA