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