1 2010-08-11 Kenichi Handa <handa@m17n.org>
3 * input.h (MInputContextInfo): New member state_hook.
5 * input.c (shift_state): Just set ic_info->state_hook, instead of
6 taking state-hook actions.
7 (handle_key): Check ic_info->state_hook. If KEY is unhandled,
8 init ic_info->state_hook.
10 2010-08-09 Kenichi Handa <handa@m17n.org>
12 * m17n-flt.c (try_otf): Remove unused local vars.
14 * input.c (fully_initialize): Avoid compiler warning by casting.
16 * m17n-core.c (m17n_init_core): Fix handling of env_value.
18 * fontset.c (realize_fontset_elements): Fix typo (pl->plist).
20 * coding.c (decode_coding_iso_2022): Sanitize "if" condition.
22 2010-04-23 Kenichi Handa <handa@m17n.org>
24 * Version 1.6.1 released.
26 2010-04-23 Kenichi Handa <handa@m17n.org>
28 * m17n-flt.c (enum GlyphInfoMask): Shift upper masks 1-bit left.
29 (decode_packed_otf_tag): If a glyph has combining information,
32 2010-04-23 Kenichi Handa <handa@m17n.org>
34 * font-ft.c (ft_drive_otf): Reset 28th bit of g->g.internal for
35 storing OTF feature tag.
37 2010-04-19 Kenichi Handa <handa@m17n.org>
39 * m17n-flt.c (run_stages): Update category code of glyphs if
40 category table is changed.
42 2010-04-05 Kenichi Handa <handa@m17n.org>
44 * font-ft.c (ft_check_cap_otf): Fix conditions to call
47 * database.c (check_version): Fix previous change.
49 2010-04-02 Kenichi Handa <handa@m17n.org>
51 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 6.
52 (M17NLIB_PATCH_LEVEL): Changed to 1.
53 (M17NLIB_VERSION_NAME): 1.6.1.
55 2010-03-30 Kenichi Handa <handa@m17n.org>
57 * Version 1.6.0 released.
59 2010-03-01 Kenichi Handa <handa@m17n.org>
61 * m17n-flt.c (run_rule): Fix checking of glyph availability.
63 2010-02-18 Kenichi Handa <handa@m17n.org>
65 * m17n-gui.c (register_device_library): Preprend M17N_MODULE_DIR
66 to the module file name.
68 * input.c (load_external_module): Preprend M17N_MODULE_DIR to the
71 * charset.c (load_charset): Check the return value of fgets.
73 * Makefile.am: Build modules dynamically loaded with
74 -avoid-version and no -version-info.
76 2010-01-15 Kenichi Handa <handa@m17n.org>
78 * draw.c (run_flt): Set mflt_try_otf to rfont->driver->try_otf.
79 (mdraw__init): Set mflt_enable_new_feature to 1.
81 * font-ft.c (ft_try_otf): New function.
82 (mfont__ft_driver): Set ft_try_otf.
84 * font.h (struct MFontDriver): New member try_otf.
86 * m17n-X.c (xft_driver): Set xft_try_otf.
87 (xft_try_otf): New function.
89 * m17n-flt.h: (mflt_enable_new_feature): Extern it.
90 (mflt_try_otf): Extern it.
92 * m17n-flt.c (load_category_table): If mflt_enable_new_feature is
93 zero, return NULL for such categories that require the new
95 (parse_otf_command): If mflt_enable_new_feature is zero, return
97 (load_otf_command): Fix previous change.
98 (load_flt): Check the return value of load_category_table.
99 (try_otf): Renamed from run_otf_category. Call mflt_try_otf
100 instead of font->drive_otf.
101 (run_command): Call try_otf instead of run_otf_category.
102 (m17n_init_flt): Initialize mflt_enable_new_feature to 0,
103 mflt_try_otf to NULL.
104 (mflt_enable_new_feature): New variable.
105 (mflt_try_otf): New variable.
107 2009-12-10 Kenichi Handa <handa@m17n.org>
109 * m17n-flt.c (parse_otf_command): Handle ":otf?".
110 (run_otf_category): If not features are specified, reset category
112 (run_command): On copy, don't re-calculate a category code.
114 2009-12-03 Kenichi Handa <handa@m17n.org>
116 * m17n-flt.c (run_stages): Reset category code if category-table
118 (mflt_run): Don't set category code here.
119 (decode_packed_otf_tag): If no feature is applied, re-calculate
122 2009-12-02 Kenichi Handa <handa@m17n.org>
124 * m17n-flt.c (mflt_find): If FONT is specified but no flt is
126 (run_command): Don't set ENCODED and MEASURED of separator.
128 2009-11-30 Kenichi Handa <handa@m17n.org>
130 * m17n-flt.c (load_otf_command): Check 4th char against '?'.
131 (load_command): Likewise.
132 (decode_packed_otf_tag): New arg CTX. If CTX->in == gstring,
133 update CTX->encoded. Caller changed.
135 2009-11-30 Kenichi Handa <handa@m17n.org>
137 * font-ft.c (ft_drive_otf): Check if OUT is null or not.
138 (ft_drive_otf): Call OTF_drive_gsub_with_log and
139 OTF_drive_gpos_with_log. Record the applied feature in
142 * font.c (mfont__get_glyph_id): Encode g->c instead of g->code.
144 * internal-flt.h (MAKE_COMBINING_CODE_BY_CLASS)
145 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
146 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P):
148 (PACK_OTF_TAG): Extern it.
150 * draw.c (reorder_combining_chars): Delete it.
152 * m17n-flt.h (mflt_font_id): Use type MFLFont.
153 (mflt_iterate_otf_feature): Likewise.
155 * m17n-flt.c (enum GlyphInfoMask): New member CategoryCodeMask and
157 (GET_CATEGORY_CODE, SET_CATEGORY_CODE, GET_COMBINED): New macros.
158 (SET_COMBINING_CODE): Set also CombinedMask.
159 (FontLayoutFeatureTable): Delete it.
160 (FeatureCodeTable): New type.
161 (FontLayoutCategory): Type of feature_table changed.
162 (load_category_table): Adjusted for the change of
164 (unref_category_table): Likewise.
165 (gen_otf_tag): New member shift. Caller changed.
166 (FontLayoutContext): New member category.
167 (run_rule): Compare g->c instead of g->code.
168 (decode_packed_otf_tag): New function.
169 (run_otf): Call decode_packed_otf_tag. Don't reset combining-code
171 (run_otf_category): New function.
172 (run_command): Set category-code if necessary. Call
173 run_otf_category for FontLayoutCmdTypeOTFCategory.
174 (run_stages): Set ctx->category. Get category from glyph if
176 (mflt_dump_gstring): New function.
178 2009-11-26 Kenichi Handa <handa@m17n.org>
180 * m17n-flt.c (enum FontLayoutCmdType): New member
181 FontLayoutCmdTypeOTFCategory.
182 (FontLayoutFeatureTable): New type.
183 (FontLayoutCategory): New members feature_table_size and
185 (load_category_table): Handle feature_table.
186 (unref_category_table): Likewise.
187 (load_otf_command): Handle FontLayoutCmdTypeOTFCategory.
188 (load_command): Likewise.
189 (free_flt_command): Likewise.
191 2009-11-10 Kenichi Handa <handa@m17n.org>
193 * draw.c (run_flt): Update category code of each glyph.
195 2009-11-07 Kenichi Handa <handa@m17n.org>
197 * font-ft.c (ft_drive_otf): Don't accumulate anchor adjustments.
199 2009-11-05 Kenichi Handa <handa@m17n.org>
201 * m17n-flt.c (run_otf): Fix updating of g->lbearing, etc.
203 * font-ft.c (ft_drive_otf): Use OTF_drive_gpos2 if possible.
205 2009-10-28 Kenichi Handa <handa@m17n.org>
207 * fontset.c (mdebug_flag): New variable.
208 (mfont__lookup_fontset): Print debug info.
210 * m17n-core.c (m17n_init_core): Call SET_DEBUG_FLAG for
213 * internal.h (enum MDebugFlag): Add MDEBUG_FONTSET.
215 * language.c (mscript__from_otf_tag): Adjusted for the new format
216 of the database <standard script unicode>.
218 2009-10-22 Kenichi Handa <handa@m17n.org>
220 * database.c (check_version): Fix the check.
222 * input.c (surrounding_pos): New arg *pos.
223 (integer_value): Fix handling of "@+0".
224 (take_action_list): Adjusted for the change of surrounding_pos.
226 2009-10-05 Kenichi Handa <handa@m17n.org>
228 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
231 * m17n-flt.c (FontLayoutCategory): New typedef.
232 (FontLayoutStage): Type of the member `category' changed.
233 (struct _MFLT): Type of the member `coverage' changed. New member
234 need_config and font_id.
235 (apply_otf_feature): New function.
236 (load_category_table): New arg FONT. If FONT is non-NULL, call
237 apply_otf_feature. Setup category->definition.
238 (ref_category_table): New macro.
239 (unref_category_table): New function.
240 (load_flt): Adjusted for the type change of category.
241 (free_flt_stage): New arg FLT.
242 (list_flt): Adjusted for the type change of category.
243 (run_stages): Adjusted for the type change of category.
244 (configure_category, configure_flt): New function.
245 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
246 mflt_font_id to NULL.
247 (mflt_get): Skip the heading configured FLTs.
248 (mflt_find): Likewise. If necessary, configure the found flt.
249 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
250 Adjusted for the type change of category.
251 (mflt_iterate_otf_feature, mflt_font_id): New variable.
253 * m17n-X.c (xfont_open): Set rfont->id.
254 (xft_driver): Set xft_iterate_otf_feature.
255 (xft_open): Set rfont->id.
256 (xft_iterate_otf_feature): New function.
258 * font.h (struct MRealizedFont): New member id.
259 (struct MFontDriver): New member iterate_otf_feature.
261 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
263 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
264 (get_otf): New funcition.
265 (ft_check_otf, ft_drive_otf): Use get_otf.
266 (iterate_callback, ft_iterate_otf_feature): New functions.
267 (mfont__ft_driver): Set ft_iterate_otf_feature.
269 * draw.c: Docstring updated.
270 (font_id): New function.
271 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
274 2009-10-02 Kenichi Handa <handa@m17n.org>
276 * m17n-flt.c (load_flt): Check the return value of
279 2009-09-03 Kenichi Handa <handa@m17n.org>
281 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
282 positions are adjusted by GPOS table.
284 2009-08-13 Kenichi Handa <handa@m17n.org>
286 * Version 1.5.5 released.
288 2009-08-13 Kenichi Handa <handa@m17n.org>
290 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
291 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
293 2009-03-03 Kenichi Handa <handa@m17n.org>
295 * draw.c (compose_glyph_string): Check if category not Mnil.
297 2009-03-02 Kenichi Handa <handa@m17n.org>
299 * Version 1.5.4 released.
301 2009-02-25 Kenichi Handa <handa@m17n.org>
303 * m17n-core.c (report_object_array): For M-text and Plist, print
306 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
307 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
309 * input.c (get_candidate_list): Free unnecessary objects.
310 (take_action_list): Free plist.
312 2009-02-04 Kenichi Handa <handa@m17n.org>
314 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
316 2009-01-16 Kenichi Handa <handa@m17n.org>
318 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
321 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
324 2009-01-14 Kenichi Handa <handa@m17n.org>
326 * coding.c (decode_coding_iso_2022): Check invocation status
327 before updating charset0 and charset1.
329 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
331 2008-12-31 Kenichi Handa <handa@m17n.org>
333 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
336 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
338 * face.c (mface_get_prop): Fix strict aliasing bug.
339 (mface_put_prop): Likewise.
341 * m17n-gui.c (mframe): Fix strict aliasing bug.
343 2008-10-20 Kenichi Handa <handa@m17n.org>
345 * Version 1.5.3 released.
347 2008-10-06 Kenichi Handa <handa@m17n.org>
349 * draw.c (mdraw__init): Use TRUE only when
350 FRIBIDI_INTERFACE_VERSION is less than 3.
352 2008-10-03 Kenichi Handa <handa@m17n.org>
354 * database.c (mdatabase__find_file): Return a copy of filename if
355 it is absolute pathname.
357 2008-09-25 Kenichi Handa <handa@m17n.org>
359 * input.c (load_macros): Don't parse the action list here.
360 (load_im_info): Parse action lists of all macros.
362 2008-09-24 Kenichi Handa <handa@m17n.org>
364 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
366 2008-09-19 Kenichi Handa <handa@m17n.org>
368 * input.c (fully_initialize): Rename "@reload" to "-reload".
370 2008-09-17 Kenichi Handa <handa@m17n.org>
372 * m17n-flt.c (run_stages): Fix combining with a variable width
375 2008-08-04 Kenichi Handa <handa@m17n.org>
377 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
380 2008-07-22 Kenichi Handa <handa@m17n.org>
382 * input.c (fully_initialize): Fix previous change.
384 2008-07-19 Kenichi Handa <handa@m17n.org>
386 * input.c (fully_initialize): Fix previous change.
388 2008-07-14 Kenichi Handa <handa@m17n.org>
390 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
392 2008-07-14 Kenichi Handa <handa@m17n.org>
394 * input.c (fully_initialize): Handle C-M-1, etc.
396 2008-07-11 Kenichi Handa <handa@m17n.org>
398 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
400 2008-06-23 Kenichi Handa <handa@m17n.org>
402 * Version 1.5.2 released.
404 2008-06-23 Kenichi Handa <handa@m17n.org>
406 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
407 (M17NLIB_PATCH_LEVEL): Changed to 2.
408 (M17NLIB_VERSION_NAME): Changed "1.5.2".
410 2008-06-13 Kenichi Handa <handa@m17n.org>
412 * input.c (minput_config_file): Comment fixed for man-page.
414 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
416 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
418 2008-05-24 Kenichi Handa <handa@m17n.org>
420 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
422 2008-05-23 Kenichi Handa <handa@m17n.org>
424 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
425 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
427 (libm17n_gd_la_LIBADD): Likewise.
429 * input.c (take_action_list): Fix debug info.
431 2008-05-14 Kenichi Handa <handa@m17n.org>
433 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
434 (run_stages): Fix index of g_indices.
436 2008-04-03 Kenichi Handa <handa@m17n.org>
438 * draw.c (compose_glyph_string): Don't run flt striding over the
440 (get_gstring): Don't use the cached gstring if cursor position is
443 2008-04-02 Kenichi Handa <handa@m17n.org>
445 * input.c (integer_value): Delete the 3rd arg VALUE.
446 (resolve_expression): Adjust the call of integer_value.
447 (take_action_list): Likewise.
449 2008-03-06 Kenichi Handa <handa@m17n.org>
451 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
454 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
456 * Version 1.5.1 released.
458 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
460 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
461 HAVE_FREETYPE is defined.
463 * font.h (OTF_Tag): Be sure that it is defined in any cases.
465 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
467 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
470 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
472 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
474 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
476 * input.c (parse_action_list): Check M_candidates.
477 (get_im_info): If key is Mnil, be sure to set im_info->states to a
480 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
482 * input.c (integer_value): Fix interpretation of "@-N".
484 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
486 * input.c (get_following_char): Fix interpretation of POS.
487 (get_following_char): Fix interpretation of "@+N".
489 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
491 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
494 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
496 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
498 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
500 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
501 (run_command): Check if clustering now before calling
502 UPDATE_CLUSTER_RANGE.
504 2008-01-06 Kenichi Handa <handa@m17n.org>
506 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
508 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
510 * m17n-X.c (xft_find_metric): Set g->g.measured.
512 * m17n-flt.c (Mequal): New variable.
513 (m17n_init_flt): Initialize it.
514 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
515 into a new member facility.
516 (load_command): Modify parsing of Mfont_facility.
517 (run_rule): Adjuted for the change of FontLayoutCmdRule.
518 (run_otf): Adjusted metrics if a->back is nonzero.
520 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
522 * Version 1.5.0 released.
524 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
526 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
528 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
529 (run_rule): Check if a font has the specific glyph correctly.
531 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
532 MDEBUG_FONT_FLT to MDEBUG_FLT.
534 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
536 * font-flt.c: Delete it.
538 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
540 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
541 TO for the rule of SRC_HAS_GLYPH.
543 * draw.c (run_flt): Argument changed.
544 (compose_glyph_string): Adjusted for the above change.
546 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
548 * plist.c (read_mtext_element): Don't free the malloced buffer.
550 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
552 * m17n-core.h (merror_code): Extern it.
554 * m17n-misc.h (merror_code): Don't extern it.
556 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
558 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
560 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
562 * draw.c (compose_glyph_string): Check g->rface->layouter, not
563 g->rface->rfont->layouter.
565 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
567 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
568 (run_rule): Use ctx->encoded_offset.
569 (run_command): Likewise.
570 (run_stages): Set ctx->encoded_offset.
572 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
574 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
575 bit-size of MFLTGlyph->internal.
577 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
579 * draw.c (visual_order): Exclude the last anchor glyph from the
582 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
584 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
585 (run_stages): Likewise.
586 (load_flt): Unref top after checking plist.
588 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
590 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
592 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
594 * m17n-flt.c (Mcombining): New variable.
595 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
596 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
597 SRC_HAS_GLYPH and SRC_OTF_SPEC.
598 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
600 (load_command): Adjusted for the above changes.
601 (run_rule): Likewise.
602 (combining_code_from_class): Delete it.
603 (mflt_get): Check flt->name against Mcombining, not Mt.
605 * internal-flt.h (Mcombining): Extern it.
607 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
608 combining characters.
610 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
612 * face.c (mface__realize): Reset measured flag before calling
615 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
616 (setup_combining_coverage): New function.
617 (setup_combining_flt): New function.
618 (mflt_get): If flt is not found, return NULL. If name if Mt,
619 call setup_combining_flt.
620 (mflt_run): For debugging, print font family name.
622 * font-ft.c (ft_render): Fix handling of baseline_offset.
623 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
624 (ft_render): Check pixel_mode to determine anti_alias.
626 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
627 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
628 (xfont_render): Set baseline_offset in pixel.
629 (xft_render): Fix handling of baseline_offset.
631 * draw.c (run_flt): Set font.font.family.
632 (compose_glyph_string): Fix handling of combining characters.
634 * fontset.c (try_font_list): Check if the named flt is surely
637 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
639 * draw.c (analyse_bidi_level): New function.
640 (visual_order): Do reordering using the already decided
642 (compose_glyph_string): Decide bidi-level before calling flt.
644 * m17n-flt.c (mflt_run): Fix typo.
646 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
648 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
650 * draw.c (visual_order): Don't rely on the width of glyphs.
651 (run_flt): Fix culculation of g->g.to.
653 * m17n-flt.c (run_rule): Don't set error code here.
654 (run_cond): Likewise.
655 (run_otf): Fix culculation of xoff and yoff.
656 (run_command): Don't set error code here.
660 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
661 (xfont_find_metric): Set glyph's yadv to 0.
662 (xft_find_metric): Likewise.
664 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
665 (ft_find_metric): Adjust glyph's metrics.
666 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
667 (ft_drive_otf): Set mark glyph's xadv to 0.
669 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
672 2007-10-29 Kenichi Handa <handa@m17n.org>
674 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
675 (mflt_get): Adjusted for the argument change.
676 (mflt_name): Adjusted for the return value change.
678 * m17n-flt.c (Mgenerator, Mend): New variables.
679 (flt_min_coverage, flt_max_coverage): New variables.
682 (Mfont_has): Renamed from Mexist. Referrers chagned.
683 (gen_otf_tag): Handle the trailing whitespaces.
684 (otf_count_features, otf_store_features): Fix for negative features.
685 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
686 (load_otf_command): Likewise.
687 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
688 (load_flt): Argument changed. Caller changed.
689 (free_flt_list): New function.
690 (run_rule): Adjusted for the change of FontLayoutContext.
691 (mflt_run): Adjusted for the change of FontLayoutContext.
693 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
694 (m17n_fini_win): Call m17n_fini_flt.
696 * m17n-gui.h: Include m17n-flt.h.
698 * m17n-gd.c: Adusted for the change of MGlyph.
700 * m17n-X.c: Adusted for the change of MGlyph.
701 (xft_check_otf, xft_drive_otf): New functions.
703 * internal-gui.h (MGlyph): Modified for new FLT handling.
705 * fontset.c (try_font_list): Adusted for the change of MGlyph.
707 * font-ft.c: Adjusted for the change of MGlyph.
708 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
709 (get_glyph_metric): Deleted.
710 (ft_check_otf): New function.
711 (ft_drive_otf): New fucntion.
713 * font.c: Adjusted for the change of MGlyph.
714 (mfont__init): Don't call mfont__flt_init.
715 (mfont__fini): Don't call mfont__flt_fini.
716 (mfont__get_glyph_id, mfont__get_metrics): New functions.
718 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
719 (MFLTFontForRealized): New struct.
720 (struct MFontDriver): New members check_otf and drive_otf.
721 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
723 * face.c: Adjusted for the change of MGlyph.
725 * draw.c: Adjusted for the change of MGlyph.
727 * m17n.c (m17n_init): Don't call mchar_init.
729 * m17n-core.c (m17n_init_core): Call mchar_init.
731 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
733 * input.c: Include "m17n.h" instead of "m17n-gui.h".
735 * chartab.c (mchartable): Initialize table->min_char to -1.
736 (mchartable_min_char): New function.
737 (mchartable_max_char): New function.
739 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
740 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
742 2007-10-12 Kenichi Handa <handa@m17n.org>
744 * m17n-core.h (Mcharset): Extern it.
745 Move detabase related declarations from m17n.h.
747 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
748 (struct _MFLTOtfFeatures): New struct.
749 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
750 (struct _MFLTFont): Delete otf, add check_otf.
751 (MCHAR_INVALID_CODE): Define it.
753 * plist.c (read_mtext_element): Simplify the code.
755 * m17n.h: Move database related declarations to m17n-core.h
756 (Mharset): Don't extern it.
758 * m17n.c (m17n_init): Don't call mdatabase__init.
760 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
763 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
764 (Mexist): New variable.
765 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
766 (FontLayoutCmdRule): New member src.exist.
767 (parse_otf_command): Handle gsub_count and gpos_count separately.
768 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
769 (load_command): Handle the command "exist".
770 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
771 (run_rule): Handle the case SRC_EXIST.
772 (run_otf): Adjusted for the change of MFLTOtfSpec.
773 (run_command): Check the range of FROM.
774 (check_otf_spec): Delete it.
775 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
777 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
778 (mflt_find): Call font->check_otf instead of check_otf_spec.
779 (mflt_run): Keep the metrics in 26.6 fixed point.
781 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
782 (m17n_init_core): Call mdatabase__init.
784 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
786 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
789 * font-flt.c (Mexist): New variable.
790 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
791 (FontLayoutCmdRule): New member src.exist.
792 (load_category_table): Use isalnum, not isalpha.
793 (load_command): Check the command "exist".
794 (run_rule): Hande the case SRC_EXIST.
795 (run_command): Check the range of FROM.
796 (mfont__flt_init): Initialize Mexist.
798 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
800 * database.h (mdatabase__load_charset_func): Extern it.
802 * database.c: Include m17n-core.h instead of m17n.h.
803 (load_chartable): Use mtext__from_data.
804 (load_charset): Moved to charset.c
805 (load_database): Call mdatabase__load_charset_func instead of
807 (mdatabase__load_charset_func): New variable.
808 (mdatabase__init): Initialize mdatabase__load_charset_func and
809 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
810 (mdatabase__save): Use fwrite, not mconv_encode_stream.
811 (Mcharset): Declare it here.
813 * charset.c: Include "database.h.".
814 (load_charset): Moved from database.c.
815 (mcharset__init): Initialize mdatabase__load_charset_func, don't
818 * character.c (mchar_define_property): Call mdatabase_find directly.
819 (mchar_get_prop): Call mdatabase_add directly.
820 (mchar_put_prop): Call mdatabase_load directly.
821 (mchar_get_prop_table): Likewise.
823 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
824 (libm17n_la_SOURCES): Remove database.[ch].
825 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
827 2007-09-18 Kenichi Handa <handa@m17n.org>
829 * face.c (mface__realize): Try Freetype based font at first.
831 * font.c: Include <ctype.h>
833 2007-09-16 Kenichi Handa <handa@m17n.org>
835 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
837 (run_otf): Call font->get_metrics, not font->get_metric.
838 (run_stages): Likewise.
839 (CHECK_FLT_COVERAGE): New macro.
840 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
841 (check_otf_spec): New function.
842 (m17n_fini_flt): Unref flt->coverage.
843 (mflt_find): Argument changed.
844 (mflt_name): New function.
845 (mflt_coverage): Use CHECK_FLT_COVERAGE.
847 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
848 (mflt_find): Prototype adjusted.
849 (mflt_name): Extern it.
851 2007-09-14 Kenichi Handa <handa@m17n.org>
853 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
855 * font-flt.c (run_otf): Make debug info printing comaptible with
857 (run_command): Likewise.
858 (mfont__flt_run): Likewise.
860 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
861 invalid only when it's negative.
863 (run_command): Likewise.
864 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
866 2007-09-10 Kenichi Handa <handa@m17n.org>
868 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
869 (struct _MFLTFont): Prototype of get_glyph_id changed.
871 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
873 (GAPPEND): Delete this macro.
874 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
875 for the change of MFLTGlyph. Caller changed.
876 (run_otf): Simply calls font->get_glyph_id.
877 (run_command): Reset g->encoded and g->measured for direct code.
878 (positioning): Delete this function.
879 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
881 2007-09-07 Kenichi Handa <handa@m17n.org>
883 * draw.c (compose_glyph_string): Improve script detection.
885 2007-09-06 Kenichi Handa <handa@m17n.org>
887 * m17n-flt.h (mflt_get): Extern it.
889 * m17n-flt.c (run_stages): Call positioning only if
890 font->get_metric is non-NULL.
891 (CHECK_FLT_STAGES): Fix typo.
892 (mflt_get): New function.
894 * font-flt.c (mfont__flt_run): Improve debug info printing.
896 2007-09-04 Kenichi Handa <handa@m17n.org>
898 * m17n-flt.c (MFontLayoutTable): Delete this type.
899 (struct _MFLT): New member mdb and coverage.
900 (list_flt): Set flt->mdb.
901 (load_generator): Argument and return value changed. Caller
903 (get_font_layout_table): Delete this function.
904 (run_stages): Argument changed. Caller changed.
905 (CHECK_FLT_STAGES): New macro.
906 (mfont__flt_encode_char): Argument changed.
907 (mflt_find): Likewise.
908 (mflt_coverage): New function.
909 (mflt_run): Argument changed.
910 (mdebug_dump_flt): Likewise.
912 * m17n-flt.h (mflt_coverage): Extern it.
913 (mflt_find): Prototype adjusted.
915 2007-09-03 Kenichi Handa <handa@m17n.org>
917 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
919 * database.c (mdatabase__props): New function.
921 * database.h (mdatabase__props): Extern it.
923 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
925 (struct _MFLTFont): Add suitable_p.
926 (mflt_find): Extern it.
928 * m17n-flt.c: Include "database.h".
929 (struct _MFLT): New struct.
930 (list_flt): New function.
931 (load_flt): Don't update flt_list.
932 (get_font_layout_table): Use flt_list.
933 (m17n_init_flt): Don't initialize flt_list.
934 (m17n_fini_flt): Adjusted for the change of flt_list.
935 (mflt_find): New function.
936 (mflt_run): Fix debug printing.
938 2007-08-23 Kenichi Handa <handa@m17n.org>
940 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
941 (run_stages): Print separator in encoded string as "|".
943 2007-08-23 Kenichi Handa <handa@m17n.org>
945 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
946 the glyph is already handled by OTF.
948 2007-08-21 Kenichi Handa <handa@m17n.org>
950 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
952 2007-08-20 Kenichi Handa <handa@m17n.org>
954 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
957 2007-08-17 Kenichi Handa <handa@m17n.org>
959 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
961 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
962 (MFLTFont): Prototype of the member drive_otf adjusted.
964 * m17n-flt.c (run_stages): Fix handling of padding.
966 * font-ft.c (get_glyph_metric): New function.
967 (DEVICE_DELTA): Return 26.6 fixed point value.
968 (adjust_anchor): Likewise.
969 (mfont__ft_drive_otf): Use get_glyph_metric.
971 * font-flt.c (mfont__flt_run): Pay attention to padding on
974 2007-08-16 Kenichi Handa <handa@m17n.org>
976 * m17n-flt.c (run_stages): Fix typo.
978 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
980 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
981 Adjusted for the argument change of adjust_anchor. Calculte based
984 2007-08-15 Kenichi Handa <handa@m17n.org>
986 * charset.c (mcharset__load_from_database): Set mdebug_flag
987 instead of mdebug_mask.
989 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
992 * database.c (load_database): Set mdebug_flag instead of
994 (mdatabase__load_for_keys): Likewise.
996 * draw.c: Include "internal-flt.h".
997 (dump_combining_code): Don't subtract 128 from combining code
1000 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
1002 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
1004 (run_cond): Likewise.
1005 (run_otf): Likewise.
1006 (run_command): Likewise.
1007 (mfont__flt_run): Change format of debug info.
1009 * font-ft.c: Include "internal-flt.h".
1010 Set mdebug_flag instead of mdebug_mask.
1011 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
1013 * input.c: Set mdebug_flag instead of mdebug_mask.
1014 (shift_state): New MDEBUG_FLAG macro.
1015 (preedit_commit): Likewise.
1018 * internal-flt.h: New file.
1020 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
1021 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
1022 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
1023 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
1024 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
1025 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
1026 these macros to internal-flt.h.
1028 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
1030 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
1031 (enum MDebugMaskBit): Delete this enum.
1032 (enum MDebugFlag): New enum.
1033 (mdebug__flag): Don't extern it.
1034 (mdebug__flags): Extern it.
1035 (MDEBUG_FLAG): New macro.
1036 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
1037 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
1038 (MDEBUG_PRINT_TIME): Likewise.
1040 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
1041 (xfont_list): Likewise.
1043 * m17n-core.c (mdebug__flag): Delete this variable.
1044 (mdebug__flags): New variable.
1045 (SET_DEBUG_FLAG): Make it a function.
1046 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
1047 (m17n_fini_core): Likewise.
1049 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
1050 (m17n_fini_win): Likewise.
1052 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
1054 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
1055 (m17n_fini): Likewise.
1057 * symbol.c (msymbol__free_table): Adjusted for the change of
1060 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
1061 (BASICHEADERS): Add m17n-flt.h.
1062 (FLT_SOURCES): New variable.
1063 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
1064 (libm17n_flt_la_LDFLAGS): Likewise.
1066 * m17n-flt.h: New file.
1068 * m17n-flt.c: New file created by modifying font-flt.c.
1070 2007-07-13 Kenichi Handa <handa@m17n.org>
1072 * Version 1.4.0 released.
1074 2007-07-12 Kenichi Handa <handa@m17n.org>
1076 * input.c: Fix doxygen @ref commands.
1078 2007-07-10 Kenichi Handa <handa@m17n.org>
1080 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
1082 2007-07-09 Kenichi Handa <handa@m17n.org>
1084 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
1086 * m17n.h: Include m17n-core.h if not yet done. Use macros
1087 M17N_BEGIN_HEADER and M17N_END_HEADER.
1089 * m17n-gui.h: Likewise.
1091 * m17n-misc.h: Likewise.
1093 2007-06-13 Kenichi Handa <handa@m17n.org>
1095 * font-flt.c (load_command): Prepend "^" in the regular expression.
1097 2007-06-11 Kenichi Handa <handa@m17n.org>
1099 * language.c (mlanguage_name_list): Fix previous change.
1101 * coding.c (mcoding__load_from_database): Add aliases in
1102 coding_definition_list.
1104 2007-06-10 Kenichi Handa <handa@m17n.org>
1106 * language.c (mlanguage_name_list): Fix previous change.
1108 2007-06-08 Kenichi Handa <handa@m17n.org>
1110 * input.c (update_candidate): Copy candidate_list earlier.
1111 (re_init_ic): Provide pseudo initialize state if none.
1113 2007-06-05 Kenichi Handa <handa@m17n.org>
1115 * input.c (preedit_insert): Print debug information.
1117 * database.c (expand_wildcard_database): New function.
1118 (mdatabase_list): Fix handling of wildcard database.
1120 * language.c (load_lang_name): New function.
1121 (mlang__fini): Cancel the last two changes.
1122 (mlanguage_name_list): New arg script and territories. Use
1125 * m17n.h (mlangauge_name_list): Adjusted.
1127 2007-06-04 Kenichi Handa <handa@m17n.org>
1129 * input.c (open_im): Check if the input method has at least one
1132 2007-06-01 Kenichi Handa <handa@m17n.org>
1134 * input.c (shift_state): Change the format of debug print.
1135 (preedit_commit): New arg need_prefix. Caller changed.
1136 (update_candidate): Copy candidate_list.
1137 (take_action_list): Likewise.
1138 (handle_key): Change the format of debug print.
1140 * font-flt.c (load_flt): Ignore unknown directives.
1142 2007-05-25 Kenichi Handa <handa@m17n.org>
1144 * m17n-core.c (mdebug__unregister_object): Small optimization.
1146 * database.c (find_file): Merged into get_database_file.
1147 (get_database_file): New arg result. Caller changed.
1148 (mdatabase__check): Fix the logic.
1150 2007-05-24 Kenichi Handa <handa@m17n.org>
1152 * database.c (find_database): If unprocessed wildcard database is
1153 found, register database filed and recursively call find_database.
1154 (free_db_info): Unref db_info->properties.
1155 (register_database): New arg properties. Delete code for
1156 initializing mdatabase__list.
1157 (register_databases_in_files): Argument changed. Caller changed.
1158 (mdatabase__update): Don't list files by glob here.
1159 (mdatabase_list): If unprocessed wildcard database is found,
1160 register database filed and recursively call mdatabase_list.
1162 * database.h (enum MDatabaseStatus): New enum
1163 MDB_STATUS_AUTO_WILDCARD.
1165 * input.c (load_branch): Fix previous change.
1166 (update_global_info): If the global database is not found, return -1.
1168 2007-05-23 Kenichi Handa <handa@m17n.org>
1170 * database.c (Mversion): New variable.
1171 (mdatabase__init): Initialize it.
1172 (register_database): New arg properties. Caller changed.
1173 (register_databases_in_files): Don't check version here.
1174 (mdatabase__update): Likewise.
1176 * database.h (MDatabaseInfo): New member properties.
1178 2007-05-21 Kenichi Handa <handa@m17n.org>
1180 * language.c: Include <ctype.h>
1181 (mlanguage__info): Use strncasecmp (not memcmp).
1182 (mlanguage_name): Downcase language name for backward
1185 * input.c (filter): Don't check Mlanguage property of
1188 2007-05-18 Kenichi Handa <handa@m17n.org>
1190 * language.c (mlanguage_name): Fix it to handle M-text English
1193 * input.c (config_command): Set NAME before using it.
1194 (load_branch): Try to resolve a map name by variables.
1196 2007-05-17 Kenichi Handa <handa@m17n.org>
1198 * language.c (mlang__fini): Fix previous change.
1200 2007-05-16 Kenichi Handa <handa@m17n.org>
1202 * plist.c (free_plist): Cancel the last change.
1203 (write_element): Check if PLIST is nested.
1204 (mplist__from_plist): Label a plist as nested if appropriate.
1205 (mplist__from_alist): Label a plist as nested.
1206 (mplist__conc): Check the value of PL before referring it. Label
1207 a plist as nested if appropriate.
1208 (mplist_copy): Label a plist as nested if appropriate.
1209 (mplist_put_func): Return Mnil if KEY is a managing key.
1210 (mplist_push): Label a plist as nested if appropriate.
1212 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
1215 * language.c (mlang__fini): Unref each element of langname_list.
1217 2007-05-14 Kenichi Handa <handa@m17n.org>
1219 * language.c: Include <string.h> and <locale.h>.
1220 (langname_list): New variable.
1221 (load_lang_script_list): Exclude invalid list elements.
1222 (mlang__init): Initialize langname_list.
1223 (mlang__fini): Unref langname_list.
1224 (mlanguage__info): Adjusted for the change of English
1225 name (symbol->M-text).
1226 (mlanguage_name): Label it as obsolete.
1227 (mlanguage_name_list): New function.
1229 * m17n.h (mlanguage_name_list): Extern it.
1231 * locale.c (make_locale): Fix setting of members of locale.
1233 * plist.c (free_plist): Unref also nested plist.
1235 2007-05-11 Kenichi Handa <handa@m17n.org>
1237 * coding.c (mconv_reset_converter): Set internal->used to 0.
1239 2007-05-08 Kenichi Handa <handa@m17n.org>
1241 * input.c (check_description): Force copying the translated text.
1243 2007-05-02 Kenichi Handa <handa@m17n.org>
1245 * input.c (minput_save_config): Unref unnecessary plist. Use
1246 free_im_list to free im_config_list.
1248 2007-04-20 Kenichi Handa <handa@m17n.org>
1250 * input.c (config_command): Fix previous change again.
1251 (config_variable): Likewise.
1252 (minput_config_command): Fix for the case of setting back to
1254 (minput_config_variable): Likewise.
1255 (minput_save_config): Include nil as documentation of customized
1258 2007-04-05 Kenichi Handa <handa@m17n.org>
1260 * input.c (config_command): Fix previous change.
1261 (config_variable): Likewise.
1263 * plist.c (mplist_get_func): Fix for backward compatiblity.
1265 2007-04-04 Kenichi Handa <handa@m17n.org>
1267 * input.c (minput_get_command, minput_config_command): Fix example
1270 2007-03-29 Kenichi Handa <handa@m17n.org>
1272 These changes are to avoid unsafe casting of a function pointer.
1274 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1275 (struct MFace): New member hook.
1277 * face.c (serialize_face): Adjusted for the change of MFace.
1278 (deserialize_face): Likewise.
1279 (mface__init): Likewise. Use msymbol_put_func.
1280 (mface__realize): Adjusted for the change of MFace. Avoid
1282 (mface_get_prop): Adjusted for the change of MFace.
1283 (mface_put_prop): Likewise.
1284 (mface_get_hook): New function.
1285 (mface_put_hook): New function.
1286 (mface_update): Adjusted for the change of MFace.
1288 * input-gui.c (win_callback): Use mplsit_get_func.
1289 (minput__win_init): Use mplsit_put_func.
1291 * input.c (take_action_list): Use mplist_get_func.
1292 (init_ic_info): Likewise.
1293 (fini_ic_info): Likewise.
1294 (minput_callback): Likewise.
1295 (minput__init): Use mplist_put_func.
1297 * language.c (mlang__init): Use msymbol_put_func.
1299 * m17n-core.h (M17NFunc): New function type.
1300 (M17N_FUNC): New macro.
1301 (msymbol_put_func, msymbol_get_func): Extern them.
1302 (mplist_put_func, mplist_get_func): Extern them.
1304 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1306 * m17n-gui.c (mframe): Add a proper casting.
1308 * plist.h (struct MPlist): Make the member val a union.
1309 (MPLIST_VAL): Adjusted for the above change.
1310 (MPLIST_FUNC): New macro.
1311 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1313 * plist.c (mplist_put_func, mplist_get_func): New functions.
1315 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1316 (msymbol_put_func, msymbol_get_func): New functions.
1318 * textprop.c (mtext_serialize): Use msymbol_get_func.
1319 (mtext_deserialize): Likewise.
1321 2007-03-28 Kenichi Handa <handa@m17n.org>
1323 * input.c (get_candidate_list): Avoid unnecessary unref.
1325 2007-03-23 Kenichi Handa <handa@m17n.org>
1327 * database.c (mdatabase__update): Unref plist at the tail.
1329 2007-03-21 Kenichi Handa <handa@m17n.org>
1331 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1333 (config_command): Fix for the case that configuration is
1335 (config_variable): Likewise.
1336 (minput_config_command): If keyseqlist is an empty list, cancel
1338 (minput_config_variable) If value is an empty list, cancel the
1340 (minput_save_config): Handle cancellation of config and customize
1343 2007-03-15 Kenichi Handa <handa@m17n.org>
1345 * input.c (minput_config_variable): Check custom->vars (not
1348 2007-03-01 Kenichi Handa <handa@m17n.org>
1350 * input.c (reload_im_info): Setup cmds, vars, and title of
1352 (check_variable_value): Fix the return value.
1354 * database.c (mdatabase__check): If necessary, update database and
1357 2007-02-28 Kenichi Handa <handa@m17n.org>
1359 * database.c (get_dir_info): Set dir_info->status to
1360 MDB_STATUS_OUTDATED.
1361 (check_version): New function.
1362 (register_database): Don't call find_database.
1363 (register_databases_in_files): Don't register a database of
1365 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1367 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1368 and MDB_STATUS_OUTDATED.
1370 * font.h (struct MFont): Types of members type, source, and
1371 spacing changed to unsigned.
1373 * internal-gui.h (struct): Types of members category and type
1374 changed to unsigned.
1376 * internal.h (struct MText): Types of members format and coverage
1377 changed to unsigned.
1379 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1380 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1382 2007-02-23 Kenichi Handa <handa@m17n.org>
1384 * input.c (Mpop): New variable.
1385 (fully_initialize): Initialize Mpop.
1386 (parse_action_list): Handle Mpop.
1387 (take_action_list): Likewise.
1388 (handle_key): When a key is unhandled, shift to the initial state
1389 only if the current state has no branch action.
1391 2007-02-12 Kenichi Handa <handa@m17n.org>
1393 * input.c (get_preceding_char): Unref mt if necessary.
1394 (get_following_char): Likewise.
1395 (parse_action_list): Fix handling of `insert' action as
1397 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1398 (take_action_list): Check invalid candidate list.
1400 2007-02-06 Kenichi Handa <handa@m17n.org>
1402 * input.c (integer_value): Check also ic->produced for @-N.
1404 2007-01-26 Kenichi Handa <handa@m17n.org>
1406 * database.c (mdatabase__update): Check mdatabase__dir_list from
1409 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1411 2007-01-12 Kenichi Handa <handa@m17n.org>
1413 * input.c (handle_key): Handle a branch action of the initial
1416 2007-01-10 Kenichi Handa <handa@m17n.org>
1418 * m17n-gd.c (gd_render): Delete superfluous line.
1420 2006-12-26 Kenichi Handa <handa@m17n.org>
1422 * m17n.h (minput_callback): Extern it.
1424 * input.h (minput__callback): Delte extern.
1426 * input.c (get_surrounding_text): Adjusted for the change of
1427 minput__callback to minput_callback.
1428 (delete_surrounding_text): Likewise.
1429 (minput_create_ic): Likewise.
1430 (minput_destroy_ic): Likewise.
1431 (minput_filter): Likewise.
1432 (minput_set_spot): Likewise.
1433 (minput_toggle): Likewise.
1434 (minput_reset_ic): Likewise.
1436 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1437 and ic->candidate_to to 0.
1438 (minput_callback): Renamed from minput__callback.
1440 * input-gui.c (win_callback): Adjusted for the change of
1441 minput__callback to minput_callback.
1443 2006-12-15 Kenichi Handa <handa@m17n.org>
1445 * font-ft.c (ft_add_font): Fix typo.
1447 2006-12-06 Kenichi Handa <handa@m17n.org>
1449 * Version 1.3.4 released.
1451 2006-11-16 Kenichi Handa <handa@m17n.org>
1453 * input.c (parse_action_list): Allow (undo 0).
1454 (adjust_markers): New function.
1455 (preedit_insert, preedit_delete): Call adjust_markers.
1456 (preedit_replace): New function.
1457 (update_candidate): Call preedit_replace instead of preedit_insert
1459 (filter): When ic_info->commit_key_head is nonzero, shift input
1460 event keys even if there's no committed text.
1462 2006-11-10 Kenichi Handa <handa@m17n.org>
1464 * input.h (MInputContextInfo): New member commit_key_head.
1466 * input.c (preedit_commit): Update ic_info->commit_key_head.
1467 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1468 (filter): When committed, shift keys by ic_info->commit_key_head.
1470 2006-10-30 Kenichi Handa <handa@m17n.org>
1472 * input.c (preedit_delete): Fix typo.
1473 (take_action_list): Print more debugging information. Allow
1474 variable in arg of 'select' and `pushback'.
1476 * database.c (gen_database_name): Don't put extra space.
1477 (load_database): Print debugging information.
1478 (register_databases_in_files): New arg headlen. Callers changed.
1479 (mdatabase__load_for_keys): Shorten debugging information.
1480 (mdatabase_load): Don't print debugging information here.
1482 2006-10-27 Kenichi Handa <handa@m17n.org>
1484 * input.c (marker_code): New arg surrounding. Callers changed.
1485 (surrounding_pos): Check if name[0] == '@'.
1486 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1487 (take_action_list): Likewise.
1488 (get_preceding_char): If POS is zero, always call
1489 get_surrounding_text.
1491 2006-10-19 Kenichi Handa <handa@m17n.org>
1493 * input.c (load_variables): Fix setting of `global'.
1495 2006-10-16 Kenichi Handa <handa@m17n.org>
1497 * draw.c (draw_background): Be sure to set *to_x.
1498 (render_glyph_string): If from == to, just return.
1500 2006-10-18 Kenichi Handa <handa@m17n.org>
1502 * database.c (get_dir_info): Return NULL if the directory name is
1504 (register_databases_in_files): Call register_database with
1506 (mdatabase__update): Fix logic. Call register_database with
1508 (mdatabase_define): Call register_database with
1509 MDB_STATUS_EXPLICIT.
1511 * input.c (delete_surrounding_text): Be sure to set members
1512 preceding_text and following_text to NULL.
1513 (shift_state): Save variable values in ic_info->vars_saved.
1514 (preedit_commit): Don't print debug information here. Don't
1515 change ic_info->keys here.
1516 (get_candidate_list): Don't ref plist.
1517 (take_action_list): Don't unref return value of
1518 get_candidate_list. For undo, reset ic->produced and recover
1519 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1521 (init_ic_info): Set ic_info->vars_saved.
1522 (fini_ic_info): Unref ic_info->vars_saved.
1523 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1525 (filter): Be sure to set members preceding_text and following_text
1526 to NULL. Print debug information about produced text. Delete
1527 processed keys from ic_info->keys.
1529 * input.h (MInputContextInfo): New member vars_saved.
1531 2006-10-16 Kenichi Handa <handa@m17n.org>
1533 * database.c (mdatabase__update): Fix the way to get db_info.
1535 2006-10-02 Kenichi Handa <handa@m17n.org>
1537 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1538 `size' changed to 24.
1540 * font.c (xlfd_unparse_name): Adjusted for the change of
1542 (font_score): Likewise.
1543 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1545 * m17n-X.c (MFontX, _MFontX): Deleted.
1546 (SET_SIZE, HAVE_SIZE): Deleted.
1547 (free_display_info): Adjusted for the change of
1548 disp_info->font_list format.
1549 (xfont_registry_list): Likewise.
1550 (xfont_open): Likewise.
1551 (xfont_list): Likewise.
1552 (xfont_encode_char): Ignore size to find a realized font.
1553 (MRealizedFontXft): Change the order of members to make it
1554 compatible with MRealizedFontFT.
1556 2006-09-27 Kenichi Handa <handa@m17n.org>
1558 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1559 (mfont_close): Add comments.
1561 * mtext-lbrk.c (mtext_line_break): Add comment.
1563 2006-09-26 Kenichi Handa <handa@m17n.org>
1565 * input.c (minput_get_description): Handle description about
1566 inclusion-only input methods.
1568 2006-09-21 Kenichi Handa <handa@m17n.org>
1570 * input.c (M_gettext): New variable.
1571 (fully_initialize): Initialize M_gettext.
1572 (check_description): New function.
1573 (load_commands): Call check_description.
1574 (config_all_commands): Be sure to unref pl.
1575 (load_variables): Call check_description.
1576 (config_all_variables): Be sure to unref pl.
1577 (load_im_info): Call check_description.
1579 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1581 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1582 and bind_textdomain_codeset.
1584 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1586 2006-09-15 Kenichi Handa <handa@m17n.org>
1588 * input.c (reload_im_info): Update custom and global info.
1589 (init_ic_info): Fix previous change.
1591 2006-09-14 Kenichi Handa <handa@m17n.org>
1593 * database.c: Include <libgen.h>.
1594 (mdatabase__lock): Make a directory if necessary.
1596 * input.c (resolve_command): Adjusted for the format change of
1597 configured_cmds member.
1598 (load_commands, load_variables): Fix for errornous data handling.
1599 (config_command, config_variable): New function.
1600 (config_all_commands, config_all_variables): Renamed from
1601 config_commands and config_variables. Utilize the above function.
1602 (check_variable_value): Argument changed. Callers changed.
1603 (load_im_info): Call config_all_commands and config_all_variables.
1604 (init_ic_info): Adjusted for the format change of configured_vars
1606 (minput__init): Initialize Mcustomized, Mconfigured, and
1608 (Mcustomized, Mconfigured, Minherited): New variables.
1609 (minput_get_command): Be sure to return NULL if an input method
1610 use no local command.
1611 (minput_get_variable): Be sure to return NULL if an input method
1612 use no local variable.
1613 (minput_config_command, minput_config_variable)
1614 (minput_save_config): Adjusted for the format change of
1615 configured_cmds and configured_vars members.
1617 * plist.c (write_element): Delete superfluous ':'.
1619 2006-09-13 Kenichi Handa <handa@m17n.org>
1621 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1622 (minput_config_file): Extern it.
1624 * draw.c (Minherited): Declaration moved to input.c.
1625 (mdraw__init): Don't initialize Minherited here.
1627 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1629 2006-09-07 Kenichi Handa <handa@m17n.org>
1631 * textprop.c (mtext_serialize): Call mplist__serialize with the
1634 * plist.h (mplist__serialize): Prototype adjusted.
1635 (mplist__assq): Extern it.
1637 * plist.c: Include <ctype.h>
1638 (PUTC, PUTS): New macros.
1639 (write_symbol): New function.
1640 (write_element): New arg indent.
1641 (dump_string, dump_plist_element): Delete them.
1642 (mplist__from_string): New arg pretty.
1643 (mplist__assq): New function.
1644 (mdebug_dump_plist): Use write_element.
1646 * mtext.c (mtext_cat_char): Allocate more memory.
1647 (mdebug_dump_mtext): Don't escal a newline character.
1649 * m17n.h (minput_get_command, minput_get_variable)
1650 (minput_config_command, minput_config_variable)
1651 (minput_save_config): Extern them.
1653 * m17n-core.c: Include <string.h>.
1654 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1655 use the stream stdout instead of a file of that name.
1657 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1660 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1661 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1662 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1663 (MDEBUG_DUMP): Flush the stream.
1665 * input.h (struct _MInputMethodInfo): Delete member im. New
1666 members mdb, language, name, extra, cmds, configured_cmds,
1667 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1668 (MInputContextInfo): New member tick.
1670 * input.c: Big change to improve user-side input method
1671 customization. Here, list just public API changes.
1672 (minput_get_commands, minput_get_variables)
1673 (minput_assign_command_keys, minput_set_variable): Label them
1675 (minput_get_command, minput_get_variable)
1676 (minput_config_command, minput_config_variable)
1677 (minput_save_config): New functions.
1679 * database.h (PATH_MAX): Define it if not yet defined.
1680 (PATH_SEPARATOR): Likewise.
1681 (enum MDatabaseStatus): New enum.
1682 (struct MDatabaseInfo): Moved from database.c. New members status,
1683 time, lock_file, and uniq_file.
1684 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1685 (mdatabase__unlock): Extern them.
1687 * database.c: Include <time.h>.
1688 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1689 (GEN_PATH): Args changed. Callers changed.
1690 (struct MDatabaseInfo): Moved to database.h.
1691 (struct MDatabase, mdb_list): Deleted.
1692 (mdatabase__list): New var.
1693 (get_database_filename): Deleted. Callers changed to use
1695 (find_file, get_database_file): New files.
1696 (get_dir_info): Initialize new members of MDatabaseInfo.
1697 (find_database): Arg chagnded. Callers changed.
1698 (free_db_info, register_database, register_databases_in_files):
1700 (update_database_list): Deleted.
1701 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1702 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1703 (mdatabase__update): New function.
1704 (mdatabase__check): Return value changed.
1705 (mdatabase__file, mdatabase__lock, mdatabase__save)
1706 (mdatabase__unlock): New functions.
1708 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1710 * input.c (get_surrounding_text): Return -2 when surrounding text
1712 (get_following_char): Likewise.
1713 (get_preceding_char): Likewise.
1714 (minput__callback): Return 0 if there is a callback function,
1717 2006-08-17 Kenichi Handa <handa@m17n.org>
1719 * input.c (reset_ic): Use shift_state to setup the current state.
1721 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1723 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1724 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1725 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1727 2006-08-02 Kenichi Handa <handa@m17n.org>
1729 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1731 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1733 * font-ft.c (ft_encapsulate): Add code for debugging.
1734 (mfont__ft_drive_otf): Be sure to encode character before getting
1737 2006-07-21 Kenichi Handa <handa@m17n.org>
1739 * draw.c (mdraw_text_extents): Fix previous typo.
1741 2006-07-19 Kenichi Handa <handa@m17n.org>
1743 * draw.c (gstring_width): New arg lbearing.
1744 (render_glyph_string): Adjusted for the change of gstring_width.
1745 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1747 * m17n-core.h (Mlanguage): Extern it.
1749 * m17n.h (Mlanguage): Extern deleted.
1751 * mtext.c (mtext__init): Initialize Mlanguage.
1752 (Mlanguage): Declaration moved from locale.c
1754 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1755 (Mlanguage): Declaration moved to mtext.c.
1757 * language.c (mlang__init): Don't initialize Mlanguage here.
1759 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1761 2006-07-14 Kenichi Handa <handa@m17n.org>
1763 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1764 (MRealizedFontFT): New member face_encapsulated.
1765 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1766 (ft_gen_font): New function.
1767 (ft_add_font): Use ft_gen_font.
1768 (ft_list_script): Store lists in ft_script_list.
1769 (ft_check_otf): New arg ft_face. Caller changed.
1770 (ft_check_language): Likewise.
1771 (ft_check_script): Likewise.
1772 (ft_encapsulate, ft_close): New functions.
1773 (mfont__ft_driver): Initialize members encapsulate and close.
1774 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1776 * font.h (struct MRealizedFont): New member encapsulating.
1777 (struct MFontDriver): New members encapsulate and close.
1779 * font.c (mfont__match_p): If FONT is realized, check capability
1780 by font drivers's check_capability method.
1781 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1784 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1785 declarations of foundry and fam local vars.
1786 (xft_driver): Make it static.
1788 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1789 (mfont_close): Extern them.
1791 * m17n-gd.c (device_open): Don't specify foundry and family of the
1794 2006-07-11 Kenichi Handa <handa@m17n.org>
1796 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1798 2006-07-13 Kenichi Handa <handa@m17n.org>
1800 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1802 (ft_check_script): Delete unused var.
1803 (ft_list_capability): Likewise.
1805 * font.c (mfont__get_capability): Setup cap->otf.
1806 (Motf): Make it global.
1807 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1809 * font.h (MFontCapability): New member otf.
1811 * language.c (mlang__fini): Delete unused vars.
1813 * m17n-gui.h (Motf): Extern it.
1815 * database.c (update_database_list): Delete unused vars.
1817 2006-07-07 Kenichi Handa <handa@m17n.org>
1819 * font-ft.c (DEVICE_DELTA): Fix typo.
1821 2006-07-06 Kenichi Handa <handa@m17n.org>
1823 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1826 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1828 * database.c: Update comments.
1830 2006-07-05 Kenichi Handa <handa@m17n.org>
1832 * database.c (PATH_MAX): Define it if not yet defined.
1833 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1835 (get_database_filename): Use GEN_PATH.
1836 (get_dir_info): Don't include the last '/' in directory name.
1837 (register_database): New function.
1838 (update_database_list): Use register_database. Search all
1839 directories in mdatabase__dir_list for wildcard databases.
1840 (mdatabase__init): Check "~/.m17n.d".
1842 2006-07-03 Kenichi Handa <handa@m17n.org>
1844 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1845 push reverse property.
1847 * plist.c (dump_plist_element): Fix previous change.
1849 2006-06-28 Kenichi Handa <handa@m17n.org>
1851 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1854 * draw.c (MbidiNSM): New variable.
1855 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1856 attention to bidi type NSM.
1857 (mdraw__init): Initialize MbibiNSM.
1859 * language.c (mscript__char_list): Fix finding a char-list element.
1861 * plist.c (dump_string): Return number of printed characters.
1862 (dump_plist_element): Print elements more compactly.
1864 2006-06-23 Kenichi Handa <handa@m17n.org>
1866 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1867 (include_HEADERS): Likewise.
1869 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1871 * language.c: Update documentation.
1873 2006-06-23 Kenichi Handa <handa@m17n.org>
1875 * font-ft.c (struct MFontFT): Delete member lang.
1876 (free_ft_info): Don't unref member lang. Destroy members langset
1878 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1879 changed. Set members langset and charset.
1880 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1882 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1884 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1885 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1886 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1887 characters at first. If it fails, try listing by language names.
1888 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1889 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1890 change of MFontCapability.
1891 (ft_list_capability): Likewise. Try listing by languages, then by
1892 scripts. Check OTF at last.
1893 (ft_check_script): New function.
1894 (ft_select): Adjusted for the check of MFontCapability.
1895 (ft_list_family_names): New function.
1896 (ft_check_capability): If cap->script is not Mnil, call
1898 (mfont__ft_driver): Initialize with ft_list_family_names.
1900 * font.h (struct MFontDriver): New member list_fmaily_names.
1901 (struct): Change member "MSymbol *lang" to "MSymbol language".
1903 * font.c: Include "language.h".
1904 (Motf): New variable.
1905 (otf_script_list, load_otf_script_list): Delete it.
1906 (find_script_from_otf_tag): Delete it.
1907 (merge_capability): New function.
1908 (mfont__init): Init Motf.
1909 (mfont__fini): Don't unref otf_script_list.
1910 (free_font_capability): Check cap->script_tag to determine if
1911 OTF-related capability is set.
1912 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1913 the change of type MFontCapability.
1914 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1915 and Motf properties.
1916 (mfont_list): Call merge_capability for LANGUAGE arg.
1917 (mfont_list_family_names): New function.
1919 * input-gui.c: Typo in comments fixed.
1921 * input.c: Typo in comments fixed.
1923 * language.h (mlanguage__list): Delete it.
1924 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1927 * language.c: Include "mtext.h".
1928 (M_script_lang_list): Delete it.
1929 (language_list, script_list): New variables.
1930 (load_lang_script_list, init_language_list, init_script_list): New
1932 (mlang__init): Don't load language database here.
1933 (mlang__fini): Unref language_list and script_list if not NULL.
1934 (mlanguage__list): Delete it.
1935 (mlanguage__info, mscript__info, mscript__char_list)
1936 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1937 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1938 (mscript_list, mscript_language_list): New functions.
1940 * m17n-gui.h (mfont_list_family_names): Extern it.
1942 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1943 (mlanguage_text, mscript_list, mscript_language_list): Extern
1946 2006-06-21 Kenichi Handa <handa@m17n.org>
1948 * m17n-X.c (xfont_driver): Initialize with
1949 xfont_list_family_names.
1950 (xfont_list_family_names): New function.
1951 (xft_driver): Initialize with NULL for list_family_names member.
1952 (device_init): Set list_family_names member of xft_driver to that
1953 of mfont__ft_driver.
1955 2006-06-06 Kenichi Handa <handa@m17n.org>
1957 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1959 2006-03-24 Kenichi Handa <handa@m17n.org>
1961 * font-ft.c (ft_open): Improve debug message.
1963 * fontset.c (mfontset__get_font): Fix for the case that no font in
1964 per_script list is available.
1966 2006-02-06 Kenichi Handa <handa@m17n.org>
1968 * Version 1.3.3 released.
1970 2006-02-22 Kenichi Handa <handa@m17n.org>
1972 * textprop.c: Fix some typos in documentation.
1974 * plist.c: Fix some typos in documentation.
1976 * m17n-core.h: Fix some typos in documentation.
1977 (M17NLIB_PATCH_LEVEL): Updated to 3.
1978 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1980 * symbol.c: Fix some typos in documentation.
1982 * mtext.c: Fix some typos in documentation.
1984 * input.c: Fix several typos in documentation.
1986 2006-02-06 Kenichi Handa <handa@m17n.org>
1988 * Version 1.3.2 released.
1990 2006-02-03 Kenichi Handa <handa@m17n.org>
1992 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1993 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1995 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1997 * draw.c (layout_glyphs): Fix handling left_padding of
2000 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
2002 2006-02-02 Kenichi Handa <handa@m17n.org>
2004 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
2005 if WITH_GUI is true.
2007 2006-01-25 Kenichi Handa <handa@m17n.org>
2009 * input.c (resolve_expression): If the value of PLIST is a plist,
2010 but the first element is not symbol, return 0.
2012 2006-01-17 Kenichi Handa <handa@m17n.org>
2014 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
2015 HAVE_GD is 2 or the greater.
2017 2006-01-16 Kenichi Handa <handa@m17n.org>
2019 * Version 1.3.1 released.
2021 2006-01-16 Kenichi Handa <handa@m17n.org>
2023 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
2024 simulating anti-aliasing.
2026 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
2027 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
2029 2006-01-12 Kenichi Handa <handa@m17n.org>
2031 * input.c (get_surrounding_text): Always pop ic->plist.
2032 (reset_ic): Don't reset ic->plist.
2034 2006-01-10 Kenichi Handa <handa@m17n.org>
2036 * input.c (preedit_commit): For debugging, print only commiting
2037 charactes. Don't set ic->candidate_show to 0.
2038 (handle_key): Don't run branch-actions just by shifting to the
2040 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
2041 Reset vars and plist.
2043 2006-01-07 Kenichi Handa <handa@m17n.org>
2045 * input.c (load_branch): Confirm that maps is not NULL.
2047 2006-01-05 Kenichi Handa <handa@m17n.org>
2049 * input-gui.c (win_filter): Try to convert arg to key only when
2052 * plist.c (read_integer_element): If '#' and '-' are followed by
2053 non-integer-constituent, read them as a part of a symbol.
2054 (read_symbol_element): New arg C.
2055 (read_element): Adjust args to read_symbol_element.
2057 * input.c (load_macros): On overwriting a macro, free the old
2059 (minput__init): Store Mmap in load_im_info_keys.
2060 (minput_get_title_icon): If the input method has no title, be sure
2062 (minput_get_description): If the input method has no description,
2063 be sure to return NULL.
2064 (minput_get_variables): Fix documentation.
2065 (handle_key): Pay attention to the case that key is Mnil.
2066 (filter): Likewise. Fix handling of such symbol as S-A.
2068 2005-12-22 Kenichi Handa <handa@m17n.org>
2070 * Version 1.3.0 released.
2072 2005-12-22 Kenichi Handa <handa@m17n.org>
2074 * font-ft.c (ft_list): If the specified font has no property,
2077 2005-12-20 Kenichi Handa <handa@m17n.org>
2079 * character.c (mchar_get_prop): Check char_prop_list.
2080 (mchar_put_prop, mchar_get_prop_table): Likewise.
2082 2005-12-18 Kenichi Handa <handa@m17n.org>
2084 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
2085 file name sans language.
2087 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
2089 * input.c: Fix typo in comments.
2091 2005-12-14 Kenichi Handa <handa@m17n.org>
2093 * input.c (minput_get_title_icon): Check the default icon for the
2096 2005-12-13 Kenichi Handa <handa@m17n.org>
2098 * input.c (Mless_equal, Mgreater_equal): New variables.
2099 (parse_expression, resolve_expression, parse_action_list)
2100 (take_action_list): Handle the aboves.
2101 (filter): Treat key S-X as X.
2102 (minput__init): Initialize Mless_equal and Mgreater_equal.
2103 (minput_get_title_icon): New function.
2105 * m17n.h (minput_get_title_icon): Extern it.
2107 * database.c (get_database_filename): Return a filename instead of
2109 (load_database): Adjusted for the above change.
2110 (mdatabase__load_for_keys): Likewise.
2111 (mdatabase__find_file): New function.
2113 * database.h (mdatabase__find_file): Extern it.
2115 * font.h (mfont__resize): Delete extern.
2117 * font.c (mfont__list): Check resize ratio.
2118 (mfont__resize): Delete it.
2119 (mfont_resize_ratio): Include the code of mfont__resize.
2121 * font-ft.c (ft_open): Check resize ratio.
2123 * m17n-X.c (xfont_open): Check resize ratio.
2124 (xft_open): Likewise.
2126 2005-12-07 Kenichi Handa <handa@m17n.org>
2128 * input.c (take_action_list): If take_action_list return -1,
2130 (handle_key): Likewise.
2132 * face.c (mface__for_chars): When font is specified and layouter
2133 is found for it, if the layouter doesn't support one of a
2134 character, use a face sans layouter for it.
2136 2005-12-06 Kenichi Handa <handa@m17n.org>
2138 * fontset.c (mfont__lookup_fontset): If only a fallback font is
2139 found, don't use it for more than one character.
2141 2005-12-05 Kenichi Handa <handa@m17n.org>
2143 * face.c (mface__realize): Set rfont->layouter to Mnil.
2144 (mface__for_chars): Fix handling of layouter.
2146 * character.h (mchar__define_prop): Extern it.
2148 * database.c (update_database_list): Call mchar__define_prop if
2151 * character.c (mchar__init): Don't call mchar_define_property.
2152 Instead just initialize property keys.
2153 (mchar__fini): Free char_prop_list only if it's not NULL.
2154 (mchar__define_prop): New function.
2155 (mchar_define_property): Call mchar__define_prop.
2157 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
2160 2005-12-02 Kenichi Handa <handa@m17n.org>
2162 * language.c (mlang__init): Handle extra chars.
2164 * m17n-gui.h (mfont_check): Adjust prototype.
2166 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
2167 (xfont_check_capability): New function.
2168 (xft_driver): Specify xft_check_capability.
2169 (xft_check_capability): New function.
2171 * font-ft.c (M0_3): Delete it.
2173 (ft_get_charmaps): Refer to M0.
2174 (fc_parse_pattern): Fix previous change.
2175 (ft_list_language): Check also extra chars.
2176 (ft_check_otf): Define it even if HAVE_OTF is undef.
2177 (ft_check_lang): Check the result of FcLangSetHasLang against
2178 FcLangDifferentLang. Check also extra chars.
2179 (ft_list_capability): Delete ifdef HAVE_OTF.
2180 (ft_select): Likewise.
2181 (ft_open): Improve debug information.
2182 (ft_check_capability): New function.
2183 (mfont__ft_driver): Specify ft_check_capability.
2184 (mfont__ft_init): Initialize M0.
2186 * fontset.c (get_font_from_group): New function.
2187 (mfontset__get_font): New function.
2189 * fontset.h (mfontset__get_font): Extern it.
2191 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
2192 (mfont__fini): Delete ifdef HAVE_OTF.
2193 (free_font_capability): Likewise.
2194 (mfont__get_capability): Likewise.
2195 (mfont__check_capability): New function.
2196 (mfont_check): Change the order of arguments. Use
2199 * font.h (struct MFontDriver): New member check_capability.
2200 (MFontCapability): Delete ifdef HAVE_OTF.
2201 (mfont__check_capability): Extern it.
2203 * face.c (mface__realize): Fix handling of FONT arg.
2204 (mface__for_chars): Fix handling of explicitly specified font.
2206 2005-11-25 Kenichi Handa <handa@m17n.org>
2208 * font-flt.c (run_command): Print debug info for
2211 * draw.c (layout_glyphs): Fix handling of left/right_padding.
2213 * face.c (mface__for_chars): Check rfont before accessing the
2216 2005-11-21 Kenichi Handa <handa@m17n.org>
2218 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
2221 * fontset.c (fontset_table): New variable.
2222 (free_fontset): Call M17N_OBJECT_UNREGISTER.
2223 (mfont__fontset_init): Add fontset_table as an object array.
2224 (mfont__realize_fontset): Ref FONTSET.
2225 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2226 (mfontset): Call M17N_OBJECT_REGISTER.
2227 (mfontset_copy): Likewise.
2229 * input.c (handle_key): For debugging, print information about
2231 (filter): Add an alias for Meta and Alt modifiers.
2232 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2234 (minput__init): Initialize them.
2235 (parse_expression): New function.
2236 (resolve_expression): New function.
2237 (parse_action_list): Handle expressions by parse_expression.
2238 (take_action_list): Handle expressions by resolve_expression.
2239 (parse_nested_list_value): Fix previous change.
2240 (resolve_command): Fix handling of the return value of
2243 2005-11-18 Kenichi Handa <handa@m17n.org>
2245 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2246 HAVE_OTF is defined.
2247 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2249 (ft_select): Likewise.
2251 * font.c (mfont_list): Fix for the case that FONT is NULL.
2252 (OTF_tag): Delete it.
2253 (load_otf_script_list): Define only when HAVE_OTF is defined.
2254 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2257 * draw.c (truncate_gstring): Be sure to truncate at
2258 glapheme-cluster boundary.
2260 2005-11-11 Kenichi Handa <handa@m17n.org>
2262 * input.c (delete_surrounding_text): Clear cache if necessary.
2264 2005-11-09 Kenichi Handa <handa@m17n.org>
2266 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2267 glyph prev is also supported by the current flt.
2269 2005-11-08 Kenichi Handa <handa@m17n.org>
2271 * m17n-X.c (xft_render): Cancel previous change.
2273 2005-11-07 Kenichi Handa <handa@m17n.org>
2275 * input.c: Include <stdlib.h>.
2276 (get_surrounding_text, delete_surrounding_text)
2277 (get_preceding_char, get_following_char): New functions.
2278 (integer_value): New arg surrounding. If it is nonzero, try to
2279 get a surrounding character. Callers changed.
2280 (take_action_list): Check `value' before setting an element.
2281 (destroy_ic): Unref ic_info->preceding_text and
2282 ic_info->following_text.
2283 (minput__init): Initialize Minput_get_surrounding_text and
2284 Minput_delete_surrounding_text.
2285 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2287 (filter): Unref ic_info->preceding_text and
2288 ic_info->following_text.
2290 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2293 * input.h (MInputContextInfo): New members preceding_text and
2296 2005-11-04 Kenichi Handa <handa@m17n.org>
2298 * input.c (parse_nested_list_value): Fix handling of the global
2300 (get_nested_list): Get global definitions by load_partial_im_info.
2301 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2302 MInputCandidatesChanged.
2303 (take_action_list): Likewise.
2304 (reset_ic): Likewise.
2305 (create_ic): Don't pay special attention to
2306 Mcandidates_group_size.
2307 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2308 (minput_set_variable): Get a definition of varible by
2309 mplist_find_by_value, not mplist_get.
2311 * m17n.h (enum MInputCandidatesChanged): New enum.
2313 2005-11-01 Kenichi Handa <handa@m17n.org>
2315 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2317 (mwin__destroy_window): If xft_draw's drawable is win, change it
2318 to device->drawable before destroying win.
2320 2005-10-31 Kenichi Handa <handa@m17n.org>
2322 * input.c (load_im_info): Fix adding of state.
2324 * m17n-core.c (m17n_fini_core): Fix reporting of module
2327 * m17n.c (m17n_fini): Fix reporting of module finalization.
2329 * m17n-gui.c (m17n_init_win): Fix reporting of module
2332 2005-10-29 Kenichi Handa <handa@m17n.org>
2334 * input.c (get_candidate_list): Fix the timing of referring plist.
2336 2005-10-28 Kenichi Handa <handa@m17n.org>
2338 * input.c (load_branch): Ignore an undefined map name.
2339 (load_im_info): Set im_info->title from `name' only if it's not
2341 (shift_state): Always update ic->status.
2342 (adjust_candidates): Renamed from adjust_candidate_command.
2343 Argument changed. Caller changed.
2344 (get_candidate_list, regularize_action): New functions.
2345 (take_action_list): Use them. On handling Munhandle, don't set
2347 (handle_key): If KEY is not handled by MAP, and MAP has
2348 branch_actions, perform them.
2350 * database.c (mdatabase__fini): Free dir_info->filename;
2352 2005-10-20 Kenichi Handa <handa@m17n.org>
2354 * input.c (marker_code): Accept '@@'.
2355 (integer_value): Handle '@@'.
2356 (parse_action_list): Accept a symbol argument.
2357 (take_action_list): Resolve the symbol argument. Handle the
2360 2005-10-18 Kenichi Handa <handa@m17n.org>
2362 * input.c: Include "charset.h".
2363 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2365 (MIMState): New member (M17NObject control).
2366 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2367 (get_nested_list, resolve_variable): New functions.
2368 (integer_value): New arg (MPlist **value). Set it to the plist
2369 element containing the value.
2370 (resolve_command): New function.
2371 (load_translation): New arg (MPlist *map_actions).
2372 (load_branch): New args language and name. If `keylist' is a
2373 symbol, resolved that as a command name.
2374 (free_map): New arg top. Free map->map_actions only if top is
2376 (free_state): New function.
2377 (load_state): New arg name.
2378 (im_info_list): New variable.
2379 (free_im_info, get_im_info_by_tags): New functions.
2380 (load_im_info): Arg key changed to plist. Handle `include'.
2381 Return (MInputMethodInfo *).
2382 (preedit_commit): Ref ic->candidate_list.
2383 (get_select_charset, adjust_candidate_command): New functions.
2384 (take_action_list): Handle `include'. Adjust candidate action
2385 properly. Handle control variables `candidates-charset' and
2386 `candidates-group-size'.
2387 (open_im): Use get_im_info.
2388 (create_ic): Get global variables.
2389 (load_partial_im_info): New function.
2390 (get_im_info): New function.
2391 (check_command_keyseq, check_command_list, check_variable_list):
2393 (minput__init): Don't handle M_database_hook and Mdetail_text.
2394 Initialize M_candidates, Mcandidates_group_size,
2395 Mcandidates_charset.
2396 (parse_variable_list, get_variable_list, parse_command_list)
2397 (get_command_list): Delete them.
2398 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2399 (minput__fini): Simply unref command_list and variable_list.
2400 (minput_get_description): Adjusted for the new form of description.
2401 (minput_get_commands): Use get_nested_list.
2402 (minput_assign_command_keys): Likewise.
2403 (minput_get_variables, minput_set_variable): Likewise.
2405 * input.h (MInputMethodInfo): New members im and maps.
2407 * database.h (M_database_hook): Delete extern.
2408 (MDatabaseHookFunc): Delete extern.
2409 (mdatabase__check): Extern it.
2411 * database.c: Include <glob.h>.
2412 (MAX_TIME): New macro.
2413 (Masterisk): New variable.
2414 (get_database_stream): Argument changed to (MDatabaseInfo *).
2416 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2417 (find_database): New function.
2418 (update_database_list): New function.
2419 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2420 calling update_database_list.
2421 (mdatabase__check): New function.
2422 (mdatabase_find): Use update_database and find_database. Don't
2423 handle MDatabaseHookFunc.
2424 (mdatabase_list): Call update_database at first.
2425 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2426 (MDatabaseList): New type.
2428 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2430 * m17n.h (Mdetail_text): Delete extern.
2432 * m17n-core.h (mplist_conc): Delete extern.
2434 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2436 (mplist_conc): Renamed to mplist__conc.
2437 (mplist__pop_unref): New function.
2439 2005-10-14 Kenichi Handa <handa@m17n.org>
2441 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2443 (read_element): If keys is an empty plist, return any element
2445 (dump_plist_element): Check if plist is nested.
2446 (mplist_conc): Always ref tail.
2447 (mplist_set): If key is a managing key, ref val in advance.
2449 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2450 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2451 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2454 * fontset.c (free_fontset): Unref fontset_list if necessary.
2455 (mfont__fontset_fini): Don't free fontset_list. Unref
2457 (mfont__realize_fontset): Initialize request.
2458 (mfontset): Ref default_fontset or fontset only if necessary.
2459 (mfontset_copy): Don't ref copy.
2461 * draw.c (render_glyphs): Check gend->type before checking
2464 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2465 unrefed plists to NULL.
2467 2005-10-04 Kenichi Handa <handa@m17n.org>
2469 * textprop.c (mtext_serialize): Be sure to make mt
2470 MTEXT_FORMAT_UTF_8 and NULL terminated.
2472 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2474 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2476 2005-10-03 Kenichi Handa <handa@m17n.org>
2478 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2479 is not at the beginning of line.
2481 2005-09-22 Kenichi Handa <handa@m17n.org>
2483 * input.c: Include <sys/stat.h> and <unistd.h>.
2484 (Minclude, Mcommit, Munhandle): New variables.
2485 (minput__init): Initialize them. Push only Mstate to
2486 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2487 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2489 (load_input_method): Handle "include" directive. If no states are
2491 (shift_state): If state_name is Mt, shift back to the previous
2492 state. Call preedit_commit to commit preedit text.
2493 (preedit_commit): New function.
2494 (take_action_list): Improve debug printing. Handle commit and
2496 (handle_key): Check the return value of take_action_list. Don't
2497 take branch_actions just after changing to the root map.
2498 (reset_ic): Reset all ic_info members.
2499 (filter): When a key is not handled, just move ic_info->keys
2500 instead fo calling reset_ic.
2501 (load_im_info): If key is not Mstate, push Mmap to
2503 (MDatabaseStatList): New type.
2504 (imdir_stat_list): New variable.
2505 (input_method_hook): Don't cancel the hook. Check the
2506 modification time of directories.
2507 (minput__fini): Free imdir_stat_list;
2509 * input.h (MInputContextInfo): New member prev_state.
2511 * m17n-core.h (mplist_conc): Extern it.
2513 * plist.c (mplist_conc): New function.
2515 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2517 * font.h (MRealizedFont): New member average_width.
2519 * font-ft.c (ft_open): Set rface->average_width.
2521 * font.c (xlfd_unparse_name): Print '*' before registry name.
2523 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2524 (xfont_open): Set rfont->average_width.
2525 (xft_open): Likewise.
2526 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2528 * internal-gui.h (struct MFrame): New member average_width.
2530 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2531 (mframe_get_prop): Return the average_width of a font.
2533 * face.c (mface__realize): Set rface->average_width.
2534 (mface__update_frame_face): Set frame->average_width.
2536 * face.h (MRealizedFace): New member average_width.
2538 2005-09-19 Kenichi Handa <handa@m17n.org>
2540 * font.c (xlfd_unparse_name): New arg full_xlfd.
2541 (mfont__encode_char): Use shortcut only for X core fonts.
2542 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2543 (mfont_put_prop): Handle `language' property.
2544 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2545 Print file can capability info too.
2547 * m17n-core.c (mdebug__output): New variable.
2548 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2549 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2550 (m17n_fini_core): Close mdebug__output if it's not stderr.
2552 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2553 (xfont_open): Handle baseline_offset.
2554 (xfont_find_metric): Likewise.
2555 (xfont_render): Likewise.
2556 (xft_open): Likewise.
2557 (xft_render): Likewise.
2559 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2560 (mdebug__output): Extern it.
2561 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2562 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2563 (MDEBUG_DUMP): New macro.
2564 (MDEBUG_PRINT_TIME): Print to medebug__output.
2566 * font.h (MRealizedFont): New member baseline_offset.
2568 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2570 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2571 (ft_list_family): Check alias.
2572 (ft_list_language): If language is "en", don't try to the second
2574 (ft_default_list): New variable.
2575 (ft_list_default): New function.
2576 (ft_select): If family is not specified, try only the default
2577 fonts. Treat the weights normal and medium same.
2578 (ft_open): Fix debug message. If registry is not specified, try
2579 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2580 (ft_find_metric): Likewise.
2581 (ft_render): Likewise.
2582 (ft_list): Fix debug message. Accept the registring iso8859-1.
2583 If family is not specified, try only the default fonts.
2585 * face.c (mface__realize): Fix logic of opening a font.
2587 2005-09-16 Kenichi Handa <handa@m17n.org>
2589 * face.c (mface__realize):
2591 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2594 * input.c (shift_state): Fix the condition of taking init actions.
2595 (take_action_list): Fix handling of pushback action.
2596 (handle_key): Don't change key while checking its alias.
2597 (minput__init): Initialize new variables.
2598 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2601 2005-09-12 Kenichi Handa <handa@m17n.org>
2603 * mtext.c (mtext__uppercase): Add proper open/close parens.
2604 (mtext_titlecase): Add proper casting.
2606 * input.c (parse_action_list): Handle the case that the arg is a
2607 key sequence (MText or MPlist).
2608 (take_action_list): Likewise.
2609 (shift_state): Shorter debug message.
2610 (handle_key): Terminate a debug message by "\n".
2611 (reset_ic): Don't take initial actions here.
2612 (minput_open_im): Print a debug message.
2613 (minput_close_im): Likewise.
2614 (minput_create_ic): Likewise.
2615 (minput_destroy_ic): Likewise.
2617 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2619 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2622 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2623 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2626 * character.c: Add Japanese documentation for
2627 mchar_get_prop_table ().
2629 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2631 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2632 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2633 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2635 (init_case_conversion): New function.
2636 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2637 (uppercase_precheck, lowercase_precheck, final_sigma)
2638 (after_soft_dotted, more_above, before_dot, after_i)
2639 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2641 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2643 * plist.c (read_mtext_element): Fix previous change.
2645 2005-09-05 Kenichi Handa <handa@m17n.org>
2647 * plist.c (read_mtext_element): Handle \uXXXX notation.
2649 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2650 (MTABLE_ALLOCA): Change the name of local variable.
2652 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2653 HAVE_FREETYPE are defined.
2655 * m17n-X.c: Check HAVE_X11.
2657 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2658 directory listing libraries.
2659 (noinst_PROGRAMS): Define it only in maintainer mode.
2661 2005-09-02 Kenichi Handa <handa@m17n.org>
2663 * m17n-gui.h (mdraw_line_break_option): Extern it.
2665 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2666 end of the first glyph.
2667 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2669 (mdraw_line_break_option): New variable.
2670 (mdraw_default_line_break): Use mtext_line_break.
2672 * mtext.h (wordseg_func_table): Don't extern it.
2673 (mtext__wseg_fini): Extern it.
2675 * mtext.c: Don't include word-thai.h.
2676 (wordseg_func_table): Delete this variable.
2677 (mtext__init): Don't initialize above. Don't call
2678 mtext__word_thai_init.
2679 (mtext__fini): Don't free wordseg_func_table. Call
2680 mtext__wseg_fini instead fo mtext__word_thai_fini.
2681 (MTextWordsegFunc): Don't typedef it.
2682 (mtext__word_segment): Moved to mtext-wseg.c.
2684 * m17n-core.h (enum MTextLineBreakOption): New enum.
2685 (mtext_line_break): Extern it.
2687 * mtext-wseg.c: New file.
2689 * mtext-lbrk.c: New file.
2691 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2692 add mtext-lbrk.c and mtext-wseg.c.
2694 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2695 the case that head is NULL.
2697 2005-09-01 Kenichi Handa <handa@m17n.org>
2699 * word-thai.c (wordseg_propertize): If the property value is nil,
2700 don't make the property no-merge.
2701 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2702 attention to the case that they are NULL.
2703 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2706 * character.c (mchar_get_prop_table): New function.
2708 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2710 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2711 (mchar_get_prop_table): Extern it.
2713 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2714 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2716 * internal.h (enum MTextCoverage): New enum.
2717 (MText): New member coverage.
2719 * mtext.c (FORMAT_COVERAGE): New macro.
2720 (insert): Copy mt2->coverage.
2721 (mtext__from_data): Initialize mt->coverage.
2722 (mtext__adjust_format): Update mt->coverage.
2723 (mtext): Initialize mt->coverage.
2724 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2725 Update mt->coverage if necessary.
2726 (mtext_duplicate): Copy mt->coverage.
2727 (mtext_insert, mtext_replace): New functions.
2728 (mtext_dup): Use mtext_duplicate.
2729 (mtext__word_segment): Don't set *from and *to if a word
2730 segmentation funcion is not found.
2731 (mtext_ins_char): Fix typo.
2733 2005-08-25 Kenichi Handa <handa@m17n.org>
2735 * font.h (MFont): New member for_full_width.
2737 * font.c (compare_font_score): Prefer a font of not
2740 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2741 registry charset of a font is one of CJK charsets.
2743 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2744 supports some of CJK.
2746 2005-08-24 Kenichi Handa <handa@m17n.org>
2748 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2750 * m17n-gui.c (null_device_open): Check Mresolution param and set
2753 * m17n-gd.c (device_open): Check Mresolution param and set
2756 * m17n-X.c (MWDevice): New member resy.
2757 (xfont_open): Set ascent, descent, and max_advance members of
2759 (xft_open): Likewise.
2760 (device_open): Compare also screen_num to find a device. Set
2761 device->resy and frame->dpi.
2763 * internal-gui.h (MFrame): New member dpi.
2765 * font.h (MRealizedFont): New member max_advance.
2767 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2768 (mfont__init): Don't initialize Mascent, Mdescent.
2769 (Mascent, Mdescent): Delete these variables.
2770 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2771 Mfont_descent instead of Mascent and Mdescent.
2772 (mfont_put_prop): Allow negative size.
2773 (mfont_find): Handle the case of spec->size < 0. Fix previous
2775 (mfont_list): Handle the case of spec->size < 0.
2776 (mfont_check): Likewise.
2778 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2779 (fc_get_pattern): Handle the case of font->size < 0.
2780 (ft_open): Set ascent, descent, and max_advance members of rfont.
2781 (ft_find_metric): Improve rounding.
2782 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2785 * face.c (mface__realize): Handle the case of font->size < 0.
2787 2005-08-22 Kenichi Handa <handa@m17n.org>
2789 * coding.c (MConverterStatus): Change the member buf to union.
2790 (mconv_buffer_converter): Add const to the arg buf.
2791 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2792 (mconv_decode): Adjusted for the change of MConverterStatus.
2793 (mconv_encode_range): Likewise.
2795 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2796 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2798 2005-08-20 Kenichi Handa <handa@m17n.org>
2800 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2801 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2803 * m17n-X.c (xfont_open): Set members ascent, descent, and
2804 max_advance of rfont.
2805 (xft_open): Likewise.
2807 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2809 (mfont__ft_parse_name): Add const to the arg name.
2811 * font.c (xlfd_parse_name): Add const to the arg name. Call
2812 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2813 (xlfd_unparse_name): Handle spacing.
2814 (mfont__init): Initialize new variables.
2815 (mfont__id): Handle spacing.
2816 (mfont__merge): Likewise.
2817 (mfont__set_spec): This function deleted.
2818 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2819 condition of calling mfont__ft_parse_name.
2820 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2821 (mfont_get_prop): Handle properties spacing, ascent, descent,
2823 (mfont_find): Return a realized font.
2824 (mfont_from_name): Add const to the arg name.
2826 * font.h (enum MFontProperty): New member MFONT_SPACING.
2827 (enum MFontSpacing): New enum.
2828 (MFont): New members spacing and max_advance.
2829 (mfont__ft_parse_name): Prototype adjusted.
2830 (mfont__set_spec): Extern deleted.
2831 (mfont__parse_name_into_font): Prototype adjusted.
2833 2005-08-19 Kenichi Handa <handa@m17n.org>
2835 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2837 * font.c (mfont_list): If FONT is null, use a temporary font.
2838 (mfont_parse_name): Add const to the arg name.
2840 2005-08-18 Kenichi Handa <handa@m17n.org>
2842 * word-thai.c: Surround code by #ifdef and #endif to escape from
2845 * font-ft.c: Mostly re-written.
2847 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2848 (FontLayoutCmd): Type of the member otf changed..
2849 (load_otf_command): Adjusted for the format change of otf command.
2850 (load_command): Likewise.
2851 (free_flt_command): Unref cmd->body.otf.
2852 (run_otf): Ajusted for the type change of otf_cmd.
2853 (run_command): Ajusted for the type change of otf_cmd. On
2854 debugging, print ctx->combining_code.
2855 (mfont__flt_run): Initialize ctx's members code_offset,
2856 combining_code, and left_padding to 0.
2858 * face.h (struct MRealizedFace): New member font.
2859 (mface__realize): Prototype adjusted.
2861 * face.c (find_realized_face): New arg font.
2862 (find_realized_face): Adjusted for the change of MFont.
2863 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2864 (mface__fini): Don't call mdebug__report_object.
2865 (mface__realize): New arg font.
2866 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2867 Optimize the latin case.
2868 (mface__free_realized): Free rface->font.
2869 (mface__update_frame_face): Adjusted for the change of mface__realize.
2870 (mface_equal): New function.
2872 * draw.c (Mcommon): New variable.
2873 (visual_order): Args to mfont__encode_char changed.
2874 (compose_glyph_string): Handle Mfont text property.
2875 (layout_glyphs): Adjusted for the change of MFont.
2876 (mdraw__init): Initialize Mcommon.
2877 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2879 * font.h (enum MFontType): Members completely changed.
2880 (enum MFontProperty): Move MFONT_SIZE to the tail.
2881 (enum MFontSource): New enum.
2882 (struct MFont): New members type, source, sizes, file, capability,
2884 (struct MRealizedFont): Type of member font changed. Members
2885 score, status, and encoding deleted.
2886 (MFontScore): New type.
2887 (MFontList): Member changed.
2888 (struct MFontDriver): New member has_char. Types of members
2890 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2891 (Mapple_roman): Extern them.
2892 (OTF_Tag): Typedefed if not HAVE_OTF.
2893 (enum MFontOpenTypeTable): New enum.
2894 (MFontCapability): New type.
2895 (mfont__ft_drive_otf): Prototype adjusted.
2896 (mfont__score): Extern deleted.
2897 (mfont__merge): Extern it.
2898 (mfont__has_char): Extern it.
2899 (mfont__encode_char): Prototype adjusted.
2900 (mfont__open): Extern it.
2901 (mfont__set_spec): Prototype adjusted.
2902 (mfont__get_capability): Extern it.
2904 * font.c: Include "fontset.h".
2905 (M_font_capability, M_font_list, M_font_list_len): New variables.
2906 (font_score_priority): Change order of initial elements.
2907 (font_score_shift_bits): Fix array size.
2908 (common_weight): Add "thin", "semibold", and "heavy".
2909 (common_stretch): Add "ultracondensed", "extracondensed",
2910 "extraexpanded", and "utltraexpand".
2911 (font_weight_regular, font_weight_normal, font_weight_medium): New
2913 (gen_font_name): This function deleted.
2914 (find_encoding): Set font->encoding.
2915 (OTF_tag): New function.
2916 (otf_script_list): New variable.
2917 (load_otf_script_list): New function.
2918 (find_script_from_otf_tag): New function.
2919 (xlfd_parse_name): Set font->type and font->source.
2920 (mfont__free_realized): Free chains rfonts.
2921 (font_score): Renamed from mfont__score.
2922 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2923 (Mapple_roman): New variables.
2924 (mfont__init): Initilize new variables. Initalize
2925 default_encoding.encoding_name and
2926 default_encoding.encoding_charset to Municode_full and
2927 mcharset__unicode. Use SAFE* macros for allocating filepath
2929 (mfont__fini): Free otf_script_list.
2930 (mfont__id): New function.
2931 (mfont__match_p): Check also capability member of MFont.
2932 (mfont__merge): New funciton.
2933 (mfont__set_spec_from_face): Set type and source members.
2934 (mfont__set_spec_from_plist): Set capability and type members.
2935 (mfont__select): Argument changed.
2936 (mfont__available): New function.
2937 (compare_font_score): New function.
2938 (mfont__list): New function.
2939 (mfont__open): Return a realized font.
2940 (mfont__resize): Adjusted for the change of MFont.
2941 (mfont__has_char): New function.
2942 (mfont__encode_char): Argument changed.
2943 (mfont__set_spec): Argument changed.
2944 (free_font_capability): New function.
2945 (mfont__get_capability): New function.
2946 (MFontfile): New variable.
2947 (mfont_get_prop): Adjusted for the change of MFont.
2948 (mfont_put_prop): Likewise.
2949 (mfont_set_selection_priority): Fix the way of setting
2950 font_score_priority[].
2951 (mfont_find): Use mfont__list instead of mfont__select.
2952 (mfont_resize_ratio): Adjusted for the change of MFont.
2953 (mfont_list): Use mfont__list.
2954 (mfont_check): New function.
2955 (font_score): Make it static.
2957 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2958 (mfont__lookup_fontset): Likewise.
2960 * fontset.c (struct MFontset): Delete member font_spec_list.
2961 (struct MRealizedFontset): Type of member spec changed. New
2963 (load_font_group): Arg spec_list deleted.
2964 (load_fontset_contents): Adjusted for the change of fontset_def.
2965 (free_fontset): Fix the way of freeing fontset elements.
2966 (realize_fontset_elements): Argument changed.
2967 (get_per_script): New function.
2968 (free_realized_fontset_elements): Fix the way of feeing rfontset
2970 (update_fontset_elements): Fix args to realize_fontset_elements.
2971 (mfont__realize_fontset): New arg spec.
2972 (try_font_list): New function.
2973 (try_font_group): New arg request. Use try_font_list.
2974 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2976 (mfontset): Adjusted for the change of MFontset.
2977 (mfontset_copy): Likewise. Don't share plists.
2978 (mfontset_modify_entry): Adjusted for the change of MFontset.
2979 (mfontset_lookup): Call get_per_script.
2980 (mdebug_dump_fontset): Print also the address of fonts.
2982 * input.c (shift_state): Don't reset ic_info->vars.
2983 (take_action_list): Call MDEBUG_PRINT fore calling
2986 * internal-gui.h (MFontDriver): Don't typedef it here.
2988 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2989 (MXFont): This type deleted.
2991 (struct _MFontX): New struct.
2992 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2993 (MDisplayInfo): Member base_font_list deleted.
2994 (DEFAULT_FONT): Definition changed.
2995 (FALLBACK_FONT): This maclr deleted.
2996 (free_display_info): Adjusted for the change of MDisplayInfo.
2997 (free_device): Argument to mfont__free_realized changed.
2998 (xfont_driver): Adjusted for the change of MFontDriver.
2999 (xfont_registry_list): Use MFontX instead of MXFont.
3000 (MRealizedFontX): Renamed from MXFontInfo.
3001 (xfont_select): Return the font found first.
3002 (close_xfont): Change MXFontInfo to MRealizedFontX.
3003 (xfont_open): Return the realized font.
3004 (xfont_find_metric): Get xfont from rfont->fontp.
3005 (xfont_has_char): New function.
3006 (xfont_encode_char): Adjusted for the argument change.
3007 (xfont_render): Get xfont from rfont->fontp.
3008 (xfont_list): Adjusted for the argument change.
3009 (MRealizedFontXft): Renamed from MXftFontInfo.
3010 (xft_driver): Ajusted for the change of MFontDriver.
3011 (close_xft): Change MXtfFontInfo to MRealizedFontXft
3012 (xft_open_font): Argument changed.
3013 (xft_open): Argument changed. Return the realized font.
3014 (xft_find_metric): Get xft_font from rfont->fontp.
3015 (xft_has_char, xft_encode_char): New functions.
3016 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
3017 font if not yet opened.
3018 (device_open): Don't set frame->font.
3020 * m17n-gd.c (gd_font_driver): Adjusted for the change of
3022 (gd_font_open): New function.
3023 (gd_render): Don't use the local variable ft_info.
3024 (device_init): Adjusted for the change of gd_font_driver.
3026 * textprop.c (mtext__prop_init): Initialize text_property_table.
3027 Call M17N_OBJECT_ADD_ARRAY.
3028 (mtext__prop_fini): Don't call mdebug__report_object.
3030 * plist.c (mplist__init): Initialize plist_table.
3031 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
3032 (mplist__fini): Don't call mdebug__report_object.
3034 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
3035 (mtext__fini): Don't call mdebug__report_object.
3036 (MTEXT_FORMAT_UTF_16): Correct type.
3037 (mtext_data): New function.
3038 (mtext_text): Fix calculation of limit and args to
3041 * language.c: Include "plist.h".
3042 (M_script_lang_list): New variable.
3043 (mlang__init): Read languages and their information from m17n
3045 (mlanguage__list): New function.
3046 (Miso639_1, Miso639_2): New variables.
3048 * language.h (mlanguage__list): Extern it.
3050 * database.c (get_database_stream): Use SAFE_* macros for
3051 allocating and freeing path.
3052 (mdatabase__init): Likewise.
3054 * symbol.c (msymbol__fini): Don't free symbols here.
3055 (msymbol__free_table): New function.
3056 (msymbol_is_managing_key): New function.
3058 * symbol.h (msymbol__free_table): Extern it.
3059 (msymbol__list): Extern it.
3061 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
3063 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
3064 (struct _M17NObjectArray): New member name and next.
3065 (mdebug__add_object_array): Extern it.
3066 (M17N_OBJECT_ADD_ARRAY): New macro.
3067 (mdebug__report_object): Don't extern it.
3069 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
3071 * m17n-gui.c (free_frame): Don't free frame->font.
3072 (null_device_fini): Fix code for freeing
3073 null_device.realized_font_list.
3074 (m17n_fini_win): Free interface.
3075 (mframe): Cast the return value of dlsym. Set frame->font here.
3076 (mframe_get_prop): Check frame->rface->rfont before accessing the
3079 * m17n-gui.h (Mfontfile): Extern it.
3080 (mfont_check): Extern it.
3081 (mface_equal): Extern it.
3083 * m17n-core.c: Include "symbol.h".
3084 (report_header_printed): This variable deleted.
3085 (object_array_root): New variable.
3086 (report_object_array): New function.
3087 (mdebug__report_object): This function deleted.
3088 (mdebug__add_object_array): New function.
3089 (m17n_init_core): Call mchartable_init () before mtext_init ().
3090 (m17n_fini_core): Call report_object_array (if necessary) and
3091 msymbol__free_atable at the end.
3093 * m17n-core.h (msymbol_is_managing_key): Extern it.
3094 (mtext_data): Extern it.
3095 (MTEXT_FORMAT_UTF_16): Correct type.
3096 (M17NLIB_MINOR_VERSION): Changed to 3.
3097 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
3099 * chartab.c (mchartable__init): Initalize chartable_table.count.
3100 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
3101 mdebug__report_object.
3103 2005-05-26 Kenichi Handa <handa@m17n.org>
3105 * m17n.h (Miso639_1, Miso639_2): Extern them.
3107 * symbol.h (msymbol__list): Extern it.
3109 * symbol.c (msymbol__list): New function.
3111 2005-05-19 Kenichi Handa <handa@m17n.org>
3113 * input-gui.c (minput__win_init): Don't change the value of
3116 2005-05-16 Kenichi Handa <handa@m17n.org>
3118 * m17n-core.c (m17n_object): Be sure to initialize all members.
3120 * font-ft.c (fc_decode_prop): Fix args to msymbol.
3122 2005-05-09 Kenichi Handa <handa@m17n.org>
3124 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
3126 2005-04-27 Kenichi Handa <handa@m17n.org>
3128 * language.c (mlang__init): Add "an" (Aragonese).
3130 * word-thai.c: Add support for libthai.
3131 (mtext__word_thai_init): Initialize wordseg library conditionaly.
3132 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
3134 * mtext.c: Include "word-thai.h" conditionaly.
3135 (mtext__init): Call mtext__word_thai_init conditionaly.
3136 (mtext__fini): Call mtext__word_thai_fini conditionaly.
3138 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
3139 not WORDCUT_LD_FLAGS.
3141 2005-04-19 Kenichi Handa <handa@m17n.org>
3143 * word-thai.c (wordseg_propertize): Always unref the attached
3145 (thai_wordseg): Don't unref the property.
3147 2005-04-18 Kenichi Handa <handa@m17n.org>
3149 * word-thai.c: Include stdlib.h.
3150 (wordseg_propertize): Add dummy function for the case that wordcut
3151 library doesn't exist.
3152 (wordseg_propertize): Fix for old wordcut library.
3154 2005-04-16 Kenichi Handa <handa@m17n.org>
3156 * word-thai.c: Include <stdio.h>.
3158 2005-04-15 Kenichi Handa <handa@m17n.org>
3160 * draw.c: Include mtext.h.
3161 (linebreak_table, M_break_at_space, M_break_at_word)
3162 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
3163 (compose_glyph_string): Check POS before getting Mface text
3165 (truncate_gstring): Give correct TO arg to line_break function.
3166 (GET_LB_TYPE): New macro.
3167 (find_break_backward, find_break_forward): New functions.
3168 (mdraw__init): Initialize the above new variables.
3169 (mdraw__fini): Free linebreak_table.
3170 (mdraw_default_line_break): Use find_break_backward and
3173 * word-thai.c: New file.
3175 * word-thai.h: New file.
3177 * mtext.c: Include word-thai.h.
3178 (wordseg_func_table): New variable.
3179 (mtext__init): Initialize wordseg_func_table and call
3180 mtext__word_thai_init.
3181 (mtext__fini): Call mtext__word_thai_fini, free
3183 (MTextWordsegFunc): New type.
3184 (mtext__word_segment): New function.
3186 * mtext.h (wordseg_func_table): Extern it.
3187 (mtext__word_segment): Extern it.
3189 * m17n.c (m17n_init): Fix typo (== -> =).
3191 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
3192 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
3194 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
3195 (MTEXTPROP_VAL): New macros.
3197 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
3199 2005-04-07 Kenichi Handa <handa@m17n.org>
3201 * database.c (load_chartable): Fix pursing of symbol name.
3203 2005-03-24 Kenichi Handa <handa@m17n.org>
3205 * m17n.c (m17n_init): Fix typo (== -> =).
3207 2005-03-11 Kenichi Handa <handa@m17n.org>
3209 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
3211 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
3213 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
3216 2005-03-09 handa <handa@m17n.org>
3218 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
3219 calling m17n_init ().
3221 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
3222 calling m17n_init_core ().
3224 2005-02-28 Kenichi Handa <handa@m17n.org>
3226 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3229 2005-02-17 Kenichi Handa <handa@m17n.org>
3231 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3232 (M_description, M_command, M_variable): New variables.
3233 (load_im_info_keys): New variables.
3234 (load_im_info, check_command_keyseq, get_description_advance)
3235 (parse_command_list, get_command_list, parse_variable_list)
3236 (get_variable_list, input_method_hook): New functions.
3237 (command_list, variable_list): New variables.
3238 (minput__init): Put input_method_hook to Minput_method.
3239 Initialize M_description, M_command, M_variable, Mdetail_text,
3240 load_im_info_keys, command_list, variable_list.
3241 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3242 (Mdetail_text): New variable.
3243 (minput_get_description, minput_get_commands)
3244 (minput_assign_command_keys, minput_get_variables)
3245 (minput_set_variable): New functions.
3247 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3248 (minput_assign_command_keys, minput_get_variables)
3249 (minput_set_variable): Extern them.
3251 * plist.c (UNGETC): Just decrement st->p.
3252 (read_mtext_element): New arg skip.
3253 (read_integer_element): Likewise.
3254 (read_symbol_element): Likewise.
3255 (read_element): New arg KEYS.
3256 (mplist__from_plist): Don't increment ref-count of NULL object.
3257 (mplist__from_file): New arg KEYS.
3258 (mplist_put): Don't increment ref-count of NULL object.
3259 (mplist_add): Likewise.
3260 (mplist_push): Likewise.
3261 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3263 * plist.h (mplist__from_file): Prototype adjusted.
3265 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3266 (get_database_stream): New function.
3267 (load_database): Use get_database_stream.
3268 (M_database_hook): New variable
3269 (mdatabase__init): Initialize M_database_hook.
3270 (mdatabase__load_for_keys): New function.
3271 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3273 (mdatabase_define): Free mdb->extra_info if necessary.
3275 * database.h (mdatabase__dir_list, M_database_hook)
3276 (mdatabase__load_for_keys): Extern them.
3277 (MDatabaseHookFunc): New type.
3279 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3281 2004-12-27 Kenichi Handa <handa@m17n.org>
3283 * Version 1.2.0 released.
3285 2004-12-27 Kenichi Handa <handa@m17n.org>
3287 * input.c (minput_filter): Don't reset ic->xxx_changed.
3289 * mtext.c (mtext_from_data): Fix documentation.
3291 2004-12-25 Kenichi Handa <handa@m17n.org>
3293 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3294 (M17NLIB_VERSION_NAME): Update to "1.2.".
3296 2004-12-24 Kenichi Handa <handa@m17n.org>
3298 * input.c (reset_ic): Set key_unhandled to 0.
3300 2004-12-21 Kenichi Handa <handa@m17n.org>
3302 * m17n-gui.h (mfont_from_spec): Delete extern.
3304 * input-gui.c (win_callback): Handle Minput_reset.
3305 (minput__win_init): Register reset_ic as a callback for
3308 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3309 changed. At first, shift to the initial state.
3310 (minput__init): Initialize Minput_reset. Register reset_ic as a
3311 callback for Minput_reset.
3312 (Minput_reset): New variable.
3313 (minput_filter): Always set ic->xxx_changed to 0.
3314 (minput_reset_ic): New function.
3315 (integer_value): Fix typo ('>' -> '<') and calculation of length
3318 * m17n-core.c (merror_code): Change type to `int'.
3320 * m17n-misc.h (merror_code): Adjust type.
3322 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3324 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3325 (mtext_change_prop): Delete extern.
3327 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3328 to `int'. Move the documents to m17n-core.h.
3330 2004-12-13 Kenichi Handa <handa@m17n.org>
3332 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3333 (MTextProperty): Document it.
3335 2004-12-09 Kenichi Handa <handa@m17n.org>
3337 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3339 2004-12-03 Kenichi Handa <handa@m17n.org>
3341 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3342 m17n__gui_initialized): New externs.
3344 * m17n-core.h (enum M17NStatus): New enum.
3345 (m17n_status): Extern it.
3347 * m17n-core.c (core_initialized): Delete this variable.
3348 (m17n__core_initialized, m17n__shell_initialized,
3349 m17n__gui_initialized): New variables.
3350 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3351 instead of core_initialized.
3352 (m17n_status): New function.
3354 * m17n.c (shell_initialized): Delete this variable.
3355 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3358 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3360 * m17n-gui.c (win_initialized): Delete this variable.
3361 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3362 instead of gui_initialized.
3364 2004-11-19 Kenichi Handa <handa@m17n.org>
3366 * input.c (reset_ic): Check if ic_info->state is NULL.
3367 (filter): If ic_info->state is NULL, return 0.
3368 (load_input_method): Don't unref `maps' it it's not created.
3370 2004-11-15 Kenichi Handa <handa@m17n.org>
3372 * input.c (find_candidates_group): If INDEX is -1, find the last
3374 (take_action_list): If the previous of the first candidate is
3375 requested, select the last candidate.
3377 2004-11-08 Kenichi Handa <handa@m17n.org>
3379 * m17n-X.c (device_open): Try at most 32 fonts to find a
3380 non-autoscaled font.
3382 * font.c (xlfd_parse_name): Fix previous change.
3384 2004-11-05 Kenichi Handa <handa@m17n.org>
3386 * font.c: (commont_style): Include dummy elements "slanted" and
3387 "rslanted" to prefer "o" to "r" if "i" is requested.
3389 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3391 2004-10-29 Kenichi Handa <handa@m17n.org>
3393 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3395 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3396 New members smallest and larger.
3397 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3398 (xfont_registry_list): Likewise.
3399 (xfont_select): Likewise.
3402 2004-10-28 Kenichi Handa <handa@m17n.org>
3404 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3405 font name comparison.
3406 (xfont_select): Fix logic for selecting a larger size font.
3408 2004-10-25 Kenichi Handa <handa@m17n.org>
3410 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3413 2004-10-22 Kenichi Handa <handa@m17n.org>
3415 * input.c (update_candidate): Renamed from udpate_candidate.
3416 (take_action_list): Show more debugging info on arithmetic commands.
3418 * m17n-X.c (device_open): Fix previous change.
3420 * draw.c (compose_glyph_string): Don't get face property at the
3423 2004-10-21 Kenichi Handa <handa@m17n.org>
3425 * draw.c (compose_glyph_string): Fix for the case of category
3428 2004-10-19 Kenichi Handa <handa@m17n.org>
3430 * input.c (mdebug_mask): New variable.
3431 (shift_state): Print debug information.
3432 (take_action_list): Likewise.
3433 (handle_key): Likewise.
3435 2004-10-14 Kenichi Handa <handa@m17n.org>
3437 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3439 2004-10-13 Kenichi Handa <handa@m17n.org>
3441 * m17n-X.c (device_open): Be sure to register at least one font
3444 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3445 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3447 2004-10-12 Kenichi Handa <handa@m17n.org>
3449 * draw.c (alloc_gstring): Fix previous change.
3451 * font-ft.c (ft_list_generic): Fix for the case of not
3454 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3456 * font.c (mfont_list): If no font is found, return NULL.
3457 (load_font_encoding_table): Put entries of nil registry first.
3458 (find_encoding): Adjust for the above change.
3460 2004-10-11 Kenichi Handa <handa@m17n.org>
3462 * m17n-gui.h (mfont_list): Adjust prototype.
3464 * m17n-X.c (xfont_list): New arg maxnum.
3466 * font.h (struct MFontDriver): Change prototype of <list>.
3468 * font-ft.c (fc_generic_family_list): Delete it.
3469 (Mserif, Msans_serif, Mmonospace): Delete them.
3470 (M_generic_family_info): New variable.
3471 (enum GenericFamilyType): New enum.
3472 (struct GenericFamilyInfo): New struct.
3473 (generic_family_table): New variable.
3474 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3476 (add_font_info): Get style here.
3477 (ft_list_family): Don't initialize fc_config here. Don't list
3479 (ft_list_generic): New function.
3480 (ft_select): Pay attention to generic familes here.
3481 (ft_open): Fix calculation of ascent and descent.
3482 (ft_list): Pay attention to generic families.
3483 (mfont__ft_init): Initialize M_generic_family_info,
3484 generic_family_table, and fc_config..
3485 (mfont__ft_fini): Finalize generic_family_table.
3487 * draw.c (compose_glyph_string): Use more constant font for
3488 glyphs. Adjust for the member change in MGlyph.
3489 (layout_glyph_string): Adjust for the member change in MGlyph.
3490 (alloc_gstring): Intilize scracth_glyph to avoid
3491 compose_glyph_string on it.
3492 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3493 (mdraw_coordinates_position): Fix previous change.
3495 * internal-gui.h (glyph_category): New enum.
3496 (MGlyph): Change type of <category> to enum glyph_category.
3498 * face.c (mface__realize): Delete args langauge and charset.
3499 (mface__for_chars): Fix for the case that glyphs have different
3501 (mface__update_frame_face): Adjust for mface__realize change.
3503 * face.h (mface__realize): Adjust prototype.
3505 2004-10-05 Kenichi Handa <handa@m17n.org>
3507 * language.c (mlang__init): Add Akan.
3509 2004-10-04 Kenichi Handa <handa@m17n.org>
3511 * font-ft.c (add_font_info): Add instead of push the element.
3512 (ft_list_family): For generic fonts, try all
3513 substituted. families.
3515 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3516 (run_rule): Don't update cluster range here.
3517 (run_command): Update cluster range on appending a glyph.
3518 (run_otf): Update cluster range for glyphs generated by OTF.
3520 2004-10-02 Kenichi Handa <handa@m17n.org>
3522 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3524 2004-09-30 Kenichi Handa <handa@m17n.org>
3526 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3528 2004-09-30 Kenichi Handa <handa@m17n.org>
3530 * font.h: Include <fontconfig/fontconfig.h>.
3531 (MFTInfo): New member langset.
3532 (mfont__encoding_list): Extern it.
3534 * font.c (mfont__encoding_list): New function.
3535 (mdebug_dump_font_list): New function.
3537 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3538 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3540 (ft_family_list): New variable.
3541 (set_font_info): New arg basep. Callers changed.
3542 (fc_list): Check the return value of FcPatternGetString.
3543 (add_font_info): New arg plist. Callers changed. Update
3545 (ft_list_family): New function (merged fc_list and ft_list_all).
3546 (ft_select): Use ft_list_family.
3547 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3549 (mfont__ft_init): Initialize above new variables.
3550 (mfont__ft_fini): Free ft_family_list.
3551 (STRDUP_LOWER): New macro.
3552 (set_font_info): Use STRDUP_LOWER.
3553 (ft_list_family): Avoid duplicate addition of font path. Use
3555 (fc_decode_prop): Fix typo.
3557 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3558 (xfont_registry_list): Change argument disp_info to frame.
3560 (xfont_list_all): New function.
3561 (xfont_list): If FONT is not NULL, check all fonts.
3563 2004-09-28 Kenichi Handa <handa@m17n.org>
3565 * m17n-X.c (MXFont, MXFontList): New types.
3566 (MDisplayInfo): Delete members font_registry_list,
3567 iso8859_1_family_list, iso10646_1_family_list, new members
3568 font_list, base_font_list.
3569 (free_display_info): Adusted for the change of MDisplayInfo.
3570 (xfont_driver): Initialize with xfont_list.
3571 (font_compare): New function.
3572 (build_font_list): Deleted.
3573 (xfont_registry_list): New function.
3574 (xfont_select): Use xfont_registry_list.
3575 (xfont_list): New function.
3576 (device_open): Adusted for the change of MDisplayInfo.
3578 * font-ft.c (add_font_info): New arg languages. Callers changed.
3579 (fc_list): Get languages from fonts..
3580 (ft_list_all): Renamed from ft_list. Callers changed.
3581 (ft_list): New function.
3582 (mfont__ft_driver): Initalize with ft_list.
3584 * font.c (mfont_list): New function.
3586 * font.h (struct MFontDriver): New member `list'.
3587 (MFTInfo): New member languages.
3589 * m17n-gui.h (mfont_list): Extern it.
3591 2004-09-27 Kenichi Handa <handa@m17n.org>
3593 * internal-gui.h (struct MGlyphString): Delete members mt,
3594 sub_width, sub_lbrearing, sub_rbearing, and region.
3596 * draw.c (MSubTextExtents): New type.
3597 (layout_glyphs): New arg extents. Set its members.
3598 (layout_glyph_string): Adjusted for the above change.
3599 (alloc_gstring): Don't set gstring->mt.
3600 (truncate_gstring): Call line_break function with mt instead of
3603 2004-09-22 Kenichi Handa <handa@m17n.org>
3605 * mtext.c (count_utf_16_chars): Count each code of invalid
3608 2004-09-19 Kenichi Handa <handa@m17n.org>
3610 * mtext.c (default_utf_16, default_utf_32): Rename them to
3611 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3614 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3617 2004-09-13 Kenichi Handa <handa@m17n.org>
3619 * draw.c (Mlatin): Don't declare it here.
3620 (visual_order): Fix reordering of combining characters.
3621 (compose_glyph_string): Fix detection of script.
3622 (layout_glyphs): Don't fix reordering of combining characters
3624 (layout_glyph_string): Pay attention to
3625 control->disable_overlapping_adjustment.
3626 (truncate_gstring): Include at least on character in a line.
3627 (get_gstring): Always scan one full line.
3628 (mdraw__init): Don't initialize Mlatin here.
3629 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3630 have a font, use ascent/descent of an ASCII font. Allow
3631 ink_array_return and logical_array_return to be NULL.
3632 (mdraw_coordinates_position): Fix iteration.
3634 * font-ft.c (MFTtoProp): Member completely changed.
3635 (ft_to_prop): Adjusted for the above change.
3636 (ft_to_prop_size): Likewise.
3637 (set_font_info): Adjusted for the change of MFTtoProp.
3638 (fc_generic_family_list): New variable.
3639 (fc_list): Add special handling of generic font names.
3640 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3641 Initialize fc_generic_family_list.
3642 (mfont__ft_fini): Don't free ft_to_prop. Free
3643 fc_generic_family_list.
3644 (FC_vs_M17N_font_prop): New type.
3645 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3646 (fc_decode_prop, fc_encode_prop): New functions.
3647 (mfont__ft_parse_name): Use fc_decode_prop.
3648 (mfont__ft_unparse_name): Use fc_encode_prop.
3650 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3651 (MWDevice): Add member realized_font_list.
3652 (free_display_info): Don't free disp_info->realized_font_list.
3653 (free_device): Free device->realized_fontset_list.
3654 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3655 (device_open): Don't initialize disp_info->realized_font_list.
3656 (device_open): Initialize device->realized_font_list and set it to
3657 frame->realized_font_list.
3659 * fontset.c (try_font_group): New function.
3660 (mfont__lookup_fontset): Use try_font_group.
3662 * font.c (common_weight): Change the order of "regular".
3664 * face.c (Mlatin): Don't make it static.
3665 (mface__realize): Be sure to set work_gstring.frame.
3666 (mface__for_chars): Likewise.
3668 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3671 * internal-gui.h (Mlatin): Extern it.
3673 * m17n-gui.h (MDrawControl): New member
3674 disable_overlapping_adjustment.
3676 2004-09-06 Kenichi Handa <handa@m17n.org>
3678 * font-flt.c (run_otf): Fix typo ('}'->']').
3680 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3681 (COMBINING_PRECOMPUTED_P): New macros.
3683 * draw.c (layout_glyphs): Handle precomputed combining code.
3685 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3686 precomupted combining code.
3688 2004-09-03 Kenichi Handa <handa@m17n.org>
3690 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3693 2004-08-27 Kenichi Handa <handa@m17n.org>
3695 * face.c (mface_put_prop): If the new value is the same as the
3696 current one, don't increment frame->tick.
3698 2004-08-25 Kenichi Handa <handa@m17n.org>
3700 * fontset.c (mfontset): Initialize font_spec_list member.
3701 (mfontset_copy): Load fontset if necessary.
3703 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3704 'metrics' to for C++.
3706 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3709 2004-08-16 Kenichi Handa <handa@m17n.org>
3711 * Version 1.1.0 released.
3713 2004-08-13 Kenichi Handa <handa@m17n.org>
3715 * language.c (mlang__init): Add Dhivehi.
3717 * m17n-gui.c (Mx, Mfreetype): Delete it.
3718 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3720 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3721 (mfont_resize_ratio): Extern it.
3722 (MDrawGlyphInfo): New member logical_width;
3723 (MDrawGlyph): New type.
3724 (mdraw_glyph_list): Prototype adjusted.
3726 * m17n-X.c (xfont_open): Set type and fontp members.
3727 (xft_open): Likewise.
3729 * internal-gui.h (Mx, Mfreetype): Delete extern.
3731 * font.h (struct MRealizedFont): New member type and fontp.
3733 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3734 (Mx, Mfreetype): Declare here.
3735 (Mxft): New variable.
3736 (mfont_resize_ratio): New function.
3738 * font-ft.c (ft_open): Set type and fontp members.
3740 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3743 2004-08-11 Kenichi Handa <handa@m17n.org>
3745 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3748 2004-08-06 Kenichi Handa <handa@m17n.org>
3750 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3753 * font-flt.c (run_otf): Print debugging information if necessary.
3755 2004-08-05 Kenichi Handa <handa@m17n.org>
3757 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3758 positioning_type 5 and 6. Switch simplified.
3760 2004-08-04 Kenichi Handa <handa@m17n.org>
3762 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3764 2004-08-02 Kenichi Handa <handa@m17n.org>
3766 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3767 set val to 1 even if it is greater than 1.
3769 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3771 2004-07-29 Kenichi Handa <handa@m17n.org>
3773 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3774 debugging information.
3776 * internal.h (MDEBUG_PRINT5): New macro.
3778 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3779 the previous one if the zero width glyph has left or right
3782 2004-07-26 Kenichi Handa <handa@m17n.org>
3784 * m17n-X.c (xft_render): Pay attention to members left_padding and
3785 right_padding of MGlyph.
3787 * draw.c (visual_order): Allocate one more elements for arrays as
3788 a workaround of fribidi bug.
3789 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3790 instead of MGlyph->bidi_sensitive.
3791 (layout_glyph_string): Pay attentinon to
3792 control->orientation_reversed when padding at the head or tail.
3793 Fix adjustment of space glyph width.
3794 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3797 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3798 instead of MGlyph->bidi_sensitive.
3800 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3802 2004-07-26 Kenichi Handa <handa@m17n.org>
3804 * draw.c (visual_order): Don't treat combined glyphs specially.
3805 (layout_glyphs): Don't get metrics glyphs that are already ready.
3806 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3807 width with the previous one.
3808 (draw_background): Fix bar cursor position on a r2l glyph.
3810 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3811 (run_rule): Fix place of updating cluster_begin_pos and
3812 cluster_end_pos here.
3813 (run_otf): Don't set left_padding.
3815 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3817 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3818 Fix handling of GPOS.
3819 (mfont__ft_drive_gpos): Delete this function.
3821 * font.h (mfont__ft_drive_otf): Renamed back from
3822 mfont__ft_drive_gsub.
3823 (mfont__ft_drive_gpos): Delete extern.
3825 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3826 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3828 2004-07-23 Kenichi Handa <handa@m17n.org>
3830 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3831 the same bidi level.
3833 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3835 2004-07-22 Kenichi Handa <handa@m17n.org>
3837 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3839 2004-07-20 Kenichi Handa <handa@m17n.org>
3841 * draw.c (render_glyphs): Fix checking of g->code validity.
3843 * face.c (mface__realize): Set g.type.
3845 2004-07-18 Kenichi Handa <handa@m17n.org>
3847 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3850 * m17n-gui.c (mframe): Print error message give by dlopen to
3853 2004-07-16 Kenichi Handa <handa@m17n.org>
3855 * draw.c (compose_glyph_string): Improve the way of deciding a
3856 script. For a character that doesn't have script property, use
3857 the last non-latin script.
3859 * font-ft.c (fc_list): Cancel previous change.
3860 (mfont__ft_init): Add more entries in ft_to_prop_name.
3862 2004-07-15 Kenichi Handa <handa@m17n.org>
3864 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3865 previous or next character glyphs.
3867 2004-07-14 Kenichi Handa <handa@m17n.org>
3869 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3870 of type GLYPH_SPACE.
3872 * fontset.c (mfont__lookup_fontset): If glyph type is
3873 GLYPH_SPACE, get codes for SPACE.
3875 * internal-gui.h (Mfont): Delete extern.
3877 * m17n-gui.h (Mfont): Delete duplicated extern.
3879 2004-07-13 Kenichi Handa <handa@m17n.org>
3881 * font-ft.c (DEVICE_DELTA): New macro.
3882 (adjust_anchor): New function.
3883 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3885 (mfont__ft_drive_gpos): New function.
3887 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3888 (FontLayoutContext): Delete member `rfont'.
3889 (run_otf): Set g->otf_cmd. Call
3890 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3891 only whne HAVE_OTF is defined.
3893 * fontset.c: Include "config.h".
3895 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3896 (MGlyph): New member otf_cmd.
3898 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3899 (mfont__ft_drive_gpos): Extern it.
3901 * face.c: Include "config.h".
3903 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3905 * input-gui.c: Include "config.h".
3907 * plist.c: Include "config.h".
3909 2004-07-06 Kenichi Handa <handa@m17n.org>
3911 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3912 internal-gui.h: Cancel previous changes.
3914 * m17n-gd.h: Delete it.
3916 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3917 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3918 @XML2_LD_FLAGS@ to above.
3919 (libm17n_la_LIBADD): Add -ldl.
3920 (libm17n_la_LDFLAGS): Add -export-dynamic.
3921 (X_LD_FLAGS): Fix the order of linking.
3922 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3923 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3924 (libm17n_X_la_LDFLAGS): Add -module.
3925 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3926 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3927 (libm17n_gd_la_LDFLAGS): Add -module.
3928 (include_HEADERS): Delete m17n-gd.h.
3930 2004-06-30 Kenichi Handa <handa@m17n.org>
3932 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3933 (MDeviceLibraryInterface): Delete it.
3934 (register_device_library): Delete it.
3935 (m17n__device_library_list): Renamed from device_library_list.
3937 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3938 (m17n_init_win): Adjust prototype.
3940 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3941 (m17n_init_gd): New function.
3943 * m17n-gd.h: New file.
3945 * m17n-X.h: Include <m17n-gui.h>.
3946 (m17n_init_X): Extern it.
3947 (M17N_INIT): Redefine it.
3949 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3950 (m17n_init_X): New function.
3952 * internal-gui.h (m17n__device_library_list): Extern it.
3953 (struct MDeviceDriver): New members initialized, init, and fini.
3955 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3957 (libm17n_X_la_LIBADD): Delete aboves.
3958 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3959 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3960 (libm17n_gd_la_LDFLAGS): Delete it.
3961 (include_HEADERS): Add m17n-gd.h.
3963 2004-06-25 Kenichi Handa <handa@m17n.org>
3965 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3966 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3968 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3970 * font-ft.c (fc_list): If FcFontList finds no font, try
3973 * draw.c (compose_glyph_string): Terminate the last loop after
3974 doing default combining if necessary.
3976 2004-06-24 Kenichi Handa <handa@m17n.org>
3978 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3980 * character.c (mchar_define_property): Add const to an arg.
3982 * charset.c (mchar_define_charset): Add const to an arg.
3984 * coding.c (MCodingSystem): Add const to an arg or decoder.
3985 (finish_decoding): Add const to an arg.
3986 (decode_coding_charset, decode_coding_utf_8)
3987 (decode_coding_utf_16, decode_coding_utf_32)
3988 (decode_coding_iso_2022, decode_coding_sjis)
3989 (mconv_define_coding): Likewise.
3991 * m17n-X.c (xft_find_metric): Delete unused variable.
3993 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3996 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3999 * mtext.c (count_utf_8_chars, count_utf_16_chars)
4000 (mtext__from_data, mtext_from_data): Add `const' to an arg.
4002 * mtext.h (mtext__from_data): Ajust prototype.
4004 2004-06-23 Kenichi Handa <handa@m17n.org>
4006 * draw.c (compose_glyph_string): Always get glyph codes by
4008 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
4009 (mdraw_glyph_list): New function.
4011 * font-flt.c (mfont__flt_run): Be sure to call
4012 rfont->driver->encode_char.
4014 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
4015 (ft_encode_char): Delete arg C.
4016 (ft_render): Don't call FT_Get_Char_Index.
4018 * font.c (mfont__encodable_p): Delete it.
4019 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
4021 * font.h (struct MFontDriver): Delete arg C of encode_char.
4022 (mfont__encodable_p): Delete extern.
4024 * m17n-X.c (xfont_encode_char): Delete arg C.
4025 (xft_find_metric): Don't cal FT_Get_Char_Index.
4026 (xft_render): Likewise.
4028 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
4030 (mdraw_glyph_list): Extern it.
4032 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
4034 2004-06-22 Kenichi Handa <handa@m17n.org>
4036 * m17n-gui.h (mfontset_lookup): Extern it.
4038 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
4040 * fontset.c (realize_fontset_elements)
4041 (free_realized_fontset_elements, update_fontset_elements): New
4043 (mfont__realize_fontset): Call realize_fontset_elements.
4044 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
4045 (mfont__lookup_fontset): If a fontset was modified, update
4046 the realized fontset.
4047 (mfontset_modify_entry): Increment fontset->tick.
4048 (mfontset_lookup): New function.
4050 2004-06-21 Kenichi Handa <handa@m17n.org>
4052 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
4054 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
4055 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
4056 length of source text 0.
4058 2004-06-21 Kenichi Handa <handa@m17n.org>
4060 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
4061 (compare): Pay attention to format other than utf-8.
4062 (copy): Delete this function.
4063 (count_by_utf_8, count_by_utf_16, insert): New functions.
4064 (count_utf_16_chars): Fix handling of a surrogate pair.
4065 (find_char_forward, find_char_backward): Likewise.
4066 (mtext__from_data): Delete unnecessary check. Fix number of
4068 (mtext_from_data): Don't count items.
4069 (mtext_ref_char): Optimize the code.
4070 (mtext_set_char): Pay attention to format other than utf-8.
4071 (mtext_cat_char): Likewise.
4072 (mtext_dup): Don't call copy, instead do allocation here.
4073 (mtext_cat): Call insert instead of copy.
4074 (mtext_ncat): Likewise.
4075 (mtext_cpy): Delete character at first and call insert instead of
4077 (mtext_ncpy): Likewise.
4078 (mtext_copy): Likewise.
4079 (mtext_duplicate): Call insert instead of copy.
4080 (mtext_del): Pay attention to format other than utf-8.
4081 (mtext_ins): Simply call insert.
4082 (mtext_ins_char): Pay attention to format other than utf-8.
4083 (mtext_tok): Call insert instead of copy.
4084 (mtext_text): Call UNIT_BYTES.
4086 * textprop.c (mtext__adjust_plist_for_change): New function.
4088 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
4089 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
4090 (CHAR_UNITS_AT): Fix typo.
4091 (CHAR_UNITS_BY_HEAD): Fix typo.
4092 (STRING_CHAR_AND_UNITS): Fix typo.
4094 * internal.h (MTEXT_READ_ONLY_P): New macro.
4096 * mtext.h (mtext__replace): Delete the extern.
4097 (mtext__adjust_foramt): Adjust prototype.
4099 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
4100 if possible. Otherwise make a copy of mmt.
4102 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
4105 2004-06-18 Kenichi Handa <handa@m17n.org>
4107 * character.h (CHAR_STRING_UTF16): Fix syntax.
4109 2004-06-16 Kenichi Handa <handa@m17n.org>
4111 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
4112 (libm17n_X_la_LIBADD): Delete it.
4113 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
4115 * m17n-X.c (device_open): Add parens in `if' condition.
4117 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
4118 (DEC_POSITION): Likewise.
4119 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
4121 2004-06-15 Kenichi Handa <handa@m17n.org>
4123 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
4126 * draw.c (compose_glyph_string): If langauge is specified, call
4127 mface__for_chars even if a text is all latin. Fix condition for
4128 setting non_ascii_found.
4130 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
4132 * m17n.h (minput_char_to_key): Delete extern.
4134 * m17n-gui.h (minput_event_to_key): Cancel previous change.
4136 * m17n-gui.c (null_device_open): Set several members of frame.
4138 2004-06-14 Kenichi Handa <handa@m17n.org>
4140 * m17n-gui.h (minput_event_to_key): Delete extern.
4142 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
4144 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
4146 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
4148 2004-06-08 Kenichi Handa <handa@m17n.org>
4150 * character.c (mchar_put_prop): Don't increment the ref-count of
4153 2004-06-04 Kenichi Handa <handa@m17n.org>
4155 * m17n-core.c (mdebug__register_object): New function.
4156 (mdebug__unregister_object): Likewise.
4158 * internal.h (mdebug__register_object, mdebug__unregister_object):
4160 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
4163 * charset.c (mcharset__load_from_database): Don't call
4164 mconv__register_charset_coding here.
4166 * coding.c (find_coding): Get a real name from an element of
4167 coding_definition_list.
4168 (mconv__register_charset_coding): Set the real name at the top of
4170 (mcoding__load_from_database): Likewise.
4171 (mconv_list_codings): Adjusted for the above change.
4173 2004-06-03 Kenichi Handa <handa@m17n.org>
4175 * coding.c (find_coding): Find by canonicalized name. Don't have
4176 to modify the element of coding_definition_list by
4178 (mconv__define_coding_from_charset): Delete it.
4179 (mconv__register_charset_coding): Canonicalize sym.
4180 (mcoding__load_from_database): Register plist modified by
4183 * coding.h (mconv__define_coding_from_charset): Don't extern it.
4185 * font-ft.c (ft_open): Fix setting of rfont->descent.
4187 2004-06-02 Kenichi Handa <handa@m17n.org>
4189 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
4190 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
4191 (xlfd_unparse_name): Renamed from xfont_build_name.
4192 (mfont__init): Initialized Mfontconfig.
4193 (mfont__free_realized): Unconditionally unref rfont->info.
4194 (mfont__select): Free `this' if it's not best.
4195 (mfont__open): Don't check frame->realized_font_list.
4196 (mfont__parse_name_into_font): New function.
4197 (Mfontconfig): New variable.
4198 (mfont_from_name): Call mfont_parse_name.
4199 (mfont_name): Call mfont_unparse_name.
4200 (mdebug_dump_font): Likewise.
4202 * font.h (struct MFontDriver): Delete members parse_name and
4204 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
4205 (mfont__parse_name_into_font): Extern it.
4207 * font-ft.c: Include "symbol.h".
4208 (close_ft): Unconditionally free filename and charmap_list of
4210 (ft_open): Duplicate base->filename. Increment ref-count of
4211 ft_info->charmap_list. Free ft_info->charmap_list and
4212 ft_info->filename on error.
4213 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
4215 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
4217 (enum xlfd_field_idx): Moved to font.c.
4218 (split_font_name, build_font_name): Likewise.
4219 (build_font_list): Call mfont__parse_name_info_font.
4220 (xfont_open): Call mfont__unparse_name. Free name.
4221 (xfont_parse_name, xfont_build_name): Moved to font.c
4222 (xft_select): Prototype deleted.
4223 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
4224 Call mfont_pase_name.
4226 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4227 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4230 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4233 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4235 2004-06-01 Kenichi Handa <handa@m17n.org>
4237 * fontset.c (mfontset_modify_entry): Pay attention to the case
4238 that fontset->font_spec_list is NULL.
4240 2004-05-31 Kenichi Handa <handa@m17n.org>
4242 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4244 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4246 * font.c (mfont__select): Print score the a font for debugging.
4248 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4250 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4251 kanji_sym and kana_sym.
4253 2004-05-28 Kenichi Handa <handa@m17n.org>
4255 * Makefile.am (VINFO): New variable.
4256 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4257 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4259 2004-05-27 Kenichi Handa <handa@m17n.org>
4261 The following chanages are to make device dependent functions
4262 accessible only from MDeviceDriver structure, and to add GD and
4263 null device drivers. Font drivers get also device dependent.
4265 * m17n.c (m17n_init): Increament shell_initialized.
4266 (m17n_fini): Decremented shell_initialized.
4268 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4270 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4271 (Mwidget, Mcolormap, Mx): Extern them.
4273 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4274 (free_frame): Call frame->driver->close instead of
4276 (DLOPEN_SHLIB_EXT): New macro.
4277 (MDeviceLibraryInterface): New type.
4278 (device_library_list): New variable.
4279 (register_device_library): New function.
4280 (null_device): New variable.
4281 (null_device_close, null_device_get_prop)
4282 (null_device_realize_face, null_device_free_realized_face): New
4284 (null_driver): New variable.
4285 (null_device_init, null_device_fini, null_device_open): New
4287 (null_interface): New variable.
4288 (Mfreetype, Mdevice): Declare them.
4289 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4290 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4291 Mwin__Close_Device. Register drivers for Mx and Mgd.
4292 (m17n_fini_win): Decremented win_initialized. Call "fini"
4293 function of all opened devices. Don't call mwin__fini.
4294 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4296 (mframe): Handle Mdevice key of PLIST.
4297 (mframe_get_prop): Call frame->device->get_prop instead of
4298 mwin__device_get_prop.
4300 * m17n-gd.c: New file.
4302 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4303 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4305 * m17n-core.c (m17n_init_core): Increate core_initialized.
4306 (m17n_fini_core): Decremented core_initialized.
4308 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4309 (Mcolormap): Don't extern them here.
4311 * m17n-X.c (FRAME_DEVICE): New macro.
4312 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4313 (free_display_info): Use MPLIST_DO.
4314 (free_device): Free rface->info.
4315 (xft_close): Delete it.
4316 (device_init): Renamed from mwin__init.
4317 (device_fini): Renamed from mwin__fini.
4318 (device_open): Renamed from mwin__open_device.
4319 (x_driver): New variable.
4320 (MXFontInfo): Delete member frame, add member display.
4321 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4322 Don't declare them here.
4324 * internal-gui.h (MDeviceType): New enum.
4325 (MWDefice): Delete it.
4326 (struct MFrame): Change type of device to void *. New members
4327 device_type, driver, font_driver_list.
4328 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4329 (MDeviceDriver): New type.
4330 (Mx, Mgd, Mfreetype): Extern them.
4331 (mwin__XXX): Delete all of them.
4333 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4335 (win_destroy_ic): Likewise.
4336 (adjust_window_and_draw): Likewise.
4337 (win_callback): Likewise.
4338 (Mxim): Declare it here.
4339 (minput_event_to_key): Call M_CHECK_READABLE.
4341 * fontset.c (mfont__lookup_fontset): Delete local variable
4344 * font.h (struct MFontDriver): Delete member close, add members
4345 parse_name and build_name.
4346 (mfont__driver_list): Delete extern.
4347 (mfont__close): Delete extern.
4349 * font.c (mfont__init): Don't set mfont__driver_list.
4350 (mfont__fini): Don't unref mfont__driver_list.
4351 (mfont__select): Try font drivers in frame->font_driver_list. Set
4352 driver member of a realized font.
4353 (mfont__close): Delete it.
4354 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4355 functions of the default frame.
4357 * font-ft.c (close_ft): Check ft_info->ft_face and work
4359 (add_font_info): Allocate ft_info by M17N_OBJECT.
4360 (ft_close): Delete it.
4361 (mfont__ft_driver): Don't set ft_close.
4362 (ft_select): Increment ref-count of best_font.
4363 (ft_open): Decremented ref-count of base. On error, call
4364 FT_Done_Face and free ft_info.
4365 (ft_find_metric): Always use XXX_MONO in load_flags.
4366 (ft_render): Fix setting of width. Call
4367 frame->driver->draw_points instead of mwin__draw_points.
4368 (ft_to_prop): Don't set mfont__driver_list.
4369 (mfont__ft_fini): Just unref ft_info.
4371 * face.c (mface__init): Exchange foreground and background of
4372 mface__default. Call mface_put_prop to set hline of
4374 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4375 (mface__free_realized): Don't call mwin__free_realized_face.
4377 * draw.c (Mdepth): Don't declare it here.
4378 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4379 (render_glyphs, render_glyph_string): Likewise.
4380 (mdraw__init): Don't set Mdepth.
4381 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4383 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4385 (mdraw_text_items): Check FRAME is writable.
4386 (mdraw_per_char_extents): Implement body.
4388 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4390 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4391 (GUI_SOURCES): Delete it.
4392 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4393 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4394 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4395 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4396 (linkgui_LDADD): Set to libm17n-gui.la
4397 (linkgui_LDFLAGS): New target.
4398 (SRC): Include ${libm17n_gui_la_SOURCES} and
4399 ${libm17n_gd_la_SOURCES}.
4401 2004-05-24 Kenichi Handa <handa@m17n.org>
4403 * draw.c (draw_background): Don't draw background even if
4404 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4406 2004-05-22 Kenichi Handa <handa@m17n.org>
4408 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4410 2004-05-20 Kenichi Handa <handa@m17n.org>
4412 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4414 * m17n-gui.c: Include "plist.h".
4415 (mframe): If PLIST is NULL, initialize it to emply plist.
4417 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4418 (xft_driver): New variable.
4419 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4420 (xft_find_metric, xft_render): New function.
4421 (mwin__init): Adjusted for the new mfont__driver_list.
4422 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4423 generated face to PARAM.
4424 (mwin__realize_face): Fix setting of box colors. Don't call hook
4426 (mwin__draw_hline): New function.
4427 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4428 (mwin__xft_render): Delete these function.
4430 * internal-gui.h (struct MFrame): New member tick.
4431 (struct MGlyphString): New member tick.
4432 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4433 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4434 (mwin__xft_render): Delete extern.
4436 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4437 (mfontset): Always increment the reference count of returned
4440 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4441 (MFTInfo): Moved to font.h.
4442 (ft_iso8859_1_font_list): Delete this variable.
4443 (set_font_info): Don't set font->property[MFONT_TYPE].
4444 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4445 (add_font_info): Change type to void.
4446 (fc_list): Change anme from xft_list. Caller changed. Include
4447 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4448 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4449 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4450 (close_ft): Don't call mwin__xft_close. Unref
4451 ft_info->extra_info.
4452 (ft_open): Don't setup ft_info->fontname. Don't call
4454 (ft_find_metric): Don't call mwin__xft_get_metric.
4455 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4456 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4457 (mfont__ft_init): Adjusted for new mfont__driver_list.
4458 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4460 * font.c (mfont__driver_list): Make it MPlist.
4461 (mfont__init): Adjust initialization of mfont__driver_list.
4462 (mfont__fini): Free mfont__driver_list.
4463 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4464 (mfont__select): Adjusted for the new mfont__driver_list.
4466 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4467 (mfont__drirver_list): Adjust prototype.
4468 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4470 * face.h (struct MFace): Delete member realized_face_list, add
4472 (struct MRealizedFace): Delete member need_update
4473 andnofont_rface, add member non_ascii_list.
4474 (mface__update_frame_face): Extern it.
4476 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4478 (get_hline_create, get_box_create): New functions.
4479 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4481 (free_face): Cancep previous change. Free face->frame_list.
4482 (serialize_hline): Do nothing if hline->width is zero.
4483 (serialize_box): Do nothing if box->width is zero.
4484 (mface__init): Setup all properties of mface__default.
4485 (mface__fini): Free hline_prop_list and box_prop_list.
4486 (mface__realize): Cancel previous change. Update
4487 face->frame_list. Setup rface->non_ascii_list.
4488 (mface__for_chars): Update rface->non_ascii_list.
4489 (mface__free_realized): Free rface->non_ascii_list.
4490 (mface__update_frame_face): New function.
4491 (mface): Initialize face->frame_list.
4492 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4494 (mface_merge): Likewise.
4495 (mface_put_prop): If key is Mhline or Mbox, get value by
4496 get_hline_create or get_box_create respectively.
4497 (mface_put_prop): Update frame->tick and call
4498 mface__update_frame_face if necessary.
4499 (mface_update): Do nothing if func is noop_hook.
4501 * draw.c (render_glyphs): If a font is not found, use
4502 mwin__draw_empty_boxes.
4503 (alloc_gstring): Initialize gstring->tick.
4504 (get_gstring): Check gstring->tick.
4506 2004-05-17 Kenichi Handa <handa@m17n.org>
4508 * face.c (find_realized_face): Return value changed. If RFONT is
4509 NULL, avoid unnecessary checking.
4510 (free_face): Free face->realized_face_list.
4511 (mface__realize): Adjusted for the change of find_realized_face.
4512 If it returns a realized face that needs update, free it and
4513 realize a new one. Push a new realized face to
4514 frame->realized_face_list instead of appending.
4515 (mface__for_chars): Adjusted for the change of find_realized_face.
4516 Short cut if the required font is in rface->ascii_rface.
4517 (mface_put_prop): Free old value if necessary. Set need_update
4518 member of realized faces to 1.
4520 * face.h (struct MFace): Delete member tick, add member
4522 (struct MRealizedFace): Delete member tick, add member
4525 2004-05-13 Kenichi Handa <handa@m17n.org>
4527 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4529 2004-05-12 Kenichi Handa <handa@m17n.org>
4531 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4533 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4534 parse it XftNameParse.
4536 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4537 (all_fonts_scaned): New variable.
4538 (set_font_info): FAMILY may be Mnil.
4539 (add_font_info): Argument changed.
4540 (xft_list): Call add_font_info in it.
4541 (ft_list): Likewise.
4542 (ft_select): Make it work in the case family is Mnil.
4543 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4544 (mfont__ft_fini): Set all_fonts_scaned to 0.
4546 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4547 that is failed to open.
4549 2004-05-10 Kenichi Handa <handa@m17n.org>
4551 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4552 device's depth is 1 (i.e. monochrome).
4554 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4555 to work around the problem of libtool.
4557 * font-ft.c: Include <freetype/ftbdf.h>.
4558 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4560 (mfont__ft_init): Initialize them.
4561 (ft_iso8859_1_font_list): New variable.
4562 (set_font_info): Detect a font containing iso8859-1 glyphs and
4563 register it in ft_iso8859_1_font_list. If the font is not
4564 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4565 properties of the font from its properties.
4566 (add_font_list): If the font is not scalable, check if it is BDF
4567 or PCF font. If not, ignore it.
4568 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4569 registry is not iso8859-1.
4570 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4571 ft_iso8859_1_font_list.
4572 (ft_find_metric): If the font is not scalable, assume it as BDF
4573 or PCF, and get a metric from its properties.
4574 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4576 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4578 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4579 (libm17n_la_LDFLAGS): Delete it.
4580 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4581 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4583 2004-05-06 Kenichi Handa <handa@m17n.org>
4585 * draw.c (compose_glyph_string): Fix previous change.
4587 2004-04-30 Kenichi Handa <handa@m17n.org>
4589 * font-ft.c (ft_list): Delete unused variable `result'.
4590 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4592 2004-04-27 Kenichi Handa <handa@m17n.org>
4594 * m17n-X.c: Include config.h
4595 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4596 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4597 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4598 (FRAME_CMAP, FRAME_VISUAL): New macros.
4599 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4600 (xfont_driver): Make it static.
4601 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4602 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4603 info->xft_color_back.
4604 (MXftFontInfo) [HAVE_XFT2]: New type.
4605 (mwin__xft_close) [HAVE_XFT2]: New function.
4606 (mwin__xft_open) [HAVE_XFT2]: New function.
4607 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4608 (mwin__xft_render) [HAVE_XFT2]: New function.
4610 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4611 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4612 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4615 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4617 * font-ft.c: Don't include FT_FREETYPE_H here.
4618 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4619 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4620 (MFTInfo): New member charmap_index.
4621 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4622 (check_otf_filename): Renamed from check_filename. Return value
4624 (ft_set_property): This function deleted.
4625 (set_font_info): New function.
4626 (add_font_list): Argument changed. Add multiple fonts.
4627 (xft_list) [HAVE_XFT2]: New function.
4628 (ft_list) [not HAVE_XFT2]: New function.
4629 (ft_select): Add code for Xft.
4630 (close_ft): Likewise.
4631 (ft_open): Likewise.
4632 (ft_find_metric): Likewise.
4633 (ft_encode_char): Likewise.
4634 (ft_render): Likewise.
4636 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4638 2004-04-26 Kenichi Handa <handa@m17n.org>
4640 * textprop.c (mtext_attach_property): Declare the return type as
4643 2004-04-21 Kenichi Handa <handa@m17n.org>
4645 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4647 2004-04-09 Kenichi Handa <handa@m17n.org>
4649 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4651 (load_command): Setup above members.
4653 2004-04-05 Kenichi Handa <handa@m17n.org>
4655 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4657 2004-03-30 Kenichi Handa <handa@m17n.org>
4659 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4662 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4663 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4665 2004-03-29 Kenichi Handa <handa@m17n.org>
4667 * Version 1.0 Patch Level 2 released.
4669 2004-03-29 Kenichi Handa <handa@m17n.org>
4671 * charset.c (make_charset): Set charset->fully_loaded and
4672 charset->simple correctly. Don't try to get charset->min_char and
4673 charset->max_char for a charset of method subset and superset.
4674 Don't load a mapping file here.
4675 (mcharset__init): Set unified_max.
4676 (mcharset__load_from_database): Free a working plist.
4678 * coding.c (mcoding__fini): Free all malloced data.
4680 * input-gui.c (win_create_ic): Set control.as_image for preediting
4683 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4684 `count') to initialize the array.
4686 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4689 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4691 (mwin__create_window): Fix bug of setting a background pixel of a
4693 (mwin__adjust_window): Clear the window before drawing.
4695 * m17n-core.c (mdebug__report_object): Free array->objectes if
4697 (m17n_init_core): Don't set report_header_printed to 0 here.
4698 Fix debugging information.
4699 (m17n_fini_core): Set report_header_printed to 0 here.
4701 * m17n-core.h (mplist_deserialize): Extern it.
4703 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4705 * m17n.c (m17n_fini): Fix debugging information.
4707 * mtext.c (mtext__adjust_foramt): New function.
4709 * mtext.h (mtext__adjust_foramt): Extern it.
4711 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4713 * plist.h (mplist__deserialize): Don't extern it.
4715 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4716 elements of symbol_table to NULL. Report about created and freed
4717 symbols if MDEBUG_FINI is set.
4719 2004-03-22 Kenichi Handa <handa@m17n.org>
4721 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4723 * m17n.c (m17n_init): Fix the way of checking merror_code.
4725 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4727 2004-03-22 Kenichi Handa <handa@m17n.org>
4729 * fontset.c (realize_font_group): Adjust the font size by
4730 mfont__resize before selecting a font.
4732 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4734 2004-03-19 Kenichi Handa <handa@m17n.org>
4736 * Version 1.0 Patch Level 1 released.
4738 2004-03-19 Kenichi Handa <handa@m17n.org>
4740 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4742 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4744 2004-03-19 Kenichi Handa <handa@m17n.org>
4746 Re-apply the changes forgotten in the released version.
4748 * charset.c (mcharset__load_from_database): Call
4749 mchar_define_charset.
4751 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4752 (mconv_encode_range): Put Mcoding text property.
4754 2004-03-18 Kenichi Handa <handa@m17n.org>
4756 * draw.c (Mdepth): New variable.
4757 (visual_order): Delete unused local var `pos'.
4758 (compose_glyph_string): Fix for the case that gstring->glyphs is
4759 realloced. Stop generating glyphs at TO. Fix handling of
4761 (layout_glyphs): Get metrics of all glyphs in advance. Set
4762 lbearing and rbearing of base of composition glyph correctly.
4763 Handle left-overhang glyphs correctly.
4764 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4766 (dump_combining_code): Change the defualt off_x character to ".".
4767 (mdraw__init): Initialize Mdepth.
4769 * face.c (work_gstring): New variable
4770 (mface__init): Initialize work_gstring.
4771 (mface__fini): Free work_gstring.glyphs.
4772 (mface__realize): Don't handle videomode property here. Adjusted
4773 for the change of mfont__get_metric.
4774 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4776 * face.h (enum face_gc): Moved to m17n-X.c.
4778 * font.h (struct MFontDriver): Arguments of find_metric changed.
4779 (mfont__select): Prototype adjusted.
4780 (mfont__get_metric): Likewise.
4781 (mfont__ft_drive_otf): Likewise.
4782 (mfont__flt_run): Likewise.
4784 * font.c (mfont__select): New argument layouter. If layouter is
4785 different in the registered font, make a new copy of realized
4787 (mfont__get_metric): Argument changed. Get metrics of multiple
4789 (mfont_find): Call mfont__select with layouter as Mnil.
4791 * font-flt.c (FontLayoutContext): New member rfont.
4792 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4793 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4795 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4797 (NUM_POINTS): New macro.
4798 (MPointTable): New type.
4799 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4800 (mfont__ft_drive_otf): New argument rfont.
4802 * fontset.c (realize_font_group): Adjusted for the changed of
4804 (check_fontset_element): This function deleted.
4806 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4807 off the parent window if the preedit text is zero length.
4809 * internal-gui.h (struct MFrame): New members foreground,
4810 background, videomode, font.
4811 (struct MGlyphString): New member anti_alias.
4812 (MDrawPoint): New type.
4813 (mwin__draw_bitmap): Prototype deleted.
4814 (mwin__draw_points): Prototype added.
4816 * m17n-gui.h (MDrawControl): New member anti_alias.
4818 * m17n-gui.c (free_frame): Free frame->font.
4819 (mframe): Set the fontset of frame->face to the default fontset.
4821 * m17n-X.c (RGB_GC): New type.
4822 (enum gc_index): Renamed from enum face_gc. Member names changed.
4824 (struct MWDevice): Members foreground and background deleted. New
4825 member scratch_gc, gc_list.
4826 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4827 (free_device): Free GCs in device->gc_list.
4828 (get_rgb_gc): New function.
4829 (get_gc): Renamed and argument changed from get_color.
4830 (get_gc_for_anti_alias): New function.
4831 (xfont_find_metric): Arguments changed. Get metrics of multiple
4833 (set_region): Argument changed. Caller changed.
4834 (xfont_render): Allways set a font in gc.
4835 (x_error_handler, x_io_error_handler): Define only if
4836 X_SET_ERROR_HANDLER is defined.
4837 (mwin__open_device): Create device->scratch_gc. Set members
4838 foreground, background, and videomode of frame. Call
4839 XSetErrorHandler and XSetIOErrorHandler only if
4840 X_SET_ERROR_HANDLER is defined.
4841 (struct gc_list): Deleted.
4842 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4843 (mwin__realize_face): Adjusted for the change of the format of
4844 rface->info and the charge of set_region.
4845 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4846 (mwin__draw_box): Likewise.
4847 (mwin__draw_bitmap): This function deleted.
4848 (mwin__draw_points): New function.
4849 (mwin__verify_region): Adjusted for the change of the format of
4850 rface->info and the charge of set_region.
4851 (mwin__create_window): Inherit backgound pixel from parent.
4852 (mwin__dump_gc): Adjusted for the change of the format of
4855 2004-03-16 Kenichi Handa <handa@m17n.org>
4857 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4859 * input.c (M_key_alias): New variable.
4860 (handle_key): Try M_key_alias property of a key too.
4861 (minput__init): Initialize M_key_alias. Give that property to
4862 symbols in one_char_symbol. Fix bug of initializing
4865 * draw.c (compose_glyph_string): Don't handle
4866 ignore_formatting_char here. Include formatting characters in the
4867 range processed by a FTL.
4868 (layout_glyph_string): Handle ignore_formatting_char here.
4870 2004-03-12 Kenichi Handa <handa@m17n.org>
4872 * input-gui.c (win_create_ic): Enable bidi in status control.
4874 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4876 2004-03-09 Kenichi Handa <handa@m17n.org>
4878 * input.c (load_input_method): If title is not specified, use the
4879 input method name as title.
4881 * m17n-X.c (get_color): Make it static.
4882 (xim_create_ic, xim_destroy_ic, x_error_handler)
4883 (x_io_error_handler): Likewise.
4885 2004-03-01 Kenichi Handa <handa@m17n.org>
4887 * Version 1.0 released.
4890 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4891 National Institute of Advanced Industrial Science and Technology (AIST)
4892 Registration Number H15PRO112
4894 This file is part of the m17n library.
4896 The m17n library is free software; you can redistribute it and/or
4897 modify it under the terms of the GNU Lesser General Public License
4898 as published by the Free Software Foundation; either version 2.1 of
4899 the License, or (at your option) any later version.
4901 The m17n library is distributed in the hope that it will be useful,
4902 but WITHOUT ANY WARRANTY; without even the implied warranty of
4903 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4904 Lesser General Public License for more details.
4906 You should have received a copy of the GNU Lesser General Public
4907 License along with the m17n library; if not, write to the Free
4908 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4909 Boston, MA 02110-1301, USA.