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