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