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