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