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