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