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