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