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