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