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