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