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