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