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