1 2010-04-23 Kenichi Handa <handa@m17n.org>
3 * Version 1.6.1 released.
5 2010-04-23 Kenichi Handa <handa@m17n.org>
7 * m17n-flt.c (enum GlyphInfoMask): Shift upper masks 1-bit left.
8 (decode_packed_otf_tag): If a glyph has combining information,
11 2010-04-23 Kenichi Handa <handa@m17n.org>
13 * font-ft.c (ft_drive_otf): Reset 28th bit of g->g.internal for
14 storing OTF feature tag.
16 2010-04-19 Kenichi Handa <handa@m17n.org>
18 * m17n-flt.c (run_stages): Update category code of glyphs if
19 category table is changed.
21 2010-04-05 Kenichi Handa <handa@m17n.org>
23 * font-ft.c (ft_check_cap_otf): Fix conditions to call
26 * database.c (check_version): Fix previous change.
28 2010-04-02 Kenichi Handa <handa@m17n.org>
30 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 6.
31 (M17NLIB_PATCH_LEVEL): Changed to 1.
32 (M17NLIB_VERSION_NAME): 1.6.1.
34 2010-03-30 Kenichi Handa <handa@m17n.org>
36 * Version 1.6.0 released.
38 2010-03-01 Kenichi Handa <handa@m17n.org>
40 * m17n-flt.c (run_rule): Fix checking of glyph availability.
42 2010-02-18 Kenichi Handa <handa@m17n.org>
44 * m17n-gui.c (register_device_library): Preprend M17N_MODULE_DIR
45 to the module file name.
47 * input.c (load_external_module): Preprend M17N_MODULE_DIR to the
50 * charset.c (load_charset): Check the return value of fgets.
52 * Makefile.am: Build modules dynamically loaded with
53 -avoid-version and no -version-info.
55 2010-01-15 Kenichi Handa <handa@m17n.org>
57 * draw.c (run_flt): Set mflt_try_otf to rfont->driver->try_otf.
58 (mdraw__init): Set mflt_enable_new_feature to 1.
60 * font-ft.c (ft_try_otf): New function.
61 (mfont__ft_driver): Set ft_try_otf.
63 * font.h (struct MFontDriver): New member try_otf.
65 * m17n-X.c (xft_driver): Set xft_try_otf.
66 (xft_try_otf): New function.
68 * m17n-flt.h: (mflt_enable_new_feature): Extern it.
69 (mflt_try_otf): Extern it.
71 * m17n-flt.c (load_category_table): If mflt_enable_new_feature is
72 zero, return NULL for such categories that require the new
74 (parse_otf_command): If mflt_enable_new_feature is zero, return
76 (load_otf_command): Fix previous change.
77 (load_flt): Check the return value of load_category_table.
78 (try_otf): Renamed from run_otf_category. Call mflt_try_otf
79 instead of font->drive_otf.
80 (run_command): Call try_otf instead of run_otf_category.
81 (m17n_init_flt): Initialize mflt_enable_new_feature to 0,
83 (mflt_enable_new_feature): New variable.
84 (mflt_try_otf): New variable.
86 2009-12-10 Kenichi Handa <handa@m17n.org>
88 * m17n-flt.c (parse_otf_command): Handle ":otf?".
89 (run_otf_category): If not features are specified, reset category
91 (run_command): On copy, don't re-calculate a category code.
93 2009-12-03 Kenichi Handa <handa@m17n.org>
95 * m17n-flt.c (run_stages): Reset category code if category-table
97 (mflt_run): Don't set category code here.
98 (decode_packed_otf_tag): If no feature is applied, re-calculate
101 2009-12-02 Kenichi Handa <handa@m17n.org>
103 * m17n-flt.c (mflt_find): If FONT is specified but no flt is
105 (run_command): Don't set ENCODED and MEASURED of separator.
107 2009-11-30 Kenichi Handa <handa@m17n.org>
109 * m17n-flt.c (load_otf_command): Check 4th char against '?'.
110 (load_command): Likewise.
111 (decode_packed_otf_tag): New arg CTX. If CTX->in == gstring,
112 update CTX->encoded. Caller changed.
114 2009-11-30 Kenichi Handa <handa@m17n.org>
116 * font-ft.c (ft_drive_otf): Check if OUT is null or not.
117 (ft_drive_otf): Call OTF_drive_gsub_with_log and
118 OTF_drive_gpos_with_log. Record the applied feature in
121 * font.c (mfont__get_glyph_id): Encode g->c instead of g->code.
123 * internal-flt.h (MAKE_COMBINING_CODE_BY_CLASS)
124 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
125 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P):
127 (PACK_OTF_TAG): Extern it.
129 * draw.c (reorder_combining_chars): Delete it.
131 * m17n-flt.h (mflt_font_id): Use type MFLFont.
132 (mflt_iterate_otf_feature): Likewise.
134 * m17n-flt.c (enum GlyphInfoMask): New member CategoryCodeMask and
136 (GET_CATEGORY_CODE, SET_CATEGORY_CODE, GET_COMBINED): New macros.
137 (SET_COMBINING_CODE): Set also CombinedMask.
138 (FontLayoutFeatureTable): Delete it.
139 (FeatureCodeTable): New type.
140 (FontLayoutCategory): Type of feature_table changed.
141 (load_category_table): Adjusted for the change of
143 (unref_category_table): Likewise.
144 (gen_otf_tag): New member shift. Caller changed.
145 (FontLayoutContext): New member category.
146 (run_rule): Compare g->c instead of g->code.
147 (decode_packed_otf_tag): New function.
148 (run_otf): Call decode_packed_otf_tag. Don't reset combining-code
150 (run_otf_category): New function.
151 (run_command): Set category-code if necessary. Call
152 run_otf_category for FontLayoutCmdTypeOTFCategory.
153 (run_stages): Set ctx->category. Get category from glyph if
155 (mflt_dump_gstring): New function.
157 2009-11-26 Kenichi Handa <handa@m17n.org>
159 * m17n-flt.c (enum FontLayoutCmdType): New member
160 FontLayoutCmdTypeOTFCategory.
161 (FontLayoutFeatureTable): New type.
162 (FontLayoutCategory): New members feature_table_size and
164 (load_category_table): Handle feature_table.
165 (unref_category_table): Likewise.
166 (load_otf_command): Handle FontLayoutCmdTypeOTFCategory.
167 (load_command): Likewise.
168 (free_flt_command): Likewise.
170 2009-11-10 Kenichi Handa <handa@m17n.org>
172 * draw.c (run_flt): Update category code of each glyph.
174 2009-11-07 Kenichi Handa <handa@m17n.org>
176 * font-ft.c (ft_drive_otf): Don't accumulate anchor adjustments.
178 2009-11-05 Kenichi Handa <handa@m17n.org>
180 * m17n-flt.c (run_otf): Fix updating of g->lbearing, etc.
182 * font-ft.c (ft_drive_otf): Use OTF_drive_gpos2 if possible.
184 2009-10-28 Kenichi Handa <handa@m17n.org>
186 * fontset.c (mdebug_flag): New variable.
187 (mfont__lookup_fontset): Print debug info.
189 * m17n-core.c (m17n_init_core): Call SET_DEBUG_FLAG for
192 * internal.h (enum MDebugFlag): Add MDEBUG_FONTSET.
194 * language.c (mscript__from_otf_tag): Adjusted for the new format
195 of the database <standard script unicode>.
197 2009-10-22 Kenichi Handa <handa@m17n.org>
199 * database.c (check_version): Fix the check.
201 * input.c (surrounding_pos): New arg *pos.
202 (integer_value): Fix handling of "@+0".
203 (take_action_list): Adjusted for the change of surrounding_pos.
205 2009-10-05 Kenichi Handa <handa@m17n.org>
207 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
210 * m17n-flt.c (FontLayoutCategory): New typedef.
211 (FontLayoutStage): Type of the member `category' changed.
212 (struct _MFLT): Type of the member `coverage' changed. New member
213 need_config and font_id.
214 (apply_otf_feature): New function.
215 (load_category_table): New arg FONT. If FONT is non-NULL, call
216 apply_otf_feature. Setup category->definition.
217 (ref_category_table): New macro.
218 (unref_category_table): New function.
219 (load_flt): Adjusted for the type change of category.
220 (free_flt_stage): New arg FLT.
221 (list_flt): Adjusted for the type change of category.
222 (run_stages): Adjusted for the type change of category.
223 (configure_category, configure_flt): New function.
224 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
225 mflt_font_id to NULL.
226 (mflt_get): Skip the heading configured FLTs.
227 (mflt_find): Likewise. If necessary, configure the found flt.
228 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
229 Adjusted for the type change of category.
230 (mflt_iterate_otf_feature, mflt_font_id): New variable.
232 * m17n-X.c (xfont_open): Set rfont->id.
233 (xft_driver): Set xft_iterate_otf_feature.
234 (xft_open): Set rfont->id.
235 (xft_iterate_otf_feature): New function.
237 * font.h (struct MRealizedFont): New member id.
238 (struct MFontDriver): New member iterate_otf_feature.
240 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
242 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
243 (get_otf): New funcition.
244 (ft_check_otf, ft_drive_otf): Use get_otf.
245 (iterate_callback, ft_iterate_otf_feature): New functions.
246 (mfont__ft_driver): Set ft_iterate_otf_feature.
248 * draw.c: Docstring updated.
249 (font_id): New function.
250 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
253 2009-10-02 Kenichi Handa <handa@m17n.org>
255 * m17n-flt.c (load_flt): Check the return value of
258 2009-09-03 Kenichi Handa <handa@m17n.org>
260 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
261 positions are adjusted by GPOS table.
263 2009-08-13 Kenichi Handa <handa@m17n.org>
265 * Version 1.5.5 released.
267 2009-08-13 Kenichi Handa <handa@m17n.org>
269 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
270 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
272 2009-03-03 Kenichi Handa <handa@m17n.org>
274 * draw.c (compose_glyph_string): Check if category not Mnil.
276 2009-03-02 Kenichi Handa <handa@m17n.org>
278 * Version 1.5.4 released.
280 2009-02-25 Kenichi Handa <handa@m17n.org>
282 * m17n-core.c (report_object_array): For M-text and Plist, print
285 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
286 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
288 * input.c (get_candidate_list): Free unnecessary objects.
289 (take_action_list): Free plist.
291 2009-02-04 Kenichi Handa <handa@m17n.org>
293 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
295 2009-01-16 Kenichi Handa <handa@m17n.org>
297 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
300 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
303 2009-01-14 Kenichi Handa <handa@m17n.org>
305 * coding.c (decode_coding_iso_2022): Check invocation status
306 before updating charset0 and charset1.
308 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
310 2008-12-31 Kenichi Handa <handa@m17n.org>
312 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
315 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
317 * face.c (mface_get_prop): Fix strict aliasing bug.
318 (mface_put_prop): Likewise.
320 * m17n-gui.c (mframe): Fix strict aliasing bug.
322 2008-10-20 Kenichi Handa <handa@m17n.org>
324 * Version 1.5.3 released.
326 2008-10-06 Kenichi Handa <handa@m17n.org>
328 * draw.c (mdraw__init): Use TRUE only when
329 FRIBIDI_INTERFACE_VERSION is less than 3.
331 2008-10-03 Kenichi Handa <handa@m17n.org>
333 * database.c (mdatabase__find_file): Return a copy of filename if
334 it is absolute pathname.
336 2008-09-25 Kenichi Handa <handa@m17n.org>
338 * input.c (load_macros): Don't parse the action list here.
339 (load_im_info): Parse action lists of all macros.
341 2008-09-24 Kenichi Handa <handa@m17n.org>
343 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
345 2008-09-19 Kenichi Handa <handa@m17n.org>
347 * input.c (fully_initialize): Rename "@reload" to "-reload".
349 2008-09-17 Kenichi Handa <handa@m17n.org>
351 * m17n-flt.c (run_stages): Fix combining with a variable width
354 2008-08-04 Kenichi Handa <handa@m17n.org>
356 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
359 2008-07-22 Kenichi Handa <handa@m17n.org>
361 * input.c (fully_initialize): Fix previous change.
363 2008-07-19 Kenichi Handa <handa@m17n.org>
365 * input.c (fully_initialize): Fix previous change.
367 2008-07-14 Kenichi Handa <handa@m17n.org>
369 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
371 2008-07-14 Kenichi Handa <handa@m17n.org>
373 * input.c (fully_initialize): Handle C-M-1, etc.
375 2008-07-11 Kenichi Handa <handa@m17n.org>
377 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
379 2008-06-23 Kenichi Handa <handa@m17n.org>
381 * Version 1.5.2 released.
383 2008-06-23 Kenichi Handa <handa@m17n.org>
385 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
386 (M17NLIB_PATCH_LEVEL): Changed to 2.
387 (M17NLIB_VERSION_NAME): Changed "1.5.2".
389 2008-06-13 Kenichi Handa <handa@m17n.org>
391 * input.c (minput_config_file): Comment fixed for man-page.
393 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
395 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
397 2008-05-24 Kenichi Handa <handa@m17n.org>
399 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
401 2008-05-23 Kenichi Handa <handa@m17n.org>
403 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
404 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
406 (libm17n_gd_la_LIBADD): Likewise.
408 * input.c (take_action_list): Fix debug info.
410 2008-05-14 Kenichi Handa <handa@m17n.org>
412 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
413 (run_stages): Fix index of g_indices.
415 2008-04-03 Kenichi Handa <handa@m17n.org>
417 * draw.c (compose_glyph_string): Don't run flt striding over the
419 (get_gstring): Don't use the cached gstring if cursor position is
422 2008-04-02 Kenichi Handa <handa@m17n.org>
424 * input.c (integer_value): Delete the 3rd arg VALUE.
425 (resolve_expression): Adjust the call of integer_value.
426 (take_action_list): Likewise.
428 2008-03-06 Kenichi Handa <handa@m17n.org>
430 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
433 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
435 * Version 1.5.1 released.
437 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
439 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
440 HAVE_FREETYPE is defined.
442 * font.h (OTF_Tag): Be sure that it is defined in any cases.
444 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
446 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
449 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
451 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
453 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
455 * input.c (parse_action_list): Check M_candidates.
456 (get_im_info): If key is Mnil, be sure to set im_info->states to a
459 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
461 * input.c (integer_value): Fix interpretation of "@-N".
463 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
465 * input.c (get_following_char): Fix interpretation of POS.
466 (get_following_char): Fix interpretation of "@+N".
468 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
470 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
473 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
475 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
477 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
479 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
480 (run_command): Check if clustering now before calling
481 UPDATE_CLUSTER_RANGE.
483 2008-01-06 Kenichi Handa <handa@m17n.org>
485 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
487 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
489 * m17n-X.c (xft_find_metric): Set g->g.measured.
491 * m17n-flt.c (Mequal): New variable.
492 (m17n_init_flt): Initialize it.
493 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
494 into a new member facility.
495 (load_command): Modify parsing of Mfont_facility.
496 (run_rule): Adjuted for the change of FontLayoutCmdRule.
497 (run_otf): Adjusted metrics if a->back is nonzero.
499 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
501 * Version 1.5.0 released.
503 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
505 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
507 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
508 (run_rule): Check if a font has the specific glyph correctly.
510 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
511 MDEBUG_FONT_FLT to MDEBUG_FLT.
513 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
515 * font-flt.c: Delete it.
517 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
519 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
520 TO for the rule of SRC_HAS_GLYPH.
522 * draw.c (run_flt): Argument changed.
523 (compose_glyph_string): Adjusted for the above change.
525 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
527 * plist.c (read_mtext_element): Don't free the malloced buffer.
529 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
531 * m17n-core.h (merror_code): Extern it.
533 * m17n-misc.h (merror_code): Don't extern it.
535 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
537 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
539 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
541 * draw.c (compose_glyph_string): Check g->rface->layouter, not
542 g->rface->rfont->layouter.
544 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
546 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
547 (run_rule): Use ctx->encoded_offset.
548 (run_command): Likewise.
549 (run_stages): Set ctx->encoded_offset.
551 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
553 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
554 bit-size of MFLTGlyph->internal.
556 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
558 * draw.c (visual_order): Exclude the last anchor glyph from the
561 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
563 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
564 (run_stages): Likewise.
565 (load_flt): Unref top after checking plist.
567 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
569 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
571 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
573 * m17n-flt.c (Mcombining): New variable.
574 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
575 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
576 SRC_HAS_GLYPH and SRC_OTF_SPEC.
577 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
579 (load_command): Adjusted for the above changes.
580 (run_rule): Likewise.
581 (combining_code_from_class): Delete it.
582 (mflt_get): Check flt->name against Mcombining, not Mt.
584 * internal-flt.h (Mcombining): Extern it.
586 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
587 combining characters.
589 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
591 * face.c (mface__realize): Reset measured flag before calling
594 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
595 (setup_combining_coverage): New function.
596 (setup_combining_flt): New function.
597 (mflt_get): If flt is not found, return NULL. If name if Mt,
598 call setup_combining_flt.
599 (mflt_run): For debugging, print font family name.
601 * font-ft.c (ft_render): Fix handling of baseline_offset.
602 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
603 (ft_render): Check pixel_mode to determine anti_alias.
605 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
606 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
607 (xfont_render): Set baseline_offset in pixel.
608 (xft_render): Fix handling of baseline_offset.
610 * draw.c (run_flt): Set font.font.family.
611 (compose_glyph_string): Fix handling of combining characters.
613 * fontset.c (try_font_list): Check if the named flt is surely
616 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
618 * draw.c (analyse_bidi_level): New function.
619 (visual_order): Do reordering using the already decided
621 (compose_glyph_string): Decide bidi-level before calling flt.
623 * m17n-flt.c (mflt_run): Fix typo.
625 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
627 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
629 * draw.c (visual_order): Don't rely on the width of glyphs.
630 (run_flt): Fix culculation of g->g.to.
632 * m17n-flt.c (run_rule): Don't set error code here.
633 (run_cond): Likewise.
634 (run_otf): Fix culculation of xoff and yoff.
635 (run_command): Don't set error code here.
639 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
640 (xfont_find_metric): Set glyph's yadv to 0.
641 (xft_find_metric): Likewise.
643 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
644 (ft_find_metric): Adjust glyph's metrics.
645 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
646 (ft_drive_otf): Set mark glyph's xadv to 0.
648 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
651 2007-10-29 Kenichi Handa <handa@m17n.org>
653 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
654 (mflt_get): Adjusted for the argument change.
655 (mflt_name): Adjusted for the return value change.
657 * m17n-flt.c (Mgenerator, Mend): New variables.
658 (flt_min_coverage, flt_max_coverage): New variables.
661 (Mfont_has): Renamed from Mexist. Referrers chagned.
662 (gen_otf_tag): Handle the trailing whitespaces.
663 (otf_count_features, otf_store_features): Fix for negative features.
664 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
665 (load_otf_command): Likewise.
666 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
667 (load_flt): Argument changed. Caller changed.
668 (free_flt_list): New function.
669 (run_rule): Adjusted for the change of FontLayoutContext.
670 (mflt_run): Adjusted for the change of FontLayoutContext.
672 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
673 (m17n_fini_win): Call m17n_fini_flt.
675 * m17n-gui.h: Include m17n-flt.h.
677 * m17n-gd.c: Adusted for the change of MGlyph.
679 * m17n-X.c: Adusted for the change of MGlyph.
680 (xft_check_otf, xft_drive_otf): New functions.
682 * internal-gui.h (MGlyph): Modified for new FLT handling.
684 * fontset.c (try_font_list): Adusted for the change of MGlyph.
686 * font-ft.c: Adjusted for the change of MGlyph.
687 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
688 (get_glyph_metric): Deleted.
689 (ft_check_otf): New function.
690 (ft_drive_otf): New fucntion.
692 * font.c: Adjusted for the change of MGlyph.
693 (mfont__init): Don't call mfont__flt_init.
694 (mfont__fini): Don't call mfont__flt_fini.
695 (mfont__get_glyph_id, mfont__get_metrics): New functions.
697 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
698 (MFLTFontForRealized): New struct.
699 (struct MFontDriver): New members check_otf and drive_otf.
700 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
702 * face.c: Adjusted for the change of MGlyph.
704 * draw.c: Adjusted for the change of MGlyph.
706 * m17n.c (m17n_init): Don't call mchar_init.
708 * m17n-core.c (m17n_init_core): Call mchar_init.
710 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
712 * input.c: Include "m17n.h" instead of "m17n-gui.h".
714 * chartab.c (mchartable): Initialize table->min_char to -1.
715 (mchartable_min_char): New function.
716 (mchartable_max_char): New function.
718 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
719 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
721 2007-10-12 Kenichi Handa <handa@m17n.org>
723 * m17n-core.h (Mcharset): Extern it.
724 Move detabase related declarations from m17n.h.
726 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
727 (struct _MFLTOtfFeatures): New struct.
728 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
729 (struct _MFLTFont): Delete otf, add check_otf.
730 (MCHAR_INVALID_CODE): Define it.
732 * plist.c (read_mtext_element): Simplify the code.
734 * m17n.h: Move database related declarations to m17n-core.h
735 (Mharset): Don't extern it.
737 * m17n.c (m17n_init): Don't call mdatabase__init.
739 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
742 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
743 (Mexist): New variable.
744 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
745 (FontLayoutCmdRule): New member src.exist.
746 (parse_otf_command): Handle gsub_count and gpos_count separately.
747 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
748 (load_command): Handle the command "exist".
749 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
750 (run_rule): Handle the case SRC_EXIST.
751 (run_otf): Adjusted for the change of MFLTOtfSpec.
752 (run_command): Check the range of FROM.
753 (check_otf_spec): Delete it.
754 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
756 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
757 (mflt_find): Call font->check_otf instead of check_otf_spec.
758 (mflt_run): Keep the metrics in 26.6 fixed point.
760 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
761 (m17n_init_core): Call mdatabase__init.
763 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
765 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
768 * font-flt.c (Mexist): New variable.
769 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
770 (FontLayoutCmdRule): New member src.exist.
771 (load_category_table): Use isalnum, not isalpha.
772 (load_command): Check the command "exist".
773 (run_rule): Hande the case SRC_EXIST.
774 (run_command): Check the range of FROM.
775 (mfont__flt_init): Initialize Mexist.
777 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
779 * database.h (mdatabase__load_charset_func): Extern it.
781 * database.c: Include m17n-core.h instead of m17n.h.
782 (load_chartable): Use mtext__from_data.
783 (load_charset): Moved to charset.c
784 (load_database): Call mdatabase__load_charset_func instead of
786 (mdatabase__load_charset_func): New variable.
787 (mdatabase__init): Initialize mdatabase__load_charset_func and
788 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
789 (mdatabase__save): Use fwrite, not mconv_encode_stream.
790 (Mcharset): Declare it here.
792 * charset.c: Include "database.h.".
793 (load_charset): Moved from database.c.
794 (mcharset__init): Initialize mdatabase__load_charset_func, don't
797 * character.c (mchar_define_property): Call mdatabase_find directly.
798 (mchar_get_prop): Call mdatabase_add directly.
799 (mchar_put_prop): Call mdatabase_load directly.
800 (mchar_get_prop_table): Likewise.
802 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
803 (libm17n_la_SOURCES): Remove database.[ch].
804 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
806 2007-09-18 Kenichi Handa <handa@m17n.org>
808 * face.c (mface__realize): Try Freetype based font at first.
810 * font.c: Include <ctype.h>
812 2007-09-16 Kenichi Handa <handa@m17n.org>
814 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
816 (run_otf): Call font->get_metrics, not font->get_metric.
817 (run_stages): Likewise.
818 (CHECK_FLT_COVERAGE): New macro.
819 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
820 (check_otf_spec): New function.
821 (m17n_fini_flt): Unref flt->coverage.
822 (mflt_find): Argument changed.
823 (mflt_name): New function.
824 (mflt_coverage): Use CHECK_FLT_COVERAGE.
826 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
827 (mflt_find): Prototype adjusted.
828 (mflt_name): Extern it.
830 2007-09-14 Kenichi Handa <handa@m17n.org>
832 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
834 * font-flt.c (run_otf): Make debug info printing comaptible with
836 (run_command): Likewise.
837 (mfont__flt_run): Likewise.
839 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
840 invalid only when it's negative.
842 (run_command): Likewise.
843 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
845 2007-09-10 Kenichi Handa <handa@m17n.org>
847 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
848 (struct _MFLTFont): Prototype of get_glyph_id changed.
850 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
852 (GAPPEND): Delete this macro.
853 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
854 for the change of MFLTGlyph. Caller changed.
855 (run_otf): Simply calls font->get_glyph_id.
856 (run_command): Reset g->encoded and g->measured for direct code.
857 (positioning): Delete this function.
858 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
860 2007-09-07 Kenichi Handa <handa@m17n.org>
862 * draw.c (compose_glyph_string): Improve script detection.
864 2007-09-06 Kenichi Handa <handa@m17n.org>
866 * m17n-flt.h (mflt_get): Extern it.
868 * m17n-flt.c (run_stages): Call positioning only if
869 font->get_metric is non-NULL.
870 (CHECK_FLT_STAGES): Fix typo.
871 (mflt_get): New function.
873 * font-flt.c (mfont__flt_run): Improve debug info printing.
875 2007-09-04 Kenichi Handa <handa@m17n.org>
877 * m17n-flt.c (MFontLayoutTable): Delete this type.
878 (struct _MFLT): New member mdb and coverage.
879 (list_flt): Set flt->mdb.
880 (load_generator): Argument and return value changed. Caller
882 (get_font_layout_table): Delete this function.
883 (run_stages): Argument changed. Caller changed.
884 (CHECK_FLT_STAGES): New macro.
885 (mfont__flt_encode_char): Argument changed.
886 (mflt_find): Likewise.
887 (mflt_coverage): New function.
888 (mflt_run): Argument changed.
889 (mdebug_dump_flt): Likewise.
891 * m17n-flt.h (mflt_coverage): Extern it.
892 (mflt_find): Prototype adjusted.
894 2007-09-03 Kenichi Handa <handa@m17n.org>
896 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
898 * database.c (mdatabase__props): New function.
900 * database.h (mdatabase__props): Extern it.
902 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
904 (struct _MFLTFont): Add suitable_p.
905 (mflt_find): Extern it.
907 * m17n-flt.c: Include "database.h".
908 (struct _MFLT): New struct.
909 (list_flt): New function.
910 (load_flt): Don't update flt_list.
911 (get_font_layout_table): Use flt_list.
912 (m17n_init_flt): Don't initialize flt_list.
913 (m17n_fini_flt): Adjusted for the change of flt_list.
914 (mflt_find): New function.
915 (mflt_run): Fix debug printing.
917 2007-08-23 Kenichi Handa <handa@m17n.org>
919 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
920 (run_stages): Print separator in encoded string as "|".
922 2007-08-23 Kenichi Handa <handa@m17n.org>
924 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
925 the glyph is already handled by OTF.
927 2007-08-21 Kenichi Handa <handa@m17n.org>
929 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
931 2007-08-20 Kenichi Handa <handa@m17n.org>
933 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
936 2007-08-17 Kenichi Handa <handa@m17n.org>
938 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
940 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
941 (MFLTFont): Prototype of the member drive_otf adjusted.
943 * m17n-flt.c (run_stages): Fix handling of padding.
945 * font-ft.c (get_glyph_metric): New function.
946 (DEVICE_DELTA): Return 26.6 fixed point value.
947 (adjust_anchor): Likewise.
948 (mfont__ft_drive_otf): Use get_glyph_metric.
950 * font-flt.c (mfont__flt_run): Pay attention to padding on
953 2007-08-16 Kenichi Handa <handa@m17n.org>
955 * m17n-flt.c (run_stages): Fix typo.
957 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
959 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
960 Adjusted for the argument change of adjust_anchor. Calculte based
963 2007-08-15 Kenichi Handa <handa@m17n.org>
965 * charset.c (mcharset__load_from_database): Set mdebug_flag
966 instead of mdebug_mask.
968 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
971 * database.c (load_database): Set mdebug_flag instead of
973 (mdatabase__load_for_keys): Likewise.
975 * draw.c: Include "internal-flt.h".
976 (dump_combining_code): Don't subtract 128 from combining code
979 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
981 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
983 (run_cond): Likewise.
985 (run_command): Likewise.
986 (mfont__flt_run): Change format of debug info.
988 * font-ft.c: Include "internal-flt.h".
989 Set mdebug_flag instead of mdebug_mask.
990 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
992 * input.c: Set mdebug_flag instead of mdebug_mask.
993 (shift_state): New MDEBUG_FLAG macro.
994 (preedit_commit): Likewise.
997 * internal-flt.h: New file.
999 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
1000 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
1001 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
1002 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
1003 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
1004 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
1005 these macros to internal-flt.h.
1007 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
1009 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
1010 (enum MDebugMaskBit): Delete this enum.
1011 (enum MDebugFlag): New enum.
1012 (mdebug__flag): Don't extern it.
1013 (mdebug__flags): Extern it.
1014 (MDEBUG_FLAG): New macro.
1015 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
1016 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
1017 (MDEBUG_PRINT_TIME): Likewise.
1019 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
1020 (xfont_list): Likewise.
1022 * m17n-core.c (mdebug__flag): Delete this variable.
1023 (mdebug__flags): New variable.
1024 (SET_DEBUG_FLAG): Make it a function.
1025 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
1026 (m17n_fini_core): Likewise.
1028 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
1029 (m17n_fini_win): Likewise.
1031 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
1033 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
1034 (m17n_fini): Likewise.
1036 * symbol.c (msymbol__free_table): Adjusted for the change of
1039 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
1040 (BASICHEADERS): Add m17n-flt.h.
1041 (FLT_SOURCES): New variable.
1042 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
1043 (libm17n_flt_la_LDFLAGS): Likewise.
1045 * m17n-flt.h: New file.
1047 * m17n-flt.c: New file created by modifying font-flt.c.
1049 2007-07-13 Kenichi Handa <handa@m17n.org>
1051 * Version 1.4.0 released.
1053 2007-07-12 Kenichi Handa <handa@m17n.org>
1055 * input.c: Fix doxygen @ref commands.
1057 2007-07-10 Kenichi Handa <handa@m17n.org>
1059 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
1061 2007-07-09 Kenichi Handa <handa@m17n.org>
1063 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
1065 * m17n.h: Include m17n-core.h if not yet done. Use macros
1066 M17N_BEGIN_HEADER and M17N_END_HEADER.
1068 * m17n-gui.h: Likewise.
1070 * m17n-misc.h: Likewise.
1072 2007-06-13 Kenichi Handa <handa@m17n.org>
1074 * font-flt.c (load_command): Prepend "^" in the regular expression.
1076 2007-06-11 Kenichi Handa <handa@m17n.org>
1078 * language.c (mlanguage_name_list): Fix previous change.
1080 * coding.c (mcoding__load_from_database): Add aliases in
1081 coding_definition_list.
1083 2007-06-10 Kenichi Handa <handa@m17n.org>
1085 * language.c (mlanguage_name_list): Fix previous change.
1087 2007-06-08 Kenichi Handa <handa@m17n.org>
1089 * input.c (update_candidate): Copy candidate_list earlier.
1090 (re_init_ic): Provide pseudo initialize state if none.
1092 2007-06-05 Kenichi Handa <handa@m17n.org>
1094 * input.c (preedit_insert): Print debug information.
1096 * database.c (expand_wildcard_database): New function.
1097 (mdatabase_list): Fix handling of wildcard database.
1099 * language.c (load_lang_name): New function.
1100 (mlang__fini): Cancel the last two changes.
1101 (mlanguage_name_list): New arg script and territories. Use
1104 * m17n.h (mlangauge_name_list): Adjusted.
1106 2007-06-04 Kenichi Handa <handa@m17n.org>
1108 * input.c (open_im): Check if the input method has at least one
1111 2007-06-01 Kenichi Handa <handa@m17n.org>
1113 * input.c (shift_state): Change the format of debug print.
1114 (preedit_commit): New arg need_prefix. Caller changed.
1115 (update_candidate): Copy candidate_list.
1116 (take_action_list): Likewise.
1117 (handle_key): Change the format of debug print.
1119 * font-flt.c (load_flt): Ignore unknown directives.
1121 2007-05-25 Kenichi Handa <handa@m17n.org>
1123 * m17n-core.c (mdebug__unregister_object): Small optimization.
1125 * database.c (find_file): Merged into get_database_file.
1126 (get_database_file): New arg result. Caller changed.
1127 (mdatabase__check): Fix the logic.
1129 2007-05-24 Kenichi Handa <handa@m17n.org>
1131 * database.c (find_database): If unprocessed wildcard database is
1132 found, register database filed and recursively call find_database.
1133 (free_db_info): Unref db_info->properties.
1134 (register_database): New arg properties. Delete code for
1135 initializing mdatabase__list.
1136 (register_databases_in_files): Argument changed. Caller changed.
1137 (mdatabase__update): Don't list files by glob here.
1138 (mdatabase_list): If unprocessed wildcard database is found,
1139 register database filed and recursively call mdatabase_list.
1141 * database.h (enum MDatabaseStatus): New enum
1142 MDB_STATUS_AUTO_WILDCARD.
1144 * input.c (load_branch): Fix previous change.
1145 (update_global_info): If the global database is not found, return -1.
1147 2007-05-23 Kenichi Handa <handa@m17n.org>
1149 * database.c (Mversion): New variable.
1150 (mdatabase__init): Initialize it.
1151 (register_database): New arg properties. Caller changed.
1152 (register_databases_in_files): Don't check version here.
1153 (mdatabase__update): Likewise.
1155 * database.h (MDatabaseInfo): New member properties.
1157 2007-05-21 Kenichi Handa <handa@m17n.org>
1159 * language.c: Include <ctype.h>
1160 (mlanguage__info): Use strncasecmp (not memcmp).
1161 (mlanguage_name): Downcase language name for backward
1164 * input.c (filter): Don't check Mlanguage property of
1167 2007-05-18 Kenichi Handa <handa@m17n.org>
1169 * language.c (mlanguage_name): Fix it to handle M-text English
1172 * input.c (config_command): Set NAME before using it.
1173 (load_branch): Try to resolve a map name by variables.
1175 2007-05-17 Kenichi Handa <handa@m17n.org>
1177 * language.c (mlang__fini): Fix previous change.
1179 2007-05-16 Kenichi Handa <handa@m17n.org>
1181 * plist.c (free_plist): Cancel the last change.
1182 (write_element): Check if PLIST is nested.
1183 (mplist__from_plist): Label a plist as nested if appropriate.
1184 (mplist__from_alist): Label a plist as nested.
1185 (mplist__conc): Check the value of PL before referring it. Label
1186 a plist as nested if appropriate.
1187 (mplist_copy): Label a plist as nested if appropriate.
1188 (mplist_put_func): Return Mnil if KEY is a managing key.
1189 (mplist_push): Label a plist as nested if appropriate.
1191 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
1194 * language.c (mlang__fini): Unref each element of langname_list.
1196 2007-05-14 Kenichi Handa <handa@m17n.org>
1198 * language.c: Include <string.h> and <locale.h>.
1199 (langname_list): New variable.
1200 (load_lang_script_list): Exclude invalid list elements.
1201 (mlang__init): Initialize langname_list.
1202 (mlang__fini): Unref langname_list.
1203 (mlanguage__info): Adjusted for the change of English
1204 name (symbol->M-text).
1205 (mlanguage_name): Label it as obsolete.
1206 (mlanguage_name_list): New function.
1208 * m17n.h (mlanguage_name_list): Extern it.
1210 * locale.c (make_locale): Fix setting of members of locale.
1212 * plist.c (free_plist): Unref also nested plist.
1214 2007-05-11 Kenichi Handa <handa@m17n.org>
1216 * coding.c (mconv_reset_converter): Set internal->used to 0.
1218 2007-05-08 Kenichi Handa <handa@m17n.org>
1220 * input.c (check_description): Force copying the translated text.
1222 2007-05-02 Kenichi Handa <handa@m17n.org>
1224 * input.c (minput_save_config): Unref unnecessary plist. Use
1225 free_im_list to free im_config_list.
1227 2007-04-20 Kenichi Handa <handa@m17n.org>
1229 * input.c (config_command): Fix previous change again.
1230 (config_variable): Likewise.
1231 (minput_config_command): Fix for the case of setting back to
1233 (minput_config_variable): Likewise.
1234 (minput_save_config): Include nil as documentation of customized
1237 2007-04-05 Kenichi Handa <handa@m17n.org>
1239 * input.c (config_command): Fix previous change.
1240 (config_variable): Likewise.
1242 * plist.c (mplist_get_func): Fix for backward compatiblity.
1244 2007-04-04 Kenichi Handa <handa@m17n.org>
1246 * input.c (minput_get_command, minput_config_command): Fix example
1249 2007-03-29 Kenichi Handa <handa@m17n.org>
1251 These changes are to avoid unsafe casting of a function pointer.
1253 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1254 (struct MFace): New member hook.
1256 * face.c (serialize_face): Adjusted for the change of MFace.
1257 (deserialize_face): Likewise.
1258 (mface__init): Likewise. Use msymbol_put_func.
1259 (mface__realize): Adjusted for the change of MFace. Avoid
1261 (mface_get_prop): Adjusted for the change of MFace.
1262 (mface_put_prop): Likewise.
1263 (mface_get_hook): New function.
1264 (mface_put_hook): New function.
1265 (mface_update): Adjusted for the change of MFace.
1267 * input-gui.c (win_callback): Use mplsit_get_func.
1268 (minput__win_init): Use mplsit_put_func.
1270 * input.c (take_action_list): Use mplist_get_func.
1271 (init_ic_info): Likewise.
1272 (fini_ic_info): Likewise.
1273 (minput_callback): Likewise.
1274 (minput__init): Use mplist_put_func.
1276 * language.c (mlang__init): Use msymbol_put_func.
1278 * m17n-core.h (M17NFunc): New function type.
1279 (M17N_FUNC): New macro.
1280 (msymbol_put_func, msymbol_get_func): Extern them.
1281 (mplist_put_func, mplist_get_func): Extern them.
1283 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1285 * m17n-gui.c (mframe): Add a proper casting.
1287 * plist.h (struct MPlist): Make the member val a union.
1288 (MPLIST_VAL): Adjusted for the above change.
1289 (MPLIST_FUNC): New macro.
1290 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1292 * plist.c (mplist_put_func, mplist_get_func): New functions.
1294 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1295 (msymbol_put_func, msymbol_get_func): New functions.
1297 * textprop.c (mtext_serialize): Use msymbol_get_func.
1298 (mtext_deserialize): Likewise.
1300 2007-03-28 Kenichi Handa <handa@m17n.org>
1302 * input.c (get_candidate_list): Avoid unnecessary unref.
1304 2007-03-23 Kenichi Handa <handa@m17n.org>
1306 * database.c (mdatabase__update): Unref plist at the tail.
1308 2007-03-21 Kenichi Handa <handa@m17n.org>
1310 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1312 (config_command): Fix for the case that configuration is
1314 (config_variable): Likewise.
1315 (minput_config_command): If keyseqlist is an empty list, cancel
1317 (minput_config_variable) If value is an empty list, cancel the
1319 (minput_save_config): Handle cancellation of config and customize
1322 2007-03-15 Kenichi Handa <handa@m17n.org>
1324 * input.c (minput_config_variable): Check custom->vars (not
1327 2007-03-01 Kenichi Handa <handa@m17n.org>
1329 * input.c (reload_im_info): Setup cmds, vars, and title of
1331 (check_variable_value): Fix the return value.
1333 * database.c (mdatabase__check): If necessary, update database and
1336 2007-02-28 Kenichi Handa <handa@m17n.org>
1338 * database.c (get_dir_info): Set dir_info->status to
1339 MDB_STATUS_OUTDATED.
1340 (check_version): New function.
1341 (register_database): Don't call find_database.
1342 (register_databases_in_files): Don't register a database of
1344 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1346 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1347 and MDB_STATUS_OUTDATED.
1349 * font.h (struct MFont): Types of members type, source, and
1350 spacing changed to unsigned.
1352 * internal-gui.h (struct): Types of members category and type
1353 changed to unsigned.
1355 * internal.h (struct MText): Types of members format and coverage
1356 changed to unsigned.
1358 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1359 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1361 2007-02-23 Kenichi Handa <handa@m17n.org>
1363 * input.c (Mpop): New variable.
1364 (fully_initialize): Initialize Mpop.
1365 (parse_action_list): Handle Mpop.
1366 (take_action_list): Likewise.
1367 (handle_key): When a key is unhandled, shift to the initial state
1368 only if the current state has no branch action.
1370 2007-02-12 Kenichi Handa <handa@m17n.org>
1372 * input.c (get_preceding_char): Unref mt if necessary.
1373 (get_following_char): Likewise.
1374 (parse_action_list): Fix handling of `insert' action as
1376 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1377 (take_action_list): Check invalid candidate list.
1379 2007-02-06 Kenichi Handa <handa@m17n.org>
1381 * input.c (integer_value): Check also ic->produced for @-N.
1383 2007-01-26 Kenichi Handa <handa@m17n.org>
1385 * database.c (mdatabase__update): Check mdatabase__dir_list from
1388 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1390 2007-01-12 Kenichi Handa <handa@m17n.org>
1392 * input.c (handle_key): Handle a branch action of the initial
1395 2007-01-10 Kenichi Handa <handa@m17n.org>
1397 * m17n-gd.c (gd_render): Delete superfluous line.
1399 2006-12-26 Kenichi Handa <handa@m17n.org>
1401 * m17n.h (minput_callback): Extern it.
1403 * input.h (minput__callback): Delte extern.
1405 * input.c (get_surrounding_text): Adjusted for the change of
1406 minput__callback to minput_callback.
1407 (delete_surrounding_text): Likewise.
1408 (minput_create_ic): Likewise.
1409 (minput_destroy_ic): Likewise.
1410 (minput_filter): Likewise.
1411 (minput_set_spot): Likewise.
1412 (minput_toggle): Likewise.
1413 (minput_reset_ic): Likewise.
1415 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1416 and ic->candidate_to to 0.
1417 (minput_callback): Renamed from minput__callback.
1419 * input-gui.c (win_callback): Adjusted for the change of
1420 minput__callback to minput_callback.
1422 2006-12-15 Kenichi Handa <handa@m17n.org>
1424 * font-ft.c (ft_add_font): Fix typo.
1426 2006-12-06 Kenichi Handa <handa@m17n.org>
1428 * Version 1.3.4 released.
1430 2006-11-16 Kenichi Handa <handa@m17n.org>
1432 * input.c (parse_action_list): Allow (undo 0).
1433 (adjust_markers): New function.
1434 (preedit_insert, preedit_delete): Call adjust_markers.
1435 (preedit_replace): New function.
1436 (update_candidate): Call preedit_replace instead of preedit_insert
1438 (filter): When ic_info->commit_key_head is nonzero, shift input
1439 event keys even if there's no committed text.
1441 2006-11-10 Kenichi Handa <handa@m17n.org>
1443 * input.h (MInputContextInfo): New member commit_key_head.
1445 * input.c (preedit_commit): Update ic_info->commit_key_head.
1446 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1447 (filter): When committed, shift keys by ic_info->commit_key_head.
1449 2006-10-30 Kenichi Handa <handa@m17n.org>
1451 * input.c (preedit_delete): Fix typo.
1452 (take_action_list): Print more debugging information. Allow
1453 variable in arg of 'select' and `pushback'.
1455 * database.c (gen_database_name): Don't put extra space.
1456 (load_database): Print debugging information.
1457 (register_databases_in_files): New arg headlen. Callers changed.
1458 (mdatabase__load_for_keys): Shorten debugging information.
1459 (mdatabase_load): Don't print debugging information here.
1461 2006-10-27 Kenichi Handa <handa@m17n.org>
1463 * input.c (marker_code): New arg surrounding. Callers changed.
1464 (surrounding_pos): Check if name[0] == '@'.
1465 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1466 (take_action_list): Likewise.
1467 (get_preceding_char): If POS is zero, always call
1468 get_surrounding_text.
1470 2006-10-19 Kenichi Handa <handa@m17n.org>
1472 * input.c (load_variables): Fix setting of `global'.
1474 2006-10-16 Kenichi Handa <handa@m17n.org>
1476 * draw.c (draw_background): Be sure to set *to_x.
1477 (render_glyph_string): If from == to, just return.
1479 2006-10-18 Kenichi Handa <handa@m17n.org>
1481 * database.c (get_dir_info): Return NULL if the directory name is
1483 (register_databases_in_files): Call register_database with
1485 (mdatabase__update): Fix logic. Call register_database with
1487 (mdatabase_define): Call register_database with
1488 MDB_STATUS_EXPLICIT.
1490 * input.c (delete_surrounding_text): Be sure to set members
1491 preceding_text and following_text to NULL.
1492 (shift_state): Save variable values in ic_info->vars_saved.
1493 (preedit_commit): Don't print debug information here. Don't
1494 change ic_info->keys here.
1495 (get_candidate_list): Don't ref plist.
1496 (take_action_list): Don't unref return value of
1497 get_candidate_list. For undo, reset ic->produced and recover
1498 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1500 (init_ic_info): Set ic_info->vars_saved.
1501 (fini_ic_info): Unref ic_info->vars_saved.
1502 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1504 (filter): Be sure to set members preceding_text and following_text
1505 to NULL. Print debug information about produced text. Delete
1506 processed keys from ic_info->keys.
1508 * input.h (MInputContextInfo): New member vars_saved.
1510 2006-10-16 Kenichi Handa <handa@m17n.org>
1512 * database.c (mdatabase__update): Fix the way to get db_info.
1514 2006-10-02 Kenichi Handa <handa@m17n.org>
1516 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1517 `size' changed to 24.
1519 * font.c (xlfd_unparse_name): Adjusted for the change of
1521 (font_score): Likewise.
1522 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1524 * m17n-X.c (MFontX, _MFontX): Deleted.
1525 (SET_SIZE, HAVE_SIZE): Deleted.
1526 (free_display_info): Adjusted for the change of
1527 disp_info->font_list format.
1528 (xfont_registry_list): Likewise.
1529 (xfont_open): Likewise.
1530 (xfont_list): Likewise.
1531 (xfont_encode_char): Ignore size to find a realized font.
1532 (MRealizedFontXft): Change the order of members to make it
1533 compatible with MRealizedFontFT.
1535 2006-09-27 Kenichi Handa <handa@m17n.org>
1537 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1538 (mfont_close): Add comments.
1540 * mtext-lbrk.c (mtext_line_break): Add comment.
1542 2006-09-26 Kenichi Handa <handa@m17n.org>
1544 * input.c (minput_get_description): Handle description about
1545 inclusion-only input methods.
1547 2006-09-21 Kenichi Handa <handa@m17n.org>
1549 * input.c (M_gettext): New variable.
1550 (fully_initialize): Initialize M_gettext.
1551 (check_description): New function.
1552 (load_commands): Call check_description.
1553 (config_all_commands): Be sure to unref pl.
1554 (load_variables): Call check_description.
1555 (config_all_variables): Be sure to unref pl.
1556 (load_im_info): Call check_description.
1558 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1560 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1561 and bind_textdomain_codeset.
1563 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1565 2006-09-15 Kenichi Handa <handa@m17n.org>
1567 * input.c (reload_im_info): Update custom and global info.
1568 (init_ic_info): Fix previous change.
1570 2006-09-14 Kenichi Handa <handa@m17n.org>
1572 * database.c: Include <libgen.h>.
1573 (mdatabase__lock): Make a directory if necessary.
1575 * input.c (resolve_command): Adjusted for the format change of
1576 configured_cmds member.
1577 (load_commands, load_variables): Fix for errornous data handling.
1578 (config_command, config_variable): New function.
1579 (config_all_commands, config_all_variables): Renamed from
1580 config_commands and config_variables. Utilize the above function.
1581 (check_variable_value): Argument changed. Callers changed.
1582 (load_im_info): Call config_all_commands and config_all_variables.
1583 (init_ic_info): Adjusted for the format change of configured_vars
1585 (minput__init): Initialize Mcustomized, Mconfigured, and
1587 (Mcustomized, Mconfigured, Minherited): New variables.
1588 (minput_get_command): Be sure to return NULL if an input method
1589 use no local command.
1590 (minput_get_variable): Be sure to return NULL if an input method
1591 use no local variable.
1592 (minput_config_command, minput_config_variable)
1593 (minput_save_config): Adjusted for the format change of
1594 configured_cmds and configured_vars members.
1596 * plist.c (write_element): Delete superfluous ':'.
1598 2006-09-13 Kenichi Handa <handa@m17n.org>
1600 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1601 (minput_config_file): Extern it.
1603 * draw.c (Minherited): Declaration moved to input.c.
1604 (mdraw__init): Don't initialize Minherited here.
1606 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1608 2006-09-07 Kenichi Handa <handa@m17n.org>
1610 * textprop.c (mtext_serialize): Call mplist__serialize with the
1613 * plist.h (mplist__serialize): Prototype adjusted.
1614 (mplist__assq): Extern it.
1616 * plist.c: Include <ctype.h>
1617 (PUTC, PUTS): New macros.
1618 (write_symbol): New function.
1619 (write_element): New arg indent.
1620 (dump_string, dump_plist_element): Delete them.
1621 (mplist__from_string): New arg pretty.
1622 (mplist__assq): New function.
1623 (mdebug_dump_plist): Use write_element.
1625 * mtext.c (mtext_cat_char): Allocate more memory.
1626 (mdebug_dump_mtext): Don't escal a newline character.
1628 * m17n.h (minput_get_command, minput_get_variable)
1629 (minput_config_command, minput_config_variable)
1630 (minput_save_config): Extern them.
1632 * m17n-core.c: Include <string.h>.
1633 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1634 use the stream stdout instead of a file of that name.
1636 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1639 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1640 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1641 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1642 (MDEBUG_DUMP): Flush the stream.
1644 * input.h (struct _MInputMethodInfo): Delete member im. New
1645 members mdb, language, name, extra, cmds, configured_cmds,
1646 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1647 (MInputContextInfo): New member tick.
1649 * input.c: Big change to improve user-side input method
1650 customization. Here, list just public API changes.
1651 (minput_get_commands, minput_get_variables)
1652 (minput_assign_command_keys, minput_set_variable): Label them
1654 (minput_get_command, minput_get_variable)
1655 (minput_config_command, minput_config_variable)
1656 (minput_save_config): New functions.
1658 * database.h (PATH_MAX): Define it if not yet defined.
1659 (PATH_SEPARATOR): Likewise.
1660 (enum MDatabaseStatus): New enum.
1661 (struct MDatabaseInfo): Moved from database.c. New members status,
1662 time, lock_file, and uniq_file.
1663 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1664 (mdatabase__unlock): Extern them.
1666 * database.c: Include <time.h>.
1667 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1668 (GEN_PATH): Args changed. Callers changed.
1669 (struct MDatabaseInfo): Moved to database.h.
1670 (struct MDatabase, mdb_list): Deleted.
1671 (mdatabase__list): New var.
1672 (get_database_filename): Deleted. Callers changed to use
1674 (find_file, get_database_file): New files.
1675 (get_dir_info): Initialize new members of MDatabaseInfo.
1676 (find_database): Arg chagnded. Callers changed.
1677 (free_db_info, register_database, register_databases_in_files):
1679 (update_database_list): Deleted.
1680 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1681 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1682 (mdatabase__update): New function.
1683 (mdatabase__check): Return value changed.
1684 (mdatabase__file, mdatabase__lock, mdatabase__save)
1685 (mdatabase__unlock): New functions.
1687 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1689 * input.c (get_surrounding_text): Return -2 when surrounding text
1691 (get_following_char): Likewise.
1692 (get_preceding_char): Likewise.
1693 (minput__callback): Return 0 if there is a callback function,
1696 2006-08-17 Kenichi Handa <handa@m17n.org>
1698 * input.c (reset_ic): Use shift_state to setup the current state.
1700 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1702 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1703 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1704 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1706 2006-08-02 Kenichi Handa <handa@m17n.org>
1708 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1710 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1712 * font-ft.c (ft_encapsulate): Add code for debugging.
1713 (mfont__ft_drive_otf): Be sure to encode character before getting
1716 2006-07-21 Kenichi Handa <handa@m17n.org>
1718 * draw.c (mdraw_text_extents): Fix previous typo.
1720 2006-07-19 Kenichi Handa <handa@m17n.org>
1722 * draw.c (gstring_width): New arg lbearing.
1723 (render_glyph_string): Adjusted for the change of gstring_width.
1724 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1726 * m17n-core.h (Mlanguage): Extern it.
1728 * m17n.h (Mlanguage): Extern deleted.
1730 * mtext.c (mtext__init): Initialize Mlanguage.
1731 (Mlanguage): Declaration moved from locale.c
1733 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1734 (Mlanguage): Declaration moved to mtext.c.
1736 * language.c (mlang__init): Don't initialize Mlanguage here.
1738 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1740 2006-07-14 Kenichi Handa <handa@m17n.org>
1742 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1743 (MRealizedFontFT): New member face_encapsulated.
1744 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1745 (ft_gen_font): New function.
1746 (ft_add_font): Use ft_gen_font.
1747 (ft_list_script): Store lists in ft_script_list.
1748 (ft_check_otf): New arg ft_face. Caller changed.
1749 (ft_check_language): Likewise.
1750 (ft_check_script): Likewise.
1751 (ft_encapsulate, ft_close): New functions.
1752 (mfont__ft_driver): Initialize members encapsulate and close.
1753 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1755 * font.h (struct MRealizedFont): New member encapsulating.
1756 (struct MFontDriver): New members encapsulate and close.
1758 * font.c (mfont__match_p): If FONT is realized, check capability
1759 by font drivers's check_capability method.
1760 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1763 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1764 declarations of foundry and fam local vars.
1765 (xft_driver): Make it static.
1767 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1768 (mfont_close): Extern them.
1770 * m17n-gd.c (device_open): Don't specify foundry and family of the
1773 2006-07-11 Kenichi Handa <handa@m17n.org>
1775 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1777 2006-07-13 Kenichi Handa <handa@m17n.org>
1779 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1781 (ft_check_script): Delete unused var.
1782 (ft_list_capability): Likewise.
1784 * font.c (mfont__get_capability): Setup cap->otf.
1785 (Motf): Make it global.
1786 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1788 * font.h (MFontCapability): New member otf.
1790 * language.c (mlang__fini): Delete unused vars.
1792 * m17n-gui.h (Motf): Extern it.
1794 * database.c (update_database_list): Delete unused vars.
1796 2006-07-07 Kenichi Handa <handa@m17n.org>
1798 * font-ft.c (DEVICE_DELTA): Fix typo.
1800 2006-07-06 Kenichi Handa <handa@m17n.org>
1802 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1805 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1807 * database.c: Update comments.
1809 2006-07-05 Kenichi Handa <handa@m17n.org>
1811 * database.c (PATH_MAX): Define it if not yet defined.
1812 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1814 (get_database_filename): Use GEN_PATH.
1815 (get_dir_info): Don't include the last '/' in directory name.
1816 (register_database): New function.
1817 (update_database_list): Use register_database. Search all
1818 directories in mdatabase__dir_list for wildcard databases.
1819 (mdatabase__init): Check "~/.m17n.d".
1821 2006-07-03 Kenichi Handa <handa@m17n.org>
1823 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1824 push reverse property.
1826 * plist.c (dump_plist_element): Fix previous change.
1828 2006-06-28 Kenichi Handa <handa@m17n.org>
1830 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1833 * draw.c (MbidiNSM): New variable.
1834 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1835 attention to bidi type NSM.
1836 (mdraw__init): Initialize MbibiNSM.
1838 * language.c (mscript__char_list): Fix finding a char-list element.
1840 * plist.c (dump_string): Return number of printed characters.
1841 (dump_plist_element): Print elements more compactly.
1843 2006-06-23 Kenichi Handa <handa@m17n.org>
1845 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1846 (include_HEADERS): Likewise.
1848 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1850 * language.c: Update documentation.
1852 2006-06-23 Kenichi Handa <handa@m17n.org>
1854 * font-ft.c (struct MFontFT): Delete member lang.
1855 (free_ft_info): Don't unref member lang. Destroy members langset
1857 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1858 changed. Set members langset and charset.
1859 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1861 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1863 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1864 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1865 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1866 characters at first. If it fails, try listing by language names.
1867 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1868 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1869 change of MFontCapability.
1870 (ft_list_capability): Likewise. Try listing by languages, then by
1871 scripts. Check OTF at last.
1872 (ft_check_script): New function.
1873 (ft_select): Adjusted for the check of MFontCapability.
1874 (ft_list_family_names): New function.
1875 (ft_check_capability): If cap->script is not Mnil, call
1877 (mfont__ft_driver): Initialize with ft_list_family_names.
1879 * font.h (struct MFontDriver): New member list_fmaily_names.
1880 (struct): Change member "MSymbol *lang" to "MSymbol language".
1882 * font.c: Include "language.h".
1883 (Motf): New variable.
1884 (otf_script_list, load_otf_script_list): Delete it.
1885 (find_script_from_otf_tag): Delete it.
1886 (merge_capability): New function.
1887 (mfont__init): Init Motf.
1888 (mfont__fini): Don't unref otf_script_list.
1889 (free_font_capability): Check cap->script_tag to determine if
1890 OTF-related capability is set.
1891 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1892 the change of type MFontCapability.
1893 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1894 and Motf properties.
1895 (mfont_list): Call merge_capability for LANGUAGE arg.
1896 (mfont_list_family_names): New function.
1898 * input-gui.c: Typo in comments fixed.
1900 * input.c: Typo in comments fixed.
1902 * language.h (mlanguage__list): Delete it.
1903 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1906 * language.c: Include "mtext.h".
1907 (M_script_lang_list): Delete it.
1908 (language_list, script_list): New variables.
1909 (load_lang_script_list, init_language_list, init_script_list): New
1911 (mlang__init): Don't load language database here.
1912 (mlang__fini): Unref language_list and script_list if not NULL.
1913 (mlanguage__list): Delete it.
1914 (mlanguage__info, mscript__info, mscript__char_list)
1915 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1916 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1917 (mscript_list, mscript_language_list): New functions.
1919 * m17n-gui.h (mfont_list_family_names): Extern it.
1921 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1922 (mlanguage_text, mscript_list, mscript_language_list): Extern
1925 2006-06-21 Kenichi Handa <handa@m17n.org>
1927 * m17n-X.c (xfont_driver): Initialize with
1928 xfont_list_family_names.
1929 (xfont_list_family_names): New function.
1930 (xft_driver): Initialize with NULL for list_family_names member.
1931 (device_init): Set list_family_names member of xft_driver to that
1932 of mfont__ft_driver.
1934 2006-06-06 Kenichi Handa <handa@m17n.org>
1936 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1938 2006-03-24 Kenichi Handa <handa@m17n.org>
1940 * font-ft.c (ft_open): Improve debug message.
1942 * fontset.c (mfontset__get_font): Fix for the case that no font in
1943 per_script list is available.
1945 2006-02-06 Kenichi Handa <handa@m17n.org>
1947 * Version 1.3.3 released.
1949 2006-02-22 Kenichi Handa <handa@m17n.org>
1951 * textprop.c: Fix some typos in documentation.
1953 * plist.c: Fix some typos in documentation.
1955 * m17n-core.h: Fix some typos in documentation.
1956 (M17NLIB_PATCH_LEVEL): Updated to 3.
1957 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1959 * symbol.c: Fix some typos in documentation.
1961 * mtext.c: Fix some typos in documentation.
1963 * input.c: Fix several typos in documentation.
1965 2006-02-06 Kenichi Handa <handa@m17n.org>
1967 * Version 1.3.2 released.
1969 2006-02-03 Kenichi Handa <handa@m17n.org>
1971 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1972 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1974 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1976 * draw.c (layout_glyphs): Fix handling left_padding of
1979 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1981 2006-02-02 Kenichi Handa <handa@m17n.org>
1983 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1984 if WITH_GUI is true.
1986 2006-01-25 Kenichi Handa <handa@m17n.org>
1988 * input.c (resolve_expression): If the value of PLIST is a plist,
1989 but the first element is not symbol, return 0.
1991 2006-01-17 Kenichi Handa <handa@m17n.org>
1993 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1994 HAVE_GD is 2 or the greater.
1996 2006-01-16 Kenichi Handa <handa@m17n.org>
1998 * Version 1.3.1 released.
2000 2006-01-16 Kenichi Handa <handa@m17n.org>
2002 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
2003 simulating anti-aliasing.
2005 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
2006 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
2008 2006-01-12 Kenichi Handa <handa@m17n.org>
2010 * input.c (get_surrounding_text): Always pop ic->plist.
2011 (reset_ic): Don't reset ic->plist.
2013 2006-01-10 Kenichi Handa <handa@m17n.org>
2015 * input.c (preedit_commit): For debugging, print only commiting
2016 charactes. Don't set ic->candidate_show to 0.
2017 (handle_key): Don't run branch-actions just by shifting to the
2019 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
2020 Reset vars and plist.
2022 2006-01-07 Kenichi Handa <handa@m17n.org>
2024 * input.c (load_branch): Confirm that maps is not NULL.
2026 2006-01-05 Kenichi Handa <handa@m17n.org>
2028 * input-gui.c (win_filter): Try to convert arg to key only when
2031 * plist.c (read_integer_element): If '#' and '-' are followed by
2032 non-integer-constituent, read them as a part of a symbol.
2033 (read_symbol_element): New arg C.
2034 (read_element): Adjust args to read_symbol_element.
2036 * input.c (load_macros): On overwriting a macro, free the old
2038 (minput__init): Store Mmap in load_im_info_keys.
2039 (minput_get_title_icon): If the input method has no title, be sure
2041 (minput_get_description): If the input method has no description,
2042 be sure to return NULL.
2043 (minput_get_variables): Fix documentation.
2044 (handle_key): Pay attention to the case that key is Mnil.
2045 (filter): Likewise. Fix handling of such symbol as S-A.
2047 2005-12-22 Kenichi Handa <handa@m17n.org>
2049 * Version 1.3.0 released.
2051 2005-12-22 Kenichi Handa <handa@m17n.org>
2053 * font-ft.c (ft_list): If the specified font has no property,
2056 2005-12-20 Kenichi Handa <handa@m17n.org>
2058 * character.c (mchar_get_prop): Check char_prop_list.
2059 (mchar_put_prop, mchar_get_prop_table): Likewise.
2061 2005-12-18 Kenichi Handa <handa@m17n.org>
2063 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
2064 file name sans language.
2066 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
2068 * input.c: Fix typo in comments.
2070 2005-12-14 Kenichi Handa <handa@m17n.org>
2072 * input.c (minput_get_title_icon): Check the default icon for the
2075 2005-12-13 Kenichi Handa <handa@m17n.org>
2077 * input.c (Mless_equal, Mgreater_equal): New variables.
2078 (parse_expression, resolve_expression, parse_action_list)
2079 (take_action_list): Handle the aboves.
2080 (filter): Treat key S-X as X.
2081 (minput__init): Initialize Mless_equal and Mgreater_equal.
2082 (minput_get_title_icon): New function.
2084 * m17n.h (minput_get_title_icon): Extern it.
2086 * database.c (get_database_filename): Return a filename instead of
2088 (load_database): Adjusted for the above change.
2089 (mdatabase__load_for_keys): Likewise.
2090 (mdatabase__find_file): New function.
2092 * database.h (mdatabase__find_file): Extern it.
2094 * font.h (mfont__resize): Delete extern.
2096 * font.c (mfont__list): Check resize ratio.
2097 (mfont__resize): Delete it.
2098 (mfont_resize_ratio): Include the code of mfont__resize.
2100 * font-ft.c (ft_open): Check resize ratio.
2102 * m17n-X.c (xfont_open): Check resize ratio.
2103 (xft_open): Likewise.
2105 2005-12-07 Kenichi Handa <handa@m17n.org>
2107 * input.c (take_action_list): If take_action_list return -1,
2109 (handle_key): Likewise.
2111 * face.c (mface__for_chars): When font is specified and layouter
2112 is found for it, if the layouter doesn't support one of a
2113 character, use a face sans layouter for it.
2115 2005-12-06 Kenichi Handa <handa@m17n.org>
2117 * fontset.c (mfont__lookup_fontset): If only a fallback font is
2118 found, don't use it for more than one character.
2120 2005-12-05 Kenichi Handa <handa@m17n.org>
2122 * face.c (mface__realize): Set rfont->layouter to Mnil.
2123 (mface__for_chars): Fix handling of layouter.
2125 * character.h (mchar__define_prop): Extern it.
2127 * database.c (update_database_list): Call mchar__define_prop if
2130 * character.c (mchar__init): Don't call mchar_define_property.
2131 Instead just initialize property keys.
2132 (mchar__fini): Free char_prop_list only if it's not NULL.
2133 (mchar__define_prop): New function.
2134 (mchar_define_property): Call mchar__define_prop.
2136 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
2139 2005-12-02 Kenichi Handa <handa@m17n.org>
2141 * language.c (mlang__init): Handle extra chars.
2143 * m17n-gui.h (mfont_check): Adjust prototype.
2145 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
2146 (xfont_check_capability): New function.
2147 (xft_driver): Specify xft_check_capability.
2148 (xft_check_capability): New function.
2150 * font-ft.c (M0_3): Delete it.
2152 (ft_get_charmaps): Refer to M0.
2153 (fc_parse_pattern): Fix previous change.
2154 (ft_list_language): Check also extra chars.
2155 (ft_check_otf): Define it even if HAVE_OTF is undef.
2156 (ft_check_lang): Check the result of FcLangSetHasLang against
2157 FcLangDifferentLang. Check also extra chars.
2158 (ft_list_capability): Delete ifdef HAVE_OTF.
2159 (ft_select): Likewise.
2160 (ft_open): Improve debug information.
2161 (ft_check_capability): New function.
2162 (mfont__ft_driver): Specify ft_check_capability.
2163 (mfont__ft_init): Initialize M0.
2165 * fontset.c (get_font_from_group): New function.
2166 (mfontset__get_font): New function.
2168 * fontset.h (mfontset__get_font): Extern it.
2170 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
2171 (mfont__fini): Delete ifdef HAVE_OTF.
2172 (free_font_capability): Likewise.
2173 (mfont__get_capability): Likewise.
2174 (mfont__check_capability): New function.
2175 (mfont_check): Change the order of arguments. Use
2178 * font.h (struct MFontDriver): New member check_capability.
2179 (MFontCapability): Delete ifdef HAVE_OTF.
2180 (mfont__check_capability): Extern it.
2182 * face.c (mface__realize): Fix handling of FONT arg.
2183 (mface__for_chars): Fix handling of explicitly specified font.
2185 2005-11-25 Kenichi Handa <handa@m17n.org>
2187 * font-flt.c (run_command): Print debug info for
2190 * draw.c (layout_glyphs): Fix handling of left/right_padding.
2192 * face.c (mface__for_chars): Check rfont before accessing the
2195 2005-11-21 Kenichi Handa <handa@m17n.org>
2197 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
2200 * fontset.c (fontset_table): New variable.
2201 (free_fontset): Call M17N_OBJECT_UNREGISTER.
2202 (mfont__fontset_init): Add fontset_table as an object array.
2203 (mfont__realize_fontset): Ref FONTSET.
2204 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2205 (mfontset): Call M17N_OBJECT_REGISTER.
2206 (mfontset_copy): Likewise.
2208 * input.c (handle_key): For debugging, print information about
2210 (filter): Add an alias for Meta and Alt modifiers.
2211 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2213 (minput__init): Initialize them.
2214 (parse_expression): New function.
2215 (resolve_expression): New function.
2216 (parse_action_list): Handle expressions by parse_expression.
2217 (take_action_list): Handle expressions by resolve_expression.
2218 (parse_nested_list_value): Fix previous change.
2219 (resolve_command): Fix handling of the return value of
2222 2005-11-18 Kenichi Handa <handa@m17n.org>
2224 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2225 HAVE_OTF is defined.
2226 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2228 (ft_select): Likewise.
2230 * font.c (mfont_list): Fix for the case that FONT is NULL.
2231 (OTF_tag): Delete it.
2232 (load_otf_script_list): Define only when HAVE_OTF is defined.
2233 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2236 * draw.c (truncate_gstring): Be sure to truncate at
2237 glapheme-cluster boundary.
2239 2005-11-11 Kenichi Handa <handa@m17n.org>
2241 * input.c (delete_surrounding_text): Clear cache if necessary.
2243 2005-11-09 Kenichi Handa <handa@m17n.org>
2245 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2246 glyph prev is also supported by the current flt.
2248 2005-11-08 Kenichi Handa <handa@m17n.org>
2250 * m17n-X.c (xft_render): Cancel previous change.
2252 2005-11-07 Kenichi Handa <handa@m17n.org>
2254 * input.c: Include <stdlib.h>.
2255 (get_surrounding_text, delete_surrounding_text)
2256 (get_preceding_char, get_following_char): New functions.
2257 (integer_value): New arg surrounding. If it is nonzero, try to
2258 get a surrounding character. Callers changed.
2259 (take_action_list): Check `value' before setting an element.
2260 (destroy_ic): Unref ic_info->preceding_text and
2261 ic_info->following_text.
2262 (minput__init): Initialize Minput_get_surrounding_text and
2263 Minput_delete_surrounding_text.
2264 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2266 (filter): Unref ic_info->preceding_text and
2267 ic_info->following_text.
2269 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2272 * input.h (MInputContextInfo): New members preceding_text and
2275 2005-11-04 Kenichi Handa <handa@m17n.org>
2277 * input.c (parse_nested_list_value): Fix handling of the global
2279 (get_nested_list): Get global definitions by load_partial_im_info.
2280 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2281 MInputCandidatesChanged.
2282 (take_action_list): Likewise.
2283 (reset_ic): Likewise.
2284 (create_ic): Don't pay special attention to
2285 Mcandidates_group_size.
2286 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2287 (minput_set_variable): Get a definition of varible by
2288 mplist_find_by_value, not mplist_get.
2290 * m17n.h (enum MInputCandidatesChanged): New enum.
2292 2005-11-01 Kenichi Handa <handa@m17n.org>
2294 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2296 (mwin__destroy_window): If xft_draw's drawable is win, change it
2297 to device->drawable before destroying win.
2299 2005-10-31 Kenichi Handa <handa@m17n.org>
2301 * input.c (load_im_info): Fix adding of state.
2303 * m17n-core.c (m17n_fini_core): Fix reporting of module
2306 * m17n.c (m17n_fini): Fix reporting of module finalization.
2308 * m17n-gui.c (m17n_init_win): Fix reporting of module
2311 2005-10-29 Kenichi Handa <handa@m17n.org>
2313 * input.c (get_candidate_list): Fix the timing of referring plist.
2315 2005-10-28 Kenichi Handa <handa@m17n.org>
2317 * input.c (load_branch): Ignore an undefined map name.
2318 (load_im_info): Set im_info->title from `name' only if it's not
2320 (shift_state): Always update ic->status.
2321 (adjust_candidates): Renamed from adjust_candidate_command.
2322 Argument changed. Caller changed.
2323 (get_candidate_list, regularize_action): New functions.
2324 (take_action_list): Use them. On handling Munhandle, don't set
2326 (handle_key): If KEY is not handled by MAP, and MAP has
2327 branch_actions, perform them.
2329 * database.c (mdatabase__fini): Free dir_info->filename;
2331 2005-10-20 Kenichi Handa <handa@m17n.org>
2333 * input.c (marker_code): Accept '@@'.
2334 (integer_value): Handle '@@'.
2335 (parse_action_list): Accept a symbol argument.
2336 (take_action_list): Resolve the symbol argument. Handle the
2339 2005-10-18 Kenichi Handa <handa@m17n.org>
2341 * input.c: Include "charset.h".
2342 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2344 (MIMState): New member (M17NObject control).
2345 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2346 (get_nested_list, resolve_variable): New functions.
2347 (integer_value): New arg (MPlist **value). Set it to the plist
2348 element containing the value.
2349 (resolve_command): New function.
2350 (load_translation): New arg (MPlist *map_actions).
2351 (load_branch): New args language and name. If `keylist' is a
2352 symbol, resolved that as a command name.
2353 (free_map): New arg top. Free map->map_actions only if top is
2355 (free_state): New function.
2356 (load_state): New arg name.
2357 (im_info_list): New variable.
2358 (free_im_info, get_im_info_by_tags): New functions.
2359 (load_im_info): Arg key changed to plist. Handle `include'.
2360 Return (MInputMethodInfo *).
2361 (preedit_commit): Ref ic->candidate_list.
2362 (get_select_charset, adjust_candidate_command): New functions.
2363 (take_action_list): Handle `include'. Adjust candidate action
2364 properly. Handle control variables `candidates-charset' and
2365 `candidates-group-size'.
2366 (open_im): Use get_im_info.
2367 (create_ic): Get global variables.
2368 (load_partial_im_info): New function.
2369 (get_im_info): New function.
2370 (check_command_keyseq, check_command_list, check_variable_list):
2372 (minput__init): Don't handle M_database_hook and Mdetail_text.
2373 Initialize M_candidates, Mcandidates_group_size,
2374 Mcandidates_charset.
2375 (parse_variable_list, get_variable_list, parse_command_list)
2376 (get_command_list): Delete them.
2377 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2378 (minput__fini): Simply unref command_list and variable_list.
2379 (minput_get_description): Adjusted for the new form of description.
2380 (minput_get_commands): Use get_nested_list.
2381 (minput_assign_command_keys): Likewise.
2382 (minput_get_variables, minput_set_variable): Likewise.
2384 * input.h (MInputMethodInfo): New members im and maps.
2386 * database.h (M_database_hook): Delete extern.
2387 (MDatabaseHookFunc): Delete extern.
2388 (mdatabase__check): Extern it.
2390 * database.c: Include <glob.h>.
2391 (MAX_TIME): New macro.
2392 (Masterisk): New variable.
2393 (get_database_stream): Argument changed to (MDatabaseInfo *).
2395 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2396 (find_database): New function.
2397 (update_database_list): New function.
2398 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2399 calling update_database_list.
2400 (mdatabase__check): New function.
2401 (mdatabase_find): Use update_database and find_database. Don't
2402 handle MDatabaseHookFunc.
2403 (mdatabase_list): Call update_database at first.
2404 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2405 (MDatabaseList): New type.
2407 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2409 * m17n.h (Mdetail_text): Delete extern.
2411 * m17n-core.h (mplist_conc): Delete extern.
2413 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2415 (mplist_conc): Renamed to mplist__conc.
2416 (mplist__pop_unref): New function.
2418 2005-10-14 Kenichi Handa <handa@m17n.org>
2420 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2422 (read_element): If keys is an empty plist, return any element
2424 (dump_plist_element): Check if plist is nested.
2425 (mplist_conc): Always ref tail.
2426 (mplist_set): If key is a managing key, ref val in advance.
2428 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2429 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2430 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2433 * fontset.c (free_fontset): Unref fontset_list if necessary.
2434 (mfont__fontset_fini): Don't free fontset_list. Unref
2436 (mfont__realize_fontset): Initialize request.
2437 (mfontset): Ref default_fontset or fontset only if necessary.
2438 (mfontset_copy): Don't ref copy.
2440 * draw.c (render_glyphs): Check gend->type before checking
2443 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2444 unrefed plists to NULL.
2446 2005-10-04 Kenichi Handa <handa@m17n.org>
2448 * textprop.c (mtext_serialize): Be sure to make mt
2449 MTEXT_FORMAT_UTF_8 and NULL terminated.
2451 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2453 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2455 2005-10-03 Kenichi Handa <handa@m17n.org>
2457 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2458 is not at the beginning of line.
2460 2005-09-22 Kenichi Handa <handa@m17n.org>
2462 * input.c: Include <sys/stat.h> and <unistd.h>.
2463 (Minclude, Mcommit, Munhandle): New variables.
2464 (minput__init): Initialize them. Push only Mstate to
2465 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2466 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2468 (load_input_method): Handle "include" directive. If no states are
2470 (shift_state): If state_name is Mt, shift back to the previous
2471 state. Call preedit_commit to commit preedit text.
2472 (preedit_commit): New function.
2473 (take_action_list): Improve debug printing. Handle commit and
2475 (handle_key): Check the return value of take_action_list. Don't
2476 take branch_actions just after changing to the root map.
2477 (reset_ic): Reset all ic_info members.
2478 (filter): When a key is not handled, just move ic_info->keys
2479 instead fo calling reset_ic.
2480 (load_im_info): If key is not Mstate, push Mmap to
2482 (MDatabaseStatList): New type.
2483 (imdir_stat_list): New variable.
2484 (input_method_hook): Don't cancel the hook. Check the
2485 modification time of directories.
2486 (minput__fini): Free imdir_stat_list;
2488 * input.h (MInputContextInfo): New member prev_state.
2490 * m17n-core.h (mplist_conc): Extern it.
2492 * plist.c (mplist_conc): New function.
2494 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2496 * font.h (MRealizedFont): New member average_width.
2498 * font-ft.c (ft_open): Set rface->average_width.
2500 * font.c (xlfd_unparse_name): Print '*' before registry name.
2502 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2503 (xfont_open): Set rfont->average_width.
2504 (xft_open): Likewise.
2505 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2507 * internal-gui.h (struct MFrame): New member average_width.
2509 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2510 (mframe_get_prop): Return the average_width of a font.
2512 * face.c (mface__realize): Set rface->average_width.
2513 (mface__update_frame_face): Set frame->average_width.
2515 * face.h (MRealizedFace): New member average_width.
2517 2005-09-19 Kenichi Handa <handa@m17n.org>
2519 * font.c (xlfd_unparse_name): New arg full_xlfd.
2520 (mfont__encode_char): Use shortcut only for X core fonts.
2521 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2522 (mfont_put_prop): Handle `language' property.
2523 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2524 Print file can capability info too.
2526 * m17n-core.c (mdebug__output): New variable.
2527 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2528 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2529 (m17n_fini_core): Close mdebug__output if it's not stderr.
2531 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2532 (xfont_open): Handle baseline_offset.
2533 (xfont_find_metric): Likewise.
2534 (xfont_render): Likewise.
2535 (xft_open): Likewise.
2536 (xft_render): Likewise.
2538 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2539 (mdebug__output): Extern it.
2540 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2541 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2542 (MDEBUG_DUMP): New macro.
2543 (MDEBUG_PRINT_TIME): Print to medebug__output.
2545 * font.h (MRealizedFont): New member baseline_offset.
2547 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2549 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2550 (ft_list_family): Check alias.
2551 (ft_list_language): If language is "en", don't try to the second
2553 (ft_default_list): New variable.
2554 (ft_list_default): New function.
2555 (ft_select): If family is not specified, try only the default
2556 fonts. Treat the weights normal and medium same.
2557 (ft_open): Fix debug message. If registry is not specified, try
2558 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2559 (ft_find_metric): Likewise.
2560 (ft_render): Likewise.
2561 (ft_list): Fix debug message. Accept the registring iso8859-1.
2562 If family is not specified, try only the default fonts.
2564 * face.c (mface__realize): Fix logic of opening a font.
2566 2005-09-16 Kenichi Handa <handa@m17n.org>
2568 * face.c (mface__realize):
2570 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2573 * input.c (shift_state): Fix the condition of taking init actions.
2574 (take_action_list): Fix handling of pushback action.
2575 (handle_key): Don't change key while checking its alias.
2576 (minput__init): Initialize new variables.
2577 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2580 2005-09-12 Kenichi Handa <handa@m17n.org>
2582 * mtext.c (mtext__uppercase): Add proper open/close parens.
2583 (mtext_titlecase): Add proper casting.
2585 * input.c (parse_action_list): Handle the case that the arg is a
2586 key sequence (MText or MPlist).
2587 (take_action_list): Likewise.
2588 (shift_state): Shorter debug message.
2589 (handle_key): Terminate a debug message by "\n".
2590 (reset_ic): Don't take initial actions here.
2591 (minput_open_im): Print a debug message.
2592 (minput_close_im): Likewise.
2593 (minput_create_ic): Likewise.
2594 (minput_destroy_ic): Likewise.
2596 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2598 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2601 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2602 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2605 * character.c: Add Japanese documentation for
2606 mchar_get_prop_table ().
2608 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2610 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2611 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2612 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2614 (init_case_conversion): New function.
2615 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2616 (uppercase_precheck, lowercase_precheck, final_sigma)
2617 (after_soft_dotted, more_above, before_dot, after_i)
2618 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2620 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2622 * plist.c (read_mtext_element): Fix previous change.
2624 2005-09-05 Kenichi Handa <handa@m17n.org>
2626 * plist.c (read_mtext_element): Handle \uXXXX notation.
2628 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2629 (MTABLE_ALLOCA): Change the name of local variable.
2631 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2632 HAVE_FREETYPE are defined.
2634 * m17n-X.c: Check HAVE_X11.
2636 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2637 directory listing libraries.
2638 (noinst_PROGRAMS): Define it only in maintainer mode.
2640 2005-09-02 Kenichi Handa <handa@m17n.org>
2642 * m17n-gui.h (mdraw_line_break_option): Extern it.
2644 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2645 end of the first glyph.
2646 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2648 (mdraw_line_break_option): New variable.
2649 (mdraw_default_line_break): Use mtext_line_break.
2651 * mtext.h (wordseg_func_table): Don't extern it.
2652 (mtext__wseg_fini): Extern it.
2654 * mtext.c: Don't include word-thai.h.
2655 (wordseg_func_table): Delete this variable.
2656 (mtext__init): Don't initialize above. Don't call
2657 mtext__word_thai_init.
2658 (mtext__fini): Don't free wordseg_func_table. Call
2659 mtext__wseg_fini instead fo mtext__word_thai_fini.
2660 (MTextWordsegFunc): Don't typedef it.
2661 (mtext__word_segment): Moved to mtext-wseg.c.
2663 * m17n-core.h (enum MTextLineBreakOption): New enum.
2664 (mtext_line_break): Extern it.
2666 * mtext-wseg.c: New file.
2668 * mtext-lbrk.c: New file.
2670 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2671 add mtext-lbrk.c and mtext-wseg.c.
2673 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2674 the case that head is NULL.
2676 2005-09-01 Kenichi Handa <handa@m17n.org>
2678 * word-thai.c (wordseg_propertize): If the property value is nil,
2679 don't make the property no-merge.
2680 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2681 attention to the case that they are NULL.
2682 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2685 * character.c (mchar_get_prop_table): New function.
2687 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2689 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2690 (mchar_get_prop_table): Extern it.
2692 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2693 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2695 * internal.h (enum MTextCoverage): New enum.
2696 (MText): New member coverage.
2698 * mtext.c (FORMAT_COVERAGE): New macro.
2699 (insert): Copy mt2->coverage.
2700 (mtext__from_data): Initialize mt->coverage.
2701 (mtext__adjust_format): Update mt->coverage.
2702 (mtext): Initialize mt->coverage.
2703 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2704 Update mt->coverage if necessary.
2705 (mtext_duplicate): Copy mt->coverage.
2706 (mtext_insert, mtext_replace): New functions.
2707 (mtext_dup): Use mtext_duplicate.
2708 (mtext__word_segment): Don't set *from and *to if a word
2709 segmentation funcion is not found.
2710 (mtext_ins_char): Fix typo.
2712 2005-08-25 Kenichi Handa <handa@m17n.org>
2714 * font.h (MFont): New member for_full_width.
2716 * font.c (compare_font_score): Prefer a font of not
2719 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2720 registry charset of a font is one of CJK charsets.
2722 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2723 supports some of CJK.
2725 2005-08-24 Kenichi Handa <handa@m17n.org>
2727 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2729 * m17n-gui.c (null_device_open): Check Mresolution param and set
2732 * m17n-gd.c (device_open): Check Mresolution param and set
2735 * m17n-X.c (MWDevice): New member resy.
2736 (xfont_open): Set ascent, descent, and max_advance members of
2738 (xft_open): Likewise.
2739 (device_open): Compare also screen_num to find a device. Set
2740 device->resy and frame->dpi.
2742 * internal-gui.h (MFrame): New member dpi.
2744 * font.h (MRealizedFont): New member max_advance.
2746 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2747 (mfont__init): Don't initialize Mascent, Mdescent.
2748 (Mascent, Mdescent): Delete these variables.
2749 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2750 Mfont_descent instead of Mascent and Mdescent.
2751 (mfont_put_prop): Allow negative size.
2752 (mfont_find): Handle the case of spec->size < 0. Fix previous
2754 (mfont_list): Handle the case of spec->size < 0.
2755 (mfont_check): Likewise.
2757 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2758 (fc_get_pattern): Handle the case of font->size < 0.
2759 (ft_open): Set ascent, descent, and max_advance members of rfont.
2760 (ft_find_metric): Improve rounding.
2761 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2764 * face.c (mface__realize): Handle the case of font->size < 0.
2766 2005-08-22 Kenichi Handa <handa@m17n.org>
2768 * coding.c (MConverterStatus): Change the member buf to union.
2769 (mconv_buffer_converter): Add const to the arg buf.
2770 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2771 (mconv_decode): Adjusted for the change of MConverterStatus.
2772 (mconv_encode_range): Likewise.
2774 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2775 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2777 2005-08-20 Kenichi Handa <handa@m17n.org>
2779 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2780 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2782 * m17n-X.c (xfont_open): Set members ascent, descent, and
2783 max_advance of rfont.
2784 (xft_open): Likewise.
2786 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2788 (mfont__ft_parse_name): Add const to the arg name.
2790 * font.c (xlfd_parse_name): Add const to the arg name. Call
2791 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2792 (xlfd_unparse_name): Handle spacing.
2793 (mfont__init): Initialize new variables.
2794 (mfont__id): Handle spacing.
2795 (mfont__merge): Likewise.
2796 (mfont__set_spec): This function deleted.
2797 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2798 condition of calling mfont__ft_parse_name.
2799 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2800 (mfont_get_prop): Handle properties spacing, ascent, descent,
2802 (mfont_find): Return a realized font.
2803 (mfont_from_name): Add const to the arg name.
2805 * font.h (enum MFontProperty): New member MFONT_SPACING.
2806 (enum MFontSpacing): New enum.
2807 (MFont): New members spacing and max_advance.
2808 (mfont__ft_parse_name): Prototype adjusted.
2809 (mfont__set_spec): Extern deleted.
2810 (mfont__parse_name_into_font): Prototype adjusted.
2812 2005-08-19 Kenichi Handa <handa@m17n.org>
2814 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2816 * font.c (mfont_list): If FONT is null, use a temporary font.
2817 (mfont_parse_name): Add const to the arg name.
2819 2005-08-18 Kenichi Handa <handa@m17n.org>
2821 * word-thai.c: Surround code by #ifdef and #endif to escape from
2824 * font-ft.c: Mostly re-written.
2826 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2827 (FontLayoutCmd): Type of the member otf changed..
2828 (load_otf_command): Adjusted for the format change of otf command.
2829 (load_command): Likewise.
2830 (free_flt_command): Unref cmd->body.otf.
2831 (run_otf): Ajusted for the type change of otf_cmd.
2832 (run_command): Ajusted for the type change of otf_cmd. On
2833 debugging, print ctx->combining_code.
2834 (mfont__flt_run): Initialize ctx's members code_offset,
2835 combining_code, and left_padding to 0.
2837 * face.h (struct MRealizedFace): New member font.
2838 (mface__realize): Prototype adjusted.
2840 * face.c (find_realized_face): New arg font.
2841 (find_realized_face): Adjusted for the change of MFont.
2842 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2843 (mface__fini): Don't call mdebug__report_object.
2844 (mface__realize): New arg font.
2845 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2846 Optimize the latin case.
2847 (mface__free_realized): Free rface->font.
2848 (mface__update_frame_face): Adjusted for the change of mface__realize.
2849 (mface_equal): New function.
2851 * draw.c (Mcommon): New variable.
2852 (visual_order): Args to mfont__encode_char changed.
2853 (compose_glyph_string): Handle Mfont text property.
2854 (layout_glyphs): Adjusted for the change of MFont.
2855 (mdraw__init): Initialize Mcommon.
2856 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2858 * font.h (enum MFontType): Members completely changed.
2859 (enum MFontProperty): Move MFONT_SIZE to the tail.
2860 (enum MFontSource): New enum.
2861 (struct MFont): New members type, source, sizes, file, capability,
2863 (struct MRealizedFont): Type of member font changed. Members
2864 score, status, and encoding deleted.
2865 (MFontScore): New type.
2866 (MFontList): Member changed.
2867 (struct MFontDriver): New member has_char. Types of members
2869 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2870 (Mapple_roman): Extern them.
2871 (OTF_Tag): Typedefed if not HAVE_OTF.
2872 (enum MFontOpenTypeTable): New enum.
2873 (MFontCapability): New type.
2874 (mfont__ft_drive_otf): Prototype adjusted.
2875 (mfont__score): Extern deleted.
2876 (mfont__merge): Extern it.
2877 (mfont__has_char): Extern it.
2878 (mfont__encode_char): Prototype adjusted.
2879 (mfont__open): Extern it.
2880 (mfont__set_spec): Prototype adjusted.
2881 (mfont__get_capability): Extern it.
2883 * font.c: Include "fontset.h".
2884 (M_font_capability, M_font_list, M_font_list_len): New variables.
2885 (font_score_priority): Change order of initial elements.
2886 (font_score_shift_bits): Fix array size.
2887 (common_weight): Add "thin", "semibold", and "heavy".
2888 (common_stretch): Add "ultracondensed", "extracondensed",
2889 "extraexpanded", and "utltraexpand".
2890 (font_weight_regular, font_weight_normal, font_weight_medium): New
2892 (gen_font_name): This function deleted.
2893 (find_encoding): Set font->encoding.
2894 (OTF_tag): New function.
2895 (otf_script_list): New variable.
2896 (load_otf_script_list): New function.
2897 (find_script_from_otf_tag): New function.
2898 (xlfd_parse_name): Set font->type and font->source.
2899 (mfont__free_realized): Free chains rfonts.
2900 (font_score): Renamed from mfont__score.
2901 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2902 (Mapple_roman): New variables.
2903 (mfont__init): Initilize new variables. Initalize
2904 default_encoding.encoding_name and
2905 default_encoding.encoding_charset to Municode_full and
2906 mcharset__unicode. Use SAFE* macros for allocating filepath
2908 (mfont__fini): Free otf_script_list.
2909 (mfont__id): New function.
2910 (mfont__match_p): Check also capability member of MFont.
2911 (mfont__merge): New funciton.
2912 (mfont__set_spec_from_face): Set type and source members.
2913 (mfont__set_spec_from_plist): Set capability and type members.
2914 (mfont__select): Argument changed.
2915 (mfont__available): New function.
2916 (compare_font_score): New function.
2917 (mfont__list): New function.
2918 (mfont__open): Return a realized font.
2919 (mfont__resize): Adjusted for the change of MFont.
2920 (mfont__has_char): New function.
2921 (mfont__encode_char): Argument changed.
2922 (mfont__set_spec): Argument changed.
2923 (free_font_capability): New function.
2924 (mfont__get_capability): New function.
2925 (MFontfile): New variable.
2926 (mfont_get_prop): Adjusted for the change of MFont.
2927 (mfont_put_prop): Likewise.
2928 (mfont_set_selection_priority): Fix the way of setting
2929 font_score_priority[].
2930 (mfont_find): Use mfont__list instead of mfont__select.
2931 (mfont_resize_ratio): Adjusted for the change of MFont.
2932 (mfont_list): Use mfont__list.
2933 (mfont_check): New function.
2934 (font_score): Make it static.
2936 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2937 (mfont__lookup_fontset): Likewise.
2939 * fontset.c (struct MFontset): Delete member font_spec_list.
2940 (struct MRealizedFontset): Type of member spec changed. New
2942 (load_font_group): Arg spec_list deleted.
2943 (load_fontset_contents): Adjusted for the change of fontset_def.
2944 (free_fontset): Fix the way of freeing fontset elements.
2945 (realize_fontset_elements): Argument changed.
2946 (get_per_script): New function.
2947 (free_realized_fontset_elements): Fix the way of feeing rfontset
2949 (update_fontset_elements): Fix args to realize_fontset_elements.
2950 (mfont__realize_fontset): New arg spec.
2951 (try_font_list): New function.
2952 (try_font_group): New arg request. Use try_font_list.
2953 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2955 (mfontset): Adjusted for the change of MFontset.
2956 (mfontset_copy): Likewise. Don't share plists.
2957 (mfontset_modify_entry): Adjusted for the change of MFontset.
2958 (mfontset_lookup): Call get_per_script.
2959 (mdebug_dump_fontset): Print also the address of fonts.
2961 * input.c (shift_state): Don't reset ic_info->vars.
2962 (take_action_list): Call MDEBUG_PRINT fore calling
2965 * internal-gui.h (MFontDriver): Don't typedef it here.
2967 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2968 (MXFont): This type deleted.
2970 (struct _MFontX): New struct.
2971 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2972 (MDisplayInfo): Member base_font_list deleted.
2973 (DEFAULT_FONT): Definition changed.
2974 (FALLBACK_FONT): This maclr deleted.
2975 (free_display_info): Adjusted for the change of MDisplayInfo.
2976 (free_device): Argument to mfont__free_realized changed.
2977 (xfont_driver): Adjusted for the change of MFontDriver.
2978 (xfont_registry_list): Use MFontX instead of MXFont.
2979 (MRealizedFontX): Renamed from MXFontInfo.
2980 (xfont_select): Return the font found first.
2981 (close_xfont): Change MXFontInfo to MRealizedFontX.
2982 (xfont_open): Return the realized font.
2983 (xfont_find_metric): Get xfont from rfont->fontp.
2984 (xfont_has_char): New function.
2985 (xfont_encode_char): Adjusted for the argument change.
2986 (xfont_render): Get xfont from rfont->fontp.
2987 (xfont_list): Adjusted for the argument change.
2988 (MRealizedFontXft): Renamed from MXftFontInfo.
2989 (xft_driver): Ajusted for the change of MFontDriver.
2990 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2991 (xft_open_font): Argument changed.
2992 (xft_open): Argument changed. Return the realized font.
2993 (xft_find_metric): Get xft_font from rfont->fontp.
2994 (xft_has_char, xft_encode_char): New functions.
2995 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2996 font if not yet opened.
2997 (device_open): Don't set frame->font.
2999 * m17n-gd.c (gd_font_driver): Adjusted for the change of
3001 (gd_font_open): New function.
3002 (gd_render): Don't use the local variable ft_info.
3003 (device_init): Adjusted for the change of gd_font_driver.
3005 * textprop.c (mtext__prop_init): Initialize text_property_table.
3006 Call M17N_OBJECT_ADD_ARRAY.
3007 (mtext__prop_fini): Don't call mdebug__report_object.
3009 * plist.c (mplist__init): Initialize plist_table.
3010 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
3011 (mplist__fini): Don't call mdebug__report_object.
3013 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
3014 (mtext__fini): Don't call mdebug__report_object.
3015 (MTEXT_FORMAT_UTF_16): Correct type.
3016 (mtext_data): New function.
3017 (mtext_text): Fix calculation of limit and args to
3020 * language.c: Include "plist.h".
3021 (M_script_lang_list): New variable.
3022 (mlang__init): Read languages and their information from m17n
3024 (mlanguage__list): New function.
3025 (Miso639_1, Miso639_2): New variables.
3027 * language.h (mlanguage__list): Extern it.
3029 * database.c (get_database_stream): Use SAFE_* macros for
3030 allocating and freeing path.
3031 (mdatabase__init): Likewise.
3033 * symbol.c (msymbol__fini): Don't free symbols here.
3034 (msymbol__free_table): New function.
3035 (msymbol_is_managing_key): New function.
3037 * symbol.h (msymbol__free_table): Extern it.
3038 (msymbol__list): Extern it.
3040 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
3042 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
3043 (struct _M17NObjectArray): New member name and next.
3044 (mdebug__add_object_array): Extern it.
3045 (M17N_OBJECT_ADD_ARRAY): New macro.
3046 (mdebug__report_object): Don't extern it.
3048 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
3050 * m17n-gui.c (free_frame): Don't free frame->font.
3051 (null_device_fini): Fix code for freeing
3052 null_device.realized_font_list.
3053 (m17n_fini_win): Free interface.
3054 (mframe): Cast the return value of dlsym. Set frame->font here.
3055 (mframe_get_prop): Check frame->rface->rfont before accessing the
3058 * m17n-gui.h (Mfontfile): Extern it.
3059 (mfont_check): Extern it.
3060 (mface_equal): Extern it.
3062 * m17n-core.c: Include "symbol.h".
3063 (report_header_printed): This variable deleted.
3064 (object_array_root): New variable.
3065 (report_object_array): New function.
3066 (mdebug__report_object): This function deleted.
3067 (mdebug__add_object_array): New function.
3068 (m17n_init_core): Call mchartable_init () before mtext_init ().
3069 (m17n_fini_core): Call report_object_array (if necessary) and
3070 msymbol__free_atable at the end.
3072 * m17n-core.h (msymbol_is_managing_key): Extern it.
3073 (mtext_data): Extern it.
3074 (MTEXT_FORMAT_UTF_16): Correct type.
3075 (M17NLIB_MINOR_VERSION): Changed to 3.
3076 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
3078 * chartab.c (mchartable__init): Initalize chartable_table.count.
3079 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
3080 mdebug__report_object.
3082 2005-05-26 Kenichi Handa <handa@m17n.org>
3084 * m17n.h (Miso639_1, Miso639_2): Extern them.
3086 * symbol.h (msymbol__list): Extern it.
3088 * symbol.c (msymbol__list): New function.
3090 2005-05-19 Kenichi Handa <handa@m17n.org>
3092 * input-gui.c (minput__win_init): Don't change the value of
3095 2005-05-16 Kenichi Handa <handa@m17n.org>
3097 * m17n-core.c (m17n_object): Be sure to initialize all members.
3099 * font-ft.c (fc_decode_prop): Fix args to msymbol.
3101 2005-05-09 Kenichi Handa <handa@m17n.org>
3103 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
3105 2005-04-27 Kenichi Handa <handa@m17n.org>
3107 * language.c (mlang__init): Add "an" (Aragonese).
3109 * word-thai.c: Add support for libthai.
3110 (mtext__word_thai_init): Initialize wordseg library conditionaly.
3111 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
3113 * mtext.c: Include "word-thai.h" conditionaly.
3114 (mtext__init): Call mtext__word_thai_init conditionaly.
3115 (mtext__fini): Call mtext__word_thai_fini conditionaly.
3117 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
3118 not WORDCUT_LD_FLAGS.
3120 2005-04-19 Kenichi Handa <handa@m17n.org>
3122 * word-thai.c (wordseg_propertize): Always unref the attached
3124 (thai_wordseg): Don't unref the property.
3126 2005-04-18 Kenichi Handa <handa@m17n.org>
3128 * word-thai.c: Include stdlib.h.
3129 (wordseg_propertize): Add dummy function for the case that wordcut
3130 library doesn't exist.
3131 (wordseg_propertize): Fix for old wordcut library.
3133 2005-04-16 Kenichi Handa <handa@m17n.org>
3135 * word-thai.c: Include <stdio.h>.
3137 2005-04-15 Kenichi Handa <handa@m17n.org>
3139 * draw.c: Include mtext.h.
3140 (linebreak_table, M_break_at_space, M_break_at_word)
3141 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
3142 (compose_glyph_string): Check POS before getting Mface text
3144 (truncate_gstring): Give correct TO arg to line_break function.
3145 (GET_LB_TYPE): New macro.
3146 (find_break_backward, find_break_forward): New functions.
3147 (mdraw__init): Initialize the above new variables.
3148 (mdraw__fini): Free linebreak_table.
3149 (mdraw_default_line_break): Use find_break_backward and
3152 * word-thai.c: New file.
3154 * word-thai.h: New file.
3156 * mtext.c: Include word-thai.h.
3157 (wordseg_func_table): New variable.
3158 (mtext__init): Initialize wordseg_func_table and call
3159 mtext__word_thai_init.
3160 (mtext__fini): Call mtext__word_thai_fini, free
3162 (MTextWordsegFunc): New type.
3163 (mtext__word_segment): New function.
3165 * mtext.h (wordseg_func_table): Extern it.
3166 (mtext__word_segment): Extern it.
3168 * m17n.c (m17n_init): Fix typo (== -> =).
3170 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
3171 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
3173 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
3174 (MTEXTPROP_VAL): New macros.
3176 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
3178 2005-04-07 Kenichi Handa <handa@m17n.org>
3180 * database.c (load_chartable): Fix pursing of symbol name.
3182 2005-03-24 Kenichi Handa <handa@m17n.org>
3184 * m17n.c (m17n_init): Fix typo (== -> =).
3186 2005-03-11 Kenichi Handa <handa@m17n.org>
3188 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
3190 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
3192 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
3195 2005-03-09 handa <handa@m17n.org>
3197 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
3198 calling m17n_init ().
3200 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
3201 calling m17n_init_core ().
3203 2005-02-28 Kenichi Handa <handa@m17n.org>
3205 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3208 2005-02-17 Kenichi Handa <handa@m17n.org>
3210 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3211 (M_description, M_command, M_variable): New variables.
3212 (load_im_info_keys): New variables.
3213 (load_im_info, check_command_keyseq, get_description_advance)
3214 (parse_command_list, get_command_list, parse_variable_list)
3215 (get_variable_list, input_method_hook): New functions.
3216 (command_list, variable_list): New variables.
3217 (minput__init): Put input_method_hook to Minput_method.
3218 Initialize M_description, M_command, M_variable, Mdetail_text,
3219 load_im_info_keys, command_list, variable_list.
3220 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3221 (Mdetail_text): New variable.
3222 (minput_get_description, minput_get_commands)
3223 (minput_assign_command_keys, minput_get_variables)
3224 (minput_set_variable): New functions.
3226 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3227 (minput_assign_command_keys, minput_get_variables)
3228 (minput_set_variable): Extern them.
3230 * plist.c (UNGETC): Just decrement st->p.
3231 (read_mtext_element): New arg skip.
3232 (read_integer_element): Likewise.
3233 (read_symbol_element): Likewise.
3234 (read_element): New arg KEYS.
3235 (mplist__from_plist): Don't increment ref-count of NULL object.
3236 (mplist__from_file): New arg KEYS.
3237 (mplist_put): Don't increment ref-count of NULL object.
3238 (mplist_add): Likewise.
3239 (mplist_push): Likewise.
3240 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3242 * plist.h (mplist__from_file): Prototype adjusted.
3244 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3245 (get_database_stream): New function.
3246 (load_database): Use get_database_stream.
3247 (M_database_hook): New variable
3248 (mdatabase__init): Initialize M_database_hook.
3249 (mdatabase__load_for_keys): New function.
3250 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3252 (mdatabase_define): Free mdb->extra_info if necessary.
3254 * database.h (mdatabase__dir_list, M_database_hook)
3255 (mdatabase__load_for_keys): Extern them.
3256 (MDatabaseHookFunc): New type.
3258 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3260 2004-12-27 Kenichi Handa <handa@m17n.org>
3262 * Version 1.2.0 released.
3264 2004-12-27 Kenichi Handa <handa@m17n.org>
3266 * input.c (minput_filter): Don't reset ic->xxx_changed.
3268 * mtext.c (mtext_from_data): Fix documentation.
3270 2004-12-25 Kenichi Handa <handa@m17n.org>
3272 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3273 (M17NLIB_VERSION_NAME): Update to "1.2.".
3275 2004-12-24 Kenichi Handa <handa@m17n.org>
3277 * input.c (reset_ic): Set key_unhandled to 0.
3279 2004-12-21 Kenichi Handa <handa@m17n.org>
3281 * m17n-gui.h (mfont_from_spec): Delete extern.
3283 * input-gui.c (win_callback): Handle Minput_reset.
3284 (minput__win_init): Register reset_ic as a callback for
3287 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3288 changed. At first, shift to the initial state.
3289 (minput__init): Initialize Minput_reset. Register reset_ic as a
3290 callback for Minput_reset.
3291 (Minput_reset): New variable.
3292 (minput_filter): Always set ic->xxx_changed to 0.
3293 (minput_reset_ic): New function.
3294 (integer_value): Fix typo ('>' -> '<') and calculation of length
3297 * m17n-core.c (merror_code): Change type to `int'.
3299 * m17n-misc.h (merror_code): Adjust type.
3301 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3303 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3304 (mtext_change_prop): Delete extern.
3306 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3307 to `int'. Move the documents to m17n-core.h.
3309 2004-12-13 Kenichi Handa <handa@m17n.org>
3311 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3312 (MTextProperty): Document it.
3314 2004-12-09 Kenichi Handa <handa@m17n.org>
3316 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3318 2004-12-03 Kenichi Handa <handa@m17n.org>
3320 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3321 m17n__gui_initialized): New externs.
3323 * m17n-core.h (enum M17NStatus): New enum.
3324 (m17n_status): Extern it.
3326 * m17n-core.c (core_initialized): Delete this variable.
3327 (m17n__core_initialized, m17n__shell_initialized,
3328 m17n__gui_initialized): New variables.
3329 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3330 instead of core_initialized.
3331 (m17n_status): New function.
3333 * m17n.c (shell_initialized): Delete this variable.
3334 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3337 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3339 * m17n-gui.c (win_initialized): Delete this variable.
3340 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3341 instead of gui_initialized.
3343 2004-11-19 Kenichi Handa <handa@m17n.org>
3345 * input.c (reset_ic): Check if ic_info->state is NULL.
3346 (filter): If ic_info->state is NULL, return 0.
3347 (load_input_method): Don't unref `maps' it it's not created.
3349 2004-11-15 Kenichi Handa <handa@m17n.org>
3351 * input.c (find_candidates_group): If INDEX is -1, find the last
3353 (take_action_list): If the previous of the first candidate is
3354 requested, select the last candidate.
3356 2004-11-08 Kenichi Handa <handa@m17n.org>
3358 * m17n-X.c (device_open): Try at most 32 fonts to find a
3359 non-autoscaled font.
3361 * font.c (xlfd_parse_name): Fix previous change.
3363 2004-11-05 Kenichi Handa <handa@m17n.org>
3365 * font.c: (commont_style): Include dummy elements "slanted" and
3366 "rslanted" to prefer "o" to "r" if "i" is requested.
3368 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3370 2004-10-29 Kenichi Handa <handa@m17n.org>
3372 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3374 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3375 New members smallest and larger.
3376 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3377 (xfont_registry_list): Likewise.
3378 (xfont_select): Likewise.
3381 2004-10-28 Kenichi Handa <handa@m17n.org>
3383 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3384 font name comparison.
3385 (xfont_select): Fix logic for selecting a larger size font.
3387 2004-10-25 Kenichi Handa <handa@m17n.org>
3389 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3392 2004-10-22 Kenichi Handa <handa@m17n.org>
3394 * input.c (update_candidate): Renamed from udpate_candidate.
3395 (take_action_list): Show more debugging info on arithmetic commands.
3397 * m17n-X.c (device_open): Fix previous change.
3399 * draw.c (compose_glyph_string): Don't get face property at the
3402 2004-10-21 Kenichi Handa <handa@m17n.org>
3404 * draw.c (compose_glyph_string): Fix for the case of category
3407 2004-10-19 Kenichi Handa <handa@m17n.org>
3409 * input.c (mdebug_mask): New variable.
3410 (shift_state): Print debug information.
3411 (take_action_list): Likewise.
3412 (handle_key): Likewise.
3414 2004-10-14 Kenichi Handa <handa@m17n.org>
3416 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3418 2004-10-13 Kenichi Handa <handa@m17n.org>
3420 * m17n-X.c (device_open): Be sure to register at least one font
3423 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3424 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3426 2004-10-12 Kenichi Handa <handa@m17n.org>
3428 * draw.c (alloc_gstring): Fix previous change.
3430 * font-ft.c (ft_list_generic): Fix for the case of not
3433 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3435 * font.c (mfont_list): If no font is found, return NULL.
3436 (load_font_encoding_table): Put entries of nil registry first.
3437 (find_encoding): Adjust for the above change.
3439 2004-10-11 Kenichi Handa <handa@m17n.org>
3441 * m17n-gui.h (mfont_list): Adjust prototype.
3443 * m17n-X.c (xfont_list): New arg maxnum.
3445 * font.h (struct MFontDriver): Change prototype of <list>.
3447 * font-ft.c (fc_generic_family_list): Delete it.
3448 (Mserif, Msans_serif, Mmonospace): Delete them.
3449 (M_generic_family_info): New variable.
3450 (enum GenericFamilyType): New enum.
3451 (struct GenericFamilyInfo): New struct.
3452 (generic_family_table): New variable.
3453 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3455 (add_font_info): Get style here.
3456 (ft_list_family): Don't initialize fc_config here. Don't list
3458 (ft_list_generic): New function.
3459 (ft_select): Pay attention to generic familes here.
3460 (ft_open): Fix calculation of ascent and descent.
3461 (ft_list): Pay attention to generic families.
3462 (mfont__ft_init): Initialize M_generic_family_info,
3463 generic_family_table, and fc_config..
3464 (mfont__ft_fini): Finalize generic_family_table.
3466 * draw.c (compose_glyph_string): Use more constant font for
3467 glyphs. Adjust for the member change in MGlyph.
3468 (layout_glyph_string): Adjust for the member change in MGlyph.
3469 (alloc_gstring): Intilize scracth_glyph to avoid
3470 compose_glyph_string on it.
3471 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3472 (mdraw_coordinates_position): Fix previous change.
3474 * internal-gui.h (glyph_category): New enum.
3475 (MGlyph): Change type of <category> to enum glyph_category.
3477 * face.c (mface__realize): Delete args langauge and charset.
3478 (mface__for_chars): Fix for the case that glyphs have different
3480 (mface__update_frame_face): Adjust for mface__realize change.
3482 * face.h (mface__realize): Adjust prototype.
3484 2004-10-05 Kenichi Handa <handa@m17n.org>
3486 * language.c (mlang__init): Add Akan.
3488 2004-10-04 Kenichi Handa <handa@m17n.org>
3490 * font-ft.c (add_font_info): Add instead of push the element.
3491 (ft_list_family): For generic fonts, try all
3492 substituted. families.
3494 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3495 (run_rule): Don't update cluster range here.
3496 (run_command): Update cluster range on appending a glyph.
3497 (run_otf): Update cluster range for glyphs generated by OTF.
3499 2004-10-02 Kenichi Handa <handa@m17n.org>
3501 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3503 2004-09-30 Kenichi Handa <handa@m17n.org>
3505 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3507 2004-09-30 Kenichi Handa <handa@m17n.org>
3509 * font.h: Include <fontconfig/fontconfig.h>.
3510 (MFTInfo): New member langset.
3511 (mfont__encoding_list): Extern it.
3513 * font.c (mfont__encoding_list): New function.
3514 (mdebug_dump_font_list): New function.
3516 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3517 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3519 (ft_family_list): New variable.
3520 (set_font_info): New arg basep. Callers changed.
3521 (fc_list): Check the return value of FcPatternGetString.
3522 (add_font_info): New arg plist. Callers changed. Update
3524 (ft_list_family): New function (merged fc_list and ft_list_all).
3525 (ft_select): Use ft_list_family.
3526 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3528 (mfont__ft_init): Initialize above new variables.
3529 (mfont__ft_fini): Free ft_family_list.
3530 (STRDUP_LOWER): New macro.
3531 (set_font_info): Use STRDUP_LOWER.
3532 (ft_list_family): Avoid duplicate addition of font path. Use
3534 (fc_decode_prop): Fix typo.
3536 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3537 (xfont_registry_list): Change argument disp_info to frame.
3539 (xfont_list_all): New function.
3540 (xfont_list): If FONT is not NULL, check all fonts.
3542 2004-09-28 Kenichi Handa <handa@m17n.org>
3544 * m17n-X.c (MXFont, MXFontList): New types.
3545 (MDisplayInfo): Delete members font_registry_list,
3546 iso8859_1_family_list, iso10646_1_family_list, new members
3547 font_list, base_font_list.
3548 (free_display_info): Adusted for the change of MDisplayInfo.
3549 (xfont_driver): Initialize with xfont_list.
3550 (font_compare): New function.
3551 (build_font_list): Deleted.
3552 (xfont_registry_list): New function.
3553 (xfont_select): Use xfont_registry_list.
3554 (xfont_list): New function.
3555 (device_open): Adusted for the change of MDisplayInfo.
3557 * font-ft.c (add_font_info): New arg languages. Callers changed.
3558 (fc_list): Get languages from fonts..
3559 (ft_list_all): Renamed from ft_list. Callers changed.
3560 (ft_list): New function.
3561 (mfont__ft_driver): Initalize with ft_list.
3563 * font.c (mfont_list): New function.
3565 * font.h (struct MFontDriver): New member `list'.
3566 (MFTInfo): New member languages.
3568 * m17n-gui.h (mfont_list): Extern it.
3570 2004-09-27 Kenichi Handa <handa@m17n.org>
3572 * internal-gui.h (struct MGlyphString): Delete members mt,
3573 sub_width, sub_lbrearing, sub_rbearing, and region.
3575 * draw.c (MSubTextExtents): New type.
3576 (layout_glyphs): New arg extents. Set its members.
3577 (layout_glyph_string): Adjusted for the above change.
3578 (alloc_gstring): Don't set gstring->mt.
3579 (truncate_gstring): Call line_break function with mt instead of
3582 2004-09-22 Kenichi Handa <handa@m17n.org>
3584 * mtext.c (count_utf_16_chars): Count each code of invalid
3587 2004-09-19 Kenichi Handa <handa@m17n.org>
3589 * mtext.c (default_utf_16, default_utf_32): Rename them to
3590 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3593 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3596 2004-09-13 Kenichi Handa <handa@m17n.org>
3598 * draw.c (Mlatin): Don't declare it here.
3599 (visual_order): Fix reordering of combining characters.
3600 (compose_glyph_string): Fix detection of script.
3601 (layout_glyphs): Don't fix reordering of combining characters
3603 (layout_glyph_string): Pay attention to
3604 control->disable_overlapping_adjustment.
3605 (truncate_gstring): Include at least on character in a line.
3606 (get_gstring): Always scan one full line.
3607 (mdraw__init): Don't initialize Mlatin here.
3608 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3609 have a font, use ascent/descent of an ASCII font. Allow
3610 ink_array_return and logical_array_return to be NULL.
3611 (mdraw_coordinates_position): Fix iteration.
3613 * font-ft.c (MFTtoProp): Member completely changed.
3614 (ft_to_prop): Adjusted for the above change.
3615 (ft_to_prop_size): Likewise.
3616 (set_font_info): Adjusted for the change of MFTtoProp.
3617 (fc_generic_family_list): New variable.
3618 (fc_list): Add special handling of generic font names.
3619 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3620 Initialize fc_generic_family_list.
3621 (mfont__ft_fini): Don't free ft_to_prop. Free
3622 fc_generic_family_list.
3623 (FC_vs_M17N_font_prop): New type.
3624 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3625 (fc_decode_prop, fc_encode_prop): New functions.
3626 (mfont__ft_parse_name): Use fc_decode_prop.
3627 (mfont__ft_unparse_name): Use fc_encode_prop.
3629 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3630 (MWDevice): Add member realized_font_list.
3631 (free_display_info): Don't free disp_info->realized_font_list.
3632 (free_device): Free device->realized_fontset_list.
3633 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3634 (device_open): Don't initialize disp_info->realized_font_list.
3635 (device_open): Initialize device->realized_font_list and set it to
3636 frame->realized_font_list.
3638 * fontset.c (try_font_group): New function.
3639 (mfont__lookup_fontset): Use try_font_group.
3641 * font.c (common_weight): Change the order of "regular".
3643 * face.c (Mlatin): Don't make it static.
3644 (mface__realize): Be sure to set work_gstring.frame.
3645 (mface__for_chars): Likewise.
3647 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3650 * internal-gui.h (Mlatin): Extern it.
3652 * m17n-gui.h (MDrawControl): New member
3653 disable_overlapping_adjustment.
3655 2004-09-06 Kenichi Handa <handa@m17n.org>
3657 * font-flt.c (run_otf): Fix typo ('}'->']').
3659 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3660 (COMBINING_PRECOMPUTED_P): New macros.
3662 * draw.c (layout_glyphs): Handle precomputed combining code.
3664 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3665 precomupted combining code.
3667 2004-09-03 Kenichi Handa <handa@m17n.org>
3669 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3672 2004-08-27 Kenichi Handa <handa@m17n.org>
3674 * face.c (mface_put_prop): If the new value is the same as the
3675 current one, don't increment frame->tick.
3677 2004-08-25 Kenichi Handa <handa@m17n.org>
3679 * fontset.c (mfontset): Initialize font_spec_list member.
3680 (mfontset_copy): Load fontset if necessary.
3682 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3683 'metrics' to for C++.
3685 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3688 2004-08-16 Kenichi Handa <handa@m17n.org>
3690 * Version 1.1.0 released.
3692 2004-08-13 Kenichi Handa <handa@m17n.org>
3694 * language.c (mlang__init): Add Dhivehi.
3696 * m17n-gui.c (Mx, Mfreetype): Delete it.
3697 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3699 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3700 (mfont_resize_ratio): Extern it.
3701 (MDrawGlyphInfo): New member logical_width;
3702 (MDrawGlyph): New type.
3703 (mdraw_glyph_list): Prototype adjusted.
3705 * m17n-X.c (xfont_open): Set type and fontp members.
3706 (xft_open): Likewise.
3708 * internal-gui.h (Mx, Mfreetype): Delete extern.
3710 * font.h (struct MRealizedFont): New member type and fontp.
3712 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3713 (Mx, Mfreetype): Declare here.
3714 (Mxft): New variable.
3715 (mfont_resize_ratio): New function.
3717 * font-ft.c (ft_open): Set type and fontp members.
3719 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3722 2004-08-11 Kenichi Handa <handa@m17n.org>
3724 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3727 2004-08-06 Kenichi Handa <handa@m17n.org>
3729 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3732 * font-flt.c (run_otf): Print debugging information if necessary.
3734 2004-08-05 Kenichi Handa <handa@m17n.org>
3736 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3737 positioning_type 5 and 6. Switch simplified.
3739 2004-08-04 Kenichi Handa <handa@m17n.org>
3741 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3743 2004-08-02 Kenichi Handa <handa@m17n.org>
3745 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3746 set val to 1 even if it is greater than 1.
3748 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3750 2004-07-29 Kenichi Handa <handa@m17n.org>
3752 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3753 debugging information.
3755 * internal.h (MDEBUG_PRINT5): New macro.
3757 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3758 the previous one if the zero width glyph has left or right
3761 2004-07-26 Kenichi Handa <handa@m17n.org>
3763 * m17n-X.c (xft_render): Pay attention to members left_padding and
3764 right_padding of MGlyph.
3766 * draw.c (visual_order): Allocate one more elements for arrays as
3767 a workaround of fribidi bug.
3768 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3769 instead of MGlyph->bidi_sensitive.
3770 (layout_glyph_string): Pay attentinon to
3771 control->orientation_reversed when padding at the head or tail.
3772 Fix adjustment of space glyph width.
3773 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3776 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3777 instead of MGlyph->bidi_sensitive.
3779 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3781 2004-07-26 Kenichi Handa <handa@m17n.org>
3783 * draw.c (visual_order): Don't treat combined glyphs specially.
3784 (layout_glyphs): Don't get metrics glyphs that are already ready.
3785 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3786 width with the previous one.
3787 (draw_background): Fix bar cursor position on a r2l glyph.
3789 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3790 (run_rule): Fix place of updating cluster_begin_pos and
3791 cluster_end_pos here.
3792 (run_otf): Don't set left_padding.
3794 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3796 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3797 Fix handling of GPOS.
3798 (mfont__ft_drive_gpos): Delete this function.
3800 * font.h (mfont__ft_drive_otf): Renamed back from
3801 mfont__ft_drive_gsub.
3802 (mfont__ft_drive_gpos): Delete extern.
3804 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3805 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3807 2004-07-23 Kenichi Handa <handa@m17n.org>
3809 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3810 the same bidi level.
3812 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3814 2004-07-22 Kenichi Handa <handa@m17n.org>
3816 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3818 2004-07-20 Kenichi Handa <handa@m17n.org>
3820 * draw.c (render_glyphs): Fix checking of g->code validity.
3822 * face.c (mface__realize): Set g.type.
3824 2004-07-18 Kenichi Handa <handa@m17n.org>
3826 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3829 * m17n-gui.c (mframe): Print error message give by dlopen to
3832 2004-07-16 Kenichi Handa <handa@m17n.org>
3834 * draw.c (compose_glyph_string): Improve the way of deciding a
3835 script. For a character that doesn't have script property, use
3836 the last non-latin script.
3838 * font-ft.c (fc_list): Cancel previous change.
3839 (mfont__ft_init): Add more entries in ft_to_prop_name.
3841 2004-07-15 Kenichi Handa <handa@m17n.org>
3843 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3844 previous or next character glyphs.
3846 2004-07-14 Kenichi Handa <handa@m17n.org>
3848 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3849 of type GLYPH_SPACE.
3851 * fontset.c (mfont__lookup_fontset): If glyph type is
3852 GLYPH_SPACE, get codes for SPACE.
3854 * internal-gui.h (Mfont): Delete extern.
3856 * m17n-gui.h (Mfont): Delete duplicated extern.
3858 2004-07-13 Kenichi Handa <handa@m17n.org>
3860 * font-ft.c (DEVICE_DELTA): New macro.
3861 (adjust_anchor): New function.
3862 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3864 (mfont__ft_drive_gpos): New function.
3866 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3867 (FontLayoutContext): Delete member `rfont'.
3868 (run_otf): Set g->otf_cmd. Call
3869 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3870 only whne HAVE_OTF is defined.
3872 * fontset.c: Include "config.h".
3874 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3875 (MGlyph): New member otf_cmd.
3877 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3878 (mfont__ft_drive_gpos): Extern it.
3880 * face.c: Include "config.h".
3882 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3884 * input-gui.c: Include "config.h".
3886 * plist.c: Include "config.h".
3888 2004-07-06 Kenichi Handa <handa@m17n.org>
3890 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3891 internal-gui.h: Cancel previous changes.
3893 * m17n-gd.h: Delete it.
3895 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3896 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3897 @XML2_LD_FLAGS@ to above.
3898 (libm17n_la_LIBADD): Add -ldl.
3899 (libm17n_la_LDFLAGS): Add -export-dynamic.
3900 (X_LD_FLAGS): Fix the order of linking.
3901 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3902 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3903 (libm17n_X_la_LDFLAGS): Add -module.
3904 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3905 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3906 (libm17n_gd_la_LDFLAGS): Add -module.
3907 (include_HEADERS): Delete m17n-gd.h.
3909 2004-06-30 Kenichi Handa <handa@m17n.org>
3911 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3912 (MDeviceLibraryInterface): Delete it.
3913 (register_device_library): Delete it.
3914 (m17n__device_library_list): Renamed from device_library_list.
3916 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3917 (m17n_init_win): Adjust prototype.
3919 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3920 (m17n_init_gd): New function.
3922 * m17n-gd.h: New file.
3924 * m17n-X.h: Include <m17n-gui.h>.
3925 (m17n_init_X): Extern it.
3926 (M17N_INIT): Redefine it.
3928 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3929 (m17n_init_X): New function.
3931 * internal-gui.h (m17n__device_library_list): Extern it.
3932 (struct MDeviceDriver): New members initialized, init, and fini.
3934 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3936 (libm17n_X_la_LIBADD): Delete aboves.
3937 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3938 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3939 (libm17n_gd_la_LDFLAGS): Delete it.
3940 (include_HEADERS): Add m17n-gd.h.
3942 2004-06-25 Kenichi Handa <handa@m17n.org>
3944 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3945 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3947 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3949 * font-ft.c (fc_list): If FcFontList finds no font, try
3952 * draw.c (compose_glyph_string): Terminate the last loop after
3953 doing default combining if necessary.
3955 2004-06-24 Kenichi Handa <handa@m17n.org>
3957 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3959 * character.c (mchar_define_property): Add const to an arg.
3961 * charset.c (mchar_define_charset): Add const to an arg.
3963 * coding.c (MCodingSystem): Add const to an arg or decoder.
3964 (finish_decoding): Add const to an arg.
3965 (decode_coding_charset, decode_coding_utf_8)
3966 (decode_coding_utf_16, decode_coding_utf_32)
3967 (decode_coding_iso_2022, decode_coding_sjis)
3968 (mconv_define_coding): Likewise.
3970 * m17n-X.c (xft_find_metric): Delete unused variable.
3972 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3975 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3978 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3979 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3981 * mtext.h (mtext__from_data): Ajust prototype.
3983 2004-06-23 Kenichi Handa <handa@m17n.org>
3985 * draw.c (compose_glyph_string): Always get glyph codes by
3987 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3988 (mdraw_glyph_list): New function.
3990 * font-flt.c (mfont__flt_run): Be sure to call
3991 rfont->driver->encode_char.
3993 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3994 (ft_encode_char): Delete arg C.
3995 (ft_render): Don't call FT_Get_Char_Index.
3997 * font.c (mfont__encodable_p): Delete it.
3998 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
4000 * font.h (struct MFontDriver): Delete arg C of encode_char.
4001 (mfont__encodable_p): Delete extern.
4003 * m17n-X.c (xfont_encode_char): Delete arg C.
4004 (xft_find_metric): Don't cal FT_Get_Char_Index.
4005 (xft_render): Likewise.
4007 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
4009 (mdraw_glyph_list): Extern it.
4011 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
4013 2004-06-22 Kenichi Handa <handa@m17n.org>
4015 * m17n-gui.h (mfontset_lookup): Extern it.
4017 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
4019 * fontset.c (realize_fontset_elements)
4020 (free_realized_fontset_elements, update_fontset_elements): New
4022 (mfont__realize_fontset): Call realize_fontset_elements.
4023 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
4024 (mfont__lookup_fontset): If a fontset was modified, update
4025 the realized fontset.
4026 (mfontset_modify_entry): Increment fontset->tick.
4027 (mfontset_lookup): New function.
4029 2004-06-21 Kenichi Handa <handa@m17n.org>
4031 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
4033 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
4034 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
4035 length of source text 0.
4037 2004-06-21 Kenichi Handa <handa@m17n.org>
4039 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
4040 (compare): Pay attention to format other than utf-8.
4041 (copy): Delete this function.
4042 (count_by_utf_8, count_by_utf_16, insert): New functions.
4043 (count_utf_16_chars): Fix handling of a surrogate pair.
4044 (find_char_forward, find_char_backward): Likewise.
4045 (mtext__from_data): Delete unnecessary check. Fix number of
4047 (mtext_from_data): Don't count items.
4048 (mtext_ref_char): Optimize the code.
4049 (mtext_set_char): Pay attention to format other than utf-8.
4050 (mtext_cat_char): Likewise.
4051 (mtext_dup): Don't call copy, instead do allocation here.
4052 (mtext_cat): Call insert instead of copy.
4053 (mtext_ncat): Likewise.
4054 (mtext_cpy): Delete character at first and call insert instead of
4056 (mtext_ncpy): Likewise.
4057 (mtext_copy): Likewise.
4058 (mtext_duplicate): Call insert instead of copy.
4059 (mtext_del): Pay attention to format other than utf-8.
4060 (mtext_ins): Simply call insert.
4061 (mtext_ins_char): Pay attention to format other than utf-8.
4062 (mtext_tok): Call insert instead of copy.
4063 (mtext_text): Call UNIT_BYTES.
4065 * textprop.c (mtext__adjust_plist_for_change): New function.
4067 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
4068 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
4069 (CHAR_UNITS_AT): Fix typo.
4070 (CHAR_UNITS_BY_HEAD): Fix typo.
4071 (STRING_CHAR_AND_UNITS): Fix typo.
4073 * internal.h (MTEXT_READ_ONLY_P): New macro.
4075 * mtext.h (mtext__replace): Delete the extern.
4076 (mtext__adjust_foramt): Adjust prototype.
4078 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
4079 if possible. Otherwise make a copy of mmt.
4081 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
4084 2004-06-18 Kenichi Handa <handa@m17n.org>
4086 * character.h (CHAR_STRING_UTF16): Fix syntax.
4088 2004-06-16 Kenichi Handa <handa@m17n.org>
4090 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
4091 (libm17n_X_la_LIBADD): Delete it.
4092 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
4094 * m17n-X.c (device_open): Add parens in `if' condition.
4096 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
4097 (DEC_POSITION): Likewise.
4098 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
4100 2004-06-15 Kenichi Handa <handa@m17n.org>
4102 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
4105 * draw.c (compose_glyph_string): If langauge is specified, call
4106 mface__for_chars even if a text is all latin. Fix condition for
4107 setting non_ascii_found.
4109 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
4111 * m17n.h (minput_char_to_key): Delete extern.
4113 * m17n-gui.h (minput_event_to_key): Cancel previous change.
4115 * m17n-gui.c (null_device_open): Set several members of frame.
4117 2004-06-14 Kenichi Handa <handa@m17n.org>
4119 * m17n-gui.h (minput_event_to_key): Delete extern.
4121 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
4123 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
4125 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
4127 2004-06-08 Kenichi Handa <handa@m17n.org>
4129 * character.c (mchar_put_prop): Don't increment the ref-count of
4132 2004-06-04 Kenichi Handa <handa@m17n.org>
4134 * m17n-core.c (mdebug__register_object): New function.
4135 (mdebug__unregister_object): Likewise.
4137 * internal.h (mdebug__register_object, mdebug__unregister_object):
4139 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
4142 * charset.c (mcharset__load_from_database): Don't call
4143 mconv__register_charset_coding here.
4145 * coding.c (find_coding): Get a real name from an element of
4146 coding_definition_list.
4147 (mconv__register_charset_coding): Set the real name at the top of
4149 (mcoding__load_from_database): Likewise.
4150 (mconv_list_codings): Adjusted for the above change.
4152 2004-06-03 Kenichi Handa <handa@m17n.org>
4154 * coding.c (find_coding): Find by canonicalized name. Don't have
4155 to modify the element of coding_definition_list by
4157 (mconv__define_coding_from_charset): Delete it.
4158 (mconv__register_charset_coding): Canonicalize sym.
4159 (mcoding__load_from_database): Register plist modified by
4162 * coding.h (mconv__define_coding_from_charset): Don't extern it.
4164 * font-ft.c (ft_open): Fix setting of rfont->descent.
4166 2004-06-02 Kenichi Handa <handa@m17n.org>
4168 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
4169 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
4170 (xlfd_unparse_name): Renamed from xfont_build_name.
4171 (mfont__init): Initialized Mfontconfig.
4172 (mfont__free_realized): Unconditionally unref rfont->info.
4173 (mfont__select): Free `this' if it's not best.
4174 (mfont__open): Don't check frame->realized_font_list.
4175 (mfont__parse_name_into_font): New function.
4176 (Mfontconfig): New variable.
4177 (mfont_from_name): Call mfont_parse_name.
4178 (mfont_name): Call mfont_unparse_name.
4179 (mdebug_dump_font): Likewise.
4181 * font.h (struct MFontDriver): Delete members parse_name and
4183 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
4184 (mfont__parse_name_into_font): Extern it.
4186 * font-ft.c: Include "symbol.h".
4187 (close_ft): Unconditionally free filename and charmap_list of
4189 (ft_open): Duplicate base->filename. Increment ref-count of
4190 ft_info->charmap_list. Free ft_info->charmap_list and
4191 ft_info->filename on error.
4192 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
4194 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
4196 (enum xlfd_field_idx): Moved to font.c.
4197 (split_font_name, build_font_name): Likewise.
4198 (build_font_list): Call mfont__parse_name_info_font.
4199 (xfont_open): Call mfont__unparse_name. Free name.
4200 (xfont_parse_name, xfont_build_name): Moved to font.c
4201 (xft_select): Prototype deleted.
4202 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
4203 Call mfont_pase_name.
4205 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4206 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4209 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4212 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4214 2004-06-01 Kenichi Handa <handa@m17n.org>
4216 * fontset.c (mfontset_modify_entry): Pay attention to the case
4217 that fontset->font_spec_list is NULL.
4219 2004-05-31 Kenichi Handa <handa@m17n.org>
4221 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4223 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4225 * font.c (mfont__select): Print score the a font for debugging.
4227 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4229 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4230 kanji_sym and kana_sym.
4232 2004-05-28 Kenichi Handa <handa@m17n.org>
4234 * Makefile.am (VINFO): New variable.
4235 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4236 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4238 2004-05-27 Kenichi Handa <handa@m17n.org>
4240 The following chanages are to make device dependent functions
4241 accessible only from MDeviceDriver structure, and to add GD and
4242 null device drivers. Font drivers get also device dependent.
4244 * m17n.c (m17n_init): Increament shell_initialized.
4245 (m17n_fini): Decremented shell_initialized.
4247 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4249 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4250 (Mwidget, Mcolormap, Mx): Extern them.
4252 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4253 (free_frame): Call frame->driver->close instead of
4255 (DLOPEN_SHLIB_EXT): New macro.
4256 (MDeviceLibraryInterface): New type.
4257 (device_library_list): New variable.
4258 (register_device_library): New function.
4259 (null_device): New variable.
4260 (null_device_close, null_device_get_prop)
4261 (null_device_realize_face, null_device_free_realized_face): New
4263 (null_driver): New variable.
4264 (null_device_init, null_device_fini, null_device_open): New
4266 (null_interface): New variable.
4267 (Mfreetype, Mdevice): Declare them.
4268 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4269 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4270 Mwin__Close_Device. Register drivers for Mx and Mgd.
4271 (m17n_fini_win): Decremented win_initialized. Call "fini"
4272 function of all opened devices. Don't call mwin__fini.
4273 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4275 (mframe): Handle Mdevice key of PLIST.
4276 (mframe_get_prop): Call frame->device->get_prop instead of
4277 mwin__device_get_prop.
4279 * m17n-gd.c: New file.
4281 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4282 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4284 * m17n-core.c (m17n_init_core): Increate core_initialized.
4285 (m17n_fini_core): Decremented core_initialized.
4287 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4288 (Mcolormap): Don't extern them here.
4290 * m17n-X.c (FRAME_DEVICE): New macro.
4291 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4292 (free_display_info): Use MPLIST_DO.
4293 (free_device): Free rface->info.
4294 (xft_close): Delete it.
4295 (device_init): Renamed from mwin__init.
4296 (device_fini): Renamed from mwin__fini.
4297 (device_open): Renamed from mwin__open_device.
4298 (x_driver): New variable.
4299 (MXFontInfo): Delete member frame, add member display.
4300 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4301 Don't declare them here.
4303 * internal-gui.h (MDeviceType): New enum.
4304 (MWDefice): Delete it.
4305 (struct MFrame): Change type of device to void *. New members
4306 device_type, driver, font_driver_list.
4307 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4308 (MDeviceDriver): New type.
4309 (Mx, Mgd, Mfreetype): Extern them.
4310 (mwin__XXX): Delete all of them.
4312 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4314 (win_destroy_ic): Likewise.
4315 (adjust_window_and_draw): Likewise.
4316 (win_callback): Likewise.
4317 (Mxim): Declare it here.
4318 (minput_event_to_key): Call M_CHECK_READABLE.
4320 * fontset.c (mfont__lookup_fontset): Delete local variable
4323 * font.h (struct MFontDriver): Delete member close, add members
4324 parse_name and build_name.
4325 (mfont__driver_list): Delete extern.
4326 (mfont__close): Delete extern.
4328 * font.c (mfont__init): Don't set mfont__driver_list.
4329 (mfont__fini): Don't unref mfont__driver_list.
4330 (mfont__select): Try font drivers in frame->font_driver_list. Set
4331 driver member of a realized font.
4332 (mfont__close): Delete it.
4333 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4334 functions of the default frame.
4336 * font-ft.c (close_ft): Check ft_info->ft_face and work
4338 (add_font_info): Allocate ft_info by M17N_OBJECT.
4339 (ft_close): Delete it.
4340 (mfont__ft_driver): Don't set ft_close.
4341 (ft_select): Increment ref-count of best_font.
4342 (ft_open): Decremented ref-count of base. On error, call
4343 FT_Done_Face and free ft_info.
4344 (ft_find_metric): Always use XXX_MONO in load_flags.
4345 (ft_render): Fix setting of width. Call
4346 frame->driver->draw_points instead of mwin__draw_points.
4347 (ft_to_prop): Don't set mfont__driver_list.
4348 (mfont__ft_fini): Just unref ft_info.
4350 * face.c (mface__init): Exchange foreground and background of
4351 mface__default. Call mface_put_prop to set hline of
4353 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4354 (mface__free_realized): Don't call mwin__free_realized_face.
4356 * draw.c (Mdepth): Don't declare it here.
4357 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4358 (render_glyphs, render_glyph_string): Likewise.
4359 (mdraw__init): Don't set Mdepth.
4360 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4362 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4364 (mdraw_text_items): Check FRAME is writable.
4365 (mdraw_per_char_extents): Implement body.
4367 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4369 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4370 (GUI_SOURCES): Delete it.
4371 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4372 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4373 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4374 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4375 (linkgui_LDADD): Set to libm17n-gui.la
4376 (linkgui_LDFLAGS): New target.
4377 (SRC): Include ${libm17n_gui_la_SOURCES} and
4378 ${libm17n_gd_la_SOURCES}.
4380 2004-05-24 Kenichi Handa <handa@m17n.org>
4382 * draw.c (draw_background): Don't draw background even if
4383 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4385 2004-05-22 Kenichi Handa <handa@m17n.org>
4387 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4389 2004-05-20 Kenichi Handa <handa@m17n.org>
4391 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4393 * m17n-gui.c: Include "plist.h".
4394 (mframe): If PLIST is NULL, initialize it to emply plist.
4396 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4397 (xft_driver): New variable.
4398 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4399 (xft_find_metric, xft_render): New function.
4400 (mwin__init): Adjusted for the new mfont__driver_list.
4401 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4402 generated face to PARAM.
4403 (mwin__realize_face): Fix setting of box colors. Don't call hook
4405 (mwin__draw_hline): New function.
4406 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4407 (mwin__xft_render): Delete these function.
4409 * internal-gui.h (struct MFrame): New member tick.
4410 (struct MGlyphString): New member tick.
4411 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4412 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4413 (mwin__xft_render): Delete extern.
4415 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4416 (mfontset): Always increment the reference count of returned
4419 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4420 (MFTInfo): Moved to font.h.
4421 (ft_iso8859_1_font_list): Delete this variable.
4422 (set_font_info): Don't set font->property[MFONT_TYPE].
4423 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4424 (add_font_info): Change type to void.
4425 (fc_list): Change anme from xft_list. Caller changed. Include
4426 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4427 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4428 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4429 (close_ft): Don't call mwin__xft_close. Unref
4430 ft_info->extra_info.
4431 (ft_open): Don't setup ft_info->fontname. Don't call
4433 (ft_find_metric): Don't call mwin__xft_get_metric.
4434 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4435 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4436 (mfont__ft_init): Adjusted for new mfont__driver_list.
4437 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4439 * font.c (mfont__driver_list): Make it MPlist.
4440 (mfont__init): Adjust initialization of mfont__driver_list.
4441 (mfont__fini): Free mfont__driver_list.
4442 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4443 (mfont__select): Adjusted for the new mfont__driver_list.
4445 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4446 (mfont__drirver_list): Adjust prototype.
4447 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4449 * face.h (struct MFace): Delete member realized_face_list, add
4451 (struct MRealizedFace): Delete member need_update
4452 andnofont_rface, add member non_ascii_list.
4453 (mface__update_frame_face): Extern it.
4455 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4457 (get_hline_create, get_box_create): New functions.
4458 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4460 (free_face): Cancep previous change. Free face->frame_list.
4461 (serialize_hline): Do nothing if hline->width is zero.
4462 (serialize_box): Do nothing if box->width is zero.
4463 (mface__init): Setup all properties of mface__default.
4464 (mface__fini): Free hline_prop_list and box_prop_list.
4465 (mface__realize): Cancel previous change. Update
4466 face->frame_list. Setup rface->non_ascii_list.
4467 (mface__for_chars): Update rface->non_ascii_list.
4468 (mface__free_realized): Free rface->non_ascii_list.
4469 (mface__update_frame_face): New function.
4470 (mface): Initialize face->frame_list.
4471 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4473 (mface_merge): Likewise.
4474 (mface_put_prop): If key is Mhline or Mbox, get value by
4475 get_hline_create or get_box_create respectively.
4476 (mface_put_prop): Update frame->tick and call
4477 mface__update_frame_face if necessary.
4478 (mface_update): Do nothing if func is noop_hook.
4480 * draw.c (render_glyphs): If a font is not found, use
4481 mwin__draw_empty_boxes.
4482 (alloc_gstring): Initialize gstring->tick.
4483 (get_gstring): Check gstring->tick.
4485 2004-05-17 Kenichi Handa <handa@m17n.org>
4487 * face.c (find_realized_face): Return value changed. If RFONT is
4488 NULL, avoid unnecessary checking.
4489 (free_face): Free face->realized_face_list.
4490 (mface__realize): Adjusted for the change of find_realized_face.
4491 If it returns a realized face that needs update, free it and
4492 realize a new one. Push a new realized face to
4493 frame->realized_face_list instead of appending.
4494 (mface__for_chars): Adjusted for the change of find_realized_face.
4495 Short cut if the required font is in rface->ascii_rface.
4496 (mface_put_prop): Free old value if necessary. Set need_update
4497 member of realized faces to 1.
4499 * face.h (struct MFace): Delete member tick, add member
4501 (struct MRealizedFace): Delete member tick, add member
4504 2004-05-13 Kenichi Handa <handa@m17n.org>
4506 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4508 2004-05-12 Kenichi Handa <handa@m17n.org>
4510 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4512 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4513 parse it XftNameParse.
4515 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4516 (all_fonts_scaned): New variable.
4517 (set_font_info): FAMILY may be Mnil.
4518 (add_font_info): Argument changed.
4519 (xft_list): Call add_font_info in it.
4520 (ft_list): Likewise.
4521 (ft_select): Make it work in the case family is Mnil.
4522 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4523 (mfont__ft_fini): Set all_fonts_scaned to 0.
4525 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4526 that is failed to open.
4528 2004-05-10 Kenichi Handa <handa@m17n.org>
4530 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4531 device's depth is 1 (i.e. monochrome).
4533 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4534 to work around the problem of libtool.
4536 * font-ft.c: Include <freetype/ftbdf.h>.
4537 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4539 (mfont__ft_init): Initialize them.
4540 (ft_iso8859_1_font_list): New variable.
4541 (set_font_info): Detect a font containing iso8859-1 glyphs and
4542 register it in ft_iso8859_1_font_list. If the font is not
4543 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4544 properties of the font from its properties.
4545 (add_font_list): If the font is not scalable, check if it is BDF
4546 or PCF font. If not, ignore it.
4547 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4548 registry is not iso8859-1.
4549 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4550 ft_iso8859_1_font_list.
4551 (ft_find_metric): If the font is not scalable, assume it as BDF
4552 or PCF, and get a metric from its properties.
4553 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4555 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4557 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4558 (libm17n_la_LDFLAGS): Delete it.
4559 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4560 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4562 2004-05-06 Kenichi Handa <handa@m17n.org>
4564 * draw.c (compose_glyph_string): Fix previous change.
4566 2004-04-30 Kenichi Handa <handa@m17n.org>
4568 * font-ft.c (ft_list): Delete unused variable `result'.
4569 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4571 2004-04-27 Kenichi Handa <handa@m17n.org>
4573 * m17n-X.c: Include config.h
4574 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4575 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4576 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4577 (FRAME_CMAP, FRAME_VISUAL): New macros.
4578 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4579 (xfont_driver): Make it static.
4580 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4581 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4582 info->xft_color_back.
4583 (MXftFontInfo) [HAVE_XFT2]: New type.
4584 (mwin__xft_close) [HAVE_XFT2]: New function.
4585 (mwin__xft_open) [HAVE_XFT2]: New function.
4586 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4587 (mwin__xft_render) [HAVE_XFT2]: New function.
4589 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4590 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4591 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4594 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4596 * font-ft.c: Don't include FT_FREETYPE_H here.
4597 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4598 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4599 (MFTInfo): New member charmap_index.
4600 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4601 (check_otf_filename): Renamed from check_filename. Return value
4603 (ft_set_property): This function deleted.
4604 (set_font_info): New function.
4605 (add_font_list): Argument changed. Add multiple fonts.
4606 (xft_list) [HAVE_XFT2]: New function.
4607 (ft_list) [not HAVE_XFT2]: New function.
4608 (ft_select): Add code for Xft.
4609 (close_ft): Likewise.
4610 (ft_open): Likewise.
4611 (ft_find_metric): Likewise.
4612 (ft_encode_char): Likewise.
4613 (ft_render): Likewise.
4615 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4617 2004-04-26 Kenichi Handa <handa@m17n.org>
4619 * textprop.c (mtext_attach_property): Declare the return type as
4622 2004-04-21 Kenichi Handa <handa@m17n.org>
4624 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4626 2004-04-09 Kenichi Handa <handa@m17n.org>
4628 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4630 (load_command): Setup above members.
4632 2004-04-05 Kenichi Handa <handa@m17n.org>
4634 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4636 2004-03-30 Kenichi Handa <handa@m17n.org>
4638 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4641 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4642 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4644 2004-03-29 Kenichi Handa <handa@m17n.org>
4646 * Version 1.0 Patch Level 2 released.
4648 2004-03-29 Kenichi Handa <handa@m17n.org>
4650 * charset.c (make_charset): Set charset->fully_loaded and
4651 charset->simple correctly. Don't try to get charset->min_char and
4652 charset->max_char for a charset of method subset and superset.
4653 Don't load a mapping file here.
4654 (mcharset__init): Set unified_max.
4655 (mcharset__load_from_database): Free a working plist.
4657 * coding.c (mcoding__fini): Free all malloced data.
4659 * input-gui.c (win_create_ic): Set control.as_image for preediting
4662 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4663 `count') to initialize the array.
4665 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4668 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4670 (mwin__create_window): Fix bug of setting a background pixel of a
4672 (mwin__adjust_window): Clear the window before drawing.
4674 * m17n-core.c (mdebug__report_object): Free array->objectes if
4676 (m17n_init_core): Don't set report_header_printed to 0 here.
4677 Fix debugging information.
4678 (m17n_fini_core): Set report_header_printed to 0 here.
4680 * m17n-core.h (mplist_deserialize): Extern it.
4682 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4684 * m17n.c (m17n_fini): Fix debugging information.
4686 * mtext.c (mtext__adjust_foramt): New function.
4688 * mtext.h (mtext__adjust_foramt): Extern it.
4690 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4692 * plist.h (mplist__deserialize): Don't extern it.
4694 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4695 elements of symbol_table to NULL. Report about created and freed
4696 symbols if MDEBUG_FINI is set.
4698 2004-03-22 Kenichi Handa <handa@m17n.org>
4700 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4702 * m17n.c (m17n_init): Fix the way of checking merror_code.
4704 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4706 2004-03-22 Kenichi Handa <handa@m17n.org>
4708 * fontset.c (realize_font_group): Adjust the font size by
4709 mfont__resize before selecting a font.
4711 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4713 2004-03-19 Kenichi Handa <handa@m17n.org>
4715 * Version 1.0 Patch Level 1 released.
4717 2004-03-19 Kenichi Handa <handa@m17n.org>
4719 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4721 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4723 2004-03-19 Kenichi Handa <handa@m17n.org>
4725 Re-apply the changes forgotten in the released version.
4727 * charset.c (mcharset__load_from_database): Call
4728 mchar_define_charset.
4730 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4731 (mconv_encode_range): Put Mcoding text property.
4733 2004-03-18 Kenichi Handa <handa@m17n.org>
4735 * draw.c (Mdepth): New variable.
4736 (visual_order): Delete unused local var `pos'.
4737 (compose_glyph_string): Fix for the case that gstring->glyphs is
4738 realloced. Stop generating glyphs at TO. Fix handling of
4740 (layout_glyphs): Get metrics of all glyphs in advance. Set
4741 lbearing and rbearing of base of composition glyph correctly.
4742 Handle left-overhang glyphs correctly.
4743 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4745 (dump_combining_code): Change the defualt off_x character to ".".
4746 (mdraw__init): Initialize Mdepth.
4748 * face.c (work_gstring): New variable
4749 (mface__init): Initialize work_gstring.
4750 (mface__fini): Free work_gstring.glyphs.
4751 (mface__realize): Don't handle videomode property here. Adjusted
4752 for the change of mfont__get_metric.
4753 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4755 * face.h (enum face_gc): Moved to m17n-X.c.
4757 * font.h (struct MFontDriver): Arguments of find_metric changed.
4758 (mfont__select): Prototype adjusted.
4759 (mfont__get_metric): Likewise.
4760 (mfont__ft_drive_otf): Likewise.
4761 (mfont__flt_run): Likewise.
4763 * font.c (mfont__select): New argument layouter. If layouter is
4764 different in the registered font, make a new copy of realized
4766 (mfont__get_metric): Argument changed. Get metrics of multiple
4768 (mfont_find): Call mfont__select with layouter as Mnil.
4770 * font-flt.c (FontLayoutContext): New member rfont.
4771 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4772 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4774 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4776 (NUM_POINTS): New macro.
4777 (MPointTable): New type.
4778 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4779 (mfont__ft_drive_otf): New argument rfont.
4781 * fontset.c (realize_font_group): Adjusted for the changed of
4783 (check_fontset_element): This function deleted.
4785 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4786 off the parent window if the preedit text is zero length.
4788 * internal-gui.h (struct MFrame): New members foreground,
4789 background, videomode, font.
4790 (struct MGlyphString): New member anti_alias.
4791 (MDrawPoint): New type.
4792 (mwin__draw_bitmap): Prototype deleted.
4793 (mwin__draw_points): Prototype added.
4795 * m17n-gui.h (MDrawControl): New member anti_alias.
4797 * m17n-gui.c (free_frame): Free frame->font.
4798 (mframe): Set the fontset of frame->face to the default fontset.
4800 * m17n-X.c (RGB_GC): New type.
4801 (enum gc_index): Renamed from enum face_gc. Member names changed.
4803 (struct MWDevice): Members foreground and background deleted. New
4804 member scratch_gc, gc_list.
4805 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4806 (free_device): Free GCs in device->gc_list.
4807 (get_rgb_gc): New function.
4808 (get_gc): Renamed and argument changed from get_color.
4809 (get_gc_for_anti_alias): New function.
4810 (xfont_find_metric): Arguments changed. Get metrics of multiple
4812 (set_region): Argument changed. Caller changed.
4813 (xfont_render): Allways set a font in gc.
4814 (x_error_handler, x_io_error_handler): Define only if
4815 X_SET_ERROR_HANDLER is defined.
4816 (mwin__open_device): Create device->scratch_gc. Set members
4817 foreground, background, and videomode of frame. Call
4818 XSetErrorHandler and XSetIOErrorHandler only if
4819 X_SET_ERROR_HANDLER is defined.
4820 (struct gc_list): Deleted.
4821 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4822 (mwin__realize_face): Adjusted for the change of the format of
4823 rface->info and the charge of set_region.
4824 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4825 (mwin__draw_box): Likewise.
4826 (mwin__draw_bitmap): This function deleted.
4827 (mwin__draw_points): New function.
4828 (mwin__verify_region): Adjusted for the change of the format of
4829 rface->info and the charge of set_region.
4830 (mwin__create_window): Inherit backgound pixel from parent.
4831 (mwin__dump_gc): Adjusted for the change of the format of
4834 2004-03-16 Kenichi Handa <handa@m17n.org>
4836 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4838 * input.c (M_key_alias): New variable.
4839 (handle_key): Try M_key_alias property of a key too.
4840 (minput__init): Initialize M_key_alias. Give that property to
4841 symbols in one_char_symbol. Fix bug of initializing
4844 * draw.c (compose_glyph_string): Don't handle
4845 ignore_formatting_char here. Include formatting characters in the
4846 range processed by a FTL.
4847 (layout_glyph_string): Handle ignore_formatting_char here.
4849 2004-03-12 Kenichi Handa <handa@m17n.org>
4851 * input-gui.c (win_create_ic): Enable bidi in status control.
4853 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4855 2004-03-09 Kenichi Handa <handa@m17n.org>
4857 * input.c (load_input_method): If title is not specified, use the
4858 input method name as title.
4860 * m17n-X.c (get_color): Make it static.
4861 (xim_create_ic, xim_destroy_ic, x_error_handler)
4862 (x_io_error_handler): Likewise.
4864 2004-03-01 Kenichi Handa <handa@m17n.org>
4866 * Version 1.0 released.
4869 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4870 National Institute of Advanced Industrial Science and Technology (AIST)
4871 Registration Number H15PRO112
4873 This file is part of the m17n library.
4875 The m17n library is free software; you can redistribute it and/or
4876 modify it under the terms of the GNU Lesser General Public License
4877 as published by the Free Software Foundation; either version 2.1 of
4878 the License, or (at your option) any later version.
4880 The m17n library is distributed in the hope that it will be useful,
4881 but WITHOUT ANY WARRANTY; without even the implied warranty of
4882 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4883 Lesser General Public License for more details.
4885 You should have received a copy of the GNU Lesser General Public
4886 License along with the m17n library; if not, write to the Free
4887 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4888 Boston, MA 02110-1301, USA.