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