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