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