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