1 2004-07-23 Kenichi Handa <handa@m17n.org>
3 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
6 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
8 2004-07-22 Kenichi Handa <handa@m17n.org>
10 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
12 2004-07-20 Kenichi Handa <handa@m17n.org>
14 * draw.c (render_glyphs): Fix checking of g->code validity.
16 * face.c (mface__realize): Set g.type.
18 2004-07-18 Kenichi Handa <handa@m17n.org>
20 * Makefile.am: Prepend ${top_srcdir} to all *.la in
23 * m17n-gui.c (mframe): Print error message give by dlopen to
26 2004-07-16 Kenichi Handa <handa@m17n.org>
28 * draw.c (compose_glyph_string): Improve the way of deciding a
29 script. For a character that doesn't have script property, use
30 the last non-latin script.
32 * font-ft.c (fc_list): Cancel previous change.
33 (mfont__ft_init): Add more entries in ft_to_prop_name.
35 2004-07-15 Kenichi Handa <handa@m17n.org>
37 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
38 previous or next character glyphs.
40 2004-07-14 Kenichi Handa <handa@m17n.org>
42 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
45 * fontset.c (mfont__lookup_fontset): If glyph type is
46 GLYPH_SPACE, get codes for SPACE.
48 * internal-gui.h (Mfont): Delete extern.
50 * m17n-gui.h (Mfont): Delete duplicated extern.
52 2004-07-13 Kenichi Handa <handa@m17n.org>
54 * font-ft.c (DEVICE_DELTA): New macro.
55 (adjust_anchor): New function.
56 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
58 (mfont__ft_drive_gpos): New function.
60 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
61 (FontLayoutContext): Delete member `rfont'.
62 (run_otf): Set g->otf_cmd. Call
63 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
64 only whne HAVE_OTF is defined.
66 * fontset.c: Include "config.h".
68 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
69 (MGlyph): New member otf_cmd.
71 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
72 (mfont__ft_drive_gpos): Extern it.
74 * face.c: Include "config.h".
76 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
78 * input-gui.c: Include "config.h".
80 * plist.c: Include "config.h".
82 2004-07-06 Kenichi Handa <handa@m17n.org>
84 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
85 internal-gui.h: Cancel previous changes.
87 * m17n-gd.h: Delete it.
89 * Makefile.am (libm17n_core_la_LIBADD): New variable.
90 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
91 @XML2_LD_FLAGS@ to above.
92 (libm17n_la_LIBADD): Add -ldl.
93 (libm17n_la_LDFLAGS): Add -export-dynamic.
94 (X_LD_FLAGS): Fix the order of linking.
95 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
96 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
97 (libm17n_X_la_LDFLAGS): Add -module.
98 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
99 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
100 (libm17n_gd_la_LDFLAGS): Add -module.
101 (include_HEADERS): Delete m17n-gd.h.
103 2004-06-30 Kenichi Handa <handa@m17n.org>
105 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
106 (MDeviceLibraryInterface): Delete it.
107 (register_device_library): Delete it.
108 (m17n__device_library_list): Renamed from device_library_list.
110 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
111 (m17n_init_win): Adjust prototype.
113 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
114 (m17n_init_gd): New function.
116 * m17n-gd.h: New file.
118 * m17n-X.h: Include <m17n-gui.h>.
119 (m17n_init_X): Extern it.
120 (M17N_INIT): Redefine it.
122 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
123 (m17n_init_X): New function.
125 * internal-gui.h (m17n__device_library_list): Extern it.
126 (struct MDeviceDriver): New members initialized, init, and fini.
128 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
130 (libm17n_X_la_LIBADD): Delete aboves.
131 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
132 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
133 (libm17n_gd_la_LDFLAGS): Delete it.
134 (include_HEADERS): Add m17n-gd.h.
136 2004-06-25 Kenichi Handa <handa@m17n.org>
138 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
139 (libm17n_gd_la_LDFLAGS): Cancel previous change.
141 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
143 * font-ft.c (fc_list): If FcFontList finds no font, try
146 * draw.c (compose_glyph_string): Terminate the last loop after
147 doing default combining if necessary.
149 2004-06-24 Kenichi Handa <handa@m17n.org>
151 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
153 * character.c (mchar_define_property): Add const to an arg.
155 * charset.c (mchar_define_charset): Add const to an arg.
157 * coding.c (MCodingSystem): Add const to an arg or decoder.
158 (finish_decoding): Add const to an arg.
159 (decode_coding_charset, decode_coding_utf_8)
160 (decode_coding_utf_16, decode_coding_utf_32)
161 (decode_coding_iso_2022, decode_coding_sjis)
162 (mconv_define_coding): Likewise.
164 * m17n-X.c (xft_find_metric): Delete unused variable.
166 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
169 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
172 * mtext.c (count_utf_8_chars, count_utf_16_chars)
173 (mtext__from_data, mtext_from_data): Add `const' to an arg.
175 * mtext.h (mtext__from_data): Ajust prototype.
177 2004-06-23 Kenichi Handa <handa@m17n.org>
179 * draw.c (compose_glyph_string): Always get glyph codes by
181 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
182 (mdraw_glyph_list): New function.
184 * font-flt.c (mfont__flt_run): Be sure to call
185 rfont->driver->encode_char.
187 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
188 (ft_encode_char): Delete arg C.
189 (ft_render): Don't call FT_Get_Char_Index.
191 * font.c (mfont__encodable_p): Delete it.
192 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
194 * font.h (struct MFontDriver): Delete arg C of encode_char.
195 (mfont__encodable_p): Delete extern.
197 * m17n-X.c (xfont_encode_char): Delete arg C.
198 (xft_find_metric): Don't cal FT_Get_Char_Index.
199 (xft_render): Likewise.
201 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
203 (mdraw_glyph_list): Extern it.
205 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
207 2004-06-22 Kenichi Handa <handa@m17n.org>
209 * m17n-gui.h (mfontset_lookup): Extern it.
211 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
213 * fontset.c (realize_fontset_elements)
214 (free_realized_fontset_elements, update_fontset_elements): New
216 (mfont__realize_fontset): Call realize_fontset_elements.
217 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
218 (mfont__lookup_fontset): If a fontset was modified, update
219 the realized fontset.
220 (mfontset_modify_entry): Increment fontset->tick.
221 (mfontset_lookup): New function.
223 2004-06-21 Kenichi Handa <handa@m17n.org>
225 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
227 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
228 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
229 length of source text 0.
231 2004-06-21 Kenichi Handa <handa@m17n.org>
233 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
234 (compare): Pay attention to format other than utf-8.
235 (copy): Delete this function.
236 (count_by_utf_8, count_by_utf_16, insert): New functions.
237 (count_utf_16_chars): Fix handling of a surrogate pair.
238 (find_char_forward, find_char_backward): Likewise.
239 (mtext__from_data): Delete unnecessary check. Fix number of
241 (mtext_from_data): Don't count items.
242 (mtext_ref_char): Optimize the code.
243 (mtext_set_char): Pay attention to format other than utf-8.
244 (mtext_cat_char): Likewise.
245 (mtext_dup): Don't call copy, instead do allocation here.
246 (mtext_cat): Call insert instead of copy.
247 (mtext_ncat): Likewise.
248 (mtext_cpy): Delete character at first and call insert instead of
250 (mtext_ncpy): Likewise.
251 (mtext_copy): Likewise.
252 (mtext_duplicate): Call insert instead of copy.
253 (mtext_del): Pay attention to format other than utf-8.
254 (mtext_ins): Simply call insert.
255 (mtext_ins_char): Pay attention to format other than utf-8.
256 (mtext_tok): Call insert instead of copy.
257 (mtext_text): Call UNIT_BYTES.
259 * textprop.c (mtext__adjust_plist_for_change): New function.
261 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
262 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
263 (CHAR_UNITS_AT): Fix typo.
264 (CHAR_UNITS_BY_HEAD): Fix typo.
265 (STRING_CHAR_AND_UNITS): Fix typo.
267 * internal.h (MTEXT_READ_ONLY_P): New macro.
269 * mtext.h (mtext__replace): Delete the extern.
270 (mtext__adjust_foramt): Adjust prototype.
272 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
273 if possible. Otherwise make a copy of mmt.
275 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
278 2004-06-18 Kenichi Handa <handa@m17n.org>
280 * character.h (CHAR_STRING_UTF16): Fix syntax.
282 2004-06-16 Kenichi Handa <handa@m17n.org>
284 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
285 (libm17n_X_la_LIBADD): Delete it.
286 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
288 * m17n-X.c (device_open): Add parens in `if' condition.
290 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
291 (DEC_POSITION): Likewise.
292 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
294 2004-06-15 Kenichi Handa <handa@m17n.org>
296 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
299 * draw.c (compose_glyph_string): If langauge is specified, call
300 mface__for_chars even if a text is all latin. Fix condition for
301 setting non_ascii_found.
303 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
305 * m17n.h (minput_char_to_key): Delete extern.
307 * m17n-gui.h (minput_event_to_key): Cancel previous change.
309 * m17n-gui.c (null_device_open): Set several members of frame.
311 2004-06-14 Kenichi Handa <handa@m17n.org>
313 * m17n-gui.h (minput_event_to_key): Delete extern.
315 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
317 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
319 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
321 2004-06-08 Kenichi Handa <handa@m17n.org>
323 * character.c (mchar_put_prop): Don't increment the ref-count of
326 2004-06-04 Kenichi Handa <handa@m17n.org>
328 * m17n-core.c (mdebug__register_object): New function.
329 (mdebug__unregister_object): Likewise.
331 * internal.h (mdebug__register_object, mdebug__unregister_object):
333 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
336 * charset.c (mcharset__load_from_database): Don't call
337 mconv__register_charset_coding here.
339 * coding.c (find_coding): Get a real name from an element of
340 coding_definition_list.
341 (mconv__register_charset_coding): Set the real name at the top of
343 (mcoding__load_from_database): Likewise.
344 (mconv_list_codings): Adjusted for the above change.
346 2004-06-03 Kenichi Handa <handa@m17n.org>
348 * coding.c (find_coding): Find by canonicalized name. Don't have
349 to modify the element of coding_definition_list by
351 (mconv__define_coding_from_charset): Delete it.
352 (mconv__register_charset_coding): Canonicalize sym.
353 (mcoding__load_from_database): Register plist modified by
356 * coding.h (mconv__define_coding_from_charset): Don't extern it.
358 * font-ft.c (ft_open): Fix setting of rfont->descent.
360 2004-06-02 Kenichi Handa <handa@m17n.org>
362 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
363 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
364 (xlfd_unparse_name): Renamed from xfont_build_name.
365 (mfont__init): Initialized Mfontconfig.
366 (mfont__free_realized): Unconditionally unref rfont->info.
367 (mfont__select): Free `this' if it's not best.
368 (mfont__open): Don't check frame->realized_font_list.
369 (mfont__parse_name_into_font): New function.
370 (Mfontconfig): New variable.
371 (mfont_from_name): Call mfont_parse_name.
372 (mfont_name): Call mfont_unparse_name.
373 (mdebug_dump_font): Likewise.
375 * font.h (struct MFontDriver): Delete members parse_name and
377 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
378 (mfont__parse_name_into_font): Extern it.
380 * font-ft.c: Include "symbol.h".
381 (close_ft): Unconditionally free filename and charmap_list of
383 (ft_open): Duplicate base->filename. Increment ref-count of
384 ft_info->charmap_list. Free ft_info->charmap_list and
385 ft_info->filename on error.
386 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
388 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
390 (enum xlfd_field_idx): Moved to font.c.
391 (split_font_name, build_font_name): Likewise.
392 (build_font_list): Call mfont__parse_name_info_font.
393 (xfont_open): Call mfont__unparse_name. Free name.
394 (xfont_parse_name, xfont_build_name): Moved to font.c
395 (xft_select): Prototype deleted.
396 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
397 Call mfont_pase_name.
399 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
400 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
403 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
406 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
408 2004-06-01 Kenichi Handa <handa@m17n.org>
410 * fontset.c (mfontset_modify_entry): Pay attention to the case
411 that fontset->font_spec_list is NULL.
413 2004-05-31 Kenichi Handa <handa@m17n.org>
415 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
417 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
419 * font.c (mfont__select): Print score the a font for debugging.
421 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
423 * coding.c (reset_coding_sjis): Check kanji and kana instead of
424 kanji_sym and kana_sym.
426 2004-05-28 Kenichi Handa <handa@m17n.org>
428 * Makefile.am (VINFO): New variable.
429 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
430 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
432 2004-05-27 Kenichi Handa <handa@m17n.org>
434 The following chanages are to make device dependent functions
435 accessible only from MDeviceDriver structure, and to add GD and
436 null device drivers. Font drivers get also device dependent.
438 * m17n.c (m17n_init): Increament shell_initialized.
439 (m17n_fini): Decremented shell_initialized.
441 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
443 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
444 (Mwidget, Mcolormap, Mx): Extern them.
446 * m17n-gui.c: Include <dlfcn.h> and "config.h".
447 (free_frame): Call frame->driver->close instead of
449 (DLOPEN_SHLIB_EXT): New macro.
450 (MDeviceLibraryInterface): New type.
451 (device_library_list): New variable.
452 (register_device_library): New function.
453 (null_device): New variable.
454 (null_device_close, null_device_get_prop)
455 (null_device_realize_face, null_device_free_realized_face): New
457 (null_driver): New variable.
458 (null_device_init, null_device_fini, null_device_open): New
460 (null_interface): New variable.
461 (Mfreetype, Mdevice): Declare them.
462 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
463 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
464 Mwin__Close_Device. Register drivers for Mx and Mgd.
465 (m17n_fini_win): Decremented win_initialized. Call "fini"
466 function of all opened devices. Don't call mwin__fini.
467 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
469 (mframe): Handle Mdevice key of PLIST.
470 (mframe_get_prop): Call frame->device->get_prop instead of
471 mwin__device_get_prop.
473 * m17n-gd.c: New file.
475 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
476 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
478 * m17n-core.c (m17n_init_core): Increate core_initialized.
479 (m17n_fini_core): Decremented core_initialized.
481 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
482 (Mcolormap): Don't extern them here.
484 * m17n-X.c (FRAME_DEVICE): New macro.
485 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
486 (free_display_info): Use MPLIST_DO.
487 (free_device): Free rface->info.
488 (xft_close): Delete it.
489 (device_init): Renamed from mwin__init.
490 (device_fini): Renamed from mwin__fini.
491 (device_open): Renamed from mwin__open_device.
492 (x_driver): New variable.
493 (MXFontInfo): Delete member frame, add member display.
494 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
495 Don't declare them here.
497 * internal-gui.h (MDeviceType): New enum.
498 (MWDefice): Delete it.
499 (struct MFrame): Change type of device to void *. New members
500 device_type, driver, font_driver_list.
501 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
502 (MDeviceDriver): New type.
503 (Mx, Mgd, Mfreetype): Extern them.
504 (mwin__XXX): Delete all of them.
506 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
508 (win_destroy_ic): Likewise.
509 (adjust_window_and_draw): Likewise.
510 (win_callback): Likewise.
511 (Mxim): Declare it here.
512 (minput_event_to_key): Call M_CHECK_READABLE.
514 * fontset.c (mfont__lookup_fontset): Delete local variable
517 * font.h (struct MFontDriver): Delete member close, add members
518 parse_name and build_name.
519 (mfont__driver_list): Delete extern.
520 (mfont__close): Delete extern.
522 * font.c (mfont__init): Don't set mfont__driver_list.
523 (mfont__fini): Don't unref mfont__driver_list.
524 (mfont__select): Try font drivers in frame->font_driver_list. Set
525 driver member of a realized font.
526 (mfont__close): Delete it.
527 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
528 functions of the default frame.
530 * font-ft.c (close_ft): Check ft_info->ft_face and work
532 (add_font_info): Allocate ft_info by M17N_OBJECT.
533 (ft_close): Delete it.
534 (mfont__ft_driver): Don't set ft_close.
535 (ft_select): Increment ref-count of best_font.
536 (ft_open): Decremented ref-count of base. On error, call
537 FT_Done_Face and free ft_info.
538 (ft_find_metric): Always use XXX_MONO in load_flags.
539 (ft_render): Fix setting of width. Call
540 frame->driver->draw_points instead of mwin__draw_points.
541 (ft_to_prop): Don't set mfont__driver_list.
542 (mfont__ft_fini): Just unref ft_info.
544 * face.c (mface__init): Exchange foreground and background of
545 mface__default. Call mface_put_prop to set hline of
547 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
548 (mface__free_realized): Don't call mwin__free_realized_face.
550 * draw.c (Mdepth): Don't declare it here.
551 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
552 (render_glyphs, render_glyph_string): Likewise.
553 (mdraw__init): Don't set Mdepth.
554 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
556 (mdraw_text_per_char_extents): Return 0 on success and -1 on
558 (mdraw_text_items): Check FRAME is writable.
559 (mdraw_per_char_extents): Implement body.
561 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
563 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
564 (GUI_SOURCES): Delete it.
565 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
566 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
567 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
568 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
569 (linkgui_LDADD): Set to libm17n-gui.la
570 (linkgui_LDFLAGS): New target.
571 (SRC): Include ${libm17n_gui_la_SOURCES} and
572 ${libm17n_gd_la_SOURCES}.
574 2004-05-24 Kenichi Handa <handa@m17n.org>
576 * draw.c (draw_background): Don't draw background even if
577 rface->face.property[MFACE_BACKGROUND] is not Mnil.
579 2004-05-22 Kenichi Handa <handa@m17n.org>
581 * m17n-X.c (xft_open_font): Fix anti_alias setting.
583 2004-05-20 Kenichi Handa <handa@m17n.org>
585 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
587 * m17n-gui.c: Include "plist.h".
588 (mframe): If PLIST is NULL, initialize it to emply plist.
590 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
591 (xft_driver): New variable.
592 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
593 (xft_find_metric, xft_render): New function.
594 (mwin__init): Adjusted for the new mfont__driver_list.
595 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
596 generated face to PARAM.
597 (mwin__realize_face): Fix setting of box colors. Don't call hook
599 (mwin__draw_hline): New function.
600 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
601 (mwin__xft_render): Delete these function.
603 * internal-gui.h (struct MFrame): New member tick.
604 (struct MGlyphString): New member tick.
605 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
606 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
607 (mwin__xft_render): Delete extern.
609 * fontset.c (mfont__lookup_fontset): Make the code simpler.
610 (mfontset): Always increment the reference count of returned
613 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
614 (MFTInfo): Moved to font.h.
615 (ft_iso8859_1_font_list): Delete this variable.
616 (set_font_info): Don't set font->property[MFONT_TYPE].
617 (set_font_info): Don't udpate ft_iso8859_1_font_list.
618 (add_font_info): Change type to void.
619 (fc_list): Change anme from xft_list. Caller changed. Include
620 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
621 (mfont__ft_driver): Change name from ft_driver. Caller changed.
622 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
623 (close_ft): Don't call mwin__xft_close. Unref
625 (ft_open): Don't setup ft_info->fontname. Don't call
627 (ft_find_metric): Don't call mwin__xft_get_metric.
628 (ft_encode_char): Call rfont->driver->open instead of ft_open.
629 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
630 (mfont__ft_init): Adjusted for new mfont__driver_list.
631 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
633 * font.c (mfont__driver_list): Make it MPlist.
634 (mfont__init): Adjust initialization of mfont__driver_list.
635 (mfont__fini): Free mfont__driver_list.
636 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
637 (mfont__select): Adjusted for the new mfont__driver_list.
639 * font.h (enum MFontProperty): Delete MFONT_TYPE.
640 (mfont__drirver_list): Adjust prototype.
641 (MFTInfo): Move to here from fron.c. Deleve member fontname.
643 * face.h (struct MFace): Delete member realized_face_list, add
645 (struct MRealizedFace): Delete member need_update
646 andnofont_rface, add member non_ascii_list.
647 (mface__update_frame_face): Extern it.
649 * face.c (hline_prop_list, box_prop_list, noop_hook): New
651 (get_hline_create, get_box_create): New functions.
652 (find_realized_face): Cancel previous change. Arg RFONT deleted.
654 (free_face): Cancep previous change. Free face->frame_list.
655 (serialize_hline): Do nothing if hline->width is zero.
656 (serialize_box): Do nothing if box->width is zero.
657 (mface__init): Setup all properties of mface__default.
658 (mface__fini): Free hline_prop_list and box_prop_list.
659 (mface__realize): Cancel previous change. Update
660 face->frame_list. Setup rface->non_ascii_list.
661 (mface__for_chars): Update rface->non_ascii_list.
662 (mface__free_realized): Free rface->non_ascii_list.
663 (mface__update_frame_face): New function.
664 (mface): Initialize face->frame_list.
665 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
667 (mface_merge): Likewise.
668 (mface_put_prop): If key is Mhline or Mbox, get value by
669 get_hline_create or get_box_create respectively.
670 (mface_put_prop): Update frame->tick and call
671 mface__update_frame_face if necessary.
672 (mface_update): Do nothing if func is noop_hook.
674 * draw.c (render_glyphs): If a font is not found, use
675 mwin__draw_empty_boxes.
676 (alloc_gstring): Initialize gstring->tick.
677 (get_gstring): Check gstring->tick.
679 2004-05-17 Kenichi Handa <handa@m17n.org>
681 * face.c (find_realized_face): Return value changed. If RFONT is
682 NULL, avoid unnecessary checking.
683 (free_face): Free face->realized_face_list.
684 (mface__realize): Adjusted for the change of find_realized_face.
685 If it returns a realized face that needs update, free it and
686 realize a new one. Push a new realized face to
687 frame->realized_face_list instead of appending.
688 (mface__for_chars): Adjusted for the change of find_realized_face.
689 Short cut if the required font is in rface->ascii_rface.
690 (mface_put_prop): Free old value if necessary. Set need_update
691 member of realized faces to 1.
693 * face.h (struct MFace): Delete member tick, add member
695 (struct MRealizedFace): Delete member tick, add member
698 2004-05-13 Kenichi Handa <handa@m17n.org>
700 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
702 2004-05-12 Kenichi Handa <handa@m17n.org>
704 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
706 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
707 parse it XftNameParse.
709 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
710 (all_fonts_scaned): New variable.
711 (set_font_info): FAMILY may be Mnil.
712 (add_font_info): Argument changed.
713 (xft_list): Call add_font_info in it.
715 (ft_select): Make it work in the case family is Mnil.
716 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
717 (mfont__ft_fini): Set all_fonts_scaned to 0.
719 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
720 that is failed to open.
722 2004-05-10 Kenichi Handa <handa@m17n.org>
724 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
725 device's depth is 1 (i.e. monochrome).
727 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
728 to work around the problem of libtool.
730 * font-ft.c: Include <freetype/ftbdf.h>.
731 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
733 (mfont__ft_init): Initialize them.
734 (ft_iso8859_1_font_list): New variable.
735 (set_font_info): Detect a font containing iso8859-1 glyphs and
736 register it in ft_iso8859_1_font_list. If the font is not
737 scalable, assume it as BDF or PCF font and setup SIZE and RESY
738 properties of the font from its properties.
739 (add_font_list): If the font is not scalable, check if it is BDF
740 or PCF font. If not, ignore it.
741 (ft_select): If FAMILY is Mnil, return NULL only if the requested
742 registry is not iso8859-1.
743 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
744 ft_iso8859_1_font_list.
745 (ft_find_metric): If the font is not scalable, assume it as BDF
746 or PCF, and get a metric from its properties.
747 (mfont__ft_fini): Free ft_iso8859_1_font_list.
749 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
751 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
752 (libm17n_la_LDFLAGS): Delete it.
753 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
754 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
756 2004-05-06 Kenichi Handa <handa@m17n.org>
758 * draw.c (compose_glyph_string): Fix previous change.
760 2004-04-30 Kenichi Handa <handa@m17n.org>
762 * font-ft.c (ft_list): Delete unused variable `result'.
763 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
765 2004-04-27 Kenichi Handa <handa@m17n.org>
767 * m17n-X.c: Include config.h
768 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
769 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
770 (MWDevice) [HAVE_XFT2]: New member xft_draw.
771 (FRAME_CMAP, FRAME_VISUAL): New macros.
772 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
773 (xfont_driver): Make it static.
774 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
775 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
776 info->xft_color_back.
777 (MXftFontInfo) [HAVE_XFT2]: New type.
778 (mwin__xft_close) [HAVE_XFT2]: New function.
779 (mwin__xft_open) [HAVE_XFT2]: New function.
780 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
781 (mwin__xft_render) [HAVE_XFT2]: New function.
783 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
784 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
785 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
788 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
790 * font-ft.c: Don't include FT_FREETYPE_H here.
791 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
792 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
793 (MFTInfo): New member charmap_index.
794 (MFTInfo) [HAVE_XFT2]: New member xft_info.
795 (check_otf_filename): Renamed from check_filename. Return value
797 (ft_set_property): This function deleted.
798 (set_font_info): New function.
799 (add_font_list): Argument changed. Add multiple fonts.
800 (xft_list) [HAVE_XFT2]: New function.
801 (ft_list) [not HAVE_XFT2]: New function.
802 (ft_select): Add code for Xft.
803 (close_ft): Likewise.
805 (ft_find_metric): Likewise.
806 (ft_encode_char): Likewise.
807 (ft_render): Likewise.
809 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
811 2004-04-26 Kenichi Handa <handa@m17n.org>
813 * textprop.c (mtext_attach_property): Declare the return type as
816 2004-04-21 Kenichi Handa <handa@m17n.org>
818 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
820 2004-04-09 Kenichi Handa <handa@m17n.org>
822 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
824 (load_command): Setup above members.
826 2004-04-05 Kenichi Handa <handa@m17n.org>
828 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
830 2004-03-30 Kenichi Handa <handa@m17n.org>
832 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
835 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
836 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
838 2004-03-29 Kenichi Handa <handa@m17n.org>
840 * Version 1.0 Patch Level 2 released.
842 2004-03-29 Kenichi Handa <handa@m17n.org>
844 * charset.c (make_charset): Set charset->fully_loaded and
845 charset->simple correctly. Don't try to get charset->min_char and
846 charset->max_char for a charset of method subset and superset.
847 Don't load a mapping file here.
848 (mcharset__init): Set unified_max.
849 (mcharset__load_from_database): Free a working plist.
851 * coding.c (mcoding__fini): Free all malloced data.
853 * input-gui.c (win_create_ic): Set control.as_image for preediting
856 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
857 `count') to initialize the array.
859 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
862 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
864 (mwin__create_window): Fix bug of setting a background pixel of a
866 (mwin__adjust_window): Clear the window before drawing.
868 * m17n-core.c (mdebug__report_object): Free array->objectes if
870 (m17n_init_core): Don't set report_header_printed to 0 here.
871 Fix debugging information.
872 (m17n_fini_core): Set report_header_printed to 0 here.
874 * m17n-core.h (mplist_deserialize): Extern it.
876 * m17n-gui.c (m17n_fini_win): Fix debugging information.
878 * m17n.c (m17n_fini): Fix debugging information.
880 * mtext.c (mtext__adjust_foramt): New function.
882 * mtext.h (mtext__adjust_foramt): Extern it.
884 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
886 * plist.h (mplist__deserialize): Don't extern it.
888 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
889 elements of symbol_table to NULL. Report about created and freed
890 symbols if MDEBUG_FINI is set.
892 2004-03-22 Kenichi Handa <handa@m17n.org>
894 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
896 * m17n.c (m17n_init): Fix the way of checking merror_code.
898 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
900 2004-03-22 Kenichi Handa <handa@m17n.org>
902 * fontset.c (realize_font_group): Adjust the font size by
903 mfont__resize before selecting a font.
905 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
907 2004-03-19 Kenichi Handa <handa@m17n.org>
909 * Version 1.0 Patch Level 1 released.
911 2004-03-19 Kenichi Handa <handa@m17n.org>
913 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
915 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
917 2004-03-19 Kenichi Handa <handa@m17n.org>
919 Re-apply the changes forgotten in the released version.
921 * charset.c (mcharset__load_from_database): Call
922 mchar_define_charset.
924 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
925 (mconv_encode_range): Put Mcoding text property.
927 2004-03-18 Kenichi Handa <handa@m17n.org>
929 * draw.c (Mdepth): New variable.
930 (visual_order): Delete unused local var `pos'.
931 (compose_glyph_string): Fix for the case that gstring->glyphs is
932 realloced. Stop generating glyphs at TO. Fix handling of
934 (layout_glyphs): Get metrics of all glyphs in advance. Set
935 lbearing and rbearing of base of composition glyph correctly.
936 Handle left-overhang glyphs correctly.
937 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
939 (dump_combining_code): Change the defualt off_x character to ".".
940 (mdraw__init): Initialize Mdepth.
942 * face.c (work_gstring): New variable
943 (mface__init): Initialize work_gstring.
944 (mface__fini): Free work_gstring.glyphs.
945 (mface__realize): Don't handle videomode property here. Adjusted
946 for the change of mfont__get_metric.
947 (mface__for_chars): Adjusted for the change of mfont__get_metric.
949 * face.h (enum face_gc): Moved to m17n-X.c.
951 * font.h (struct MFontDriver): Arguments of find_metric changed.
952 (mfont__select): Prototype adjusted.
953 (mfont__get_metric): Likewise.
954 (mfont__ft_drive_otf): Likewise.
955 (mfont__flt_run): Likewise.
957 * font.c (mfont__select): New argument layouter. If layouter is
958 different in the registered font, make a new copy of realized
960 (mfont__get_metric): Argument changed. Get metrics of multiple
962 (mfont_find): Call mfont__select with layouter as Mnil.
964 * font-flt.c (FontLayoutContext): New member rfont.
965 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
966 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
968 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
970 (NUM_POINTS): New macro.
971 (MPointTable): New type.
972 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
973 (mfont__ft_drive_otf): New argument rfont.
975 * fontset.c (realize_font_group): Adjusted for the changed of
977 (check_fontset_element): This function deleted.
979 * input-gui.c (adjust_window_and_draw): Locate a preedit window
980 off the parent window if the preedit text is zero length.
982 * internal-gui.h (struct MFrame): New members foreground,
983 background, videomode, font.
984 (struct MGlyphString): New member anti_alias.
985 (MDrawPoint): New type.
986 (mwin__draw_bitmap): Prototype deleted.
987 (mwin__draw_points): Prototype added.
989 * m17n-gui.h (MDrawControl): New member anti_alias.
991 * m17n-gui.c (free_frame): Free frame->font.
992 (mframe): Set the fontset of frame->face to the default fontset.
994 * m17n-X.c (RGB_GC): New type.
995 (enum gc_index): Renamed from enum face_gc. Member names changed.
997 (struct MWDevice): Members foreground and background deleted. New
998 member scratch_gc, gc_list.
999 (DEFAULT_FONT, FALLBACK_FONT): New macros.
1000 (free_device): Free GCs in device->gc_list.
1001 (get_rgb_gc): New function.
1002 (get_gc): Renamed and argument changed from get_color.
1003 (get_gc_for_anti_alias): New function.
1004 (xfont_find_metric): Arguments changed. Get metrics of multiple
1006 (set_region): Argument changed. Caller changed.
1007 (xfont_render): Allways set a font in gc.
1008 (x_error_handler, x_io_error_handler): Define only if
1009 X_SET_ERROR_HANDLER is defined.
1010 (mwin__open_device): Create device->scratch_gc. Set members
1011 foreground, background, and videomode of frame. Call
1012 XSetErrorHandler and XSetIOErrorHandler only if
1013 X_SET_ERROR_HANDLER is defined.
1014 (struct gc_list): Deleted.
1015 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1016 (mwin__realize_face): Adjusted for the change of the format of
1017 rface->info and the charge of set_region.
1018 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1019 (mwin__draw_box): Likewise.
1020 (mwin__draw_bitmap): This function deleted.
1021 (mwin__draw_points): New function.
1022 (mwin__verify_region): Adjusted for the change of the format of
1023 rface->info and the charge of set_region.
1024 (mwin__create_window): Inherit backgound pixel from parent.
1025 (mwin__dump_gc): Adjusted for the change of the format of
1028 2004-03-16 Kenichi Handa <handa@m17n.org>
1030 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1032 * input.c (M_key_alias): New variable.
1033 (handle_key): Try M_key_alias property of a key too.
1034 (minput__init): Initialize M_key_alias. Give that property to
1035 symbols in one_char_symbol. Fix bug of initializing
1038 * draw.c (compose_glyph_string): Don't handle
1039 ignore_formatting_char here. Include formatting characters in the
1040 range processed by a FTL.
1041 (layout_glyph_string): Handle ignore_formatting_char here.
1043 2004-03-12 Kenichi Handa <handa@m17n.org>
1045 * input-gui.c (win_create_ic): Enable bidi in status control.
1047 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1049 2004-03-09 Kenichi Handa <handa@m17n.org>
1051 * input.c (load_input_method): If title is not specified, use the
1052 input method name as title.
1054 * m17n-X.c (get_color): Make it static.
1055 (xim_create_ic, xim_destroy_ic, x_error_handler)
1056 (x_io_error_handler): Likewise.
1058 2004-03-01 Kenichi Handa <handa@m17n.org>
1060 * Version 1.0 released.
1063 Copyright (C) 2003, 2004
1064 National Institute of Advanced Industrial Science and Technology (AIST)
1065 Registration Number H15PRO112
1067 This file is part of the m17n library.
1069 The m17n library is free software; you can redistribute it and/or
1070 modify it under the terms of the GNU Lesser General Public License
1071 as published by the Free Software Foundation; either version 2.1 of
1072 the License, or (at your option) any later version.
1074 The m17n library is distributed in the hope that it will be useful,
1075 but WITHOUT ANY WARRANTY; without even the implied warranty of
1076 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1077 Lesser General Public License for more details.
1079 You should have received a copy of the GNU Lesser General Public
1080 License along with the m17n library; if not, write to the Free
1081 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA