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