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