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