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