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