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