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