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