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