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