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