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