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