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