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