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