*** empty log message ***
[m17n/m17n-lib.git] / src / ChangeLog
1 2004-11-05  Kenichi Handa  <handa@m17n.org>
2
3         * font.c: (commont_style): Include dummy elements "slanted" and
4         "rslanted" to prefer "o" to "r" if "i" is requested.
5
6         * font-ft.c (ft_to_prop): Fix "oblique" entry.
7
8 2004-10-29  Kenichi Handa  <handa@m17n.org>
9
10         * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
11
12         * m17n-X.c (MXFont): Change type of the member `sizes' to int.
13         New members smallest and larger.
14         (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
15         (xfont_registry_list): Likewise.
16         (xfont_select): Likewise.
17         
18
19 2004-10-28  Kenichi Handa  <handa@m17n.org>
20
21         * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
22         font name comparison.
23         (xfont_select): Fix logic for selecting a larger size font.
24
25 2004-10-25  Kenichi Handa  <handa@m17n.org>
26
27         * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
28         ">" actions.
29
30 2004-10-22  Kenichi Handa  <handa@m17n.org>
31
32         * input.c (update_candidate): Renamed from udpate_candidate.
33         (take_action_list): Show more debugging info on arithmetic commands.
34
35         * m17n-X.c (device_open): Fix previous change.
36
37         * draw.c (compose_glyph_string): Don't get face property at the
38         end of M-text.
39
40 2004-10-21  Kenichi Handa  <handa@m17n.org>
41
42         * draw.c (compose_glyph_string): Fix for the case of category
43         being Mnil.
44
45 2004-10-19  Kenichi Handa  <handa@m17n.org>
46
47         * input.c (mdebug_mask): New variable.
48         (shift_state): Print debug information.
49         (take_action_list): Likewise.
50         (handle_key): Likewise.
51
52 2004-10-14  Kenichi Handa  <handa@m17n.org>
53
54         * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
55
56 2004-10-13  Kenichi Handa  <handa@m17n.org>
57
58         * m17n-X.c (device_open): Be sure to register at least one font
59         driver.
60
61         * font-ft.c: Include <freetype/ftbdf.h> conditionally.  Check
62         HAVE_FTBDF_H before calling FT_Get_BDF_Property.
63
64 2004-10-12  Kenichi Handa  <handa@m17n.org>
65
66         * draw.c (alloc_gstring): Fix previous change.
67
68         * font-ft.c (ft_list_generic): Fix for the case of not
69         HAVE_FONTCONFIG.
70
71         * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
72
73         * font.c (mfont_list): If no font is found, return NULL.
74         (load_font_encoding_table): Put entries of nil registry first.
75         (find_encoding): Adjust for the above change.
76
77 2004-10-11  Kenichi Handa  <handa@m17n.org>
78
79         * m17n-gui.h (mfont_list): Adjust prototype.
80
81         * m17n-X.c (xfont_list): New arg maxnum.
82
83         * font.h (struct MFontDriver): Change prototype of <list>.
84
85         * font-ft.c (fc_generic_family_list): Delete it.
86         (Mserif, Msans_serif, Mmonospace): Delete them.
87         (M_generic_family_info): New variable.
88         (enum GenericFamilyType): New enum.
89         (struct GenericFamilyInfo): New struct.
90         (generic_family_table): New variable.
91         (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
92         iso8859-1.
93         (add_font_info): Get style here.
94         (ft_list_family): Don't initialize fc_config here.  Don't list
95         generic families.
96         (ft_list_generic): New function.
97         (ft_select): Pay attention to generic familes here.
98         (ft_open): Fix calculation of ascent and descent.
99         (ft_list): Pay attention to generic families.
100         (mfont__ft_init): Initialize M_generic_family_info,
101         generic_family_table, and fc_config..
102         (mfont__ft_fini): Finalize generic_family_table.
103
104         * draw.c (compose_glyph_string): Use more constant font for
105         glyphs.  Adjust for the member change in MGlyph.
106         (layout_glyph_string): Adjust for the member change in MGlyph.
107         (alloc_gstring): Intilize scracth_glyph to avoid
108         compose_glyph_string on it.
109         (get_gstring): Don't call compose_glyph_string on scracth_glyph.
110         (mdraw_coordinates_position): Fix previous change.
111
112         * internal-gui.h (glyph_category): New enum.
113         (MGlyph): Change type of <category> to enum glyph_category.
114
115         * face.c (mface__realize): Delete args langauge and charset.
116         (mface__for_chars): Fix for the case that glyphs have different
117         rfaces.
118         (mface__update_frame_face): Adjust for mface__realize change.
119
120         * face.h (mface__realize): Adjust prototype.
121
122 2004-10-05  Kenichi Handa  <handa@m17n.org>
123
124         * language.c (mlang__init): Add Akan.
125
126 2004-10-04  Kenichi Handa  <handa@m17n.org>
127
128         * font-ft.c (add_font_info): Add instead of push the element.
129         (ft_list_family): For generic fonts, try all
130         substituted. families.
131
132         * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
133         (run_rule): Don't update cluster range here.
134         (run_command): Update cluster range on appending a glyph.
135         (run_otf): Update cluster range for glyphs generated by OTF.
136
137 2004-10-02  Kenichi Handa  <handa@m17n.org>
138
139         * m17n-X.c (device_open): Handle Mfont key in PLIST.
140
141 2004-09-30  Kenichi Handa  <handa@m17n.org>
142
143         * font-ft.c (ft_select): Ignore family on calling mfont__score.
144
145 2004-09-30  Kenichi Handa  <handa@m17n.org>
146
147         * font.h: Include <fontconfig/fontconfig.h>.
148         (MFTInfo): New member langset.
149         (mfont__encoding_list): Extern it.
150
151         * font.c (mfont__encoding_list): New function.
152         (mdebug_dump_font_list): New function.
153
154         * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
155         (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
156         variables.
157         (ft_family_list): New variable.
158         (set_font_info): New arg basep.  Callers changed.
159         (fc_list): Check the return value of FcPatternGetString.
160         (add_font_info): New arg plist.  Callers changed. Update
161         ft_family_list.
162         (ft_list_family): New function (merged fc_list and ft_list_all).
163         (ft_select): Use ft_list_family.
164         (ft_list): Likewise.  If FONT is not NULL, check all fonts.  Fix
165         typo (== -> !=).
166         (mfont__ft_init): Initialize above new variables.
167         (mfont__ft_fini): Free ft_family_list.
168         (STRDUP_LOWER): New macro.
169         (set_font_info): Use STRDUP_LOWER.
170         (ft_list_family): Avoid duplicate addition of font path.  Use
171         STRDUP_LOWER.
172         (fc_decode_prop): Fix typo.
173
174         * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
175         (xfont_registry_list): Change argument disp_info to frame.
176         Callers changed.
177         (xfont_list_all): New function.
178         (xfont_list): If FONT is not NULL, check all fonts.
179
180 2004-09-28  Kenichi Handa  <handa@m17n.org>
181
182         * m17n-X.c (MXFont, MXFontList): New types.
183         (MDisplayInfo): Delete members font_registry_list,
184         iso8859_1_family_list, iso10646_1_family_list, new members
185         font_list, base_font_list.
186         (free_display_info): Adusted for the change of MDisplayInfo.
187         (xfont_driver): Initialize with xfont_list.
188         (font_compare): New function.
189         (build_font_list): Deleted.
190         (xfont_registry_list): New function.
191         (xfont_select): Use xfont_registry_list.
192         (xfont_list): New function.
193         (device_open): Adusted for the change of MDisplayInfo.
194
195         * font-ft.c (add_font_info): New arg languages.  Callers changed.
196         (fc_list): Get languages from fonts..
197         (ft_list_all): Renamed from ft_list.  Callers changed.
198         (ft_list): New function.
199         (mfont__ft_driver): Initalize with ft_list.
200
201         * font.c (mfont_list): New function.
202
203         * font.h (struct MFontDriver): New member `list'.
204         (MFTInfo): New member languages.
205
206         * m17n-gui.h (mfont_list): Extern it.
207
208 2004-09-27  Kenichi Handa  <handa@m17n.org>
209
210         * internal-gui.h (struct MGlyphString): Delete members mt,
211         sub_width, sub_lbrearing, sub_rbearing, and region.
212
213         * draw.c (MSubTextExtents): New type.
214         (layout_glyphs): New arg extents.  Set its members.
215         (layout_glyph_string): Adjusted for the above change.
216         (alloc_gstring): Don't set gstring->mt.
217         (truncate_gstring): Call line_break function with mt instead of
218         gstring->mt.
219
220 2004-09-22  Kenichi Handa  <handa@m17n.org>
221
222         * mtext.c (count_utf_16_chars): Count each code of invalid
223         surrogates as one.
224
225 2004-09-19  Kenichi Handa  <handa@m17n.org>
226
227         * mtext.c (default_utf_16, default_utf_32): Rename them to
228         MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively.  Caller
229         changed.
230
231         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
232         them.
233
234 2004-09-13  Kenichi Handa  <handa@m17n.org>
235
236         * draw.c (Mlatin): Don't declare it here.
237         (visual_order): Fix reordering of combining characters.
238         (compose_glyph_string): Fix detection of script.
239         (layout_glyphs): Don't fix reordering of combining characters
240         here.
241         (layout_glyph_string): Pay attention to
242         control->disable_overlapping_adjustment.
243         (truncate_gstring): Include at least on character in a line.
244         (get_gstring): Always scan one full line.
245         (mdraw__init): Don't initialize Mlatin here.
246         (mdraw_text_per_char_extents): Fix iteration.  If a glyph doesn't
247         have a font, use ascent/descent of an ASCII font.  Allow
248         ink_array_return and logical_array_return to be NULL.
249         (mdraw_coordinates_position): Fix iteration.
250
251         * font-ft.c (MFTtoProp): Member completely changed.
252         (ft_to_prop): Adjusted for the above change.
253         (ft_to_prop_size): Likewise.
254         (set_font_info): Adjusted for the change of MFTtoProp.
255         (fc_generic_family_list): New variable.
256         (fc_list): Add special handling of generic font names.
257         (mfont__ft_init): Adjusted for the change of MFTtoProp.
258         Initialize fc_generic_family_list.
259         (mfont__ft_fini): Don't free ft_to_prop.  Free
260         fc_generic_family_list.
261         (FC_vs_M17N_font_prop): New type.
262         (fc_weight_table, fc_slant_table, fc_width_table): New variables.
263         (fc_decode_prop, fc_encode_prop): New functions.
264         (mfont__ft_parse_name): Use fc_decode_prop.
265         (mfont__ft_unparse_name): Use fc_encode_prop.
266
267         * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
268         (MWDevice): Add member realized_font_list.
269         (free_display_info): Don't free disp_info->realized_font_list.
270         (free_device): Free device->realized_fontset_list.
271         (xft_find_metric): Use gstring->frame instead of rfont->frame.
272         (device_open): Don't initialize disp_info->realized_font_list.
273         (device_open): Initialize device->realized_font_list and set it to
274         frame->realized_font_list.
275
276         * fontset.c (try_font_group): New function.
277         (mfont__lookup_fontset): Use try_font_group.
278
279         * font.c (common_weight): Change the order of "regular".
280
281         * face.c (Mlatin): Don't make it static.
282         (mface__realize): Be sure to set work_gstring.frame.
283         (mface__for_chars): Likewise.
284
285         * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
286         MTEXT_FORMAT_UTF_8.
287
288         * internal-gui.h (Mlatin): Extern it.
289
290         * m17n-gui.h (MDrawControl): New member
291         disable_overlapping_adjustment.
292
293 2004-09-06  Kenichi Handa  <handa@m17n.org>
294
295         * font-flt.c (run_otf): Fix typo ('}'->']').
296
297         * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
298         (COMBINING_PRECOMPUTED_P): New macros.
299
300         * draw.c (layout_glyphs): Handle precomputed combining code.
301
302         * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
303         precomupted combining code.
304
305 2004-09-03  Kenichi Handa  <handa@m17n.org>
306
307         * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
308         otf_gstring.glyphs.
309
310 2004-08-27  Kenichi Handa  <handa@m17n.org>
311
312         * face.c (mface_put_prop): If the new value is the same as the
313         current one, don't increment frame->tick.
314
315 2004-08-25  Kenichi Handa  <handa@m17n.org>
316
317         * fontset.c (mfontset): Initialize font_spec_list member.
318         (mfontset_copy): Load fontset if necessary.
319
320         * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
321         'metrics' to for C++.
322
323         * draw.c (mdraw_glyph_info): Adjusted for the member name change
324         (this -> metics).
325
326 2004-08-16  Kenichi Handa  <handa@m17n.org>
327
328         * Version 1.1.0 released.
329
330 2004-08-13  Kenichi Handa  <handa@m17n.org>
331
332         * language.c (mlang__init): Add Dhivehi.
333
334         * m17n-gui.c (Mx, Mfreetype): Delete it.
335         (m17n_init_win): Don't initialize Mx and Mfreetype here.
336
337         * m17n-gui.h (Mfreetype, Mxft): Extern them.
338         (mfont_resize_ratio): Extern it.
339         (MDrawGlyphInfo): New member logical_width;
340         (MDrawGlyph): New type.
341         (mdraw_glyph_list): Prototype adjusted.
342
343         * m17n-X.c (xfont_open): Set type and fontp members.
344         (xft_open): Likewise.
345
346         * internal-gui.h (Mx, Mfreetype): Delete extern.
347
348         * font.h (struct MRealizedFont): New member type and fontp.
349
350         * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
351         (Mx, Mfreetype): Declare here.
352         (Mxft): New variable.
353         (mfont_resize_ratio): New function.
354
355         * font-ft.c (ft_open): Set type and fontp members.
356
357         * draw.c (mdraw_glyph_list): Argument type changed.  Don't set
358         glyph_code member.
359
360 2004-08-11  Kenichi Handa  <handa@m17n.org>
361
362         * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
363         FT_LOAD_DEFAULT.
364
365 2004-08-06  Kenichi Handa  <handa@m17n.org>
366
367         * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
368         feature to apply.
369
370         * font-flt.c (run_otf): Print debugging information if necessary.
371
372 2004-08-05  Kenichi Handa  <handa@m17n.org>
373
374         * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff.  Support
375         positioning_type 5 and 6.  Switch simplified.
376
377 2004-08-04  Kenichi Handa  <handa@m17n.org>
378
379         * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
380
381 2004-08-02  Kenichi Handa  <handa@m17n.org>
382
383         * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
384         set val to 1 even if it is greater than 1.
385
386         * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
387
388 2004-07-29  Kenichi Handa  <handa@m17n.org>
389
390         * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
391         debugging information.
392
393         * internal.h (MDEBUG_PRINT5): New macro.
394
395         * draw.c (layout_glyphs): Don't combine a zero width glyph with
396         the previous one if the zero width glyph has left or right
397         padding.
398
399 2004-07-26  Kenichi Handa  <handa@m17n.org>
400
401         * m17n-X.c (xft_render): Pay attention to members left_padding and
402         right_padding of MGlyph.
403
404         * draw.c (visual_order): Allocate one more elements for arrays as
405         a workaround of fribidi bug.
406         (layout_glyphs): Fix previous change. Check MGlyph->combining_code
407         instead of MGlyph->bidi_sensitive.
408         (layout_glyph_string): Pay attentinon to
409         control->orientation_reversed when padding at the head or tail.
410         Fix adjustment of space glyph width.
411         (get_gstring): If cursor_width or cursor_bidi is changed, don't
412         use a cache.
413
414         * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
415         instead of MGlyph->bidi_sensitive.
416
417         * internal-gui.h (MGlyph): Delete member bidi_sensitive.
418
419 2004-07-26  Kenichi Handa  <handa@m17n.org>
420
421         * draw.c (visual_order): Don't treat combined glyphs specially.
422         (layout_glyphs): Don't get metrics glyphs that are already ready.
423         Pay attention to MGlyph->bidi_sensitive.  Combine a glyph of zero
424         width with the previous one. 
425         (draw_background): Fix bar cursor position on a r2l glyph.
426
427         * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
428         (run_rule): Fix place of updating cluster_begin_pos and
429         cluster_end_pos here.
430         (run_otf): Don't set left_padding.
431
432         * font-ft.c (adjust_anchor): Type of argument `code' changed.
433         Caller changed.
434         (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
435         Fix handling of GPOS.
436         (mfont__ft_drive_gpos): Delete this function.
437
438         * font.h (mfont__ft_drive_otf): Renamed back from
439         mfont__ft_drive_gsub.
440         (mfont__ft_drive_gpos): Delete extern.
441
442         * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
443         (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
444
445 2004-07-23  Kenichi Handa  <handa@m17n.org>
446
447         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
448         the same bidi level.
449
450         * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
451
452 2004-07-22  Kenichi Handa  <handa@m17n.org>
453
454         * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
455
456 2004-07-20  Kenichi Handa  <handa@m17n.org>
457
458         * draw.c (render_glyphs): Fix checking of g->code validity.
459
460         * face.c (mface__realize): Set g.type.
461
462 2004-07-18  Kenichi Handa  <handa@m17n.org>
463
464         * Makefile.am: Prepend ${top_srcdir} to all *.la in
465         *_LIBADD/*_LDADD.
466
467         * m17n-gui.c (mframe): Print error message give by dlopen to
468         stderr.
469
470 2004-07-16  Kenichi Handa  <handa@m17n.org>
471
472         * draw.c (compose_glyph_string): Improve the way of deciding a
473         script.  For a character that doesn't have script property, use
474         the last non-latin script.
475
476         * font-ft.c (fc_list): Cancel previous change.
477         (mfont__ft_init): Add more entries in ft_to_prop_name.
478
479 2004-07-15  Kenichi Handa  <handa@m17n.org>
480
481         * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
482         previous or next character glyphs.
483
484 2004-07-14  Kenichi Handa  <handa@m17n.org>
485
486         * draw.c (compose_glyph_string): Be sure to set codes for glyphs
487         of type GLYPH_SPACE.
488
489         * fontset.c (mfont__lookup_fontset): If glyph type is
490         GLYPH_SPACE, get codes for SPACE.
491
492         * internal-gui.h (Mfont): Delete extern.
493
494         * m17n-gui.h (Mfont): Delete duplicated extern.
495
496 2004-07-13  Kenichi Handa  <handa@m17n.org>
497
498         * font-ft.c (DEVICE_DELTA): New macro.
499         (adjust_anchor): New function.
500         (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf.  Drive
501         only GSUB.
502         (mfont__ft_drive_gpos): New function.
503
504         * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
505         (FontLayoutContext): Delete member `rfont'.
506         (run_otf): Set g->otf_cmd.  Call 
507         (mfont__flt_run): Don't set ctx.rfont.  Call mfont__ft_decode_otf
508         only whne HAVE_OTF is defined.
509
510         * fontset.c: Include "config.h".
511
512         * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
513         (MGlyph): New member otf_cmd.
514
515         * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
516         (mfont__ft_drive_gpos): Extern it.
517
518         * face.c: Include "config.h".
519
520         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
521
522         * input-gui.c: Include "config.h".
523
524         * plist.c: Include "config.h".
525
526 2004-07-06  Kenichi Handa  <handa@m17n.org>
527
528         * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
529         internal-gui.h: Cancel previous changes.
530
531         * m17n-gd.h: Delete it.
532
533         * Makefile.am (libm17n_core_la_LIBADD): New variable.
534         (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
535         @XML2_LD_FLAGS@ to above.
536         (libm17n_la_LIBADD): Add -ldl.
537         (libm17n_la_LDFLAGS): Add -export-dynamic.
538         (X_LD_FLAGS): Fix the order of linking.
539         (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
540         (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
541         (libm17n_X_la_LDFLAGS): Add -module.
542         (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
543         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
544         (libm17n_gd_la_LDFLAGS): Add -module.
545         (include_HEADERS): Delete m17n-gd.h.
546
547 2004-06-30  Kenichi Handa  <handa@m17n.org>
548
549         * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
550         (MDeviceLibraryInterface): Delete it.
551         (register_device_library): Delete it.
552         (m17n__device_library_list): Renamed from device_library_list.
553
554         * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
555         (m17n_init_win): Adjust prototype.
556
557         * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
558         (m17n_init_gd): New function. 
559
560         * m17n-gd.h: New file.
561
562         * m17n-X.h: Include <m17n-gui.h>.
563         (m17n_init_X): Extern it.
564         (M17N_INIT): Redefine it.
565
566         * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
567         (m17n_init_X): New function.
568
569         * internal-gui.h (m17n__device_library_list): Extern it.
570         (struct MDeviceDriver): New members initialized, init, and fini.
571
572         * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
573         @XFT2_LD_FLAGS@.
574         (libm17n_X_la_LIBADD): Delete aboves.
575         (libm17n_gd_la_SOURCES): Add m17n-gd.h.
576         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
577         (libm17n_gd_la_LDFLAGS): Delete it.
578         (include_HEADERS): Add m17n-gd.h.
579
580 2004-06-25  Kenichi Handa  <handa@m17n.org>
581
582         * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
583         (libm17n_gd_la_LDFLAGS): Cancel previous change.
584
585         * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
586
587         * font-ft.c (fc_list): If FcFontList finds no font, try
588         FcFontMatch.
589
590         * draw.c (compose_glyph_string): Terminate the last loop after
591         doing default combining if necessary.
592
593 2004-06-24  Kenichi Handa  <handa@m17n.org>
594
595         * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
596
597         * character.c (mchar_define_property): Add const to an arg.
598
599         * charset.c (mchar_define_charset): Add const to an arg.
600
601         * coding.c (MCodingSystem): Add const to an arg or decoder.
602         (finish_decoding): Add const to an arg.
603         (decode_coding_charset, decode_coding_utf_8)
604         (decode_coding_utf_16, decode_coding_utf_32)
605         (decode_coding_iso_2022, decode_coding_sjis)
606         (mconv_define_coding): Likewise.
607
608         * m17n-X.c (xft_find_metric): Delete unused variable.
609
610         * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
611         prototypes.
612
613         * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
614         prototypes.
615
616         * mtext.c (count_utf_8_chars, count_utf_16_chars)
617         (mtext__from_data, mtext_from_data): Add `const' to an arg.
618
619         * mtext.h (mtext__from_data): Ajust prototype.
620
621 2004-06-23  Kenichi Handa  <handa@m17n.org>
622
623         * draw.c (compose_glyph_string): Always get glyph codes by
624         mface__for_char.
625         (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
626         (mdraw_glyph_list): New function.
627
628         * font-flt.c (mfont__flt_run): Be sure to call
629         rfont->driver->encode_char.
630
631         * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
632         (ft_encode_char): Delete arg C.
633         (ft_render): Don't call FT_Get_Char_Index.
634
635         * font.c (mfont__encodable_p): Delete it.
636         (mfont__encode_char): Be sure to call rfont->driver->encode_char.
637
638         * font.h (struct MFontDriver): Delete arg C of encode_char.
639         (mfont__encodable_p): Delete extern.
640
641         * m17n-X.c (xfont_encode_char): Delete arg C.
642         (xft_find_metric): Don't cal FT_Get_Char_Index.
643         (xft_render): Likewise.
644
645         * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
646         logical_width.
647         (mdraw_glyph_list): Extern it.
648
649         * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
650
651 2004-06-22  Kenichi Handa  <handa@m17n.org>
652
653         * m17n-gui.h (mfontset_lookup): Extern it.
654
655         * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
656
657         * fontset.c (realize_fontset_elements)
658         (free_realized_fontset_elements, update_fontset_elements): New
659         functions.
660         (mfont__realize_fontset): Call realize_fontset_elements.
661         (mfont__free_realized_fontset): Call free_realized_fontset_elements.
662         (mfont__lookup_fontset): If a fontset was modified, update
663         the realized fontset.
664         (mfontset_modify_entry): Increment fontset->tick.
665         (mfontset_lookup): New function.
666
667 2004-06-21  Kenichi Handa  <handa@m17n.org>
668
669         * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
670
671         * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
672         (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
673         length of source text 0.
674
675 2004-06-21  Kenichi Handa  <handa@m17n.org>
676
677         * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
678         (compare): Pay attention to format other than utf-8.
679         (copy): Delete this function.
680         (count_by_utf_8, count_by_utf_16, insert): New functions.
681         (count_utf_16_chars): Fix handling of a surrogate pair.
682         (find_char_forward, find_char_backward): Likewise.
683         (mtext__from_data): Delete unnecessary check.  Fix number of
684         allocated bytes.
685         (mtext_from_data): Don't count items.
686         (mtext_ref_char): Optimize the code.
687         (mtext_set_char): Pay attention to format other than utf-8.
688         (mtext_cat_char): Likewise.
689         (mtext_dup): Don't call copy, instead do allocation here.
690         (mtext_cat): Call insert instead of copy.
691         (mtext_ncat): Likewise.
692         (mtext_cpy): Delete character at first and call insert instead of
693         copy.
694         (mtext_ncpy): Likewise.
695         (mtext_copy): Likewise.
696         (mtext_duplicate): Call insert instead of copy.
697         (mtext_del): Pay attention to format other than utf-8.
698         (mtext_ins): Simply call insert.
699         (mtext_ins_char): Pay attention to format other than utf-8.
700         (mtext_tok): Call insert instead of copy.
701         (mtext_text): Call UNIT_BYTES.
702
703         * textprop.c (mtext__adjust_plist_for_change): New function.
704
705         * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
706         (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
707         (CHAR_UNITS_AT): Fix typo.
708         (CHAR_UNITS_BY_HEAD): Fix typo.
709         (STRING_CHAR_AND_UNITS): Fix typo.
710
711         * internal.h (MTEXT_READ_ONLY_P): New macro. 
712
713         * mtext.h (mtext__replace): Delete the extern.
714         (mtext__adjust_foramt): Adjust prototype.
715
716         * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
717         if possible.  Otherwise make a copy of mmt.
718
719         * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
720         utf-8.
721
722 2004-06-18  Kenichi Handa  <handa@m17n.org>
723
724         * character.h (CHAR_STRING_UTF16): Fix syntax.
725
726 2004-06-16  Kenichi Handa  <handa@m17n.org>
727
728         * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
729         (libm17n_X_la_LIBADD): Delete it.
730         (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
731
732         * m17n-X.c (device_open): Add parens in `if' condition.
733
734         * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
735         (DEC_POSITION): Likewise.
736         (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
737
738 2004-06-15  Kenichi Handa  <handa@m17n.org>
739
740         * fontset.c (mfont__lookup_fontset): Fix selection of font groups
741         by language.
742
743         * draw.c (compose_glyph_string): If langauge is specified, call
744         mface__for_chars even if a text is all latin.  Fix condition for
745         setting non_ascii_found.
746
747         * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
748
749         * m17n.h (minput_char_to_key): Delete extern.
750
751         * m17n-gui.h (minput_event_to_key): Cancel previous change.
752
753         * m17n-gui.c (null_device_open): Set several members of frame.
754
755 2004-06-14  Kenichi Handa  <handa@m17n.org>
756
757         * m17n-gui.h (minput_event_to_key): Delete extern.
758
759         * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
760
761         * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
762
763         * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
764
765 2004-06-08  Kenichi Handa  <handa@m17n.org>
766
767         * character.c (mchar_put_prop): Don't increment the ref-count of
768         record->table.
769
770 2004-06-04  Kenichi Handa  <handa@m17n.org>
771
772         * m17n-core.c (mdebug__register_object): New function.
773         (mdebug__unregister_object): Likewise.
774
775         * internal.h (mdebug__register_object, mdebug__unregister_object):
776         Extern them.
777         (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
778         respectively.
779
780         * charset.c (mcharset__load_from_database): Don't call
781         mconv__register_charset_coding here.
782
783         * coding.c (find_coding): Get a real name from an element of
784         coding_definition_list.
785         (mconv__register_charset_coding): Set the real name at the top of
786         param.
787         (mcoding__load_from_database): Likewise.
788         (mconv_list_codings): Adjusted for the above change.
789
790 2004-06-03  Kenichi Handa  <handa@m17n.org>
791
792         * coding.c (find_coding): Find by canonicalized name.  Don't have
793         to modify the element of coding_definition_list by
794         mplist__from_plist.
795         (mconv__define_coding_from_charset): Delete it.
796         (mconv__register_charset_coding): Canonicalize sym.
797         (mcoding__load_from_database): Register plist modified by
798         mplist__from_plist.
799
800         * coding.h (mconv__define_coding_from_charset): Don't extern it.
801
802         * font-ft.c (ft_open): Fix setting of rfont->descent.
803
804 2004-06-02  Kenichi Handa  <handa@m17n.org>
805
806         * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
807         (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
808         (xlfd_unparse_name): Renamed from xfont_build_name.
809         (mfont__init): Initialized Mfontconfig.
810         (mfont__free_realized): Unconditionally unref rfont->info.
811         (mfont__select): Free `this' if it's not best.
812         (mfont__open): Don't check frame->realized_font_list.
813         (mfont__parse_name_into_font): New function.
814         (Mfontconfig): New variable.
815         (mfont_from_name): Call mfont_parse_name.
816         (mfont_name): Call mfont_unparse_name.
817         (mdebug_dump_font): Likewise.
818
819         * font.h (struct MFontDriver): Delete members parse_name and
820         build_name.
821         (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
822         (mfont__parse_name_into_font): Extern it.
823
824         * font-ft.c: Include "symbol.h".
825         (close_ft): Unconditionally free filename and charmap_list of
826         ft_into.
827         (ft_open): Duplicate base->filename.  Increment ref-count of
828         ft_info->charmap_list.  Free ft_info->charmap_list and
829         ft_info->filename on error.
830         (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
831
832         * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
833         xfont_build_name.
834         (enum xlfd_field_idx): Moved to font.c.
835         (split_font_name, build_font_name): Likewise.
836         (build_font_list): Call mfont__parse_name_info_font.
837         (xfont_open): Call mfont__unparse_name.  Free name.
838         (xfont_parse_name, xfont_build_name): Moved to font.c
839         (xft_select): Prototype deleted.
840         (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
841         Call mfont_pase_name.
842
843         * m17n-gui.c (free_frame): Unref frame->font_driver_list.
844         (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
845         (mframe): Likewise.
846
847         * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
848         Extern them.
849
850         * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
851
852 2004-06-01  Kenichi Handa  <handa@m17n.org>
853
854         * fontset.c (mfontset_modify_entry): Pay attention to the case
855         that fontset->font_spec_list is NULL.
856
857 2004-05-31  Kenichi Handa  <handa@m17n.org>
858
859         * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
860
861         * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
862
863         * font.c (mfont__select): Print score the a font for debugging.
864
865         * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
866
867         * coding.c (reset_coding_sjis): Check kanji and kana instead of
868         kanji_sym and kana_sym.
869
870 2004-05-28  Kenichi Handa  <handa@m17n.org>
871
872         * Makefile.am (VINFO): New variable.
873         (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
874         (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
875
876 2004-05-27  Kenichi Handa  <handa@m17n.org>
877
878         The following chanages are to make device dependent functions
879         accessible only from MDeviceDriver structure, and to add GD and
880         null device drivers.  Font drivers get also device dependent.
881
882         * m17n.c (m17n_init): Increament shell_initialized.
883         (m17n_fini): Decremented shell_initialized.
884
885         * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
886
887         * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
888         (Mwidget, Mcolormap, Mx): Extern them.
889
890         * m17n-gui.c: Include <dlfcn.h> and "config.h".
891         (free_frame): Call frame->driver->close instead of
892         mwin__close_device.
893         (DLOPEN_SHLIB_EXT): New macro.
894         (MDeviceLibraryInterface): New type.
895         (device_library_list): New variable.
896         (register_device_library): New function.
897         (null_device): New variable.
898         (null_device_close, null_device_get_prop)
899         (null_device_realize_face, null_device_free_realized_face): New
900         function.
901         (null_driver): New variable.
902         (null_device_init, null_device_fini, null_device_open): New
903         functions.
904         (null_interface): New variable.
905         (Mfreetype, Mdevice): Declare them.
906         (m17n_init_win): Increment win_initialized.  Initialize Mx, Mgd,
907         Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
908         Mwin__Close_Device.  Register drivers for Mx and Mgd.
909         (m17n_fini_win): Decremented win_initialized.  Call "fini"
910         function of all opened devices.  Don't call mwin__fini.
911         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
912         Declare them here.
913         (mframe): Handle Mdevice key of PLIST.
914         (mframe_get_prop): Call frame->device->get_prop instead of
915         mwin__device_get_prop.
916
917         * m17n-gd.c: New file.
918
919         * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
920         (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
921
922         * m17n-core.c (m17n_init_core): Increate core_initialized.
923         (m17n_fini_core): Decremented core_initialized.
924
925         * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
926         (Mcolormap): Don't extern them here.
927
928         * m17n-X.c (FRAME_DEVICE): New macro.
929         (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
930         (free_display_info): Use MPLIST_DO.
931         (free_device): Free rface->info.
932         (xft_close): Delete it.
933         (device_init): Renamed from mwin__init.
934         (device_fini): Renamed from mwin__fini.
935         (device_open): Renamed from mwin__open_device.
936         (x_driver): New variable.
937         (MXFontInfo): Delete member frame, add member display.
938         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
939         Don't declare them here.
940
941         * internal-gui.h (MDeviceType): New enum.
942         (MWDefice): Delete it.
943         (struct MFrame): Change type of device to void *.  New members
944         device_type, driver, font_driver_list.
945         (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
946         (MDeviceDriver): New type.
947         (Mx, Mgd, Mfreetype): Extern them.
948         (mwin__XXX): Delete all of them.
949
950         * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
951         mwin__XXX.
952         (win_destroy_ic): Likewise.
953         (adjust_window_and_draw): Likewise.
954         (win_callback): Likewise.
955         (Mxim): Declare it here.
956         (minput_event_to_key): Call M_CHECK_READABLE.
957
958         * fontset.c (mfont__lookup_fontset): Delete local variable
959         font_group.
960
961         * font.h (struct MFontDriver): Delete member close, add members
962         parse_name and build_name.
963         (mfont__driver_list): Delete extern.
964         (mfont__close): Delete extern.
965
966         * font.c (mfont__init): Don't set mfont__driver_list.
967         (mfont__fini): Don't unref mfont__driver_list.
968         (mfont__select): Try font drivers in frame->font_driver_list.  Set
969         driver member of a realized font.
970         (mfont__close): Delete it.
971         (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
972         functions of the default frame.
973
974         * font-ft.c (close_ft): Check ft_info->ft_face and work
975         differently.
976         (add_font_info): Allocate ft_info by M17N_OBJECT.
977         (ft_close): Delete it.
978         (mfont__ft_driver): Don't set ft_close.
979         (ft_select): Increment ref-count of best_font.
980         (ft_open): Decremented ref-count of base.  On error, call
981         FT_Done_Face and free ft_info.
982         (ft_find_metric): Always use XXX_MONO in load_flags.
983         (ft_render): Fix setting of width.  Call
984         frame->driver->draw_points instead of mwin__draw_points.
985         (ft_to_prop): Don't set mfont__driver_list.
986         (mfont__ft_fini): Just unref ft_info.
987
988         * face.c (mface__init): Exchange foreground and background of
989         mface__default.  Call mface_put_prop to set hline of
990         mface_underline,
991         (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
992         (mface__free_realized): Don't call mwin__free_realized_face.
993
994         * draw.c (Mdepth): Don't declare it here.
995         (draw_background): Call frame->driver->XXX instead of mwin__XXX.
996         (render_glyphs, render_glyph_string): Likewise.
997         (mdraw__init): Don't set Mdepth.
998         (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
999         M_CHECK_WRITABLE.
1000         (mdraw_text_per_char_extents): Return 0 on success and -1 on
1001         error.
1002         (mdraw_text_items): Check FRAME is writable.
1003         (mdraw_per_char_extents): Implement body.
1004
1005         * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
1006         libm17n-gd.la.
1007         (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
1008         (GUI_SOURCES): Delete it.
1009         (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
1010         (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
1011         (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
1012         (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
1013         (linkgui_LDADD): Set to libm17n-gui.la
1014         (linkgui_LDFLAGS): New target.
1015         (SRC): Include ${libm17n_gui_la_SOURCES} and
1016         ${libm17n_gd_la_SOURCES}.
1017
1018 2004-05-24  Kenichi Handa  <handa@m17n.org>
1019
1020         * draw.c (draw_background): Don't draw background even if
1021         rface->face.property[MFACE_BACKGROUND] is not Mnil.
1022
1023 2004-05-22  Kenichi Handa  <handa@m17n.org>
1024
1025         * m17n-X.c (xft_open_font): Fix anti_alias setting.
1026
1027 2004-05-20  Kenichi Handa  <handa@m17n.org>
1028
1029         * m17n-gui.h (MFaceHookFunc): Change this function type to void.
1030
1031         * m17n-gui.c: Include "plist.h".
1032         (mframe): If PLIST is NULL, initialize it to emply plist.
1033
1034         * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
1035         (xft_driver): New variable.
1036         (xft_select, close_xft, xft_open_font, xft_open, xft_close)
1037         (xft_find_metric, xft_render): New function.
1038         (mwin__init): Adjusted for the new mfont__driver_list.
1039         (mwin__open_device): Assume arg PARAM is not NULL.  Push a newly
1040         generated face to PARAM.
1041         (mwin__realize_face): Fix setting of box colors.  Don't call hook
1042         function here.
1043         (mwin__draw_hline): New function.
1044         (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
1045         (mwin__xft_render): Delete these function.
1046
1047         * internal-gui.h (struct MFrame): New member tick.
1048         (struct MGlyphString): New member tick.
1049         (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
1050         (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
1051         (mwin__xft_render): Delete extern.
1052
1053         * fontset.c (mfont__lookup_fontset): Make the code simpler.
1054         (mfontset): Always increment the reference count of returned
1055         object.
1056
1057         * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
1058         (MFTInfo): Moved to font.h.
1059         (ft_iso8859_1_font_list): Delete this variable.
1060         (set_font_info): Don't set font->property[MFONT_TYPE].
1061         (set_font_info): Don't udpate ft_iso8859_1_font_list.
1062         (add_font_info): Change type to void.
1063         (fc_list): Change anme from xft_list.  Caller changed.  Include
1064         FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1065         (mfont__ft_driver): Change name from ft_driver.  Caller changed.
1066         (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1067         (close_ft): Don't call mwin__xft_close.  Unref
1068         ft_info->extra_info.
1069         (ft_open): Don't setup ft_info->fontname.  Don't call
1070         mwin__xft_open.
1071         (ft_find_metric): Don't call mwin__xft_get_metric.
1072         (ft_encode_char): Call rfont->driver->open instead of ft_open.
1073         (ft_render): Don't check HAVE_XFT2.  Don't call mwin__xft_render.
1074         (mfont__ft_init): Adjusted for new mfont__driver_list.
1075         (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1076
1077         * font.c (mfont__driver_list): Make it MPlist.
1078         (mfont__init): Adjust initialization of mfont__driver_list.
1079         (mfont__fini): Free mfont__driver_list.
1080         (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1081         (mfont__select): Adjusted for the new mfont__driver_list.
1082
1083         * font.h (enum MFontProperty): Delete MFONT_TYPE.
1084         (mfont__drirver_list): Adjust prototype.
1085         (MFTInfo): Move to here from fron.c.  Deleve member fontname.
1086
1087         * face.h (struct MFace): Delete member realized_face_list, add
1088         member frame_list.
1089         (struct MRealizedFace): Delete member need_update
1090         andnofont_rface, add member non_ascii_list.
1091         (mface__update_frame_face): Extern it.
1092
1093         * face.c (hline_prop_list, box_prop_list, noop_hook): New
1094         variables.
1095         (get_hline_create, get_box_create): New functions.
1096         (find_realized_face): Cancel previous change.  Arg RFONT deleted.
1097         Use memcmp.
1098         (free_face): Cancep previous change.  Free face->frame_list.
1099         (serialize_hline): Do nothing if hline->width is zero.
1100         (serialize_box): Do nothing if box->width is zero.
1101         (mface__init): Setup all properties of mface__default.
1102         (mface__fini): Free hline_prop_list and box_prop_list.
1103         (mface__realize): Cancel previous change.  Update
1104         face->frame_list.  Setup rface->non_ascii_list.
1105         (mface__for_chars): Update rface->non_ascii_list.
1106         (mface__free_realized): Free rface->non_ascii_list.
1107         (mface__update_frame_face): New function.
1108         (mface): Initialize face->frame_list.
1109         (mface_copy): Likewise.  Just copy MFACE_HLINE and MFACE_BOX
1110         properties.
1111         (mface_merge): Likewise.
1112         (mface_put_prop): If key is Mhline or Mbox, get value by
1113         get_hline_create or get_box_create respectively.
1114         (mface_put_prop): Update frame->tick and call
1115         mface__update_frame_face if necessary.
1116         (mface_update): Do nothing if func is noop_hook.
1117
1118         * draw.c (render_glyphs): If a font is not found, use
1119         mwin__draw_empty_boxes.
1120         (alloc_gstring): Initialize gstring->tick.
1121         (get_gstring): Check gstring->tick.
1122
1123 2004-05-17  Kenichi Handa  <handa@m17n.org>
1124
1125         * face.c (find_realized_face): Return value changed.  If RFONT is
1126         NULL, avoid unnecessary checking.
1127         (free_face): Free face->realized_face_list.
1128         (mface__realize): Adjusted for the change of find_realized_face.
1129         If it returns a realized face that needs update, free it and
1130         realize a new one.  Push a new realized face to
1131         frame->realized_face_list instead of appending.
1132         (mface__for_chars): Adjusted for the change of find_realized_face.
1133         Short cut if the required font is in rface->ascii_rface.
1134         (mface_put_prop): Free old value if necessary.  Set need_update
1135         member of realized faces to 1.
1136
1137         * face.h (struct MFace): Delete member tick, add member
1138         realized_face_list.
1139         (struct MRealizedFace): Delete member tick, add member
1140         need_update.
1141
1142 2004-05-13  Kenichi Handa  <handa@m17n.org>
1143
1144         * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1145
1146 2004-05-12  Kenichi Handa  <handa@m17n.org>
1147
1148         * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1149
1150         * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1151         parse it XftNameParse.
1152
1153         * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1154         (all_fonts_scaned): New variable.
1155         (set_font_info): FAMILY may be Mnil.
1156         (add_font_info): Argument changed.
1157         (xft_list): Call add_font_info in it.
1158         (ft_list): Likewise.
1159         (ft_select): Make it work in the case family is Mnil.
1160         (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1161         (mfont__ft_fini): Set all_fonts_scaned to 0.
1162
1163         * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1164         that is failed to open.
1165
1166 2004-05-10  Kenichi Handa  <handa@m17n.org>
1167
1168         * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1169         device's depth is 1 (i.e. monochrome).
1170
1171         * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1172         to work around the problem of libtool.
1173
1174         * font-ft.c: Include <freetype/ftbdf.h>.
1175         (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1176         variables.
1177         (mfont__ft_init): Initialize them.
1178         (ft_iso8859_1_font_list): New variable.
1179         (set_font_info): Detect a font containing iso8859-1 glyphs and
1180         register it in ft_iso8859_1_font_list.  If the font is not
1181         scalable, assume it as BDF or PCF font and setup SIZE and RESY
1182         properties of the font from its properties.
1183         (add_font_list): If the font is not scalable, check if it is BDF
1184         or PCF font.  If not, ignore it.
1185         (ft_select): If FAMILY is Mnil, return NULL only if the requested
1186         registry is not iso8859-1.
1187         (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1188         ft_iso8859_1_font_list.
1189         (ft_find_metric): If the font is not scalable, assume it as BDF
1190         or PCF, and get a metric from its properties.
1191         (mfont__ft_fini): Free ft_iso8859_1_font_list.
1192
1193 2004-05-07  Kenichi Handa  <handa@redhat.m17n.org>
1194
1195         * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1196         (libm17n_la_LDFLAGS): Delete it.
1197         (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1198         (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1199
1200 2004-05-06  Kenichi Handa  <handa@m17n.org>
1201
1202         * draw.c (compose_glyph_string): Fix previous change.
1203
1204 2004-04-30  Kenichi Handa  <handa@m17n.org>
1205
1206         * font-ft.c (ft_list): Delete unused variable `result'.
1207         (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1208
1209 2004-04-27  Kenichi Handa  <handa@m17n.org>
1210
1211         * m17n-X.c: Include config.h
1212         [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1213         (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1214         (MWDevice) [HAVE_XFT2]: New member xft_draw.
1215         (FRAME_CMAP, FRAME_VISUAL): New macros.
1216         (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1217         (xfont_driver): Make it static.
1218         (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1219         (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1220         info->xft_color_back.
1221         (MXftFontInfo) [HAVE_XFT2]: New type.
1222         (mwin__xft_close) [HAVE_XFT2]: New function.
1223         (mwin__xft_open) [HAVE_XFT2]: New function.
1224         (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1225         (mwin__xft_render) [HAVE_XFT2]: New function.
1226
1227         * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1228         (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1229         (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1230         externs.
1231
1232         * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1233
1234         * font-ft.c: Don't include FT_FREETYPE_H here.
1235         [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1236         (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1237         (MFTInfo): New member charmap_index.
1238         (MFTInfo) [HAVE_XFT2]: New member xft_info.
1239         (check_otf_filename): Renamed from check_filename.  Return value
1240         changed.
1241         (ft_set_property): This function deleted.
1242         (set_font_info): New function.
1243         (add_font_list): Argument changed.  Add multiple fonts.
1244         (xft_list) [HAVE_XFT2]: New function.
1245         (ft_list) [not HAVE_XFT2]: New function.
1246         (ft_select): Add code for Xft.
1247         (close_ft): Likewise.
1248         (ft_open): Likewise.
1249         (ft_find_metric): Likewise.
1250         (ft_encode_char): Likewise.
1251         (ft_render): Likewise.
1252
1253         * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1254
1255 2004-04-26  Kenichi Handa  <handa@m17n.org>
1256
1257         * textprop.c (mtext_attach_property): Declare the return type as
1258         `int'.
1259
1260 2004-04-21  Kenichi Handa  <handa@m17n.org>
1261
1262         * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1263
1264 2004-04-09  Kenichi Handa  <handa@m17n.org>
1265
1266         * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1267         seq_to.
1268         (load_command): Setup above members.
1269
1270 2004-04-05  Kenichi Handa  <handa@m17n.org>
1271
1272         * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1273
1274 2004-03-30  Kenichi Handa  <handa@m17n.org>
1275
1276         * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1277         >= 0x10000.
1278
1279         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1280         (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1281
1282 2004-03-29  Kenichi Handa  <handa@m17n.org>
1283
1284         * Version 1.0 Patch Level 2 released.
1285
1286 2004-03-29  Kenichi Handa  <handa@m17n.org>
1287
1288         * charset.c (make_charset): Set charset->fully_loaded and
1289         charset->simple correctly.  Don't try to get charset->min_char and
1290         charset->max_char for a charset of method subset and superset.
1291         Don't load a mapping file here.
1292         (mcharset__init): Set unified_max.
1293         (mcharset__load_from_database): Free a working plist.
1294
1295         * coding.c (mcoding__fini): Free all malloced data.
1296
1297         * input-gui.c (win_create_ic): Set control.as_image for preediting
1298         to 0.
1299
1300         * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1301         `count') to initialize the array.
1302
1303         * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1304         M17N_OBJECT_UNREF.
1305
1306         * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1307         rectangle.
1308         (mwin__create_window): Fix bug of setting a background pixel of a
1309         new window.
1310         (mwin__adjust_window): Clear the window before drawing.
1311
1312         * m17n-core.c (mdebug__report_object): Free array->objectes if
1313         necessary.
1314         (m17n_init_core): Don't set report_header_printed to 0 here.
1315         Fix debugging information.
1316         (m17n_fini_core): Set report_header_printed to 0 here.
1317
1318         * m17n-core.h (mplist_deserialize): Extern it.
1319
1320         * m17n-gui.c (m17n_fini_win): Fix debugging information.
1321
1322         * m17n.c (m17n_fini): Fix debugging information.
1323
1324         * mtext.c (mtext__adjust_foramt): New function.
1325
1326         * mtext.h (mtext__adjust_foramt): Extern it.
1327
1328         * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1329
1330         * plist.h (mplist__deserialize): Don't extern it.
1331
1332         * symbol.c (msymbol__fini): Set freed_symbols to 0.  Set all
1333         elements of symbol_table to NULL.  Report about created and freed
1334         symbols if MDEBUG_FINI is set.
1335
1336 2004-03-22  Kenichi Handa  <handa@m17n.org>
1337
1338         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1339
1340         * m17n.c (m17n_init): Fix the way of checking merror_code.
1341
1342         * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1343
1344 2004-03-22  Kenichi Handa  <handa@m17n.org>
1345
1346         * fontset.c (realize_font_group): Adjust the font size by
1347         mfont__resize before selecting a font.
1348
1349         * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1350
1351 2004-03-19  Kenichi Handa  <handa@m17n.org>
1352
1353         * Version 1.0 Patch Level 1 released.
1354
1355 2004-03-19  Kenichi Handa  <handa@m17n.org>
1356
1357         * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1358
1359         * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1360
1361 2004-03-19  Kenichi Handa  <handa@m17n.org>
1362
1363         Re-apply the changes forgotten in the released version.
1364
1365         * charset.c (mcharset__load_from_database): Call
1366         mchar_define_charset.
1367
1368         * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1369         (mconv_encode_range): Put Mcoding text property.
1370
1371 2004-03-18  Kenichi Handa  <handa@m17n.org>
1372
1373         * draw.c (Mdepth): New variable.
1374         (visual_order): Delete unused local var `pos'.
1375         (compose_glyph_string): Fix for the case that gstring->glyphs is
1376         realloced.  Stop generating glyphs at TO.  Fix handling of
1377         control charaters.
1378         (layout_glyphs): Get metrics of all glyphs in advance.  Set
1379         lbearing and rbearing of base of composition glyph correctly.
1380         Handle left-overhang glyphs correctly.
1381         (alloc_gstring): New arg frame.  Set gstring->anti_alias.  Caller
1382         changed.
1383         (dump_combining_code): Change the defualt off_x character to ".".
1384         (mdraw__init): Initialize Mdepth.
1385
1386         * face.c (work_gstring): New variable
1387         (mface__init): Initialize work_gstring.
1388         (mface__fini): Free work_gstring.glyphs.
1389         (mface__realize): Don't handle videomode property here.  Adjusted
1390         for the change of mfont__get_metric.
1391         (mface__for_chars): Adjusted for the change of mfont__get_metric.
1392
1393         * face.h (enum face_gc): Moved to m17n-X.c.
1394
1395         * font.h (struct MFontDriver): Arguments of find_metric changed.
1396         (mfont__select): Prototype adjusted.
1397         (mfont__get_metric): Likewise.
1398         (mfont__ft_drive_otf): Likewise.
1399         (mfont__flt_run): Likewise.
1400         
1401         * font.c (mfont__select): New argument layouter.  If layouter is
1402         different in the registered font, make a new copy of realized
1403         font.
1404         (mfont__get_metric): Argument changed.  Get metrics of multiple
1405         glyphs.
1406         (mfont_find): Call mfont__select with layouter as Mnil.
1407
1408         * font-flt.c (FontLayoutContext): New member rfont.
1409         (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1410         (mfont__flt_run): Argument changed.  Initialize ctx.rfont.
1411
1412         * font-ft.c (ft_find_metric): Arguments changed.  Get metrics of
1413         multiple glyphs.
1414         (NUM_POINTS): New macro.
1415         (MPointTable): New type.
1416         (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1417         (mfont__ft_drive_otf): New argument rfont.
1418
1419         * fontset.c (realize_font_group): Adjusted for the changed of
1420         mfont__select.
1421         (check_fontset_element): This function deleted.
1422
1423         * input-gui.c (adjust_window_and_draw): Locate a preedit window
1424         off the parent window if the preedit text is zero length.
1425
1426         * internal-gui.h (struct MFrame): New members foreground,
1427         background, videomode, font.
1428         (struct MGlyphString): New member anti_alias.
1429         (MDrawPoint): New type.
1430         (mwin__draw_bitmap): Prototype deleted.
1431         (mwin__draw_points): Prototype added.
1432
1433         * m17n-gui.h (MDrawControl): New member anti_alias.
1434
1435         * m17n-gui.c (free_frame): Free frame->font.
1436         (mframe): Set the fontset of frame->face to the default fontset.
1437
1438         * m17n-X.c (RGB_GC): New type.
1439         (enum gc_index): Renamed from enum face_gc.  Member names changed.
1440         (GCInfo): New typel
1441         (struct MWDevice): Members foreground and background deleted.  New
1442         member scratch_gc, gc_list.
1443         (DEFAULT_FONT, FALLBACK_FONT): New macros.
1444         (free_device): Free GCs in device->gc_list.
1445         (get_rgb_gc): New function.
1446         (get_gc): Renamed and argument changed from get_color.
1447         (get_gc_for_anti_alias): New function.
1448         (xfont_find_metric): Arguments changed.  Get metrics of multiple
1449         glyphs.
1450         (set_region): Argument changed.  Caller changed.
1451         (xfont_render): Allways set a font in gc.
1452         (x_error_handler, x_io_error_handler): Define only if
1453         X_SET_ERROR_HANDLER is defined.
1454         (mwin__open_device): Create device->scratch_gc.  Set members
1455         foreground, background, and videomode of frame.  Call
1456         XSetErrorHandler and XSetIOErrorHandler only if
1457         X_SET_ERROR_HANDLER is defined.
1458         (struct gc_list): Deleted.
1459         (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1460         (mwin__realize_face): Adjusted for the change of the format of
1461         rface->info and the charge of set_region.
1462         (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1463         (mwin__draw_box): Likewise.
1464         (mwin__draw_bitmap): This function deleted.
1465         (mwin__draw_points): New function.
1466         (mwin__verify_region): Adjusted for the change of the format of
1467         rface->info and the charge of set_region.
1468         (mwin__create_window): Inherit backgound pixel from parent.
1469         (mwin__dump_gc): Adjusted for the change of the format of
1470         rface->info.
1471
1472 2004-03-16  Kenichi Handa  <handa@m17n.org>
1473
1474         * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1475
1476         * input.c (M_key_alias): New variable.
1477         (handle_key): Try M_key_alias property of a key too.
1478         (minput__init): Initialize M_key_alias.  Give that property to
1479         symbols in one_char_symbol.  Fix bug of initializing
1480         one_char_symbol.
1481
1482         * draw.c (compose_glyph_string): Don't handle
1483         ignore_formatting_char here.  Include formatting characters in the
1484         range processed by a FTL.
1485         (layout_glyph_string): Handle ignore_formatting_char here.
1486
1487 2004-03-12  Kenichi Handa  <handa@m17n.org>
1488
1489         * input-gui.c (win_create_ic): Enable bidi in status control.
1490
1491         * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1492
1493 2004-03-09  Kenichi Handa  <handa@m17n.org>
1494
1495         * input.c (load_input_method): If title is not specified, use the
1496         input method name as title.
1497
1498         * m17n-X.c (get_color): Make it static.
1499         (xim_create_ic, xim_destroy_ic, x_error_handler)
1500         (x_io_error_handler): Likewise.
1501
1502 2004-03-01  Kenichi Handa  <handa@m17n.org>
1503
1504         * Version 1.0 released.
1505
1506 \f
1507 Copyright (C) 2003, 2004
1508   National Institute of Advanced Industrial Science and Technology (AIST)
1509   Registration Number H15PRO112
1510
1511 This file is part of the m17n library.
1512
1513 The m17n library is free software; you can redistribute it and/or
1514 modify it under the terms of the GNU Lesser General Public License
1515 as published by the Free Software Foundation; either version 2.1 of
1516 the License, or (at your option) any later version.
1517
1518 The m17n library is distributed in the hope that it will be useful,
1519 but WITHOUT ANY WARRANTY; without even the implied warranty of
1520 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1521 Lesser General Public License for more details.
1522
1523 You should have received a copy of the GNU Lesser General Public
1524 License along with the m17n library; if not, write to the Free
1525 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1526 02111-1307, USA.