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