(struct MFrame): New member tick.
[m17n/m17n-lib.git] / src / ChangeLog
1 2004-05-17  Kenichi Handa  <handa@m17n.org>
2
3         * face.c (find_realized_face): Return value changed.  If RFONT is
4         NULL, avoid unnecessary checking.
5         (free_face): Free face->realized_face_list.
6         (mface__realize): Adjusted for the change of find_realized_face.
7         If it returns a realized face that needs update, free it and
8         realize a new one.  Push a new realized face to
9         frame->realized_face_list instead of appending.
10         (mface__for_chars): Adjusted for the change of find_realized_face.
11         Short cut if the required font is in rface->ascii_rface.
12         (mface_put_prop): Free old value if necessary.  Set need_update
13         member of realized faces to 1.
14
15         * face.h (struct MFace): Delete member tick, add member
16         realized_face_list.
17         (struct MRealizedFace): Delete member tick, add member
18         need_update.
19
20 2004-05-13  Kenichi Handa  <handa@m17n.org>
21
22         * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
23
24 2004-05-12  Kenichi Handa  <handa@m17n.org>
25
26         * internal-gui.h (mwin__xft_open): Arguemnt name changed.
27
28         * m17n-X.c (mwin__xft_open): Argument changed to fontname and
29         parse it XftNameParse.
30
31         * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
32         (all_fonts_scaned): New variable.
33         (set_font_info): FAMILY may be Mnil.
34         (add_font_info): Argument changed.
35         (xft_list): Call add_font_info in it.
36         (ft_list): Likewise.
37         (ft_select): Make it work in the case family is Mnil.
38         (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
39         (mfont__ft_fini): Set all_fonts_scaned to 0.
40
41         * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
42         that is failed to open.
43
44 2004-05-10  Kenichi Handa  <handa@m17n.org>
45
46         * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
47         device's depth is 1 (i.e. monochrome).
48
49         * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
50         to work around the problem of libtool.
51
52         * font-ft.c: Include <freetype/ftbdf.h>.
53         (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
54         variables.
55         (mfont__ft_init): Initialize them.
56         (ft_iso8859_1_font_list): New variable.
57         (set_font_info): Detect a font containing iso8859-1 glyphs and
58         register it in ft_iso8859_1_font_list.  If the font is not
59         scalable, assume it as BDF or PCF font and setup SIZE and RESY
60         properties of the font from its properties.
61         (add_font_list): If the font is not scalable, check if it is BDF
62         or PCF font.  If not, ignore it.
63         (ft_select): If FAMILY is Mnil, return NULL only if the requested
64         registry is not iso8859-1.
65         (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
66         ft_iso8859_1_font_list.
67         (ft_find_metric): If the font is not scalable, assume it as BDF
68         or PCF, and get a metric from its properties.
69         (mfont__ft_fini): Free ft_iso8859_1_font_list.
70
71 2004-05-07  Kenichi Handa  <handa@redhat.m17n.org>
72
73         * Makefile.am (libm17n_la_LIBADD): Include -ldl.
74         (libm17n_la_LDFLAGS): Delete it.
75         (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
76         (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
77
78 2004-05-06  Kenichi Handa  <handa@m17n.org>
79
80         * draw.c (compose_glyph_string): Fix previous change.
81
82 2004-04-30  Kenichi Handa  <handa@m17n.org>
83
84         * font-ft.c (ft_list): Delete unused variable `result'.
85         (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
86
87 2004-04-27  Kenichi Handa  <handa@m17n.org>
88
89         * m17n-X.c: Include config.h
90         [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
91         (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
92         (MWDevice) [HAVE_XFT2]: New member xft_draw.
93         (FRAME_CMAP, FRAME_VISUAL): New macros.
94         (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
95         (xfont_driver): Make it static.
96         (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
97         (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
98         info->xft_color_back.
99         (MXftFontInfo) [HAVE_XFT2]: New type.
100         (mwin__xft_close) [HAVE_XFT2]: New function.
101         (mwin__xft_open) [HAVE_XFT2]: New function.
102         (mwin__xft_get_metric) [HAVE_XFT2]: New function.
103         (mwin__xft_render) [HAVE_XFT2]: New function.
104
105         * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
106         (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
107         (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
108         externs.
109
110         * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
111
112         * font-ft.c: Don't include FT_FREETYPE_H here.
113         [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
114         (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
115         (MFTInfo): New member charmap_index.
116         (MFTInfo) [HAVE_XFT2]: New member xft_info.
117         (check_otf_filename): Renamed from check_filename.  Return value
118         changed.
119         (ft_set_property): This function deleted.
120         (set_font_info): New function.
121         (add_font_list): Argument changed.  Add multiple fonts.
122         (xft_list) [HAVE_XFT2]: New function.
123         (ft_list) [not HAVE_XFT2]: New function.
124         (ft_select): Add code for Xft.
125         (close_ft): Likewise.
126         (ft_open): Likewise.
127         (ft_find_metric): Likewise.
128         (ft_encode_char): Likewise.
129         (ft_render): Likewise.
130
131         * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
132
133 2004-04-26  Kenichi Handa  <handa@m17n.org>
134
135         * textprop.c (mtext_attach_property): Declare the return type as
136         `int'.
137
138 2004-04-21  Kenichi Handa  <handa@m17n.org>
139
140         * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
141
142 2004-04-09  Kenichi Handa  <handa@m17n.org>
143
144         * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
145         seq_to.
146         (load_command): Setup above members.
147
148 2004-04-05  Kenichi Handa  <handa@m17n.org>
149
150         * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
151
152 2004-03-30  Kenichi Handa  <handa@m17n.org>
153
154         * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
155         >= 0x10000.
156
157         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
158         (M17NLIB_VERSION_NAME): Changed to 1.0.2.
159
160 2004-03-29  Kenichi Handa  <handa@m17n.org>
161
162         * Version 1.0 Patch Level 2 released.
163
164 2004-03-29  Kenichi Handa  <handa@m17n.org>
165
166         * charset.c (make_charset): Set charset->fully_loaded and
167         charset->simple correctly.  Don't try to get charset->min_char and
168         charset->max_char for a charset of method subset and superset.
169         Don't load a mapping file here.
170         (mcharset__init): Set unified_max.
171         (mcharset__load_from_database): Free a working plist.
172
173         * coding.c (mcoding__fini): Free all malloced data.
174
175         * input-gui.c (win_create_ic): Set control.as_image for preediting
176         to 0.
177
178         * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
179         `count') to initialize the array.
180
181         * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
182         M17N_OBJECT_UNREF.
183
184         * m17n-X.c (xfont_render): If rface->rfont is null, draw a
185         rectangle.
186         (mwin__create_window): Fix bug of setting a background pixel of a
187         new window.
188         (mwin__adjust_window): Clear the window before drawing.
189
190         * m17n-core.c (mdebug__report_object): Free array->objectes if
191         necessary.
192         (m17n_init_core): Don't set report_header_printed to 0 here.
193         Fix debugging information.
194         (m17n_fini_core): Set report_header_printed to 0 here.
195
196         * m17n-core.h (mplist_deserialize): Extern it.
197
198         * m17n-gui.c (m17n_fini_win): Fix debugging information.
199
200         * m17n.c (m17n_fini): Fix debugging information.
201
202         * mtext.c (mtext__adjust_foramt): New function.
203
204         * mtext.h (mtext__adjust_foramt): Extern it.
205
206         * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
207
208         * plist.h (mplist__deserialize): Don't extern it.
209
210         * symbol.c (msymbol__fini): Set freed_symbols to 0.  Set all
211         elements of symbol_table to NULL.  Report about created and freed
212         symbols if MDEBUG_FINI is set.
213
214 2004-03-22  Kenichi Handa  <handa@m17n.org>
215
216         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
217
218         * m17n.c (m17n_init): Fix the way of checking merror_code.
219
220         * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
221
222 2004-03-22  Kenichi Handa  <handa@m17n.org>
223
224         * fontset.c (realize_font_group): Adjust the font size by
225         mfont__resize before selecting a font.
226
227         * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
228
229 2004-03-19  Kenichi Handa  <handa@m17n.org>
230
231         * Version 1.0 Patch Level 1 released.
232
233 2004-03-19  Kenichi Handa  <handa@m17n.org>
234
235         * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
236
237         * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
238
239 2004-03-19  Kenichi Handa  <handa@m17n.org>
240
241         Re-apply the changes forgotten in the released version.
242
243         * charset.c (mcharset__load_from_database): Call
244         mchar_define_charset.
245
246         * coding.c (encode_unsupporeted_char): Put Mcoding text property.
247         (mconv_encode_range): Put Mcoding text property.
248
249 2004-03-18  Kenichi Handa  <handa@m17n.org>
250
251         * draw.c (Mdepth): New variable.
252         (visual_order): Delete unused local var `pos'.
253         (compose_glyph_string): Fix for the case that gstring->glyphs is
254         realloced.  Stop generating glyphs at TO.  Fix handling of
255         control charaters.
256         (layout_glyphs): Get metrics of all glyphs in advance.  Set
257         lbearing and rbearing of base of composition glyph correctly.
258         Handle left-overhang glyphs correctly.
259         (alloc_gstring): New arg frame.  Set gstring->anti_alias.  Caller
260         changed.
261         (dump_combining_code): Change the defualt off_x character to ".".
262         (mdraw__init): Initialize Mdepth.
263
264         * face.c (work_gstring): New variable
265         (mface__init): Initialize work_gstring.
266         (mface__fini): Free work_gstring.glyphs.
267         (mface__realize): Don't handle videomode property here.  Adjusted
268         for the change of mfont__get_metric.
269         (mface__for_chars): Adjusted for the change of mfont__get_metric.
270
271         * face.h (enum face_gc): Moved to m17n-X.c.
272
273         * font.h (struct MFontDriver): Arguments of find_metric changed.
274         (mfont__select): Prototype adjusted.
275         (mfont__get_metric): Likewise.
276         (mfont__ft_drive_otf): Likewise.
277         (mfont__flt_run): Likewise.
278         
279         * font.c (mfont__select): New argument layouter.  If layouter is
280         different in the registered font, make a new copy of realized
281         font.
282         (mfont__get_metric): Argument changed.  Get metrics of multiple
283         glyphs.
284         (mfont_find): Call mfont__select with layouter as Mnil.
285
286         * font-flt.c (FontLayoutContext): New member rfont.
287         (run_otf): Adjusted for the change of mfont__ft_drive_otf.
288         (mfont__flt_run): Argument changed.  Initialize ctx.rfont.
289
290         * font-ft.c (ft_find_metric): Arguments changed.  Get metrics of
291         multiple glyphs.
292         (NUM_POINTS): New macro.
293         (MPointTable): New type.
294         (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
295         (mfont__ft_drive_otf): New argument rfont.
296
297         * fontset.c (realize_font_group): Adjusted for the changed of
298         mfont__select.
299         (check_fontset_element): This function deleted.
300
301         * input-gui.c (adjust_window_and_draw): Locate a preedit window
302         off the parent window if the preedit text is zero length.
303
304         * internal-gui.h (struct MFrame): New members foreground,
305         background, videomode, font.
306         (struct MGlyphString): New member anti_alias.
307         (MDrawPoint): New type.
308         (mwin__draw_bitmap): Prototype deleted.
309         (mwin__draw_points): Prototype added.
310
311         * m17n-gui.h (MDrawControl): New member anti_alias.
312
313         * m17n-gui.c (free_frame): Free frame->font.
314         (mframe): Set the fontset of frame->face to the default fontset.
315
316         * m17n-X.c (RGB_GC): New type.
317         (enum gc_index): Renamed from enum face_gc.  Member names changed.
318         (GCInfo): New typel
319         (struct MWDevice): Members foreground and background deleted.  New
320         member scratch_gc, gc_list.
321         (DEFAULT_FONT, FALLBACK_FONT): New macros.
322         (free_device): Free GCs in device->gc_list.
323         (get_rgb_gc): New function.
324         (get_gc): Renamed and argument changed from get_color.
325         (get_gc_for_anti_alias): New function.
326         (xfont_find_metric): Arguments changed.  Get metrics of multiple
327         glyphs.
328         (set_region): Argument changed.  Caller changed.
329         (xfont_render): Allways set a font in gc.
330         (x_error_handler, x_io_error_handler): Define only if
331         X_SET_ERROR_HANDLER is defined.
332         (mwin__open_device): Create device->scratch_gc.  Set members
333         foreground, background, and videomode of frame.  Call
334         XSetErrorHandler and XSetIOErrorHandler only if
335         X_SET_ERROR_HANDLER is defined.
336         (struct gc_list): Deleted.
337         (REGISTER_GC, UNREGISTER_GC): These macros deleted.
338         (mwin__realize_face): Adjusted for the change of the format of
339         rface->info and the charge of set_region.
340         (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
341         (mwin__draw_box): Likewise.
342         (mwin__draw_bitmap): This function deleted.
343         (mwin__draw_points): New function.
344         (mwin__verify_region): Adjusted for the change of the format of
345         rface->info and the charge of set_region.
346         (mwin__create_window): Inherit backgound pixel from parent.
347         (mwin__dump_gc): Adjusted for the change of the format of
348         rface->info.
349
350 2004-03-16  Kenichi Handa  <handa@m17n.org>
351
352         * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
353
354         * input.c (M_key_alias): New variable.
355         (handle_key): Try M_key_alias property of a key too.
356         (minput__init): Initialize M_key_alias.  Give that property to
357         symbols in one_char_symbol.  Fix bug of initializing
358         one_char_symbol.
359
360         * draw.c (compose_glyph_string): Don't handle
361         ignore_formatting_char here.  Include formatting characters in the
362         range processed by a FTL.
363         (layout_glyph_string): Handle ignore_formatting_char here.
364
365 2004-03-12  Kenichi Handa  <handa@m17n.org>
366
367         * input-gui.c (win_create_ic): Enable bidi in status control.
368
369         * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
370
371 2004-03-09  Kenichi Handa  <handa@m17n.org>
372
373         * input.c (load_input_method): If title is not specified, use the
374         input method name as title.
375
376         * m17n-X.c (get_color): Make it static.
377         (xim_create_ic, xim_destroy_ic, x_error_handler)
378         (x_io_error_handler): Likewise.
379
380 2004-03-01  Kenichi Handa  <handa@m17n.org>
381
382         * Version 1.0 released.
383
384 \f
385 Copyright (C) 2003, 2004
386   National Institute of Advanced Industrial Science and Technology (AIST)
387   Registration Number H15PRO112
388
389 This file is part of the m17n library.
390
391 The m17n library is free software; you can redistribute it and/or
392 modify it under the terms of the GNU Lesser General Public License
393 as published by the Free Software Foundation; either version 2.1 of
394 the License, or (at your option) any later version.
395
396 The m17n library is distributed in the hope that it will be useful,
397 but WITHOUT ANY WARRANTY; without even the implied warranty of
398 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
399 Lesser General Public License for more details.
400
401 You should have received a copy of the GNU Lesser General Public
402 License along with the m17n library; if not, write to the Free
403 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
404 02111-1307, USA.