1 2010-04-05 Kenichi Handa <handa@m17n.org>
3 * font-ft.c (ft_check_cap_otf): Fix conditions to call
6 * database.c (check_version): Fix previous change.
8 2010-04-02 Kenichi Handa <handa@m17n.org>
10 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 6.
11 (M17NLIB_PATCH_LEVEL): Changed to 0.
12 (M17NLIB_VERSION_NAME): 1.6.0.
14 2010-03-01 Kenichi Handa <handa@m17n.org>
16 * m17n-flt.c (run_rule): Fix checking of glyph availability.
18 2010-02-18 Kenichi Handa <handa@m17n.org>
20 * m17n-gui.c (register_device_library): Preprend M17N_MODULE_DIR
21 to the module file name.
23 * input.c (load_external_module): Preprend M17N_MODULE_DIR to the
26 * charset.c (load_charset): Check the return value of fgets.
28 * Makefile.am: Build modules dynamically loaded with
29 -avoid-version and no -version-info.
31 2010-01-15 Kenichi Handa <handa@m17n.org>
33 * draw.c (run_flt): Set mflt_try_otf to rfont->driver->try_otf.
34 (mdraw__init): Set mflt_enable_new_feature to 1.
36 * font-ft.c (ft_try_otf): New function.
37 (mfont__ft_driver): Set ft_try_otf.
39 * font.h (struct MFontDriver): New member try_otf.
41 * m17n-X.c (xft_driver): Set xft_try_otf.
42 (xft_try_otf): New function.
44 * m17n-flt.h: (mflt_enable_new_feature): Extern it.
45 (mflt_try_otf): Extern it.
47 * m17n-flt.c (load_category_table): If mflt_enable_new_feature is
48 zero, return NULL for such categories that require the new
50 (parse_otf_command): If mflt_enable_new_feature is zero, return
52 (load_otf_command): Fix previous change.
53 (load_flt): Check the return value of load_category_table.
54 (try_otf): Renamed from run_otf_category. Call mflt_try_otf
55 instead of font->drive_otf.
56 (run_command): Call try_otf instead of run_otf_category.
57 (m17n_init_flt): Initialize mflt_enable_new_feature to 0,
59 (mflt_enable_new_feature): New variable.
60 (mflt_try_otf): New variable.
62 2009-12-10 Kenichi Handa <handa@m17n.org>
64 * m17n-flt.c (parse_otf_command): Handle ":otf?".
65 (run_otf_category): If not features are specified, reset category
67 (run_command): On copy, don't re-calculate a category code.
69 2009-12-03 Kenichi Handa <handa@m17n.org>
71 * m17n-flt.c (run_stages): Reset category code if category-table
73 (mflt_run): Don't set category code here.
74 (decode_packed_otf_tag): If no feature is applied, re-calculate
77 2009-12-02 Kenichi Handa <handa@m17n.org>
79 * m17n-flt.c (mflt_find): If FONT is specified but no flt is
81 (run_command): Don't set ENCODED and MEASURED of separator.
83 2009-11-30 Kenichi Handa <handa@m17n.org>
85 * m17n-flt.c (load_otf_command): Check 4th char against '?'.
86 (load_command): Likewise.
87 (decode_packed_otf_tag): New arg CTX. If CTX->in == gstring,
88 update CTX->encoded. Caller changed.
90 2009-11-30 Kenichi Handa <handa@m17n.org>
92 * font-ft.c (ft_drive_otf): Check if OUT is null or not.
93 (ft_drive_otf): Call OTF_drive_gsub_with_log and
94 OTF_drive_gpos_with_log. Record the applied feature in
97 * font.c (mfont__get_glyph_id): Encode g->c instead of g->code.
99 * internal-flt.h (MAKE_COMBINING_CODE_BY_CLASS)
100 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
101 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P):
103 (PACK_OTF_TAG): Extern it.
105 * draw.c (reorder_combining_chars): Delete it.
107 * m17n-flt.h (mflt_font_id): Use type MFLFont.
108 (mflt_iterate_otf_feature): Likewise.
110 * m17n-flt.c (enum GlyphInfoMask): New member CategoryCodeMask and
112 (GET_CATEGORY_CODE, SET_CATEGORY_CODE, GET_COMBINED): New macros.
113 (SET_COMBINING_CODE): Set also CombinedMask.
114 (FontLayoutFeatureTable): Delete it.
115 (FeatureCodeTable): New type.
116 (FontLayoutCategory): Type of feature_table changed.
117 (load_category_table): Adjusted for the change of
119 (unref_category_table): Likewise.
120 (gen_otf_tag): New member shift. Caller changed.
121 (FontLayoutContext): New member category.
122 (run_rule): Compare g->c instead of g->code.
123 (decode_packed_otf_tag): New function.
124 (run_otf): Call decode_packed_otf_tag. Don't reset combining-code
126 (run_otf_category): New function.
127 (run_command): Set category-code if necessary. Call
128 run_otf_category for FontLayoutCmdTypeOTFCategory.
129 (run_stages): Set ctx->category. Get category from glyph if
131 (mflt_dump_gstring): New function.
133 2009-11-26 Kenichi Handa <handa@m17n.org>
135 * m17n-flt.c (enum FontLayoutCmdType): New member
136 FontLayoutCmdTypeOTFCategory.
137 (FontLayoutFeatureTable): New type.
138 (FontLayoutCategory): New members feature_table_size and
140 (load_category_table): Handle feature_table.
141 (unref_category_table): Likewise.
142 (load_otf_command): Handle FontLayoutCmdTypeOTFCategory.
143 (load_command): Likewise.
144 (free_flt_command): Likewise.
146 2009-11-10 Kenichi Handa <handa@m17n.org>
148 * draw.c (run_flt): Update category code of each glyph.
150 2009-11-07 Kenichi Handa <handa@m17n.org>
152 * font-ft.c (ft_drive_otf): Don't accumulate anchor adjustments.
154 2009-11-05 Kenichi Handa <handa@m17n.org>
156 * m17n-flt.c (run_otf): Fix updating of g->lbearing, etc.
158 * font-ft.c (ft_drive_otf): Use OTF_drive_gpos2 if possible.
160 2009-10-28 Kenichi Handa <handa@m17n.org>
162 * fontset.c (mdebug_flag): New variable.
163 (mfont__lookup_fontset): Print debug info.
165 * m17n-core.c (m17n_init_core): Call SET_DEBUG_FLAG for
168 * internal.h (enum MDebugFlag): Add MDEBUG_FONTSET.
170 * language.c (mscript__from_otf_tag): Adjusted for the new format
171 of the database <standard script unicode>.
173 2009-10-22 Kenichi Handa <handa@m17n.org>
175 * database.c (check_version): Fix the check.
177 * input.c (surrounding_pos): New arg *pos.
178 (integer_value): Fix handling of "@+0".
179 (take_action_list): Adjusted for the change of surrounding_pos.
181 2009-10-05 Kenichi Handa <handa@m17n.org>
183 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
186 * m17n-flt.c (FontLayoutCategory): New typedef.
187 (FontLayoutStage): Type of the member `category' changed.
188 (struct _MFLT): Type of the member `coverage' changed. New member
189 need_config and font_id.
190 (apply_otf_feature): New function.
191 (load_category_table): New arg FONT. If FONT is non-NULL, call
192 apply_otf_feature. Setup category->definition.
193 (ref_category_table): New macro.
194 (unref_category_table): New function.
195 (load_flt): Adjusted for the type change of category.
196 (free_flt_stage): New arg FLT.
197 (list_flt): Adjusted for the type change of category.
198 (run_stages): Adjusted for the type change of category.
199 (configure_category, configure_flt): New function.
200 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
201 mflt_font_id to NULL.
202 (mflt_get): Skip the heading configured FLTs.
203 (mflt_find): Likewise. If necessary, configure the found flt.
204 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
205 Adjusted for the type change of category.
206 (mflt_iterate_otf_feature, mflt_font_id): New variable.
208 * m17n-X.c (xfont_open): Set rfont->id.
209 (xft_driver): Set xft_iterate_otf_feature.
210 (xft_open): Set rfont->id.
211 (xft_iterate_otf_feature): New function.
213 * font.h (struct MRealizedFont): New member id.
214 (struct MFontDriver): New member iterate_otf_feature.
216 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
218 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
219 (get_otf): New funcition.
220 (ft_check_otf, ft_drive_otf): Use get_otf.
221 (iterate_callback, ft_iterate_otf_feature): New functions.
222 (mfont__ft_driver): Set ft_iterate_otf_feature.
224 * draw.c: Docstring updated.
225 (font_id): New function.
226 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
229 2009-10-02 Kenichi Handa <handa@m17n.org>
231 * m17n-flt.c (load_flt): Check the return value of
234 2009-09-03 Kenichi Handa <handa@m17n.org>
236 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
237 positions are adjusted by GPOS table.
239 2009-08-13 Kenichi Handa <handa@m17n.org>
241 * Version 1.5.5 released.
243 2009-08-13 Kenichi Handa <handa@m17n.org>
245 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
246 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
248 2009-03-03 Kenichi Handa <handa@m17n.org>
250 * draw.c (compose_glyph_string): Check if category not Mnil.
252 2009-03-02 Kenichi Handa <handa@m17n.org>
254 * Version 1.5.4 released.
256 2009-02-25 Kenichi Handa <handa@m17n.org>
258 * m17n-core.c (report_object_array): For M-text and Plist, print
261 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
262 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
264 * input.c (get_candidate_list): Free unnecessary objects.
265 (take_action_list): Free plist.
267 2009-02-04 Kenichi Handa <handa@m17n.org>
269 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
271 2009-01-16 Kenichi Handa <handa@m17n.org>
273 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
276 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
279 2009-01-14 Kenichi Handa <handa@m17n.org>
281 * coding.c (decode_coding_iso_2022): Check invocation status
282 before updating charset0 and charset1.
284 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
286 2008-12-31 Kenichi Handa <handa@m17n.org>
288 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
291 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
293 * face.c (mface_get_prop): Fix strict aliasing bug.
294 (mface_put_prop): Likewise.
296 * m17n-gui.c (mframe): Fix strict aliasing bug.
298 2008-10-20 Kenichi Handa <handa@m17n.org>
300 * Version 1.5.3 released.
302 2008-10-06 Kenichi Handa <handa@m17n.org>
304 * draw.c (mdraw__init): Use TRUE only when
305 FRIBIDI_INTERFACE_VERSION is less than 3.
307 2008-10-03 Kenichi Handa <handa@m17n.org>
309 * database.c (mdatabase__find_file): Return a copy of filename if
310 it is absolute pathname.
312 2008-09-25 Kenichi Handa <handa@m17n.org>
314 * input.c (load_macros): Don't parse the action list here.
315 (load_im_info): Parse action lists of all macros.
317 2008-09-24 Kenichi Handa <handa@m17n.org>
319 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
321 2008-09-19 Kenichi Handa <handa@m17n.org>
323 * input.c (fully_initialize): Rename "@reload" to "-reload".
325 2008-09-17 Kenichi Handa <handa@m17n.org>
327 * m17n-flt.c (run_stages): Fix combining with a variable width
330 2008-08-04 Kenichi Handa <handa@m17n.org>
332 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
335 2008-07-22 Kenichi Handa <handa@m17n.org>
337 * input.c (fully_initialize): Fix previous change.
339 2008-07-19 Kenichi Handa <handa@m17n.org>
341 * input.c (fully_initialize): Fix previous change.
343 2008-07-14 Kenichi Handa <handa@m17n.org>
345 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
347 2008-07-14 Kenichi Handa <handa@m17n.org>
349 * input.c (fully_initialize): Handle C-M-1, etc.
351 2008-07-11 Kenichi Handa <handa@m17n.org>
353 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
355 2008-06-23 Kenichi Handa <handa@m17n.org>
357 * Version 1.5.2 released.
359 2008-06-23 Kenichi Handa <handa@m17n.org>
361 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
362 (M17NLIB_PATCH_LEVEL): Changed to 2.
363 (M17NLIB_VERSION_NAME): Changed "1.5.2".
365 2008-06-13 Kenichi Handa <handa@m17n.org>
367 * input.c (minput_config_file): Comment fixed for man-page.
369 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
371 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
373 2008-05-24 Kenichi Handa <handa@m17n.org>
375 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
377 2008-05-23 Kenichi Handa <handa@m17n.org>
379 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
380 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
382 (libm17n_gd_la_LIBADD): Likewise.
384 * input.c (take_action_list): Fix debug info.
386 2008-05-14 Kenichi Handa <handa@m17n.org>
388 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
389 (run_stages): Fix index of g_indices.
391 2008-04-03 Kenichi Handa <handa@m17n.org>
393 * draw.c (compose_glyph_string): Don't run flt striding over the
395 (get_gstring): Don't use the cached gstring if cursor position is
398 2008-04-02 Kenichi Handa <handa@m17n.org>
400 * input.c (integer_value): Delete the 3rd arg VALUE.
401 (resolve_expression): Adjust the call of integer_value.
402 (take_action_list): Likewise.
404 2008-03-06 Kenichi Handa <handa@m17n.org>
406 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
409 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
411 * Version 1.5.1 released.
413 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
415 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
416 HAVE_FREETYPE is defined.
418 * font.h (OTF_Tag): Be sure that it is defined in any cases.
420 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
422 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
425 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
427 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
429 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
431 * input.c (parse_action_list): Check M_candidates.
432 (get_im_info): If key is Mnil, be sure to set im_info->states to a
435 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
437 * input.c (integer_value): Fix interpretation of "@-N".
439 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
441 * input.c (get_following_char): Fix interpretation of POS.
442 (get_following_char): Fix interpretation of "@+N".
444 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
446 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
449 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
451 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
453 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
455 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
456 (run_command): Check if clustering now before calling
457 UPDATE_CLUSTER_RANGE.
459 2008-01-06 Kenichi Handa <handa@m17n.org>
461 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
463 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
465 * m17n-X.c (xft_find_metric): Set g->g.measured.
467 * m17n-flt.c (Mequal): New variable.
468 (m17n_init_flt): Initialize it.
469 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
470 into a new member facility.
471 (load_command): Modify parsing of Mfont_facility.
472 (run_rule): Adjuted for the change of FontLayoutCmdRule.
473 (run_otf): Adjusted metrics if a->back is nonzero.
475 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
477 * Version 1.5.0 released.
479 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
481 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
483 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
484 (run_rule): Check if a font has the specific glyph correctly.
486 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
487 MDEBUG_FONT_FLT to MDEBUG_FLT.
489 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
491 * font-flt.c: Delete it.
493 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
495 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
496 TO for the rule of SRC_HAS_GLYPH.
498 * draw.c (run_flt): Argument changed.
499 (compose_glyph_string): Adjusted for the above change.
501 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
503 * plist.c (read_mtext_element): Don't free the malloced buffer.
505 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
507 * m17n-core.h (merror_code): Extern it.
509 * m17n-misc.h (merror_code): Don't extern it.
511 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
513 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
515 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
517 * draw.c (compose_glyph_string): Check g->rface->layouter, not
518 g->rface->rfont->layouter.
520 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
522 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
523 (run_rule): Use ctx->encoded_offset.
524 (run_command): Likewise.
525 (run_stages): Set ctx->encoded_offset.
527 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
529 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
530 bit-size of MFLTGlyph->internal.
532 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
534 * draw.c (visual_order): Exclude the last anchor glyph from the
537 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
539 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
540 (run_stages): Likewise.
541 (load_flt): Unref top after checking plist.
543 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
545 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
547 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
549 * m17n-flt.c (Mcombining): New variable.
550 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
551 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
552 SRC_HAS_GLYPH and SRC_OTF_SPEC.
553 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
555 (load_command): Adjusted for the above changes.
556 (run_rule): Likewise.
557 (combining_code_from_class): Delete it.
558 (mflt_get): Check flt->name against Mcombining, not Mt.
560 * internal-flt.h (Mcombining): Extern it.
562 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
563 combining characters.
565 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
567 * face.c (mface__realize): Reset measured flag before calling
570 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
571 (setup_combining_coverage): New function.
572 (setup_combining_flt): New function.
573 (mflt_get): If flt is not found, return NULL. If name if Mt,
574 call setup_combining_flt.
575 (mflt_run): For debugging, print font family name.
577 * font-ft.c (ft_render): Fix handling of baseline_offset.
578 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
579 (ft_render): Check pixel_mode to determine anti_alias.
581 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
582 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
583 (xfont_render): Set baseline_offset in pixel.
584 (xft_render): Fix handling of baseline_offset.
586 * draw.c (run_flt): Set font.font.family.
587 (compose_glyph_string): Fix handling of combining characters.
589 * fontset.c (try_font_list): Check if the named flt is surely
592 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
594 * draw.c (analyse_bidi_level): New function.
595 (visual_order): Do reordering using the already decided
597 (compose_glyph_string): Decide bidi-level before calling flt.
599 * m17n-flt.c (mflt_run): Fix typo.
601 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
603 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
605 * draw.c (visual_order): Don't rely on the width of glyphs.
606 (run_flt): Fix culculation of g->g.to.
608 * m17n-flt.c (run_rule): Don't set error code here.
609 (run_cond): Likewise.
610 (run_otf): Fix culculation of xoff and yoff.
611 (run_command): Don't set error code here.
615 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
616 (xfont_find_metric): Set glyph's yadv to 0.
617 (xft_find_metric): Likewise.
619 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
620 (ft_find_metric): Adjust glyph's metrics.
621 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
622 (ft_drive_otf): Set mark glyph's xadv to 0.
624 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
627 2007-10-29 Kenichi Handa <handa@m17n.org>
629 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
630 (mflt_get): Adjusted for the argument change.
631 (mflt_name): Adjusted for the return value change.
633 * m17n-flt.c (Mgenerator, Mend): New variables.
634 (flt_min_coverage, flt_max_coverage): New variables.
637 (Mfont_has): Renamed from Mexist. Referrers chagned.
638 (gen_otf_tag): Handle the trailing whitespaces.
639 (otf_count_features, otf_store_features): Fix for negative features.
640 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
641 (load_otf_command): Likewise.
642 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
643 (load_flt): Argument changed. Caller changed.
644 (free_flt_list): New function.
645 (run_rule): Adjusted for the change of FontLayoutContext.
646 (mflt_run): Adjusted for the change of FontLayoutContext.
648 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
649 (m17n_fini_win): Call m17n_fini_flt.
651 * m17n-gui.h: Include m17n-flt.h.
653 * m17n-gd.c: Adusted for the change of MGlyph.
655 * m17n-X.c: Adusted for the change of MGlyph.
656 (xft_check_otf, xft_drive_otf): New functions.
658 * internal-gui.h (MGlyph): Modified for new FLT handling.
660 * fontset.c (try_font_list): Adusted for the change of MGlyph.
662 * font-ft.c: Adjusted for the change of MGlyph.
663 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
664 (get_glyph_metric): Deleted.
665 (ft_check_otf): New function.
666 (ft_drive_otf): New fucntion.
668 * font.c: Adjusted for the change of MGlyph.
669 (mfont__init): Don't call mfont__flt_init.
670 (mfont__fini): Don't call mfont__flt_fini.
671 (mfont__get_glyph_id, mfont__get_metrics): New functions.
673 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
674 (MFLTFontForRealized): New struct.
675 (struct MFontDriver): New members check_otf and drive_otf.
676 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
678 * face.c: Adjusted for the change of MGlyph.
680 * draw.c: Adjusted for the change of MGlyph.
682 * m17n.c (m17n_init): Don't call mchar_init.
684 * m17n-core.c (m17n_init_core): Call mchar_init.
686 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
688 * input.c: Include "m17n.h" instead of "m17n-gui.h".
690 * chartab.c (mchartable): Initialize table->min_char to -1.
691 (mchartable_min_char): New function.
692 (mchartable_max_char): New function.
694 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
695 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
697 2007-10-12 Kenichi Handa <handa@m17n.org>
699 * m17n-core.h (Mcharset): Extern it.
700 Move detabase related declarations from m17n.h.
702 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
703 (struct _MFLTOtfFeatures): New struct.
704 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
705 (struct _MFLTFont): Delete otf, add check_otf.
706 (MCHAR_INVALID_CODE): Define it.
708 * plist.c (read_mtext_element): Simplify the code.
710 * m17n.h: Move database related declarations to m17n-core.h
711 (Mharset): Don't extern it.
713 * m17n.c (m17n_init): Don't call mdatabase__init.
715 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
718 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
719 (Mexist): New variable.
720 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
721 (FontLayoutCmdRule): New member src.exist.
722 (parse_otf_command): Handle gsub_count and gpos_count separately.
723 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
724 (load_command): Handle the command "exist".
725 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
726 (run_rule): Handle the case SRC_EXIST.
727 (run_otf): Adjusted for the change of MFLTOtfSpec.
728 (run_command): Check the range of FROM.
729 (check_otf_spec): Delete it.
730 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
732 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
733 (mflt_find): Call font->check_otf instead of check_otf_spec.
734 (mflt_run): Keep the metrics in 26.6 fixed point.
736 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
737 (m17n_init_core): Call mdatabase__init.
739 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
741 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
744 * font-flt.c (Mexist): New variable.
745 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
746 (FontLayoutCmdRule): New member src.exist.
747 (load_category_table): Use isalnum, not isalpha.
748 (load_command): Check the command "exist".
749 (run_rule): Hande the case SRC_EXIST.
750 (run_command): Check the range of FROM.
751 (mfont__flt_init): Initialize Mexist.
753 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
755 * database.h (mdatabase__load_charset_func): Extern it.
757 * database.c: Include m17n-core.h instead of m17n.h.
758 (load_chartable): Use mtext__from_data.
759 (load_charset): Moved to charset.c
760 (load_database): Call mdatabase__load_charset_func instead of
762 (mdatabase__load_charset_func): New variable.
763 (mdatabase__init): Initialize mdatabase__load_charset_func and
764 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
765 (mdatabase__save): Use fwrite, not mconv_encode_stream.
766 (Mcharset): Declare it here.
768 * charset.c: Include "database.h.".
769 (load_charset): Moved from database.c.
770 (mcharset__init): Initialize mdatabase__load_charset_func, don't
773 * character.c (mchar_define_property): Call mdatabase_find directly.
774 (mchar_get_prop): Call mdatabase_add directly.
775 (mchar_put_prop): Call mdatabase_load directly.
776 (mchar_get_prop_table): Likewise.
778 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
779 (libm17n_la_SOURCES): Remove database.[ch].
780 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
782 2007-09-18 Kenichi Handa <handa@m17n.org>
784 * face.c (mface__realize): Try Freetype based font at first.
786 * font.c: Include <ctype.h>
788 2007-09-16 Kenichi Handa <handa@m17n.org>
790 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
792 (run_otf): Call font->get_metrics, not font->get_metric.
793 (run_stages): Likewise.
794 (CHECK_FLT_COVERAGE): New macro.
795 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
796 (check_otf_spec): New function.
797 (m17n_fini_flt): Unref flt->coverage.
798 (mflt_find): Argument changed.
799 (mflt_name): New function.
800 (mflt_coverage): Use CHECK_FLT_COVERAGE.
802 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
803 (mflt_find): Prototype adjusted.
804 (mflt_name): Extern it.
806 2007-09-14 Kenichi Handa <handa@m17n.org>
808 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
810 * font-flt.c (run_otf): Make debug info printing comaptible with
812 (run_command): Likewise.
813 (mfont__flt_run): Likewise.
815 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
816 invalid only when it's negative.
818 (run_command): Likewise.
819 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
821 2007-09-10 Kenichi Handa <handa@m17n.org>
823 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
824 (struct _MFLTFont): Prototype of get_glyph_id changed.
826 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
828 (GAPPEND): Delete this macro.
829 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
830 for the change of MFLTGlyph. Caller changed.
831 (run_otf): Simply calls font->get_glyph_id.
832 (run_command): Reset g->encoded and g->measured for direct code.
833 (positioning): Delete this function.
834 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
836 2007-09-07 Kenichi Handa <handa@m17n.org>
838 * draw.c (compose_glyph_string): Improve script detection.
840 2007-09-06 Kenichi Handa <handa@m17n.org>
842 * m17n-flt.h (mflt_get): Extern it.
844 * m17n-flt.c (run_stages): Call positioning only if
845 font->get_metric is non-NULL.
846 (CHECK_FLT_STAGES): Fix typo.
847 (mflt_get): New function.
849 * font-flt.c (mfont__flt_run): Improve debug info printing.
851 2007-09-04 Kenichi Handa <handa@m17n.org>
853 * m17n-flt.c (MFontLayoutTable): Delete this type.
854 (struct _MFLT): New member mdb and coverage.
855 (list_flt): Set flt->mdb.
856 (load_generator): Argument and return value changed. Caller
858 (get_font_layout_table): Delete this function.
859 (run_stages): Argument changed. Caller changed.
860 (CHECK_FLT_STAGES): New macro.
861 (mfont__flt_encode_char): Argument changed.
862 (mflt_find): Likewise.
863 (mflt_coverage): New function.
864 (mflt_run): Argument changed.
865 (mdebug_dump_flt): Likewise.
867 * m17n-flt.h (mflt_coverage): Extern it.
868 (mflt_find): Prototype adjusted.
870 2007-09-03 Kenichi Handa <handa@m17n.org>
872 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
874 * database.c (mdatabase__props): New function.
876 * database.h (mdatabase__props): Extern it.
878 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
880 (struct _MFLTFont): Add suitable_p.
881 (mflt_find): Extern it.
883 * m17n-flt.c: Include "database.h".
884 (struct _MFLT): New struct.
885 (list_flt): New function.
886 (load_flt): Don't update flt_list.
887 (get_font_layout_table): Use flt_list.
888 (m17n_init_flt): Don't initialize flt_list.
889 (m17n_fini_flt): Adjusted for the change of flt_list.
890 (mflt_find): New function.
891 (mflt_run): Fix debug printing.
893 2007-08-23 Kenichi Handa <handa@m17n.org>
895 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
896 (run_stages): Print separator in encoded string as "|".
898 2007-08-23 Kenichi Handa <handa@m17n.org>
900 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
901 the glyph is already handled by OTF.
903 2007-08-21 Kenichi Handa <handa@m17n.org>
905 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
907 2007-08-20 Kenichi Handa <handa@m17n.org>
909 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
912 2007-08-17 Kenichi Handa <handa@m17n.org>
914 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
916 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
917 (MFLTFont): Prototype of the member drive_otf adjusted.
919 * m17n-flt.c (run_stages): Fix handling of padding.
921 * font-ft.c (get_glyph_metric): New function.
922 (DEVICE_DELTA): Return 26.6 fixed point value.
923 (adjust_anchor): Likewise.
924 (mfont__ft_drive_otf): Use get_glyph_metric.
926 * font-flt.c (mfont__flt_run): Pay attention to padding on
929 2007-08-16 Kenichi Handa <handa@m17n.org>
931 * m17n-flt.c (run_stages): Fix typo.
933 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
935 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
936 Adjusted for the argument change of adjust_anchor. Calculte based
939 2007-08-15 Kenichi Handa <handa@m17n.org>
941 * charset.c (mcharset__load_from_database): Set mdebug_flag
942 instead of mdebug_mask.
944 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
947 * database.c (load_database): Set mdebug_flag instead of
949 (mdatabase__load_for_keys): Likewise.
951 * draw.c: Include "internal-flt.h".
952 (dump_combining_code): Don't subtract 128 from combining code
955 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
957 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
959 (run_cond): Likewise.
961 (run_command): Likewise.
962 (mfont__flt_run): Change format of debug info.
964 * font-ft.c: Include "internal-flt.h".
965 Set mdebug_flag instead of mdebug_mask.
966 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
968 * input.c: Set mdebug_flag instead of mdebug_mask.
969 (shift_state): New MDEBUG_FLAG macro.
970 (preedit_commit): Likewise.
973 * internal-flt.h: New file.
975 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
976 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
977 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
978 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
979 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
980 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
981 these macros to internal-flt.h.
983 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
985 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
986 (enum MDebugMaskBit): Delete this enum.
987 (enum MDebugFlag): New enum.
988 (mdebug__flag): Don't extern it.
989 (mdebug__flags): Extern it.
990 (MDEBUG_FLAG): New macro.
991 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
992 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
993 (MDEBUG_PRINT_TIME): Likewise.
995 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
996 (xfont_list): Likewise.
998 * m17n-core.c (mdebug__flag): Delete this variable.
999 (mdebug__flags): New variable.
1000 (SET_DEBUG_FLAG): Make it a function.
1001 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
1002 (m17n_fini_core): Likewise.
1004 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
1005 (m17n_fini_win): Likewise.
1007 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
1009 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
1010 (m17n_fini): Likewise.
1012 * symbol.c (msymbol__free_table): Adjusted for the change of
1015 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
1016 (BASICHEADERS): Add m17n-flt.h.
1017 (FLT_SOURCES): New variable.
1018 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
1019 (libm17n_flt_la_LDFLAGS): Likewise.
1021 * m17n-flt.h: New file.
1023 * m17n-flt.c: New file created by modifying font-flt.c.
1025 2007-07-13 Kenichi Handa <handa@m17n.org>
1027 * Version 1.4.0 released.
1029 2007-07-12 Kenichi Handa <handa@m17n.org>
1031 * input.c: Fix doxygen @ref commands.
1033 2007-07-10 Kenichi Handa <handa@m17n.org>
1035 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
1037 2007-07-09 Kenichi Handa <handa@m17n.org>
1039 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
1041 * m17n.h: Include m17n-core.h if not yet done. Use macros
1042 M17N_BEGIN_HEADER and M17N_END_HEADER.
1044 * m17n-gui.h: Likewise.
1046 * m17n-misc.h: Likewise.
1048 2007-06-13 Kenichi Handa <handa@m17n.org>
1050 * font-flt.c (load_command): Prepend "^" in the regular expression.
1052 2007-06-11 Kenichi Handa <handa@m17n.org>
1054 * language.c (mlanguage_name_list): Fix previous change.
1056 * coding.c (mcoding__load_from_database): Add aliases in
1057 coding_definition_list.
1059 2007-06-10 Kenichi Handa <handa@m17n.org>
1061 * language.c (mlanguage_name_list): Fix previous change.
1063 2007-06-08 Kenichi Handa <handa@m17n.org>
1065 * input.c (update_candidate): Copy candidate_list earlier.
1066 (re_init_ic): Provide pseudo initialize state if none.
1068 2007-06-05 Kenichi Handa <handa@m17n.org>
1070 * input.c (preedit_insert): Print debug information.
1072 * database.c (expand_wildcard_database): New function.
1073 (mdatabase_list): Fix handling of wildcard database.
1075 * language.c (load_lang_name): New function.
1076 (mlang__fini): Cancel the last two changes.
1077 (mlanguage_name_list): New arg script and territories. Use
1080 * m17n.h (mlangauge_name_list): Adjusted.
1082 2007-06-04 Kenichi Handa <handa@m17n.org>
1084 * input.c (open_im): Check if the input method has at least one
1087 2007-06-01 Kenichi Handa <handa@m17n.org>
1089 * input.c (shift_state): Change the format of debug print.
1090 (preedit_commit): New arg need_prefix. Caller changed.
1091 (update_candidate): Copy candidate_list.
1092 (take_action_list): Likewise.
1093 (handle_key): Change the format of debug print.
1095 * font-flt.c (load_flt): Ignore unknown directives.
1097 2007-05-25 Kenichi Handa <handa@m17n.org>
1099 * m17n-core.c (mdebug__unregister_object): Small optimization.
1101 * database.c (find_file): Merged into get_database_file.
1102 (get_database_file): New arg result. Caller changed.
1103 (mdatabase__check): Fix the logic.
1105 2007-05-24 Kenichi Handa <handa@m17n.org>
1107 * database.c (find_database): If unprocessed wildcard database is
1108 found, register database filed and recursively call find_database.
1109 (free_db_info): Unref db_info->properties.
1110 (register_database): New arg properties. Delete code for
1111 initializing mdatabase__list.
1112 (register_databases_in_files): Argument changed. Caller changed.
1113 (mdatabase__update): Don't list files by glob here.
1114 (mdatabase_list): If unprocessed wildcard database is found,
1115 register database filed and recursively call mdatabase_list.
1117 * database.h (enum MDatabaseStatus): New enum
1118 MDB_STATUS_AUTO_WILDCARD.
1120 * input.c (load_branch): Fix previous change.
1121 (update_global_info): If the global database is not found, return -1.
1123 2007-05-23 Kenichi Handa <handa@m17n.org>
1125 * database.c (Mversion): New variable.
1126 (mdatabase__init): Initialize it.
1127 (register_database): New arg properties. Caller changed.
1128 (register_databases_in_files): Don't check version here.
1129 (mdatabase__update): Likewise.
1131 * database.h (MDatabaseInfo): New member properties.
1133 2007-05-21 Kenichi Handa <handa@m17n.org>
1135 * language.c: Include <ctype.h>
1136 (mlanguage__info): Use strncasecmp (not memcmp).
1137 (mlanguage_name): Downcase language name for backward
1140 * input.c (filter): Don't check Mlanguage property of
1143 2007-05-18 Kenichi Handa <handa@m17n.org>
1145 * language.c (mlanguage_name): Fix it to handle M-text English
1148 * input.c (config_command): Set NAME before using it.
1149 (load_branch): Try to resolve a map name by variables.
1151 2007-05-17 Kenichi Handa <handa@m17n.org>
1153 * language.c (mlang__fini): Fix previous change.
1155 2007-05-16 Kenichi Handa <handa@m17n.org>
1157 * plist.c (free_plist): Cancel the last change.
1158 (write_element): Check if PLIST is nested.
1159 (mplist__from_plist): Label a plist as nested if appropriate.
1160 (mplist__from_alist): Label a plist as nested.
1161 (mplist__conc): Check the value of PL before referring it. Label
1162 a plist as nested if appropriate.
1163 (mplist_copy): Label a plist as nested if appropriate.
1164 (mplist_put_func): Return Mnil if KEY is a managing key.
1165 (mplist_push): Label a plist as nested if appropriate.
1167 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
1170 * language.c (mlang__fini): Unref each element of langname_list.
1172 2007-05-14 Kenichi Handa <handa@m17n.org>
1174 * language.c: Include <string.h> and <locale.h>.
1175 (langname_list): New variable.
1176 (load_lang_script_list): Exclude invalid list elements.
1177 (mlang__init): Initialize langname_list.
1178 (mlang__fini): Unref langname_list.
1179 (mlanguage__info): Adjusted for the change of English
1180 name (symbol->M-text).
1181 (mlanguage_name): Label it as obsolete.
1182 (mlanguage_name_list): New function.
1184 * m17n.h (mlanguage_name_list): Extern it.
1186 * locale.c (make_locale): Fix setting of members of locale.
1188 * plist.c (free_plist): Unref also nested plist.
1190 2007-05-11 Kenichi Handa <handa@m17n.org>
1192 * coding.c (mconv_reset_converter): Set internal->used to 0.
1194 2007-05-08 Kenichi Handa <handa@m17n.org>
1196 * input.c (check_description): Force copying the translated text.
1198 2007-05-02 Kenichi Handa <handa@m17n.org>
1200 * input.c (minput_save_config): Unref unnecessary plist. Use
1201 free_im_list to free im_config_list.
1203 2007-04-20 Kenichi Handa <handa@m17n.org>
1205 * input.c (config_command): Fix previous change again.
1206 (config_variable): Likewise.
1207 (minput_config_command): Fix for the case of setting back to
1209 (minput_config_variable): Likewise.
1210 (minput_save_config): Include nil as documentation of customized
1213 2007-04-05 Kenichi Handa <handa@m17n.org>
1215 * input.c (config_command): Fix previous change.
1216 (config_variable): Likewise.
1218 * plist.c (mplist_get_func): Fix for backward compatiblity.
1220 2007-04-04 Kenichi Handa <handa@m17n.org>
1222 * input.c (minput_get_command, minput_config_command): Fix example
1225 2007-03-29 Kenichi Handa <handa@m17n.org>
1227 These changes are to avoid unsafe casting of a function pointer.
1229 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1230 (struct MFace): New member hook.
1232 * face.c (serialize_face): Adjusted for the change of MFace.
1233 (deserialize_face): Likewise.
1234 (mface__init): Likewise. Use msymbol_put_func.
1235 (mface__realize): Adjusted for the change of MFace. Avoid
1237 (mface_get_prop): Adjusted for the change of MFace.
1238 (mface_put_prop): Likewise.
1239 (mface_get_hook): New function.
1240 (mface_put_hook): New function.
1241 (mface_update): Adjusted for the change of MFace.
1243 * input-gui.c (win_callback): Use mplsit_get_func.
1244 (minput__win_init): Use mplsit_put_func.
1246 * input.c (take_action_list): Use mplist_get_func.
1247 (init_ic_info): Likewise.
1248 (fini_ic_info): Likewise.
1249 (minput_callback): Likewise.
1250 (minput__init): Use mplist_put_func.
1252 * language.c (mlang__init): Use msymbol_put_func.
1254 * m17n-core.h (M17NFunc): New function type.
1255 (M17N_FUNC): New macro.
1256 (msymbol_put_func, msymbol_get_func): Extern them.
1257 (mplist_put_func, mplist_get_func): Extern them.
1259 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1261 * m17n-gui.c (mframe): Add a proper casting.
1263 * plist.h (struct MPlist): Make the member val a union.
1264 (MPLIST_VAL): Adjusted for the above change.
1265 (MPLIST_FUNC): New macro.
1266 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1268 * plist.c (mplist_put_func, mplist_get_func): New functions.
1270 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1271 (msymbol_put_func, msymbol_get_func): New functions.
1273 * textprop.c (mtext_serialize): Use msymbol_get_func.
1274 (mtext_deserialize): Likewise.
1276 2007-03-28 Kenichi Handa <handa@m17n.org>
1278 * input.c (get_candidate_list): Avoid unnecessary unref.
1280 2007-03-23 Kenichi Handa <handa@m17n.org>
1282 * database.c (mdatabase__update): Unref plist at the tail.
1284 2007-03-21 Kenichi Handa <handa@m17n.org>
1286 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1288 (config_command): Fix for the case that configuration is
1290 (config_variable): Likewise.
1291 (minput_config_command): If keyseqlist is an empty list, cancel
1293 (minput_config_variable) If value is an empty list, cancel the
1295 (minput_save_config): Handle cancellation of config and customize
1298 2007-03-15 Kenichi Handa <handa@m17n.org>
1300 * input.c (minput_config_variable): Check custom->vars (not
1303 2007-03-01 Kenichi Handa <handa@m17n.org>
1305 * input.c (reload_im_info): Setup cmds, vars, and title of
1307 (check_variable_value): Fix the return value.
1309 * database.c (mdatabase__check): If necessary, update database and
1312 2007-02-28 Kenichi Handa <handa@m17n.org>
1314 * database.c (get_dir_info): Set dir_info->status to
1315 MDB_STATUS_OUTDATED.
1316 (check_version): New function.
1317 (register_database): Don't call find_database.
1318 (register_databases_in_files): Don't register a database of
1320 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1322 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1323 and MDB_STATUS_OUTDATED.
1325 * font.h (struct MFont): Types of members type, source, and
1326 spacing changed to unsigned.
1328 * internal-gui.h (struct): Types of members category and type
1329 changed to unsigned.
1331 * internal.h (struct MText): Types of members format and coverage
1332 changed to unsigned.
1334 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1335 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1337 2007-02-23 Kenichi Handa <handa@m17n.org>
1339 * input.c (Mpop): New variable.
1340 (fully_initialize): Initialize Mpop.
1341 (parse_action_list): Handle Mpop.
1342 (take_action_list): Likewise.
1343 (handle_key): When a key is unhandled, shift to the initial state
1344 only if the current state has no branch action.
1346 2007-02-12 Kenichi Handa <handa@m17n.org>
1348 * input.c (get_preceding_char): Unref mt if necessary.
1349 (get_following_char): Likewise.
1350 (parse_action_list): Fix handling of `insert' action as
1352 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1353 (take_action_list): Check invalid candidate list.
1355 2007-02-06 Kenichi Handa <handa@m17n.org>
1357 * input.c (integer_value): Check also ic->produced for @-N.
1359 2007-01-26 Kenichi Handa <handa@m17n.org>
1361 * database.c (mdatabase__update): Check mdatabase__dir_list from
1364 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1366 2007-01-12 Kenichi Handa <handa@m17n.org>
1368 * input.c (handle_key): Handle a branch action of the initial
1371 2007-01-10 Kenichi Handa <handa@m17n.org>
1373 * m17n-gd.c (gd_render): Delete superfluous line.
1375 2006-12-26 Kenichi Handa <handa@m17n.org>
1377 * m17n.h (minput_callback): Extern it.
1379 * input.h (minput__callback): Delte extern.
1381 * input.c (get_surrounding_text): Adjusted for the change of
1382 minput__callback to minput_callback.
1383 (delete_surrounding_text): Likewise.
1384 (minput_create_ic): Likewise.
1385 (minput_destroy_ic): Likewise.
1386 (minput_filter): Likewise.
1387 (minput_set_spot): Likewise.
1388 (minput_toggle): Likewise.
1389 (minput_reset_ic): Likewise.
1391 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1392 and ic->candidate_to to 0.
1393 (minput_callback): Renamed from minput__callback.
1395 * input-gui.c (win_callback): Adjusted for the change of
1396 minput__callback to minput_callback.
1398 2006-12-15 Kenichi Handa <handa@m17n.org>
1400 * font-ft.c (ft_add_font): Fix typo.
1402 2006-12-06 Kenichi Handa <handa@m17n.org>
1404 * Version 1.3.4 released.
1406 2006-11-16 Kenichi Handa <handa@m17n.org>
1408 * input.c (parse_action_list): Allow (undo 0).
1409 (adjust_markers): New function.
1410 (preedit_insert, preedit_delete): Call adjust_markers.
1411 (preedit_replace): New function.
1412 (update_candidate): Call preedit_replace instead of preedit_insert
1414 (filter): When ic_info->commit_key_head is nonzero, shift input
1415 event keys even if there's no committed text.
1417 2006-11-10 Kenichi Handa <handa@m17n.org>
1419 * input.h (MInputContextInfo): New member commit_key_head.
1421 * input.c (preedit_commit): Update ic_info->commit_key_head.
1422 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1423 (filter): When committed, shift keys by ic_info->commit_key_head.
1425 2006-10-30 Kenichi Handa <handa@m17n.org>
1427 * input.c (preedit_delete): Fix typo.
1428 (take_action_list): Print more debugging information. Allow
1429 variable in arg of 'select' and `pushback'.
1431 * database.c (gen_database_name): Don't put extra space.
1432 (load_database): Print debugging information.
1433 (register_databases_in_files): New arg headlen. Callers changed.
1434 (mdatabase__load_for_keys): Shorten debugging information.
1435 (mdatabase_load): Don't print debugging information here.
1437 2006-10-27 Kenichi Handa <handa@m17n.org>
1439 * input.c (marker_code): New arg surrounding. Callers changed.
1440 (surrounding_pos): Check if name[0] == '@'.
1441 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1442 (take_action_list): Likewise.
1443 (get_preceding_char): If POS is zero, always call
1444 get_surrounding_text.
1446 2006-10-19 Kenichi Handa <handa@m17n.org>
1448 * input.c (load_variables): Fix setting of `global'.
1450 2006-10-16 Kenichi Handa <handa@m17n.org>
1452 * draw.c (draw_background): Be sure to set *to_x.
1453 (render_glyph_string): If from == to, just return.
1455 2006-10-18 Kenichi Handa <handa@m17n.org>
1457 * database.c (get_dir_info): Return NULL if the directory name is
1459 (register_databases_in_files): Call register_database with
1461 (mdatabase__update): Fix logic. Call register_database with
1463 (mdatabase_define): Call register_database with
1464 MDB_STATUS_EXPLICIT.
1466 * input.c (delete_surrounding_text): Be sure to set members
1467 preceding_text and following_text to NULL.
1468 (shift_state): Save variable values in ic_info->vars_saved.
1469 (preedit_commit): Don't print debug information here. Don't
1470 change ic_info->keys here.
1471 (get_candidate_list): Don't ref plist.
1472 (take_action_list): Don't unref return value of
1473 get_candidate_list. For undo, reset ic->produced and recover
1474 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1476 (init_ic_info): Set ic_info->vars_saved.
1477 (fini_ic_info): Unref ic_info->vars_saved.
1478 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1480 (filter): Be sure to set members preceding_text and following_text
1481 to NULL. Print debug information about produced text. Delete
1482 processed keys from ic_info->keys.
1484 * input.h (MInputContextInfo): New member vars_saved.
1486 2006-10-16 Kenichi Handa <handa@m17n.org>
1488 * database.c (mdatabase__update): Fix the way to get db_info.
1490 2006-10-02 Kenichi Handa <handa@m17n.org>
1492 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1493 `size' changed to 24.
1495 * font.c (xlfd_unparse_name): Adjusted for the change of
1497 (font_score): Likewise.
1498 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1500 * m17n-X.c (MFontX, _MFontX): Deleted.
1501 (SET_SIZE, HAVE_SIZE): Deleted.
1502 (free_display_info): Adjusted for the change of
1503 disp_info->font_list format.
1504 (xfont_registry_list): Likewise.
1505 (xfont_open): Likewise.
1506 (xfont_list): Likewise.
1507 (xfont_encode_char): Ignore size to find a realized font.
1508 (MRealizedFontXft): Change the order of members to make it
1509 compatible with MRealizedFontFT.
1511 2006-09-27 Kenichi Handa <handa@m17n.org>
1513 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1514 (mfont_close): Add comments.
1516 * mtext-lbrk.c (mtext_line_break): Add comment.
1518 2006-09-26 Kenichi Handa <handa@m17n.org>
1520 * input.c (minput_get_description): Handle description about
1521 inclusion-only input methods.
1523 2006-09-21 Kenichi Handa <handa@m17n.org>
1525 * input.c (M_gettext): New variable.
1526 (fully_initialize): Initialize M_gettext.
1527 (check_description): New function.
1528 (load_commands): Call check_description.
1529 (config_all_commands): Be sure to unref pl.
1530 (load_variables): Call check_description.
1531 (config_all_variables): Be sure to unref pl.
1532 (load_im_info): Call check_description.
1534 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1536 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1537 and bind_textdomain_codeset.
1539 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1541 2006-09-15 Kenichi Handa <handa@m17n.org>
1543 * input.c (reload_im_info): Update custom and global info.
1544 (init_ic_info): Fix previous change.
1546 2006-09-14 Kenichi Handa <handa@m17n.org>
1548 * database.c: Include <libgen.h>.
1549 (mdatabase__lock): Make a directory if necessary.
1551 * input.c (resolve_command): Adjusted for the format change of
1552 configured_cmds member.
1553 (load_commands, load_variables): Fix for errornous data handling.
1554 (config_command, config_variable): New function.
1555 (config_all_commands, config_all_variables): Renamed from
1556 config_commands and config_variables. Utilize the above function.
1557 (check_variable_value): Argument changed. Callers changed.
1558 (load_im_info): Call config_all_commands and config_all_variables.
1559 (init_ic_info): Adjusted for the format change of configured_vars
1561 (minput__init): Initialize Mcustomized, Mconfigured, and
1563 (Mcustomized, Mconfigured, Minherited): New variables.
1564 (minput_get_command): Be sure to return NULL if an input method
1565 use no local command.
1566 (minput_get_variable): Be sure to return NULL if an input method
1567 use no local variable.
1568 (minput_config_command, minput_config_variable)
1569 (minput_save_config): Adjusted for the format change of
1570 configured_cmds and configured_vars members.
1572 * plist.c (write_element): Delete superfluous ':'.
1574 2006-09-13 Kenichi Handa <handa@m17n.org>
1576 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1577 (minput_config_file): Extern it.
1579 * draw.c (Minherited): Declaration moved to input.c.
1580 (mdraw__init): Don't initialize Minherited here.
1582 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1584 2006-09-07 Kenichi Handa <handa@m17n.org>
1586 * textprop.c (mtext_serialize): Call mplist__serialize with the
1589 * plist.h (mplist__serialize): Prototype adjusted.
1590 (mplist__assq): Extern it.
1592 * plist.c: Include <ctype.h>
1593 (PUTC, PUTS): New macros.
1594 (write_symbol): New function.
1595 (write_element): New arg indent.
1596 (dump_string, dump_plist_element): Delete them.
1597 (mplist__from_string): New arg pretty.
1598 (mplist__assq): New function.
1599 (mdebug_dump_plist): Use write_element.
1601 * mtext.c (mtext_cat_char): Allocate more memory.
1602 (mdebug_dump_mtext): Don't escal a newline character.
1604 * m17n.h (minput_get_command, minput_get_variable)
1605 (minput_config_command, minput_config_variable)
1606 (minput_save_config): Extern them.
1608 * m17n-core.c: Include <string.h>.
1609 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1610 use the stream stdout instead of a file of that name.
1612 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1615 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1616 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1617 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1618 (MDEBUG_DUMP): Flush the stream.
1620 * input.h (struct _MInputMethodInfo): Delete member im. New
1621 members mdb, language, name, extra, cmds, configured_cmds,
1622 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1623 (MInputContextInfo): New member tick.
1625 * input.c: Big change to improve user-side input method
1626 customization. Here, list just public API changes.
1627 (minput_get_commands, minput_get_variables)
1628 (minput_assign_command_keys, minput_set_variable): Label them
1630 (minput_get_command, minput_get_variable)
1631 (minput_config_command, minput_config_variable)
1632 (minput_save_config): New functions.
1634 * database.h (PATH_MAX): Define it if not yet defined.
1635 (PATH_SEPARATOR): Likewise.
1636 (enum MDatabaseStatus): New enum.
1637 (struct MDatabaseInfo): Moved from database.c. New members status,
1638 time, lock_file, and uniq_file.
1639 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1640 (mdatabase__unlock): Extern them.
1642 * database.c: Include <time.h>.
1643 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1644 (GEN_PATH): Args changed. Callers changed.
1645 (struct MDatabaseInfo): Moved to database.h.
1646 (struct MDatabase, mdb_list): Deleted.
1647 (mdatabase__list): New var.
1648 (get_database_filename): Deleted. Callers changed to use
1650 (find_file, get_database_file): New files.
1651 (get_dir_info): Initialize new members of MDatabaseInfo.
1652 (find_database): Arg chagnded. Callers changed.
1653 (free_db_info, register_database, register_databases_in_files):
1655 (update_database_list): Deleted.
1656 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1657 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1658 (mdatabase__update): New function.
1659 (mdatabase__check): Return value changed.
1660 (mdatabase__file, mdatabase__lock, mdatabase__save)
1661 (mdatabase__unlock): New functions.
1663 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1665 * input.c (get_surrounding_text): Return -2 when surrounding text
1667 (get_following_char): Likewise.
1668 (get_preceding_char): Likewise.
1669 (minput__callback): Return 0 if there is a callback function,
1672 2006-08-17 Kenichi Handa <handa@m17n.org>
1674 * input.c (reset_ic): Use shift_state to setup the current state.
1676 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1678 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1679 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1680 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1682 2006-08-02 Kenichi Handa <handa@m17n.org>
1684 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1686 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1688 * font-ft.c (ft_encapsulate): Add code for debugging.
1689 (mfont__ft_drive_otf): Be sure to encode character before getting
1692 2006-07-21 Kenichi Handa <handa@m17n.org>
1694 * draw.c (mdraw_text_extents): Fix previous typo.
1696 2006-07-19 Kenichi Handa <handa@m17n.org>
1698 * draw.c (gstring_width): New arg lbearing.
1699 (render_glyph_string): Adjusted for the change of gstring_width.
1700 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1702 * m17n-core.h (Mlanguage): Extern it.
1704 * m17n.h (Mlanguage): Extern deleted.
1706 * mtext.c (mtext__init): Initialize Mlanguage.
1707 (Mlanguage): Declaration moved from locale.c
1709 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1710 (Mlanguage): Declaration moved to mtext.c.
1712 * language.c (mlang__init): Don't initialize Mlanguage here.
1714 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1716 2006-07-14 Kenichi Handa <handa@m17n.org>
1718 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1719 (MRealizedFontFT): New member face_encapsulated.
1720 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1721 (ft_gen_font): New function.
1722 (ft_add_font): Use ft_gen_font.
1723 (ft_list_script): Store lists in ft_script_list.
1724 (ft_check_otf): New arg ft_face. Caller changed.
1725 (ft_check_language): Likewise.
1726 (ft_check_script): Likewise.
1727 (ft_encapsulate, ft_close): New functions.
1728 (mfont__ft_driver): Initialize members encapsulate and close.
1729 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1731 * font.h (struct MRealizedFont): New member encapsulating.
1732 (struct MFontDriver): New members encapsulate and close.
1734 * font.c (mfont__match_p): If FONT is realized, check capability
1735 by font drivers's check_capability method.
1736 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1739 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1740 declarations of foundry and fam local vars.
1741 (xft_driver): Make it static.
1743 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1744 (mfont_close): Extern them.
1746 * m17n-gd.c (device_open): Don't specify foundry and family of the
1749 2006-07-11 Kenichi Handa <handa@m17n.org>
1751 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1753 2006-07-13 Kenichi Handa <handa@m17n.org>
1755 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1757 (ft_check_script): Delete unused var.
1758 (ft_list_capability): Likewise.
1760 * font.c (mfont__get_capability): Setup cap->otf.
1761 (Motf): Make it global.
1762 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1764 * font.h (MFontCapability): New member otf.
1766 * language.c (mlang__fini): Delete unused vars.
1768 * m17n-gui.h (Motf): Extern it.
1770 * database.c (update_database_list): Delete unused vars.
1772 2006-07-07 Kenichi Handa <handa@m17n.org>
1774 * font-ft.c (DEVICE_DELTA): Fix typo.
1776 2006-07-06 Kenichi Handa <handa@m17n.org>
1778 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1781 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1783 * database.c: Update comments.
1785 2006-07-05 Kenichi Handa <handa@m17n.org>
1787 * database.c (PATH_MAX): Define it if not yet defined.
1788 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1790 (get_database_filename): Use GEN_PATH.
1791 (get_dir_info): Don't include the last '/' in directory name.
1792 (register_database): New function.
1793 (update_database_list): Use register_database. Search all
1794 directories in mdatabase__dir_list for wildcard databases.
1795 (mdatabase__init): Check "~/.m17n.d".
1797 2006-07-03 Kenichi Handa <handa@m17n.org>
1799 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1800 push reverse property.
1802 * plist.c (dump_plist_element): Fix previous change.
1804 2006-06-28 Kenichi Handa <handa@m17n.org>
1806 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1809 * draw.c (MbidiNSM): New variable.
1810 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1811 attention to bidi type NSM.
1812 (mdraw__init): Initialize MbibiNSM.
1814 * language.c (mscript__char_list): Fix finding a char-list element.
1816 * plist.c (dump_string): Return number of printed characters.
1817 (dump_plist_element): Print elements more compactly.
1819 2006-06-23 Kenichi Handa <handa@m17n.org>
1821 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1822 (include_HEADERS): Likewise.
1824 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1826 * language.c: Update documentation.
1828 2006-06-23 Kenichi Handa <handa@m17n.org>
1830 * font-ft.c (struct MFontFT): Delete member lang.
1831 (free_ft_info): Don't unref member lang. Destroy members langset
1833 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1834 changed. Set members langset and charset.
1835 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1837 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1839 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1840 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1841 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1842 characters at first. If it fails, try listing by language names.
1843 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1844 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1845 change of MFontCapability.
1846 (ft_list_capability): Likewise. Try listing by languages, then by
1847 scripts. Check OTF at last.
1848 (ft_check_script): New function.
1849 (ft_select): Adjusted for the check of MFontCapability.
1850 (ft_list_family_names): New function.
1851 (ft_check_capability): If cap->script is not Mnil, call
1853 (mfont__ft_driver): Initialize with ft_list_family_names.
1855 * font.h (struct MFontDriver): New member list_fmaily_names.
1856 (struct): Change member "MSymbol *lang" to "MSymbol language".
1858 * font.c: Include "language.h".
1859 (Motf): New variable.
1860 (otf_script_list, load_otf_script_list): Delete it.
1861 (find_script_from_otf_tag): Delete it.
1862 (merge_capability): New function.
1863 (mfont__init): Init Motf.
1864 (mfont__fini): Don't unref otf_script_list.
1865 (free_font_capability): Check cap->script_tag to determine if
1866 OTF-related capability is set.
1867 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1868 the change of type MFontCapability.
1869 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1870 and Motf properties.
1871 (mfont_list): Call merge_capability for LANGUAGE arg.
1872 (mfont_list_family_names): New function.
1874 * input-gui.c: Typo in comments fixed.
1876 * input.c: Typo in comments fixed.
1878 * language.h (mlanguage__list): Delete it.
1879 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1882 * language.c: Include "mtext.h".
1883 (M_script_lang_list): Delete it.
1884 (language_list, script_list): New variables.
1885 (load_lang_script_list, init_language_list, init_script_list): New
1887 (mlang__init): Don't load language database here.
1888 (mlang__fini): Unref language_list and script_list if not NULL.
1889 (mlanguage__list): Delete it.
1890 (mlanguage__info, mscript__info, mscript__char_list)
1891 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1892 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1893 (mscript_list, mscript_language_list): New functions.
1895 * m17n-gui.h (mfont_list_family_names): Extern it.
1897 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1898 (mlanguage_text, mscript_list, mscript_language_list): Extern
1901 2006-06-21 Kenichi Handa <handa@m17n.org>
1903 * m17n-X.c (xfont_driver): Initialize with
1904 xfont_list_family_names.
1905 (xfont_list_family_names): New function.
1906 (xft_driver): Initialize with NULL for list_family_names member.
1907 (device_init): Set list_family_names member of xft_driver to that
1908 of mfont__ft_driver.
1910 2006-06-06 Kenichi Handa <handa@m17n.org>
1912 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1914 2006-03-24 Kenichi Handa <handa@m17n.org>
1916 * font-ft.c (ft_open): Improve debug message.
1918 * fontset.c (mfontset__get_font): Fix for the case that no font in
1919 per_script list is available.
1921 2006-02-06 Kenichi Handa <handa@m17n.org>
1923 * Version 1.3.3 released.
1925 2006-02-22 Kenichi Handa <handa@m17n.org>
1927 * textprop.c: Fix some typos in documentation.
1929 * plist.c: Fix some typos in documentation.
1931 * m17n-core.h: Fix some typos in documentation.
1932 (M17NLIB_PATCH_LEVEL): Updated to 3.
1933 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1935 * symbol.c: Fix some typos in documentation.
1937 * mtext.c: Fix some typos in documentation.
1939 * input.c: Fix several typos in documentation.
1941 2006-02-06 Kenichi Handa <handa@m17n.org>
1943 * Version 1.3.2 released.
1945 2006-02-03 Kenichi Handa <handa@m17n.org>
1947 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1948 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1950 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1952 * draw.c (layout_glyphs): Fix handling left_padding of
1955 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1957 2006-02-02 Kenichi Handa <handa@m17n.org>
1959 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1960 if WITH_GUI is true.
1962 2006-01-25 Kenichi Handa <handa@m17n.org>
1964 * input.c (resolve_expression): If the value of PLIST is a plist,
1965 but the first element is not symbol, return 0.
1967 2006-01-17 Kenichi Handa <handa@m17n.org>
1969 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1970 HAVE_GD is 2 or the greater.
1972 2006-01-16 Kenichi Handa <handa@m17n.org>
1974 * Version 1.3.1 released.
1976 2006-01-16 Kenichi Handa <handa@m17n.org>
1978 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1979 simulating anti-aliasing.
1981 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1982 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1984 2006-01-12 Kenichi Handa <handa@m17n.org>
1986 * input.c (get_surrounding_text): Always pop ic->plist.
1987 (reset_ic): Don't reset ic->plist.
1989 2006-01-10 Kenichi Handa <handa@m17n.org>
1991 * input.c (preedit_commit): For debugging, print only commiting
1992 charactes. Don't set ic->candidate_show to 0.
1993 (handle_key): Don't run branch-actions just by shifting to the
1995 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1996 Reset vars and plist.
1998 2006-01-07 Kenichi Handa <handa@m17n.org>
2000 * input.c (load_branch): Confirm that maps is not NULL.
2002 2006-01-05 Kenichi Handa <handa@m17n.org>
2004 * input-gui.c (win_filter): Try to convert arg to key only when
2007 * plist.c (read_integer_element): If '#' and '-' are followed by
2008 non-integer-constituent, read them as a part of a symbol.
2009 (read_symbol_element): New arg C.
2010 (read_element): Adjust args to read_symbol_element.
2012 * input.c (load_macros): On overwriting a macro, free the old
2014 (minput__init): Store Mmap in load_im_info_keys.
2015 (minput_get_title_icon): If the input method has no title, be sure
2017 (minput_get_description): If the input method has no description,
2018 be sure to return NULL.
2019 (minput_get_variables): Fix documentation.
2020 (handle_key): Pay attention to the case that key is Mnil.
2021 (filter): Likewise. Fix handling of such symbol as S-A.
2023 2005-12-22 Kenichi Handa <handa@m17n.org>
2025 * Version 1.3.0 released.
2027 2005-12-22 Kenichi Handa <handa@m17n.org>
2029 * font-ft.c (ft_list): If the specified font has no property,
2032 2005-12-20 Kenichi Handa <handa@m17n.org>
2034 * character.c (mchar_get_prop): Check char_prop_list.
2035 (mchar_put_prop, mchar_get_prop_table): Likewise.
2037 2005-12-18 Kenichi Handa <handa@m17n.org>
2039 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
2040 file name sans language.
2042 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
2044 * input.c: Fix typo in comments.
2046 2005-12-14 Kenichi Handa <handa@m17n.org>
2048 * input.c (minput_get_title_icon): Check the default icon for the
2051 2005-12-13 Kenichi Handa <handa@m17n.org>
2053 * input.c (Mless_equal, Mgreater_equal): New variables.
2054 (parse_expression, resolve_expression, parse_action_list)
2055 (take_action_list): Handle the aboves.
2056 (filter): Treat key S-X as X.
2057 (minput__init): Initialize Mless_equal and Mgreater_equal.
2058 (minput_get_title_icon): New function.
2060 * m17n.h (minput_get_title_icon): Extern it.
2062 * database.c (get_database_filename): Return a filename instead of
2064 (load_database): Adjusted for the above change.
2065 (mdatabase__load_for_keys): Likewise.
2066 (mdatabase__find_file): New function.
2068 * database.h (mdatabase__find_file): Extern it.
2070 * font.h (mfont__resize): Delete extern.
2072 * font.c (mfont__list): Check resize ratio.
2073 (mfont__resize): Delete it.
2074 (mfont_resize_ratio): Include the code of mfont__resize.
2076 * font-ft.c (ft_open): Check resize ratio.
2078 * m17n-X.c (xfont_open): Check resize ratio.
2079 (xft_open): Likewise.
2081 2005-12-07 Kenichi Handa <handa@m17n.org>
2083 * input.c (take_action_list): If take_action_list return -1,
2085 (handle_key): Likewise.
2087 * face.c (mface__for_chars): When font is specified and layouter
2088 is found for it, if the layouter doesn't support one of a
2089 character, use a face sans layouter for it.
2091 2005-12-06 Kenichi Handa <handa@m17n.org>
2093 * fontset.c (mfont__lookup_fontset): If only a fallback font is
2094 found, don't use it for more than one character.
2096 2005-12-05 Kenichi Handa <handa@m17n.org>
2098 * face.c (mface__realize): Set rfont->layouter to Mnil.
2099 (mface__for_chars): Fix handling of layouter.
2101 * character.h (mchar__define_prop): Extern it.
2103 * database.c (update_database_list): Call mchar__define_prop if
2106 * character.c (mchar__init): Don't call mchar_define_property.
2107 Instead just initialize property keys.
2108 (mchar__fini): Free char_prop_list only if it's not NULL.
2109 (mchar__define_prop): New function.
2110 (mchar_define_property): Call mchar__define_prop.
2112 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
2115 2005-12-02 Kenichi Handa <handa@m17n.org>
2117 * language.c (mlang__init): Handle extra chars.
2119 * m17n-gui.h (mfont_check): Adjust prototype.
2121 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
2122 (xfont_check_capability): New function.
2123 (xft_driver): Specify xft_check_capability.
2124 (xft_check_capability): New function.
2126 * font-ft.c (M0_3): Delete it.
2128 (ft_get_charmaps): Refer to M0.
2129 (fc_parse_pattern): Fix previous change.
2130 (ft_list_language): Check also extra chars.
2131 (ft_check_otf): Define it even if HAVE_OTF is undef.
2132 (ft_check_lang): Check the result of FcLangSetHasLang against
2133 FcLangDifferentLang. Check also extra chars.
2134 (ft_list_capability): Delete ifdef HAVE_OTF.
2135 (ft_select): Likewise.
2136 (ft_open): Improve debug information.
2137 (ft_check_capability): New function.
2138 (mfont__ft_driver): Specify ft_check_capability.
2139 (mfont__ft_init): Initialize M0.
2141 * fontset.c (get_font_from_group): New function.
2142 (mfontset__get_font): New function.
2144 * fontset.h (mfontset__get_font): Extern it.
2146 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
2147 (mfont__fini): Delete ifdef HAVE_OTF.
2148 (free_font_capability): Likewise.
2149 (mfont__get_capability): Likewise.
2150 (mfont__check_capability): New function.
2151 (mfont_check): Change the order of arguments. Use
2154 * font.h (struct MFontDriver): New member check_capability.
2155 (MFontCapability): Delete ifdef HAVE_OTF.
2156 (mfont__check_capability): Extern it.
2158 * face.c (mface__realize): Fix handling of FONT arg.
2159 (mface__for_chars): Fix handling of explicitly specified font.
2161 2005-11-25 Kenichi Handa <handa@m17n.org>
2163 * font-flt.c (run_command): Print debug info for
2166 * draw.c (layout_glyphs): Fix handling of left/right_padding.
2168 * face.c (mface__for_chars): Check rfont before accessing the
2171 2005-11-21 Kenichi Handa <handa@m17n.org>
2173 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
2176 * fontset.c (fontset_table): New variable.
2177 (free_fontset): Call M17N_OBJECT_UNREGISTER.
2178 (mfont__fontset_init): Add fontset_table as an object array.
2179 (mfont__realize_fontset): Ref FONTSET.
2180 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2181 (mfontset): Call M17N_OBJECT_REGISTER.
2182 (mfontset_copy): Likewise.
2184 * input.c (handle_key): For debugging, print information about
2186 (filter): Add an alias for Meta and Alt modifiers.
2187 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2189 (minput__init): Initialize them.
2190 (parse_expression): New function.
2191 (resolve_expression): New function.
2192 (parse_action_list): Handle expressions by parse_expression.
2193 (take_action_list): Handle expressions by resolve_expression.
2194 (parse_nested_list_value): Fix previous change.
2195 (resolve_command): Fix handling of the return value of
2198 2005-11-18 Kenichi Handa <handa@m17n.org>
2200 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2201 HAVE_OTF is defined.
2202 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2204 (ft_select): Likewise.
2206 * font.c (mfont_list): Fix for the case that FONT is NULL.
2207 (OTF_tag): Delete it.
2208 (load_otf_script_list): Define only when HAVE_OTF is defined.
2209 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2212 * draw.c (truncate_gstring): Be sure to truncate at
2213 glapheme-cluster boundary.
2215 2005-11-11 Kenichi Handa <handa@m17n.org>
2217 * input.c (delete_surrounding_text): Clear cache if necessary.
2219 2005-11-09 Kenichi Handa <handa@m17n.org>
2221 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2222 glyph prev is also supported by the current flt.
2224 2005-11-08 Kenichi Handa <handa@m17n.org>
2226 * m17n-X.c (xft_render): Cancel previous change.
2228 2005-11-07 Kenichi Handa <handa@m17n.org>
2230 * input.c: Include <stdlib.h>.
2231 (get_surrounding_text, delete_surrounding_text)
2232 (get_preceding_char, get_following_char): New functions.
2233 (integer_value): New arg surrounding. If it is nonzero, try to
2234 get a surrounding character. Callers changed.
2235 (take_action_list): Check `value' before setting an element.
2236 (destroy_ic): Unref ic_info->preceding_text and
2237 ic_info->following_text.
2238 (minput__init): Initialize Minput_get_surrounding_text and
2239 Minput_delete_surrounding_text.
2240 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2242 (filter): Unref ic_info->preceding_text and
2243 ic_info->following_text.
2245 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2248 * input.h (MInputContextInfo): New members preceding_text and
2251 2005-11-04 Kenichi Handa <handa@m17n.org>
2253 * input.c (parse_nested_list_value): Fix handling of the global
2255 (get_nested_list): Get global definitions by load_partial_im_info.
2256 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2257 MInputCandidatesChanged.
2258 (take_action_list): Likewise.
2259 (reset_ic): Likewise.
2260 (create_ic): Don't pay special attention to
2261 Mcandidates_group_size.
2262 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2263 (minput_set_variable): Get a definition of varible by
2264 mplist_find_by_value, not mplist_get.
2266 * m17n.h (enum MInputCandidatesChanged): New enum.
2268 2005-11-01 Kenichi Handa <handa@m17n.org>
2270 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2272 (mwin__destroy_window): If xft_draw's drawable is win, change it
2273 to device->drawable before destroying win.
2275 2005-10-31 Kenichi Handa <handa@m17n.org>
2277 * input.c (load_im_info): Fix adding of state.
2279 * m17n-core.c (m17n_fini_core): Fix reporting of module
2282 * m17n.c (m17n_fini): Fix reporting of module finalization.
2284 * m17n-gui.c (m17n_init_win): Fix reporting of module
2287 2005-10-29 Kenichi Handa <handa@m17n.org>
2289 * input.c (get_candidate_list): Fix the timing of referring plist.
2291 2005-10-28 Kenichi Handa <handa@m17n.org>
2293 * input.c (load_branch): Ignore an undefined map name.
2294 (load_im_info): Set im_info->title from `name' only if it's not
2296 (shift_state): Always update ic->status.
2297 (adjust_candidates): Renamed from adjust_candidate_command.
2298 Argument changed. Caller changed.
2299 (get_candidate_list, regularize_action): New functions.
2300 (take_action_list): Use them. On handling Munhandle, don't set
2302 (handle_key): If KEY is not handled by MAP, and MAP has
2303 branch_actions, perform them.
2305 * database.c (mdatabase__fini): Free dir_info->filename;
2307 2005-10-20 Kenichi Handa <handa@m17n.org>
2309 * input.c (marker_code): Accept '@@'.
2310 (integer_value): Handle '@@'.
2311 (parse_action_list): Accept a symbol argument.
2312 (take_action_list): Resolve the symbol argument. Handle the
2315 2005-10-18 Kenichi Handa <handa@m17n.org>
2317 * input.c: Include "charset.h".
2318 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2320 (MIMState): New member (M17NObject control).
2321 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2322 (get_nested_list, resolve_variable): New functions.
2323 (integer_value): New arg (MPlist **value). Set it to the plist
2324 element containing the value.
2325 (resolve_command): New function.
2326 (load_translation): New arg (MPlist *map_actions).
2327 (load_branch): New args language and name. If `keylist' is a
2328 symbol, resolved that as a command name.
2329 (free_map): New arg top. Free map->map_actions only if top is
2331 (free_state): New function.
2332 (load_state): New arg name.
2333 (im_info_list): New variable.
2334 (free_im_info, get_im_info_by_tags): New functions.
2335 (load_im_info): Arg key changed to plist. Handle `include'.
2336 Return (MInputMethodInfo *).
2337 (preedit_commit): Ref ic->candidate_list.
2338 (get_select_charset, adjust_candidate_command): New functions.
2339 (take_action_list): Handle `include'. Adjust candidate action
2340 properly. Handle control variables `candidates-charset' and
2341 `candidates-group-size'.
2342 (open_im): Use get_im_info.
2343 (create_ic): Get global variables.
2344 (load_partial_im_info): New function.
2345 (get_im_info): New function.
2346 (check_command_keyseq, check_command_list, check_variable_list):
2348 (minput__init): Don't handle M_database_hook and Mdetail_text.
2349 Initialize M_candidates, Mcandidates_group_size,
2350 Mcandidates_charset.
2351 (parse_variable_list, get_variable_list, parse_command_list)
2352 (get_command_list): Delete them.
2353 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2354 (minput__fini): Simply unref command_list and variable_list.
2355 (minput_get_description): Adjusted for the new form of description.
2356 (minput_get_commands): Use get_nested_list.
2357 (minput_assign_command_keys): Likewise.
2358 (minput_get_variables, minput_set_variable): Likewise.
2360 * input.h (MInputMethodInfo): New members im and maps.
2362 * database.h (M_database_hook): Delete extern.
2363 (MDatabaseHookFunc): Delete extern.
2364 (mdatabase__check): Extern it.
2366 * database.c: Include <glob.h>.
2367 (MAX_TIME): New macro.
2368 (Masterisk): New variable.
2369 (get_database_stream): Argument changed to (MDatabaseInfo *).
2371 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2372 (find_database): New function.
2373 (update_database_list): New function.
2374 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2375 calling update_database_list.
2376 (mdatabase__check): New function.
2377 (mdatabase_find): Use update_database and find_database. Don't
2378 handle MDatabaseHookFunc.
2379 (mdatabase_list): Call update_database at first.
2380 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2381 (MDatabaseList): New type.
2383 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2385 * m17n.h (Mdetail_text): Delete extern.
2387 * m17n-core.h (mplist_conc): Delete extern.
2389 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2391 (mplist_conc): Renamed to mplist__conc.
2392 (mplist__pop_unref): New function.
2394 2005-10-14 Kenichi Handa <handa@m17n.org>
2396 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2398 (read_element): If keys is an empty plist, return any element
2400 (dump_plist_element): Check if plist is nested.
2401 (mplist_conc): Always ref tail.
2402 (mplist_set): If key is a managing key, ref val in advance.
2404 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2405 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2406 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2409 * fontset.c (free_fontset): Unref fontset_list if necessary.
2410 (mfont__fontset_fini): Don't free fontset_list. Unref
2412 (mfont__realize_fontset): Initialize request.
2413 (mfontset): Ref default_fontset or fontset only if necessary.
2414 (mfontset_copy): Don't ref copy.
2416 * draw.c (render_glyphs): Check gend->type before checking
2419 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2420 unrefed plists to NULL.
2422 2005-10-04 Kenichi Handa <handa@m17n.org>
2424 * textprop.c (mtext_serialize): Be sure to make mt
2425 MTEXT_FORMAT_UTF_8 and NULL terminated.
2427 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2429 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2431 2005-10-03 Kenichi Handa <handa@m17n.org>
2433 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2434 is not at the beginning of line.
2436 2005-09-22 Kenichi Handa <handa@m17n.org>
2438 * input.c: Include <sys/stat.h> and <unistd.h>.
2439 (Minclude, Mcommit, Munhandle): New variables.
2440 (minput__init): Initialize them. Push only Mstate to
2441 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2442 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2444 (load_input_method): Handle "include" directive. If no states are
2446 (shift_state): If state_name is Mt, shift back to the previous
2447 state. Call preedit_commit to commit preedit text.
2448 (preedit_commit): New function.
2449 (take_action_list): Improve debug printing. Handle commit and
2451 (handle_key): Check the return value of take_action_list. Don't
2452 take branch_actions just after changing to the root map.
2453 (reset_ic): Reset all ic_info members.
2454 (filter): When a key is not handled, just move ic_info->keys
2455 instead fo calling reset_ic.
2456 (load_im_info): If key is not Mstate, push Mmap to
2458 (MDatabaseStatList): New type.
2459 (imdir_stat_list): New variable.
2460 (input_method_hook): Don't cancel the hook. Check the
2461 modification time of directories.
2462 (minput__fini): Free imdir_stat_list;
2464 * input.h (MInputContextInfo): New member prev_state.
2466 * m17n-core.h (mplist_conc): Extern it.
2468 * plist.c (mplist_conc): New function.
2470 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2472 * font.h (MRealizedFont): New member average_width.
2474 * font-ft.c (ft_open): Set rface->average_width.
2476 * font.c (xlfd_unparse_name): Print '*' before registry name.
2478 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2479 (xfont_open): Set rfont->average_width.
2480 (xft_open): Likewise.
2481 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2483 * internal-gui.h (struct MFrame): New member average_width.
2485 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2486 (mframe_get_prop): Return the average_width of a font.
2488 * face.c (mface__realize): Set rface->average_width.
2489 (mface__update_frame_face): Set frame->average_width.
2491 * face.h (MRealizedFace): New member average_width.
2493 2005-09-19 Kenichi Handa <handa@m17n.org>
2495 * font.c (xlfd_unparse_name): New arg full_xlfd.
2496 (mfont__encode_char): Use shortcut only for X core fonts.
2497 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2498 (mfont_put_prop): Handle `language' property.
2499 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2500 Print file can capability info too.
2502 * m17n-core.c (mdebug__output): New variable.
2503 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2504 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2505 (m17n_fini_core): Close mdebug__output if it's not stderr.
2507 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2508 (xfont_open): Handle baseline_offset.
2509 (xfont_find_metric): Likewise.
2510 (xfont_render): Likewise.
2511 (xft_open): Likewise.
2512 (xft_render): Likewise.
2514 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2515 (mdebug__output): Extern it.
2516 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2517 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2518 (MDEBUG_DUMP): New macro.
2519 (MDEBUG_PRINT_TIME): Print to medebug__output.
2521 * font.h (MRealizedFont): New member baseline_offset.
2523 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2525 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2526 (ft_list_family): Check alias.
2527 (ft_list_language): If language is "en", don't try to the second
2529 (ft_default_list): New variable.
2530 (ft_list_default): New function.
2531 (ft_select): If family is not specified, try only the default
2532 fonts. Treat the weights normal and medium same.
2533 (ft_open): Fix debug message. If registry is not specified, try
2534 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2535 (ft_find_metric): Likewise.
2536 (ft_render): Likewise.
2537 (ft_list): Fix debug message. Accept the registring iso8859-1.
2538 If family is not specified, try only the default fonts.
2540 * face.c (mface__realize): Fix logic of opening a font.
2542 2005-09-16 Kenichi Handa <handa@m17n.org>
2544 * face.c (mface__realize):
2546 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2549 * input.c (shift_state): Fix the condition of taking init actions.
2550 (take_action_list): Fix handling of pushback action.
2551 (handle_key): Don't change key while checking its alias.
2552 (minput__init): Initialize new variables.
2553 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2556 2005-09-12 Kenichi Handa <handa@m17n.org>
2558 * mtext.c (mtext__uppercase): Add proper open/close parens.
2559 (mtext_titlecase): Add proper casting.
2561 * input.c (parse_action_list): Handle the case that the arg is a
2562 key sequence (MText or MPlist).
2563 (take_action_list): Likewise.
2564 (shift_state): Shorter debug message.
2565 (handle_key): Terminate a debug message by "\n".
2566 (reset_ic): Don't take initial actions here.
2567 (minput_open_im): Print a debug message.
2568 (minput_close_im): Likewise.
2569 (minput_create_ic): Likewise.
2570 (minput_destroy_ic): Likewise.
2572 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2574 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2577 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2578 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2581 * character.c: Add Japanese documentation for
2582 mchar_get_prop_table ().
2584 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2586 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2587 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2588 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2590 (init_case_conversion): New function.
2591 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2592 (uppercase_precheck, lowercase_precheck, final_sigma)
2593 (after_soft_dotted, more_above, before_dot, after_i)
2594 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2596 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2598 * plist.c (read_mtext_element): Fix previous change.
2600 2005-09-05 Kenichi Handa <handa@m17n.org>
2602 * plist.c (read_mtext_element): Handle \uXXXX notation.
2604 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2605 (MTABLE_ALLOCA): Change the name of local variable.
2607 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2608 HAVE_FREETYPE are defined.
2610 * m17n-X.c: Check HAVE_X11.
2612 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2613 directory listing libraries.
2614 (noinst_PROGRAMS): Define it only in maintainer mode.
2616 2005-09-02 Kenichi Handa <handa@m17n.org>
2618 * m17n-gui.h (mdraw_line_break_option): Extern it.
2620 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2621 end of the first glyph.
2622 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2624 (mdraw_line_break_option): New variable.
2625 (mdraw_default_line_break): Use mtext_line_break.
2627 * mtext.h (wordseg_func_table): Don't extern it.
2628 (mtext__wseg_fini): Extern it.
2630 * mtext.c: Don't include word-thai.h.
2631 (wordseg_func_table): Delete this variable.
2632 (mtext__init): Don't initialize above. Don't call
2633 mtext__word_thai_init.
2634 (mtext__fini): Don't free wordseg_func_table. Call
2635 mtext__wseg_fini instead fo mtext__word_thai_fini.
2636 (MTextWordsegFunc): Don't typedef it.
2637 (mtext__word_segment): Moved to mtext-wseg.c.
2639 * m17n-core.h (enum MTextLineBreakOption): New enum.
2640 (mtext_line_break): Extern it.
2642 * mtext-wseg.c: New file.
2644 * mtext-lbrk.c: New file.
2646 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2647 add mtext-lbrk.c and mtext-wseg.c.
2649 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2650 the case that head is NULL.
2652 2005-09-01 Kenichi Handa <handa@m17n.org>
2654 * word-thai.c (wordseg_propertize): If the property value is nil,
2655 don't make the property no-merge.
2656 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2657 attention to the case that they are NULL.
2658 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2661 * character.c (mchar_get_prop_table): New function.
2663 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2665 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2666 (mchar_get_prop_table): Extern it.
2668 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2669 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2671 * internal.h (enum MTextCoverage): New enum.
2672 (MText): New member coverage.
2674 * mtext.c (FORMAT_COVERAGE): New macro.
2675 (insert): Copy mt2->coverage.
2676 (mtext__from_data): Initialize mt->coverage.
2677 (mtext__adjust_format): Update mt->coverage.
2678 (mtext): Initialize mt->coverage.
2679 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2680 Update mt->coverage if necessary.
2681 (mtext_duplicate): Copy mt->coverage.
2682 (mtext_insert, mtext_replace): New functions.
2683 (mtext_dup): Use mtext_duplicate.
2684 (mtext__word_segment): Don't set *from and *to if a word
2685 segmentation funcion is not found.
2686 (mtext_ins_char): Fix typo.
2688 2005-08-25 Kenichi Handa <handa@m17n.org>
2690 * font.h (MFont): New member for_full_width.
2692 * font.c (compare_font_score): Prefer a font of not
2695 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2696 registry charset of a font is one of CJK charsets.
2698 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2699 supports some of CJK.
2701 2005-08-24 Kenichi Handa <handa@m17n.org>
2703 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2705 * m17n-gui.c (null_device_open): Check Mresolution param and set
2708 * m17n-gd.c (device_open): Check Mresolution param and set
2711 * m17n-X.c (MWDevice): New member resy.
2712 (xfont_open): Set ascent, descent, and max_advance members of
2714 (xft_open): Likewise.
2715 (device_open): Compare also screen_num to find a device. Set
2716 device->resy and frame->dpi.
2718 * internal-gui.h (MFrame): New member dpi.
2720 * font.h (MRealizedFont): New member max_advance.
2722 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2723 (mfont__init): Don't initialize Mascent, Mdescent.
2724 (Mascent, Mdescent): Delete these variables.
2725 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2726 Mfont_descent instead of Mascent and Mdescent.
2727 (mfont_put_prop): Allow negative size.
2728 (mfont_find): Handle the case of spec->size < 0. Fix previous
2730 (mfont_list): Handle the case of spec->size < 0.
2731 (mfont_check): Likewise.
2733 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2734 (fc_get_pattern): Handle the case of font->size < 0.
2735 (ft_open): Set ascent, descent, and max_advance members of rfont.
2736 (ft_find_metric): Improve rounding.
2737 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2740 * face.c (mface__realize): Handle the case of font->size < 0.
2742 2005-08-22 Kenichi Handa <handa@m17n.org>
2744 * coding.c (MConverterStatus): Change the member buf to union.
2745 (mconv_buffer_converter): Add const to the arg buf.
2746 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2747 (mconv_decode): Adjusted for the change of MConverterStatus.
2748 (mconv_encode_range): Likewise.
2750 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2751 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2753 2005-08-20 Kenichi Handa <handa@m17n.org>
2755 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2756 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2758 * m17n-X.c (xfont_open): Set members ascent, descent, and
2759 max_advance of rfont.
2760 (xft_open): Likewise.
2762 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2764 (mfont__ft_parse_name): Add const to the arg name.
2766 * font.c (xlfd_parse_name): Add const to the arg name. Call
2767 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2768 (xlfd_unparse_name): Handle spacing.
2769 (mfont__init): Initialize new variables.
2770 (mfont__id): Handle spacing.
2771 (mfont__merge): Likewise.
2772 (mfont__set_spec): This function deleted.
2773 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2774 condition of calling mfont__ft_parse_name.
2775 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2776 (mfont_get_prop): Handle properties spacing, ascent, descent,
2778 (mfont_find): Return a realized font.
2779 (mfont_from_name): Add const to the arg name.
2781 * font.h (enum MFontProperty): New member MFONT_SPACING.
2782 (enum MFontSpacing): New enum.
2783 (MFont): New members spacing and max_advance.
2784 (mfont__ft_parse_name): Prototype adjusted.
2785 (mfont__set_spec): Extern deleted.
2786 (mfont__parse_name_into_font): Prototype adjusted.
2788 2005-08-19 Kenichi Handa <handa@m17n.org>
2790 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2792 * font.c (mfont_list): If FONT is null, use a temporary font.
2793 (mfont_parse_name): Add const to the arg name.
2795 2005-08-18 Kenichi Handa <handa@m17n.org>
2797 * word-thai.c: Surround code by #ifdef and #endif to escape from
2800 * font-ft.c: Mostly re-written.
2802 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2803 (FontLayoutCmd): Type of the member otf changed..
2804 (load_otf_command): Adjusted for the format change of otf command.
2805 (load_command): Likewise.
2806 (free_flt_command): Unref cmd->body.otf.
2807 (run_otf): Ajusted for the type change of otf_cmd.
2808 (run_command): Ajusted for the type change of otf_cmd. On
2809 debugging, print ctx->combining_code.
2810 (mfont__flt_run): Initialize ctx's members code_offset,
2811 combining_code, and left_padding to 0.
2813 * face.h (struct MRealizedFace): New member font.
2814 (mface__realize): Prototype adjusted.
2816 * face.c (find_realized_face): New arg font.
2817 (find_realized_face): Adjusted for the change of MFont.
2818 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2819 (mface__fini): Don't call mdebug__report_object.
2820 (mface__realize): New arg font.
2821 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2822 Optimize the latin case.
2823 (mface__free_realized): Free rface->font.
2824 (mface__update_frame_face): Adjusted for the change of mface__realize.
2825 (mface_equal): New function.
2827 * draw.c (Mcommon): New variable.
2828 (visual_order): Args to mfont__encode_char changed.
2829 (compose_glyph_string): Handle Mfont text property.
2830 (layout_glyphs): Adjusted for the change of MFont.
2831 (mdraw__init): Initialize Mcommon.
2832 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2834 * font.h (enum MFontType): Members completely changed.
2835 (enum MFontProperty): Move MFONT_SIZE to the tail.
2836 (enum MFontSource): New enum.
2837 (struct MFont): New members type, source, sizes, file, capability,
2839 (struct MRealizedFont): Type of member font changed. Members
2840 score, status, and encoding deleted.
2841 (MFontScore): New type.
2842 (MFontList): Member changed.
2843 (struct MFontDriver): New member has_char. Types of members
2845 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2846 (Mapple_roman): Extern them.
2847 (OTF_Tag): Typedefed if not HAVE_OTF.
2848 (enum MFontOpenTypeTable): New enum.
2849 (MFontCapability): New type.
2850 (mfont__ft_drive_otf): Prototype adjusted.
2851 (mfont__score): Extern deleted.
2852 (mfont__merge): Extern it.
2853 (mfont__has_char): Extern it.
2854 (mfont__encode_char): Prototype adjusted.
2855 (mfont__open): Extern it.
2856 (mfont__set_spec): Prototype adjusted.
2857 (mfont__get_capability): Extern it.
2859 * font.c: Include "fontset.h".
2860 (M_font_capability, M_font_list, M_font_list_len): New variables.
2861 (font_score_priority): Change order of initial elements.
2862 (font_score_shift_bits): Fix array size.
2863 (common_weight): Add "thin", "semibold", and "heavy".
2864 (common_stretch): Add "ultracondensed", "extracondensed",
2865 "extraexpanded", and "utltraexpand".
2866 (font_weight_regular, font_weight_normal, font_weight_medium): New
2868 (gen_font_name): This function deleted.
2869 (find_encoding): Set font->encoding.
2870 (OTF_tag): New function.
2871 (otf_script_list): New variable.
2872 (load_otf_script_list): New function.
2873 (find_script_from_otf_tag): New function.
2874 (xlfd_parse_name): Set font->type and font->source.
2875 (mfont__free_realized): Free chains rfonts.
2876 (font_score): Renamed from mfont__score.
2877 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2878 (Mapple_roman): New variables.
2879 (mfont__init): Initilize new variables. Initalize
2880 default_encoding.encoding_name and
2881 default_encoding.encoding_charset to Municode_full and
2882 mcharset__unicode. Use SAFE* macros for allocating filepath
2884 (mfont__fini): Free otf_script_list.
2885 (mfont__id): New function.
2886 (mfont__match_p): Check also capability member of MFont.
2887 (mfont__merge): New funciton.
2888 (mfont__set_spec_from_face): Set type and source members.
2889 (mfont__set_spec_from_plist): Set capability and type members.
2890 (mfont__select): Argument changed.
2891 (mfont__available): New function.
2892 (compare_font_score): New function.
2893 (mfont__list): New function.
2894 (mfont__open): Return a realized font.
2895 (mfont__resize): Adjusted for the change of MFont.
2896 (mfont__has_char): New function.
2897 (mfont__encode_char): Argument changed.
2898 (mfont__set_spec): Argument changed.
2899 (free_font_capability): New function.
2900 (mfont__get_capability): New function.
2901 (MFontfile): New variable.
2902 (mfont_get_prop): Adjusted for the change of MFont.
2903 (mfont_put_prop): Likewise.
2904 (mfont_set_selection_priority): Fix the way of setting
2905 font_score_priority[].
2906 (mfont_find): Use mfont__list instead of mfont__select.
2907 (mfont_resize_ratio): Adjusted for the change of MFont.
2908 (mfont_list): Use mfont__list.
2909 (mfont_check): New function.
2910 (font_score): Make it static.
2912 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2913 (mfont__lookup_fontset): Likewise.
2915 * fontset.c (struct MFontset): Delete member font_spec_list.
2916 (struct MRealizedFontset): Type of member spec changed. New
2918 (load_font_group): Arg spec_list deleted.
2919 (load_fontset_contents): Adjusted for the change of fontset_def.
2920 (free_fontset): Fix the way of freeing fontset elements.
2921 (realize_fontset_elements): Argument changed.
2922 (get_per_script): New function.
2923 (free_realized_fontset_elements): Fix the way of feeing rfontset
2925 (update_fontset_elements): Fix args to realize_fontset_elements.
2926 (mfont__realize_fontset): New arg spec.
2927 (try_font_list): New function.
2928 (try_font_group): New arg request. Use try_font_list.
2929 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2931 (mfontset): Adjusted for the change of MFontset.
2932 (mfontset_copy): Likewise. Don't share plists.
2933 (mfontset_modify_entry): Adjusted for the change of MFontset.
2934 (mfontset_lookup): Call get_per_script.
2935 (mdebug_dump_fontset): Print also the address of fonts.
2937 * input.c (shift_state): Don't reset ic_info->vars.
2938 (take_action_list): Call MDEBUG_PRINT fore calling
2941 * internal-gui.h (MFontDriver): Don't typedef it here.
2943 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2944 (MXFont): This type deleted.
2946 (struct _MFontX): New struct.
2947 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2948 (MDisplayInfo): Member base_font_list deleted.
2949 (DEFAULT_FONT): Definition changed.
2950 (FALLBACK_FONT): This maclr deleted.
2951 (free_display_info): Adjusted for the change of MDisplayInfo.
2952 (free_device): Argument to mfont__free_realized changed.
2953 (xfont_driver): Adjusted for the change of MFontDriver.
2954 (xfont_registry_list): Use MFontX instead of MXFont.
2955 (MRealizedFontX): Renamed from MXFontInfo.
2956 (xfont_select): Return the font found first.
2957 (close_xfont): Change MXFontInfo to MRealizedFontX.
2958 (xfont_open): Return the realized font.
2959 (xfont_find_metric): Get xfont from rfont->fontp.
2960 (xfont_has_char): New function.
2961 (xfont_encode_char): Adjusted for the argument change.
2962 (xfont_render): Get xfont from rfont->fontp.
2963 (xfont_list): Adjusted for the argument change.
2964 (MRealizedFontXft): Renamed from MXftFontInfo.
2965 (xft_driver): Ajusted for the change of MFontDriver.
2966 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2967 (xft_open_font): Argument changed.
2968 (xft_open): Argument changed. Return the realized font.
2969 (xft_find_metric): Get xft_font from rfont->fontp.
2970 (xft_has_char, xft_encode_char): New functions.
2971 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2972 font if not yet opened.
2973 (device_open): Don't set frame->font.
2975 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2977 (gd_font_open): New function.
2978 (gd_render): Don't use the local variable ft_info.
2979 (device_init): Adjusted for the change of gd_font_driver.
2981 * textprop.c (mtext__prop_init): Initialize text_property_table.
2982 Call M17N_OBJECT_ADD_ARRAY.
2983 (mtext__prop_fini): Don't call mdebug__report_object.
2985 * plist.c (mplist__init): Initialize plist_table.
2986 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2987 (mplist__fini): Don't call mdebug__report_object.
2989 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2990 (mtext__fini): Don't call mdebug__report_object.
2991 (MTEXT_FORMAT_UTF_16): Correct type.
2992 (mtext_data): New function.
2993 (mtext_text): Fix calculation of limit and args to
2996 * language.c: Include "plist.h".
2997 (M_script_lang_list): New variable.
2998 (mlang__init): Read languages and their information from m17n
3000 (mlanguage__list): New function.
3001 (Miso639_1, Miso639_2): New variables.
3003 * language.h (mlanguage__list): Extern it.
3005 * database.c (get_database_stream): Use SAFE_* macros for
3006 allocating and freeing path.
3007 (mdatabase__init): Likewise.
3009 * symbol.c (msymbol__fini): Don't free symbols here.
3010 (msymbol__free_table): New function.
3011 (msymbol_is_managing_key): New function.
3013 * symbol.h (msymbol__free_table): Extern it.
3014 (msymbol__list): Extern it.
3016 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
3018 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
3019 (struct _M17NObjectArray): New member name and next.
3020 (mdebug__add_object_array): Extern it.
3021 (M17N_OBJECT_ADD_ARRAY): New macro.
3022 (mdebug__report_object): Don't extern it.
3024 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
3026 * m17n-gui.c (free_frame): Don't free frame->font.
3027 (null_device_fini): Fix code for freeing
3028 null_device.realized_font_list.
3029 (m17n_fini_win): Free interface.
3030 (mframe): Cast the return value of dlsym. Set frame->font here.
3031 (mframe_get_prop): Check frame->rface->rfont before accessing the
3034 * m17n-gui.h (Mfontfile): Extern it.
3035 (mfont_check): Extern it.
3036 (mface_equal): Extern it.
3038 * m17n-core.c: Include "symbol.h".
3039 (report_header_printed): This variable deleted.
3040 (object_array_root): New variable.
3041 (report_object_array): New function.
3042 (mdebug__report_object): This function deleted.
3043 (mdebug__add_object_array): New function.
3044 (m17n_init_core): Call mchartable_init () before mtext_init ().
3045 (m17n_fini_core): Call report_object_array (if necessary) and
3046 msymbol__free_atable at the end.
3048 * m17n-core.h (msymbol_is_managing_key): Extern it.
3049 (mtext_data): Extern it.
3050 (MTEXT_FORMAT_UTF_16): Correct type.
3051 (M17NLIB_MINOR_VERSION): Changed to 3.
3052 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
3054 * chartab.c (mchartable__init): Initalize chartable_table.count.
3055 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
3056 mdebug__report_object.
3058 2005-05-26 Kenichi Handa <handa@m17n.org>
3060 * m17n.h (Miso639_1, Miso639_2): Extern them.
3062 * symbol.h (msymbol__list): Extern it.
3064 * symbol.c (msymbol__list): New function.
3066 2005-05-19 Kenichi Handa <handa@m17n.org>
3068 * input-gui.c (minput__win_init): Don't change the value of
3071 2005-05-16 Kenichi Handa <handa@m17n.org>
3073 * m17n-core.c (m17n_object): Be sure to initialize all members.
3075 * font-ft.c (fc_decode_prop): Fix args to msymbol.
3077 2005-05-09 Kenichi Handa <handa@m17n.org>
3079 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
3081 2005-04-27 Kenichi Handa <handa@m17n.org>
3083 * language.c (mlang__init): Add "an" (Aragonese).
3085 * word-thai.c: Add support for libthai.
3086 (mtext__word_thai_init): Initialize wordseg library conditionaly.
3087 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
3089 * mtext.c: Include "word-thai.h" conditionaly.
3090 (mtext__init): Call mtext__word_thai_init conditionaly.
3091 (mtext__fini): Call mtext__word_thai_fini conditionaly.
3093 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
3094 not WORDCUT_LD_FLAGS.
3096 2005-04-19 Kenichi Handa <handa@m17n.org>
3098 * word-thai.c (wordseg_propertize): Always unref the attached
3100 (thai_wordseg): Don't unref the property.
3102 2005-04-18 Kenichi Handa <handa@m17n.org>
3104 * word-thai.c: Include stdlib.h.
3105 (wordseg_propertize): Add dummy function for the case that wordcut
3106 library doesn't exist.
3107 (wordseg_propertize): Fix for old wordcut library.
3109 2005-04-16 Kenichi Handa <handa@m17n.org>
3111 * word-thai.c: Include <stdio.h>.
3113 2005-04-15 Kenichi Handa <handa@m17n.org>
3115 * draw.c: Include mtext.h.
3116 (linebreak_table, M_break_at_space, M_break_at_word)
3117 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
3118 (compose_glyph_string): Check POS before getting Mface text
3120 (truncate_gstring): Give correct TO arg to line_break function.
3121 (GET_LB_TYPE): New macro.
3122 (find_break_backward, find_break_forward): New functions.
3123 (mdraw__init): Initialize the above new variables.
3124 (mdraw__fini): Free linebreak_table.
3125 (mdraw_default_line_break): Use find_break_backward and
3128 * word-thai.c: New file.
3130 * word-thai.h: New file.
3132 * mtext.c: Include word-thai.h.
3133 (wordseg_func_table): New variable.
3134 (mtext__init): Initialize wordseg_func_table and call
3135 mtext__word_thai_init.
3136 (mtext__fini): Call mtext__word_thai_fini, free
3138 (MTextWordsegFunc): New type.
3139 (mtext__word_segment): New function.
3141 * mtext.h (wordseg_func_table): Extern it.
3142 (mtext__word_segment): Extern it.
3144 * m17n.c (m17n_init): Fix typo (== -> =).
3146 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
3147 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
3149 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
3150 (MTEXTPROP_VAL): New macros.
3152 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
3154 2005-04-07 Kenichi Handa <handa@m17n.org>
3156 * database.c (load_chartable): Fix pursing of symbol name.
3158 2005-03-24 Kenichi Handa <handa@m17n.org>
3160 * m17n.c (m17n_init): Fix typo (== -> =).
3162 2005-03-11 Kenichi Handa <handa@m17n.org>
3164 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
3166 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
3168 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
3171 2005-03-09 handa <handa@m17n.org>
3173 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
3174 calling m17n_init ().
3176 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
3177 calling m17n_init_core ().
3179 2005-02-28 Kenichi Handa <handa@m17n.org>
3181 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3184 2005-02-17 Kenichi Handa <handa@m17n.org>
3186 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3187 (M_description, M_command, M_variable): New variables.
3188 (load_im_info_keys): New variables.
3189 (load_im_info, check_command_keyseq, get_description_advance)
3190 (parse_command_list, get_command_list, parse_variable_list)
3191 (get_variable_list, input_method_hook): New functions.
3192 (command_list, variable_list): New variables.
3193 (minput__init): Put input_method_hook to Minput_method.
3194 Initialize M_description, M_command, M_variable, Mdetail_text,
3195 load_im_info_keys, command_list, variable_list.
3196 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3197 (Mdetail_text): New variable.
3198 (minput_get_description, minput_get_commands)
3199 (minput_assign_command_keys, minput_get_variables)
3200 (minput_set_variable): New functions.
3202 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3203 (minput_assign_command_keys, minput_get_variables)
3204 (minput_set_variable): Extern them.
3206 * plist.c (UNGETC): Just decrement st->p.
3207 (read_mtext_element): New arg skip.
3208 (read_integer_element): Likewise.
3209 (read_symbol_element): Likewise.
3210 (read_element): New arg KEYS.
3211 (mplist__from_plist): Don't increment ref-count of NULL object.
3212 (mplist__from_file): New arg KEYS.
3213 (mplist_put): Don't increment ref-count of NULL object.
3214 (mplist_add): Likewise.
3215 (mplist_push): Likewise.
3216 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3218 * plist.h (mplist__from_file): Prototype adjusted.
3220 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3221 (get_database_stream): New function.
3222 (load_database): Use get_database_stream.
3223 (M_database_hook): New variable
3224 (mdatabase__init): Initialize M_database_hook.
3225 (mdatabase__load_for_keys): New function.
3226 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3228 (mdatabase_define): Free mdb->extra_info if necessary.
3230 * database.h (mdatabase__dir_list, M_database_hook)
3231 (mdatabase__load_for_keys): Extern them.
3232 (MDatabaseHookFunc): New type.
3234 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3236 2004-12-27 Kenichi Handa <handa@m17n.org>
3238 * Version 1.2.0 released.
3240 2004-12-27 Kenichi Handa <handa@m17n.org>
3242 * input.c (minput_filter): Don't reset ic->xxx_changed.
3244 * mtext.c (mtext_from_data): Fix documentation.
3246 2004-12-25 Kenichi Handa <handa@m17n.org>
3248 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3249 (M17NLIB_VERSION_NAME): Update to "1.2.".
3251 2004-12-24 Kenichi Handa <handa@m17n.org>
3253 * input.c (reset_ic): Set key_unhandled to 0.
3255 2004-12-21 Kenichi Handa <handa@m17n.org>
3257 * m17n-gui.h (mfont_from_spec): Delete extern.
3259 * input-gui.c (win_callback): Handle Minput_reset.
3260 (minput__win_init): Register reset_ic as a callback for
3263 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3264 changed. At first, shift to the initial state.
3265 (minput__init): Initialize Minput_reset. Register reset_ic as a
3266 callback for Minput_reset.
3267 (Minput_reset): New variable.
3268 (minput_filter): Always set ic->xxx_changed to 0.
3269 (minput_reset_ic): New function.
3270 (integer_value): Fix typo ('>' -> '<') and calculation of length
3273 * m17n-core.c (merror_code): Change type to `int'.
3275 * m17n-misc.h (merror_code): Adjust type.
3277 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3279 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3280 (mtext_change_prop): Delete extern.
3282 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3283 to `int'. Move the documents to m17n-core.h.
3285 2004-12-13 Kenichi Handa <handa@m17n.org>
3287 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3288 (MTextProperty): Document it.
3290 2004-12-09 Kenichi Handa <handa@m17n.org>
3292 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3294 2004-12-03 Kenichi Handa <handa@m17n.org>
3296 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3297 m17n__gui_initialized): New externs.
3299 * m17n-core.h (enum M17NStatus): New enum.
3300 (m17n_status): Extern it.
3302 * m17n-core.c (core_initialized): Delete this variable.
3303 (m17n__core_initialized, m17n__shell_initialized,
3304 m17n__gui_initialized): New variables.
3305 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3306 instead of core_initialized.
3307 (m17n_status): New function.
3309 * m17n.c (shell_initialized): Delete this variable.
3310 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3313 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3315 * m17n-gui.c (win_initialized): Delete this variable.
3316 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3317 instead of gui_initialized.
3319 2004-11-19 Kenichi Handa <handa@m17n.org>
3321 * input.c (reset_ic): Check if ic_info->state is NULL.
3322 (filter): If ic_info->state is NULL, return 0.
3323 (load_input_method): Don't unref `maps' it it's not created.
3325 2004-11-15 Kenichi Handa <handa@m17n.org>
3327 * input.c (find_candidates_group): If INDEX is -1, find the last
3329 (take_action_list): If the previous of the first candidate is
3330 requested, select the last candidate.
3332 2004-11-08 Kenichi Handa <handa@m17n.org>
3334 * m17n-X.c (device_open): Try at most 32 fonts to find a
3335 non-autoscaled font.
3337 * font.c (xlfd_parse_name): Fix previous change.
3339 2004-11-05 Kenichi Handa <handa@m17n.org>
3341 * font.c: (commont_style): Include dummy elements "slanted" and
3342 "rslanted" to prefer "o" to "r" if "i" is requested.
3344 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3346 2004-10-29 Kenichi Handa <handa@m17n.org>
3348 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3350 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3351 New members smallest and larger.
3352 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3353 (xfont_registry_list): Likewise.
3354 (xfont_select): Likewise.
3357 2004-10-28 Kenichi Handa <handa@m17n.org>
3359 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3360 font name comparison.
3361 (xfont_select): Fix logic for selecting a larger size font.
3363 2004-10-25 Kenichi Handa <handa@m17n.org>
3365 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3368 2004-10-22 Kenichi Handa <handa@m17n.org>
3370 * input.c (update_candidate): Renamed from udpate_candidate.
3371 (take_action_list): Show more debugging info on arithmetic commands.
3373 * m17n-X.c (device_open): Fix previous change.
3375 * draw.c (compose_glyph_string): Don't get face property at the
3378 2004-10-21 Kenichi Handa <handa@m17n.org>
3380 * draw.c (compose_glyph_string): Fix for the case of category
3383 2004-10-19 Kenichi Handa <handa@m17n.org>
3385 * input.c (mdebug_mask): New variable.
3386 (shift_state): Print debug information.
3387 (take_action_list): Likewise.
3388 (handle_key): Likewise.
3390 2004-10-14 Kenichi Handa <handa@m17n.org>
3392 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3394 2004-10-13 Kenichi Handa <handa@m17n.org>
3396 * m17n-X.c (device_open): Be sure to register at least one font
3399 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3400 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3402 2004-10-12 Kenichi Handa <handa@m17n.org>
3404 * draw.c (alloc_gstring): Fix previous change.
3406 * font-ft.c (ft_list_generic): Fix for the case of not
3409 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3411 * font.c (mfont_list): If no font is found, return NULL.
3412 (load_font_encoding_table): Put entries of nil registry first.
3413 (find_encoding): Adjust for the above change.
3415 2004-10-11 Kenichi Handa <handa@m17n.org>
3417 * m17n-gui.h (mfont_list): Adjust prototype.
3419 * m17n-X.c (xfont_list): New arg maxnum.
3421 * font.h (struct MFontDriver): Change prototype of <list>.
3423 * font-ft.c (fc_generic_family_list): Delete it.
3424 (Mserif, Msans_serif, Mmonospace): Delete them.
3425 (M_generic_family_info): New variable.
3426 (enum GenericFamilyType): New enum.
3427 (struct GenericFamilyInfo): New struct.
3428 (generic_family_table): New variable.
3429 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3431 (add_font_info): Get style here.
3432 (ft_list_family): Don't initialize fc_config here. Don't list
3434 (ft_list_generic): New function.
3435 (ft_select): Pay attention to generic familes here.
3436 (ft_open): Fix calculation of ascent and descent.
3437 (ft_list): Pay attention to generic families.
3438 (mfont__ft_init): Initialize M_generic_family_info,
3439 generic_family_table, and fc_config..
3440 (mfont__ft_fini): Finalize generic_family_table.
3442 * draw.c (compose_glyph_string): Use more constant font for
3443 glyphs. Adjust for the member change in MGlyph.
3444 (layout_glyph_string): Adjust for the member change in MGlyph.
3445 (alloc_gstring): Intilize scracth_glyph to avoid
3446 compose_glyph_string on it.
3447 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3448 (mdraw_coordinates_position): Fix previous change.
3450 * internal-gui.h (glyph_category): New enum.
3451 (MGlyph): Change type of <category> to enum glyph_category.
3453 * face.c (mface__realize): Delete args langauge and charset.
3454 (mface__for_chars): Fix for the case that glyphs have different
3456 (mface__update_frame_face): Adjust for mface__realize change.
3458 * face.h (mface__realize): Adjust prototype.
3460 2004-10-05 Kenichi Handa <handa@m17n.org>
3462 * language.c (mlang__init): Add Akan.
3464 2004-10-04 Kenichi Handa <handa@m17n.org>
3466 * font-ft.c (add_font_info): Add instead of push the element.
3467 (ft_list_family): For generic fonts, try all
3468 substituted. families.
3470 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3471 (run_rule): Don't update cluster range here.
3472 (run_command): Update cluster range on appending a glyph.
3473 (run_otf): Update cluster range for glyphs generated by OTF.
3475 2004-10-02 Kenichi Handa <handa@m17n.org>
3477 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3479 2004-09-30 Kenichi Handa <handa@m17n.org>
3481 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3483 2004-09-30 Kenichi Handa <handa@m17n.org>
3485 * font.h: Include <fontconfig/fontconfig.h>.
3486 (MFTInfo): New member langset.
3487 (mfont__encoding_list): Extern it.
3489 * font.c (mfont__encoding_list): New function.
3490 (mdebug_dump_font_list): New function.
3492 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3493 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3495 (ft_family_list): New variable.
3496 (set_font_info): New arg basep. Callers changed.
3497 (fc_list): Check the return value of FcPatternGetString.
3498 (add_font_info): New arg plist. Callers changed. Update
3500 (ft_list_family): New function (merged fc_list and ft_list_all).
3501 (ft_select): Use ft_list_family.
3502 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3504 (mfont__ft_init): Initialize above new variables.
3505 (mfont__ft_fini): Free ft_family_list.
3506 (STRDUP_LOWER): New macro.
3507 (set_font_info): Use STRDUP_LOWER.
3508 (ft_list_family): Avoid duplicate addition of font path. Use
3510 (fc_decode_prop): Fix typo.
3512 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3513 (xfont_registry_list): Change argument disp_info to frame.
3515 (xfont_list_all): New function.
3516 (xfont_list): If FONT is not NULL, check all fonts.
3518 2004-09-28 Kenichi Handa <handa@m17n.org>
3520 * m17n-X.c (MXFont, MXFontList): New types.
3521 (MDisplayInfo): Delete members font_registry_list,
3522 iso8859_1_family_list, iso10646_1_family_list, new members
3523 font_list, base_font_list.
3524 (free_display_info): Adusted for the change of MDisplayInfo.
3525 (xfont_driver): Initialize with xfont_list.
3526 (font_compare): New function.
3527 (build_font_list): Deleted.
3528 (xfont_registry_list): New function.
3529 (xfont_select): Use xfont_registry_list.
3530 (xfont_list): New function.
3531 (device_open): Adusted for the change of MDisplayInfo.
3533 * font-ft.c (add_font_info): New arg languages. Callers changed.
3534 (fc_list): Get languages from fonts..
3535 (ft_list_all): Renamed from ft_list. Callers changed.
3536 (ft_list): New function.
3537 (mfont__ft_driver): Initalize with ft_list.
3539 * font.c (mfont_list): New function.
3541 * font.h (struct MFontDriver): New member `list'.
3542 (MFTInfo): New member languages.
3544 * m17n-gui.h (mfont_list): Extern it.
3546 2004-09-27 Kenichi Handa <handa@m17n.org>
3548 * internal-gui.h (struct MGlyphString): Delete members mt,
3549 sub_width, sub_lbrearing, sub_rbearing, and region.
3551 * draw.c (MSubTextExtents): New type.
3552 (layout_glyphs): New arg extents. Set its members.
3553 (layout_glyph_string): Adjusted for the above change.
3554 (alloc_gstring): Don't set gstring->mt.
3555 (truncate_gstring): Call line_break function with mt instead of
3558 2004-09-22 Kenichi Handa <handa@m17n.org>
3560 * mtext.c (count_utf_16_chars): Count each code of invalid
3563 2004-09-19 Kenichi Handa <handa@m17n.org>
3565 * mtext.c (default_utf_16, default_utf_32): Rename them to
3566 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3569 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3572 2004-09-13 Kenichi Handa <handa@m17n.org>
3574 * draw.c (Mlatin): Don't declare it here.
3575 (visual_order): Fix reordering of combining characters.
3576 (compose_glyph_string): Fix detection of script.
3577 (layout_glyphs): Don't fix reordering of combining characters
3579 (layout_glyph_string): Pay attention to
3580 control->disable_overlapping_adjustment.
3581 (truncate_gstring): Include at least on character in a line.
3582 (get_gstring): Always scan one full line.
3583 (mdraw__init): Don't initialize Mlatin here.
3584 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3585 have a font, use ascent/descent of an ASCII font. Allow
3586 ink_array_return and logical_array_return to be NULL.
3587 (mdraw_coordinates_position): Fix iteration.
3589 * font-ft.c (MFTtoProp): Member completely changed.
3590 (ft_to_prop): Adjusted for the above change.
3591 (ft_to_prop_size): Likewise.
3592 (set_font_info): Adjusted for the change of MFTtoProp.
3593 (fc_generic_family_list): New variable.
3594 (fc_list): Add special handling of generic font names.
3595 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3596 Initialize fc_generic_family_list.
3597 (mfont__ft_fini): Don't free ft_to_prop. Free
3598 fc_generic_family_list.
3599 (FC_vs_M17N_font_prop): New type.
3600 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3601 (fc_decode_prop, fc_encode_prop): New functions.
3602 (mfont__ft_parse_name): Use fc_decode_prop.
3603 (mfont__ft_unparse_name): Use fc_encode_prop.
3605 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3606 (MWDevice): Add member realized_font_list.
3607 (free_display_info): Don't free disp_info->realized_font_list.
3608 (free_device): Free device->realized_fontset_list.
3609 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3610 (device_open): Don't initialize disp_info->realized_font_list.
3611 (device_open): Initialize device->realized_font_list and set it to
3612 frame->realized_font_list.
3614 * fontset.c (try_font_group): New function.
3615 (mfont__lookup_fontset): Use try_font_group.
3617 * font.c (common_weight): Change the order of "regular".
3619 * face.c (Mlatin): Don't make it static.
3620 (mface__realize): Be sure to set work_gstring.frame.
3621 (mface__for_chars): Likewise.
3623 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3626 * internal-gui.h (Mlatin): Extern it.
3628 * m17n-gui.h (MDrawControl): New member
3629 disable_overlapping_adjustment.
3631 2004-09-06 Kenichi Handa <handa@m17n.org>
3633 * font-flt.c (run_otf): Fix typo ('}'->']').
3635 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3636 (COMBINING_PRECOMPUTED_P): New macros.
3638 * draw.c (layout_glyphs): Handle precomputed combining code.
3640 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3641 precomupted combining code.
3643 2004-09-03 Kenichi Handa <handa@m17n.org>
3645 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3648 2004-08-27 Kenichi Handa <handa@m17n.org>
3650 * face.c (mface_put_prop): If the new value is the same as the
3651 current one, don't increment frame->tick.
3653 2004-08-25 Kenichi Handa <handa@m17n.org>
3655 * fontset.c (mfontset): Initialize font_spec_list member.
3656 (mfontset_copy): Load fontset if necessary.
3658 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3659 'metrics' to for C++.
3661 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3664 2004-08-16 Kenichi Handa <handa@m17n.org>
3666 * Version 1.1.0 released.
3668 2004-08-13 Kenichi Handa <handa@m17n.org>
3670 * language.c (mlang__init): Add Dhivehi.
3672 * m17n-gui.c (Mx, Mfreetype): Delete it.
3673 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3675 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3676 (mfont_resize_ratio): Extern it.
3677 (MDrawGlyphInfo): New member logical_width;
3678 (MDrawGlyph): New type.
3679 (mdraw_glyph_list): Prototype adjusted.
3681 * m17n-X.c (xfont_open): Set type and fontp members.
3682 (xft_open): Likewise.
3684 * internal-gui.h (Mx, Mfreetype): Delete extern.
3686 * font.h (struct MRealizedFont): New member type and fontp.
3688 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3689 (Mx, Mfreetype): Declare here.
3690 (Mxft): New variable.
3691 (mfont_resize_ratio): New function.
3693 * font-ft.c (ft_open): Set type and fontp members.
3695 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3698 2004-08-11 Kenichi Handa <handa@m17n.org>
3700 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3703 2004-08-06 Kenichi Handa <handa@m17n.org>
3705 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3708 * font-flt.c (run_otf): Print debugging information if necessary.
3710 2004-08-05 Kenichi Handa <handa@m17n.org>
3712 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3713 positioning_type 5 and 6. Switch simplified.
3715 2004-08-04 Kenichi Handa <handa@m17n.org>
3717 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3719 2004-08-02 Kenichi Handa <handa@m17n.org>
3721 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3722 set val to 1 even if it is greater than 1.
3724 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3726 2004-07-29 Kenichi Handa <handa@m17n.org>
3728 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3729 debugging information.
3731 * internal.h (MDEBUG_PRINT5): New macro.
3733 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3734 the previous one if the zero width glyph has left or right
3737 2004-07-26 Kenichi Handa <handa@m17n.org>
3739 * m17n-X.c (xft_render): Pay attention to members left_padding and
3740 right_padding of MGlyph.
3742 * draw.c (visual_order): Allocate one more elements for arrays as
3743 a workaround of fribidi bug.
3744 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3745 instead of MGlyph->bidi_sensitive.
3746 (layout_glyph_string): Pay attentinon to
3747 control->orientation_reversed when padding at the head or tail.
3748 Fix adjustment of space glyph width.
3749 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3752 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3753 instead of MGlyph->bidi_sensitive.
3755 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3757 2004-07-26 Kenichi Handa <handa@m17n.org>
3759 * draw.c (visual_order): Don't treat combined glyphs specially.
3760 (layout_glyphs): Don't get metrics glyphs that are already ready.
3761 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3762 width with the previous one.
3763 (draw_background): Fix bar cursor position on a r2l glyph.
3765 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3766 (run_rule): Fix place of updating cluster_begin_pos and
3767 cluster_end_pos here.
3768 (run_otf): Don't set left_padding.
3770 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3772 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3773 Fix handling of GPOS.
3774 (mfont__ft_drive_gpos): Delete this function.
3776 * font.h (mfont__ft_drive_otf): Renamed back from
3777 mfont__ft_drive_gsub.
3778 (mfont__ft_drive_gpos): Delete extern.
3780 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3781 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3783 2004-07-23 Kenichi Handa <handa@m17n.org>
3785 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3786 the same bidi level.
3788 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3790 2004-07-22 Kenichi Handa <handa@m17n.org>
3792 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3794 2004-07-20 Kenichi Handa <handa@m17n.org>
3796 * draw.c (render_glyphs): Fix checking of g->code validity.
3798 * face.c (mface__realize): Set g.type.
3800 2004-07-18 Kenichi Handa <handa@m17n.org>
3802 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3805 * m17n-gui.c (mframe): Print error message give by dlopen to
3808 2004-07-16 Kenichi Handa <handa@m17n.org>
3810 * draw.c (compose_glyph_string): Improve the way of deciding a
3811 script. For a character that doesn't have script property, use
3812 the last non-latin script.
3814 * font-ft.c (fc_list): Cancel previous change.
3815 (mfont__ft_init): Add more entries in ft_to_prop_name.
3817 2004-07-15 Kenichi Handa <handa@m17n.org>
3819 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3820 previous or next character glyphs.
3822 2004-07-14 Kenichi Handa <handa@m17n.org>
3824 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3825 of type GLYPH_SPACE.
3827 * fontset.c (mfont__lookup_fontset): If glyph type is
3828 GLYPH_SPACE, get codes for SPACE.
3830 * internal-gui.h (Mfont): Delete extern.
3832 * m17n-gui.h (Mfont): Delete duplicated extern.
3834 2004-07-13 Kenichi Handa <handa@m17n.org>
3836 * font-ft.c (DEVICE_DELTA): New macro.
3837 (adjust_anchor): New function.
3838 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3840 (mfont__ft_drive_gpos): New function.
3842 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3843 (FontLayoutContext): Delete member `rfont'.
3844 (run_otf): Set g->otf_cmd. Call
3845 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3846 only whne HAVE_OTF is defined.
3848 * fontset.c: Include "config.h".
3850 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3851 (MGlyph): New member otf_cmd.
3853 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3854 (mfont__ft_drive_gpos): Extern it.
3856 * face.c: Include "config.h".
3858 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3860 * input-gui.c: Include "config.h".
3862 * plist.c: Include "config.h".
3864 2004-07-06 Kenichi Handa <handa@m17n.org>
3866 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3867 internal-gui.h: Cancel previous changes.
3869 * m17n-gd.h: Delete it.
3871 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3872 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3873 @XML2_LD_FLAGS@ to above.
3874 (libm17n_la_LIBADD): Add -ldl.
3875 (libm17n_la_LDFLAGS): Add -export-dynamic.
3876 (X_LD_FLAGS): Fix the order of linking.
3877 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3878 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3879 (libm17n_X_la_LDFLAGS): Add -module.
3880 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3881 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3882 (libm17n_gd_la_LDFLAGS): Add -module.
3883 (include_HEADERS): Delete m17n-gd.h.
3885 2004-06-30 Kenichi Handa <handa@m17n.org>
3887 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3888 (MDeviceLibraryInterface): Delete it.
3889 (register_device_library): Delete it.
3890 (m17n__device_library_list): Renamed from device_library_list.
3892 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3893 (m17n_init_win): Adjust prototype.
3895 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3896 (m17n_init_gd): New function.
3898 * m17n-gd.h: New file.
3900 * m17n-X.h: Include <m17n-gui.h>.
3901 (m17n_init_X): Extern it.
3902 (M17N_INIT): Redefine it.
3904 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3905 (m17n_init_X): New function.
3907 * internal-gui.h (m17n__device_library_list): Extern it.
3908 (struct MDeviceDriver): New members initialized, init, and fini.
3910 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3912 (libm17n_X_la_LIBADD): Delete aboves.
3913 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3914 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3915 (libm17n_gd_la_LDFLAGS): Delete it.
3916 (include_HEADERS): Add m17n-gd.h.
3918 2004-06-25 Kenichi Handa <handa@m17n.org>
3920 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3921 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3923 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3925 * font-ft.c (fc_list): If FcFontList finds no font, try
3928 * draw.c (compose_glyph_string): Terminate the last loop after
3929 doing default combining if necessary.
3931 2004-06-24 Kenichi Handa <handa@m17n.org>
3933 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3935 * character.c (mchar_define_property): Add const to an arg.
3937 * charset.c (mchar_define_charset): Add const to an arg.
3939 * coding.c (MCodingSystem): Add const to an arg or decoder.
3940 (finish_decoding): Add const to an arg.
3941 (decode_coding_charset, decode_coding_utf_8)
3942 (decode_coding_utf_16, decode_coding_utf_32)
3943 (decode_coding_iso_2022, decode_coding_sjis)
3944 (mconv_define_coding): Likewise.
3946 * m17n-X.c (xft_find_metric): Delete unused variable.
3948 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3951 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3954 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3955 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3957 * mtext.h (mtext__from_data): Ajust prototype.
3959 2004-06-23 Kenichi Handa <handa@m17n.org>
3961 * draw.c (compose_glyph_string): Always get glyph codes by
3963 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3964 (mdraw_glyph_list): New function.
3966 * font-flt.c (mfont__flt_run): Be sure to call
3967 rfont->driver->encode_char.
3969 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3970 (ft_encode_char): Delete arg C.
3971 (ft_render): Don't call FT_Get_Char_Index.
3973 * font.c (mfont__encodable_p): Delete it.
3974 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3976 * font.h (struct MFontDriver): Delete arg C of encode_char.
3977 (mfont__encodable_p): Delete extern.
3979 * m17n-X.c (xfont_encode_char): Delete arg C.
3980 (xft_find_metric): Don't cal FT_Get_Char_Index.
3981 (xft_render): Likewise.
3983 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3985 (mdraw_glyph_list): Extern it.
3987 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3989 2004-06-22 Kenichi Handa <handa@m17n.org>
3991 * m17n-gui.h (mfontset_lookup): Extern it.
3993 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3995 * fontset.c (realize_fontset_elements)
3996 (free_realized_fontset_elements, update_fontset_elements): New
3998 (mfont__realize_fontset): Call realize_fontset_elements.
3999 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
4000 (mfont__lookup_fontset): If a fontset was modified, update
4001 the realized fontset.
4002 (mfontset_modify_entry): Increment fontset->tick.
4003 (mfontset_lookup): New function.
4005 2004-06-21 Kenichi Handa <handa@m17n.org>
4007 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
4009 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
4010 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
4011 length of source text 0.
4013 2004-06-21 Kenichi Handa <handa@m17n.org>
4015 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
4016 (compare): Pay attention to format other than utf-8.
4017 (copy): Delete this function.
4018 (count_by_utf_8, count_by_utf_16, insert): New functions.
4019 (count_utf_16_chars): Fix handling of a surrogate pair.
4020 (find_char_forward, find_char_backward): Likewise.
4021 (mtext__from_data): Delete unnecessary check. Fix number of
4023 (mtext_from_data): Don't count items.
4024 (mtext_ref_char): Optimize the code.
4025 (mtext_set_char): Pay attention to format other than utf-8.
4026 (mtext_cat_char): Likewise.
4027 (mtext_dup): Don't call copy, instead do allocation here.
4028 (mtext_cat): Call insert instead of copy.
4029 (mtext_ncat): Likewise.
4030 (mtext_cpy): Delete character at first and call insert instead of
4032 (mtext_ncpy): Likewise.
4033 (mtext_copy): Likewise.
4034 (mtext_duplicate): Call insert instead of copy.
4035 (mtext_del): Pay attention to format other than utf-8.
4036 (mtext_ins): Simply call insert.
4037 (mtext_ins_char): Pay attention to format other than utf-8.
4038 (mtext_tok): Call insert instead of copy.
4039 (mtext_text): Call UNIT_BYTES.
4041 * textprop.c (mtext__adjust_plist_for_change): New function.
4043 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
4044 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
4045 (CHAR_UNITS_AT): Fix typo.
4046 (CHAR_UNITS_BY_HEAD): Fix typo.
4047 (STRING_CHAR_AND_UNITS): Fix typo.
4049 * internal.h (MTEXT_READ_ONLY_P): New macro.
4051 * mtext.h (mtext__replace): Delete the extern.
4052 (mtext__adjust_foramt): Adjust prototype.
4054 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
4055 if possible. Otherwise make a copy of mmt.
4057 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
4060 2004-06-18 Kenichi Handa <handa@m17n.org>
4062 * character.h (CHAR_STRING_UTF16): Fix syntax.
4064 2004-06-16 Kenichi Handa <handa@m17n.org>
4066 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
4067 (libm17n_X_la_LIBADD): Delete it.
4068 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
4070 * m17n-X.c (device_open): Add parens in `if' condition.
4072 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
4073 (DEC_POSITION): Likewise.
4074 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
4076 2004-06-15 Kenichi Handa <handa@m17n.org>
4078 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
4081 * draw.c (compose_glyph_string): If langauge is specified, call
4082 mface__for_chars even if a text is all latin. Fix condition for
4083 setting non_ascii_found.
4085 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
4087 * m17n.h (minput_char_to_key): Delete extern.
4089 * m17n-gui.h (minput_event_to_key): Cancel previous change.
4091 * m17n-gui.c (null_device_open): Set several members of frame.
4093 2004-06-14 Kenichi Handa <handa@m17n.org>
4095 * m17n-gui.h (minput_event_to_key): Delete extern.
4097 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
4099 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
4101 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
4103 2004-06-08 Kenichi Handa <handa@m17n.org>
4105 * character.c (mchar_put_prop): Don't increment the ref-count of
4108 2004-06-04 Kenichi Handa <handa@m17n.org>
4110 * m17n-core.c (mdebug__register_object): New function.
4111 (mdebug__unregister_object): Likewise.
4113 * internal.h (mdebug__register_object, mdebug__unregister_object):
4115 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
4118 * charset.c (mcharset__load_from_database): Don't call
4119 mconv__register_charset_coding here.
4121 * coding.c (find_coding): Get a real name from an element of
4122 coding_definition_list.
4123 (mconv__register_charset_coding): Set the real name at the top of
4125 (mcoding__load_from_database): Likewise.
4126 (mconv_list_codings): Adjusted for the above change.
4128 2004-06-03 Kenichi Handa <handa@m17n.org>
4130 * coding.c (find_coding): Find by canonicalized name. Don't have
4131 to modify the element of coding_definition_list by
4133 (mconv__define_coding_from_charset): Delete it.
4134 (mconv__register_charset_coding): Canonicalize sym.
4135 (mcoding__load_from_database): Register plist modified by
4138 * coding.h (mconv__define_coding_from_charset): Don't extern it.
4140 * font-ft.c (ft_open): Fix setting of rfont->descent.
4142 2004-06-02 Kenichi Handa <handa@m17n.org>
4144 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
4145 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
4146 (xlfd_unparse_name): Renamed from xfont_build_name.
4147 (mfont__init): Initialized Mfontconfig.
4148 (mfont__free_realized): Unconditionally unref rfont->info.
4149 (mfont__select): Free `this' if it's not best.
4150 (mfont__open): Don't check frame->realized_font_list.
4151 (mfont__parse_name_into_font): New function.
4152 (Mfontconfig): New variable.
4153 (mfont_from_name): Call mfont_parse_name.
4154 (mfont_name): Call mfont_unparse_name.
4155 (mdebug_dump_font): Likewise.
4157 * font.h (struct MFontDriver): Delete members parse_name and
4159 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
4160 (mfont__parse_name_into_font): Extern it.
4162 * font-ft.c: Include "symbol.h".
4163 (close_ft): Unconditionally free filename and charmap_list of
4165 (ft_open): Duplicate base->filename. Increment ref-count of
4166 ft_info->charmap_list. Free ft_info->charmap_list and
4167 ft_info->filename on error.
4168 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
4170 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
4172 (enum xlfd_field_idx): Moved to font.c.
4173 (split_font_name, build_font_name): Likewise.
4174 (build_font_list): Call mfont__parse_name_info_font.
4175 (xfont_open): Call mfont__unparse_name. Free name.
4176 (xfont_parse_name, xfont_build_name): Moved to font.c
4177 (xft_select): Prototype deleted.
4178 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
4179 Call mfont_pase_name.
4181 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4182 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4185 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4188 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4190 2004-06-01 Kenichi Handa <handa@m17n.org>
4192 * fontset.c (mfontset_modify_entry): Pay attention to the case
4193 that fontset->font_spec_list is NULL.
4195 2004-05-31 Kenichi Handa <handa@m17n.org>
4197 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4199 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4201 * font.c (mfont__select): Print score the a font for debugging.
4203 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4205 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4206 kanji_sym and kana_sym.
4208 2004-05-28 Kenichi Handa <handa@m17n.org>
4210 * Makefile.am (VINFO): New variable.
4211 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4212 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4214 2004-05-27 Kenichi Handa <handa@m17n.org>
4216 The following chanages are to make device dependent functions
4217 accessible only from MDeviceDriver structure, and to add GD and
4218 null device drivers. Font drivers get also device dependent.
4220 * m17n.c (m17n_init): Increament shell_initialized.
4221 (m17n_fini): Decremented shell_initialized.
4223 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4225 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4226 (Mwidget, Mcolormap, Mx): Extern them.
4228 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4229 (free_frame): Call frame->driver->close instead of
4231 (DLOPEN_SHLIB_EXT): New macro.
4232 (MDeviceLibraryInterface): New type.
4233 (device_library_list): New variable.
4234 (register_device_library): New function.
4235 (null_device): New variable.
4236 (null_device_close, null_device_get_prop)
4237 (null_device_realize_face, null_device_free_realized_face): New
4239 (null_driver): New variable.
4240 (null_device_init, null_device_fini, null_device_open): New
4242 (null_interface): New variable.
4243 (Mfreetype, Mdevice): Declare them.
4244 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4245 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4246 Mwin__Close_Device. Register drivers for Mx and Mgd.
4247 (m17n_fini_win): Decremented win_initialized. Call "fini"
4248 function of all opened devices. Don't call mwin__fini.
4249 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4251 (mframe): Handle Mdevice key of PLIST.
4252 (mframe_get_prop): Call frame->device->get_prop instead of
4253 mwin__device_get_prop.
4255 * m17n-gd.c: New file.
4257 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4258 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4260 * m17n-core.c (m17n_init_core): Increate core_initialized.
4261 (m17n_fini_core): Decremented core_initialized.
4263 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4264 (Mcolormap): Don't extern them here.
4266 * m17n-X.c (FRAME_DEVICE): New macro.
4267 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4268 (free_display_info): Use MPLIST_DO.
4269 (free_device): Free rface->info.
4270 (xft_close): Delete it.
4271 (device_init): Renamed from mwin__init.
4272 (device_fini): Renamed from mwin__fini.
4273 (device_open): Renamed from mwin__open_device.
4274 (x_driver): New variable.
4275 (MXFontInfo): Delete member frame, add member display.
4276 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4277 Don't declare them here.
4279 * internal-gui.h (MDeviceType): New enum.
4280 (MWDefice): Delete it.
4281 (struct MFrame): Change type of device to void *. New members
4282 device_type, driver, font_driver_list.
4283 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4284 (MDeviceDriver): New type.
4285 (Mx, Mgd, Mfreetype): Extern them.
4286 (mwin__XXX): Delete all of them.
4288 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4290 (win_destroy_ic): Likewise.
4291 (adjust_window_and_draw): Likewise.
4292 (win_callback): Likewise.
4293 (Mxim): Declare it here.
4294 (minput_event_to_key): Call M_CHECK_READABLE.
4296 * fontset.c (mfont__lookup_fontset): Delete local variable
4299 * font.h (struct MFontDriver): Delete member close, add members
4300 parse_name and build_name.
4301 (mfont__driver_list): Delete extern.
4302 (mfont__close): Delete extern.
4304 * font.c (mfont__init): Don't set mfont__driver_list.
4305 (mfont__fini): Don't unref mfont__driver_list.
4306 (mfont__select): Try font drivers in frame->font_driver_list. Set
4307 driver member of a realized font.
4308 (mfont__close): Delete it.
4309 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4310 functions of the default frame.
4312 * font-ft.c (close_ft): Check ft_info->ft_face and work
4314 (add_font_info): Allocate ft_info by M17N_OBJECT.
4315 (ft_close): Delete it.
4316 (mfont__ft_driver): Don't set ft_close.
4317 (ft_select): Increment ref-count of best_font.
4318 (ft_open): Decremented ref-count of base. On error, call
4319 FT_Done_Face and free ft_info.
4320 (ft_find_metric): Always use XXX_MONO in load_flags.
4321 (ft_render): Fix setting of width. Call
4322 frame->driver->draw_points instead of mwin__draw_points.
4323 (ft_to_prop): Don't set mfont__driver_list.
4324 (mfont__ft_fini): Just unref ft_info.
4326 * face.c (mface__init): Exchange foreground and background of
4327 mface__default. Call mface_put_prop to set hline of
4329 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4330 (mface__free_realized): Don't call mwin__free_realized_face.
4332 * draw.c (Mdepth): Don't declare it here.
4333 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4334 (render_glyphs, render_glyph_string): Likewise.
4335 (mdraw__init): Don't set Mdepth.
4336 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4338 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4340 (mdraw_text_items): Check FRAME is writable.
4341 (mdraw_per_char_extents): Implement body.
4343 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4345 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4346 (GUI_SOURCES): Delete it.
4347 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4348 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4349 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4350 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4351 (linkgui_LDADD): Set to libm17n-gui.la
4352 (linkgui_LDFLAGS): New target.
4353 (SRC): Include ${libm17n_gui_la_SOURCES} and
4354 ${libm17n_gd_la_SOURCES}.
4356 2004-05-24 Kenichi Handa <handa@m17n.org>
4358 * draw.c (draw_background): Don't draw background even if
4359 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4361 2004-05-22 Kenichi Handa <handa@m17n.org>
4363 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4365 2004-05-20 Kenichi Handa <handa@m17n.org>
4367 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4369 * m17n-gui.c: Include "plist.h".
4370 (mframe): If PLIST is NULL, initialize it to emply plist.
4372 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4373 (xft_driver): New variable.
4374 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4375 (xft_find_metric, xft_render): New function.
4376 (mwin__init): Adjusted for the new mfont__driver_list.
4377 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4378 generated face to PARAM.
4379 (mwin__realize_face): Fix setting of box colors. Don't call hook
4381 (mwin__draw_hline): New function.
4382 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4383 (mwin__xft_render): Delete these function.
4385 * internal-gui.h (struct MFrame): New member tick.
4386 (struct MGlyphString): New member tick.
4387 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4388 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4389 (mwin__xft_render): Delete extern.
4391 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4392 (mfontset): Always increment the reference count of returned
4395 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4396 (MFTInfo): Moved to font.h.
4397 (ft_iso8859_1_font_list): Delete this variable.
4398 (set_font_info): Don't set font->property[MFONT_TYPE].
4399 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4400 (add_font_info): Change type to void.
4401 (fc_list): Change anme from xft_list. Caller changed. Include
4402 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4403 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4404 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4405 (close_ft): Don't call mwin__xft_close. Unref
4406 ft_info->extra_info.
4407 (ft_open): Don't setup ft_info->fontname. Don't call
4409 (ft_find_metric): Don't call mwin__xft_get_metric.
4410 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4411 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4412 (mfont__ft_init): Adjusted for new mfont__driver_list.
4413 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4415 * font.c (mfont__driver_list): Make it MPlist.
4416 (mfont__init): Adjust initialization of mfont__driver_list.
4417 (mfont__fini): Free mfont__driver_list.
4418 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4419 (mfont__select): Adjusted for the new mfont__driver_list.
4421 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4422 (mfont__drirver_list): Adjust prototype.
4423 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4425 * face.h (struct MFace): Delete member realized_face_list, add
4427 (struct MRealizedFace): Delete member need_update
4428 andnofont_rface, add member non_ascii_list.
4429 (mface__update_frame_face): Extern it.
4431 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4433 (get_hline_create, get_box_create): New functions.
4434 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4436 (free_face): Cancep previous change. Free face->frame_list.
4437 (serialize_hline): Do nothing if hline->width is zero.
4438 (serialize_box): Do nothing if box->width is zero.
4439 (mface__init): Setup all properties of mface__default.
4440 (mface__fini): Free hline_prop_list and box_prop_list.
4441 (mface__realize): Cancel previous change. Update
4442 face->frame_list. Setup rface->non_ascii_list.
4443 (mface__for_chars): Update rface->non_ascii_list.
4444 (mface__free_realized): Free rface->non_ascii_list.
4445 (mface__update_frame_face): New function.
4446 (mface): Initialize face->frame_list.
4447 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4449 (mface_merge): Likewise.
4450 (mface_put_prop): If key is Mhline or Mbox, get value by
4451 get_hline_create or get_box_create respectively.
4452 (mface_put_prop): Update frame->tick and call
4453 mface__update_frame_face if necessary.
4454 (mface_update): Do nothing if func is noop_hook.
4456 * draw.c (render_glyphs): If a font is not found, use
4457 mwin__draw_empty_boxes.
4458 (alloc_gstring): Initialize gstring->tick.
4459 (get_gstring): Check gstring->tick.
4461 2004-05-17 Kenichi Handa <handa@m17n.org>
4463 * face.c (find_realized_face): Return value changed. If RFONT is
4464 NULL, avoid unnecessary checking.
4465 (free_face): Free face->realized_face_list.
4466 (mface__realize): Adjusted for the change of find_realized_face.
4467 If it returns a realized face that needs update, free it and
4468 realize a new one. Push a new realized face to
4469 frame->realized_face_list instead of appending.
4470 (mface__for_chars): Adjusted for the change of find_realized_face.
4471 Short cut if the required font is in rface->ascii_rface.
4472 (mface_put_prop): Free old value if necessary. Set need_update
4473 member of realized faces to 1.
4475 * face.h (struct MFace): Delete member tick, add member
4477 (struct MRealizedFace): Delete member tick, add member
4480 2004-05-13 Kenichi Handa <handa@m17n.org>
4482 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4484 2004-05-12 Kenichi Handa <handa@m17n.org>
4486 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4488 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4489 parse it XftNameParse.
4491 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4492 (all_fonts_scaned): New variable.
4493 (set_font_info): FAMILY may be Mnil.
4494 (add_font_info): Argument changed.
4495 (xft_list): Call add_font_info in it.
4496 (ft_list): Likewise.
4497 (ft_select): Make it work in the case family is Mnil.
4498 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4499 (mfont__ft_fini): Set all_fonts_scaned to 0.
4501 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4502 that is failed to open.
4504 2004-05-10 Kenichi Handa <handa@m17n.org>
4506 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4507 device's depth is 1 (i.e. monochrome).
4509 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4510 to work around the problem of libtool.
4512 * font-ft.c: Include <freetype/ftbdf.h>.
4513 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4515 (mfont__ft_init): Initialize them.
4516 (ft_iso8859_1_font_list): New variable.
4517 (set_font_info): Detect a font containing iso8859-1 glyphs and
4518 register it in ft_iso8859_1_font_list. If the font is not
4519 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4520 properties of the font from its properties.
4521 (add_font_list): If the font is not scalable, check if it is BDF
4522 or PCF font. If not, ignore it.
4523 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4524 registry is not iso8859-1.
4525 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4526 ft_iso8859_1_font_list.
4527 (ft_find_metric): If the font is not scalable, assume it as BDF
4528 or PCF, and get a metric from its properties.
4529 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4531 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4533 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4534 (libm17n_la_LDFLAGS): Delete it.
4535 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4536 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4538 2004-05-06 Kenichi Handa <handa@m17n.org>
4540 * draw.c (compose_glyph_string): Fix previous change.
4542 2004-04-30 Kenichi Handa <handa@m17n.org>
4544 * font-ft.c (ft_list): Delete unused variable `result'.
4545 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4547 2004-04-27 Kenichi Handa <handa@m17n.org>
4549 * m17n-X.c: Include config.h
4550 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4551 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4552 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4553 (FRAME_CMAP, FRAME_VISUAL): New macros.
4554 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4555 (xfont_driver): Make it static.
4556 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4557 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4558 info->xft_color_back.
4559 (MXftFontInfo) [HAVE_XFT2]: New type.
4560 (mwin__xft_close) [HAVE_XFT2]: New function.
4561 (mwin__xft_open) [HAVE_XFT2]: New function.
4562 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4563 (mwin__xft_render) [HAVE_XFT2]: New function.
4565 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4566 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4567 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4570 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4572 * font-ft.c: Don't include FT_FREETYPE_H here.
4573 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4574 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4575 (MFTInfo): New member charmap_index.
4576 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4577 (check_otf_filename): Renamed from check_filename. Return value
4579 (ft_set_property): This function deleted.
4580 (set_font_info): New function.
4581 (add_font_list): Argument changed. Add multiple fonts.
4582 (xft_list) [HAVE_XFT2]: New function.
4583 (ft_list) [not HAVE_XFT2]: New function.
4584 (ft_select): Add code for Xft.
4585 (close_ft): Likewise.
4586 (ft_open): Likewise.
4587 (ft_find_metric): Likewise.
4588 (ft_encode_char): Likewise.
4589 (ft_render): Likewise.
4591 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4593 2004-04-26 Kenichi Handa <handa@m17n.org>
4595 * textprop.c (mtext_attach_property): Declare the return type as
4598 2004-04-21 Kenichi Handa <handa@m17n.org>
4600 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4602 2004-04-09 Kenichi Handa <handa@m17n.org>
4604 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4606 (load_command): Setup above members.
4608 2004-04-05 Kenichi Handa <handa@m17n.org>
4610 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4612 2004-03-30 Kenichi Handa <handa@m17n.org>
4614 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4617 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4618 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4620 2004-03-29 Kenichi Handa <handa@m17n.org>
4622 * Version 1.0 Patch Level 2 released.
4624 2004-03-29 Kenichi Handa <handa@m17n.org>
4626 * charset.c (make_charset): Set charset->fully_loaded and
4627 charset->simple correctly. Don't try to get charset->min_char and
4628 charset->max_char for a charset of method subset and superset.
4629 Don't load a mapping file here.
4630 (mcharset__init): Set unified_max.
4631 (mcharset__load_from_database): Free a working plist.
4633 * coding.c (mcoding__fini): Free all malloced data.
4635 * input-gui.c (win_create_ic): Set control.as_image for preediting
4638 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4639 `count') to initialize the array.
4641 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4644 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4646 (mwin__create_window): Fix bug of setting a background pixel of a
4648 (mwin__adjust_window): Clear the window before drawing.
4650 * m17n-core.c (mdebug__report_object): Free array->objectes if
4652 (m17n_init_core): Don't set report_header_printed to 0 here.
4653 Fix debugging information.
4654 (m17n_fini_core): Set report_header_printed to 0 here.
4656 * m17n-core.h (mplist_deserialize): Extern it.
4658 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4660 * m17n.c (m17n_fini): Fix debugging information.
4662 * mtext.c (mtext__adjust_foramt): New function.
4664 * mtext.h (mtext__adjust_foramt): Extern it.
4666 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4668 * plist.h (mplist__deserialize): Don't extern it.
4670 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4671 elements of symbol_table to NULL. Report about created and freed
4672 symbols if MDEBUG_FINI is set.
4674 2004-03-22 Kenichi Handa <handa@m17n.org>
4676 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4678 * m17n.c (m17n_init): Fix the way of checking merror_code.
4680 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4682 2004-03-22 Kenichi Handa <handa@m17n.org>
4684 * fontset.c (realize_font_group): Adjust the font size by
4685 mfont__resize before selecting a font.
4687 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4689 2004-03-19 Kenichi Handa <handa@m17n.org>
4691 * Version 1.0 Patch Level 1 released.
4693 2004-03-19 Kenichi Handa <handa@m17n.org>
4695 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4697 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4699 2004-03-19 Kenichi Handa <handa@m17n.org>
4701 Re-apply the changes forgotten in the released version.
4703 * charset.c (mcharset__load_from_database): Call
4704 mchar_define_charset.
4706 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4707 (mconv_encode_range): Put Mcoding text property.
4709 2004-03-18 Kenichi Handa <handa@m17n.org>
4711 * draw.c (Mdepth): New variable.
4712 (visual_order): Delete unused local var `pos'.
4713 (compose_glyph_string): Fix for the case that gstring->glyphs is
4714 realloced. Stop generating glyphs at TO. Fix handling of
4716 (layout_glyphs): Get metrics of all glyphs in advance. Set
4717 lbearing and rbearing of base of composition glyph correctly.
4718 Handle left-overhang glyphs correctly.
4719 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4721 (dump_combining_code): Change the defualt off_x character to ".".
4722 (mdraw__init): Initialize Mdepth.
4724 * face.c (work_gstring): New variable
4725 (mface__init): Initialize work_gstring.
4726 (mface__fini): Free work_gstring.glyphs.
4727 (mface__realize): Don't handle videomode property here. Adjusted
4728 for the change of mfont__get_metric.
4729 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4731 * face.h (enum face_gc): Moved to m17n-X.c.
4733 * font.h (struct MFontDriver): Arguments of find_metric changed.
4734 (mfont__select): Prototype adjusted.
4735 (mfont__get_metric): Likewise.
4736 (mfont__ft_drive_otf): Likewise.
4737 (mfont__flt_run): Likewise.
4739 * font.c (mfont__select): New argument layouter. If layouter is
4740 different in the registered font, make a new copy of realized
4742 (mfont__get_metric): Argument changed. Get metrics of multiple
4744 (mfont_find): Call mfont__select with layouter as Mnil.
4746 * font-flt.c (FontLayoutContext): New member rfont.
4747 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4748 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4750 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4752 (NUM_POINTS): New macro.
4753 (MPointTable): New type.
4754 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4755 (mfont__ft_drive_otf): New argument rfont.
4757 * fontset.c (realize_font_group): Adjusted for the changed of
4759 (check_fontset_element): This function deleted.
4761 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4762 off the parent window if the preedit text is zero length.
4764 * internal-gui.h (struct MFrame): New members foreground,
4765 background, videomode, font.
4766 (struct MGlyphString): New member anti_alias.
4767 (MDrawPoint): New type.
4768 (mwin__draw_bitmap): Prototype deleted.
4769 (mwin__draw_points): Prototype added.
4771 * m17n-gui.h (MDrawControl): New member anti_alias.
4773 * m17n-gui.c (free_frame): Free frame->font.
4774 (mframe): Set the fontset of frame->face to the default fontset.
4776 * m17n-X.c (RGB_GC): New type.
4777 (enum gc_index): Renamed from enum face_gc. Member names changed.
4779 (struct MWDevice): Members foreground and background deleted. New
4780 member scratch_gc, gc_list.
4781 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4782 (free_device): Free GCs in device->gc_list.
4783 (get_rgb_gc): New function.
4784 (get_gc): Renamed and argument changed from get_color.
4785 (get_gc_for_anti_alias): New function.
4786 (xfont_find_metric): Arguments changed. Get metrics of multiple
4788 (set_region): Argument changed. Caller changed.
4789 (xfont_render): Allways set a font in gc.
4790 (x_error_handler, x_io_error_handler): Define only if
4791 X_SET_ERROR_HANDLER is defined.
4792 (mwin__open_device): Create device->scratch_gc. Set members
4793 foreground, background, and videomode of frame. Call
4794 XSetErrorHandler and XSetIOErrorHandler only if
4795 X_SET_ERROR_HANDLER is defined.
4796 (struct gc_list): Deleted.
4797 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4798 (mwin__realize_face): Adjusted for the change of the format of
4799 rface->info and the charge of set_region.
4800 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4801 (mwin__draw_box): Likewise.
4802 (mwin__draw_bitmap): This function deleted.
4803 (mwin__draw_points): New function.
4804 (mwin__verify_region): Adjusted for the change of the format of
4805 rface->info and the charge of set_region.
4806 (mwin__create_window): Inherit backgound pixel from parent.
4807 (mwin__dump_gc): Adjusted for the change of the format of
4810 2004-03-16 Kenichi Handa <handa@m17n.org>
4812 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4814 * input.c (M_key_alias): New variable.
4815 (handle_key): Try M_key_alias property of a key too.
4816 (minput__init): Initialize M_key_alias. Give that property to
4817 symbols in one_char_symbol. Fix bug of initializing
4820 * draw.c (compose_glyph_string): Don't handle
4821 ignore_formatting_char here. Include formatting characters in the
4822 range processed by a FTL.
4823 (layout_glyph_string): Handle ignore_formatting_char here.
4825 2004-03-12 Kenichi Handa <handa@m17n.org>
4827 * input-gui.c (win_create_ic): Enable bidi in status control.
4829 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4831 2004-03-09 Kenichi Handa <handa@m17n.org>
4833 * input.c (load_input_method): If title is not specified, use the
4834 input method name as title.
4836 * m17n-X.c (get_color): Make it static.
4837 (xim_create_ic, xim_destroy_ic, x_error_handler)
4838 (x_io_error_handler): Likewise.
4840 2004-03-01 Kenichi Handa <handa@m17n.org>
4842 * Version 1.0 released.
4845 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4846 National Institute of Advanced Industrial Science and Technology (AIST)
4847 Registration Number H15PRO112
4849 This file is part of the m17n library.
4851 The m17n library is free software; you can redistribute it and/or
4852 modify it under the terms of the GNU Lesser General Public License
4853 as published by the Free Software Foundation; either version 2.1 of
4854 the License, or (at your option) any later version.
4856 The m17n library is distributed in the hope that it will be useful,
4857 but WITHOUT ANY WARRANTY; without even the implied warranty of
4858 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4859 Lesser General Public License for more details.
4861 You should have received a copy of the GNU Lesser General Public
4862 License along with the m17n library; if not, write to the Free
4863 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4864 Boston, MA 02110-1301, USA.