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