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