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