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