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