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