9f7663675451cc92aa47e5cb81f20a60aa4b4941
[m17n/m17n-lib.git] / src / ChangeLog
1 2008-09-19  Kenichi Handa  <handa@m17n.org>
2
3         * input.c (fully_initialize): Rename "@reload" to "-reload".
4
5 2008-09-17  Kenichi Handa  <handa@m17n.org>
6
7         * m17n-flt.c (run_stages): Fix combining with a variable width
8         font.
9
10 2008-08-04  Kenichi Handa  <handa@m17n.org>
11
12         * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
13         vs. C-A-1).
14
15 2008-07-22  Kenichi Handa  <handa@m17n.org>
16
17         * input.c (fully_initialize): Fix previous change.
18
19 2008-07-19  Kenichi Handa  <handa@m17n.org>
20
21         * input.c (fully_initialize): Fix previous change.
22
23 2008-07-14  Kenichi Handa  <handa@m17n.org>
24
25         * font-ft.c (ft_list_family): New arg CHECK_ALIAS.  Callers changed.
26
27 2008-07-14  Kenichi Handa  <handa@m17n.org>
28
29         * input.c (fully_initialize): Handle C-M-1, etc.
30
31 2008-07-11  Kenichi Handa  <handa@m17n.org>
32
33         * input.c (minput_open_im): Check if the arg NAME is not Mnil.
34
35 2008-06-23  Kenichi Handa  <handa@m17n.org>
36
37         * Version 1.5.2 released.
38
39 2008-06-23  Kenichi Handa  <handa@m17n.org>
40
41         * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
42         (M17NLIB_PATCH_LEVEL): Changed to 2.
43         (M17NLIB_VERSION_NAME): Changed "1.5.2".
44
45 2008-06-13  Kenichi Handa  <handa@m17n.org>
46
47         * input.c (minput_config_file): Comment fixed for man-page.
48
49 2008-06-13  Harshula  <harshula@gmail.com>  (tiny change)
50
51         * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
52
53 2008-05-24  Kenichi Handa  <handa@m17n.org>
54
55         * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
56
57 2008-05-23  Kenichi Handa  <handa@m17n.org>
58
59         * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
60         (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
61         libm17n-flt.la.
62         (libm17n_gd_la_LIBADD): Likewise.
63
64         * input.c (take_action_list): Fix debug info.
65
66 2008-05-14  Kenichi Handa  <handa@m17n.org>
67
68         * m17n-flt.c (run_rule): Check SRC_REGEX at first.
69         (run_stages): Fix index of g_indices.
70
71 2008-04-03  Kenichi Handa  <handa@m17n.org>
72
73         * draw.c (compose_glyph_string): Don't run flt striding over the
74         cursor position.
75         (get_gstring): Don't use the cached gstring if cursor position is
76         changed.
77
78 2008-04-02  Kenichi Handa  <handa@m17n.org>
79
80         * input.c (integer_value): Delete the 3rd arg VALUE.
81         (resolve_expression): Adjust the call of integer_value.
82         (take_action_list): Likewise.
83
84 2008-03-06  Kenichi Handa  <handa@m17n.org>
85
86         * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
87         features.
88
89 2008-01-31  Kenichi Handa  <handa@ni.aist.go.jp>
90
91         * Version 1.5.1 released.
92
93 2008-01-31  Kenichi Handa  <handa@ni.aist.go.jp>
94
95         * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
96         HAVE_FREETYPE is defined.
97
98         * font.h (OTF_Tag): Be sure that it is defined in any cases.
99
100 2008-01-30  Kenichi Handa  <handa@ni.aist.go.jp>
101
102         * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
103         unconditionally.
104
105 2008-01-25  Kenichi Handa  <handa@ni.aist.go.jp>
106
107         * input.c (parse_action_list): Handle the case "(insert INTEGER)".
108
109 2008-01-25  Kenichi Handa  <handa@ni.aist.go.jp>
110
111         * input.c (parse_action_list): Check M_candidates.
112         (get_im_info): If key is Mnil, be sure to set im_info->states to a
113         plist.
114
115 2008-01-23  Kenichi Handa  <handa@ni.aist.go.jp>
116
117         * input.c (integer_value): Fix interpretation of "@-N".
118
119 2008-01-17  Kenichi Handa  <handa@ni.aist.go.jp>
120
121         * input.c (get_following_char): Fix interpretation of POS.
122         (get_following_char): Fix interpretation of "@+N".
123
124 2008-01-15  Kenichi Handa  <handa@ni.aist.go.jp>
125
126         * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
127         is not defined.
128
129         * Makefile.am (FLT_SOURCES): Include internal-flt.h.
130
131 2008-01-07  Kenichi Handa  <handa@ni.aist.go.jp>
132
133         * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
134         now.
135         (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
136         (run_command): Check if clustering now before calling
137         UPDATE_CLUSTER_RANGE.
138
139 2008-01-06  Kenichi Handa  <handa@m17n.org>
140
141         * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
142
143         * font-ft.c (ft_drive_otf): Fix checking of negative feature.
144
145         * m17n-X.c (xft_find_metric): Set g->g.measured.
146
147         * m17n-flt.c (Mequal): New variable.
148         (m17n_init_flt): Initialize it.
149         (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
150         into a new member facility.
151         (load_command): Modify parsing of Mfont_facility.
152         (run_rule): Adjuted for the change of FontLayoutCmdRule.
153         (run_otf): Adjusted metrics if a->back is nonzero.
154
155 2007-12-28  Kenichi Handa  <handa@ni.aist.go.jp>
156
157         * Version 1.5.0 released.
158
159 2007-12-13  Kenichi Handa  <handa@ni.aist.go.jp>
160
161         * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
162
163         * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
164         (run_rule): Check if a font has the specific glyph correctly.
165
166         * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
167         MDEBUG_FONT_FLT to MDEBUG_FLT.
168
169         * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
170
171         * font-flt.c: Delete it.
172
173 2007-12-08  Kenichi Handa  <handa@ni.aist.go.jp>
174
175         * m17n-flt.c (run_rule): Fix printing of debug info.  Don't update
176         TO for the rule of SRC_HAS_GLYPH.
177
178         * draw.c (run_flt): Argument changed.
179         (compose_glyph_string): Adjusted for the above change.
180
181 2007-12-07  Kenichi Handa  <handa@ni.aist.go.jp>
182
183         * plist.c (read_mtext_element): Don't free the malloced buffer.
184
185 2007-12-04  Kenichi Handa  <handa@ni.aist.go.jp>
186
187         * m17n-core.h (merror_code): Extern it.
188
189         * m17n-misc.h (merror_code): Don't extern it.
190
191         * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
192
193         * m17n-flt.h: Handle the case of _M17N_H_ being defined.
194
195 2007-11-22  Kenichi Handa  <handa@ni.aist.go.jp>
196
197         * draw.c (compose_glyph_string): Check g->rface->layouter, not
198         g->rface->rfont->layouter.
199
200         * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
201
202         * m17n-flt.c (FontLayoutContext): New member encoded_offset.
203         (run_rule): Use ctx->encoded_offset.
204         (run_command): Likewise.
205         (run_stages): Set ctx->encoded_offset.
206
207 2007-11-21  Kenichi Handa  <handa@ni.aist.go.jp>
208
209         * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
210         bit-size of MFLTGlyph->internal.
211
212 2007-11-20  Kenichi Handa  <handa@ni.aist.go.jp>
213
214         * draw.c (visual_order): Exclude the last anchor glyph from the
215         iteration.
216
217         * m17n-flt.h (MFLTGlyph): New member <adjusted>.
218
219         * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
220         (run_stages): Likewise.
221         (load_flt): Unref top after checking plist.
222
223         * m17n-X.c (xft_render): Check adjusted flag of glyphs.
224
225 2007-11-12  Kenichi Handa  <handa@ni.aist.go.jp>
226
227         * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
228
229         * m17n-flt.c (Mcombining): New variable.
230         (Mfont_facility): Renamed from Mfont_has.  Referrer changed.
231         (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
232         SRC_HAS_GLYPH and SRC_OTF_SPEC.
233         (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
234         src.otf_spec.
235         (load_command): Adjusted for the above changes.
236         (run_rule): Likewise.
237         (combining_code_from_class): Delete it.
238         (mflt_get): Check flt->name against Mcombining, not Mt.
239
240         * internal-flt.h (Mcombining): Extern it.
241
242         * draw.c (compose_glyph_string): Call run_flt with Mcombining for
243         combining characters.
244
245 2007-11-09  Kenichi Handa  <handa@ni.aist.go.jp>
246
247         * face.c (mface__realize): Reset measured flag before calling
248         mfont__get_metric.
249
250         * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
251         (setup_combining_coverage): New function.
252         (setup_combining_flt): New function.
253         (mflt_get): If flt is not found, return NULL.  If name if Mt,
254         call setup_combining_flt.
255         (mflt_run): For debugging, print font family name.
256
257         * font-ft.c (ft_render): Fix handling of baseline_offset.
258         (ft_encapsulate): Set metrics in 26.6 fixed pixel.
259         (ft_render): Check pixel_mode to determine anti_alias.
260
261         * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
262         (xfont_find_metric): Set metrics in 26.6 fixed pixel.
263         (xfont_render): Set baseline_offset in pixel.
264         (xft_render): Fix handling of baseline_offset.
265
266         * draw.c (run_flt): Set font.font.family.
267         (compose_glyph_string): Fix handling of combining characters.
268
269         * fontset.c (try_font_list): Check if the named flt is surely
270         available.
271
272 2007-11-07  Kenichi Handa  <handa@ni.aist.go.jp>
273
274         * draw.c (analyse_bidi_level): New function.
275         (visual_order): Do reordering using the already decided
276         bidi-level.
277         (compose_glyph_string): Decide bidi-level before calling flt.
278
279         * m17n-flt.c (mflt_run): Fix typo.
280
281         * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
282
283 2007-11-06  Kenichi Handa  <handa@ni.aist.go.jp>
284
285         * draw.c (visual_order): Don't rely on the width of glyphs.
286         (run_flt): Fix culculation of g->g.to.
287
288         * m17n-flt.c (run_rule): Don't set error code here.
289         (run_cond): Likewise.
290         (run_otf): Fix culculation of xoff and yoff.
291         (run_command): Don't set error code here.
292         (PREV): New macro.
293         (NEXT): New macro.
294
295         * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
296         (xfont_find_metric): Set glyph's yadv to 0.
297         (xft_find_metric): Likewise.
298
299         * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
300         (ft_find_metric): Adjust glyph's metrics.
301         (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
302         (ft_drive_otf): Set mark glyph's xadv to 0.
303
304         * face.c (mface__for_chars): Adjusts the unit of face's ascent and
305         descent.
306
307 2007-10-29  Kenichi Handa  <handa@m17n.org>
308
309         * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
310         (mflt_get): Adjusted for the argument change.
311         (mflt_name): Adjusted for the return value change.
312
313         * m17n-flt.c (Mgenerator, Mend): New variables.
314         (flt_min_coverage, flt_max_coverage): New variables.
315         (GCPY): New macro.
316         (GDUP): Use it.
317         (Mfont_has): Renamed from Mexist.  Referrers chagned.
318         (gen_otf_tag): Handle the trailing whitespaces.
319         (otf_count_features, otf_store_features): Fix for negative features.
320         (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
321         (load_otf_command): Likewise.
322         (free_flt_command): Adjusted for the change of MFLTOtfSpec.
323         (load_flt): Argument changed.  Caller changed.
324         (free_flt_list): New function.
325         (run_rule): Adjusted for the change of FontLayoutContext.
326         (mflt_run): Adjusted for the change of FontLayoutContext.
327
328         * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
329         (m17n_fini_win): Call m17n_fini_flt.
330
331         * m17n-gui.h: Include m17n-flt.h.
332
333         * m17n-gd.c: Adusted for the change of MGlyph.
334
335         * m17n-X.c: Adusted for the change of MGlyph.
336         (xft_check_otf, xft_drive_otf): New functions.
337
338         * internal-gui.h (MGlyph): Modified for new FLT handling.
339
340         * fontset.c (try_font_list): Adusted for the change of MGlyph.
341
342         * font-ft.c: Adjusted for the change of MGlyph.
343         (ft_check_cap_otf): Renamed from ft_check_otf.  Callers changed.
344         (get_glyph_metric): Deleted.
345         (ft_check_otf): New function.
346         (ft_drive_otf): New fucntion.
347
348         * font.c: Adjusted for the change of MGlyph.
349         (mfont__init): Don't call mfont__flt_init.
350         (mfont__fini): Don't call mfont__flt_fini.
351         (mfont__get_glyph_id, mfont__get_metrics): New functions.
352
353         * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
354         (MFLTFontForRealized): New struct.
355         (struct MFontDriver): New members check_otf and drive_otf.
356         (mfont__get_glyph_id, mfont__get_metrics): Extern them.
357
358         * face.c: Adjusted for the change of MGlyph.
359
360         * draw.c: Adjusted for the change of MGlyph.
361
362         * m17n.c (m17n_init): Don't call mchar_init.
363
364         * m17n-core.c (m17n_init_core): Call mchar_init.
365
366         * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
367
368         * input.c: Include "m17n.h" instead of "m17n-gui.h".
369
370         * chartab.c (mchartable): Initialize table->min_char to -1.
371         (mchartable_min_char): New function.
372         (mchartable_max_char): New function.
373
374         * Makefile.am (GUI_SOURCES): Delete font-flt.c.
375         (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
376
377 2007-10-12  Kenichi Handa  <handa@m17n.org>
378
379         * m17n-core.h (Mcharset): Extern it.
380         Move detabase related declarations from m17n.h.
381
382         * m17n-flt.h: Include m17n-core.h instead of m17n.h.
383         (struct _MFLTOtfFeatures): New struct.
384         (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
385         (struct _MFLTFont): Delete otf, add check_otf.
386         (MCHAR_INVALID_CODE): Define it.
387
388         * plist.c (read_mtext_element): Simplify the code.
389
390         * m17n.h: Move database related declarations to m17n-core.h
391         (Mharset): Don't extern it.
392
393         * m17n.c (m17n_init): Don't call mdatabase__init.
394
395         * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt.  Downcase
396         color names.
397
398         * m17n-flt.c: Include m17n-core.h instead of m17n.h.
399         (Mexist): New variable.
400         (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
401         (FontLayoutCmdRule): New member src.exist.
402         (parse_otf_command): Handle gsub_count and gpos_count separately.
403         (load_otf_command): Adjusted for the change of MFLTOtfSpec.
404         (load_command): Handle the command "exist".
405         (free_flt_command): Adjusted for the change of MFLTOtfSpec.
406         (run_rule): Handle the case SRC_EXIST.
407         (run_otf): Adjusted for the change of MFLTOtfSpec.
408         (run_command): Check the range of FROM.
409         (check_otf_spec): Delete it.
410         (m17n_init_flt): Call m17n_init_core instead of m17n_init.
411         Initialize Mexist.
412         (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
413         (mflt_find): Call font->check_otf instead of check_otf_spec.
414         (mflt_run): Keep the metrics in 26.6 fixed point.
415
416         * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
417         (m17n_init_core): Call mdatabase__init.
418
419         * m17n-X.c (device_open): Use mplist_add, not mplist_push.
420
421         * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
422         of them.
423
424         * font-flt.c (Mexist): New variable.
425         (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
426         (FontLayoutCmdRule): New member src.exist.
427         (load_category_table): Use isalnum, not isalpha.
428         (load_command): Check the command "exist".
429         (run_rule): Hande the case SRC_EXIST.
430         (run_command): Check the range of FROM.
431         (mfont__flt_init): Initialize Mexist.
432
433         * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
434
435         * database.h (mdatabase__load_charset_func): Extern it.
436
437         * database.c: Include m17n-core.h instead of m17n.h.
438         (load_chartable): Use mtext__from_data.
439         (load_charset): Moved to charset.c
440         (load_database): Call mdatabase__load_charset_func instead of
441         load_charset.
442         (mdatabase__load_charset_func): New variable.
443         (mdatabase__init): Initialize mdatabase__load_charset_func and
444         Mcharset.  Don't set mdatabase__finder and mdatabase__loader.
445         (mdatabase__save): Use fwrite, not mconv_encode_stream.
446         (Mcharset): Declare it here.
447
448         * charset.c: Include "database.h.".
449         (load_charset): Moved from database.c.
450         (mcharset__init): Initialize mdatabase__load_charset_func, don't
451         initialize Mcharset.
452
453         * character.c (mchar_define_property): Call mdatabase_find directly.
454         (mchar_get_prop): Call mdatabase_add directly.
455         (mchar_put_prop): Call mdatabase_load directly.
456         (mchar_get_prop_table): Likewise.
457
458         * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
459         (libm17n_la_SOURCES): Remove database.[ch].
460         (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
461
462 2007-09-18  Kenichi Handa  <handa@m17n.org>
463
464         * face.c (mface__realize): Try Freetype based font at first.
465
466         * font.c: Include <ctype.h>
467
468 2007-09-16  Kenichi Handa  <handa@m17n.org>
469
470         * m17n-flt.c (load_flt): New arg full.  If full is zero, load only
471         coverage.
472         (run_otf): Call font->get_metrics, not font->get_metric.
473         (run_stages): Likewise.
474         (CHECK_FLT_COVERAGE): New macro.
475         (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
476         (check_otf_spec): New function.
477         (m17n_fini_flt): Unref flt->coverage.
478         (mflt_find): Argument changed.
479         (mflt_name): New function.
480         (mflt_coverage): Use CHECK_FLT_COVERAGE.
481
482         * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
483         (mflt_find): Prototype adjusted.
484         (mflt_name): Extern it.
485
486 2007-09-14  Kenichi Handa  <handa@m17n.org>
487
488         * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
489
490         * font-flt.c (run_otf): Make debug info printing comaptible with
491         that of m17n-flt.c.
492         (run_command): Likewise.
493         (mfont__flt_run): Likewise.
494
495         * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
496         invalid only when it's negative.
497         (run_otf): Likewise.
498         (run_command): Likewise.
499         (mflt_run): Initialize ctx.cluster_begin_idx to -1.
500
501 2007-09-10  Kenichi Handa  <handa@m17n.org>
502
503         * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
504         (struct _MFLTFont): Prototype of get_glyph_id changed.
505
506         * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
507         PositionedMask.
508         (GAPPEND): Delete this macro.
509         (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
510         for the change of MFLTGlyph.  Caller changed.
511         (run_otf): Simply calls font->get_glyph_id.
512         (run_command): Reset g->encoded and g->measured for direct code.
513         (positioning): Delete this function.
514         (run_stages): Simply calls font->get_glyph_id and font->get_metric.
515
516 2007-09-07  Kenichi Handa  <handa@m17n.org>
517
518         * draw.c (compose_glyph_string): Improve script detection.
519
520 2007-09-06  Kenichi Handa  <handa@m17n.org>
521
522         * m17n-flt.h (mflt_get): Extern it.
523
524         * m17n-flt.c (run_stages): Call positioning only if
525         font->get_metric is non-NULL.
526         (CHECK_FLT_STAGES): Fix typo.
527         (mflt_get): New function.
528
529         * font-flt.c (mfont__flt_run): Improve debug info printing.
530
531 2007-09-04  Kenichi Handa  <handa@m17n.org>
532
533         * m17n-flt.c (MFontLayoutTable): Delete this type.
534         (struct _MFLT): New member mdb and coverage.
535         (list_flt): Set flt->mdb.
536         (load_generator): Argument and return value changed.  Caller
537         changed.
538         (get_font_layout_table): Delete this function.
539         (run_stages): Argument changed.  Caller changed.
540         (CHECK_FLT_STAGES): New macro.
541         (mfont__flt_encode_char): Argument changed.
542         (mflt_find): Likewise.
543         (mflt_coverage): New function.
544         (mflt_run): Argument changed.
545         (mdebug_dump_flt): Likewise.
546
547         * m17n-flt.h (mflt_coverage): Extern it.
548         (mflt_find): Prototype adjusted.
549
550 2007-09-03  Kenichi Handa  <handa@m17n.org>
551
552         * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
553
554         * database.c (mdatabase__props): New function.
555
556         * database.h (mdatabase__props): Extern it.
557
558         * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
559         script and langsys.
560         (struct _MFLTFont): Add suitable_p.
561         (mflt_find): Extern it.
562
563         * m17n-flt.c: Include "database.h".
564         (struct _MFLT): New struct.
565         (list_flt): New function.
566         (load_flt): Don't update flt_list.
567         (get_font_layout_table): Use flt_list.
568         (m17n_init_flt): Don't initialize flt_list.
569         (m17n_fini_flt): Adjusted for the change of flt_list.
570         (mflt_find): New function.
571         (mflt_run): Fix debug printing.
572
573 2007-08-23  Kenichi Handa  <handa@m17n.org>
574
575         * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
576         (run_stages): Print separator in encoded string as "|".
577
578 2007-08-23  Kenichi Handa  <handa@m17n.org>
579
580         * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
581         the glyph is already handled by OTF.
582
583 2007-08-21  Kenichi Handa  <handa@m17n.org>
584
585         * font-ft.c (ft_check_capability): Check cap->script_tag at first.
586
587 2007-08-20  Kenichi Handa  <handa@m17n.org>
588
589         * font-flt.c (mfont__flt_run): Get glyph metrics before printing
590         debug information.
591
592 2007-08-17  Kenichi Handa  <handa@m17n.org>
593
594         * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
595         user_data.
596         (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
597         (MFLTFont): Prototype of the member drive_otf adjusted.
598
599         * m17n-flt.c (run_stages): Fix handling of padding.
600
601         * font-ft.c (get_glyph_metric): New function.
602         (DEVICE_DELTA): Return 26.6 fixed point value.
603         (adjust_anchor): Likewise.
604         (mfont__ft_drive_otf): Use get_glyph_metric.
605
606         * font-flt.c (mfont__flt_run): Pay attention to padding on
607         printing debug info.
608
609 2007-08-16  Kenichi Handa  <handa@m17n.org>
610
611         * m17n-flt.c (run_stages): Fix typo.
612
613         * font-ft.c (adjust_anchor): Argument changed.  Calculte based on
614         26.6 fixed point.
615         (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
616         Adjusted for the argument change of adjust_anchor.  Calculte based
617         on 26.6 fixed point.
618
619 2007-08-15  Kenichi Handa  <handa@m17n.org>
620
621         * charset.c (mcharset__load_from_database): Set mdebug_flag
622         instead of mdebug_mask.
623
624         * coding.c (mcoding__load_from_database): Set mdebug_flag instead
625         of mdebug_mask.
626
627         * database.c (load_database): Set mdebug_flag instead of
628         mdebug_mask.
629         (mdatabase__load_for_keys): Likewise.
630
631         * draw.c: Include "internal-flt.h".
632         (dump_combining_code): Don't subtract 128 from combining code
633         off_x/y.
634
635         * font-flt.c: Include "internal-flt.h".  Set mdebug_flag instead
636         of mdebug_mask.
637         (run_rule): Print debug info only when MDEBUG_FLAG is greater than
638         2.
639         (run_cond): Likewise.
640         (run_otf): Likewise.
641         (run_command): Likewise.
642         (mfont__flt_run): Change format of debug info.
643
644         * font-ft.c: Include "internal-flt.h".
645         Set mdebug_flag instead of mdebug_mask.
646         (mfont__ft_drive_otf): Fix arg to OTF_check_features.
647
648         * input.c: Set mdebug_flag instead of mdebug_mask.
649         (shift_state): New MDEBUG_FLAG macro.
650         (preedit_commit): Likewise.
651         (filter): Likewise.
652
653         * internal-flt.h: New file.
654
655         * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
656         (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
657         (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
658         (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
659         (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
660         (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
661         these macros to internal-flt.h.
662
663         * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
664         mdebug__flags.
665         (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
666         (enum MDebugMaskBit): Delete this enum.
667         (enum MDebugFlag): New enum.
668         (mdebug__flag): Don't extern it.
669         (mdebug__flags): Extern it.
670         (MDEBUG_FLAG): New macro.
671         (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
672         (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
673         (MDEBUG_PRINT_TIME): Likewise.
674
675         * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
676         (xfont_list): Likewise.
677
678         * m17n-core.c (mdebug__flag): Delete this variable.
679         (mdebug__flags): New variable.
680         (SET_DEBUG_FLAG): Make it a function.
681         (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
682         (m17n_fini_core): Likewise.
683
684         * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
685         (m17n_fini_win): Likewise.
686
687         * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
688
689         * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
690         (m17n_fini): Likewise.
691
692         * symbol.c (msymbol__free_table): Adjusted for the change of
693         mdebug__flags.
694
695         * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
696         (BASICHEADERS): Add m17n-flt.h.
697         (FLT_SOURCES): New variable.
698         (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
699         (libm17n_flt_la_LDFLAGS): Likewise.
700
701         * m17n-flt.h: New file.
702
703         * m17n-flt.c: New file created by modifying font-flt.c.
704
705 2007-07-13  Kenichi Handa  <handa@m17n.org>
706
707         * Version 1.4.0 released.
708
709 2007-07-12  Kenichi Handa  <handa@m17n.org>
710
711         * input.c: Fix doxygen @ref commands.
712
713 2007-07-10  Kenichi Handa  <handa@m17n.org>
714
715         * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
716
717 2007-07-09  Kenichi Handa  <handa@m17n.org>
718
719         * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
720
721         * m17n.h: Include m17n-core.h if not yet done.  Use macros
722         M17N_BEGIN_HEADER and M17N_END_HEADER.
723
724         * m17n-gui.h: Likewise.
725
726         * m17n-misc.h: Likewise.
727
728 2007-06-13  Kenichi Handa  <handa@m17n.org>
729
730         * font-flt.c (load_command): Prepend "^" in the regular expression.
731
732 2007-06-11  Kenichi Handa  <handa@m17n.org>
733
734         * language.c (mlanguage_name_list): Fix previous change.
735
736         * coding.c (mcoding__load_from_database): Add aliases in
737         coding_definition_list.
738
739 2007-06-10  Kenichi Handa  <handa@m17n.org>
740
741         * language.c (mlanguage_name_list): Fix previous change.
742
743 2007-06-08  Kenichi Handa  <handa@m17n.org>
744
745         * input.c (update_candidate): Copy candidate_list earlier.
746         (re_init_ic): Provide pseudo initialize state if none.
747
748 2007-06-05  Kenichi Handa  <handa@m17n.org>
749
750         * input.c (preedit_insert): Print debug information.
751
752         * database.c (expand_wildcard_database): New function.
753         (mdatabase_list): Fix handling of wildcard database.
754
755         * language.c (load_lang_name): New function.
756         (mlang__fini): Cancel the last two changes.
757         (mlanguage_name_list): New arg script and territories.  Use
758         load_lang_name.
759
760         * m17n.h (mlangauge_name_list): Adjusted.
761
762 2007-06-04  Kenichi Handa  <handa@m17n.org>
763
764         * input.c (open_im): Check if the input method has at least one
765         state.
766
767 2007-06-01  Kenichi Handa  <handa@m17n.org>
768
769         * input.c (shift_state): Change the format of debug print.
770         (preedit_commit): New arg need_prefix.  Caller changed.
771         (update_candidate): Copy candidate_list.
772         (take_action_list): Likewise.
773         (handle_key): Change the format of debug print.
774
775         * font-flt.c (load_flt): Ignore unknown directives.
776
777 2007-05-25  Kenichi Handa  <handa@m17n.org>
778
779         * m17n-core.c (mdebug__unregister_object): Small optimization.
780
781         * database.c (find_file): Merged into get_database_file.
782         (get_database_file): New arg result.  Caller changed.
783         (mdatabase__check): Fix the logic.
784
785 2007-05-24  Kenichi Handa  <handa@m17n.org>
786
787         * database.c (find_database): If unprocessed wildcard database is
788         found, register database filed and recursively call find_database.
789         (free_db_info): Unref db_info->properties.
790         (register_database): New arg properties.  Delete code for
791         initializing mdatabase__list.
792         (register_databases_in_files): Argument changed.  Caller changed.
793         (mdatabase__update): Don't list files by glob here.
794         (mdatabase_list): If unprocessed wildcard database is found,
795         register database filed and recursively call mdatabase_list.
796
797         * database.h (enum MDatabaseStatus): New enum
798         MDB_STATUS_AUTO_WILDCARD.
799
800         * input.c (load_branch): Fix previous change.
801         (update_global_info): If the global database is not found, return -1.
802
803 2007-05-23  Kenichi Handa  <handa@m17n.org>
804
805         * database.c (Mversion): New variable.
806         (mdatabase__init): Initialize it.
807         (register_database): New arg properties.  Caller changed.
808         (register_databases_in_files): Don't check version here.
809         (mdatabase__update): Likewise.
810
811         * database.h (MDatabaseInfo): New member properties.
812
813 2007-05-21  Kenichi Handa  <handa@m17n.org>
814
815         * language.c: Include <ctype.h>
816         (mlanguage__info): Use strncasecmp (not memcmp).
817         (mlanguage_name): Downcase language name for backward
818         compatibility.
819
820         * input.c (filter): Don't check Mlanguage property of
821         ic->im->langauge.
822
823 2007-05-18  Kenichi Handa  <handa@m17n.org>
824
825         * language.c (mlanguage_name): Fix it to handle M-text English
826         name.
827
828         * input.c (config_command): Set NAME before using it.
829         (load_branch): Try to resolve a map name by variables.
830
831 2007-05-17  Kenichi Handa  <handa@m17n.org>
832
833         * language.c (mlang__fini): Fix previous change.
834
835 2007-05-16  Kenichi Handa  <handa@m17n.org>
836
837         * plist.c (free_plist): Cancel the last change.
838         (write_element): Check if PLIST is nested.
839         (mplist__from_plist): Label a plist as nested if appropriate.
840         (mplist__from_alist): Label a plist as nested.
841         (mplist__conc): Check the value of PL before referring it.  Label
842         a plist as nested if appropriate.
843         (mplist_copy): Label a plist as nested if appropriate.
844         (mplist_put_func): Return Mnil if KEY is a managing key.
845         (mplist_push): Label a plist as nested if appropriate.
846
847         * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
848         is set as nested.
849
850         * language.c (mlang__fini): Unref each element of langname_list.
851
852 2007-05-14  Kenichi Handa  <handa@m17n.org>
853
854         * language.c: Include <string.h> and <locale.h>.
855         (langname_list): New variable.
856         (load_lang_script_list): Exclude invalid list elements.
857         (mlang__init): Initialize langname_list.
858         (mlang__fini): Unref langname_list.
859         (mlanguage__info): Adjusted for the change of English
860         name (symbol->M-text).
861         (mlanguage_name): Label it as obsolete.
862         (mlanguage_name_list): New function.
863
864         * m17n.h (mlanguage_name_list): Extern it.
865
866         * locale.c (make_locale): Fix setting of members of locale.
867
868         * plist.c (free_plist): Unref also nested plist.
869
870 2007-05-11  Kenichi Handa  <handa@m17n.org>
871
872         * coding.c (mconv_reset_converter): Set internal->used to 0.
873
874 2007-05-08  Kenichi Handa  <handa@m17n.org>
875
876         * input.c (check_description): Force copying the translated text.
877
878 2007-05-02  Kenichi Handa  <handa@m17n.org>
879
880         * input.c (minput_save_config): Unref unnecessary plist.  Use
881         free_im_list to free im_config_list.
882
883 2007-04-20  Kenichi Handa  <handa@m17n.org>
884
885         * input.c (config_command): Fix previous change again.
886         (config_variable): Likewise.
887         (minput_config_command): Fix for the case of setting back to
888         default.
889         (minput_config_variable): Likewise.
890         (minput_save_config): Include nil as documentation of customized
891         command/variable.
892
893 2007-04-05  Kenichi Handa  <handa@m17n.org>
894
895         * input.c (config_command): Fix previous change.
896         (config_variable): Likewise.
897
898         * plist.c (mplist_get_func): Fix for backward compatiblity.
899
900 2007-04-04  Kenichi Handa  <handa@m17n.org>
901
902         * input.c (minput_get_command, minput_config_command): Fix example
903         codes.
904
905 2007-03-29  Kenichi Handa  <handa@m17n.org>
906
907         These changes are to avoid unsafe casting of a function pointer.
908
909         * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
910         (struct MFace): New member hook.
911
912         * face.c (serialize_face): Adjusted for the change of MFace.
913         (deserialize_face): Likewise.
914         (mface__init): Likewise.  Use msymbol_put_func.
915         (mface__realize): Adjusted for the change of MFace.  Avoid
916         compiler warning.
917         (mface_get_prop): Adjusted for the change of MFace.
918         (mface_put_prop): Likewise.
919         (mface_get_hook): New function.
920         (mface_put_hook): New function.
921         (mface_update): Adjusted for the change of MFace.
922
923         * input-gui.c (win_callback): Use mplsit_get_func.
924         (minput__win_init): Use mplsit_put_func.
925
926         * input.c (take_action_list): Use mplist_get_func.
927         (init_ic_info): Likewise.
928         (fini_ic_info): Likewise.
929         (minput_callback): Likewise.
930         (minput__init): Use mplist_put_func.
931
932         * language.c (mlang__init): Use msymbol_put_func.
933
934         * m17n-core.h (M17NFunc): New function type.
935         (M17N_FUNC): New macro.
936         (msymbol_put_func, msymbol_get_func): Extern them.
937         (mplist_put_func, mplist_get_func): Extern them.
938
939         * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
940
941         * m17n-gui.c (mframe): Add a proper casting.
942
943         * plist.h (struct MPlist): Make the member val a union.
944         (MPLIST_VAL): Adjusted for the above change.
945         (MPLIST_FUNC): New macro.
946         (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
947
948         * plist.c (mplist_put_func, mplist_get_func): New functions.
949
950         * symbol.c (msymbol__fini): Use MPLIST_VAL.
951         (msymbol_put_func, msymbol_get_func): New functions.
952
953         * textprop.c (mtext_serialize): Use msymbol_get_func.
954         (mtext_deserialize): Likewise.
955
956 2007-03-28  Kenichi Handa  <handa@m17n.org>
957
958         * input.c (get_candidate_list): Avoid unnecessary unref.
959
960 2007-03-23  Kenichi Handa  <handa@m17n.org>
961
962         * database.c (mdatabase__update): Unref plist at the tail.
963
964 2007-03-21  Kenichi Handa  <handa@m17n.org>
965
966         * input.c (update_custom_info): Fix for the case "name == Mnil &&
967         extra != Mnil".
968         (config_command): Fix for the case that configuration is
969         cancelled.
970         (config_variable): Likewise.
971         (minput_config_command): If keyseqlist is an empty list, cancel
972         the customization.
973         (minput_config_variable) If value is an empty list, cancel the
974         customization.
975         (minput_save_config): Handle cancellation of config and customize
976         correctly.
977
978 2007-03-15  Kenichi Handa  <handa@m17n.org>
979
980         * input.c (minput_config_variable): Check custom->vars (not
981         custom->cmds).
982
983 2007-03-01  Kenichi Handa  <handa@m17n.org>
984
985         * input.c (reload_im_info): Setup cmds, vars, and title of
986         im_info.
987         (check_variable_value): Fix the return value.
988
989         * database.c (mdatabase__check): If necessary, update database and
990         find a new file.
991
992 2007-02-28  Kenichi Handa  <handa@m17n.org>
993
994         * database.c (get_dir_info): Set dir_info->status to
995         MDB_STATUS_OUTDATED.
996         (check_version): New function.
997         (register_database): Don't call find_database.
998         (register_databases_in_files): Don't register a database of
999         invalid version.
1000         (mdatabase__update): Likewise.  Avoid unnecessary scanning.
1001
1002         * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1003         and MDB_STATUS_OUTDATED.
1004
1005         * font.h (struct MFont): Types of members type, source, and
1006         spacing changed to unsigned.
1007
1008         * internal-gui.h (struct): Types of members category and type
1009         changed to unsigned.
1010
1011         * internal.h (struct MText): Types of members format and coverage
1012         changed to unsigned.
1013
1014         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1015         (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1016
1017 2007-02-23  Kenichi Handa  <handa@m17n.org>
1018
1019         * input.c (Mpop): New variable.
1020         (fully_initialize): Initialize Mpop.
1021         (parse_action_list): Handle Mpop.
1022         (take_action_list): Likewise.
1023         (handle_key): When a key is unhandled, shift to the initial state
1024         only if the current state has no branch action.
1025
1026 2007-02-12  Kenichi Handa  <handa@m17n.org>
1027
1028         * input.c (get_preceding_char): Unref mt if necessary.
1029         (get_following_char): Likewise.
1030         (parse_action_list): Fix handling of `insert' action as
1031         candidates.
1032         (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1033         (take_action_list): Check invalid candidate list.
1034
1035 2007-02-06  Kenichi Handa  <handa@m17n.org>
1036
1037         * input.c (integer_value): Check also ic->produced for @-N.
1038
1039 2007-01-26  Kenichi Handa  <handa@m17n.org>
1040
1041         * database.c (mdatabase__update): Check mdatabase__dir_list from
1042         the tail.
1043
1044         * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1045
1046 2007-01-12  Kenichi Handa  <handa@m17n.org>
1047
1048         * input.c (handle_key): Handle a branch action of the initial
1049         state correctly.
1050
1051 2007-01-10  Kenichi Handa  <handa@m17n.org>
1052
1053         * m17n-gd.c (gd_render): Delete superfluous line.
1054
1055 2006-12-26  Kenichi Handa  <handa@m17n.org>
1056
1057         * m17n.h (minput_callback): Extern it.
1058
1059         * input.h (minput__callback): Delte extern.
1060
1061         * input.c (get_surrounding_text): Adjusted for the change of
1062         minput__callback to minput_callback.
1063         (delete_surrounding_text): Likewise.
1064         (minput_create_ic): Likewise.
1065         (minput_destroy_ic): Likewise.
1066         (minput_filter): Likewise.
1067         (minput_set_spot): Likewise.
1068         (minput_toggle): Likewise.
1069         (minput_reset_ic): Likewise.
1070
1071         (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1072         and ic->candidate_to to 0.
1073         (minput_callback): Renamed from minput__callback.
1074
1075         * input-gui.c (win_callback): Adjusted for the change of
1076         minput__callback to minput_callback.
1077
1078 2006-12-15  Kenichi Handa  <handa@m17n.org>
1079
1080         * font-ft.c (ft_add_font): Fix typo.
1081
1082 2006-12-06  Kenichi Handa  <handa@m17n.org>
1083
1084         * Version 1.3.4 released.
1085
1086 2006-11-16  Kenichi Handa  <handa@m17n.org>
1087
1088         * input.c (parse_action_list): Allow (undo 0).
1089         (adjust_markers): New function.
1090         (preedit_insert, preedit_delete): Call adjust_markers.
1091         (preedit_replace): New function.
1092         (update_candidate): Call preedit_replace instead of preedit_insert
1093         and preedit_delete.
1094         (filter): When ic_info->commit_key_head is nonzero, shift input
1095         event keys even if there's no committed text.
1096
1097 2006-11-10  Kenichi Handa  <handa@m17n.org>
1098
1099         * input.h (MInputContextInfo): New member commit_key_head.
1100
1101         * input.c (preedit_commit): Update ic_info->commit_key_head.
1102         (take_action_list): Reset ic_info->commit_key_head on Mundo.
1103         (filter): When committed, shift keys by ic_info->commit_key_head.
1104
1105 2006-10-30  Kenichi Handa  <handa@m17n.org>
1106
1107         * input.c (preedit_delete): Fix typo.
1108         (take_action_list): Print more debugging information.  Allow
1109         variable in arg of 'select' and `pushback'.
1110
1111         * database.c (gen_database_name): Don't put extra space.
1112         (load_database): Print debugging information.
1113         (register_databases_in_files): New arg headlen.  Callers changed.
1114         (mdatabase__load_for_keys): Shorten debugging information.
1115         (mdatabase_load): Don't print debugging information here.
1116
1117 2006-10-27  Kenichi Handa  <handa@m17n.org>
1118
1119         * input.c (marker_code): New arg surrounding.  Callers changed.
1120         (surrounding_pos): Check if name[0] == '@'.
1121         (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1122         (take_action_list): Likewise.
1123         (get_preceding_char): If POS is zero, always call
1124         get_surrounding_text.
1125
1126 2006-10-19  Kenichi Handa  <handa@m17n.org>
1127
1128         * input.c (load_variables): Fix setting of `global'.
1129
1130 2006-10-16  Kenichi Handa  <handa@m17n.org>
1131
1132         * draw.c (draw_background): Be sure to set *to_x.
1133         (render_glyph_string): If from == to, just return.
1134
1135 2006-10-18  Kenichi Handa  <handa@m17n.org>
1136
1137         * database.c (get_dir_info): Return NULL if the directory name is
1138         too long.
1139         (register_databases_in_files): Call register_database with
1140         MDB_STATUS_AUTO.
1141         (mdatabase__update): Fix logic.  Call register_database with
1142         MDB_STATUS_AUTO.
1143         (mdatabase_define): Call register_database with
1144         MDB_STATUS_EXPLICIT.
1145
1146         * input.c (delete_surrounding_text): Be sure to set members
1147         preceding_text and following_text to NULL.
1148         (shift_state): Save variable values in ic_info->vars_saved.
1149         (preedit_commit): Don't print debug information here.  Don't
1150         change ic_info->keys here.
1151         (get_candidate_list): Don't ref plist.
1152         (take_action_list): Don't unref return value of
1153         get_candidate_list.  For undo, reset ic->produced and recover
1154         ic_info->vars.  Be sure to set ic->candidate_list to NULL after
1155         unref it.
1156         (init_ic_info): Set ic_info->vars_saved.
1157         (fini_ic_info): Unref ic_info->vars_saved.
1158         (re_init_ic): Be sure to set ic->candidate_list to NULL after
1159         unref it.
1160         (filter): Be sure to set members preceding_text and following_text
1161         to NULL.  Print debug information about produced text.  Delete
1162         processed keys from ic_info->keys.
1163
1164         * input.h (MInputContextInfo): New member vars_saved.
1165
1166 2006-10-16  Kenichi Handa  <handa@m17n.org>
1167
1168         * database.c (mdatabase__update): Fix the way to get db_info.
1169
1170 2006-10-02  Kenichi Handa  <handa@m17n.org>
1171
1172         * font.h (struct MFont): New member `multiple_sizes'.  Bit-size of
1173         `size' changed to 24.
1174
1175         * font.c (xlfd_unparse_name): Adjusted for the change of
1176         MFont->size.
1177         (font_score): Likewise.
1178         (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1179
1180         * m17n-X.c (MFontX, _MFontX): Deleted.
1181         (SET_SIZE, HAVE_SIZE): Deleted.
1182         (free_display_info): Adjusted for the change of
1183         disp_info->font_list format.
1184         (xfont_registry_list): Likewise.
1185         (xfont_open): Likewise.
1186         (xfont_list): Likewise.
1187         (xfont_encode_char): Ignore size to find a realized font.
1188         (MRealizedFontXft): Change the order of members to make it
1189         compatible with MRealizedFontFT.
1190
1191 2006-09-27  Kenichi Handa  <handa@m17n.org>
1192
1193         * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1194         (mfont_close): Add comments.
1195
1196         * mtext-lbrk.c (mtext_line_break): Add comment.
1197
1198 2006-09-26  Kenichi Handa  <handa@m17n.org>
1199
1200         * input.c (minput_get_description): Handle description about
1201         inclusion-only input methods.
1202
1203 2006-09-21  Kenichi Handa  <handa@m17n.org>
1204
1205         * input.c (M_gettext): New variable.
1206         (fully_initialize): Initialize M_gettext.
1207         (check_description): New function.
1208         (load_commands): Call check_description.
1209         (config_all_commands): Be sure to unref pl.
1210         (load_variables): Call check_description.
1211         (config_all_variables): Be sure to unref pl.
1212         (load_im_info): Call check_description.
1213
1214         * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1215
1216         * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1217         and bind_textdomain_codeset.
1218
1219         * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1220
1221 2006-09-15  Kenichi Handa  <handa@m17n.org>
1222
1223         * input.c (reload_im_info): Update custom and global info.
1224         (init_ic_info): Fix previous change.
1225
1226 2006-09-14  Kenichi Handa  <handa@m17n.org>
1227
1228         * database.c: Include <libgen.h>.
1229         (mdatabase__lock): Make a directory if necessary.
1230
1231         * input.c (resolve_command): Adjusted for the format change of
1232         configured_cmds member.
1233         (load_commands, load_variables): Fix for errornous data handling.
1234         (config_command, config_variable): New function.
1235         (config_all_commands, config_all_variables): Renamed from
1236         config_commands and config_variables.  Utilize the above function.
1237         (check_variable_value): Argument changed.  Callers changed.
1238         (load_im_info): Call config_all_commands and config_all_variables.
1239         (init_ic_info): Adjusted for the format change of configured_vars
1240         member.
1241         (minput__init): Initialize Mcustomized, Mconfigured, and
1242         Minherited.
1243         (Mcustomized, Mconfigured, Minherited): New variables.
1244         (minput_get_command): Be sure to return NULL if an input method
1245         use no local command.
1246         (minput_get_variable): Be sure to return NULL if an input method
1247         use no local variable.
1248         (minput_config_command, minput_config_variable)
1249         (minput_save_config): Adjusted for the format change of
1250         configured_cmds and configured_vars members.
1251         
1252         * plist.c (write_element): Delete superfluous ':'.
1253
1254 2006-09-13  Kenichi Handa  <handa@m17n.org>
1255
1256         * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1257         (minput_config_file): Extern it.
1258
1259         * draw.c (Minherited): Declaration moved to input.c.
1260         (mdraw__init): Don't initialize Minherited here.
1261
1262         * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1263
1264 2006-09-07  Kenichi Handa  <handa@m17n.org>
1265
1266         * textprop.c (mtext_serialize): Call mplist__serialize with the
1267         arg pretty 0.
1268
1269         * plist.h (mplist__serialize): Prototype adjusted.
1270         (mplist__assq): Extern it.
1271
1272         * plist.c: Include <ctype.h>
1273         (PUTC, PUTS): New macros.
1274         (write_symbol): New function.
1275         (write_element): New arg indent.
1276         (dump_string, dump_plist_element): Delete them.
1277         (mplist__from_string): New arg pretty.
1278         (mplist__assq): New function.
1279         (mdebug_dump_plist): Use write_element.
1280
1281         * mtext.c (mtext_cat_char): Allocate more memory.
1282         (mdebug_dump_mtext): Don't escal a newline character.
1283
1284         * m17n.h (minput_get_command, minput_get_variable)
1285         (minput_config_command, minput_config_variable)
1286         (minput_save_config): Extern them.
1287
1288         * m17n-core.c: Include <string.h>.
1289         (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1290         use the stream stdout instead of a file of that name.
1291
1292         * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1293         modifiers.
1294
1295         * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1296         (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1297         (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1298         (MDEBUG_DUMP): Flush the stream.
1299
1300         * input.h (struct _MInputMethodInfo): Delete member im.  New
1301         members mdb, language, name, extra, cmds, configured_cmds,
1302         bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1303         (MInputContextInfo): New member tick.
1304
1305         * input.c: Big change to improve user-side input method
1306         customization.  Here, list just public API changes.
1307         (minput_get_commands, minput_get_variables)
1308         (minput_assign_command_keys, minput_set_variable): Label them
1309         obsolete.
1310         (minput_get_command, minput_get_variable)
1311         (minput_config_command, minput_config_variable)
1312         (minput_save_config): New functions.
1313         
1314         * database.h (PATH_MAX): Define it if not yet defined.
1315         (PATH_SEPARATOR): Likewise.
1316         (enum MDatabaseStatus): New enum.
1317         (struct MDatabaseInfo): Moved from database.c.  New members status,
1318         time, lock_file, and uniq_file.
1319         (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1320         (mdatabase__unlock): Extern them.
1321
1322         * database.c: Include <time.h>.
1323         (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1324         (GEN_PATH): Args changed.  Callers changed.
1325         (struct MDatabaseInfo): Moved to database.h.
1326         (struct MDatabase, mdb_list): Deleted.
1327         (mdatabase__list): New var.
1328         (get_database_filename): Deleted.  Callers changed to use
1329         get_database_file.
1330         (find_file, get_database_file): New files.
1331         (get_dir_info): Initialize new members of MDatabaseInfo.
1332         (find_database): Arg chagnded.  Callers changed.
1333         (free_db_info, register_database, register_databases_in_files):
1334         New functions.
1335         (update_database_list): Deleted.
1336         (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1337         (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1338         (mdatabase__update): New function.
1339         (mdatabase__check): Return value changed.
1340         (mdatabase__file, mdatabase__lock, mdatabase__save)
1341         (mdatabase__unlock): New functions.
1342
1343 2006-08-30  TAKAHASHI Naoto  <ntakahas@m17n.org>
1344
1345         * input.c (get_surrounding_text): Return -2 when surrounding text
1346         is unavailable.
1347         (get_following_char): Likewise.
1348         (get_preceding_char): Likewise.
1349         (minput__callback): Return 0 if there is a callback function,
1350         otherwise -1.
1351
1352 2006-08-17  Kenichi Handa  <handa@m17n.org>
1353
1354         * input.c (reset_ic): Use shift_state to setup the current state.
1355
1356 2006-08-02  Theppitak Karoonboonyanan  <thep@linux.thai.net>  (tiny change)
1357
1358         * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1359         (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1360         (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1361
1362 2006-08-02  Kenichi Handa  <handa@m17n.org>
1363
1364         * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1365
1366         * mtext.c (mdebug_dump_mtext): If not fullp, dump just text. 
1367
1368         * font-ft.c (ft_encapsulate): Add code for debugging.
1369         (mfont__ft_drive_otf): Be sure to encode character before getting
1370         metrics.
1371
1372 2006-07-21  Kenichi Handa  <handa@m17n.org>
1373
1374         * draw.c (mdraw_text_extents): Fix previous typo.
1375
1376 2006-07-19  Kenichi Handa  <handa@m17n.org>
1377
1378         * draw.c (gstring_width): New arg lbearing.
1379         (render_glyph_string): Adjusted for the change of gstring_width.
1380         (mdraw_text_extents): Fix lbearing of ink and line metrics.
1381
1382         * m17n-core.h (Mlanguage): Extern it.
1383
1384         * m17n.h (Mlanguage): Extern deleted. 
1385
1386         * mtext.c (mtext__init): Initialize Mlanguage.
1387         (Mlanguage): Declaration moved from locale.c
1388
1389         * locale.c (mlocale__init): Don't initialize Mlanguage here.
1390         (Mlanguage): Declaration moved to mtext.c.
1391
1392         * language.c (mlang__init): Don't initialize Mlanguage here.
1393
1394         * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1395
1396 2006-07-14  Kenichi Handa  <handa@m17n.org>
1397
1398         * font-ft.c: Use FT_BDF_H macro.  Include fontconfig/fcfreetype.h.
1399         (MRealizedFontFT): New member face_encapsulated.
1400         (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1401         (ft_gen_font): New function.
1402         (ft_add_font): Use ft_gen_font.
1403         (ft_list_script): Store lists in ft_script_list.
1404         (ft_check_otf): New arg ft_face.  Caller changed.
1405         (ft_check_language): Likewise.
1406         (ft_check_script): Likewise.
1407         (ft_encapsulate, ft_close): New functions.
1408         (mfont__ft_driver): Initialize members encapsulate and close.
1409         (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1410
1411         * font.h (struct MRealizedFont): New member encapsulating.
1412         (struct MFontDriver): New members encapsulate and close.
1413
1414         * font.c (mfont__match_p): If FONT is realized, check capability
1415         by font drivers's check_capability method.
1416         (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1417         functions.
1418
1419         * m17n-X.c (xfont_list_family_names): Delete unused var.  Fix
1420         declarations of foundry and fam local vars.
1421         (xft_driver): Make it static.
1422
1423         * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1424         (mfont_close): Extern them.
1425
1426         * m17n-gd.c (device_open): Don't specify foundry and family of the
1427         default face.
1428
1429 2006-07-11  Kenichi Handa  <handa@m17n.org>
1430
1431         * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1432
1433 2006-07-13  Kenichi Handa  <handa@m17n.org>
1434
1435         * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1436         created.
1437         (ft_check_script): Delete unused var.
1438         (ft_list_capability): Likewise.
1439
1440         * font.c (mfont__get_capability): Setup cap->otf.
1441         (Motf): Make it global.
1442         (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1443
1444         * font.h (MFontCapability): New member otf.
1445
1446         * language.c (mlang__fini): Delete unused vars.
1447
1448         * m17n-gui.h (Motf): Extern it.
1449
1450         * database.c (update_database_list): Delete unused vars.
1451
1452 2006-07-07  Kenichi Handa  <handa@m17n.org>
1453
1454         * font-ft.c (DEVICE_DELTA): Fix typo.
1455
1456 2006-07-06  Kenichi Handa  <handa@m17n.org>
1457
1458         * fontset.c (mfont__lookup_fontset): Don't ignore family and
1459         foundry of face.
1460
1461 2006-07-05  TAKAHASHI Naoto  <ntakahas@m17n.org>
1462
1463         * database.c: Update comments.
1464
1465 2006-07-05  Kenichi Handa  <handa@m17n.org>
1466
1467         * database.c (PATH_MAX): Define it if not yet defined.
1468         (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1469         macros.
1470         (get_database_filename): Use GEN_PATH.
1471         (get_dir_info): Don't include the last '/' in directory name.
1472         (register_database): New function.
1473         (update_database_list): Use register_database.  Search all
1474         directories in mdatabase__dir_list for wildcard databases.
1475         (mdatabase__init): Check "~/.m17n.d".
1476
1477 2006-07-03  Kenichi Handa  <handa@m17n.org>
1478
1479         * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1480         push reverse property.
1481
1482         * plist.c (dump_plist_element): Fix previous change.
1483
1484 2006-06-28  Kenichi Handa  <handa@m17n.org>
1485
1486         * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1487         necessary.
1488
1489         * draw.c (MbidiNSM): New variable.
1490         (visual_order) [! HAVE_FRIBIDI]: Clear levels at first.  Pay
1491         attention to bidi type NSM.
1492         (mdraw__init): Initialize MbibiNSM.
1493
1494         * language.c (mscript__char_list): Fix finding a char-list element.
1495
1496         * plist.c (dump_string): Return number of printed characters.
1497         (dump_plist_element): Print elements more compactly.
1498
1499 2006-06-23  Kenichi Handa  <handa@m17n.org>
1500
1501         * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1502         (include_HEADERS): Likewise.
1503
1504 2006-06-23  TAKAHASHI Naoto  <ntakahas@m17n.org>
1505
1506         * language.c: Update documentation.
1507
1508 2006-06-23  Kenichi Handa  <handa@m17n.org>
1509
1510         * font-ft.c (struct MFontFT): Delete member lang.
1511         (free_ft_info): Don't unref member lang.  Destroy members langset
1512         and charset.
1513         (fc_parse_pattern): Last argument changed to MFontFT *.  Callers
1514         changed.  Set members langset and charset.
1515         (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1516         functions.
1517         (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1518         functions.
1519         (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1520         (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1521         (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1522         characters at first.  If it fails, try listing by language names.
1523         (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1524         (ft_check_language): Renamed from ft_check_lang.  Adjusted for the
1525         change of MFontCapability.
1526         (ft_list_capability): Likewise.  Try listing by languages, then by
1527         scripts.  Check OTF at last.
1528         (ft_check_script): New function.
1529         (ft_select): Adjusted for the check of MFontCapability.
1530         (ft_list_family_names): New function.
1531         (ft_check_capability): If cap->script is not Mnil, call
1532         ft_check_script.
1533         (mfont__ft_driver): Initialize with ft_list_family_names.
1534
1535         * font.h (struct MFontDriver): New member list_fmaily_names.
1536         (struct): Change member "MSymbol *lang" to "MSymbol language".
1537
1538         * font.c: Include "language.h".
1539         (Motf): New variable.
1540         (otf_script_list, load_otf_script_list): Delete it.
1541         (find_script_from_otf_tag): Delete it.
1542         (merge_capability): New function.
1543         (mfont__init): Init Motf.
1544         (mfont__fini): Don't unref otf_script_list.
1545         (free_font_capability): Check cap->script_tag to determine if
1546         OTF-related capability is set.
1547         (mfont__get_capability): Call mscript__from_otf_tag.  Adjusted for
1548         the change of type MFontCapability.
1549         (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1550         and Motf properties.
1551         (mfont_list): Call merge_capability for LANGUAGE arg.
1552         (mfont_list_family_names): New function.
1553
1554         * input-gui.c: Typo in comments fixed.
1555
1556         * input.c: Typo in comments fixed.
1557
1558         * language.h (mlanguage__list): Delete it.
1559         (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1560         functions.
1561
1562         * language.c: Include "mtext.h".
1563         (M_script_lang_list): Delete it.
1564         (language_list, script_list): New variables.
1565         (load_lang_script_list, init_language_list, init_script_list): New
1566         functions.
1567         (mlang__init): Don't load language database here.
1568         (mlang__fini): Unref language_list and script_list if not NULL.
1569         (mlanguage__list): Delete it.
1570         (mlanguage__info, mscript__info, mscript__char_list)
1571         (mscript__otf_tag, mscript__from_otf_tag): New functions.
1572         (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1573         (mscript_list, mscript_language_list): New functions.
1574
1575         * m17n-gui.h (mfont_list_family_names): Extern it.
1576
1577         * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1578         (mlanguage_text, mscript_list, mscript_language_list): Extern
1579         them.
1580
1581 2006-06-21  Kenichi Handa  <handa@m17n.org>
1582
1583         * m17n-X.c (xfont_driver): Initialize with
1584         xfont_list_family_names.
1585         (xfont_list_family_names): New function.
1586         (xft_driver): Initialize with NULL for list_family_names member.
1587         (device_init): Set list_family_names member of xft_driver to that
1588         of mfont__ft_driver.
1589
1590 2006-06-06  Kenichi Handa  <handa@m17n.org>
1591
1592         * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1593
1594 2006-03-24  Kenichi Handa  <handa@m17n.org>
1595
1596         * font-ft.c (ft_open): Improve debug message.
1597
1598         * fontset.c (mfontset__get_font): Fix for the case that no font in
1599         per_script list is available.
1600
1601 2006-02-06  Kenichi Handa  <handa@m17n.org>
1602
1603         * Version 1.3.3 released.
1604
1605 2006-02-22  Kenichi Handa  <handa@m17n.org>
1606
1607         * textprop.c: Fix some typos in documentation.
1608
1609         * plist.c: Fix some typos in documentation.
1610
1611         * m17n-core.h: Fix some typos in documentation.
1612         (M17NLIB_PATCH_LEVEL): Updated to 3.
1613         (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1614
1615         * symbol.c: Fix some typos in documentation.
1616
1617         * mtext.c: Fix some typos in documentation.
1618
1619         * input.c: Fix several typos in documentation.
1620
1621 2006-02-06  Kenichi Handa  <handa@m17n.org>
1622
1623         * Version 1.3.2 released.
1624
1625 2006-02-03  Kenichi Handa  <handa@m17n.org>
1626
1627         * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1628         (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1629
1630         * font.c (xlfd_parse_name): Fix handling of the name "nil".
1631
1632         * draw.c (layout_glyphs): Fix handling left_padding of
1633         composition's base.
1634
1635         * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1636
1637 2006-02-02  Kenichi Handa  <handa@m17n.org>
1638
1639         * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1640         if WITH_GUI is true.
1641
1642 2006-01-25  Kenichi Handa  <handa@m17n.org>
1643
1644         * input.c (resolve_expression): If the value of PLIST is a plist,
1645         but the first element is not symbol, return 0.
1646
1647 2006-01-17  Kenichi Handa  <handa@m17n.org>
1648
1649         * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1650         HAVE_GD is 2 or the greater.
1651
1652 2006-01-16  Kenichi Handa  <handa@m17n.org>
1653
1654         * Version 1.3.1 released.
1655
1656 2006-01-16  Kenichi Handa  <handa@m17n.org>
1657
1658         * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1659         simulating anti-aliasing.
1660
1661         * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1662         (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1663
1664 2006-01-12  Kenichi Handa  <handa@m17n.org>
1665
1666         * input.c (get_surrounding_text): Always pop ic->plist.
1667         (reset_ic): Don't reset ic->plist.
1668
1669 2006-01-10  Kenichi Handa  <handa@m17n.org>
1670
1671         * input.c (preedit_commit): For debugging, print only commiting
1672         charactes.  Don't set ic->candidate_show to 0.
1673         (handle_key): Don't run branch-actions just by shifting to the
1674         current state.
1675         (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1676         Reset vars and plist.
1677
1678 2006-01-07  Kenichi Handa  <handa@m17n.org>
1679
1680         * input.c (load_branch): Confirm that maps is not NULL.
1681
1682 2006-01-05  Kenichi Handa  <handa@m17n.org>
1683
1684         * input-gui.c (win_filter): Try to convert arg to key only when
1685         arg is not NULL.
1686
1687         * plist.c (read_integer_element): If '#' and '-' are followed by
1688         non-integer-constituent, read them as a part of a symbol.
1689         (read_symbol_element): New arg C.
1690         (read_element): Adjust args to read_symbol_element.
1691
1692         * input.c (load_macros): On overwriting a macro, free the old
1693         definition.
1694         (minput__init): Store Mmap in load_im_info_keys.
1695         (minput_get_title_icon): If the input method has no title, be sure
1696         to return NULL.
1697         (minput_get_description): If the input method has no description,
1698         be sure to return NULL.
1699         (minput_get_variables): Fix documentation.
1700         (handle_key): Pay attention to the case that key is Mnil.
1701         (filter): Likewise.  Fix handling of such symbol as S-A.
1702
1703 2005-12-22  Kenichi Handa  <handa@m17n.org>
1704
1705         * Version 1.3.0 released.
1706
1707 2005-12-22  Kenichi Handa  <handa@m17n.org>
1708
1709         * font-ft.c (ft_list): If the specified font has no property,
1710         return all fonts.
1711
1712 2005-12-20  Kenichi Handa  <handa@m17n.org>
1713
1714         * character.c (mchar_get_prop): Check char_prop_list.
1715         (mchar_put_prop, mchar_get_prop_table): Likewise.
1716
1717 2005-12-18  Kenichi Handa  <handa@m17n.org>
1718
1719         * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1720         file name sans language.
1721
1722 2005-12-16  TAKAHASHI Naoto  <ntakahas@m17n.org>
1723
1724         * input.c: Fix typo in comments.
1725
1726 2005-12-14  Kenichi Handa  <handa@m17n.org>
1727
1728         * input.c (minput_get_title_icon): Check the default icon for the
1729         input method.
1730
1731 2005-12-13  Kenichi Handa  <handa@m17n.org>
1732
1733         * input.c (Mless_equal, Mgreater_equal): New variables.
1734         (parse_expression, resolve_expression, parse_action_list)
1735         (take_action_list): Handle the aboves.
1736         (filter): Treat key S-X as X.
1737         (minput__init): Initialize Mless_equal and Mgreater_equal.
1738         (minput_get_title_icon): New function.
1739
1740         * m17n.h (minput_get_title_icon): Extern it.
1741
1742         * database.c (get_database_filename): Return a filename instead of
1743         file pointer.
1744         (load_database): Adjusted for the above change.
1745         (mdatabase__load_for_keys): Likewise.
1746         (mdatabase__find_file): New function.
1747
1748         * database.h (mdatabase__find_file): Extern it.
1749
1750         * font.h (mfont__resize): Delete extern.
1751
1752         * font.c (mfont__list): Check resize ratio.
1753         (mfont__resize): Delete it.
1754         (mfont_resize_ratio): Include the code of mfont__resize.
1755
1756         * font-ft.c (ft_open): Check resize ratio.
1757
1758         * m17n-X.c (xfont_open): Check resize ratio.
1759         (xft_open): Likewise.
1760
1761 2005-12-07  Kenichi Handa  <handa@m17n.org>
1762
1763         * input.c (take_action_list): If take_action_list return -1,
1764         return -1.
1765         (handle_key): Likewise.
1766
1767         * face.c (mface__for_chars): When font is specified and layouter
1768         is found for it, if the layouter doesn't support one of a
1769         character, use a face sans layouter for it.
1770
1771 2005-12-06  Kenichi Handa  <handa@m17n.org>
1772
1773         * fontset.c (mfont__lookup_fontset): If only a fallback font is
1774         found, don't use it for more than one character.
1775
1776 2005-12-05  Kenichi Handa  <handa@m17n.org>
1777
1778         * face.c (mface__realize): Set rfont->layouter to Mnil.
1779         (mface__for_chars): Fix handling of layouter.
1780
1781         * character.h (mchar__define_prop): Extern it.
1782
1783         * database.c (update_database_list): Call mchar__define_prop if
1784         necessary.
1785
1786         * character.c (mchar__init): Don't call mchar_define_property.
1787         Instead just initialize property keys.
1788         (mchar__fini): Free char_prop_list only if it's not NULL.
1789         (mchar__define_prop): New function.
1790         (mchar_define_property): Call mchar__define_prop.
1791
1792         * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1793         mplist__fini.
1794
1795 2005-12-02  Kenichi Handa  <handa@m17n.org>
1796
1797         * language.c (mlang__init): Handle extra chars.
1798
1799         * m17n-gui.h (mfont_check): Adjust prototype.
1800
1801         * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1802         (xfont_check_capability): New function.
1803         (xft_driver): Specify xft_check_capability.
1804         (xft_check_capability): New function.
1805
1806         * font-ft.c (M0_3): Delete it.
1807         (M0): New variable.
1808         (ft_get_charmaps): Refer to M0.
1809         (fc_parse_pattern): Fix previous change.
1810         (ft_list_language): Check also extra chars.
1811         (ft_check_otf): Define it even if HAVE_OTF is undef.
1812         (ft_check_lang): Check the result of FcLangSetHasLang against
1813         FcLangDifferentLang.  Check also extra chars.
1814         (ft_list_capability): Delete ifdef HAVE_OTF.
1815         (ft_select): Likewise.
1816         (ft_open): Improve debug information.
1817         (ft_check_capability): New function.
1818         (mfont__ft_driver): Specify ft_check_capability.
1819         (mfont__ft_init): Initialize M0.
1820
1821         * fontset.c (get_font_from_group): New function.
1822         (mfontset__get_font): New function.
1823
1824         * fontset.h (mfontset__get_font): Extern it.
1825
1826         * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1827         (mfont__fini): Delete ifdef HAVE_OTF.
1828         (free_font_capability): Likewise.
1829         (mfont__get_capability): Likewise.
1830         (mfont__check_capability): New function.
1831         (mfont_check): Change the order of arguments.  Use
1832         mfontset__get_font.
1833
1834         * font.h (struct MFontDriver): New member check_capability.
1835         (MFontCapability): Delete ifdef HAVE_OTF.
1836         (mfont__check_capability): Extern it.
1837
1838         * face.c (mface__realize): Fix handling of FONT arg.
1839         (mface__for_chars): Fix handling of explicitly specified font.
1840
1841 2005-11-25  Kenichi Handa  <handa@m17n.org>
1842
1843         * font-flt.c (run_command): Print debug info for
1844         left/rigth_padding
1845
1846         * draw.c (layout_glyphs): Fix handling of left/right_padding.
1847
1848         * face.c (mface__for_chars): Check rfont before accessing the
1849         members.
1850
1851 2005-11-21  Kenichi Handa  <handa@m17n.org>
1852
1853         * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1854         WITH_GUI.
1855
1856         * fontset.c (fontset_table): New variable.
1857         (free_fontset): Call M17N_OBJECT_UNREGISTER.
1858         (mfont__fontset_init): Add fontset_table as an object array.
1859         (mfont__realize_fontset): Ref FONTSET.
1860         (mfont__free_realized_fontset): Unref REALIZED->fontset.
1861         (mfontset): Call M17N_OBJECT_REGISTER.
1862         (mfontset_copy): Likewise.
1863
1864         * input.c (handle_key): For debugging, print information about
1865         alias key.
1866         (filter): Add an alias for Meta and Alt modifiers.
1867         (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1868         variables.
1869         (minput__init): Initialize them.
1870         (parse_expression): New function.
1871         (resolve_expression): New function.
1872         (parse_action_list): Handle expressions by parse_expression.
1873         (take_action_list): Handle expressions by resolve_expression.
1874         (parse_nested_list_value): Fix previous change.
1875         (resolve_command): Fix handling of the return value of
1876         get_nested_list.
1877
1878 2005-11-18  Kenichi Handa  <handa@m17n.org>
1879
1880         * font-ft.c (ft_check_otf, otf_script_list): Define only when
1881         HAVE_OTF is defined.
1882         (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1883         defined.
1884         (ft_select): Likewise.
1885
1886         * font.c (mfont_list): Fix for the case that FONT is NULL.
1887         (OTF_tag): Delete it.
1888         (load_otf_script_list): Define only when HAVE_OTF is defined.
1889         (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1890         defined.
1891
1892         * draw.c (truncate_gstring): Be sure to truncate at
1893         glapheme-cluster boundary.
1894
1895 2005-11-11  Kenichi Handa  <handa@m17n.org>
1896
1897         * input.c (delete_surrounding_text): Clear cache if necessary.
1898
1899 2005-11-09  Kenichi Handa  <handa@m17n.org>
1900
1901         * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1902         glyph prev is also supported by the current flt.
1903
1904 2005-11-08  Kenichi Handa  <handa@m17n.org>
1905
1906         * m17n-X.c (xft_render): Cancel previous change.
1907
1908 2005-11-07  Kenichi Handa  <handa@m17n.org>
1909
1910         * input.c: Include <stdlib.h>.
1911         (get_surrounding_text, delete_surrounding_text)
1912         (get_preceding_char, get_following_char): New functions.
1913         (integer_value): New arg surrounding.  If it is nonzero, try to
1914         get a surrounding character.  Callers changed.
1915         (take_action_list): Check `value' before setting an element.
1916         (destroy_ic): Unref ic_info->preceding_text and
1917         ic_info->following_text.
1918         (minput__init): Initialize Minput_get_surrounding_text and
1919         Minput_delete_surrounding_text.
1920         (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1921         variables.
1922         (filter): Unref ic_info->preceding_text and
1923         ic_info->following_text.
1924
1925         * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1926         Extern them.
1927
1928         * input.h (MInputContextInfo): New members preceding_text and
1929         following_text.
1930
1931 2005-11-04  Kenichi Handa  <handa@m17n.org>
1932
1933         * input.c (parse_nested_list_value): Fix handling of the global
1934         definition.
1935         (get_nested_list): Get global definitions by load_partial_im_info.
1936         (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1937         MInputCandidatesChanged.
1938         (take_action_list): Likewise.
1939         (reset_ic): Likewise.
1940         (create_ic): Don't pay special attention to
1941         Mcandidates_group_size.
1942         (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1943         (minput_set_variable): Get a definition of varible by
1944         mplist_find_by_value, not mplist_get.
1945
1946         * m17n.h (enum MInputCandidatesChanged): New enum.
1947
1948 2005-11-01  Kenichi Handa  <handa@m17n.org>
1949
1950         * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1951         it.
1952         (mwin__destroy_window): If xft_draw's drawable is win, change it
1953         to device->drawable before destroying win.
1954
1955 2005-10-31  Kenichi Handa  <handa@m17n.org>
1956
1957         * input.c (load_im_info): Fix adding of state.
1958
1959         * m17n-core.c (m17n_fini_core): Fix reporting of module
1960         finalization.
1961
1962         * m17n.c (m17n_fini): Fix reporting of module finalization.
1963
1964         * m17n-gui.c (m17n_init_win): Fix reporting of module
1965         finalization.
1966
1967 2005-10-29  Kenichi Handa  <handa@m17n.org>
1968
1969         * input.c (get_candidate_list): Fix the timing of referring plist.
1970
1971 2005-10-28  Kenichi Handa  <handa@m17n.org>
1972
1973         * input.c (load_branch): Ignore an undefined map name.
1974         (load_im_info): Set im_info->title from `name' only if it's not
1975         Mnil.
1976         (shift_state): Always update ic->status.
1977         (adjust_candidates): Renamed from adjust_candidate_command.
1978         Argument changed.  Caller changed.
1979         (get_candidate_list, regularize_action): New functions.
1980         (take_action_list): Use them.  On handling Munhandle, don't set
1981         ic_info->used to 0.
1982         (handle_key): If KEY is not handled by MAP, and MAP has
1983         branch_actions, perform them.
1984
1985         * database.c (mdatabase__fini): Free dir_info->filename;
1986
1987 2005-10-20  Kenichi Handa  <handa@m17n.org>
1988
1989         * input.c (marker_code): Accept '@@'.
1990         (integer_value): Handle '@@'.
1991         (parse_action_list): Accept a symbol argument.
1992         (take_action_list): Resolve the symbol argument.  Handle the
1993         integer argument.
1994
1995 2005-10-18  Kenichi Handa  <handa@m17n.org>
1996
1997         * input.c: Include "charset.h".
1998         (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1999         variables.
2000         (MIMState): New member (M17NObject control).
2001         (lookup_nested_list, set_nested_list, parse_nested_list_value)
2002         (get_nested_list, resolve_variable): New functions.
2003         (integer_value): New arg (MPlist **value).  Set it to the plist
2004         element containing the value.
2005         (resolve_command): New function.
2006         (load_translation): New arg (MPlist *map_actions).
2007         (load_branch): New args language and name.  If `keylist' is a
2008         symbol, resolved that as a command name.
2009         (free_map): New arg top.  Free map->map_actions only if top is
2010         nonzero.
2011         (free_state): New function.
2012         (load_state): New arg name.
2013         (im_info_list): New variable.
2014         (free_im_info, get_im_info_by_tags): New functions.
2015         (load_im_info): Arg key changed to plist.  Handle `include'.
2016         Return (MInputMethodInfo *).
2017         (preedit_commit): Ref ic->candidate_list.
2018         (get_select_charset, adjust_candidate_command): New functions.
2019         (take_action_list): Handle `include'.  Adjust candidate action
2020         properly.  Handle control variables `candidates-charset' and
2021         `candidates-group-size'.
2022         (open_im): Use get_im_info.
2023         (create_ic): Get global variables.
2024         (load_partial_im_info): New function.
2025         (get_im_info): New function.
2026         (check_command_keyseq, check_command_list, check_variable_list):
2027         New functions.
2028         (minput__init): Don't handle M_database_hook and Mdetail_text.
2029         Initialize M_candidates, Mcandidates_group_size,
2030         Mcandidates_charset.
2031         (parse_variable_list, get_variable_list, parse_command_list)
2032         (get_command_list): Delete them.
2033         (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2034         (minput__fini): Simply unref command_list and variable_list.
2035         (minput_get_description): Adjusted for the new form of description.
2036         (minput_get_commands): Use get_nested_list.
2037         (minput_assign_command_keys): Likewise.
2038         (minput_get_variables, minput_set_variable): Likewise.
2039
2040         * input.h (MInputMethodInfo): New members im and maps.
2041
2042         * database.h (M_database_hook): Delete extern.
2043         (MDatabaseHookFunc): Delete extern.
2044         (mdatabase__check): Extern it.
2045
2046         * database.c: Include <glob.h>.
2047         (MAX_TIME): New macro.
2048         (Masterisk): New variable.
2049         (get_database_stream): Argument changed to (MDatabaseInfo *).
2050         Callers changed.
2051         (get_dir_info): Renamed from duplicate_dirname.  Callers changed.
2052         (find_database): New function.
2053         (update_database_list): New function.
2054         (mdatabase__init): Initialize Masterisk.  Setup mdb_list by
2055         calling update_database_list.
2056         (mdatabase__check): New function.
2057         (mdatabase_find): Use update_database and find_database.  Don't
2058         handle MDatabaseHookFunc.
2059         (mdatabase_list): Call update_database at first.
2060         (mdatabase_define): Adjusted for the change of mdb->extra_info.
2061         (MDatabaseList): New type.
2062
2063         * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2064
2065         * m17n.h (Mdetail_text): Delete extern.
2066
2067         * m17n-core.h (mplist_conc): Delete extern.
2068
2069         * plist.c (mplist__conc): Renamed from mplist_conc.  Don't ref
2070         tail.
2071         (mplist_conc): Renamed to mplist__conc.
2072         (mplist__pop_unref): New function.
2073
2074 2005-10-14  Kenichi Handa  <handa@m17n.org>
2075
2076         * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2077         newline.
2078         (read_element): If keys is an empty plist, return any element
2079         found first.
2080         (dump_plist_element): Check if plist is nested.
2081         (mplist_conc): Always ref tail.
2082         (mplist_set): If key is a managing key, ref val in advance.
2083
2084         * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2085         (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2086         (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2087         macros.
2088
2089         * fontset.c (free_fontset): Unref fontset_list if necessary.
2090         (mfont__fontset_fini): Don't free fontset_list.  Unref
2091         default_fontset.
2092         (mfont__realize_fontset): Initialize request.
2093         (mfontset): Ref default_fontset or fontset only if necessary.
2094         (mfontset_copy): Don't ref copy.
2095
2096         * draw.c (render_glyphs): Check gend->type before checking
2097         gend->to.
2098
2099         * font-ft.c (mfont__ft_fini): Unref ft_default_list.  Set all
2100         unrefed plists to NULL.
2101
2102 2005-10-04  Kenichi Handa  <handa@m17n.org>
2103
2104         * textprop.c (mtext_serialize): Be sure to make mt
2105         MTEXT_FORMAT_UTF_8 and NULL terminated.
2106
2107         * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2108
2109         * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2110
2111 2005-10-03  Kenichi Handa  <handa@m17n.org>
2112
2113         * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2114         is not at the beginning of line.
2115
2116 2005-09-22  Kenichi Handa  <handa@m17n.org>
2117
2118         * input.c: Include <sys/stat.h> and <unistd.h>.
2119         (Minclude, Mcommit, Munhandle): New variables.
2120         (minput__init): Initialize them.  Push only Mstate to
2121         load_im_info_keys.   Add aliases C-lowercase for C-uppercase.
2122         (parse_action_list): Allow integer arg for undo.  Handle Mcommit
2123         and Munhandle.
2124         (load_input_method): Handle "include" directive.  If no states are
2125         loaded, return -1.
2126         (shift_state): If state_name is Mt, shift back to the previous
2127         state.  Call preedit_commit to commit preedit text.
2128         (preedit_commit): New function.
2129         (take_action_list): Improve debug printing.  Handle commit and
2130         unhandle commands.
2131         (handle_key): Check the return value of take_action_list.  Don't
2132         take branch_actions just after changing to the root map.
2133         (reset_ic): Reset all ic_info members.
2134         (filter): When a key is not handled, just move ic_info->keys
2135         instead fo calling reset_ic.
2136         (load_im_info): If key is not Mstate, push Mmap to
2137         load_im_info_keys.
2138         (MDatabaseStatList): New type.
2139         (imdir_stat_list): New variable.
2140         (input_method_hook): Don't cancel the hook.  Check the
2141         modification time of directories.
2142         (minput__fini): Free imdir_stat_list;
2143
2144         * input.h (MInputContextInfo): New member prev_state.
2145
2146         * m17n-core.h (mplist_conc): Extern it.
2147
2148         * plist.c (mplist_conc): New function.
2149
2150         * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2151
2152         * font.h (MRealizedFont): New member average_width.
2153
2154         * font-ft.c (ft_open): Set rface->average_width.
2155
2156         * font.c (xlfd_unparse_name): Print '*' before registry name.
2157
2158         * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2159         (xfont_open): Set rfont->average_width.
2160         (xft_open): Likewise.
2161         (device_open): Initialize disp_info->AVERAGE_WIDTH.
2162
2163         * internal-gui.h (struct MFrame): New member average_width.
2164
2165         * m17n-gui.c (mframe): Fix setting of frame->rfont.
2166         (mframe_get_prop): Return the average_width of a font.
2167
2168         * face.c (mface__realize): Set rface->average_width.
2169         (mface__update_frame_face): Set frame->average_width.
2170
2171         * face.h (MRealizedFace): New member average_width.
2172
2173 2005-09-19  Kenichi Handa  <handa@m17n.org>
2174
2175         * font.c (xlfd_unparse_name): New arg full_xlfd.
2176         (mfont__encode_char): Use shortcut only for X core fonts.
2177         (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2178         (mfont_put_prop): Handle `language' property.
2179         (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2180         Print file can capability info too.
2181
2182         * m17n-core.c (mdebug__output): New variable.
2183         (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2184         (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2185         (m17n_fini_core): Close mdebug__output if it's not stderr.
2186
2187         * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2188         (xfont_open): Handle baseline_offset.
2189         (xfont_find_metric): Likewise.
2190         (xfont_render): Likewise.
2191         (xft_open): Likewise.
2192         (xft_render): Likewise.
2193
2194         * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2195         (mdebug__output): Extern it.
2196         (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2197         (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2198         (MDEBUG_DUMP): New macro.
2199         (MDEBUG_PRINT_TIME): Print to medebug__output.
2200
2201         * font.h (MRealizedFont): New member baseline_offset.
2202
2203         * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2204         characters.
2205         (fc_weight_table): Add FC_WEIGHT_REGULAR.
2206         (ft_list_family): Check alias.
2207         (ft_list_language): If language is "en", don't try to the second
2208         step.
2209         (ft_default_list): New variable.
2210         (ft_list_default): New function.
2211         (ft_select): If family is not specified, try only the default
2212         fonts.  Treat the weights normal and medium same.
2213         (ft_open): Fix debug message.  If registry is not specified, try
2214         unicode-bmp.  Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2215         (ft_find_metric): Likewise.
2216         (ft_render): Likewise.
2217         (ft_list): Fix debug message.  Accept the registring iso8859-1.
2218         If family is not specified, try only the default fonts.
2219
2220         * face.c (mface__realize): Fix logic of opening a font.
2221
2222 2005-09-16  Kenichi Handa  <handa@m17n.org>
2223
2224         * face.c (mface__realize): 
2225
2226         * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2227         Extern them.
2228
2229         * input.c (shift_state): Fix the condition of taking init actions.
2230         (take_action_list): Fix handling of pushback action.
2231         (handle_key): Don't change key while checking its alias.
2232         (minput__init): Initialize new variables.
2233         (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2234         variables.
2235
2236 2005-09-12  Kenichi Handa  <handa@m17n.org>
2237
2238         * mtext.c (mtext__uppercase): Add proper open/close parens.
2239         (mtext_titlecase): Add proper casting.
2240
2241         * input.c (parse_action_list): Handle the case that the arg is a
2242         key sequence (MText or MPlist).
2243         (take_action_list): Likewise.
2244         (shift_state): Shorter debug message.
2245         (handle_key): Terminate a debug message by "\n".
2246         (reset_ic): Don't take initial actions here.
2247         (minput_open_im): Print a debug message.
2248         (minput_close_im): Likewise.
2249         (minput_create_ic): Likewise.
2250         (minput_destroy_ic): Likewise.
2251
2252 2005-09-09  TAKAHASHI Naoto  <ntakahas@m17n.org>
2253
2254         * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2255         Change API.
2256
2257 2005-09-07  TAKAHASHI Naoto  <ntakahas@m17n.org>
2258         * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2259         mchar__init ().
2260
2261         * character.c: Add Japanese documentation for
2262         mchar_get_prop_table ().
2263
2264 2005-09-06  TAKAHASHI Naoto  <ntakahas@m17n.org>
2265
2266         * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2267         (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2268         (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2269         New variables.
2270         (init_case_conversion): New function.
2271         (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2272         (uppercase_precheck, lowercase_precheck, final_sigma)
2273         (after_soft_dotted, more_above, before_dot, after_i)
2274         (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2275
2276 2005-09-05  TAKAHASHI Naoto  <ntakahas@m17n.org>
2277
2278         * plist.c (read_mtext_element): Fix previous change.
2279
2280 2005-09-05  Kenichi Handa  <handa@m17n.org>
2281
2282         * plist.c (read_mtext_element): Handle \uXXXX notation.
2283
2284         * internal.h (MTABLE_MALLOC): Don't use a local variable.
2285         (MTABLE_ALLOCA): Change the name of local variable.
2286
2287         * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2288         HAVE_FREETYPE are defined.
2289
2290         * m17n-X.c: Check HAVE_X11.
2291
2292         * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2293         directory listing libraries.
2294         (noinst_PROGRAMS): Define it only in maintainer mode.
2295
2296 2005-09-02  Kenichi Handa  <handa@m17n.org>
2297
2298         * m17n-gui.h (mdraw_line_break_option): Extern it.
2299
2300         * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2301         end of the first glyph.
2302         (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2303         them.
2304         (mdraw_line_break_option): New variable.
2305         (mdraw_default_line_break): Use mtext_line_break.
2306
2307         * mtext.h (wordseg_func_table): Don't extern it.
2308         (mtext__wseg_fini): Extern it.
2309
2310         * mtext.c: Don't include word-thai.h.
2311         (wordseg_func_table): Delete this variable.
2312         (mtext__init): Don't initialize above.  Don't call
2313         mtext__word_thai_init.
2314         (mtext__fini): Don't free wordseg_func_table.  Call
2315         mtext__wseg_fini instead fo mtext__word_thai_fini.
2316         (MTextWordsegFunc): Don't typedef it.
2317         (mtext__word_segment): Moved to mtext-wseg.c.
2318
2319         * m17n-core.h (enum MTextLineBreakOption): New enum.
2320         (mtext_line_break): Extern it.
2321
2322         * mtext-wseg.c: New file.
2323
2324         * mtext-lbrk.c: New file.
2325
2326         * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2327         add mtext-lbrk.c and mtext-wseg.c.
2328
2329         * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2330         the case that head is NULL.
2331
2332 2005-09-01  Kenichi Handa  <handa@m17n.org>
2333
2334         * word-thai.c (wordseg_propertize): If the property value is nil,
2335         don't make the property no-merge.
2336         (thai_wordseg): Don't require *from and *to are set a priori.  Pay
2337         attention to the case that they are NULL.
2338         (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2339         with two spaces.
2340
2341         * character.c (mchar_get_prop_table): New function.
2342
2343         * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2344
2345         * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2346         (mchar_get_prop_table): Extern it.
2347
2348         * textprop.c (prepare_to_modify): New arg deleting.  Callers changed.
2349         (mtext__adjust_plist_for_change): Argument changed.  Callers changed.
2350
2351         * internal.h (enum MTextCoverage): New enum.
2352         (MText): New member coverage.
2353
2354         * mtext.c (FORMAT_COVERAGE): New macro.
2355         (insert): Copy mt2->coverage.
2356         (mtext__from_data): Initialize mt->coverage.
2357         (mtext__adjust_format): Update mt->coverage.
2358         (mtext): Initialize mt->coverage.
2359         (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2360         Update mt->coverage if necessary.
2361         (mtext_duplicate): Copy mt->coverage.
2362         (mtext_insert, mtext_replace): New functions.
2363         (mtext_dup): Use mtext_duplicate.
2364         (mtext__word_segment): Don't set *from and *to if a word
2365         segmentation funcion is not found.
2366         (mtext_ins_char): Fix typo.
2367
2368 2005-08-25  Kenichi Handa  <handa@m17n.org>
2369
2370         * font.h (MFont): New member for_full_width.
2371
2372         * font.c (compare_font_score): Prefer a font of not
2373         for_full_width.
2374
2375         * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2376         registry charset of a font is one of CJK charsets.
2377
2378         * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2379         supports some of CJK.
2380
2381 2005-08-24  Kenichi Handa  <handa@m17n.org>
2382
2383         * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2384
2385         * m17n-gui.c (null_device_open): Check Mresolution param and set
2386         frame->dpi.
2387
2388         * m17n-gd.c (device_open): Check Mresolution param and set
2389         frame->dpi.
2390
2391         * m17n-X.c (MWDevice): New member resy.
2392         (xfont_open): Set ascent, descent, and max_advance members of
2393         rfont.
2394         (xft_open): Likewise.
2395         (device_open): Compare also screen_num to find a device.  Set
2396         device->resy and frame->dpi.
2397
2398         * internal-gui.h (MFrame): New member dpi.
2399
2400         * font.h (MRealizedFont): New member max_advance.
2401
2402         * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2403         (mfont__init): Don't initialize Mascent, Mdescent.
2404         (Mascent, Mdescent): Delete these variables.
2405         (mfont_get_prop): Fix previous change.  Check Mfont_ascent and
2406         Mfont_descent instead of Mascent and Mdescent.
2407         (mfont_put_prop): Allow negative size.
2408         (mfont_find): Handle the case of spec->size < 0.  Fix previous
2409         change.
2410         (mfont_list): Handle the case of spec->size < 0.
2411         (mfont_check): Likewise.
2412
2413         * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2414         (fc_get_pattern): Handle the case of font->size < 0.
2415         (ft_open): Set ascent, descent, and max_advance members of rfont.
2416         (ft_find_metric): Improve rounding.
2417         (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2418         FC_SIZE.
2419
2420         * face.c (mface__realize): Handle the case of font->size < 0.
2421
2422 2005-08-22  Kenichi Handa  <handa@m17n.org>
2423
2424         * coding.c (MConverterStatus): Change the member buf to union.
2425         (mconv_buffer_converter): Add const to the arg buf.
2426         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2427         (mconv_decode): Adjusted for the change of MConverterStatus.
2428         (mconv_encode_range): Likewise.
2429
2430         * m17n.h (mconv_buffer_converter): Prototype adjusted.
2431         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2432
2433 2005-08-20  Kenichi Handa  <handa@m17n.org>
2434
2435         * m17n-gui.h (mfont_from_name): Prototype adjusted.
2436         (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2437
2438         * m17n-X.c (xfont_open): Set members ascent, descent, and
2439         max_advance of rfont.
2440         (xft_open): Likewise.
2441
2442         * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2443         of rfont.
2444         (mfont__ft_parse_name): Add const to the arg name.
2445
2446         * font.c (xlfd_parse_name): Add const to the arg name.  Call
2447         mfont__set_property instead of mfont_set_spec.  Set font->spacing.
2448         (xlfd_unparse_name): Handle spacing.
2449         (mfont__init): Initialize new variables.
2450         (mfont__id): Handle spacing.
2451         (mfont__merge): Likewise.
2452         (mfont__set_spec): This function deleted.
2453         (mfont__parse_name_into_font): Add const to the arg name.  Fix the
2454         condition of calling mfont__ft_parse_name.
2455         (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2456         (mfont_get_prop): Handle properties spacing, ascent, descent,
2457         and max-advance.
2458         (mfont_find): Return a realized font.
2459         (mfont_from_name): Add const to the arg name.
2460
2461         * font.h (enum MFontProperty): New member MFONT_SPACING.
2462         (enum MFontSpacing): New enum.
2463         (MFont): New members spacing and max_advance.
2464         (mfont__ft_parse_name): Prototype adjusted.
2465         (mfont__set_spec): Extern deleted.
2466         (mfont__parse_name_into_font): Prototype adjusted.
2467
2468 2005-08-19  Kenichi Handa  <handa@m17n.org>
2469
2470         * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2471
2472         * font.c (mfont_list): If FONT is null, use a temporary font.
2473         (mfont_parse_name): Add const to the arg name.
2474
2475 2005-08-18  Kenichi Handa  <handa@m17n.org>
2476
2477         * word-thai.c: Surround code by #ifdef and #endif to escape from
2478         doxygen.
2479
2480         * font-ft.c: Mostly re-written.
2481
2482         * font-flt.c (FontLayoutCmdOTF): This type deleted.
2483         (FontLayoutCmd): Type of the member otf changed..
2484         (load_otf_command): Adjusted for the format change of otf command.
2485         (load_command): Likewise.
2486         (free_flt_command): Unref cmd->body.otf.
2487         (run_otf): Ajusted for the type change of otf_cmd.
2488         (run_command): Ajusted for the type change of otf_cmd.  On
2489         debugging, print ctx->combining_code.
2490         (mfont__flt_run): Initialize ctx's members code_offset,
2491         combining_code, and left_padding to 0.
2492
2493         * face.h (struct MRealizedFace): New member font.
2494         (mface__realize): Prototype adjusted.
2495
2496         * face.c (find_realized_face): New arg font.
2497         (find_realized_face): Adjusted for the change of MFont.
2498         (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2499         (mface__fini): Don't call mdebug__report_object.
2500         (mface__realize): New arg font.
2501         (mface__for_chars): Adjusted for the change of mfont__encode_char.
2502         Optimize the latin case.
2503         (mface__free_realized): Free rface->font.
2504         (mface__update_frame_face): Adjusted for the change of mface__realize.
2505         (mface_equal): New function.
2506
2507         * draw.c (Mcommon): New variable.
2508         (visual_order): Args to mfont__encode_char changed.
2509         (compose_glyph_string): Handle Mfont text property.
2510         (layout_glyphs): Adjusted for the change of MFont.
2511         (mdraw__init): Initialize Mcommon.
2512         (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2513
2514         * font.h (enum MFontType): Members completely changed.
2515         (enum MFontProperty): Move MFONT_SIZE to the tail.
2516         (enum MFontSource): New enum.
2517         (struct MFont): New members type, source, sizes, file, capability,
2518         and encoding.
2519         (struct MRealizedFont): Type of member font changed. Members
2520         score, status, and encoding deleted.
2521         (MFontScore): New type.
2522         (MFontList): Member changed.
2523         (struct MFontDriver): New member has_char.  Types of members
2524         changed.
2525         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2526         (Mapple_roman): Extern them.
2527         (OTF_Tag): Typedefed if not HAVE_OTF.
2528         (enum MFontOpenTypeTable): New enum.
2529         (MFontCapability): New type.
2530         (mfont__ft_drive_otf): Prototype adjusted.
2531         (mfont__score): Extern deleted.
2532         (mfont__merge): Extern it.
2533         (mfont__has_char): Extern it.
2534         (mfont__encode_char): Prototype adjusted.
2535         (mfont__open): Extern it.
2536         (mfont__set_spec): Prototype adjusted.
2537         (mfont__get_capability): Extern it.
2538
2539         * font.c: Include "fontset.h".
2540         (M_font_capability, M_font_list, M_font_list_len): New variables.
2541         (font_score_priority): Change order of initial elements.
2542         (font_score_shift_bits): Fix array size.
2543         (common_weight): Add "thin", "semibold", and "heavy".
2544         (common_stretch): Add "ultracondensed", "extracondensed",
2545         "extraexpanded", and "utltraexpand".
2546         (font_weight_regular, font_weight_normal, font_weight_medium): New
2547         variables.
2548         (gen_font_name): This function deleted.
2549         (find_encoding): Set font->encoding.
2550         (OTF_tag): New function.
2551         (otf_script_list): New variable.
2552         (load_otf_script_list): New function.
2553         (find_script_from_otf_tag): New function.
2554         (xlfd_parse_name): Set font->type and font->source.
2555         (mfont__free_realized): Free chains rfonts.
2556         (font_score): Renamed from mfont__score.
2557         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2558         (Mapple_roman): New variables.
2559         (mfont__init): Initilize new variables.  Initalize
2560         default_encoding.encoding_name and
2561         default_encoding.encoding_charset to Municode_full and
2562         mcharset__unicode.  Use SAFE* macros for allocating filepath
2563         buffer.
2564         (mfont__fini): Free otf_script_list.
2565         (mfont__id): New function.
2566         (mfont__match_p): Check also capability member of MFont.
2567         (mfont__merge): New funciton.
2568         (mfont__set_spec_from_face): Set type and source members.
2569         (mfont__set_spec_from_plist): Set capability and type members.
2570         (mfont__select): Argument changed.
2571         (mfont__available): New function.
2572         (compare_font_score): New function.
2573         (mfont__list): New function.
2574         (mfont__open): Return a realized font.
2575         (mfont__resize): Adjusted for the change of MFont.
2576         (mfont__has_char): New function.
2577         (mfont__encode_char): Argument changed.
2578         (mfont__set_spec): Argument changed.
2579         (free_font_capability): New function.
2580         (mfont__get_capability): New function.
2581         (MFontfile): New variable.
2582         (mfont_get_prop): Adjusted for the change of MFont.
2583         (mfont_put_prop): Likewise.
2584         (mfont_set_selection_priority): Fix the way of setting
2585         font_score_priority[].
2586         (mfont_find): Use mfont__list instead of mfont__select.
2587         (mfont_resize_ratio): Adjusted for the change of MFont.
2588         (mfont_list): Use mfont__list.
2589         (mfont_check): New function.
2590         (font_score): Make it static.
2591
2592         * fontset.h (mfont__realize_fontset): Prototype adjusted.
2593         (mfont__lookup_fontset): Likewise.
2594
2595         * fontset.c (struct MFontset): Delete member font_spec_list.
2596         (struct MRealizedFontset): Type of member spec changed.  New
2597         member request.
2598         (load_font_group): Arg spec_list deleted.
2599         (load_fontset_contents): Adjusted for the change of fontset_def.
2600         (free_fontset): Fix the way of freeing fontset elements.
2601         (realize_fontset_elements): Argument changed.
2602         (get_per_script): New function.
2603         (free_realized_fontset_elements): Fix the way of feeing rfontset
2604         elements.
2605         (update_fontset_elements): Fix args to realize_fontset_elements.
2606         (mfont__realize_fontset): New arg spec.
2607         (try_font_list): New function.
2608         (try_font_group): New arg request.  Use try_font_list.
2609         (mfont__lookup_fontset): New arg ignore_fallback.  Fix arg to
2610         try_font_group.
2611         (mfontset): Adjusted for the change of MFontset.
2612         (mfontset_copy): Likewise.  Don't share plists.
2613         (mfontset_modify_entry): Adjusted for the change of MFontset.
2614         (mfontset_lookup): Call get_per_script.
2615         (mdebug_dump_fontset): Print also the address of fonts.
2616
2617         * input.c (shift_state): Don't reset ic_info->vars.
2618         (take_action_list): Call MDEBUG_PRINT fore calling
2619         take_action_list.
2620
2621         * internal-gui.h (MFontDriver): Don't typedef it here.
2622
2623         * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2624         (MXFont): This type deleted.
2625         (MFontX): New type.
2626         (struct _MFontX): New struct.
2627         (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2628         (MDisplayInfo): Member base_font_list deleted.
2629         (DEFAULT_FONT): Definition changed.
2630         (FALLBACK_FONT): This maclr deleted.
2631         (free_display_info): Adjusted for the change of MDisplayInfo.
2632         (free_device): Argument to mfont__free_realized changed.
2633         (xfont_driver): Adjusted for the change of MFontDriver.
2634         (xfont_registry_list): Use MFontX instead of MXFont.
2635         (MRealizedFontX): Renamed from MXFontInfo.
2636         (xfont_select): Return the font found first.
2637         (close_xfont): Change MXFontInfo to MRealizedFontX.
2638         (xfont_open): Return the realized font.
2639         (xfont_find_metric): Get xfont from rfont->fontp.
2640         (xfont_has_char): New function.
2641         (xfont_encode_char): Adjusted for the argument change.
2642         (xfont_render): Get xfont from rfont->fontp.
2643         (xfont_list): Adjusted for the argument change.
2644         (MRealizedFontXft): Renamed from MXftFontInfo.
2645         (xft_driver): Ajusted for the change of MFontDriver.
2646         (close_xft): Change MXtfFontInfo to MRealizedFontXft
2647         (xft_open_font): Argument changed.
2648         (xft_open): Argument changed.  Return the realized font.
2649         (xft_find_metric): Get xft_font from rfont->fontp.
2650         (xft_has_char, xft_encode_char): New functions.
2651         (xft_render): Change MXftFontInfo to MRealizedFontXft.  Open a
2652         font if not yet opened.
2653         (device_open): Don't set frame->font.
2654
2655         * m17n-gd.c (gd_font_driver): Adjusted for the change of
2656         MFontDriver.
2657         (gd_font_open): New function.
2658         (gd_render): Don't use the local variable ft_info.
2659         (device_init): Adjusted for the change of gd_font_driver.
2660
2661         * textprop.c (mtext__prop_init): Initialize text_property_table.
2662         Call M17N_OBJECT_ADD_ARRAY.
2663         (mtext__prop_fini): Don't call mdebug__report_object.
2664
2665         * plist.c (mplist__init): Initialize plist_table.
2666         (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2667         (mplist__fini): Don't call mdebug__report_object.
2668
2669         * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2670         (mtext__fini): Don't call mdebug__report_object.
2671         (MTEXT_FORMAT_UTF_16): Correct type.
2672         (mtext_data): New function.
2673         (mtext_text): Fix calculation of limit and args to
2674         find_char_backward.
2675
2676         * language.c: Include "plist.h".
2677         (M_script_lang_list): New variable.
2678         (mlang__init): Read languages and their information from m17n
2679         database.
2680         (mlanguage__list): New function.
2681         (Miso639_1, Miso639_2): New variables.
2682
2683         * language.h (mlanguage__list): Extern it.
2684
2685         * database.c (get_database_stream): Use SAFE_* macros for
2686         allocating and freeing path.
2687         (mdatabase__init): Likewise.
2688
2689         * symbol.c (msymbol__fini): Don't free symbols here.
2690         (msymbol__free_table): New function.
2691         (msymbol_is_managing_key): New function.
2692
2693         * symbol.h (msymbol__free_table): Extern it.
2694         (msymbol__list): Extern it.
2695
2696         * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2697         New macros.
2698         (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2699         (struct _M17NObjectArray): New member name and next.
2700         (mdebug__add_object_array): Extern it.
2701         (M17N_OBJECT_ADD_ARRAY): New macro.
2702         (mdebug__report_object): Don't extern it.
2703
2704         * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2705
2706         * m17n-gui.c (free_frame): Don't free frame->font.
2707         (null_device_fini): Fix code for freeing
2708         null_device.realized_font_list.
2709         (m17n_fini_win): Free interface.
2710         (mframe): Cast the return value of dlsym.  Set frame->font here.
2711         (mframe_get_prop): Check frame->rface->rfont before accessing the
2712         member font.
2713
2714         * m17n-gui.h (Mfontfile): Extern it.
2715         (mfont_check): Extern it.
2716         (mface_equal): Extern it.
2717
2718         * m17n-core.c: Include "symbol.h".
2719         (report_header_printed): This variable deleted.
2720         (object_array_root): New variable.
2721         (report_object_array): New function.
2722         (mdebug__report_object): This function deleted.
2723         (mdebug__add_object_array): New function.
2724         (m17n_init_core): Call mchartable_init () before mtext_init ().
2725         (m17n_fini_core): Call report_object_array (if necessary) and
2726         msymbol__free_atable at the end.
2727
2728         * m17n-core.h (msymbol_is_managing_key): Extern it.
2729         (mtext_data): Extern it.
2730         (MTEXT_FORMAT_UTF_16): Correct type.
2731         (M17NLIB_MINOR_VERSION): Changed to 3.
2732         (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2733
2734         * chartab.c (mchartable__init): Initalize chartable_table.count.
2735         (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2736         mdebug__report_object.
2737
2738 2005-05-26  Kenichi Handa  <handa@m17n.org>
2739
2740         * m17n.h (Miso639_1, Miso639_2): Extern them.
2741
2742         * symbol.h (msymbol__list): Extern it.
2743
2744         * symbol.c (msymbol__list): New function.
2745
2746 2005-05-19  Kenichi Handa  <handa@m17n.org>
2747
2748         * input-gui.c (minput__win_init): Don't change the value of
2749         minput_driver.
2750
2751 2005-05-16  Kenichi Handa  <handa@m17n.org>
2752
2753         * m17n-core.c (m17n_object): Be sure to initialize all members.
2754
2755         * font-ft.c (fc_decode_prop): Fix args to msymbol.
2756
2757 2005-05-09  Kenichi Handa  <handa@m17n.org>
2758
2759         * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2760
2761 2005-04-27  Kenichi Handa  <handa@m17n.org>
2762
2763         * language.c (mlang__init): Add "an" (Aragonese).
2764
2765         * word-thai.c: Add support for libthai.
2766         (mtext__word_thai_init): Initialize wordseg library conditionaly.
2767         (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2768
2769         * mtext.c: Include "word-thai.h" conditionaly.
2770         (mtext__init): Call mtext__word_thai_init conditionaly.
2771         (mtext__fini): Call mtext__word_thai_fini conditionaly.
2772
2773         * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2774         not WORDCUT_LD_FLAGS.
2775
2776 2005-04-19  Kenichi Handa  <handa@m17n.org>
2777
2778         * word-thai.c (wordseg_propertize): Always unref the attached
2779         property.
2780         (thai_wordseg): Don't unref the property.
2781
2782 2005-04-18  Kenichi Handa  <handa@m17n.org>
2783
2784         * word-thai.c: Include stdlib.h.
2785         (wordseg_propertize): Add dummy function for the case that wordcut
2786         library doesn't exist.
2787         (wordseg_propertize): Fix for old wordcut library.
2788
2789 2005-04-16  Kenichi Handa  <handa@m17n.org>
2790
2791         * word-thai.c: Include <stdio.h>.
2792
2793 2005-04-15  Kenichi Handa  <handa@m17n.org>
2794
2795         * draw.c: Include mtext.h.
2796         (linebreak_table, M_break_at_space, M_break_at_word)
2797         (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2798         (compose_glyph_string): Check POS before getting Mface text
2799         property.
2800         (truncate_gstring): Give correct TO arg to line_break function.
2801         (GET_LB_TYPE): New macro.
2802         (find_break_backward, find_break_forward): New functions.
2803         (mdraw__init): Initialize the above new variables.
2804         (mdraw__fini): Free linebreak_table.
2805         (mdraw_default_line_break): Use find_break_backward and
2806         find_break_forward.
2807
2808         * word-thai.c: New file.
2809
2810         * word-thai.h: New file.
2811
2812         * mtext.c: Include word-thai.h.
2813         (wordseg_func_table): New variable.
2814         (mtext__init): Initialize wordseg_func_table and call
2815         mtext__word_thai_init.
2816         (mtext__fini): Call mtext__word_thai_fini, free
2817         wordseg_func_table.
2818         (MTextWordsegFunc): New type.
2819         (mtext__word_segment): New function.
2820
2821         * mtext.h (wordseg_func_table): Extern it.
2822         (mtext__word_segment): Extern it.
2823
2824         * m17n.c (m17n_init): Fix typo (== -> =).
2825
2826         * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2827         (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2828
2829         * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2830         (MTEXTPROP_VAL): New macros.
2831
2832         * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2833
2834 2005-04-07  Kenichi Handa  <handa@m17n.org>
2835
2836         * database.c (load_chartable): Fix pursing of symbol name.
2837
2838 2005-03-24  Kenichi Handa  <handa@m17n.org>
2839
2840         * m17n.c (m17n_init): Fix typo (== -> =).
2841
2842 2005-03-11  Kenichi Handa  <handa@m17n.org>
2843
2844         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2845
2846         * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2847
2848         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2849         first.
2850
2851 2005-03-09  handa  <handa@m17n.org>
2852
2853         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2854         calling m17n_init ().
2855
2856         * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2857         calling m17n_init_core ().
2858
2859 2005-02-28  Kenichi Handa  <handa@m17n.org>
2860
2861         * font-flt.c (mfont__flt_run): Add resulting code sequence in
2862         debug info.
2863
2864 2005-02-17  Kenichi Handa  <handa@m17n.org>
2865
2866         * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2867         (M_description, M_command, M_variable): New variables.
2868         (load_im_info_keys): New variables.
2869         (load_im_info, check_command_keyseq, get_description_advance)
2870         (parse_command_list, get_command_list, parse_variable_list)
2871         (get_variable_list, input_method_hook): New functions.
2872         (command_list, variable_list): New variables.
2873         (minput__init): Put input_method_hook to Minput_method.
2874         Initialize M_description, M_command, M_variable, Mdetail_text,
2875         load_im_info_keys, command_list, variable_list.
2876         (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2877         (Mdetail_text): New variable.
2878         (minput_get_description, minput_get_commands)
2879         (minput_assign_command_keys, minput_get_variables)
2880         (minput_set_variable): New functions.
2881
2882         * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2883         (minput_assign_command_keys, minput_get_variables)
2884         (minput_set_variable): Extern them.
2885
2886         * plist.c (UNGETC): Just decrement st->p.
2887         (read_mtext_element): New arg skip.
2888         (read_integer_element): Likewise.
2889         (read_symbol_element): Likewise.
2890         (read_element): New arg KEYS.
2891         (mplist__from_plist): Don't increment ref-count of NULL object.
2892         (mplist__from_file): New arg KEYS.
2893         (mplist_put): Don't increment ref-count of NULL object.
2894         (mplist_add): Likewise.
2895         (mplist_push): Likewise.
2896         (mplist_set): Likewise.  Call M17N_OBJECT_UNREF unconditionally.
2897
2898         * plist.h (mplist__from_file): Prototype adjusted.
2899
2900         * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2901         (get_database_stream): New function.
2902         (load_database): Use get_database_stream.
2903         (M_database_hook): New variable
2904         (mdatabase__init): Initialize M_database_hook.
2905         (mdatabase__load_for_keys): New function.
2906         (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2907         function.
2908         (mdatabase_define): Free mdb->extra_info if necessary.
2909
2910         * database.h (mdatabase__dir_list, M_database_hook)
2911         (mdatabase__load_for_keys): Extern them.
2912         (MDatabaseHookFunc): New type.
2913
2914         * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2915
2916 2004-12-27  Kenichi Handa  <handa@m17n.org>
2917
2918         * Version 1.2.0 released.
2919
2920 2004-12-27  Kenichi Handa  <handa@m17n.org>
2921
2922         * input.c (minput_filter): Don't reset ic->xxx_changed.
2923
2924         * mtext.c (mtext_from_data): Fix documentation.
2925
2926 2004-12-25  Kenichi Handa  <handa@m17n.org>
2927
2928         * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2929         (M17NLIB_VERSION_NAME): Update to "1.2.".
2930
2931 2004-12-24  Kenichi Handa  <handa@m17n.org>
2932
2933         * input.c (reset_ic): Set key_unhandled to 0.
2934
2935 2004-12-21  Kenichi Handa  <handa@m17n.org>
2936
2937         * m17n-gui.h (mfont_from_spec): Delete extern.
2938
2939         * input-gui.c (win_callback): Handle Minput_reset.
2940         (minput__win_init): Register reset_ic as a callback for
2941         Minput_reset.
2942
2943         * input.c (reset_ic): New arg IGNORE which is ignored.  Caller
2944         changed.  At first, shift to the initial state.
2945         (minput__init): Initialize Minput_reset.  Register reset_ic as a
2946         callback for Minput_reset.
2947         (Minput_reset): New variable.
2948         (minput_filter): Always set ic->xxx_changed to 0.
2949         (minput_reset_ic): New function.
2950         (integer_value): Fix typo ('>' -> '<') and calculation of length
2951         of preedit text.
2952
2953         * m17n-core.c (merror_code): Change type to `int'.
2954
2955         * m17n-misc.h (merror_code): Adjust type.
2956
2957         * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2958
2959         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2960         (mtext_change_prop): Delete extern.
2961
2962         * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2963         to `int'.  Move the documents to m17n-core.h.
2964
2965 2004-12-13  Kenichi Handa  <handa@m17n.org>
2966
2967         * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2968         (MTextProperty): Document it.
2969
2970 2004-12-09  Kenichi Handa  <handa@m17n.org>
2971
2972         * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2973
2974 2004-12-03  Kenichi Handa  <handa@m17n.org>
2975
2976         * internal.h (m17n__core_initialized, m17n__shell_initialized,
2977         m17n__gui_initialized): New externs.
2978
2979         * m17n-core.h (enum M17NStatus): New enum.
2980         (m17n_status): Extern it.
2981
2982         * m17n-core.c (core_initialized): Delete this variable.
2983         (m17n__core_initialized, m17n__shell_initialized,
2984         m17n__gui_initialized): New variables.
2985         (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2986         instead of core_initialized.
2987         (m17n_status): New function.
2988
2989         * m17n.c (shell_initialized): Delete this variable.
2990         (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2991         shell_initialized.
2992
2993         * m17n-gui.h (m17n_init_win): Adjust the prototype.
2994
2995         * m17n-gui.c (win_initialized): Delete this variable.
2996         (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2997         instead of gui_initialized.
2998
2999 2004-11-19  Kenichi Handa  <handa@m17n.org>
3000
3001         * input.c (reset_ic): Check if ic_info->state is NULL.
3002         (filter): If ic_info->state is NULL, return 0.
3003         (load_input_method): Don't unref `maps' it it's not created.
3004
3005 2004-11-15  Kenichi Handa  <handa@m17n.org>
3006
3007         * input.c (find_candidates_group): If INDEX is -1, find the last
3008         candidate group.
3009         (take_action_list): If the previous of the first candidate is
3010         requested, select the last candidate.
3011
3012 2004-11-08  Kenichi Handa  <handa@m17n.org>
3013
3014         * m17n-X.c (device_open): Try at most 32 fonts to find a
3015         non-autoscaled font.
3016
3017         * font.c (xlfd_parse_name): Fix previous change.
3018
3019 2004-11-05  Kenichi Handa  <handa@m17n.org>
3020
3021         * font.c: (commont_style): Include dummy elements "slanted" and
3022         "rslanted" to prefer "o" to "r" if "i" is requested.
3023
3024         * font-ft.c (ft_to_prop): Fix "oblique" entry.
3025
3026 2004-10-29  Kenichi Handa  <handa@m17n.org>
3027
3028         * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3029
3030         * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3031         New members smallest and larger.
3032         (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3033         (xfont_registry_list): Likewise.
3034         (xfont_select): Likewise.
3035         
3036
3037 2004-10-28  Kenichi Handa  <handa@m17n.org>
3038
3039         * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3040         font name comparison.
3041         (xfont_select): Fix logic for selecting a larger size font.
3042
3043 2004-10-25  Kenichi Handa  <handa@m17n.org>
3044
3045         * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3046         ">" actions.
3047
3048 2004-10-22  Kenichi Handa  <handa@m17n.org>
3049
3050         * input.c (update_candidate): Renamed from udpate_candidate.
3051         (take_action_list): Show more debugging info on arithmetic commands.
3052
3053         * m17n-X.c (device_open): Fix previous change.
3054
3055         * draw.c (compose_glyph_string): Don't get face property at the
3056         end of M-text.
3057
3058 2004-10-21  Kenichi Handa  <handa@m17n.org>
3059
3060         * draw.c (compose_glyph_string): Fix for the case of category
3061         being Mnil.
3062
3063 2004-10-19  Kenichi Handa  <handa@m17n.org>
3064
3065         * input.c (mdebug_mask): New variable.
3066         (shift_state): Print debug information.
3067         (take_action_list): Likewise.
3068         (handle_key): Likewise.
3069
3070 2004-10-14  Kenichi Handa  <handa@m17n.org>
3071
3072         * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3073
3074 2004-10-13  Kenichi Handa  <handa@m17n.org>
3075
3076         * m17n-X.c (device_open): Be sure to register at least one font
3077         driver.
3078
3079         * font-ft.c: Include <freetype/ftbdf.h> conditionally.  Check
3080         HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3081
3082 2004-10-12  Kenichi Handa  <handa@m17n.org>
3083
3084         * draw.c (alloc_gstring): Fix previous change.
3085
3086         * font-ft.c (ft_list_generic): Fix for the case of not
3087         HAVE_FONTCONFIG.
3088
3089         * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3090
3091         * font.c (mfont_list): If no font is found, return NULL.
3092         (load_font_encoding_table): Put entries of nil registry first.
3093         (find_encoding): Adjust for the above change.
3094
3095 2004-10-11  Kenichi Handa  <handa@m17n.org>
3096
3097         * m17n-gui.h (mfont_list): Adjust prototype.
3098
3099         * m17n-X.c (xfont_list): New arg maxnum.
3100
3101         * font.h (struct MFontDriver): Change prototype of <list>.
3102
3103         * font-ft.c (fc_generic_family_list): Delete it.
3104         (Mserif, Msans_serif, Mmonospace): Delete them.
3105         (M_generic_family_info): New variable.
3106         (enum GenericFamilyType): New enum.
3107         (struct GenericFamilyInfo): New struct.
3108         (generic_family_table): New variable.
3109         (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3110         iso8859-1.
3111         (add_font_info): Get style here.
3112         (ft_list_family): Don't initialize fc_config here.  Don't list
3113         generic families.
3114         (ft_list_generic): New function.
3115         (ft_select): Pay attention to generic familes here.
3116         (ft_open): Fix calculation of ascent and descent.
3117         (ft_list): Pay attention to generic families.
3118         (mfont__ft_init): Initialize M_generic_family_info,
3119         generic_family_table, and fc_config..
3120         (mfont__ft_fini): Finalize generic_family_table.
3121
3122         * draw.c (compose_glyph_string): Use more constant font for
3123         glyphs.  Adjust for the member change in MGlyph.
3124         (layout_glyph_string): Adjust for the member change in MGlyph.
3125         (alloc_gstring): Intilize scracth_glyph to avoid
3126         compose_glyph_string on it.
3127         (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3128         (mdraw_coordinates_position): Fix previous change.
3129
3130         * internal-gui.h (glyph_category): New enum.
3131         (MGlyph): Change type of <category> to enum glyph_category.
3132
3133         * face.c (mface__realize): Delete args langauge and charset.
3134         (mface__for_chars): Fix for the case that glyphs have different
3135         rfaces.
3136         (mface__update_frame_face): Adjust for mface__realize change.
3137
3138         * face.h (mface__realize): Adjust prototype.
3139
3140 2004-10-05  Kenichi Handa  <handa@m17n.org>
3141
3142         * language.c (mlang__init): Add Akan.
3143
3144 2004-10-04  Kenichi Handa  <handa@m17n.org>
3145
3146         * font-ft.c (add_font_info): Add instead of push the element.
3147         (ft_list_family): For generic fonts, try all
3148         substituted. families.
3149
3150         * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3151         (run_rule): Don't update cluster range here.
3152         (run_command): Update cluster range on appending a glyph.
3153         (run_otf): Update cluster range for glyphs generated by OTF.
3154
3155 2004-10-02  Kenichi Handa  <handa@m17n.org>
3156
3157         * m17n-X.c (device_open): Handle Mfont key in PLIST.
3158
3159 2004-09-30  Kenichi Handa  <handa@m17n.org>
3160
3161         * font-ft.c (ft_select): Ignore family on calling mfont__score.
3162
3163 2004-09-30  Kenichi Handa  <handa@m17n.org>
3164
3165         * font.h: Include <fontconfig/fontconfig.h>.
3166         (MFTInfo): New member langset.
3167         (mfont__encoding_list): Extern it.
3168
3169         * font.c (mfont__encoding_list): New function.
3170         (mdebug_dump_font_list): New function.
3171
3172         * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3173         (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3174         variables.
3175         (ft_family_list): New variable.
3176         (set_font_info): New arg basep.  Callers changed.
3177         (fc_list): Check the return value of FcPatternGetString.
3178         (add_font_info): New arg plist.  Callers changed. Update
3179         ft_family_list.
3180         (ft_list_family): New function (merged fc_list and ft_list_all).
3181         (ft_select): Use ft_list_family.
3182         (ft_list): Likewise.  If FONT is not NULL, check all fonts.  Fix
3183         typo (== -> !=).
3184         (mfont__ft_init): Initialize above new variables.
3185         (mfont__ft_fini): Free ft_family_list.
3186         (STRDUP_LOWER): New macro.
3187         (set_font_info): Use STRDUP_LOWER.
3188         (ft_list_family): Avoid duplicate addition of font path.  Use
3189         STRDUP_LOWER.
3190         (fc_decode_prop): Fix typo.
3191
3192         * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3193         (xfont_registry_list): Change argument disp_info to frame.
3194         Callers changed.
3195         (xfont_list_all): New function.
3196         (xfont_list): If FONT is not NULL, check all fonts.
3197
3198 2004-09-28  Kenichi Handa  <handa@m17n.org>
3199
3200         * m17n-X.c (MXFont, MXFontList): New types.
3201         (MDisplayInfo): Delete members font_registry_list,
3202         iso8859_1_family_list, iso10646_1_family_list, new members
3203         font_list, base_font_list.
3204         (free_display_info): Adusted for the change of MDisplayInfo.
3205         (xfont_driver): Initialize with xfont_list.
3206         (font_compare): New function.
3207         (build_font_list): Deleted.
3208         (xfont_registry_list): New function.
3209         (xfont_select): Use xfont_registry_list.
3210         (xfont_list): New function.
3211         (device_open): Adusted for the change of MDisplayInfo.
3212
3213         * font-ft.c (add_font_info): New arg languages.  Callers changed.
3214         (fc_list): Get languages from fonts..
3215         (ft_list_all): Renamed from ft_list.  Callers changed.
3216         (ft_list): New function.
3217         (mfont__ft_driver): Initalize with ft_list.
3218
3219         * font.c (mfont_list): New function.
3220
3221         * font.h (struct MFontDriver): New member `list'.
3222         (MFTInfo): New member languages.
3223
3224         * m17n-gui.h (mfont_list): Extern it.
3225
3226 2004-09-27  Kenichi Handa  <handa@m17n.org>
3227
3228         * internal-gui.h (struct MGlyphString): Delete members mt,
3229         sub_width, sub_lbrearing, sub_rbearing, and region.
3230
3231         * draw.c (MSubTextExtents): New type.
3232         (layout_glyphs): New arg extents.  Set its members.
3233         (layout_glyph_string): Adjusted for the above change.
3234         (alloc_gstring): Don't set gstring->mt.
3235         (truncate_gstring): Call line_break function with mt instead of
3236         gstring->mt.
3237
3238 2004-09-22  Kenichi Handa  <handa@m17n.org>
3239
3240         * mtext.c (count_utf_16_chars): Count each code of invalid
3241         surrogates as one.
3242
3243 2004-09-19  Kenichi Handa  <handa@m17n.org>
3244
3245         * mtext.c (default_utf_16, default_utf_32): Rename them to
3246         MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively.  Caller
3247         changed.
3248
3249         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3250         them.
3251
3252 2004-09-13  Kenichi Handa  <handa@m17n.org>
3253
3254         * draw.c (Mlatin): Don't declare it here.
3255         (visual_order): Fix reordering of combining characters.
3256         (compose_glyph_string): Fix detection of script.
3257         (layout_glyphs): Don't fix reordering of combining characters
3258         here.
3259         (layout_glyph_string): Pay attention to
3260         control->disable_overlapping_adjustment.
3261         (truncate_gstring): Include at least on character in a line.
3262         (get_gstring): Always scan one full line.
3263         (mdraw__init): Don't initialize Mlatin here.
3264         (mdraw_text_per_char_extents): Fix iteration.  If a glyph doesn't
3265         have a font, use ascent/descent of an ASCII font.  Allow
3266         ink_array_return and logical_array_return to be NULL.
3267         (mdraw_coordinates_position): Fix iteration.
3268
3269         * font-ft.c (MFTtoProp): Member completely changed.
3270         (ft_to_prop): Adjusted for the above change.
3271         (ft_to_prop_size): Likewise.
3272         (set_font_info): Adjusted for the change of MFTtoProp.
3273         (fc_generic_family_list): New variable.
3274         (fc_list): Add special handling of generic font names.
3275         (mfont__ft_init): Adjusted for the change of MFTtoProp.
3276         Initialize fc_generic_family_list.
3277         (mfont__ft_fini): Don't free ft_to_prop.  Free
3278         fc_generic_family_list.
3279         (FC_vs_M17N_font_prop): New type.
3280         (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3281         (fc_decode_prop, fc_encode_prop): New functions.
3282         (mfont__ft_parse_name): Use fc_decode_prop.
3283         (mfont__ft_unparse_name): Use fc_encode_prop.
3284
3285         * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3286         (MWDevice): Add member realized_font_list.
3287         (free_display_info): Don't free disp_info->realized_font_list.
3288         (free_device): Free device->realized_fontset_list.
3289         (xft_find_metric): Use gstring->frame instead of rfont->frame.
3290         (device_open): Don't initialize disp_info->realized_font_list.
3291         (device_open): Initialize device->realized_font_list and set it to
3292         frame->realized_font_list.
3293
3294         * fontset.c (try_font_group): New function.
3295         (mfont__lookup_fontset): Use try_font_group.
3296
3297         * font.c (common_weight): Change the order of "regular".
3298
3299         * face.c (Mlatin): Don't make it static.
3300         (mface__realize): Be sure to set work_gstring.frame.
3301         (mface__for_chars): Likewise.
3302
3303         * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3304         MTEXT_FORMAT_UTF_8.
3305
3306         * internal-gui.h (Mlatin): Extern it.
3307
3308         * m17n-gui.h (MDrawControl): New member
3309         disable_overlapping_adjustment.
3310
3311 2004-09-06  Kenichi Handa  <handa@m17n.org>
3312
3313         * font-flt.c (run_otf): Fix typo ('}'->']').
3314
3315         * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3316         (COMBINING_PRECOMPUTED_P): New macros.
3317
3318         * draw.c (layout_glyphs): Handle precomputed combining code.
3319
3320         * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3321         precomupted combining code.
3322
3323 2004-09-03  Kenichi Handa  <handa@m17n.org>
3324
3325         * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3326         otf_gstring.glyphs.
3327
3328 2004-08-27  Kenichi Handa  <handa@m17n.org>
3329
3330         * face.c (mface_put_prop): If the new value is the same as the
3331         current one, don't increment frame->tick.
3332
3333 2004-08-25  Kenichi Handa  <handa@m17n.org>
3334
3335         * fontset.c (mfontset): Initialize font_spec_list member.
3336         (mfontset_copy): Load fontset if necessary.
3337
3338         * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3339         'metrics' to for C++.
3340
3341         * draw.c (mdraw_glyph_info): Adjusted for the member name change
3342         (this -> metics).
3343
3344 2004-08-16  Kenichi Handa  <handa@m17n.org>
3345
3346         * Version 1.1.0 released.
3347
3348 2004-08-13  Kenichi Handa  <handa@m17n.org>
3349
3350         * language.c (mlang__init): Add Dhivehi.
3351
3352         * m17n-gui.c (Mx, Mfreetype): Delete it.
3353         (m17n_init_win): Don't initialize Mx and Mfreetype here.
3354
3355         * m17n-gui.h (Mfreetype, Mxft): Extern them.
3356         (mfont_resize_ratio): Extern it.
3357         (MDrawGlyphInfo): New member logical_width;
3358         (MDrawGlyph): New type.
3359         (mdraw_glyph_list): Prototype adjusted.
3360
3361         * m17n-X.c (xfont_open): Set type and fontp members.
3362         (xft_open): Likewise.
3363
3364         * internal-gui.h (Mx, Mfreetype): Delete extern.
3365
3366         * font.h (struct MRealizedFont): New member type and fontp.
3367
3368         * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3369         (Mx, Mfreetype): Declare here.
3370         (Mxft): New variable.
3371         (mfont_resize_ratio): New function.
3372
3373         * font-ft.c (ft_open): Set type and fontp members.
3374
3375         * draw.c (mdraw_glyph_list): Argument type changed.  Don't set
3376         glyph_code member.
3377
3378 2004-08-11  Kenichi Handa  <handa@m17n.org>
3379
3380         * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3381         FT_LOAD_DEFAULT.
3382
3383 2004-08-06  Kenichi Handa  <handa@m17n.org>
3384
3385         * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3386         feature to apply.
3387
3388         * font-flt.c (run_otf): Print debugging information if necessary.
3389
3390 2004-08-05  Kenichi Handa  <handa@m17n.org>
3391
3392         * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff.  Support
3393         positioning_type 5 and 6.  Switch simplified.
3394
3395 2004-08-04  Kenichi Handa  <handa@m17n.org>
3396
3397         * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3398
3399 2004-08-02  Kenichi Handa  <handa@m17n.org>
3400
3401         * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3402         set val to 1 even if it is greater than 1.
3403
3404         * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3405
3406 2004-07-29  Kenichi Handa  <handa@m17n.org>
3407
3408         * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3409         debugging information.
3410
3411         * internal.h (MDEBUG_PRINT5): New macro.
3412
3413         * draw.c (layout_glyphs): Don't combine a zero width glyph with
3414         the previous one if the zero width glyph has left or right
3415         padding.
3416
3417 2004-07-26  Kenichi Handa  <handa@m17n.org>
3418
3419         * m17n-X.c (xft_render): Pay attention to members left_padding and
3420         right_padding of MGlyph.
3421
3422         * draw.c (visual_order): Allocate one more elements for arrays as
3423         a workaround of fribidi bug.
3424         (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3425         instead of MGlyph->bidi_sensitive.
3426         (layout_glyph_string): Pay attentinon to
3427         control->orientation_reversed when padding at the head or tail.
3428         Fix adjustment of space glyph width.
3429         (get_gstring): If cursor_width or cursor_bidi is changed, don't
3430         use a cache.
3431
3432         * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3433         instead of MGlyph->bidi_sensitive.
3434
3435         * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3436
3437 2004-07-26  Kenichi Handa  <handa@m17n.org>
3438
3439         * draw.c (visual_order): Don't treat combined glyphs specially.
3440         (layout_glyphs): Don't get metrics glyphs that are already ready.
3441         Pay attention to MGlyph->bidi_sensitive.  Combine a glyph of zero
3442         width with the previous one. 
3443         (draw_background): Fix bar cursor position on a r2l glyph.
3444
3445         * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3446         (run_rule): Fix place of updating cluster_begin_pos and
3447         cluster_end_pos here.
3448         (run_otf): Don't set left_padding.
3449
3450         * font-ft.c (adjust_anchor): Type of argument `code' changed.
3451         Caller changed.
3452         (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3453         Fix handling of GPOS.
3454         (mfont__ft_drive_gpos): Delete this function.
3455
3456         * font.h (mfont__ft_drive_otf): Renamed back from
3457         mfont__ft_drive_gsub.
3458         (mfont__ft_drive_gpos): Delete extern.
3459
3460         * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3461         (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3462
3463 2004-07-23  Kenichi Handa  <handa@m17n.org>
3464
3465         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3466         the same bidi level.
3467
3468         * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3469
3470 2004-07-22  Kenichi Handa  <handa@m17n.org>
3471
3472         * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3473
3474 2004-07-20  Kenichi Handa  <handa@m17n.org>
3475
3476         * draw.c (render_glyphs): Fix checking of g->code validity.
3477
3478         * face.c (mface__realize): Set g.type.
3479
3480 2004-07-18  Kenichi Handa  <handa@m17n.org>
3481
3482         * Makefile.am: Prepend ${top_srcdir} to all *.la in
3483         *_LIBADD/*_LDADD.
3484
3485         * m17n-gui.c (mframe): Print error message give by dlopen to
3486         stderr.
3487
3488 2004-07-16  Kenichi Handa  <handa@m17n.org>
3489
3490         * draw.c (compose_glyph_string): Improve the way of deciding a
3491         script.  For a character that doesn't have script property, use
3492         the last non-latin script.
3493
3494         * font-ft.c (fc_list): Cancel previous change.
3495         (mfont__ft_init): Add more entries in ft_to_prop_name.
3496
3497 2004-07-15  Kenichi Handa  <handa@m17n.org>
3498
3499         * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3500         previous or next character glyphs.
3501
3502 2004-07-14  Kenichi Handa  <handa@m17n.org>
3503
3504         * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3505         of type GLYPH_SPACE.
3506
3507         * fontset.c (mfont__lookup_fontset): If glyph type is
3508         GLYPH_SPACE, get codes for SPACE.
3509
3510         * internal-gui.h (Mfont): Delete extern.
3511
3512         * m17n-gui.h (Mfont): Delete duplicated extern.
3513
3514 2004-07-13  Kenichi Handa  <handa@m17n.org>
3515
3516         * font-ft.c (DEVICE_DELTA): New macro.
3517         (adjust_anchor): New function.
3518         (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf.  Drive
3519         only GSUB.
3520         (mfont__ft_drive_gpos): New function.
3521
3522         * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3523         (FontLayoutContext): Delete member `rfont'.
3524         (run_otf): Set g->otf_cmd.  Call 
3525         (mfont__flt_run): Don't set ctx.rfont.  Call mfont__ft_decode_otf
3526         only whne HAVE_OTF is defined.
3527
3528         * fontset.c: Include "config.h".
3529
3530         * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3531         (MGlyph): New member otf_cmd.
3532
3533         * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3534         (mfont__ft_drive_gpos): Extern it.
3535
3536         * face.c: Include "config.h".
3537
3538         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3539
3540         * input-gui.c: Include "config.h".
3541
3542         * plist.c: Include "config.h".
3543
3544 2004-07-06  Kenichi Handa  <handa@m17n.org>
3545
3546         * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3547         internal-gui.h: Cancel previous changes.
3548
3549         * m17n-gd.h: Delete it.
3550
3551         * Makefile.am (libm17n_core_la_LIBADD): New variable.
3552         (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3553         @XML2_LD_FLAGS@ to above.
3554         (libm17n_la_LIBADD): Add -ldl.
3555         (libm17n_la_LDFLAGS): Add -export-dynamic.
3556         (X_LD_FLAGS): Fix the order of linking.
3557         (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3558         (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3559         (libm17n_X_la_LDFLAGS): Add -module.
3560         (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3561         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3562         (libm17n_gd_la_LDFLAGS): Add -module.
3563         (include_HEADERS): Delete m17n-gd.h.
3564
3565 2004-06-30  Kenichi Handa  <handa@m17n.org>
3566
3567         * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3568         (MDeviceLibraryInterface): Delete it.
3569         (register_device_library): Delete it.
3570         (m17n__device_library_list): Renamed from device_library_list.
3571
3572         * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3573         (m17n_init_win): Adjust prototype.
3574
3575         * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3576         (m17n_init_gd): New function. 
3577
3578         * m17n-gd.h: New file.
3579
3580         * m17n-X.h: Include <m17n-gui.h>.
3581         (m17n_init_X): Extern it.
3582         (M17N_INIT): Redefine it.
3583
3584         * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3585         (m17n_init_X): New function.
3586
3587         * internal-gui.h (m17n__device_library_list): Extern it.
3588         (struct MDeviceDriver): New members initialized, init, and fini.
3589
3590         * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3591         @XFT2_LD_FLAGS@.
3592         (libm17n_X_la_LIBADD): Delete aboves.
3593         (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3594         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3595         (libm17n_gd_la_LDFLAGS): Delete it.
3596         (include_HEADERS): Add m17n-gd.h.
3597
3598 2004-06-25  Kenichi Handa  <handa@m17n.org>
3599
3600         * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3601         (libm17n_gd_la_LDFLAGS): Cancel previous change.
3602
3603         * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3604
3605         * font-ft.c (fc_list): If FcFontList finds no font, try
3606         FcFontMatch.
3607
3608         * draw.c (compose_glyph_string): Terminate the last loop after
3609         doing default combining if necessary.
3610
3611 2004-06-24  Kenichi Handa  <handa@m17n.org>
3612
3613         * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3614
3615         * character.c (mchar_define_property): Add const to an arg.
3616
3617         * charset.c (mchar_define_charset): Add const to an arg.
3618
3619         * coding.c (MCodingSystem): Add const to an arg or decoder.
3620         (finish_decoding): Add const to an arg.
3621         (decode_coding_charset, decode_coding_utf_8)
3622         (decode_coding_utf_16, decode_coding_utf_32)
3623         (decode_coding_iso_2022, decode_coding_sjis)
3624         (mconv_define_coding): Likewise.
3625
3626         * m17n-X.c (xft_find_metric): Delete unused variable.
3627
3628         * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3629         prototypes.
3630
3631         * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3632         prototypes.
3633
3634         * mtext.c (count_utf_8_chars, count_utf_16_chars)
3635         (mtext__from_data, mtext_from_data): Add `const' to an arg.
3636
3637         * mtext.h (mtext__from_data): Ajust prototype.
3638
3639 2004-06-23  Kenichi Handa  <handa@m17n.org>
3640
3641         * draw.c (compose_glyph_string): Always get glyph codes by
3642         mface__for_char.
3643         (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3644         (mdraw_glyph_list): New function.
3645
3646         * font-flt.c (mfont__flt_run): Be sure to call
3647         rfont->driver->encode_char.
3648
3649         * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3650         (ft_encode_char): Delete arg C.
3651         (ft_render): Don't call FT_Get_Char_Index.
3652
3653         * font.c (mfont__encodable_p): Delete it.
3654         (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3655
3656         * font.h (struct MFontDriver): Delete arg C of encode_char.
3657         (mfont__encodable_p): Delete extern.
3658
3659         * m17n-X.c (xfont_encode_char): Delete arg C.
3660         (xft_find_metric): Don't cal FT_Get_Char_Index.
3661         (xft_render): Likewise.
3662
3663         * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3664         logical_width.
3665         (mdraw_glyph_list): Extern it.
3666
3667         * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3668
3669 2004-06-22  Kenichi Handa  <handa@m17n.org>
3670
3671         * m17n-gui.h (mfontset_lookup): Extern it.
3672
3673         * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3674
3675         * fontset.c (realize_fontset_elements)
3676         (free_realized_fontset_elements, update_fontset_elements): New
3677         functions.
3678         (mfont__realize_fontset): Call realize_fontset_elements.
3679         (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3680         (mfont__lookup_fontset): If a fontset was modified, update
3681         the realized fontset.
3682         (mfontset_modify_entry): Increment fontset->tick.
3683         (mfontset_lookup): New function.
3684
3685 2004-06-21  Kenichi Handa  <handa@m17n.org>
3686
3687         * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3688
3689         * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3690         (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3691         length of source text 0.
3692
3693 2004-06-21  Kenichi Handa  <handa@m17n.org>
3694
3695         * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3696         (compare): Pay attention to format other than utf-8.
3697         (copy): Delete this function.
3698         (count_by_utf_8, count_by_utf_16, insert): New functions.
3699         (count_utf_16_chars): Fix handling of a surrogate pair.
3700         (find_char_forward, find_char_backward): Likewise.
3701         (mtext__from_data): Delete unnecessary check.  Fix number of
3702         allocated bytes.
3703         (mtext_from_data): Don't count items.
3704         (mtext_ref_char): Optimize the code.
3705         (mtext_set_char): Pay attention to format other than utf-8.
3706         (mtext_cat_char): Likewise.
3707         (mtext_dup): Don't call copy, instead do allocation here.
3708         (mtext_cat): Call insert instead of copy.
3709         (mtext_ncat): Likewise.
3710         (mtext_cpy): Delete character at first and call insert instead of
3711         copy.
3712         (mtext_ncpy): Likewise.
3713         (mtext_copy): Likewise.
3714         (mtext_duplicate): Call insert instead of copy.
3715         (mtext_del): Pay attention to format other than utf-8.
3716         (mtext_ins): Simply call insert.
3717         (mtext_ins_char): Pay attention to format other than utf-8.
3718         (mtext_tok): Call insert instead of copy.
3719         (mtext_text): Call UNIT_BYTES.
3720
3721         * textprop.c (mtext__adjust_plist_for_change): New function.
3722
3723         * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3724         (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3725         (CHAR_UNITS_AT): Fix typo.
3726         (CHAR_UNITS_BY_HEAD): Fix typo.
3727         (STRING_CHAR_AND_UNITS): Fix typo.
3728
3729         * internal.h (MTEXT_READ_ONLY_P): New macro. 
3730
3731         * mtext.h (mtext__replace): Delete the extern.
3732         (mtext__adjust_foramt): Adjust prototype.
3733
3734         * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3735         if possible.  Otherwise make a copy of mmt.
3736
3737         * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3738         utf-8.
3739
3740 2004-06-18  Kenichi Handa  <handa@m17n.org>
3741
3742         * character.h (CHAR_STRING_UTF16): Fix syntax.
3743
3744 2004-06-16  Kenichi Handa  <handa@m17n.org>
3745
3746         * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3747         (libm17n_X_la_LIBADD): Delete it.
3748         (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3749
3750         * m17n-X.c (device_open): Add parens in `if' condition.
3751
3752         * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3753         (DEC_POSITION): Likewise.
3754         (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3755
3756 2004-06-15  Kenichi Handa  <handa@m17n.org>
3757
3758         * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3759         by language.
3760
3761         * draw.c (compose_glyph_string): If langauge is specified, call
3762         mface__for_chars even if a text is all latin.  Fix condition for
3763         setting non_ascii_found.
3764
3765         * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3766
3767         * m17n.h (minput_char_to_key): Delete extern.
3768
3769         * m17n-gui.h (minput_event_to_key): Cancel previous change.
3770
3771         * m17n-gui.c (null_device_open): Set several members of frame.
3772
3773 2004-06-14  Kenichi Handa  <handa@m17n.org>
3774
3775         * m17n-gui.h (minput_event_to_key): Delete extern.
3776
3777         * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3778
3779         * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3780
3781         * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3782
3783 2004-06-08  Kenichi Handa  <handa@m17n.org>
3784
3785         * character.c (mchar_put_prop): Don't increment the ref-count of
3786         record->table.
3787
3788 2004-06-04  Kenichi Handa  <handa@m17n.org>
3789
3790         * m17n-core.c (mdebug__register_object): New function.
3791         (mdebug__unregister_object): Likewise.
3792
3793         * internal.h (mdebug__register_object, mdebug__unregister_object):
3794         Extern them.
3795         (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3796         respectively.
3797
3798         * charset.c (mcharset__load_from_database): Don't call
3799         mconv__register_charset_coding here.
3800
3801         * coding.c (find_coding): Get a real name from an element of
3802         coding_definition_list.
3803         (mconv__register_charset_coding): Set the real name at the top of
3804         param.
3805         (mcoding__load_from_database): Likewise.
3806         (mconv_list_codings): Adjusted for the above change.
3807
3808 2004-06-03  Kenichi Handa  <handa@m17n.org>
3809
3810         * coding.c (find_coding): Find by canonicalized name.  Don't have
3811         to modify the element of coding_definition_list by
3812         mplist__from_plist.
3813         (mconv__define_coding_from_charset): Delete it.
3814         (mconv__register_charset_coding): Canonicalize sym.
3815         (mcoding__load_from_database): Register plist modified by
3816         mplist__from_plist.
3817
3818         * coding.h (mconv__define_coding_from_charset): Don't extern it.
3819
3820         * font-ft.c (ft_open): Fix setting of rfont->descent.
3821
3822 2004-06-02  Kenichi Handa  <handa@m17n.org>
3823
3824         * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3825         (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3826         (xlfd_unparse_name): Renamed from xfont_build_name.
3827         (mfont__init): Initialized Mfontconfig.
3828         (mfont__free_realized): Unconditionally unref rfont->info.
3829         (mfont__select): Free `this' if it's not best.
3830         (mfont__open): Don't check frame->realized_font_list.
3831         (mfont__parse_name_into_font): New function.
3832         (Mfontconfig): New variable.
3833         (mfont_from_name): Call mfont_parse_name.
3834         (mfont_name): Call mfont_unparse_name.
3835         (mdebug_dump_font): Likewise.
3836
3837         * font.h (struct MFontDriver): Delete members parse_name and
3838         build_name.
3839         (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3840         (mfont__parse_name_into_font): Extern it.
3841
3842         * font-ft.c: Include "symbol.h".
3843         (close_ft): Unconditionally free filename and charmap_list of
3844         ft_into.
3845         (ft_open): Duplicate base->filename.  Increment ref-count of
3846         ft_info->charmap_list.  Free ft_info->charmap_list and
3847         ft_info->filename on error.
3848         (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3849
3850         * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3851         xfont_build_name.
3852         (enum xlfd_field_idx): Moved to font.c.
3853         (split_font_name, build_font_name): Likewise.
3854         (build_font_list): Call mfont__parse_name_info_font.
3855         (xfont_open): Call mfont__unparse_name.  Free name.
3856         (xfont_parse_name, xfont_build_name): Moved to font.c
3857         (xft_select): Prototype deleted.
3858         (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3859         Call mfont_pase_name.
3860
3861         * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3862         (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3863         (mframe): Likewise.
3864
3865         * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3866         Extern them.
3867
3868         * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3869
3870 2004-06-01  Kenichi Handa  <handa@m17n.org>
3871
3872         * fontset.c (mfontset_modify_entry): Pay attention to the case
3873         that fontset->font_spec_list is NULL.
3874
3875 2004-05-31  Kenichi Handa  <handa@m17n.org>
3876
3877         * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3878
3879         * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3880
3881         * font.c (mfont__select): Print score the a font for debugging.
3882
3883         * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3884
3885         * coding.c (reset_coding_sjis): Check kanji and kana instead of
3886         kanji_sym and kana_sym.
3887
3888 2004-05-28  Kenichi Handa  <handa@m17n.org>
3889
3890         * Makefile.am (VINFO): New variable.
3891         (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3892         (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3893
3894 2004-05-27  Kenichi Handa  <handa@m17n.org>
3895
3896         The following chanages are to make device dependent functions
3897         accessible only from MDeviceDriver structure, and to add GD and
3898         null device drivers.  Font drivers get also device dependent.
3899
3900         * m17n.c (m17n_init): Increament shell_initialized.
3901         (m17n_fini): Decremented shell_initialized.
3902
3903         * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3904
3905         * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3906         (Mwidget, Mcolormap, Mx): Extern them.
3907
3908         * m17n-gui.c: Include <dlfcn.h> and "config.h".
3909         (free_frame): Call frame->driver->close instead of
3910         mwin__close_device.
3911         (DLOPEN_SHLIB_EXT): New macro.
3912         (MDeviceLibraryInterface): New type.
3913         (device_library_list): New variable.
3914         (register_device_library): New function.
3915         (null_device): New variable.
3916         (null_device_close, null_device_get_prop)
3917         (null_device_realize_face, null_device_free_realized_face): New
3918         function.
3919         (null_driver): New variable.
3920         (null_device_init, null_device_fini, null_device_open): New
3921         functions.
3922         (null_interface): New variable.
3923         (Mfreetype, Mdevice): Declare them.
3924         (m17n_init_win): Increment win_initialized.  Initialize Mx, Mgd,
3925         Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3926         Mwin__Close_Device.  Register drivers for Mx and Mgd.
3927         (m17n_fini_win): Decremented win_initialized.  Call "fini"
3928         function of all opened devices.  Don't call mwin__fini.
3929         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3930         Declare them here.
3931         (mframe): Handle Mdevice key of PLIST.
3932         (mframe_get_prop): Call frame->device->get_prop instead of
3933         mwin__device_get_prop.
3934
3935         * m17n-gd.c: New file.
3936
3937         * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3938         (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3939
3940         * m17n-core.c (m17n_init_core): Increate core_initialized.
3941         (m17n_fini_core): Decremented core_initialized.
3942
3943         * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3944         (Mcolormap): Don't extern them here.
3945
3946         * m17n-X.c (FRAME_DEVICE): New macro.
3947         (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3948         (free_display_info): Use MPLIST_DO.
3949         (free_device): Free rface->info.
3950         (xft_close): Delete it.
3951         (device_init): Renamed from mwin__init.
3952         (device_fini): Renamed from mwin__fini.
3953         (device_open): Renamed from mwin__open_device.
3954         (x_driver): New variable.
3955         (MXFontInfo): Delete member frame, add member display.
3956         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3957         Don't declare them here.
3958
3959         * internal-gui.h (MDeviceType): New enum.
3960         (MWDefice): Delete it.
3961         (struct MFrame): Change type of device to void *.  New members
3962         device_type, driver, font_driver_list.
3963         (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3964         (MDeviceDriver): New type.
3965         (Mx, Mgd, Mfreetype): Extern them.
3966         (mwin__XXX): Delete all of them.
3967
3968         * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3969         mwin__XXX.
3970         (win_destroy_ic): Likewise.
3971         (adjust_window_and_draw): Likewise.
3972         (win_callback): Likewise.
3973         (Mxim): Declare it here.
3974         (minput_event_to_key): Call M_CHECK_READABLE.
3975
3976         * fontset.c (mfont__lookup_fontset): Delete local variable
3977         font_group.
3978
3979         * font.h (struct MFontDriver): Delete member close, add members
3980         parse_name and build_name.
3981         (mfont__driver_list): Delete extern.
3982         (mfont__close): Delete extern.
3983
3984         * font.c (mfont__init): Don't set mfont__driver_list.
3985         (mfont__fini): Don't unref mfont__driver_list.
3986         (mfont__select): Try font drivers in frame->font_driver_list.  Set
3987         driver member of a realized font.
3988         (mfont__close): Delete it.
3989         (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3990         functions of the default frame.
3991
3992         * font-ft.c (close_ft): Check ft_info->ft_face and work
3993         differently.
3994         (add_font_info): Allocate ft_info by M17N_OBJECT.
3995         (ft_close): Delete it.
3996         (mfont__ft_driver): Don't set ft_close.
3997         (ft_select): Increment ref-count of best_font.
3998         (ft_open): Decremented ref-count of base.  On error, call
3999         FT_Done_Face and free ft_info.
4000         (ft_find_metric): Always use XXX_MONO in load_flags.
4001         (ft_render): Fix setting of width.  Call
4002         frame->driver->draw_points instead of mwin__draw_points.
4003         (ft_to_prop): Don't set mfont__driver_list.
4004         (mfont__ft_fini): Just unref ft_info.
4005
4006         * face.c (mface__init): Exchange foreground and background of
4007         mface__default.  Call mface_put_prop to set hline of
4008         mface_underline,
4009         (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4010         (mface__free_realized): Don't call mwin__free_realized_face.
4011
4012         * draw.c (Mdepth): Don't declare it here.
4013         (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4014         (render_glyphs, render_glyph_string): Likewise.
4015         (mdraw__init): Don't set Mdepth.
4016         (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4017         M_CHECK_WRITABLE.
4018         (mdraw_text_per_char_extents): Return 0 on success and -1 on
4019         error.
4020         (mdraw_text_items): Check FRAME is writable.
4021         (mdraw_per_char_extents): Implement body.
4022
4023         * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4024         libm17n-gd.la.
4025         (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4026         (GUI_SOURCES): Delete it.
4027         (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4028         (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4029         (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4030         (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4031         (linkgui_LDADD): Set to libm17n-gui.la
4032         (linkgui_LDFLAGS): New target.
4033         (SRC): Include ${libm17n_gui_la_SOURCES} and
4034         ${libm17n_gd_la_SOURCES}.
4035
4036 2004-05-24  Kenichi Handa  <handa@m17n.org>
4037
4038         * draw.c (draw_background): Don't draw background even if
4039         rface->face.property[MFACE_BACKGROUND] is not Mnil.
4040
4041 2004-05-22  Kenichi Handa  <handa@m17n.org>
4042
4043         * m17n-X.c (xft_open_font): Fix anti_alias setting.
4044
4045 2004-05-20  Kenichi Handa  <handa@m17n.org>
4046
4047         * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4048
4049         * m17n-gui.c: Include "plist.h".
4050         (mframe): If PLIST is NULL, initialize it to emply plist.
4051
4052         * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4053         (xft_driver): New variable.
4054         (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4055         (xft_find_metric, xft_render): New function.
4056         (mwin__init): Adjusted for the new mfont__driver_list.
4057         (mwin__open_device): Assume arg PARAM is not NULL.  Push a newly
4058         generated face to PARAM.
4059         (mwin__realize_face): Fix setting of box colors.  Don't call hook
4060         function here.
4061         (mwin__draw_hline): New function.
4062         (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4063         (mwin__xft_render): Delete these function.
4064
4065         * internal-gui.h (struct MFrame): New member tick.
4066         (struct MGlyphString): New member tick.
4067         (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4068         (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4069         (mwin__xft_render): Delete extern.
4070
4071         * fontset.c (mfont__lookup_fontset): Make the code simpler.
4072         (mfontset): Always increment the reference count of returned
4073         object.
4074
4075         * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4076         (MFTInfo): Moved to font.h.
4077         (ft_iso8859_1_font_list): Delete this variable.
4078         (set_font_info): Don't set font->property[MFONT_TYPE].
4079         (set_font_info): Don't udpate ft_iso8859_1_font_list.
4080         (add_font_info): Change type to void.
4081         (fc_list): Change anme from xft_list.  Caller changed.  Include
4082         FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4083         (mfont__ft_driver): Change name from ft_driver.  Caller changed.
4084         (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4085         (close_ft): Don't call mwin__xft_close.  Unref
4086         ft_info->extra_info.
4087         (ft_open): Don't setup ft_info->fontname.  Don't call
4088         mwin__xft_open.
4089         (ft_find_metric): Don't call mwin__xft_get_metric.
4090         (ft_encode_char): Call rfont->driver->open instead of ft_open.
4091         (ft_render): Don't check HAVE_XFT2.  Don't call mwin__xft_render.
4092         (mfont__ft_init): Adjusted for new mfont__driver_list.
4093         (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4094
4095         * font.c (mfont__driver_list): Make it MPlist.
4096         (mfont__init): Adjust initialization of mfont__driver_list.
4097         (mfont__fini): Free mfont__driver_list.
4098         (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4099         (mfont__select): Adjusted for the new mfont__driver_list.
4100
4101         * font.h (enum MFontProperty): Delete MFONT_TYPE.
4102         (mfont__drirver_list): Adjust prototype.
4103         (MFTInfo): Move to here from fron.c.  Deleve member fontname.
4104
4105         * face.h (struct MFace): Delete member realized_face_list, add
4106         member frame_list.
4107         (struct MRealizedFace): Delete member need_update
4108         andnofont_rface, add member non_ascii_list.
4109         (mface__update_frame_face): Extern it.
4110
4111         * face.c (hline_prop_list, box_prop_list, noop_hook): New
4112         variables.
4113         (get_hline_create, get_box_create): New functions.
4114         (find_realized_face): Cancel previous change.  Arg RFONT deleted.
4115         Use memcmp.
4116         (free_face): Cancep previous change.  Free face->frame_list.
4117         (serialize_hline): Do nothing if hline->width is zero.
4118         (serialize_box): Do nothing if box->width is zero.
4119         (mface__init): Setup all properties of mface__default.
4120         (mface__fini): Free hline_prop_list and box_prop_list.
4121         (mface__realize): Cancel previous change.  Update
4122         face->frame_list.  Setup rface->non_ascii_list.
4123         (mface__for_chars): Update rface->non_ascii_list.
4124         (mface__free_realized): Free rface->non_ascii_list.
4125         (mface__update_frame_face): New function.
4126         (mface): Initialize face->frame_list.
4127         (mface_copy): Likewise.  Just copy MFACE_HLINE and MFACE_BOX
4128         properties.
4129         (mface_merge): Likewise.
4130         (mface_put_prop): If key is Mhline or Mbox, get value by
4131         get_hline_create or get_box_create respectively.
4132         (mface_put_prop): Update frame->tick and call
4133         mface__update_frame_face if necessary.
4134         (mface_update): Do nothing if func is noop_hook.
4135
4136         * draw.c (render_glyphs): If a font is not found, use
4137         mwin__draw_empty_boxes.
4138         (alloc_gstring): Initialize gstring->tick.
4139         (get_gstring): Check gstring->tick.
4140
4141 2004-05-17  Kenichi Handa  <handa@m17n.org>
4142
4143         * face.c (find_realized_face): Return value changed.  If RFONT is
4144         NULL, avoid unnecessary checking.
4145         (free_face): Free face->realized_face_list.
4146         (mface__realize): Adjusted for the change of find_realized_face.
4147         If it returns a realized face that needs update, free it and
4148         realize a new one.  Push a new realized face to
4149         frame->realized_face_list instead of appending.
4150         (mface__for_chars): Adjusted for the change of find_realized_face.
4151         Short cut if the required font is in rface->ascii_rface.
4152         (mface_put_prop): Free old value if necessary.  Set need_update
4153         member of realized faces to 1.
4154
4155         * face.h (struct MFace): Delete member tick, add member
4156         realized_face_list.
4157         (struct MRealizedFace): Delete member tick, add member
4158         need_update.
4159
4160 2004-05-13  Kenichi Handa  <handa@m17n.org>
4161
4162         * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4163
4164 2004-05-12  Kenichi Handa  <handa@m17n.org>
4165
4166         * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4167
4168         * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4169         parse it XftNameParse.
4170
4171         * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4172         (all_fonts_scaned): New variable.
4173         (set_font_info): FAMILY may be Mnil.
4174         (add_font_info): Argument changed.
4175         (xft_list): Call add_font_info in it.
4176         (ft_list): Likewise.
4177         (ft_select): Make it work in the case family is Mnil.
4178         (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4179         (mfont__ft_fini): Set all_fonts_scaned to 0.
4180
4181         * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4182         that is failed to open.
4183
4184 2004-05-10  Kenichi Handa  <handa@m17n.org>
4185
4186         * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4187         device's depth is 1 (i.e. monochrome).
4188
4189         * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4190         to work around the problem of libtool.
4191
4192         * font-ft.c: Include <freetype/ftbdf.h>.
4193         (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4194         variables.
4195         (mfont__ft_init): Initialize them.
4196         (ft_iso8859_1_font_list): New variable.
4197         (set_font_info): Detect a font containing iso8859-1 glyphs and
4198         register it in ft_iso8859_1_font_list.  If the font is not
4199         scalable, assume it as BDF or PCF font and setup SIZE and RESY
4200         properties of the font from its properties.
4201         (add_font_list): If the font is not scalable, check if it is BDF
4202         or PCF font.  If not, ignore it.
4203         (ft_select): If FAMILY is Mnil, return NULL only if the requested
4204         registry is not iso8859-1.
4205         (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4206         ft_iso8859_1_font_list.
4207         (ft_find_metric): If the font is not scalable, assume it as BDF
4208         or PCF, and get a metric from its properties.
4209         (mfont__ft_fini): Free ft_iso8859_1_font_list.
4210
4211 2004-05-07  Kenichi Handa  <handa@redhat.m17n.org>
4212
4213         * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4214         (libm17n_la_LDFLAGS): Delete it.
4215         (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4216         (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4217
4218 2004-05-06  Kenichi Handa  <handa@m17n.org>
4219
4220         * draw.c (compose_glyph_string): Fix previous change.
4221
4222 2004-04-30  Kenichi Handa  <handa@m17n.org>
4223
4224         * font-ft.c (ft_list): Delete unused variable `result'.
4225         (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4226
4227 2004-04-27  Kenichi Handa  <handa@m17n.org>
4228
4229         * m17n-X.c: Include config.h
4230         [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4231         (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4232         (MWDevice) [HAVE_XFT2]: New member xft_draw.
4233         (FRAME_CMAP, FRAME_VISUAL): New macros.
4234         (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4235         (xfont_driver): Make it static.
4236         (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4237         (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4238         info->xft_color_back.
4239         (MXftFontInfo) [HAVE_XFT2]: New type.
4240         (mwin__xft_close) [HAVE_XFT2]: New function.
4241         (mwin__xft_open) [HAVE_XFT2]: New function.
4242         (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4243         (mwin__xft_render) [HAVE_XFT2]: New function.
4244
4245         * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4246         (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4247         (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4248         externs.
4249
4250         * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4251
4252         * font-ft.c: Don't include FT_FREETYPE_H here.
4253         [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4254         (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4255         (MFTInfo): New member charmap_index.
4256         (MFTInfo) [HAVE_XFT2]: New member xft_info.
4257         (check_otf_filename): Renamed from check_filename.  Return value
4258         changed.
4259         (ft_set_property): This function deleted.
4260         (set_font_info): New function.
4261         (add_font_list): Argument changed.  Add multiple fonts.
4262         (xft_list) [HAVE_XFT2]: New function.
4263         (ft_list) [not HAVE_XFT2]: New function.
4264         (ft_select): Add code for Xft.
4265         (close_ft): Likewise.
4266         (ft_open): Likewise.
4267         (ft_find_metric): Likewise.
4268         (ft_encode_char): Likewise.
4269         (ft_render): Likewise.
4270
4271         * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4272
4273 2004-04-26  Kenichi Handa  <handa@m17n.org>
4274
4275         * textprop.c (mtext_attach_property): Declare the return type as
4276         `int'.
4277
4278 2004-04-21  Kenichi Handa  <handa@m17n.org>
4279
4280         * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4281
4282 2004-04-09  Kenichi Handa  <handa@m17n.org>
4283
4284         * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4285         seq_to.
4286         (load_command): Setup above members.
4287
4288 2004-04-05  Kenichi Handa  <handa@m17n.org>
4289
4290         * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4291
4292 2004-03-30  Kenichi Handa  <handa@m17n.org>
4293
4294         * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4295         >= 0x10000.
4296
4297         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4298         (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4299
4300 2004-03-29  Kenichi Handa  <handa@m17n.org>
4301
4302         * Version 1.0 Patch Level 2 released.
4303
4304 2004-03-29  Kenichi Handa  <handa@m17n.org>
4305
4306         * charset.c (make_charset): Set charset->fully_loaded and
4307         charset->simple correctly.  Don't try to get charset->min_char and
4308         charset->max_char for a charset of method subset and superset.
4309         Don't load a mapping file here.
4310         (mcharset__init): Set unified_max.
4311         (mcharset__load_from_database): Free a working plist.
4312
4313         * coding.c (mcoding__fini): Free all malloced data.
4314
4315         * input-gui.c (win_create_ic): Set control.as_image for preediting
4316         to 0.
4317
4318         * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4319         `count') to initialize the array.
4320
4321         * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4322         M17N_OBJECT_UNREF.
4323
4324         * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4325         rectangle.
4326         (mwin__create_window): Fix bug of setting a background pixel of a
4327         new window.
4328         (mwin__adjust_window): Clear the window before drawing.
4329
4330         * m17n-core.c (mdebug__report_object): Free array->objectes if
4331         necessary.
4332         (m17n_init_core): Don't set report_header_printed to 0 here.
4333         Fix debugging information.
4334         (m17n_fini_core): Set report_header_printed to 0 here.
4335
4336         * m17n-core.h (mplist_deserialize): Extern it.
4337
4338         * m17n-gui.c (m17n_fini_win): Fix debugging information.
4339
4340         * m17n.c (m17n_fini): Fix debugging information.
4341
4342         * mtext.c (mtext__adjust_foramt): New function.
4343
4344         * mtext.h (mtext__adjust_foramt): Extern it.
4345
4346         * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4347
4348         * plist.h (mplist__deserialize): Don't extern it.
4349
4350         * symbol.c (msymbol__fini): Set freed_symbols to 0.  Set all
4351         elements of symbol_table to NULL.  Report about created and freed
4352         symbols if MDEBUG_FINI is set.
4353
4354 2004-03-22  Kenichi Handa  <handa@m17n.org>
4355
4356         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4357
4358         * m17n.c (m17n_init): Fix the way of checking merror_code.
4359
4360         * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4361
4362 2004-03-22  Kenichi Handa  <handa@m17n.org>
4363
4364         * fontset.c (realize_font_group): Adjust the font size by
4365         mfont__resize before selecting a font.
4366
4367         * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4368
4369 2004-03-19  Kenichi Handa  <handa@m17n.org>
4370
4371         * Version 1.0 Patch Level 1 released.
4372
4373 2004-03-19  Kenichi Handa  <handa@m17n.org>
4374
4375         * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4376
4377         * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4378
4379 2004-03-19  Kenichi Handa  <handa@m17n.org>
4380
4381         Re-apply the changes forgotten in the released version.
4382
4383         * charset.c (mcharset__load_from_database): Call
4384         mchar_define_charset.
4385
4386         * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4387         (mconv_encode_range): Put Mcoding text property.
4388
4389 2004-03-18  Kenichi Handa  <handa@m17n.org>
4390
4391         * draw.c (Mdepth): New variable.
4392         (visual_order): Delete unused local var `pos'.
4393         (compose_glyph_string): Fix for the case that gstring->glyphs is
4394         realloced.  Stop generating glyphs at TO.  Fix handling of
4395         control charaters.
4396         (layout_glyphs): Get metrics of all glyphs in advance.  Set
4397         lbearing and rbearing of base of composition glyph correctly.
4398         Handle left-overhang glyphs correctly.
4399         (alloc_gstring): New arg frame.  Set gstring->anti_alias.  Caller
4400         changed.
4401         (dump_combining_code): Change the defualt off_x character to ".".
4402         (mdraw__init): Initialize Mdepth.
4403
4404         * face.c (work_gstring): New variable
4405         (mface__init): Initialize work_gstring.
4406         (mface__fini): Free work_gstring.glyphs.
4407         (mface__realize): Don't handle videomode property here.  Adjusted
4408         for the change of mfont__get_metric.
4409         (mface__for_chars): Adjusted for the change of mfont__get_metric.
4410
4411         * face.h (enum face_gc): Moved to m17n-X.c.
4412
4413         * font.h (struct MFontDriver): Arguments of find_metric changed.
4414         (mfont__select): Prototype adjusted.
4415         (mfont__get_metric): Likewise.
4416         (mfont__ft_drive_otf): Likewise.
4417         (mfont__flt_run): Likewise.
4418         
4419         * font.c (mfont__select): New argument layouter.  If layouter is
4420         different in the registered font, make a new copy of realized
4421         font.
4422         (mfont__get_metric): Argument changed.  Get metrics of multiple
4423         glyphs.
4424         (mfont_find): Call mfont__select with layouter as Mnil.
4425
4426         * font-flt.c (FontLayoutContext): New member rfont.
4427         (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4428         (mfont__flt_run): Argument changed.  Initialize ctx.rfont.
4429
4430         * font-ft.c (ft_find_metric): Arguments changed.  Get metrics of
4431         multiple glyphs.
4432         (NUM_POINTS): New macro.
4433         (MPointTable): New type.
4434         (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4435         (mfont__ft_drive_otf): New argument rfont.
4436
4437         * fontset.c (realize_font_group): Adjusted for the changed of
4438         mfont__select.
4439         (check_fontset_element): This function deleted.
4440
4441         * input-gui.c (adjust_window_and_draw): Locate a preedit window
4442         off the parent window if the preedit text is zero length.
4443
4444         * internal-gui.h (struct MFrame): New members foreground,
4445         background, videomode, font.
4446         (struct MGlyphString): New member anti_alias.
4447         (MDrawPoint): New type.
4448         (mwin__draw_bitmap): Prototype deleted.
4449         (mwin__draw_points): Prototype added.
4450
4451         * m17n-gui.h (MDrawControl): New member anti_alias.
4452
4453         * m17n-gui.c (free_frame): Free frame->font.
4454         (mframe): Set the fontset of frame->face to the default fontset.
4455
4456         * m17n-X.c (RGB_GC): New type.
4457         (enum gc_index): Renamed from enum face_gc.  Member names changed.
4458         (GCInfo): New typel
4459         (struct MWDevice): Members foreground and background deleted.  New
4460         member scratch_gc, gc_list.
4461         (DEFAULT_FONT, FALLBACK_FONT): New macros.
4462         (free_device): Free GCs in device->gc_list.
4463         (get_rgb_gc): New function.
4464         (get_gc): Renamed and argument changed from get_color.
4465         (get_gc_for_anti_alias): New function.
4466         (xfont_find_metric): Arguments changed.  Get metrics of multiple
4467         glyphs.
4468         (set_region): Argument changed.  Caller changed.
4469         (xfont_render): Allways set a font in gc.
4470         (x_error_handler, x_io_error_handler): Define only if
4471         X_SET_ERROR_HANDLER is defined.
4472         (mwin__open_device): Create device->scratch_gc.  Set members
4473         foreground, background, and videomode of frame.  Call
4474         XSetErrorHandler and XSetIOErrorHandler only if
4475         X_SET_ERROR_HANDLER is defined.
4476         (struct gc_list): Deleted.
4477         (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4478         (mwin__realize_face): Adjusted for the change of the format of
4479         rface->info and the charge of set_region.
4480         (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4481         (mwin__draw_box): Likewise.
4482         (mwin__draw_bitmap): This function deleted.
4483         (mwin__draw_points): New function.
4484         (mwin__verify_region): Adjusted for the change of the format of
4485         rface->info and the charge of set_region.
4486         (mwin__create_window): Inherit backgound pixel from parent.
4487         (mwin__dump_gc): Adjusted for the change of the format of
4488         rface->info.
4489
4490 2004-03-16  Kenichi Handa  <handa@m17n.org>
4491
4492         * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4493
4494         * input.c (M_key_alias): New variable.
4495         (handle_key): Try M_key_alias property of a key too.
4496         (minput__init): Initialize M_key_alias.  Give that property to
4497         symbols in one_char_symbol.  Fix bug of initializing
4498         one_char_symbol.
4499
4500         * draw.c (compose_glyph_string): Don't handle
4501         ignore_formatting_char here.  Include formatting characters in the
4502         range processed by a FTL.
4503         (layout_glyph_string): Handle ignore_formatting_char here.
4504
4505 2004-03-12  Kenichi Handa  <handa@m17n.org>
4506
4507         * input-gui.c (win_create_ic): Enable bidi in status control.
4508
4509         * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4510
4511 2004-03-09  Kenichi Handa  <handa@m17n.org>
4512
4513         * input.c (load_input_method): If title is not specified, use the
4514         input method name as title.
4515
4516         * m17n-X.c (get_color): Make it static.
4517         (xim_create_ic, xim_destroy_ic, x_error_handler)
4518         (x_io_error_handler): Likewise.
4519
4520 2004-03-01  Kenichi Handa  <handa@m17n.org>
4521
4522         * Version 1.0 released.
4523
4524 \f
4525 Copyright (C) 2003, 2004
4526   National Institute of Advanced Industrial Science and Technology (AIST)
4527   Registration Number H15PRO112
4528
4529 This file is part of the m17n library.
4530
4531 The m17n library is free software; you can redistribute it and/or
4532 modify it under the terms of the GNU Lesser General Public License
4533 as published by the Free Software Foundation; either version 2.1 of
4534 the License, or (at your option) any later version.
4535
4536 The m17n library is distributed in the hope that it will be useful,
4537 but WITHOUT ANY WARRANTY; without even the implied warranty of
4538 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4539 Lesser General Public License for more details.
4540
4541 You should have received a copy of the GNU Lesser General Public
4542 License along with the m17n library; if not, write to the Free
4543 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4544 Boston, MA 02110-1301, USA.