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