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