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