1 2010-09-01 Kenichi Handa <handa@m17n.org>
3 * draw.c (compose_glyph_string): When the script `inherited' and
4 `common' can't be resolved, use "block" property of the character.
6 2010-08-31 Kenichi Handa <handa@m17n.org>
8 * draw.c (compose_glyph_string): Allow running flt striding over
11 2010-08-19 Kenichi Handa <handa@m17n.org>
13 * m17n-X.c (MDisplayInfo): New member altgr_mask.
14 (find_modifier_bits): Set disp_info->altgr_mask.
16 * input.c (fully_initialize): Make it static.
18 * input.h (MINPUT_KEY_ALTGR_MODIFIER): New macro.
20 * input-gui.c (minput_event_to_key): Handle
21 MINPUT_KEY_ALTGR_MODIFIER.
23 2010-08-12 Kenichi Handa <handa@m17n.org>
25 * character.h (STRING_CHAR_ADVANCE_UTF8): Sanitize the code.
26 (STRING_CHAR_ADVANCE_UTF16): Likewise.
28 * font.c (mfont__init): Initialize buf to NULL.
29 (mfont__id): Likewise.
31 * font-ft.c (ft_encapsulate): Use MDEBUG_PRINT1 instead of
33 (ft_check_otf): Move the label not_otf: within #ifdef HAVE_OTF.
34 (get_otf): Move the code within #ifdef HAVE_OTF.
35 (ft_drive_otf): Move declarations of some local variables within
38 2010-08-11 Kenichi Handa <handa@m17n.org>
40 * input.h (MInputContextInfo): New member state_hook.
42 * input.c (shift_state): Just set ic_info->state_hook, instead of
43 taking state-hook actions.
44 (handle_key): Check ic_info->state_hook. If KEY is unhandled,
45 init ic_info->state_hook.
47 2010-08-09 Kenichi Handa <handa@m17n.org>
49 * m17n-flt.c (try_otf): Remove unused local vars.
51 * input.c (fully_initialize): Avoid compiler warning by casting.
53 * m17n-core.c (m17n_init_core): Fix handling of env_value.
55 * fontset.c (realize_fontset_elements): Fix typo (pl->plist).
57 * coding.c (decode_coding_iso_2022): Sanitize "if" condition.
59 2010-04-23 Kenichi Handa <handa@m17n.org>
61 * Version 1.6.1 released.
63 2010-04-23 Kenichi Handa <handa@m17n.org>
65 * m17n-flt.c (enum GlyphInfoMask): Shift upper masks 1-bit left.
66 (decode_packed_otf_tag): If a glyph has combining information,
69 2010-04-23 Kenichi Handa <handa@m17n.org>
71 * font-ft.c (ft_drive_otf): Reset 28th bit of g->g.internal for
72 storing OTF feature tag.
74 2010-04-19 Kenichi Handa <handa@m17n.org>
76 * m17n-flt.c (run_stages): Update category code of glyphs if
77 category table is changed.
79 2010-04-05 Kenichi Handa <handa@m17n.org>
81 * font-ft.c (ft_check_cap_otf): Fix conditions to call
84 * database.c (check_version): Fix previous change.
86 2010-04-02 Kenichi Handa <handa@m17n.org>
88 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 6.
89 (M17NLIB_PATCH_LEVEL): Changed to 1.
90 (M17NLIB_VERSION_NAME): 1.6.1.
92 2010-03-30 Kenichi Handa <handa@m17n.org>
94 * Version 1.6.0 released.
96 2010-03-01 Kenichi Handa <handa@m17n.org>
98 * m17n-flt.c (run_rule): Fix checking of glyph availability.
100 2010-02-18 Kenichi Handa <handa@m17n.org>
102 * m17n-gui.c (register_device_library): Preprend M17N_MODULE_DIR
103 to the module file name.
105 * input.c (load_external_module): Preprend M17N_MODULE_DIR to the
108 * charset.c (load_charset): Check the return value of fgets.
110 * Makefile.am: Build modules dynamically loaded with
111 -avoid-version and no -version-info.
113 2010-01-15 Kenichi Handa <handa@m17n.org>
115 * draw.c (run_flt): Set mflt_try_otf to rfont->driver->try_otf.
116 (mdraw__init): Set mflt_enable_new_feature to 1.
118 * font-ft.c (ft_try_otf): New function.
119 (mfont__ft_driver): Set ft_try_otf.
121 * font.h (struct MFontDriver): New member try_otf.
123 * m17n-X.c (xft_driver): Set xft_try_otf.
124 (xft_try_otf): New function.
126 * m17n-flt.h: (mflt_enable_new_feature): Extern it.
127 (mflt_try_otf): Extern it.
129 * m17n-flt.c (load_category_table): If mflt_enable_new_feature is
130 zero, return NULL for such categories that require the new
132 (parse_otf_command): If mflt_enable_new_feature is zero, return
134 (load_otf_command): Fix previous change.
135 (load_flt): Check the return value of load_category_table.
136 (try_otf): Renamed from run_otf_category. Call mflt_try_otf
137 instead of font->drive_otf.
138 (run_command): Call try_otf instead of run_otf_category.
139 (m17n_init_flt): Initialize mflt_enable_new_feature to 0,
140 mflt_try_otf to NULL.
141 (mflt_enable_new_feature): New variable.
142 (mflt_try_otf): New variable.
144 2009-12-10 Kenichi Handa <handa@m17n.org>
146 * m17n-flt.c (parse_otf_command): Handle ":otf?".
147 (run_otf_category): If not features are specified, reset category
149 (run_command): On copy, don't re-calculate a category code.
151 2009-12-03 Kenichi Handa <handa@m17n.org>
153 * m17n-flt.c (run_stages): Reset category code if category-table
155 (mflt_run): Don't set category code here.
156 (decode_packed_otf_tag): If no feature is applied, re-calculate
159 2009-12-02 Kenichi Handa <handa@m17n.org>
161 * m17n-flt.c (mflt_find): If FONT is specified but no flt is
163 (run_command): Don't set ENCODED and MEASURED of separator.
165 2009-11-30 Kenichi Handa <handa@m17n.org>
167 * m17n-flt.c (load_otf_command): Check 4th char against '?'.
168 (load_command): Likewise.
169 (decode_packed_otf_tag): New arg CTX. If CTX->in == gstring,
170 update CTX->encoded. Caller changed.
172 2009-11-30 Kenichi Handa <handa@m17n.org>
174 * font-ft.c (ft_drive_otf): Check if OUT is null or not.
175 (ft_drive_otf): Call OTF_drive_gsub_with_log and
176 OTF_drive_gpos_with_log. Record the applied feature in
179 * font.c (mfont__get_glyph_id): Encode g->c instead of g->code.
181 * internal-flt.h (MAKE_COMBINING_CODE_BY_CLASS)
182 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
183 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P):
185 (PACK_OTF_TAG): Extern it.
187 * draw.c (reorder_combining_chars): Delete it.
189 * m17n-flt.h (mflt_font_id): Use type MFLFont.
190 (mflt_iterate_otf_feature): Likewise.
192 * m17n-flt.c (enum GlyphInfoMask): New member CategoryCodeMask and
194 (GET_CATEGORY_CODE, SET_CATEGORY_CODE, GET_COMBINED): New macros.
195 (SET_COMBINING_CODE): Set also CombinedMask.
196 (FontLayoutFeatureTable): Delete it.
197 (FeatureCodeTable): New type.
198 (FontLayoutCategory): Type of feature_table changed.
199 (load_category_table): Adjusted for the change of
201 (unref_category_table): Likewise.
202 (gen_otf_tag): New member shift. Caller changed.
203 (FontLayoutContext): New member category.
204 (run_rule): Compare g->c instead of g->code.
205 (decode_packed_otf_tag): New function.
206 (run_otf): Call decode_packed_otf_tag. Don't reset combining-code
208 (run_otf_category): New function.
209 (run_command): Set category-code if necessary. Call
210 run_otf_category for FontLayoutCmdTypeOTFCategory.
211 (run_stages): Set ctx->category. Get category from glyph if
213 (mflt_dump_gstring): New function.
215 2009-11-26 Kenichi Handa <handa@m17n.org>
217 * m17n-flt.c (enum FontLayoutCmdType): New member
218 FontLayoutCmdTypeOTFCategory.
219 (FontLayoutFeatureTable): New type.
220 (FontLayoutCategory): New members feature_table_size and
222 (load_category_table): Handle feature_table.
223 (unref_category_table): Likewise.
224 (load_otf_command): Handle FontLayoutCmdTypeOTFCategory.
225 (load_command): Likewise.
226 (free_flt_command): Likewise.
228 2009-11-10 Kenichi Handa <handa@m17n.org>
230 * draw.c (run_flt): Update category code of each glyph.
232 2009-11-07 Kenichi Handa <handa@m17n.org>
234 * font-ft.c (ft_drive_otf): Don't accumulate anchor adjustments.
236 2009-11-05 Kenichi Handa <handa@m17n.org>
238 * m17n-flt.c (run_otf): Fix updating of g->lbearing, etc.
240 * font-ft.c (ft_drive_otf): Use OTF_drive_gpos2 if possible.
242 2009-10-28 Kenichi Handa <handa@m17n.org>
244 * fontset.c (mdebug_flag): New variable.
245 (mfont__lookup_fontset): Print debug info.
247 * m17n-core.c (m17n_init_core): Call SET_DEBUG_FLAG for
250 * internal.h (enum MDebugFlag): Add MDEBUG_FONTSET.
252 * language.c (mscript__from_otf_tag): Adjusted for the new format
253 of the database <standard script unicode>.
255 2009-10-22 Kenichi Handa <handa@m17n.org>
257 * database.c (check_version): Fix the check.
259 * input.c (surrounding_pos): New arg *pos.
260 (integer_value): Fix handling of "@+0".
261 (take_action_list): Adjusted for the change of surrounding_pos.
263 2009-10-05 Kenichi Handa <handa@m17n.org>
265 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
268 * m17n-flt.c (FontLayoutCategory): New typedef.
269 (FontLayoutStage): Type of the member `category' changed.
270 (struct _MFLT): Type of the member `coverage' changed. New member
271 need_config and font_id.
272 (apply_otf_feature): New function.
273 (load_category_table): New arg FONT. If FONT is non-NULL, call
274 apply_otf_feature. Setup category->definition.
275 (ref_category_table): New macro.
276 (unref_category_table): New function.
277 (load_flt): Adjusted for the type change of category.
278 (free_flt_stage): New arg FLT.
279 (list_flt): Adjusted for the type change of category.
280 (run_stages): Adjusted for the type change of category.
281 (configure_category, configure_flt): New function.
282 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
283 mflt_font_id to NULL.
284 (mflt_get): Skip the heading configured FLTs.
285 (mflt_find): Likewise. If necessary, configure the found flt.
286 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
287 Adjusted for the type change of category.
288 (mflt_iterate_otf_feature, mflt_font_id): New variable.
290 * m17n-X.c (xfont_open): Set rfont->id.
291 (xft_driver): Set xft_iterate_otf_feature.
292 (xft_open): Set rfont->id.
293 (xft_iterate_otf_feature): New function.
295 * font.h (struct MRealizedFont): New member id.
296 (struct MFontDriver): New member iterate_otf_feature.
298 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
300 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
301 (get_otf): New funcition.
302 (ft_check_otf, ft_drive_otf): Use get_otf.
303 (iterate_callback, ft_iterate_otf_feature): New functions.
304 (mfont__ft_driver): Set ft_iterate_otf_feature.
306 * draw.c: Docstring updated.
307 (font_id): New function.
308 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
311 2009-10-02 Kenichi Handa <handa@m17n.org>
313 * m17n-flt.c (load_flt): Check the return value of
316 2009-09-03 Kenichi Handa <handa@m17n.org>
318 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
319 positions are adjusted by GPOS table.
321 2009-08-13 Kenichi Handa <handa@m17n.org>
323 * Version 1.5.5 released.
325 2009-08-13 Kenichi Handa <handa@m17n.org>
327 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
328 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
330 2009-03-03 Kenichi Handa <handa@m17n.org>
332 * draw.c (compose_glyph_string): Check if category not Mnil.
334 2009-03-02 Kenichi Handa <handa@m17n.org>
336 * Version 1.5.4 released.
338 2009-02-25 Kenichi Handa <handa@m17n.org>
340 * m17n-core.c (report_object_array): For M-text and Plist, print
343 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
344 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
346 * input.c (get_candidate_list): Free unnecessary objects.
347 (take_action_list): Free plist.
349 2009-02-04 Kenichi Handa <handa@m17n.org>
351 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
353 2009-01-16 Kenichi Handa <handa@m17n.org>
355 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
358 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
361 2009-01-14 Kenichi Handa <handa@m17n.org>
363 * coding.c (decode_coding_iso_2022): Check invocation status
364 before updating charset0 and charset1.
366 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
368 2008-12-31 Kenichi Handa <handa@m17n.org>
370 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
373 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
375 * face.c (mface_get_prop): Fix strict aliasing bug.
376 (mface_put_prop): Likewise.
378 * m17n-gui.c (mframe): Fix strict aliasing bug.
380 2008-10-20 Kenichi Handa <handa@m17n.org>
382 * Version 1.5.3 released.
384 2008-10-06 Kenichi Handa <handa@m17n.org>
386 * draw.c (mdraw__init): Use TRUE only when
387 FRIBIDI_INTERFACE_VERSION is less than 3.
389 2008-10-03 Kenichi Handa <handa@m17n.org>
391 * database.c (mdatabase__find_file): Return a copy of filename if
392 it is absolute pathname.
394 2008-09-25 Kenichi Handa <handa@m17n.org>
396 * input.c (load_macros): Don't parse the action list here.
397 (load_im_info): Parse action lists of all macros.
399 2008-09-24 Kenichi Handa <handa@m17n.org>
401 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
403 2008-09-19 Kenichi Handa <handa@m17n.org>
405 * input.c (fully_initialize): Rename "@reload" to "-reload".
407 2008-09-17 Kenichi Handa <handa@m17n.org>
409 * m17n-flt.c (run_stages): Fix combining with a variable width
412 2008-08-04 Kenichi Handa <handa@m17n.org>
414 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
417 2008-07-22 Kenichi Handa <handa@m17n.org>
419 * input.c (fully_initialize): Fix previous change.
421 2008-07-19 Kenichi Handa <handa@m17n.org>
423 * input.c (fully_initialize): Fix previous change.
425 2008-07-14 Kenichi Handa <handa@m17n.org>
427 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
429 2008-07-14 Kenichi Handa <handa@m17n.org>
431 * input.c (fully_initialize): Handle C-M-1, etc.
433 2008-07-11 Kenichi Handa <handa@m17n.org>
435 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
437 2008-06-23 Kenichi Handa <handa@m17n.org>
439 * Version 1.5.2 released.
441 2008-06-23 Kenichi Handa <handa@m17n.org>
443 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
444 (M17NLIB_PATCH_LEVEL): Changed to 2.
445 (M17NLIB_VERSION_NAME): Changed "1.5.2".
447 2008-06-13 Kenichi Handa <handa@m17n.org>
449 * input.c (minput_config_file): Comment fixed for man-page.
451 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
453 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
455 2008-05-24 Kenichi Handa <handa@m17n.org>
457 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
459 2008-05-23 Kenichi Handa <handa@m17n.org>
461 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
462 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
464 (libm17n_gd_la_LIBADD): Likewise.
466 * input.c (take_action_list): Fix debug info.
468 2008-05-14 Kenichi Handa <handa@m17n.org>
470 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
471 (run_stages): Fix index of g_indices.
473 2008-04-03 Kenichi Handa <handa@m17n.org>
475 * draw.c (compose_glyph_string): Don't run flt striding over the
477 (get_gstring): Don't use the cached gstring if cursor position is
480 2008-04-02 Kenichi Handa <handa@m17n.org>
482 * input.c (integer_value): Delete the 3rd arg VALUE.
483 (resolve_expression): Adjust the call of integer_value.
484 (take_action_list): Likewise.
486 2008-03-06 Kenichi Handa <handa@m17n.org>
488 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
491 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
493 * Version 1.5.1 released.
495 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
497 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
498 HAVE_FREETYPE is defined.
500 * font.h (OTF_Tag): Be sure that it is defined in any cases.
502 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
504 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
507 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
509 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
511 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
513 * input.c (parse_action_list): Check M_candidates.
514 (get_im_info): If key is Mnil, be sure to set im_info->states to a
517 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
519 * input.c (integer_value): Fix interpretation of "@-N".
521 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
523 * input.c (get_following_char): Fix interpretation of POS.
524 (get_following_char): Fix interpretation of "@+N".
526 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
528 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
531 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
533 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
535 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
537 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
538 (run_command): Check if clustering now before calling
539 UPDATE_CLUSTER_RANGE.
541 2008-01-06 Kenichi Handa <handa@m17n.org>
543 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
545 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
547 * m17n-X.c (xft_find_metric): Set g->g.measured.
549 * m17n-flt.c (Mequal): New variable.
550 (m17n_init_flt): Initialize it.
551 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
552 into a new member facility.
553 (load_command): Modify parsing of Mfont_facility.
554 (run_rule): Adjuted for the change of FontLayoutCmdRule.
555 (run_otf): Adjusted metrics if a->back is nonzero.
557 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
559 * Version 1.5.0 released.
561 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
563 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
565 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
566 (run_rule): Check if a font has the specific glyph correctly.
568 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
569 MDEBUG_FONT_FLT to MDEBUG_FLT.
571 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
573 * font-flt.c: Delete it.
575 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
577 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
578 TO for the rule of SRC_HAS_GLYPH.
580 * draw.c (run_flt): Argument changed.
581 (compose_glyph_string): Adjusted for the above change.
583 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
585 * plist.c (read_mtext_element): Don't free the malloced buffer.
587 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
589 * m17n-core.h (merror_code): Extern it.
591 * m17n-misc.h (merror_code): Don't extern it.
593 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
595 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
597 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
599 * draw.c (compose_glyph_string): Check g->rface->layouter, not
600 g->rface->rfont->layouter.
602 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
604 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
605 (run_rule): Use ctx->encoded_offset.
606 (run_command): Likewise.
607 (run_stages): Set ctx->encoded_offset.
609 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
611 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
612 bit-size of MFLTGlyph->internal.
614 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
616 * draw.c (visual_order): Exclude the last anchor glyph from the
619 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
621 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
622 (run_stages): Likewise.
623 (load_flt): Unref top after checking plist.
625 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
627 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
629 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
631 * m17n-flt.c (Mcombining): New variable.
632 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
633 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
634 SRC_HAS_GLYPH and SRC_OTF_SPEC.
635 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
637 (load_command): Adjusted for the above changes.
638 (run_rule): Likewise.
639 (combining_code_from_class): Delete it.
640 (mflt_get): Check flt->name against Mcombining, not Mt.
642 * internal-flt.h (Mcombining): Extern it.
644 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
645 combining characters.
647 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
649 * face.c (mface__realize): Reset measured flag before calling
652 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
653 (setup_combining_coverage): New function.
654 (setup_combining_flt): New function.
655 (mflt_get): If flt is not found, return NULL. If name if Mt,
656 call setup_combining_flt.
657 (mflt_run): For debugging, print font family name.
659 * font-ft.c (ft_render): Fix handling of baseline_offset.
660 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
661 (ft_render): Check pixel_mode to determine anti_alias.
663 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
664 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
665 (xfont_render): Set baseline_offset in pixel.
666 (xft_render): Fix handling of baseline_offset.
668 * draw.c (run_flt): Set font.font.family.
669 (compose_glyph_string): Fix handling of combining characters.
671 * fontset.c (try_font_list): Check if the named flt is surely
674 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
676 * draw.c (analyse_bidi_level): New function.
677 (visual_order): Do reordering using the already decided
679 (compose_glyph_string): Decide bidi-level before calling flt.
681 * m17n-flt.c (mflt_run): Fix typo.
683 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
685 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
687 * draw.c (visual_order): Don't rely on the width of glyphs.
688 (run_flt): Fix culculation of g->g.to.
690 * m17n-flt.c (run_rule): Don't set error code here.
691 (run_cond): Likewise.
692 (run_otf): Fix culculation of xoff and yoff.
693 (run_command): Don't set error code here.
697 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
698 (xfont_find_metric): Set glyph's yadv to 0.
699 (xft_find_metric): Likewise.
701 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
702 (ft_find_metric): Adjust glyph's metrics.
703 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
704 (ft_drive_otf): Set mark glyph's xadv to 0.
706 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
709 2007-10-29 Kenichi Handa <handa@m17n.org>
711 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
712 (mflt_get): Adjusted for the argument change.
713 (mflt_name): Adjusted for the return value change.
715 * m17n-flt.c (Mgenerator, Mend): New variables.
716 (flt_min_coverage, flt_max_coverage): New variables.
719 (Mfont_has): Renamed from Mexist. Referrers chagned.
720 (gen_otf_tag): Handle the trailing whitespaces.
721 (otf_count_features, otf_store_features): Fix for negative features.
722 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
723 (load_otf_command): Likewise.
724 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
725 (load_flt): Argument changed. Caller changed.
726 (free_flt_list): New function.
727 (run_rule): Adjusted for the change of FontLayoutContext.
728 (mflt_run): Adjusted for the change of FontLayoutContext.
730 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
731 (m17n_fini_win): Call m17n_fini_flt.
733 * m17n-gui.h: Include m17n-flt.h.
735 * m17n-gd.c: Adusted for the change of MGlyph.
737 * m17n-X.c: Adusted for the change of MGlyph.
738 (xft_check_otf, xft_drive_otf): New functions.
740 * internal-gui.h (MGlyph): Modified for new FLT handling.
742 * fontset.c (try_font_list): Adusted for the change of MGlyph.
744 * font-ft.c: Adjusted for the change of MGlyph.
745 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
746 (get_glyph_metric): Deleted.
747 (ft_check_otf): New function.
748 (ft_drive_otf): New fucntion.
750 * font.c: Adjusted for the change of MGlyph.
751 (mfont__init): Don't call mfont__flt_init.
752 (mfont__fini): Don't call mfont__flt_fini.
753 (mfont__get_glyph_id, mfont__get_metrics): New functions.
755 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
756 (MFLTFontForRealized): New struct.
757 (struct MFontDriver): New members check_otf and drive_otf.
758 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
760 * face.c: Adjusted for the change of MGlyph.
762 * draw.c: Adjusted for the change of MGlyph.
764 * m17n.c (m17n_init): Don't call mchar_init.
766 * m17n-core.c (m17n_init_core): Call mchar_init.
768 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
770 * input.c: Include "m17n.h" instead of "m17n-gui.h".
772 * chartab.c (mchartable): Initialize table->min_char to -1.
773 (mchartable_min_char): New function.
774 (mchartable_max_char): New function.
776 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
777 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
779 2007-10-12 Kenichi Handa <handa@m17n.org>
781 * m17n-core.h (Mcharset): Extern it.
782 Move detabase related declarations from m17n.h.
784 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
785 (struct _MFLTOtfFeatures): New struct.
786 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
787 (struct _MFLTFont): Delete otf, add check_otf.
788 (MCHAR_INVALID_CODE): Define it.
790 * plist.c (read_mtext_element): Simplify the code.
792 * m17n.h: Move database related declarations to m17n-core.h
793 (Mharset): Don't extern it.
795 * m17n.c (m17n_init): Don't call mdatabase__init.
797 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
800 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
801 (Mexist): New variable.
802 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
803 (FontLayoutCmdRule): New member src.exist.
804 (parse_otf_command): Handle gsub_count and gpos_count separately.
805 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
806 (load_command): Handle the command "exist".
807 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
808 (run_rule): Handle the case SRC_EXIST.
809 (run_otf): Adjusted for the change of MFLTOtfSpec.
810 (run_command): Check the range of FROM.
811 (check_otf_spec): Delete it.
812 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
814 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
815 (mflt_find): Call font->check_otf instead of check_otf_spec.
816 (mflt_run): Keep the metrics in 26.6 fixed point.
818 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
819 (m17n_init_core): Call mdatabase__init.
821 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
823 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
826 * font-flt.c (Mexist): New variable.
827 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
828 (FontLayoutCmdRule): New member src.exist.
829 (load_category_table): Use isalnum, not isalpha.
830 (load_command): Check the command "exist".
831 (run_rule): Hande the case SRC_EXIST.
832 (run_command): Check the range of FROM.
833 (mfont__flt_init): Initialize Mexist.
835 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
837 * database.h (mdatabase__load_charset_func): Extern it.
839 * database.c: Include m17n-core.h instead of m17n.h.
840 (load_chartable): Use mtext__from_data.
841 (load_charset): Moved to charset.c
842 (load_database): Call mdatabase__load_charset_func instead of
844 (mdatabase__load_charset_func): New variable.
845 (mdatabase__init): Initialize mdatabase__load_charset_func and
846 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
847 (mdatabase__save): Use fwrite, not mconv_encode_stream.
848 (Mcharset): Declare it here.
850 * charset.c: Include "database.h.".
851 (load_charset): Moved from database.c.
852 (mcharset__init): Initialize mdatabase__load_charset_func, don't
855 * character.c (mchar_define_property): Call mdatabase_find directly.
856 (mchar_get_prop): Call mdatabase_add directly.
857 (mchar_put_prop): Call mdatabase_load directly.
858 (mchar_get_prop_table): Likewise.
860 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
861 (libm17n_la_SOURCES): Remove database.[ch].
862 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
864 2007-09-18 Kenichi Handa <handa@m17n.org>
866 * face.c (mface__realize): Try Freetype based font at first.
868 * font.c: Include <ctype.h>
870 2007-09-16 Kenichi Handa <handa@m17n.org>
872 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
874 (run_otf): Call font->get_metrics, not font->get_metric.
875 (run_stages): Likewise.
876 (CHECK_FLT_COVERAGE): New macro.
877 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
878 (check_otf_spec): New function.
879 (m17n_fini_flt): Unref flt->coverage.
880 (mflt_find): Argument changed.
881 (mflt_name): New function.
882 (mflt_coverage): Use CHECK_FLT_COVERAGE.
884 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
885 (mflt_find): Prototype adjusted.
886 (mflt_name): Extern it.
888 2007-09-14 Kenichi Handa <handa@m17n.org>
890 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
892 * font-flt.c (run_otf): Make debug info printing comaptible with
894 (run_command): Likewise.
895 (mfont__flt_run): Likewise.
897 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
898 invalid only when it's negative.
900 (run_command): Likewise.
901 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
903 2007-09-10 Kenichi Handa <handa@m17n.org>
905 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
906 (struct _MFLTFont): Prototype of get_glyph_id changed.
908 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
910 (GAPPEND): Delete this macro.
911 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
912 for the change of MFLTGlyph. Caller changed.
913 (run_otf): Simply calls font->get_glyph_id.
914 (run_command): Reset g->encoded and g->measured for direct code.
915 (positioning): Delete this function.
916 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
918 2007-09-07 Kenichi Handa <handa@m17n.org>
920 * draw.c (compose_glyph_string): Improve script detection.
922 2007-09-06 Kenichi Handa <handa@m17n.org>
924 * m17n-flt.h (mflt_get): Extern it.
926 * m17n-flt.c (run_stages): Call positioning only if
927 font->get_metric is non-NULL.
928 (CHECK_FLT_STAGES): Fix typo.
929 (mflt_get): New function.
931 * font-flt.c (mfont__flt_run): Improve debug info printing.
933 2007-09-04 Kenichi Handa <handa@m17n.org>
935 * m17n-flt.c (MFontLayoutTable): Delete this type.
936 (struct _MFLT): New member mdb and coverage.
937 (list_flt): Set flt->mdb.
938 (load_generator): Argument and return value changed. Caller
940 (get_font_layout_table): Delete this function.
941 (run_stages): Argument changed. Caller changed.
942 (CHECK_FLT_STAGES): New macro.
943 (mfont__flt_encode_char): Argument changed.
944 (mflt_find): Likewise.
945 (mflt_coverage): New function.
946 (mflt_run): Argument changed.
947 (mdebug_dump_flt): Likewise.
949 * m17n-flt.h (mflt_coverage): Extern it.
950 (mflt_find): Prototype adjusted.
952 2007-09-03 Kenichi Handa <handa@m17n.org>
954 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
956 * database.c (mdatabase__props): New function.
958 * database.h (mdatabase__props): Extern it.
960 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
962 (struct _MFLTFont): Add suitable_p.
963 (mflt_find): Extern it.
965 * m17n-flt.c: Include "database.h".
966 (struct _MFLT): New struct.
967 (list_flt): New function.
968 (load_flt): Don't update flt_list.
969 (get_font_layout_table): Use flt_list.
970 (m17n_init_flt): Don't initialize flt_list.
971 (m17n_fini_flt): Adjusted for the change of flt_list.
972 (mflt_find): New function.
973 (mflt_run): Fix debug printing.
975 2007-08-23 Kenichi Handa <handa@m17n.org>
977 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
978 (run_stages): Print separator in encoded string as "|".
980 2007-08-23 Kenichi Handa <handa@m17n.org>
982 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
983 the glyph is already handled by OTF.
985 2007-08-21 Kenichi Handa <handa@m17n.org>
987 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
989 2007-08-20 Kenichi Handa <handa@m17n.org>
991 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
994 2007-08-17 Kenichi Handa <handa@m17n.org>
996 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
998 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
999 (MFLTFont): Prototype of the member drive_otf adjusted.
1001 * m17n-flt.c (run_stages): Fix handling of padding.
1003 * font-ft.c (get_glyph_metric): New function.
1004 (DEVICE_DELTA): Return 26.6 fixed point value.
1005 (adjust_anchor): Likewise.
1006 (mfont__ft_drive_otf): Use get_glyph_metric.
1008 * font-flt.c (mfont__flt_run): Pay attention to padding on
1009 printing debug info.
1011 2007-08-16 Kenichi Handa <handa@m17n.org>
1013 * m17n-flt.c (run_stages): Fix typo.
1015 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
1017 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
1018 Adjusted for the argument change of adjust_anchor. Calculte based
1019 on 26.6 fixed point.
1021 2007-08-15 Kenichi Handa <handa@m17n.org>
1023 * charset.c (mcharset__load_from_database): Set mdebug_flag
1024 instead of mdebug_mask.
1026 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
1029 * database.c (load_database): Set mdebug_flag instead of
1031 (mdatabase__load_for_keys): Likewise.
1033 * draw.c: Include "internal-flt.h".
1034 (dump_combining_code): Don't subtract 128 from combining code
1037 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
1039 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
1041 (run_cond): Likewise.
1042 (run_otf): Likewise.
1043 (run_command): Likewise.
1044 (mfont__flt_run): Change format of debug info.
1046 * font-ft.c: Include "internal-flt.h".
1047 Set mdebug_flag instead of mdebug_mask.
1048 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
1050 * input.c: Set mdebug_flag instead of mdebug_mask.
1051 (shift_state): New MDEBUG_FLAG macro.
1052 (preedit_commit): Likewise.
1055 * internal-flt.h: New file.
1057 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
1058 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
1059 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
1060 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
1061 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
1062 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
1063 these macros to internal-flt.h.
1065 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
1067 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
1068 (enum MDebugMaskBit): Delete this enum.
1069 (enum MDebugFlag): New enum.
1070 (mdebug__flag): Don't extern it.
1071 (mdebug__flags): Extern it.
1072 (MDEBUG_FLAG): New macro.
1073 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
1074 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
1075 (MDEBUG_PRINT_TIME): Likewise.
1077 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
1078 (xfont_list): Likewise.
1080 * m17n-core.c (mdebug__flag): Delete this variable.
1081 (mdebug__flags): New variable.
1082 (SET_DEBUG_FLAG): Make it a function.
1083 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
1084 (m17n_fini_core): Likewise.
1086 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
1087 (m17n_fini_win): Likewise.
1089 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
1091 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
1092 (m17n_fini): Likewise.
1094 * symbol.c (msymbol__free_table): Adjusted for the change of
1097 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
1098 (BASICHEADERS): Add m17n-flt.h.
1099 (FLT_SOURCES): New variable.
1100 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
1101 (libm17n_flt_la_LDFLAGS): Likewise.
1103 * m17n-flt.h: New file.
1105 * m17n-flt.c: New file created by modifying font-flt.c.
1107 2007-07-13 Kenichi Handa <handa@m17n.org>
1109 * Version 1.4.0 released.
1111 2007-07-12 Kenichi Handa <handa@m17n.org>
1113 * input.c: Fix doxygen @ref commands.
1115 2007-07-10 Kenichi Handa <handa@m17n.org>
1117 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
1119 2007-07-09 Kenichi Handa <handa@m17n.org>
1121 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
1123 * m17n.h: Include m17n-core.h if not yet done. Use macros
1124 M17N_BEGIN_HEADER and M17N_END_HEADER.
1126 * m17n-gui.h: Likewise.
1128 * m17n-misc.h: Likewise.
1130 2007-06-13 Kenichi Handa <handa@m17n.org>
1132 * font-flt.c (load_command): Prepend "^" in the regular expression.
1134 2007-06-11 Kenichi Handa <handa@m17n.org>
1136 * language.c (mlanguage_name_list): Fix previous change.
1138 * coding.c (mcoding__load_from_database): Add aliases in
1139 coding_definition_list.
1141 2007-06-10 Kenichi Handa <handa@m17n.org>
1143 * language.c (mlanguage_name_list): Fix previous change.
1145 2007-06-08 Kenichi Handa <handa@m17n.org>
1147 * input.c (update_candidate): Copy candidate_list earlier.
1148 (re_init_ic): Provide pseudo initialize state if none.
1150 2007-06-05 Kenichi Handa <handa@m17n.org>
1152 * input.c (preedit_insert): Print debug information.
1154 * database.c (expand_wildcard_database): New function.
1155 (mdatabase_list): Fix handling of wildcard database.
1157 * language.c (load_lang_name): New function.
1158 (mlang__fini): Cancel the last two changes.
1159 (mlanguage_name_list): New arg script and territories. Use
1162 * m17n.h (mlangauge_name_list): Adjusted.
1164 2007-06-04 Kenichi Handa <handa@m17n.org>
1166 * input.c (open_im): Check if the input method has at least one
1169 2007-06-01 Kenichi Handa <handa@m17n.org>
1171 * input.c (shift_state): Change the format of debug print.
1172 (preedit_commit): New arg need_prefix. Caller changed.
1173 (update_candidate): Copy candidate_list.
1174 (take_action_list): Likewise.
1175 (handle_key): Change the format of debug print.
1177 * font-flt.c (load_flt): Ignore unknown directives.
1179 2007-05-25 Kenichi Handa <handa@m17n.org>
1181 * m17n-core.c (mdebug__unregister_object): Small optimization.
1183 * database.c (find_file): Merged into get_database_file.
1184 (get_database_file): New arg result. Caller changed.
1185 (mdatabase__check): Fix the logic.
1187 2007-05-24 Kenichi Handa <handa@m17n.org>
1189 * database.c (find_database): If unprocessed wildcard database is
1190 found, register database filed and recursively call find_database.
1191 (free_db_info): Unref db_info->properties.
1192 (register_database): New arg properties. Delete code for
1193 initializing mdatabase__list.
1194 (register_databases_in_files): Argument changed. Caller changed.
1195 (mdatabase__update): Don't list files by glob here.
1196 (mdatabase_list): If unprocessed wildcard database is found,
1197 register database filed and recursively call mdatabase_list.
1199 * database.h (enum MDatabaseStatus): New enum
1200 MDB_STATUS_AUTO_WILDCARD.
1202 * input.c (load_branch): Fix previous change.
1203 (update_global_info): If the global database is not found, return -1.
1205 2007-05-23 Kenichi Handa <handa@m17n.org>
1207 * database.c (Mversion): New variable.
1208 (mdatabase__init): Initialize it.
1209 (register_database): New arg properties. Caller changed.
1210 (register_databases_in_files): Don't check version here.
1211 (mdatabase__update): Likewise.
1213 * database.h (MDatabaseInfo): New member properties.
1215 2007-05-21 Kenichi Handa <handa@m17n.org>
1217 * language.c: Include <ctype.h>
1218 (mlanguage__info): Use strncasecmp (not memcmp).
1219 (mlanguage_name): Downcase language name for backward
1222 * input.c (filter): Don't check Mlanguage property of
1225 2007-05-18 Kenichi Handa <handa@m17n.org>
1227 * language.c (mlanguage_name): Fix it to handle M-text English
1230 * input.c (config_command): Set NAME before using it.
1231 (load_branch): Try to resolve a map name by variables.
1233 2007-05-17 Kenichi Handa <handa@m17n.org>
1235 * language.c (mlang__fini): Fix previous change.
1237 2007-05-16 Kenichi Handa <handa@m17n.org>
1239 * plist.c (free_plist): Cancel the last change.
1240 (write_element): Check if PLIST is nested.
1241 (mplist__from_plist): Label a plist as nested if appropriate.
1242 (mplist__from_alist): Label a plist as nested.
1243 (mplist__conc): Check the value of PL before referring it. Label
1244 a plist as nested if appropriate.
1245 (mplist_copy): Label a plist as nested if appropriate.
1246 (mplist_put_func): Return Mnil if KEY is a managing key.
1247 (mplist_push): Label a plist as nested if appropriate.
1249 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
1252 * language.c (mlang__fini): Unref each element of langname_list.
1254 2007-05-14 Kenichi Handa <handa@m17n.org>
1256 * language.c: Include <string.h> and <locale.h>.
1257 (langname_list): New variable.
1258 (load_lang_script_list): Exclude invalid list elements.
1259 (mlang__init): Initialize langname_list.
1260 (mlang__fini): Unref langname_list.
1261 (mlanguage__info): Adjusted for the change of English
1262 name (symbol->M-text).
1263 (mlanguage_name): Label it as obsolete.
1264 (mlanguage_name_list): New function.
1266 * m17n.h (mlanguage_name_list): Extern it.
1268 * locale.c (make_locale): Fix setting of members of locale.
1270 * plist.c (free_plist): Unref also nested plist.
1272 2007-05-11 Kenichi Handa <handa@m17n.org>
1274 * coding.c (mconv_reset_converter): Set internal->used to 0.
1276 2007-05-08 Kenichi Handa <handa@m17n.org>
1278 * input.c (check_description): Force copying the translated text.
1280 2007-05-02 Kenichi Handa <handa@m17n.org>
1282 * input.c (minput_save_config): Unref unnecessary plist. Use
1283 free_im_list to free im_config_list.
1285 2007-04-20 Kenichi Handa <handa@m17n.org>
1287 * input.c (config_command): Fix previous change again.
1288 (config_variable): Likewise.
1289 (minput_config_command): Fix for the case of setting back to
1291 (minput_config_variable): Likewise.
1292 (minput_save_config): Include nil as documentation of customized
1295 2007-04-05 Kenichi Handa <handa@m17n.org>
1297 * input.c (config_command): Fix previous change.
1298 (config_variable): Likewise.
1300 * plist.c (mplist_get_func): Fix for backward compatiblity.
1302 2007-04-04 Kenichi Handa <handa@m17n.org>
1304 * input.c (minput_get_command, minput_config_command): Fix example
1307 2007-03-29 Kenichi Handa <handa@m17n.org>
1309 These changes are to avoid unsafe casting of a function pointer.
1311 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1312 (struct MFace): New member hook.
1314 * face.c (serialize_face): Adjusted for the change of MFace.
1315 (deserialize_face): Likewise.
1316 (mface__init): Likewise. Use msymbol_put_func.
1317 (mface__realize): Adjusted for the change of MFace. Avoid
1319 (mface_get_prop): Adjusted for the change of MFace.
1320 (mface_put_prop): Likewise.
1321 (mface_get_hook): New function.
1322 (mface_put_hook): New function.
1323 (mface_update): Adjusted for the change of MFace.
1325 * input-gui.c (win_callback): Use mplsit_get_func.
1326 (minput__win_init): Use mplsit_put_func.
1328 * input.c (take_action_list): Use mplist_get_func.
1329 (init_ic_info): Likewise.
1330 (fini_ic_info): Likewise.
1331 (minput_callback): Likewise.
1332 (minput__init): Use mplist_put_func.
1334 * language.c (mlang__init): Use msymbol_put_func.
1336 * m17n-core.h (M17NFunc): New function type.
1337 (M17N_FUNC): New macro.
1338 (msymbol_put_func, msymbol_get_func): Extern them.
1339 (mplist_put_func, mplist_get_func): Extern them.
1341 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1343 * m17n-gui.c (mframe): Add a proper casting.
1345 * plist.h (struct MPlist): Make the member val a union.
1346 (MPLIST_VAL): Adjusted for the above change.
1347 (MPLIST_FUNC): New macro.
1348 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1350 * plist.c (mplist_put_func, mplist_get_func): New functions.
1352 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1353 (msymbol_put_func, msymbol_get_func): New functions.
1355 * textprop.c (mtext_serialize): Use msymbol_get_func.
1356 (mtext_deserialize): Likewise.
1358 2007-03-28 Kenichi Handa <handa@m17n.org>
1360 * input.c (get_candidate_list): Avoid unnecessary unref.
1362 2007-03-23 Kenichi Handa <handa@m17n.org>
1364 * database.c (mdatabase__update): Unref plist at the tail.
1366 2007-03-21 Kenichi Handa <handa@m17n.org>
1368 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1370 (config_command): Fix for the case that configuration is
1372 (config_variable): Likewise.
1373 (minput_config_command): If keyseqlist is an empty list, cancel
1375 (minput_config_variable) If value is an empty list, cancel the
1377 (minput_save_config): Handle cancellation of config and customize
1380 2007-03-15 Kenichi Handa <handa@m17n.org>
1382 * input.c (minput_config_variable): Check custom->vars (not
1385 2007-03-01 Kenichi Handa <handa@m17n.org>
1387 * input.c (reload_im_info): Setup cmds, vars, and title of
1389 (check_variable_value): Fix the return value.
1391 * database.c (mdatabase__check): If necessary, update database and
1394 2007-02-28 Kenichi Handa <handa@m17n.org>
1396 * database.c (get_dir_info): Set dir_info->status to
1397 MDB_STATUS_OUTDATED.
1398 (check_version): New function.
1399 (register_database): Don't call find_database.
1400 (register_databases_in_files): Don't register a database of
1402 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1404 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1405 and MDB_STATUS_OUTDATED.
1407 * font.h (struct MFont): Types of members type, source, and
1408 spacing changed to unsigned.
1410 * internal-gui.h (struct): Types of members category and type
1411 changed to unsigned.
1413 * internal.h (struct MText): Types of members format and coverage
1414 changed to unsigned.
1416 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1417 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1419 2007-02-23 Kenichi Handa <handa@m17n.org>
1421 * input.c (Mpop): New variable.
1422 (fully_initialize): Initialize Mpop.
1423 (parse_action_list): Handle Mpop.
1424 (take_action_list): Likewise.
1425 (handle_key): When a key is unhandled, shift to the initial state
1426 only if the current state has no branch action.
1428 2007-02-12 Kenichi Handa <handa@m17n.org>
1430 * input.c (get_preceding_char): Unref mt if necessary.
1431 (get_following_char): Likewise.
1432 (parse_action_list): Fix handling of `insert' action as
1434 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1435 (take_action_list): Check invalid candidate list.
1437 2007-02-06 Kenichi Handa <handa@m17n.org>
1439 * input.c (integer_value): Check also ic->produced for @-N.
1441 2007-01-26 Kenichi Handa <handa@m17n.org>
1443 * database.c (mdatabase__update): Check mdatabase__dir_list from
1446 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1448 2007-01-12 Kenichi Handa <handa@m17n.org>
1450 * input.c (handle_key): Handle a branch action of the initial
1453 2007-01-10 Kenichi Handa <handa@m17n.org>
1455 * m17n-gd.c (gd_render): Delete superfluous line.
1457 2006-12-26 Kenichi Handa <handa@m17n.org>
1459 * m17n.h (minput_callback): Extern it.
1461 * input.h (minput__callback): Delte extern.
1463 * input.c (get_surrounding_text): Adjusted for the change of
1464 minput__callback to minput_callback.
1465 (delete_surrounding_text): Likewise.
1466 (minput_create_ic): Likewise.
1467 (minput_destroy_ic): Likewise.
1468 (minput_filter): Likewise.
1469 (minput_set_spot): Likewise.
1470 (minput_toggle): Likewise.
1471 (minput_reset_ic): Likewise.
1473 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1474 and ic->candidate_to to 0.
1475 (minput_callback): Renamed from minput__callback.
1477 * input-gui.c (win_callback): Adjusted for the change of
1478 minput__callback to minput_callback.
1480 2006-12-15 Kenichi Handa <handa@m17n.org>
1482 * font-ft.c (ft_add_font): Fix typo.
1484 2006-12-06 Kenichi Handa <handa@m17n.org>
1486 * Version 1.3.4 released.
1488 2006-11-16 Kenichi Handa <handa@m17n.org>
1490 * input.c (parse_action_list): Allow (undo 0).
1491 (adjust_markers): New function.
1492 (preedit_insert, preedit_delete): Call adjust_markers.
1493 (preedit_replace): New function.
1494 (update_candidate): Call preedit_replace instead of preedit_insert
1496 (filter): When ic_info->commit_key_head is nonzero, shift input
1497 event keys even if there's no committed text.
1499 2006-11-10 Kenichi Handa <handa@m17n.org>
1501 * input.h (MInputContextInfo): New member commit_key_head.
1503 * input.c (preedit_commit): Update ic_info->commit_key_head.
1504 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1505 (filter): When committed, shift keys by ic_info->commit_key_head.
1507 2006-10-30 Kenichi Handa <handa@m17n.org>
1509 * input.c (preedit_delete): Fix typo.
1510 (take_action_list): Print more debugging information. Allow
1511 variable in arg of 'select' and `pushback'.
1513 * database.c (gen_database_name): Don't put extra space.
1514 (load_database): Print debugging information.
1515 (register_databases_in_files): New arg headlen. Callers changed.
1516 (mdatabase__load_for_keys): Shorten debugging information.
1517 (mdatabase_load): Don't print debugging information here.
1519 2006-10-27 Kenichi Handa <handa@m17n.org>
1521 * input.c (marker_code): New arg surrounding. Callers changed.
1522 (surrounding_pos): Check if name[0] == '@'.
1523 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1524 (take_action_list): Likewise.
1525 (get_preceding_char): If POS is zero, always call
1526 get_surrounding_text.
1528 2006-10-19 Kenichi Handa <handa@m17n.org>
1530 * input.c (load_variables): Fix setting of `global'.
1532 2006-10-16 Kenichi Handa <handa@m17n.org>
1534 * draw.c (draw_background): Be sure to set *to_x.
1535 (render_glyph_string): If from == to, just return.
1537 2006-10-18 Kenichi Handa <handa@m17n.org>
1539 * database.c (get_dir_info): Return NULL if the directory name is
1541 (register_databases_in_files): Call register_database with
1543 (mdatabase__update): Fix logic. Call register_database with
1545 (mdatabase_define): Call register_database with
1546 MDB_STATUS_EXPLICIT.
1548 * input.c (delete_surrounding_text): Be sure to set members
1549 preceding_text and following_text to NULL.
1550 (shift_state): Save variable values in ic_info->vars_saved.
1551 (preedit_commit): Don't print debug information here. Don't
1552 change ic_info->keys here.
1553 (get_candidate_list): Don't ref plist.
1554 (take_action_list): Don't unref return value of
1555 get_candidate_list. For undo, reset ic->produced and recover
1556 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1558 (init_ic_info): Set ic_info->vars_saved.
1559 (fini_ic_info): Unref ic_info->vars_saved.
1560 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1562 (filter): Be sure to set members preceding_text and following_text
1563 to NULL. Print debug information about produced text. Delete
1564 processed keys from ic_info->keys.
1566 * input.h (MInputContextInfo): New member vars_saved.
1568 2006-10-16 Kenichi Handa <handa@m17n.org>
1570 * database.c (mdatabase__update): Fix the way to get db_info.
1572 2006-10-02 Kenichi Handa <handa@m17n.org>
1574 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1575 `size' changed to 24.
1577 * font.c (xlfd_unparse_name): Adjusted for the change of
1579 (font_score): Likewise.
1580 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1582 * m17n-X.c (MFontX, _MFontX): Deleted.
1583 (SET_SIZE, HAVE_SIZE): Deleted.
1584 (free_display_info): Adjusted for the change of
1585 disp_info->font_list format.
1586 (xfont_registry_list): Likewise.
1587 (xfont_open): Likewise.
1588 (xfont_list): Likewise.
1589 (xfont_encode_char): Ignore size to find a realized font.
1590 (MRealizedFontXft): Change the order of members to make it
1591 compatible with MRealizedFontFT.
1593 2006-09-27 Kenichi Handa <handa@m17n.org>
1595 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1596 (mfont_close): Add comments.
1598 * mtext-lbrk.c (mtext_line_break): Add comment.
1600 2006-09-26 Kenichi Handa <handa@m17n.org>
1602 * input.c (minput_get_description): Handle description about
1603 inclusion-only input methods.
1605 2006-09-21 Kenichi Handa <handa@m17n.org>
1607 * input.c (M_gettext): New variable.
1608 (fully_initialize): Initialize M_gettext.
1609 (check_description): New function.
1610 (load_commands): Call check_description.
1611 (config_all_commands): Be sure to unref pl.
1612 (load_variables): Call check_description.
1613 (config_all_variables): Be sure to unref pl.
1614 (load_im_info): Call check_description.
1616 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1618 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1619 and bind_textdomain_codeset.
1621 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1623 2006-09-15 Kenichi Handa <handa@m17n.org>
1625 * input.c (reload_im_info): Update custom and global info.
1626 (init_ic_info): Fix previous change.
1628 2006-09-14 Kenichi Handa <handa@m17n.org>
1630 * database.c: Include <libgen.h>.
1631 (mdatabase__lock): Make a directory if necessary.
1633 * input.c (resolve_command): Adjusted for the format change of
1634 configured_cmds member.
1635 (load_commands, load_variables): Fix for errornous data handling.
1636 (config_command, config_variable): New function.
1637 (config_all_commands, config_all_variables): Renamed from
1638 config_commands and config_variables. Utilize the above function.
1639 (check_variable_value): Argument changed. Callers changed.
1640 (load_im_info): Call config_all_commands and config_all_variables.
1641 (init_ic_info): Adjusted for the format change of configured_vars
1643 (minput__init): Initialize Mcustomized, Mconfigured, and
1645 (Mcustomized, Mconfigured, Minherited): New variables.
1646 (minput_get_command): Be sure to return NULL if an input method
1647 use no local command.
1648 (minput_get_variable): Be sure to return NULL if an input method
1649 use no local variable.
1650 (minput_config_command, minput_config_variable)
1651 (minput_save_config): Adjusted for the format change of
1652 configured_cmds and configured_vars members.
1654 * plist.c (write_element): Delete superfluous ':'.
1656 2006-09-13 Kenichi Handa <handa@m17n.org>
1658 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1659 (minput_config_file): Extern it.
1661 * draw.c (Minherited): Declaration moved to input.c.
1662 (mdraw__init): Don't initialize Minherited here.
1664 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1666 2006-09-07 Kenichi Handa <handa@m17n.org>
1668 * textprop.c (mtext_serialize): Call mplist__serialize with the
1671 * plist.h (mplist__serialize): Prototype adjusted.
1672 (mplist__assq): Extern it.
1674 * plist.c: Include <ctype.h>
1675 (PUTC, PUTS): New macros.
1676 (write_symbol): New function.
1677 (write_element): New arg indent.
1678 (dump_string, dump_plist_element): Delete them.
1679 (mplist__from_string): New arg pretty.
1680 (mplist__assq): New function.
1681 (mdebug_dump_plist): Use write_element.
1683 * mtext.c (mtext_cat_char): Allocate more memory.
1684 (mdebug_dump_mtext): Don't escal a newline character.
1686 * m17n.h (minput_get_command, minput_get_variable)
1687 (minput_config_command, minput_config_variable)
1688 (minput_save_config): Extern them.
1690 * m17n-core.c: Include <string.h>.
1691 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1692 use the stream stdout instead of a file of that name.
1694 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1697 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1698 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1699 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1700 (MDEBUG_DUMP): Flush the stream.
1702 * input.h (struct _MInputMethodInfo): Delete member im. New
1703 members mdb, language, name, extra, cmds, configured_cmds,
1704 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1705 (MInputContextInfo): New member tick.
1707 * input.c: Big change to improve user-side input method
1708 customization. Here, list just public API changes.
1709 (minput_get_commands, minput_get_variables)
1710 (minput_assign_command_keys, minput_set_variable): Label them
1712 (minput_get_command, minput_get_variable)
1713 (minput_config_command, minput_config_variable)
1714 (minput_save_config): New functions.
1716 * database.h (PATH_MAX): Define it if not yet defined.
1717 (PATH_SEPARATOR): Likewise.
1718 (enum MDatabaseStatus): New enum.
1719 (struct MDatabaseInfo): Moved from database.c. New members status,
1720 time, lock_file, and uniq_file.
1721 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1722 (mdatabase__unlock): Extern them.
1724 * database.c: Include <time.h>.
1725 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1726 (GEN_PATH): Args changed. Callers changed.
1727 (struct MDatabaseInfo): Moved to database.h.
1728 (struct MDatabase, mdb_list): Deleted.
1729 (mdatabase__list): New var.
1730 (get_database_filename): Deleted. Callers changed to use
1732 (find_file, get_database_file): New files.
1733 (get_dir_info): Initialize new members of MDatabaseInfo.
1734 (find_database): Arg chagnded. Callers changed.
1735 (free_db_info, register_database, register_databases_in_files):
1737 (update_database_list): Deleted.
1738 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1739 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1740 (mdatabase__update): New function.
1741 (mdatabase__check): Return value changed.
1742 (mdatabase__file, mdatabase__lock, mdatabase__save)
1743 (mdatabase__unlock): New functions.
1745 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1747 * input.c (get_surrounding_text): Return -2 when surrounding text
1749 (get_following_char): Likewise.
1750 (get_preceding_char): Likewise.
1751 (minput__callback): Return 0 if there is a callback function,
1754 2006-08-17 Kenichi Handa <handa@m17n.org>
1756 * input.c (reset_ic): Use shift_state to setup the current state.
1758 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1760 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1761 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1762 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1764 2006-08-02 Kenichi Handa <handa@m17n.org>
1766 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1768 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1770 * font-ft.c (ft_encapsulate): Add code for debugging.
1771 (mfont__ft_drive_otf): Be sure to encode character before getting
1774 2006-07-21 Kenichi Handa <handa@m17n.org>
1776 * draw.c (mdraw_text_extents): Fix previous typo.
1778 2006-07-19 Kenichi Handa <handa@m17n.org>
1780 * draw.c (gstring_width): New arg lbearing.
1781 (render_glyph_string): Adjusted for the change of gstring_width.
1782 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1784 * m17n-core.h (Mlanguage): Extern it.
1786 * m17n.h (Mlanguage): Extern deleted.
1788 * mtext.c (mtext__init): Initialize Mlanguage.
1789 (Mlanguage): Declaration moved from locale.c
1791 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1792 (Mlanguage): Declaration moved to mtext.c.
1794 * language.c (mlang__init): Don't initialize Mlanguage here.
1796 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1798 2006-07-14 Kenichi Handa <handa@m17n.org>
1800 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1801 (MRealizedFontFT): New member face_encapsulated.
1802 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1803 (ft_gen_font): New function.
1804 (ft_add_font): Use ft_gen_font.
1805 (ft_list_script): Store lists in ft_script_list.
1806 (ft_check_otf): New arg ft_face. Caller changed.
1807 (ft_check_language): Likewise.
1808 (ft_check_script): Likewise.
1809 (ft_encapsulate, ft_close): New functions.
1810 (mfont__ft_driver): Initialize members encapsulate and close.
1811 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1813 * font.h (struct MRealizedFont): New member encapsulating.
1814 (struct MFontDriver): New members encapsulate and close.
1816 * font.c (mfont__match_p): If FONT is realized, check capability
1817 by font drivers's check_capability method.
1818 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1821 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1822 declarations of foundry and fam local vars.
1823 (xft_driver): Make it static.
1825 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1826 (mfont_close): Extern them.
1828 * m17n-gd.c (device_open): Don't specify foundry and family of the
1831 2006-07-11 Kenichi Handa <handa@m17n.org>
1833 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1835 2006-07-13 Kenichi Handa <handa@m17n.org>
1837 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1839 (ft_check_script): Delete unused var.
1840 (ft_list_capability): Likewise.
1842 * font.c (mfont__get_capability): Setup cap->otf.
1843 (Motf): Make it global.
1844 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1846 * font.h (MFontCapability): New member otf.
1848 * language.c (mlang__fini): Delete unused vars.
1850 * m17n-gui.h (Motf): Extern it.
1852 * database.c (update_database_list): Delete unused vars.
1854 2006-07-07 Kenichi Handa <handa@m17n.org>
1856 * font-ft.c (DEVICE_DELTA): Fix typo.
1858 2006-07-06 Kenichi Handa <handa@m17n.org>
1860 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1863 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1865 * database.c: Update comments.
1867 2006-07-05 Kenichi Handa <handa@m17n.org>
1869 * database.c (PATH_MAX): Define it if not yet defined.
1870 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1872 (get_database_filename): Use GEN_PATH.
1873 (get_dir_info): Don't include the last '/' in directory name.
1874 (register_database): New function.
1875 (update_database_list): Use register_database. Search all
1876 directories in mdatabase__dir_list for wildcard databases.
1877 (mdatabase__init): Check "~/.m17n.d".
1879 2006-07-03 Kenichi Handa <handa@m17n.org>
1881 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1882 push reverse property.
1884 * plist.c (dump_plist_element): Fix previous change.
1886 2006-06-28 Kenichi Handa <handa@m17n.org>
1888 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1891 * draw.c (MbidiNSM): New variable.
1892 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1893 attention to bidi type NSM.
1894 (mdraw__init): Initialize MbibiNSM.
1896 * language.c (mscript__char_list): Fix finding a char-list element.
1898 * plist.c (dump_string): Return number of printed characters.
1899 (dump_plist_element): Print elements more compactly.
1901 2006-06-23 Kenichi Handa <handa@m17n.org>
1903 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1904 (include_HEADERS): Likewise.
1906 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1908 * language.c: Update documentation.
1910 2006-06-23 Kenichi Handa <handa@m17n.org>
1912 * font-ft.c (struct MFontFT): Delete member lang.
1913 (free_ft_info): Don't unref member lang. Destroy members langset
1915 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1916 changed. Set members langset and charset.
1917 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1919 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1921 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1922 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1923 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1924 characters at first. If it fails, try listing by language names.
1925 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1926 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1927 change of MFontCapability.
1928 (ft_list_capability): Likewise. Try listing by languages, then by
1929 scripts. Check OTF at last.
1930 (ft_check_script): New function.
1931 (ft_select): Adjusted for the check of MFontCapability.
1932 (ft_list_family_names): New function.
1933 (ft_check_capability): If cap->script is not Mnil, call
1935 (mfont__ft_driver): Initialize with ft_list_family_names.
1937 * font.h (struct MFontDriver): New member list_fmaily_names.
1938 (struct): Change member "MSymbol *lang" to "MSymbol language".
1940 * font.c: Include "language.h".
1941 (Motf): New variable.
1942 (otf_script_list, load_otf_script_list): Delete it.
1943 (find_script_from_otf_tag): Delete it.
1944 (merge_capability): New function.
1945 (mfont__init): Init Motf.
1946 (mfont__fini): Don't unref otf_script_list.
1947 (free_font_capability): Check cap->script_tag to determine if
1948 OTF-related capability is set.
1949 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1950 the change of type MFontCapability.
1951 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1952 and Motf properties.
1953 (mfont_list): Call merge_capability for LANGUAGE arg.
1954 (mfont_list_family_names): New function.
1956 * input-gui.c: Typo in comments fixed.
1958 * input.c: Typo in comments fixed.
1960 * language.h (mlanguage__list): Delete it.
1961 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1964 * language.c: Include "mtext.h".
1965 (M_script_lang_list): Delete it.
1966 (language_list, script_list): New variables.
1967 (load_lang_script_list, init_language_list, init_script_list): New
1969 (mlang__init): Don't load language database here.
1970 (mlang__fini): Unref language_list and script_list if not NULL.
1971 (mlanguage__list): Delete it.
1972 (mlanguage__info, mscript__info, mscript__char_list)
1973 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1974 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1975 (mscript_list, mscript_language_list): New functions.
1977 * m17n-gui.h (mfont_list_family_names): Extern it.
1979 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1980 (mlanguage_text, mscript_list, mscript_language_list): Extern
1983 2006-06-21 Kenichi Handa <handa@m17n.org>
1985 * m17n-X.c (xfont_driver): Initialize with
1986 xfont_list_family_names.
1987 (xfont_list_family_names): New function.
1988 (xft_driver): Initialize with NULL for list_family_names member.
1989 (device_init): Set list_family_names member of xft_driver to that
1990 of mfont__ft_driver.
1992 2006-06-06 Kenichi Handa <handa@m17n.org>
1994 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1996 2006-03-24 Kenichi Handa <handa@m17n.org>
1998 * font-ft.c (ft_open): Improve debug message.
2000 * fontset.c (mfontset__get_font): Fix for the case that no font in
2001 per_script list is available.
2003 2006-02-06 Kenichi Handa <handa@m17n.org>
2005 * Version 1.3.3 released.
2007 2006-02-22 Kenichi Handa <handa@m17n.org>
2009 * textprop.c: Fix some typos in documentation.
2011 * plist.c: Fix some typos in documentation.
2013 * m17n-core.h: Fix some typos in documentation.
2014 (M17NLIB_PATCH_LEVEL): Updated to 3.
2015 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
2017 * symbol.c: Fix some typos in documentation.
2019 * mtext.c: Fix some typos in documentation.
2021 * input.c: Fix several typos in documentation.
2023 2006-02-06 Kenichi Handa <handa@m17n.org>
2025 * Version 1.3.2 released.
2027 2006-02-03 Kenichi Handa <handa@m17n.org>
2029 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
2030 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
2032 * font.c (xlfd_parse_name): Fix handling of the name "nil".
2034 * draw.c (layout_glyphs): Fix handling left_padding of
2037 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
2039 2006-02-02 Kenichi Handa <handa@m17n.org>
2041 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
2042 if WITH_GUI is true.
2044 2006-01-25 Kenichi Handa <handa@m17n.org>
2046 * input.c (resolve_expression): If the value of PLIST is a plist,
2047 but the first element is not symbol, return 0.
2049 2006-01-17 Kenichi Handa <handa@m17n.org>
2051 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
2052 HAVE_GD is 2 or the greater.
2054 2006-01-16 Kenichi Handa <handa@m17n.org>
2056 * Version 1.3.1 released.
2058 2006-01-16 Kenichi Handa <handa@m17n.org>
2060 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
2061 simulating anti-aliasing.
2063 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
2064 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
2066 2006-01-12 Kenichi Handa <handa@m17n.org>
2068 * input.c (get_surrounding_text): Always pop ic->plist.
2069 (reset_ic): Don't reset ic->plist.
2071 2006-01-10 Kenichi Handa <handa@m17n.org>
2073 * input.c (preedit_commit): For debugging, print only commiting
2074 charactes. Don't set ic->candidate_show to 0.
2075 (handle_key): Don't run branch-actions just by shifting to the
2077 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
2078 Reset vars and plist.
2080 2006-01-07 Kenichi Handa <handa@m17n.org>
2082 * input.c (load_branch): Confirm that maps is not NULL.
2084 2006-01-05 Kenichi Handa <handa@m17n.org>
2086 * input-gui.c (win_filter): Try to convert arg to key only when
2089 * plist.c (read_integer_element): If '#' and '-' are followed by
2090 non-integer-constituent, read them as a part of a symbol.
2091 (read_symbol_element): New arg C.
2092 (read_element): Adjust args to read_symbol_element.
2094 * input.c (load_macros): On overwriting a macro, free the old
2096 (minput__init): Store Mmap in load_im_info_keys.
2097 (minput_get_title_icon): If the input method has no title, be sure
2099 (minput_get_description): If the input method has no description,
2100 be sure to return NULL.
2101 (minput_get_variables): Fix documentation.
2102 (handle_key): Pay attention to the case that key is Mnil.
2103 (filter): Likewise. Fix handling of such symbol as S-A.
2105 2005-12-22 Kenichi Handa <handa@m17n.org>
2107 * Version 1.3.0 released.
2109 2005-12-22 Kenichi Handa <handa@m17n.org>
2111 * font-ft.c (ft_list): If the specified font has no property,
2114 2005-12-20 Kenichi Handa <handa@m17n.org>
2116 * character.c (mchar_get_prop): Check char_prop_list.
2117 (mchar_put_prop, mchar_get_prop_table): Likewise.
2119 2005-12-18 Kenichi Handa <handa@m17n.org>
2121 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
2122 file name sans language.
2124 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
2126 * input.c: Fix typo in comments.
2128 2005-12-14 Kenichi Handa <handa@m17n.org>
2130 * input.c (minput_get_title_icon): Check the default icon for the
2133 2005-12-13 Kenichi Handa <handa@m17n.org>
2135 * input.c (Mless_equal, Mgreater_equal): New variables.
2136 (parse_expression, resolve_expression, parse_action_list)
2137 (take_action_list): Handle the aboves.
2138 (filter): Treat key S-X as X.
2139 (minput__init): Initialize Mless_equal and Mgreater_equal.
2140 (minput_get_title_icon): New function.
2142 * m17n.h (minput_get_title_icon): Extern it.
2144 * database.c (get_database_filename): Return a filename instead of
2146 (load_database): Adjusted for the above change.
2147 (mdatabase__load_for_keys): Likewise.
2148 (mdatabase__find_file): New function.
2150 * database.h (mdatabase__find_file): Extern it.
2152 * font.h (mfont__resize): Delete extern.
2154 * font.c (mfont__list): Check resize ratio.
2155 (mfont__resize): Delete it.
2156 (mfont_resize_ratio): Include the code of mfont__resize.
2158 * font-ft.c (ft_open): Check resize ratio.
2160 * m17n-X.c (xfont_open): Check resize ratio.
2161 (xft_open): Likewise.
2163 2005-12-07 Kenichi Handa <handa@m17n.org>
2165 * input.c (take_action_list): If take_action_list return -1,
2167 (handle_key): Likewise.
2169 * face.c (mface__for_chars): When font is specified and layouter
2170 is found for it, if the layouter doesn't support one of a
2171 character, use a face sans layouter for it.
2173 2005-12-06 Kenichi Handa <handa@m17n.org>
2175 * fontset.c (mfont__lookup_fontset): If only a fallback font is
2176 found, don't use it for more than one character.
2178 2005-12-05 Kenichi Handa <handa@m17n.org>
2180 * face.c (mface__realize): Set rfont->layouter to Mnil.
2181 (mface__for_chars): Fix handling of layouter.
2183 * character.h (mchar__define_prop): Extern it.
2185 * database.c (update_database_list): Call mchar__define_prop if
2188 * character.c (mchar__init): Don't call mchar_define_property.
2189 Instead just initialize property keys.
2190 (mchar__fini): Free char_prop_list only if it's not NULL.
2191 (mchar__define_prop): New function.
2192 (mchar_define_property): Call mchar__define_prop.
2194 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
2197 2005-12-02 Kenichi Handa <handa@m17n.org>
2199 * language.c (mlang__init): Handle extra chars.
2201 * m17n-gui.h (mfont_check): Adjust prototype.
2203 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
2204 (xfont_check_capability): New function.
2205 (xft_driver): Specify xft_check_capability.
2206 (xft_check_capability): New function.
2208 * font-ft.c (M0_3): Delete it.
2210 (ft_get_charmaps): Refer to M0.
2211 (fc_parse_pattern): Fix previous change.
2212 (ft_list_language): Check also extra chars.
2213 (ft_check_otf): Define it even if HAVE_OTF is undef.
2214 (ft_check_lang): Check the result of FcLangSetHasLang against
2215 FcLangDifferentLang. Check also extra chars.
2216 (ft_list_capability): Delete ifdef HAVE_OTF.
2217 (ft_select): Likewise.
2218 (ft_open): Improve debug information.
2219 (ft_check_capability): New function.
2220 (mfont__ft_driver): Specify ft_check_capability.
2221 (mfont__ft_init): Initialize M0.
2223 * fontset.c (get_font_from_group): New function.
2224 (mfontset__get_font): New function.
2226 * fontset.h (mfontset__get_font): Extern it.
2228 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
2229 (mfont__fini): Delete ifdef HAVE_OTF.
2230 (free_font_capability): Likewise.
2231 (mfont__get_capability): Likewise.
2232 (mfont__check_capability): New function.
2233 (mfont_check): Change the order of arguments. Use
2236 * font.h (struct MFontDriver): New member check_capability.
2237 (MFontCapability): Delete ifdef HAVE_OTF.
2238 (mfont__check_capability): Extern it.
2240 * face.c (mface__realize): Fix handling of FONT arg.
2241 (mface__for_chars): Fix handling of explicitly specified font.
2243 2005-11-25 Kenichi Handa <handa@m17n.org>
2245 * font-flt.c (run_command): Print debug info for
2248 * draw.c (layout_glyphs): Fix handling of left/right_padding.
2250 * face.c (mface__for_chars): Check rfont before accessing the
2253 2005-11-21 Kenichi Handa <handa@m17n.org>
2255 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
2258 * fontset.c (fontset_table): New variable.
2259 (free_fontset): Call M17N_OBJECT_UNREGISTER.
2260 (mfont__fontset_init): Add fontset_table as an object array.
2261 (mfont__realize_fontset): Ref FONTSET.
2262 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2263 (mfontset): Call M17N_OBJECT_REGISTER.
2264 (mfontset_copy): Likewise.
2266 * input.c (handle_key): For debugging, print information about
2268 (filter): Add an alias for Meta and Alt modifiers.
2269 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2271 (minput__init): Initialize them.
2272 (parse_expression): New function.
2273 (resolve_expression): New function.
2274 (parse_action_list): Handle expressions by parse_expression.
2275 (take_action_list): Handle expressions by resolve_expression.
2276 (parse_nested_list_value): Fix previous change.
2277 (resolve_command): Fix handling of the return value of
2280 2005-11-18 Kenichi Handa <handa@m17n.org>
2282 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2283 HAVE_OTF is defined.
2284 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2286 (ft_select): Likewise.
2288 * font.c (mfont_list): Fix for the case that FONT is NULL.
2289 (OTF_tag): Delete it.
2290 (load_otf_script_list): Define only when HAVE_OTF is defined.
2291 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2294 * draw.c (truncate_gstring): Be sure to truncate at
2295 glapheme-cluster boundary.
2297 2005-11-11 Kenichi Handa <handa@m17n.org>
2299 * input.c (delete_surrounding_text): Clear cache if necessary.
2301 2005-11-09 Kenichi Handa <handa@m17n.org>
2303 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2304 glyph prev is also supported by the current flt.
2306 2005-11-08 Kenichi Handa <handa@m17n.org>
2308 * m17n-X.c (xft_render): Cancel previous change.
2310 2005-11-07 Kenichi Handa <handa@m17n.org>
2312 * input.c: Include <stdlib.h>.
2313 (get_surrounding_text, delete_surrounding_text)
2314 (get_preceding_char, get_following_char): New functions.
2315 (integer_value): New arg surrounding. If it is nonzero, try to
2316 get a surrounding character. Callers changed.
2317 (take_action_list): Check `value' before setting an element.
2318 (destroy_ic): Unref ic_info->preceding_text and
2319 ic_info->following_text.
2320 (minput__init): Initialize Minput_get_surrounding_text and
2321 Minput_delete_surrounding_text.
2322 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2324 (filter): Unref ic_info->preceding_text and
2325 ic_info->following_text.
2327 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2330 * input.h (MInputContextInfo): New members preceding_text and
2333 2005-11-04 Kenichi Handa <handa@m17n.org>
2335 * input.c (parse_nested_list_value): Fix handling of the global
2337 (get_nested_list): Get global definitions by load_partial_im_info.
2338 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2339 MInputCandidatesChanged.
2340 (take_action_list): Likewise.
2341 (reset_ic): Likewise.
2342 (create_ic): Don't pay special attention to
2343 Mcandidates_group_size.
2344 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2345 (minput_set_variable): Get a definition of varible by
2346 mplist_find_by_value, not mplist_get.
2348 * m17n.h (enum MInputCandidatesChanged): New enum.
2350 2005-11-01 Kenichi Handa <handa@m17n.org>
2352 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2354 (mwin__destroy_window): If xft_draw's drawable is win, change it
2355 to device->drawable before destroying win.
2357 2005-10-31 Kenichi Handa <handa@m17n.org>
2359 * input.c (load_im_info): Fix adding of state.
2361 * m17n-core.c (m17n_fini_core): Fix reporting of module
2364 * m17n.c (m17n_fini): Fix reporting of module finalization.
2366 * m17n-gui.c (m17n_init_win): Fix reporting of module
2369 2005-10-29 Kenichi Handa <handa@m17n.org>
2371 * input.c (get_candidate_list): Fix the timing of referring plist.
2373 2005-10-28 Kenichi Handa <handa@m17n.org>
2375 * input.c (load_branch): Ignore an undefined map name.
2376 (load_im_info): Set im_info->title from `name' only if it's not
2378 (shift_state): Always update ic->status.
2379 (adjust_candidates): Renamed from adjust_candidate_command.
2380 Argument changed. Caller changed.
2381 (get_candidate_list, regularize_action): New functions.
2382 (take_action_list): Use them. On handling Munhandle, don't set
2384 (handle_key): If KEY is not handled by MAP, and MAP has
2385 branch_actions, perform them.
2387 * database.c (mdatabase__fini): Free dir_info->filename;
2389 2005-10-20 Kenichi Handa <handa@m17n.org>
2391 * input.c (marker_code): Accept '@@'.
2392 (integer_value): Handle '@@'.
2393 (parse_action_list): Accept a symbol argument.
2394 (take_action_list): Resolve the symbol argument. Handle the
2397 2005-10-18 Kenichi Handa <handa@m17n.org>
2399 * input.c: Include "charset.h".
2400 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2402 (MIMState): New member (M17NObject control).
2403 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2404 (get_nested_list, resolve_variable): New functions.
2405 (integer_value): New arg (MPlist **value). Set it to the plist
2406 element containing the value.
2407 (resolve_command): New function.
2408 (load_translation): New arg (MPlist *map_actions).
2409 (load_branch): New args language and name. If `keylist' is a
2410 symbol, resolved that as a command name.
2411 (free_map): New arg top. Free map->map_actions only if top is
2413 (free_state): New function.
2414 (load_state): New arg name.
2415 (im_info_list): New variable.
2416 (free_im_info, get_im_info_by_tags): New functions.
2417 (load_im_info): Arg key changed to plist. Handle `include'.
2418 Return (MInputMethodInfo *).
2419 (preedit_commit): Ref ic->candidate_list.
2420 (get_select_charset, adjust_candidate_command): New functions.
2421 (take_action_list): Handle `include'. Adjust candidate action
2422 properly. Handle control variables `candidates-charset' and
2423 `candidates-group-size'.
2424 (open_im): Use get_im_info.
2425 (create_ic): Get global variables.
2426 (load_partial_im_info): New function.
2427 (get_im_info): New function.
2428 (check_command_keyseq, check_command_list, check_variable_list):
2430 (minput__init): Don't handle M_database_hook and Mdetail_text.
2431 Initialize M_candidates, Mcandidates_group_size,
2432 Mcandidates_charset.
2433 (parse_variable_list, get_variable_list, parse_command_list)
2434 (get_command_list): Delete them.
2435 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2436 (minput__fini): Simply unref command_list and variable_list.
2437 (minput_get_description): Adjusted for the new form of description.
2438 (minput_get_commands): Use get_nested_list.
2439 (minput_assign_command_keys): Likewise.
2440 (minput_get_variables, minput_set_variable): Likewise.
2442 * input.h (MInputMethodInfo): New members im and maps.
2444 * database.h (M_database_hook): Delete extern.
2445 (MDatabaseHookFunc): Delete extern.
2446 (mdatabase__check): Extern it.
2448 * database.c: Include <glob.h>.
2449 (MAX_TIME): New macro.
2450 (Masterisk): New variable.
2451 (get_database_stream): Argument changed to (MDatabaseInfo *).
2453 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2454 (find_database): New function.
2455 (update_database_list): New function.
2456 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2457 calling update_database_list.
2458 (mdatabase__check): New function.
2459 (mdatabase_find): Use update_database and find_database. Don't
2460 handle MDatabaseHookFunc.
2461 (mdatabase_list): Call update_database at first.
2462 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2463 (MDatabaseList): New type.
2465 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2467 * m17n.h (Mdetail_text): Delete extern.
2469 * m17n-core.h (mplist_conc): Delete extern.
2471 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2473 (mplist_conc): Renamed to mplist__conc.
2474 (mplist__pop_unref): New function.
2476 2005-10-14 Kenichi Handa <handa@m17n.org>
2478 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2480 (read_element): If keys is an empty plist, return any element
2482 (dump_plist_element): Check if plist is nested.
2483 (mplist_conc): Always ref tail.
2484 (mplist_set): If key is a managing key, ref val in advance.
2486 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2487 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2488 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2491 * fontset.c (free_fontset): Unref fontset_list if necessary.
2492 (mfont__fontset_fini): Don't free fontset_list. Unref
2494 (mfont__realize_fontset): Initialize request.
2495 (mfontset): Ref default_fontset or fontset only if necessary.
2496 (mfontset_copy): Don't ref copy.
2498 * draw.c (render_glyphs): Check gend->type before checking
2501 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2502 unrefed plists to NULL.
2504 2005-10-04 Kenichi Handa <handa@m17n.org>
2506 * textprop.c (mtext_serialize): Be sure to make mt
2507 MTEXT_FORMAT_UTF_8 and NULL terminated.
2509 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2511 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2513 2005-10-03 Kenichi Handa <handa@m17n.org>
2515 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2516 is not at the beginning of line.
2518 2005-09-22 Kenichi Handa <handa@m17n.org>
2520 * input.c: Include <sys/stat.h> and <unistd.h>.
2521 (Minclude, Mcommit, Munhandle): New variables.
2522 (minput__init): Initialize them. Push only Mstate to
2523 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2524 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2526 (load_input_method): Handle "include" directive. If no states are
2528 (shift_state): If state_name is Mt, shift back to the previous
2529 state. Call preedit_commit to commit preedit text.
2530 (preedit_commit): New function.
2531 (take_action_list): Improve debug printing. Handle commit and
2533 (handle_key): Check the return value of take_action_list. Don't
2534 take branch_actions just after changing to the root map.
2535 (reset_ic): Reset all ic_info members.
2536 (filter): When a key is not handled, just move ic_info->keys
2537 instead fo calling reset_ic.
2538 (load_im_info): If key is not Mstate, push Mmap to
2540 (MDatabaseStatList): New type.
2541 (imdir_stat_list): New variable.
2542 (input_method_hook): Don't cancel the hook. Check the
2543 modification time of directories.
2544 (minput__fini): Free imdir_stat_list;
2546 * input.h (MInputContextInfo): New member prev_state.
2548 * m17n-core.h (mplist_conc): Extern it.
2550 * plist.c (mplist_conc): New function.
2552 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2554 * font.h (MRealizedFont): New member average_width.
2556 * font-ft.c (ft_open): Set rface->average_width.
2558 * font.c (xlfd_unparse_name): Print '*' before registry name.
2560 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2561 (xfont_open): Set rfont->average_width.
2562 (xft_open): Likewise.
2563 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2565 * internal-gui.h (struct MFrame): New member average_width.
2567 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2568 (mframe_get_prop): Return the average_width of a font.
2570 * face.c (mface__realize): Set rface->average_width.
2571 (mface__update_frame_face): Set frame->average_width.
2573 * face.h (MRealizedFace): New member average_width.
2575 2005-09-19 Kenichi Handa <handa@m17n.org>
2577 * font.c (xlfd_unparse_name): New arg full_xlfd.
2578 (mfont__encode_char): Use shortcut only for X core fonts.
2579 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2580 (mfont_put_prop): Handle `language' property.
2581 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2582 Print file can capability info too.
2584 * m17n-core.c (mdebug__output): New variable.
2585 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2586 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2587 (m17n_fini_core): Close mdebug__output if it's not stderr.
2589 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2590 (xfont_open): Handle baseline_offset.
2591 (xfont_find_metric): Likewise.
2592 (xfont_render): Likewise.
2593 (xft_open): Likewise.
2594 (xft_render): Likewise.
2596 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2597 (mdebug__output): Extern it.
2598 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2599 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2600 (MDEBUG_DUMP): New macro.
2601 (MDEBUG_PRINT_TIME): Print to medebug__output.
2603 * font.h (MRealizedFont): New member baseline_offset.
2605 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2607 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2608 (ft_list_family): Check alias.
2609 (ft_list_language): If language is "en", don't try to the second
2611 (ft_default_list): New variable.
2612 (ft_list_default): New function.
2613 (ft_select): If family is not specified, try only the default
2614 fonts. Treat the weights normal and medium same.
2615 (ft_open): Fix debug message. If registry is not specified, try
2616 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2617 (ft_find_metric): Likewise.
2618 (ft_render): Likewise.
2619 (ft_list): Fix debug message. Accept the registring iso8859-1.
2620 If family is not specified, try only the default fonts.
2622 * face.c (mface__realize): Fix logic of opening a font.
2624 2005-09-16 Kenichi Handa <handa@m17n.org>
2626 * face.c (mface__realize):
2628 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2631 * input.c (shift_state): Fix the condition of taking init actions.
2632 (take_action_list): Fix handling of pushback action.
2633 (handle_key): Don't change key while checking its alias.
2634 (minput__init): Initialize new variables.
2635 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2638 2005-09-12 Kenichi Handa <handa@m17n.org>
2640 * mtext.c (mtext__uppercase): Add proper open/close parens.
2641 (mtext_titlecase): Add proper casting.
2643 * input.c (parse_action_list): Handle the case that the arg is a
2644 key sequence (MText or MPlist).
2645 (take_action_list): Likewise.
2646 (shift_state): Shorter debug message.
2647 (handle_key): Terminate a debug message by "\n".
2648 (reset_ic): Don't take initial actions here.
2649 (minput_open_im): Print a debug message.
2650 (minput_close_im): Likewise.
2651 (minput_create_ic): Likewise.
2652 (minput_destroy_ic): Likewise.
2654 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2656 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2659 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2660 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2663 * character.c: Add Japanese documentation for
2664 mchar_get_prop_table ().
2666 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2668 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2669 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2670 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2672 (init_case_conversion): New function.
2673 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2674 (uppercase_precheck, lowercase_precheck, final_sigma)
2675 (after_soft_dotted, more_above, before_dot, after_i)
2676 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2678 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2680 * plist.c (read_mtext_element): Fix previous change.
2682 2005-09-05 Kenichi Handa <handa@m17n.org>
2684 * plist.c (read_mtext_element): Handle \uXXXX notation.
2686 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2687 (MTABLE_ALLOCA): Change the name of local variable.
2689 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2690 HAVE_FREETYPE are defined.
2692 * m17n-X.c: Check HAVE_X11.
2694 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2695 directory listing libraries.
2696 (noinst_PROGRAMS): Define it only in maintainer mode.
2698 2005-09-02 Kenichi Handa <handa@m17n.org>
2700 * m17n-gui.h (mdraw_line_break_option): Extern it.
2702 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2703 end of the first glyph.
2704 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2706 (mdraw_line_break_option): New variable.
2707 (mdraw_default_line_break): Use mtext_line_break.
2709 * mtext.h (wordseg_func_table): Don't extern it.
2710 (mtext__wseg_fini): Extern it.
2712 * mtext.c: Don't include word-thai.h.
2713 (wordseg_func_table): Delete this variable.
2714 (mtext__init): Don't initialize above. Don't call
2715 mtext__word_thai_init.
2716 (mtext__fini): Don't free wordseg_func_table. Call
2717 mtext__wseg_fini instead fo mtext__word_thai_fini.
2718 (MTextWordsegFunc): Don't typedef it.
2719 (mtext__word_segment): Moved to mtext-wseg.c.
2721 * m17n-core.h (enum MTextLineBreakOption): New enum.
2722 (mtext_line_break): Extern it.
2724 * mtext-wseg.c: New file.
2726 * mtext-lbrk.c: New file.
2728 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2729 add mtext-lbrk.c and mtext-wseg.c.
2731 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2732 the case that head is NULL.
2734 2005-09-01 Kenichi Handa <handa@m17n.org>
2736 * word-thai.c (wordseg_propertize): If the property value is nil,
2737 don't make the property no-merge.
2738 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2739 attention to the case that they are NULL.
2740 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2743 * character.c (mchar_get_prop_table): New function.
2745 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2747 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2748 (mchar_get_prop_table): Extern it.
2750 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2751 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2753 * internal.h (enum MTextCoverage): New enum.
2754 (MText): New member coverage.
2756 * mtext.c (FORMAT_COVERAGE): New macro.
2757 (insert): Copy mt2->coverage.
2758 (mtext__from_data): Initialize mt->coverage.
2759 (mtext__adjust_format): Update mt->coverage.
2760 (mtext): Initialize mt->coverage.
2761 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2762 Update mt->coverage if necessary.
2763 (mtext_duplicate): Copy mt->coverage.
2764 (mtext_insert, mtext_replace): New functions.
2765 (mtext_dup): Use mtext_duplicate.
2766 (mtext__word_segment): Don't set *from and *to if a word
2767 segmentation funcion is not found.
2768 (mtext_ins_char): Fix typo.
2770 2005-08-25 Kenichi Handa <handa@m17n.org>
2772 * font.h (MFont): New member for_full_width.
2774 * font.c (compare_font_score): Prefer a font of not
2777 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2778 registry charset of a font is one of CJK charsets.
2780 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2781 supports some of CJK.
2783 2005-08-24 Kenichi Handa <handa@m17n.org>
2785 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2787 * m17n-gui.c (null_device_open): Check Mresolution param and set
2790 * m17n-gd.c (device_open): Check Mresolution param and set
2793 * m17n-X.c (MWDevice): New member resy.
2794 (xfont_open): Set ascent, descent, and max_advance members of
2796 (xft_open): Likewise.
2797 (device_open): Compare also screen_num to find a device. Set
2798 device->resy and frame->dpi.
2800 * internal-gui.h (MFrame): New member dpi.
2802 * font.h (MRealizedFont): New member max_advance.
2804 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2805 (mfont__init): Don't initialize Mascent, Mdescent.
2806 (Mascent, Mdescent): Delete these variables.
2807 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2808 Mfont_descent instead of Mascent and Mdescent.
2809 (mfont_put_prop): Allow negative size.
2810 (mfont_find): Handle the case of spec->size < 0. Fix previous
2812 (mfont_list): Handle the case of spec->size < 0.
2813 (mfont_check): Likewise.
2815 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2816 (fc_get_pattern): Handle the case of font->size < 0.
2817 (ft_open): Set ascent, descent, and max_advance members of rfont.
2818 (ft_find_metric): Improve rounding.
2819 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2822 * face.c (mface__realize): Handle the case of font->size < 0.
2824 2005-08-22 Kenichi Handa <handa@m17n.org>
2826 * coding.c (MConverterStatus): Change the member buf to union.
2827 (mconv_buffer_converter): Add const to the arg buf.
2828 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2829 (mconv_decode): Adjusted for the change of MConverterStatus.
2830 (mconv_encode_range): Likewise.
2832 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2833 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2835 2005-08-20 Kenichi Handa <handa@m17n.org>
2837 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2838 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2840 * m17n-X.c (xfont_open): Set members ascent, descent, and
2841 max_advance of rfont.
2842 (xft_open): Likewise.
2844 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2846 (mfont__ft_parse_name): Add const to the arg name.
2848 * font.c (xlfd_parse_name): Add const to the arg name. Call
2849 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2850 (xlfd_unparse_name): Handle spacing.
2851 (mfont__init): Initialize new variables.
2852 (mfont__id): Handle spacing.
2853 (mfont__merge): Likewise.
2854 (mfont__set_spec): This function deleted.
2855 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2856 condition of calling mfont__ft_parse_name.
2857 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2858 (mfont_get_prop): Handle properties spacing, ascent, descent,
2860 (mfont_find): Return a realized font.
2861 (mfont_from_name): Add const to the arg name.
2863 * font.h (enum MFontProperty): New member MFONT_SPACING.
2864 (enum MFontSpacing): New enum.
2865 (MFont): New members spacing and max_advance.
2866 (mfont__ft_parse_name): Prototype adjusted.
2867 (mfont__set_spec): Extern deleted.
2868 (mfont__parse_name_into_font): Prototype adjusted.
2870 2005-08-19 Kenichi Handa <handa@m17n.org>
2872 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2874 * font.c (mfont_list): If FONT is null, use a temporary font.
2875 (mfont_parse_name): Add const to the arg name.
2877 2005-08-18 Kenichi Handa <handa@m17n.org>
2879 * word-thai.c: Surround code by #ifdef and #endif to escape from
2882 * font-ft.c: Mostly re-written.
2884 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2885 (FontLayoutCmd): Type of the member otf changed..
2886 (load_otf_command): Adjusted for the format change of otf command.
2887 (load_command): Likewise.
2888 (free_flt_command): Unref cmd->body.otf.
2889 (run_otf): Ajusted for the type change of otf_cmd.
2890 (run_command): Ajusted for the type change of otf_cmd. On
2891 debugging, print ctx->combining_code.
2892 (mfont__flt_run): Initialize ctx's members code_offset,
2893 combining_code, and left_padding to 0.
2895 * face.h (struct MRealizedFace): New member font.
2896 (mface__realize): Prototype adjusted.
2898 * face.c (find_realized_face): New arg font.
2899 (find_realized_face): Adjusted for the change of MFont.
2900 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2901 (mface__fini): Don't call mdebug__report_object.
2902 (mface__realize): New arg font.
2903 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2904 Optimize the latin case.
2905 (mface__free_realized): Free rface->font.
2906 (mface__update_frame_face): Adjusted for the change of mface__realize.
2907 (mface_equal): New function.
2909 * draw.c (Mcommon): New variable.
2910 (visual_order): Args to mfont__encode_char changed.
2911 (compose_glyph_string): Handle Mfont text property.
2912 (layout_glyphs): Adjusted for the change of MFont.
2913 (mdraw__init): Initialize Mcommon.
2914 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2916 * font.h (enum MFontType): Members completely changed.
2917 (enum MFontProperty): Move MFONT_SIZE to the tail.
2918 (enum MFontSource): New enum.
2919 (struct MFont): New members type, source, sizes, file, capability,
2921 (struct MRealizedFont): Type of member font changed. Members
2922 score, status, and encoding deleted.
2923 (MFontScore): New type.
2924 (MFontList): Member changed.
2925 (struct MFontDriver): New member has_char. Types of members
2927 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2928 (Mapple_roman): Extern them.
2929 (OTF_Tag): Typedefed if not HAVE_OTF.
2930 (enum MFontOpenTypeTable): New enum.
2931 (MFontCapability): New type.
2932 (mfont__ft_drive_otf): Prototype adjusted.
2933 (mfont__score): Extern deleted.
2934 (mfont__merge): Extern it.
2935 (mfont__has_char): Extern it.
2936 (mfont__encode_char): Prototype adjusted.
2937 (mfont__open): Extern it.
2938 (mfont__set_spec): Prototype adjusted.
2939 (mfont__get_capability): Extern it.
2941 * font.c: Include "fontset.h".
2942 (M_font_capability, M_font_list, M_font_list_len): New variables.
2943 (font_score_priority): Change order of initial elements.
2944 (font_score_shift_bits): Fix array size.
2945 (common_weight): Add "thin", "semibold", and "heavy".
2946 (common_stretch): Add "ultracondensed", "extracondensed",
2947 "extraexpanded", and "utltraexpand".
2948 (font_weight_regular, font_weight_normal, font_weight_medium): New
2950 (gen_font_name): This function deleted.
2951 (find_encoding): Set font->encoding.
2952 (OTF_tag): New function.
2953 (otf_script_list): New variable.
2954 (load_otf_script_list): New function.
2955 (find_script_from_otf_tag): New function.
2956 (xlfd_parse_name): Set font->type and font->source.
2957 (mfont__free_realized): Free chains rfonts.
2958 (font_score): Renamed from mfont__score.
2959 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2960 (Mapple_roman): New variables.
2961 (mfont__init): Initilize new variables. Initalize
2962 default_encoding.encoding_name and
2963 default_encoding.encoding_charset to Municode_full and
2964 mcharset__unicode. Use SAFE* macros for allocating filepath
2966 (mfont__fini): Free otf_script_list.
2967 (mfont__id): New function.
2968 (mfont__match_p): Check also capability member of MFont.
2969 (mfont__merge): New funciton.
2970 (mfont__set_spec_from_face): Set type and source members.
2971 (mfont__set_spec_from_plist): Set capability and type members.
2972 (mfont__select): Argument changed.
2973 (mfont__available): New function.
2974 (compare_font_score): New function.
2975 (mfont__list): New function.
2976 (mfont__open): Return a realized font.
2977 (mfont__resize): Adjusted for the change of MFont.
2978 (mfont__has_char): New function.
2979 (mfont__encode_char): Argument changed.
2980 (mfont__set_spec): Argument changed.
2981 (free_font_capability): New function.
2982 (mfont__get_capability): New function.
2983 (MFontfile): New variable.
2984 (mfont_get_prop): Adjusted for the change of MFont.
2985 (mfont_put_prop): Likewise.
2986 (mfont_set_selection_priority): Fix the way of setting
2987 font_score_priority[].
2988 (mfont_find): Use mfont__list instead of mfont__select.
2989 (mfont_resize_ratio): Adjusted for the change of MFont.
2990 (mfont_list): Use mfont__list.
2991 (mfont_check): New function.
2992 (font_score): Make it static.
2994 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2995 (mfont__lookup_fontset): Likewise.
2997 * fontset.c (struct MFontset): Delete member font_spec_list.
2998 (struct MRealizedFontset): Type of member spec changed. New
3000 (load_font_group): Arg spec_list deleted.
3001 (load_fontset_contents): Adjusted for the change of fontset_def.
3002 (free_fontset): Fix the way of freeing fontset elements.
3003 (realize_fontset_elements): Argument changed.
3004 (get_per_script): New function.
3005 (free_realized_fontset_elements): Fix the way of feeing rfontset
3007 (update_fontset_elements): Fix args to realize_fontset_elements.
3008 (mfont__realize_fontset): New arg spec.
3009 (try_font_list): New function.
3010 (try_font_group): New arg request. Use try_font_list.
3011 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
3013 (mfontset): Adjusted for the change of MFontset.
3014 (mfontset_copy): Likewise. Don't share plists.
3015 (mfontset_modify_entry): Adjusted for the change of MFontset.
3016 (mfontset_lookup): Call get_per_script.
3017 (mdebug_dump_fontset): Print also the address of fonts.
3019 * input.c (shift_state): Don't reset ic_info->vars.
3020 (take_action_list): Call MDEBUG_PRINT fore calling
3023 * internal-gui.h (MFontDriver): Don't typedef it here.
3025 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
3026 (MXFont): This type deleted.
3028 (struct _MFontX): New struct.
3029 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
3030 (MDisplayInfo): Member base_font_list deleted.
3031 (DEFAULT_FONT): Definition changed.
3032 (FALLBACK_FONT): This maclr deleted.
3033 (free_display_info): Adjusted for the change of MDisplayInfo.
3034 (free_device): Argument to mfont__free_realized changed.
3035 (xfont_driver): Adjusted for the change of MFontDriver.
3036 (xfont_registry_list): Use MFontX instead of MXFont.
3037 (MRealizedFontX): Renamed from MXFontInfo.
3038 (xfont_select): Return the font found first.
3039 (close_xfont): Change MXFontInfo to MRealizedFontX.
3040 (xfont_open): Return the realized font.
3041 (xfont_find_metric): Get xfont from rfont->fontp.
3042 (xfont_has_char): New function.
3043 (xfont_encode_char): Adjusted for the argument change.
3044 (xfont_render): Get xfont from rfont->fontp.
3045 (xfont_list): Adjusted for the argument change.
3046 (MRealizedFontXft): Renamed from MXftFontInfo.
3047 (xft_driver): Ajusted for the change of MFontDriver.
3048 (close_xft): Change MXtfFontInfo to MRealizedFontXft
3049 (xft_open_font): Argument changed.
3050 (xft_open): Argument changed. Return the realized font.
3051 (xft_find_metric): Get xft_font from rfont->fontp.
3052 (xft_has_char, xft_encode_char): New functions.
3053 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
3054 font if not yet opened.
3055 (device_open): Don't set frame->font.
3057 * m17n-gd.c (gd_font_driver): Adjusted for the change of
3059 (gd_font_open): New function.
3060 (gd_render): Don't use the local variable ft_info.
3061 (device_init): Adjusted for the change of gd_font_driver.
3063 * textprop.c (mtext__prop_init): Initialize text_property_table.
3064 Call M17N_OBJECT_ADD_ARRAY.
3065 (mtext__prop_fini): Don't call mdebug__report_object.
3067 * plist.c (mplist__init): Initialize plist_table.
3068 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
3069 (mplist__fini): Don't call mdebug__report_object.
3071 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
3072 (mtext__fini): Don't call mdebug__report_object.
3073 (MTEXT_FORMAT_UTF_16): Correct type.
3074 (mtext_data): New function.
3075 (mtext_text): Fix calculation of limit and args to
3078 * language.c: Include "plist.h".
3079 (M_script_lang_list): New variable.
3080 (mlang__init): Read languages and their information from m17n
3082 (mlanguage__list): New function.
3083 (Miso639_1, Miso639_2): New variables.
3085 * language.h (mlanguage__list): Extern it.
3087 * database.c (get_database_stream): Use SAFE_* macros for
3088 allocating and freeing path.
3089 (mdatabase__init): Likewise.
3091 * symbol.c (msymbol__fini): Don't free symbols here.
3092 (msymbol__free_table): New function.
3093 (msymbol_is_managing_key): New function.
3095 * symbol.h (msymbol__free_table): Extern it.
3096 (msymbol__list): Extern it.
3098 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
3100 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
3101 (struct _M17NObjectArray): New member name and next.
3102 (mdebug__add_object_array): Extern it.
3103 (M17N_OBJECT_ADD_ARRAY): New macro.
3104 (mdebug__report_object): Don't extern it.
3106 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
3108 * m17n-gui.c (free_frame): Don't free frame->font.
3109 (null_device_fini): Fix code for freeing
3110 null_device.realized_font_list.
3111 (m17n_fini_win): Free interface.
3112 (mframe): Cast the return value of dlsym. Set frame->font here.
3113 (mframe_get_prop): Check frame->rface->rfont before accessing the
3116 * m17n-gui.h (Mfontfile): Extern it.
3117 (mfont_check): Extern it.
3118 (mface_equal): Extern it.
3120 * m17n-core.c: Include "symbol.h".
3121 (report_header_printed): This variable deleted.
3122 (object_array_root): New variable.
3123 (report_object_array): New function.
3124 (mdebug__report_object): This function deleted.
3125 (mdebug__add_object_array): New function.
3126 (m17n_init_core): Call mchartable_init () before mtext_init ().
3127 (m17n_fini_core): Call report_object_array (if necessary) and
3128 msymbol__free_atable at the end.
3130 * m17n-core.h (msymbol_is_managing_key): Extern it.
3131 (mtext_data): Extern it.
3132 (MTEXT_FORMAT_UTF_16): Correct type.
3133 (M17NLIB_MINOR_VERSION): Changed to 3.
3134 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
3136 * chartab.c (mchartable__init): Initalize chartable_table.count.
3137 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
3138 mdebug__report_object.
3140 2005-05-26 Kenichi Handa <handa@m17n.org>
3142 * m17n.h (Miso639_1, Miso639_2): Extern them.
3144 * symbol.h (msymbol__list): Extern it.
3146 * symbol.c (msymbol__list): New function.
3148 2005-05-19 Kenichi Handa <handa@m17n.org>
3150 * input-gui.c (minput__win_init): Don't change the value of
3153 2005-05-16 Kenichi Handa <handa@m17n.org>
3155 * m17n-core.c (m17n_object): Be sure to initialize all members.
3157 * font-ft.c (fc_decode_prop): Fix args to msymbol.
3159 2005-05-09 Kenichi Handa <handa@m17n.org>
3161 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
3163 2005-04-27 Kenichi Handa <handa@m17n.org>
3165 * language.c (mlang__init): Add "an" (Aragonese).
3167 * word-thai.c: Add support for libthai.
3168 (mtext__word_thai_init): Initialize wordseg library conditionaly.
3169 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
3171 * mtext.c: Include "word-thai.h" conditionaly.
3172 (mtext__init): Call mtext__word_thai_init conditionaly.
3173 (mtext__fini): Call mtext__word_thai_fini conditionaly.
3175 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
3176 not WORDCUT_LD_FLAGS.
3178 2005-04-19 Kenichi Handa <handa@m17n.org>
3180 * word-thai.c (wordseg_propertize): Always unref the attached
3182 (thai_wordseg): Don't unref the property.
3184 2005-04-18 Kenichi Handa <handa@m17n.org>
3186 * word-thai.c: Include stdlib.h.
3187 (wordseg_propertize): Add dummy function for the case that wordcut
3188 library doesn't exist.
3189 (wordseg_propertize): Fix for old wordcut library.
3191 2005-04-16 Kenichi Handa <handa@m17n.org>
3193 * word-thai.c: Include <stdio.h>.
3195 2005-04-15 Kenichi Handa <handa@m17n.org>
3197 * draw.c: Include mtext.h.
3198 (linebreak_table, M_break_at_space, M_break_at_word)
3199 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
3200 (compose_glyph_string): Check POS before getting Mface text
3202 (truncate_gstring): Give correct TO arg to line_break function.
3203 (GET_LB_TYPE): New macro.
3204 (find_break_backward, find_break_forward): New functions.
3205 (mdraw__init): Initialize the above new variables.
3206 (mdraw__fini): Free linebreak_table.
3207 (mdraw_default_line_break): Use find_break_backward and
3210 * word-thai.c: New file.
3212 * word-thai.h: New file.
3214 * mtext.c: Include word-thai.h.
3215 (wordseg_func_table): New variable.
3216 (mtext__init): Initialize wordseg_func_table and call
3217 mtext__word_thai_init.
3218 (mtext__fini): Call mtext__word_thai_fini, free
3220 (MTextWordsegFunc): New type.
3221 (mtext__word_segment): New function.
3223 * mtext.h (wordseg_func_table): Extern it.
3224 (mtext__word_segment): Extern it.
3226 * m17n.c (m17n_init): Fix typo (== -> =).
3228 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
3229 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
3231 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
3232 (MTEXTPROP_VAL): New macros.
3234 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
3236 2005-04-07 Kenichi Handa <handa@m17n.org>
3238 * database.c (load_chartable): Fix pursing of symbol name.
3240 2005-03-24 Kenichi Handa <handa@m17n.org>
3242 * m17n.c (m17n_init): Fix typo (== -> =).
3244 2005-03-11 Kenichi Handa <handa@m17n.org>
3246 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
3248 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
3250 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
3253 2005-03-09 handa <handa@m17n.org>
3255 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
3256 calling m17n_init ().
3258 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
3259 calling m17n_init_core ().
3261 2005-02-28 Kenichi Handa <handa@m17n.org>
3263 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3266 2005-02-17 Kenichi Handa <handa@m17n.org>
3268 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3269 (M_description, M_command, M_variable): New variables.
3270 (load_im_info_keys): New variables.
3271 (load_im_info, check_command_keyseq, get_description_advance)
3272 (parse_command_list, get_command_list, parse_variable_list)
3273 (get_variable_list, input_method_hook): New functions.
3274 (command_list, variable_list): New variables.
3275 (minput__init): Put input_method_hook to Minput_method.
3276 Initialize M_description, M_command, M_variable, Mdetail_text,
3277 load_im_info_keys, command_list, variable_list.
3278 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3279 (Mdetail_text): New variable.
3280 (minput_get_description, minput_get_commands)
3281 (minput_assign_command_keys, minput_get_variables)
3282 (minput_set_variable): New functions.
3284 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3285 (minput_assign_command_keys, minput_get_variables)
3286 (minput_set_variable): Extern them.
3288 * plist.c (UNGETC): Just decrement st->p.
3289 (read_mtext_element): New arg skip.
3290 (read_integer_element): Likewise.
3291 (read_symbol_element): Likewise.
3292 (read_element): New arg KEYS.
3293 (mplist__from_plist): Don't increment ref-count of NULL object.
3294 (mplist__from_file): New arg KEYS.
3295 (mplist_put): Don't increment ref-count of NULL object.
3296 (mplist_add): Likewise.
3297 (mplist_push): Likewise.
3298 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3300 * plist.h (mplist__from_file): Prototype adjusted.
3302 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3303 (get_database_stream): New function.
3304 (load_database): Use get_database_stream.
3305 (M_database_hook): New variable
3306 (mdatabase__init): Initialize M_database_hook.
3307 (mdatabase__load_for_keys): New function.
3308 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3310 (mdatabase_define): Free mdb->extra_info if necessary.
3312 * database.h (mdatabase__dir_list, M_database_hook)
3313 (mdatabase__load_for_keys): Extern them.
3314 (MDatabaseHookFunc): New type.
3316 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3318 2004-12-27 Kenichi Handa <handa@m17n.org>
3320 * Version 1.2.0 released.
3322 2004-12-27 Kenichi Handa <handa@m17n.org>
3324 * input.c (minput_filter): Don't reset ic->xxx_changed.
3326 * mtext.c (mtext_from_data): Fix documentation.
3328 2004-12-25 Kenichi Handa <handa@m17n.org>
3330 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3331 (M17NLIB_VERSION_NAME): Update to "1.2.".
3333 2004-12-24 Kenichi Handa <handa@m17n.org>
3335 * input.c (reset_ic): Set key_unhandled to 0.
3337 2004-12-21 Kenichi Handa <handa@m17n.org>
3339 * m17n-gui.h (mfont_from_spec): Delete extern.
3341 * input-gui.c (win_callback): Handle Minput_reset.
3342 (minput__win_init): Register reset_ic as a callback for
3345 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3346 changed. At first, shift to the initial state.
3347 (minput__init): Initialize Minput_reset. Register reset_ic as a
3348 callback for Minput_reset.
3349 (Minput_reset): New variable.
3350 (minput_filter): Always set ic->xxx_changed to 0.
3351 (minput_reset_ic): New function.
3352 (integer_value): Fix typo ('>' -> '<') and calculation of length
3355 * m17n-core.c (merror_code): Change type to `int'.
3357 * m17n-misc.h (merror_code): Adjust type.
3359 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3361 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3362 (mtext_change_prop): Delete extern.
3364 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3365 to `int'. Move the documents to m17n-core.h.
3367 2004-12-13 Kenichi Handa <handa@m17n.org>
3369 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3370 (MTextProperty): Document it.
3372 2004-12-09 Kenichi Handa <handa@m17n.org>
3374 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3376 2004-12-03 Kenichi Handa <handa@m17n.org>
3378 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3379 m17n__gui_initialized): New externs.
3381 * m17n-core.h (enum M17NStatus): New enum.
3382 (m17n_status): Extern it.
3384 * m17n-core.c (core_initialized): Delete this variable.
3385 (m17n__core_initialized, m17n__shell_initialized,
3386 m17n__gui_initialized): New variables.
3387 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3388 instead of core_initialized.
3389 (m17n_status): New function.
3391 * m17n.c (shell_initialized): Delete this variable.
3392 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3395 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3397 * m17n-gui.c (win_initialized): Delete this variable.
3398 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3399 instead of gui_initialized.
3401 2004-11-19 Kenichi Handa <handa@m17n.org>
3403 * input.c (reset_ic): Check if ic_info->state is NULL.
3404 (filter): If ic_info->state is NULL, return 0.
3405 (load_input_method): Don't unref `maps' it it's not created.
3407 2004-11-15 Kenichi Handa <handa@m17n.org>
3409 * input.c (find_candidates_group): If INDEX is -1, find the last
3411 (take_action_list): If the previous of the first candidate is
3412 requested, select the last candidate.
3414 2004-11-08 Kenichi Handa <handa@m17n.org>
3416 * m17n-X.c (device_open): Try at most 32 fonts to find a
3417 non-autoscaled font.
3419 * font.c (xlfd_parse_name): Fix previous change.
3421 2004-11-05 Kenichi Handa <handa@m17n.org>
3423 * font.c: (commont_style): Include dummy elements "slanted" and
3424 "rslanted" to prefer "o" to "r" if "i" is requested.
3426 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3428 2004-10-29 Kenichi Handa <handa@m17n.org>
3430 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3432 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3433 New members smallest and larger.
3434 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3435 (xfont_registry_list): Likewise.
3436 (xfont_select): Likewise.
3439 2004-10-28 Kenichi Handa <handa@m17n.org>
3441 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3442 font name comparison.
3443 (xfont_select): Fix logic for selecting a larger size font.
3445 2004-10-25 Kenichi Handa <handa@m17n.org>
3447 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3450 2004-10-22 Kenichi Handa <handa@m17n.org>
3452 * input.c (update_candidate): Renamed from udpate_candidate.
3453 (take_action_list): Show more debugging info on arithmetic commands.
3455 * m17n-X.c (device_open): Fix previous change.
3457 * draw.c (compose_glyph_string): Don't get face property at the
3460 2004-10-21 Kenichi Handa <handa@m17n.org>
3462 * draw.c (compose_glyph_string): Fix for the case of category
3465 2004-10-19 Kenichi Handa <handa@m17n.org>
3467 * input.c (mdebug_mask): New variable.
3468 (shift_state): Print debug information.
3469 (take_action_list): Likewise.
3470 (handle_key): Likewise.
3472 2004-10-14 Kenichi Handa <handa@m17n.org>
3474 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3476 2004-10-13 Kenichi Handa <handa@m17n.org>
3478 * m17n-X.c (device_open): Be sure to register at least one font
3481 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3482 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3484 2004-10-12 Kenichi Handa <handa@m17n.org>
3486 * draw.c (alloc_gstring): Fix previous change.
3488 * font-ft.c (ft_list_generic): Fix for the case of not
3491 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3493 * font.c (mfont_list): If no font is found, return NULL.
3494 (load_font_encoding_table): Put entries of nil registry first.
3495 (find_encoding): Adjust for the above change.
3497 2004-10-11 Kenichi Handa <handa@m17n.org>
3499 * m17n-gui.h (mfont_list): Adjust prototype.
3501 * m17n-X.c (xfont_list): New arg maxnum.
3503 * font.h (struct MFontDriver): Change prototype of <list>.
3505 * font-ft.c (fc_generic_family_list): Delete it.
3506 (Mserif, Msans_serif, Mmonospace): Delete them.
3507 (M_generic_family_info): New variable.
3508 (enum GenericFamilyType): New enum.
3509 (struct GenericFamilyInfo): New struct.
3510 (generic_family_table): New variable.
3511 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3513 (add_font_info): Get style here.
3514 (ft_list_family): Don't initialize fc_config here. Don't list
3516 (ft_list_generic): New function.
3517 (ft_select): Pay attention to generic familes here.
3518 (ft_open): Fix calculation of ascent and descent.
3519 (ft_list): Pay attention to generic families.
3520 (mfont__ft_init): Initialize M_generic_family_info,
3521 generic_family_table, and fc_config..
3522 (mfont__ft_fini): Finalize generic_family_table.
3524 * draw.c (compose_glyph_string): Use more constant font for
3525 glyphs. Adjust for the member change in MGlyph.
3526 (layout_glyph_string): Adjust for the member change in MGlyph.
3527 (alloc_gstring): Intilize scracth_glyph to avoid
3528 compose_glyph_string on it.
3529 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3530 (mdraw_coordinates_position): Fix previous change.
3532 * internal-gui.h (glyph_category): New enum.
3533 (MGlyph): Change type of <category> to enum glyph_category.
3535 * face.c (mface__realize): Delete args langauge and charset.
3536 (mface__for_chars): Fix for the case that glyphs have different
3538 (mface__update_frame_face): Adjust for mface__realize change.
3540 * face.h (mface__realize): Adjust prototype.
3542 2004-10-05 Kenichi Handa <handa@m17n.org>
3544 * language.c (mlang__init): Add Akan.
3546 2004-10-04 Kenichi Handa <handa@m17n.org>
3548 * font-ft.c (add_font_info): Add instead of push the element.
3549 (ft_list_family): For generic fonts, try all
3550 substituted. families.
3552 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3553 (run_rule): Don't update cluster range here.
3554 (run_command): Update cluster range on appending a glyph.
3555 (run_otf): Update cluster range for glyphs generated by OTF.
3557 2004-10-02 Kenichi Handa <handa@m17n.org>
3559 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3561 2004-09-30 Kenichi Handa <handa@m17n.org>
3563 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3565 2004-09-30 Kenichi Handa <handa@m17n.org>
3567 * font.h: Include <fontconfig/fontconfig.h>.
3568 (MFTInfo): New member langset.
3569 (mfont__encoding_list): Extern it.
3571 * font.c (mfont__encoding_list): New function.
3572 (mdebug_dump_font_list): New function.
3574 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3575 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3577 (ft_family_list): New variable.
3578 (set_font_info): New arg basep. Callers changed.
3579 (fc_list): Check the return value of FcPatternGetString.
3580 (add_font_info): New arg plist. Callers changed. Update
3582 (ft_list_family): New function (merged fc_list and ft_list_all).
3583 (ft_select): Use ft_list_family.
3584 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3586 (mfont__ft_init): Initialize above new variables.
3587 (mfont__ft_fini): Free ft_family_list.
3588 (STRDUP_LOWER): New macro.
3589 (set_font_info): Use STRDUP_LOWER.
3590 (ft_list_family): Avoid duplicate addition of font path. Use
3592 (fc_decode_prop): Fix typo.
3594 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3595 (xfont_registry_list): Change argument disp_info to frame.
3597 (xfont_list_all): New function.
3598 (xfont_list): If FONT is not NULL, check all fonts.
3600 2004-09-28 Kenichi Handa <handa@m17n.org>
3602 * m17n-X.c (MXFont, MXFontList): New types.
3603 (MDisplayInfo): Delete members font_registry_list,
3604 iso8859_1_family_list, iso10646_1_family_list, new members
3605 font_list, base_font_list.
3606 (free_display_info): Adusted for the change of MDisplayInfo.
3607 (xfont_driver): Initialize with xfont_list.
3608 (font_compare): New function.
3609 (build_font_list): Deleted.
3610 (xfont_registry_list): New function.
3611 (xfont_select): Use xfont_registry_list.
3612 (xfont_list): New function.
3613 (device_open): Adusted for the change of MDisplayInfo.
3615 * font-ft.c (add_font_info): New arg languages. Callers changed.
3616 (fc_list): Get languages from fonts..
3617 (ft_list_all): Renamed from ft_list. Callers changed.
3618 (ft_list): New function.
3619 (mfont__ft_driver): Initalize with ft_list.
3621 * font.c (mfont_list): New function.
3623 * font.h (struct MFontDriver): New member `list'.
3624 (MFTInfo): New member languages.
3626 * m17n-gui.h (mfont_list): Extern it.
3628 2004-09-27 Kenichi Handa <handa@m17n.org>
3630 * internal-gui.h (struct MGlyphString): Delete members mt,
3631 sub_width, sub_lbrearing, sub_rbearing, and region.
3633 * draw.c (MSubTextExtents): New type.
3634 (layout_glyphs): New arg extents. Set its members.
3635 (layout_glyph_string): Adjusted for the above change.
3636 (alloc_gstring): Don't set gstring->mt.
3637 (truncate_gstring): Call line_break function with mt instead of
3640 2004-09-22 Kenichi Handa <handa@m17n.org>
3642 * mtext.c (count_utf_16_chars): Count each code of invalid
3645 2004-09-19 Kenichi Handa <handa@m17n.org>
3647 * mtext.c (default_utf_16, default_utf_32): Rename them to
3648 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3651 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3654 2004-09-13 Kenichi Handa <handa@m17n.org>
3656 * draw.c (Mlatin): Don't declare it here.
3657 (visual_order): Fix reordering of combining characters.
3658 (compose_glyph_string): Fix detection of script.
3659 (layout_glyphs): Don't fix reordering of combining characters
3661 (layout_glyph_string): Pay attention to
3662 control->disable_overlapping_adjustment.
3663 (truncate_gstring): Include at least on character in a line.
3664 (get_gstring): Always scan one full line.
3665 (mdraw__init): Don't initialize Mlatin here.
3666 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3667 have a font, use ascent/descent of an ASCII font. Allow
3668 ink_array_return and logical_array_return to be NULL.
3669 (mdraw_coordinates_position): Fix iteration.
3671 * font-ft.c (MFTtoProp): Member completely changed.
3672 (ft_to_prop): Adjusted for the above change.
3673 (ft_to_prop_size): Likewise.
3674 (set_font_info): Adjusted for the change of MFTtoProp.
3675 (fc_generic_family_list): New variable.
3676 (fc_list): Add special handling of generic font names.
3677 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3678 Initialize fc_generic_family_list.
3679 (mfont__ft_fini): Don't free ft_to_prop. Free
3680 fc_generic_family_list.
3681 (FC_vs_M17N_font_prop): New type.
3682 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3683 (fc_decode_prop, fc_encode_prop): New functions.
3684 (mfont__ft_parse_name): Use fc_decode_prop.
3685 (mfont__ft_unparse_name): Use fc_encode_prop.
3687 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3688 (MWDevice): Add member realized_font_list.
3689 (free_display_info): Don't free disp_info->realized_font_list.
3690 (free_device): Free device->realized_fontset_list.
3691 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3692 (device_open): Don't initialize disp_info->realized_font_list.
3693 (device_open): Initialize device->realized_font_list and set it to
3694 frame->realized_font_list.
3696 * fontset.c (try_font_group): New function.
3697 (mfont__lookup_fontset): Use try_font_group.
3699 * font.c (common_weight): Change the order of "regular".
3701 * face.c (Mlatin): Don't make it static.
3702 (mface__realize): Be sure to set work_gstring.frame.
3703 (mface__for_chars): Likewise.
3705 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3708 * internal-gui.h (Mlatin): Extern it.
3710 * m17n-gui.h (MDrawControl): New member
3711 disable_overlapping_adjustment.
3713 2004-09-06 Kenichi Handa <handa@m17n.org>
3715 * font-flt.c (run_otf): Fix typo ('}'->']').
3717 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3718 (COMBINING_PRECOMPUTED_P): New macros.
3720 * draw.c (layout_glyphs): Handle precomputed combining code.
3722 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3723 precomupted combining code.
3725 2004-09-03 Kenichi Handa <handa@m17n.org>
3727 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3730 2004-08-27 Kenichi Handa <handa@m17n.org>
3732 * face.c (mface_put_prop): If the new value is the same as the
3733 current one, don't increment frame->tick.
3735 2004-08-25 Kenichi Handa <handa@m17n.org>
3737 * fontset.c (mfontset): Initialize font_spec_list member.
3738 (mfontset_copy): Load fontset if necessary.
3740 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3741 'metrics' to for C++.
3743 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3746 2004-08-16 Kenichi Handa <handa@m17n.org>
3748 * Version 1.1.0 released.
3750 2004-08-13 Kenichi Handa <handa@m17n.org>
3752 * language.c (mlang__init): Add Dhivehi.
3754 * m17n-gui.c (Mx, Mfreetype): Delete it.
3755 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3757 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3758 (mfont_resize_ratio): Extern it.
3759 (MDrawGlyphInfo): New member logical_width;
3760 (MDrawGlyph): New type.
3761 (mdraw_glyph_list): Prototype adjusted.
3763 * m17n-X.c (xfont_open): Set type and fontp members.
3764 (xft_open): Likewise.
3766 * internal-gui.h (Mx, Mfreetype): Delete extern.
3768 * font.h (struct MRealizedFont): New member type and fontp.
3770 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3771 (Mx, Mfreetype): Declare here.
3772 (Mxft): New variable.
3773 (mfont_resize_ratio): New function.
3775 * font-ft.c (ft_open): Set type and fontp members.
3777 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3780 2004-08-11 Kenichi Handa <handa@m17n.org>
3782 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3785 2004-08-06 Kenichi Handa <handa@m17n.org>
3787 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3790 * font-flt.c (run_otf): Print debugging information if necessary.
3792 2004-08-05 Kenichi Handa <handa@m17n.org>
3794 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3795 positioning_type 5 and 6. Switch simplified.
3797 2004-08-04 Kenichi Handa <handa@m17n.org>
3799 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3801 2004-08-02 Kenichi Handa <handa@m17n.org>
3803 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3804 set val to 1 even if it is greater than 1.
3806 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3808 2004-07-29 Kenichi Handa <handa@m17n.org>
3810 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3811 debugging information.
3813 * internal.h (MDEBUG_PRINT5): New macro.
3815 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3816 the previous one if the zero width glyph has left or right
3819 2004-07-26 Kenichi Handa <handa@m17n.org>
3821 * m17n-X.c (xft_render): Pay attention to members left_padding and
3822 right_padding of MGlyph.
3824 * draw.c (visual_order): Allocate one more elements for arrays as
3825 a workaround of fribidi bug.
3826 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3827 instead of MGlyph->bidi_sensitive.
3828 (layout_glyph_string): Pay attentinon to
3829 control->orientation_reversed when padding at the head or tail.
3830 Fix adjustment of space glyph width.
3831 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3834 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3835 instead of MGlyph->bidi_sensitive.
3837 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3839 2004-07-26 Kenichi Handa <handa@m17n.org>
3841 * draw.c (visual_order): Don't treat combined glyphs specially.
3842 (layout_glyphs): Don't get metrics glyphs that are already ready.
3843 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3844 width with the previous one.
3845 (draw_background): Fix bar cursor position on a r2l glyph.
3847 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3848 (run_rule): Fix place of updating cluster_begin_pos and
3849 cluster_end_pos here.
3850 (run_otf): Don't set left_padding.
3852 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3854 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3855 Fix handling of GPOS.
3856 (mfont__ft_drive_gpos): Delete this function.
3858 * font.h (mfont__ft_drive_otf): Renamed back from
3859 mfont__ft_drive_gsub.
3860 (mfont__ft_drive_gpos): Delete extern.
3862 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3863 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3865 2004-07-23 Kenichi Handa <handa@m17n.org>
3867 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3868 the same bidi level.
3870 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3872 2004-07-22 Kenichi Handa <handa@m17n.org>
3874 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3876 2004-07-20 Kenichi Handa <handa@m17n.org>
3878 * draw.c (render_glyphs): Fix checking of g->code validity.
3880 * face.c (mface__realize): Set g.type.
3882 2004-07-18 Kenichi Handa <handa@m17n.org>
3884 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3887 * m17n-gui.c (mframe): Print error message give by dlopen to
3890 2004-07-16 Kenichi Handa <handa@m17n.org>
3892 * draw.c (compose_glyph_string): Improve the way of deciding a
3893 script. For a character that doesn't have script property, use
3894 the last non-latin script.
3896 * font-ft.c (fc_list): Cancel previous change.
3897 (mfont__ft_init): Add more entries in ft_to_prop_name.
3899 2004-07-15 Kenichi Handa <handa@m17n.org>
3901 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3902 previous or next character glyphs.
3904 2004-07-14 Kenichi Handa <handa@m17n.org>
3906 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3907 of type GLYPH_SPACE.
3909 * fontset.c (mfont__lookup_fontset): If glyph type is
3910 GLYPH_SPACE, get codes for SPACE.
3912 * internal-gui.h (Mfont): Delete extern.
3914 * m17n-gui.h (Mfont): Delete duplicated extern.
3916 2004-07-13 Kenichi Handa <handa@m17n.org>
3918 * font-ft.c (DEVICE_DELTA): New macro.
3919 (adjust_anchor): New function.
3920 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3922 (mfont__ft_drive_gpos): New function.
3924 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3925 (FontLayoutContext): Delete member `rfont'.
3926 (run_otf): Set g->otf_cmd. Call
3927 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3928 only whne HAVE_OTF is defined.
3930 * fontset.c: Include "config.h".
3932 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3933 (MGlyph): New member otf_cmd.
3935 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3936 (mfont__ft_drive_gpos): Extern it.
3938 * face.c: Include "config.h".
3940 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3942 * input-gui.c: Include "config.h".
3944 * plist.c: Include "config.h".
3946 2004-07-06 Kenichi Handa <handa@m17n.org>
3948 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3949 internal-gui.h: Cancel previous changes.
3951 * m17n-gd.h: Delete it.
3953 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3954 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3955 @XML2_LD_FLAGS@ to above.
3956 (libm17n_la_LIBADD): Add -ldl.
3957 (libm17n_la_LDFLAGS): Add -export-dynamic.
3958 (X_LD_FLAGS): Fix the order of linking.
3959 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3960 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3961 (libm17n_X_la_LDFLAGS): Add -module.
3962 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3963 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3964 (libm17n_gd_la_LDFLAGS): Add -module.
3965 (include_HEADERS): Delete m17n-gd.h.
3967 2004-06-30 Kenichi Handa <handa@m17n.org>
3969 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3970 (MDeviceLibraryInterface): Delete it.
3971 (register_device_library): Delete it.
3972 (m17n__device_library_list): Renamed from device_library_list.
3974 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3975 (m17n_init_win): Adjust prototype.
3977 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3978 (m17n_init_gd): New function.
3980 * m17n-gd.h: New file.
3982 * m17n-X.h: Include <m17n-gui.h>.
3983 (m17n_init_X): Extern it.
3984 (M17N_INIT): Redefine it.
3986 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3987 (m17n_init_X): New function.
3989 * internal-gui.h (m17n__device_library_list): Extern it.
3990 (struct MDeviceDriver): New members initialized, init, and fini.
3992 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3994 (libm17n_X_la_LIBADD): Delete aboves.
3995 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3996 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3997 (libm17n_gd_la_LDFLAGS): Delete it.
3998 (include_HEADERS): Add m17n-gd.h.
4000 2004-06-25 Kenichi Handa <handa@m17n.org>
4002 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
4003 (libm17n_gd_la_LDFLAGS): Cancel previous change.
4005 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
4007 * font-ft.c (fc_list): If FcFontList finds no font, try
4010 * draw.c (compose_glyph_string): Terminate the last loop after
4011 doing default combining if necessary.
4013 2004-06-24 Kenichi Handa <handa@m17n.org>
4015 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
4017 * character.c (mchar_define_property): Add const to an arg.
4019 * charset.c (mchar_define_charset): Add const to an arg.
4021 * coding.c (MCodingSystem): Add const to an arg or decoder.
4022 (finish_decoding): Add const to an arg.
4023 (decode_coding_charset, decode_coding_utf_8)
4024 (decode_coding_utf_16, decode_coding_utf_32)
4025 (decode_coding_iso_2022, decode_coding_sjis)
4026 (mconv_define_coding): Likewise.
4028 * m17n-X.c (xft_find_metric): Delete unused variable.
4030 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
4033 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
4036 * mtext.c (count_utf_8_chars, count_utf_16_chars)
4037 (mtext__from_data, mtext_from_data): Add `const' to an arg.
4039 * mtext.h (mtext__from_data): Ajust prototype.
4041 2004-06-23 Kenichi Handa <handa@m17n.org>
4043 * draw.c (compose_glyph_string): Always get glyph codes by
4045 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
4046 (mdraw_glyph_list): New function.
4048 * font-flt.c (mfont__flt_run): Be sure to call
4049 rfont->driver->encode_char.
4051 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
4052 (ft_encode_char): Delete arg C.
4053 (ft_render): Don't call FT_Get_Char_Index.
4055 * font.c (mfont__encodable_p): Delete it.
4056 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
4058 * font.h (struct MFontDriver): Delete arg C of encode_char.
4059 (mfont__encodable_p): Delete extern.
4061 * m17n-X.c (xfont_encode_char): Delete arg C.
4062 (xft_find_metric): Don't cal FT_Get_Char_Index.
4063 (xft_render): Likewise.
4065 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
4067 (mdraw_glyph_list): Extern it.
4069 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
4071 2004-06-22 Kenichi Handa <handa@m17n.org>
4073 * m17n-gui.h (mfontset_lookup): Extern it.
4075 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
4077 * fontset.c (realize_fontset_elements)
4078 (free_realized_fontset_elements, update_fontset_elements): New
4080 (mfont__realize_fontset): Call realize_fontset_elements.
4081 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
4082 (mfont__lookup_fontset): If a fontset was modified, update
4083 the realized fontset.
4084 (mfontset_modify_entry): Increment fontset->tick.
4085 (mfontset_lookup): New function.
4087 2004-06-21 Kenichi Handa <handa@m17n.org>
4089 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
4091 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
4092 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
4093 length of source text 0.
4095 2004-06-21 Kenichi Handa <handa@m17n.org>
4097 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
4098 (compare): Pay attention to format other than utf-8.
4099 (copy): Delete this function.
4100 (count_by_utf_8, count_by_utf_16, insert): New functions.
4101 (count_utf_16_chars): Fix handling of a surrogate pair.
4102 (find_char_forward, find_char_backward): Likewise.
4103 (mtext__from_data): Delete unnecessary check. Fix number of
4105 (mtext_from_data): Don't count items.
4106 (mtext_ref_char): Optimize the code.
4107 (mtext_set_char): Pay attention to format other than utf-8.
4108 (mtext_cat_char): Likewise.
4109 (mtext_dup): Don't call copy, instead do allocation here.
4110 (mtext_cat): Call insert instead of copy.
4111 (mtext_ncat): Likewise.
4112 (mtext_cpy): Delete character at first and call insert instead of
4114 (mtext_ncpy): Likewise.
4115 (mtext_copy): Likewise.
4116 (mtext_duplicate): Call insert instead of copy.
4117 (mtext_del): Pay attention to format other than utf-8.
4118 (mtext_ins): Simply call insert.
4119 (mtext_ins_char): Pay attention to format other than utf-8.
4120 (mtext_tok): Call insert instead of copy.
4121 (mtext_text): Call UNIT_BYTES.
4123 * textprop.c (mtext__adjust_plist_for_change): New function.
4125 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
4126 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
4127 (CHAR_UNITS_AT): Fix typo.
4128 (CHAR_UNITS_BY_HEAD): Fix typo.
4129 (STRING_CHAR_AND_UNITS): Fix typo.
4131 * internal.h (MTEXT_READ_ONLY_P): New macro.
4133 * mtext.h (mtext__replace): Delete the extern.
4134 (mtext__adjust_foramt): Adjust prototype.
4136 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
4137 if possible. Otherwise make a copy of mmt.
4139 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
4142 2004-06-18 Kenichi Handa <handa@m17n.org>
4144 * character.h (CHAR_STRING_UTF16): Fix syntax.
4146 2004-06-16 Kenichi Handa <handa@m17n.org>
4148 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
4149 (libm17n_X_la_LIBADD): Delete it.
4150 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
4152 * m17n-X.c (device_open): Add parens in `if' condition.
4154 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
4155 (DEC_POSITION): Likewise.
4156 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
4158 2004-06-15 Kenichi Handa <handa@m17n.org>
4160 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
4163 * draw.c (compose_glyph_string): If langauge is specified, call
4164 mface__for_chars even if a text is all latin. Fix condition for
4165 setting non_ascii_found.
4167 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
4169 * m17n.h (minput_char_to_key): Delete extern.
4171 * m17n-gui.h (minput_event_to_key): Cancel previous change.
4173 * m17n-gui.c (null_device_open): Set several members of frame.
4175 2004-06-14 Kenichi Handa <handa@m17n.org>
4177 * m17n-gui.h (minput_event_to_key): Delete extern.
4179 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
4181 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
4183 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
4185 2004-06-08 Kenichi Handa <handa@m17n.org>
4187 * character.c (mchar_put_prop): Don't increment the ref-count of
4190 2004-06-04 Kenichi Handa <handa@m17n.org>
4192 * m17n-core.c (mdebug__register_object): New function.
4193 (mdebug__unregister_object): Likewise.
4195 * internal.h (mdebug__register_object, mdebug__unregister_object):
4197 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
4200 * charset.c (mcharset__load_from_database): Don't call
4201 mconv__register_charset_coding here.
4203 * coding.c (find_coding): Get a real name from an element of
4204 coding_definition_list.
4205 (mconv__register_charset_coding): Set the real name at the top of
4207 (mcoding__load_from_database): Likewise.
4208 (mconv_list_codings): Adjusted for the above change.
4210 2004-06-03 Kenichi Handa <handa@m17n.org>
4212 * coding.c (find_coding): Find by canonicalized name. Don't have
4213 to modify the element of coding_definition_list by
4215 (mconv__define_coding_from_charset): Delete it.
4216 (mconv__register_charset_coding): Canonicalize sym.
4217 (mcoding__load_from_database): Register plist modified by
4220 * coding.h (mconv__define_coding_from_charset): Don't extern it.
4222 * font-ft.c (ft_open): Fix setting of rfont->descent.
4224 2004-06-02 Kenichi Handa <handa@m17n.org>
4226 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
4227 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
4228 (xlfd_unparse_name): Renamed from xfont_build_name.
4229 (mfont__init): Initialized Mfontconfig.
4230 (mfont__free_realized): Unconditionally unref rfont->info.
4231 (mfont__select): Free `this' if it's not best.
4232 (mfont__open): Don't check frame->realized_font_list.
4233 (mfont__parse_name_into_font): New function.
4234 (Mfontconfig): New variable.
4235 (mfont_from_name): Call mfont_parse_name.
4236 (mfont_name): Call mfont_unparse_name.
4237 (mdebug_dump_font): Likewise.
4239 * font.h (struct MFontDriver): Delete members parse_name and
4241 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
4242 (mfont__parse_name_into_font): Extern it.
4244 * font-ft.c: Include "symbol.h".
4245 (close_ft): Unconditionally free filename and charmap_list of
4247 (ft_open): Duplicate base->filename. Increment ref-count of
4248 ft_info->charmap_list. Free ft_info->charmap_list and
4249 ft_info->filename on error.
4250 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
4252 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
4254 (enum xlfd_field_idx): Moved to font.c.
4255 (split_font_name, build_font_name): Likewise.
4256 (build_font_list): Call mfont__parse_name_info_font.
4257 (xfont_open): Call mfont__unparse_name. Free name.
4258 (xfont_parse_name, xfont_build_name): Moved to font.c
4259 (xft_select): Prototype deleted.
4260 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
4261 Call mfont_pase_name.
4263 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4264 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4267 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4270 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4272 2004-06-01 Kenichi Handa <handa@m17n.org>
4274 * fontset.c (mfontset_modify_entry): Pay attention to the case
4275 that fontset->font_spec_list is NULL.
4277 2004-05-31 Kenichi Handa <handa@m17n.org>
4279 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4281 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4283 * font.c (mfont__select): Print score the a font for debugging.
4285 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4287 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4288 kanji_sym and kana_sym.
4290 2004-05-28 Kenichi Handa <handa@m17n.org>
4292 * Makefile.am (VINFO): New variable.
4293 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4294 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4296 2004-05-27 Kenichi Handa <handa@m17n.org>
4298 The following chanages are to make device dependent functions
4299 accessible only from MDeviceDriver structure, and to add GD and
4300 null device drivers. Font drivers get also device dependent.
4302 * m17n.c (m17n_init): Increament shell_initialized.
4303 (m17n_fini): Decremented shell_initialized.
4305 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4307 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4308 (Mwidget, Mcolormap, Mx): Extern them.
4310 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4311 (free_frame): Call frame->driver->close instead of
4313 (DLOPEN_SHLIB_EXT): New macro.
4314 (MDeviceLibraryInterface): New type.
4315 (device_library_list): New variable.
4316 (register_device_library): New function.
4317 (null_device): New variable.
4318 (null_device_close, null_device_get_prop)
4319 (null_device_realize_face, null_device_free_realized_face): New
4321 (null_driver): New variable.
4322 (null_device_init, null_device_fini, null_device_open): New
4324 (null_interface): New variable.
4325 (Mfreetype, Mdevice): Declare them.
4326 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4327 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4328 Mwin__Close_Device. Register drivers for Mx and Mgd.
4329 (m17n_fini_win): Decremented win_initialized. Call "fini"
4330 function of all opened devices. Don't call mwin__fini.
4331 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4333 (mframe): Handle Mdevice key of PLIST.
4334 (mframe_get_prop): Call frame->device->get_prop instead of
4335 mwin__device_get_prop.
4337 * m17n-gd.c: New file.
4339 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4340 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4342 * m17n-core.c (m17n_init_core): Increate core_initialized.
4343 (m17n_fini_core): Decremented core_initialized.
4345 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4346 (Mcolormap): Don't extern them here.
4348 * m17n-X.c (FRAME_DEVICE): New macro.
4349 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4350 (free_display_info): Use MPLIST_DO.
4351 (free_device): Free rface->info.
4352 (xft_close): Delete it.
4353 (device_init): Renamed from mwin__init.
4354 (device_fini): Renamed from mwin__fini.
4355 (device_open): Renamed from mwin__open_device.
4356 (x_driver): New variable.
4357 (MXFontInfo): Delete member frame, add member display.
4358 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4359 Don't declare them here.
4361 * internal-gui.h (MDeviceType): New enum.
4362 (MWDefice): Delete it.
4363 (struct MFrame): Change type of device to void *. New members
4364 device_type, driver, font_driver_list.
4365 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4366 (MDeviceDriver): New type.
4367 (Mx, Mgd, Mfreetype): Extern them.
4368 (mwin__XXX): Delete all of them.
4370 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4372 (win_destroy_ic): Likewise.
4373 (adjust_window_and_draw): Likewise.
4374 (win_callback): Likewise.
4375 (Mxim): Declare it here.
4376 (minput_event_to_key): Call M_CHECK_READABLE.
4378 * fontset.c (mfont__lookup_fontset): Delete local variable
4381 * font.h (struct MFontDriver): Delete member close, add members
4382 parse_name and build_name.
4383 (mfont__driver_list): Delete extern.
4384 (mfont__close): Delete extern.
4386 * font.c (mfont__init): Don't set mfont__driver_list.
4387 (mfont__fini): Don't unref mfont__driver_list.
4388 (mfont__select): Try font drivers in frame->font_driver_list. Set
4389 driver member of a realized font.
4390 (mfont__close): Delete it.
4391 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4392 functions of the default frame.
4394 * font-ft.c (close_ft): Check ft_info->ft_face and work
4396 (add_font_info): Allocate ft_info by M17N_OBJECT.
4397 (ft_close): Delete it.
4398 (mfont__ft_driver): Don't set ft_close.
4399 (ft_select): Increment ref-count of best_font.
4400 (ft_open): Decremented ref-count of base. On error, call
4401 FT_Done_Face and free ft_info.
4402 (ft_find_metric): Always use XXX_MONO in load_flags.
4403 (ft_render): Fix setting of width. Call
4404 frame->driver->draw_points instead of mwin__draw_points.
4405 (ft_to_prop): Don't set mfont__driver_list.
4406 (mfont__ft_fini): Just unref ft_info.
4408 * face.c (mface__init): Exchange foreground and background of
4409 mface__default. Call mface_put_prop to set hline of
4411 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4412 (mface__free_realized): Don't call mwin__free_realized_face.
4414 * draw.c (Mdepth): Don't declare it here.
4415 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4416 (render_glyphs, render_glyph_string): Likewise.
4417 (mdraw__init): Don't set Mdepth.
4418 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4420 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4422 (mdraw_text_items): Check FRAME is writable.
4423 (mdraw_per_char_extents): Implement body.
4425 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4427 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4428 (GUI_SOURCES): Delete it.
4429 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4430 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4431 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4432 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4433 (linkgui_LDADD): Set to libm17n-gui.la
4434 (linkgui_LDFLAGS): New target.
4435 (SRC): Include ${libm17n_gui_la_SOURCES} and
4436 ${libm17n_gd_la_SOURCES}.
4438 2004-05-24 Kenichi Handa <handa@m17n.org>
4440 * draw.c (draw_background): Don't draw background even if
4441 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4443 2004-05-22 Kenichi Handa <handa@m17n.org>
4445 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4447 2004-05-20 Kenichi Handa <handa@m17n.org>
4449 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4451 * m17n-gui.c: Include "plist.h".
4452 (mframe): If PLIST is NULL, initialize it to emply plist.
4454 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4455 (xft_driver): New variable.
4456 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4457 (xft_find_metric, xft_render): New function.
4458 (mwin__init): Adjusted for the new mfont__driver_list.
4459 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4460 generated face to PARAM.
4461 (mwin__realize_face): Fix setting of box colors. Don't call hook
4463 (mwin__draw_hline): New function.
4464 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4465 (mwin__xft_render): Delete these function.
4467 * internal-gui.h (struct MFrame): New member tick.
4468 (struct MGlyphString): New member tick.
4469 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4470 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4471 (mwin__xft_render): Delete extern.
4473 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4474 (mfontset): Always increment the reference count of returned
4477 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4478 (MFTInfo): Moved to font.h.
4479 (ft_iso8859_1_font_list): Delete this variable.
4480 (set_font_info): Don't set font->property[MFONT_TYPE].
4481 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4482 (add_font_info): Change type to void.
4483 (fc_list): Change anme from xft_list. Caller changed. Include
4484 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4485 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4486 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4487 (close_ft): Don't call mwin__xft_close. Unref
4488 ft_info->extra_info.
4489 (ft_open): Don't setup ft_info->fontname. Don't call
4491 (ft_find_metric): Don't call mwin__xft_get_metric.
4492 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4493 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4494 (mfont__ft_init): Adjusted for new mfont__driver_list.
4495 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4497 * font.c (mfont__driver_list): Make it MPlist.
4498 (mfont__init): Adjust initialization of mfont__driver_list.
4499 (mfont__fini): Free mfont__driver_list.
4500 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4501 (mfont__select): Adjusted for the new mfont__driver_list.
4503 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4504 (mfont__drirver_list): Adjust prototype.
4505 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4507 * face.h (struct MFace): Delete member realized_face_list, add
4509 (struct MRealizedFace): Delete member need_update
4510 andnofont_rface, add member non_ascii_list.
4511 (mface__update_frame_face): Extern it.
4513 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4515 (get_hline_create, get_box_create): New functions.
4516 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4518 (free_face): Cancep previous change. Free face->frame_list.
4519 (serialize_hline): Do nothing if hline->width is zero.
4520 (serialize_box): Do nothing if box->width is zero.
4521 (mface__init): Setup all properties of mface__default.
4522 (mface__fini): Free hline_prop_list and box_prop_list.
4523 (mface__realize): Cancel previous change. Update
4524 face->frame_list. Setup rface->non_ascii_list.
4525 (mface__for_chars): Update rface->non_ascii_list.
4526 (mface__free_realized): Free rface->non_ascii_list.
4527 (mface__update_frame_face): New function.
4528 (mface): Initialize face->frame_list.
4529 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4531 (mface_merge): Likewise.
4532 (mface_put_prop): If key is Mhline or Mbox, get value by
4533 get_hline_create or get_box_create respectively.
4534 (mface_put_prop): Update frame->tick and call
4535 mface__update_frame_face if necessary.
4536 (mface_update): Do nothing if func is noop_hook.
4538 * draw.c (render_glyphs): If a font is not found, use
4539 mwin__draw_empty_boxes.
4540 (alloc_gstring): Initialize gstring->tick.
4541 (get_gstring): Check gstring->tick.
4543 2004-05-17 Kenichi Handa <handa@m17n.org>
4545 * face.c (find_realized_face): Return value changed. If RFONT is
4546 NULL, avoid unnecessary checking.
4547 (free_face): Free face->realized_face_list.
4548 (mface__realize): Adjusted for the change of find_realized_face.
4549 If it returns a realized face that needs update, free it and
4550 realize a new one. Push a new realized face to
4551 frame->realized_face_list instead of appending.
4552 (mface__for_chars): Adjusted for the change of find_realized_face.
4553 Short cut if the required font is in rface->ascii_rface.
4554 (mface_put_prop): Free old value if necessary. Set need_update
4555 member of realized faces to 1.
4557 * face.h (struct MFace): Delete member tick, add member
4559 (struct MRealizedFace): Delete member tick, add member
4562 2004-05-13 Kenichi Handa <handa@m17n.org>
4564 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4566 2004-05-12 Kenichi Handa <handa@m17n.org>
4568 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4570 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4571 parse it XftNameParse.
4573 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4574 (all_fonts_scaned): New variable.
4575 (set_font_info): FAMILY may be Mnil.
4576 (add_font_info): Argument changed.
4577 (xft_list): Call add_font_info in it.
4578 (ft_list): Likewise.
4579 (ft_select): Make it work in the case family is Mnil.
4580 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4581 (mfont__ft_fini): Set all_fonts_scaned to 0.
4583 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4584 that is failed to open.
4586 2004-05-10 Kenichi Handa <handa@m17n.org>
4588 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4589 device's depth is 1 (i.e. monochrome).
4591 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4592 to work around the problem of libtool.
4594 * font-ft.c: Include <freetype/ftbdf.h>.
4595 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4597 (mfont__ft_init): Initialize them.
4598 (ft_iso8859_1_font_list): New variable.
4599 (set_font_info): Detect a font containing iso8859-1 glyphs and
4600 register it in ft_iso8859_1_font_list. If the font is not
4601 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4602 properties of the font from its properties.
4603 (add_font_list): If the font is not scalable, check if it is BDF
4604 or PCF font. If not, ignore it.
4605 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4606 registry is not iso8859-1.
4607 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4608 ft_iso8859_1_font_list.
4609 (ft_find_metric): If the font is not scalable, assume it as BDF
4610 or PCF, and get a metric from its properties.
4611 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4613 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4615 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4616 (libm17n_la_LDFLAGS): Delete it.
4617 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4618 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4620 2004-05-06 Kenichi Handa <handa@m17n.org>
4622 * draw.c (compose_glyph_string): Fix previous change.
4624 2004-04-30 Kenichi Handa <handa@m17n.org>
4626 * font-ft.c (ft_list): Delete unused variable `result'.
4627 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4629 2004-04-27 Kenichi Handa <handa@m17n.org>
4631 * m17n-X.c: Include config.h
4632 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4633 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4634 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4635 (FRAME_CMAP, FRAME_VISUAL): New macros.
4636 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4637 (xfont_driver): Make it static.
4638 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4639 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4640 info->xft_color_back.
4641 (MXftFontInfo) [HAVE_XFT2]: New type.
4642 (mwin__xft_close) [HAVE_XFT2]: New function.
4643 (mwin__xft_open) [HAVE_XFT2]: New function.
4644 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4645 (mwin__xft_render) [HAVE_XFT2]: New function.
4647 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4648 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4649 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4652 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4654 * font-ft.c: Don't include FT_FREETYPE_H here.
4655 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4656 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4657 (MFTInfo): New member charmap_index.
4658 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4659 (check_otf_filename): Renamed from check_filename. Return value
4661 (ft_set_property): This function deleted.
4662 (set_font_info): New function.
4663 (add_font_list): Argument changed. Add multiple fonts.
4664 (xft_list) [HAVE_XFT2]: New function.
4665 (ft_list) [not HAVE_XFT2]: New function.
4666 (ft_select): Add code for Xft.
4667 (close_ft): Likewise.
4668 (ft_open): Likewise.
4669 (ft_find_metric): Likewise.
4670 (ft_encode_char): Likewise.
4671 (ft_render): Likewise.
4673 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4675 2004-04-26 Kenichi Handa <handa@m17n.org>
4677 * textprop.c (mtext_attach_property): Declare the return type as
4680 2004-04-21 Kenichi Handa <handa@m17n.org>
4682 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4684 2004-04-09 Kenichi Handa <handa@m17n.org>
4686 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4688 (load_command): Setup above members.
4690 2004-04-05 Kenichi Handa <handa@m17n.org>
4692 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4694 2004-03-30 Kenichi Handa <handa@m17n.org>
4696 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4699 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4700 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4702 2004-03-29 Kenichi Handa <handa@m17n.org>
4704 * Version 1.0 Patch Level 2 released.
4706 2004-03-29 Kenichi Handa <handa@m17n.org>
4708 * charset.c (make_charset): Set charset->fully_loaded and
4709 charset->simple correctly. Don't try to get charset->min_char and
4710 charset->max_char for a charset of method subset and superset.
4711 Don't load a mapping file here.
4712 (mcharset__init): Set unified_max.
4713 (mcharset__load_from_database): Free a working plist.
4715 * coding.c (mcoding__fini): Free all malloced data.
4717 * input-gui.c (win_create_ic): Set control.as_image for preediting
4720 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4721 `count') to initialize the array.
4723 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4726 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4728 (mwin__create_window): Fix bug of setting a background pixel of a
4730 (mwin__adjust_window): Clear the window before drawing.
4732 * m17n-core.c (mdebug__report_object): Free array->objectes if
4734 (m17n_init_core): Don't set report_header_printed to 0 here.
4735 Fix debugging information.
4736 (m17n_fini_core): Set report_header_printed to 0 here.
4738 * m17n-core.h (mplist_deserialize): Extern it.
4740 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4742 * m17n.c (m17n_fini): Fix debugging information.
4744 * mtext.c (mtext__adjust_foramt): New function.
4746 * mtext.h (mtext__adjust_foramt): Extern it.
4748 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4750 * plist.h (mplist__deserialize): Don't extern it.
4752 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4753 elements of symbol_table to NULL. Report about created and freed
4754 symbols if MDEBUG_FINI is set.
4756 2004-03-22 Kenichi Handa <handa@m17n.org>
4758 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4760 * m17n.c (m17n_init): Fix the way of checking merror_code.
4762 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4764 2004-03-22 Kenichi Handa <handa@m17n.org>
4766 * fontset.c (realize_font_group): Adjust the font size by
4767 mfont__resize before selecting a font.
4769 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4771 2004-03-19 Kenichi Handa <handa@m17n.org>
4773 * Version 1.0 Patch Level 1 released.
4775 2004-03-19 Kenichi Handa <handa@m17n.org>
4777 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4779 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4781 2004-03-19 Kenichi Handa <handa@m17n.org>
4783 Re-apply the changes forgotten in the released version.
4785 * charset.c (mcharset__load_from_database): Call
4786 mchar_define_charset.
4788 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4789 (mconv_encode_range): Put Mcoding text property.
4791 2004-03-18 Kenichi Handa <handa@m17n.org>
4793 * draw.c (Mdepth): New variable.
4794 (visual_order): Delete unused local var `pos'.
4795 (compose_glyph_string): Fix for the case that gstring->glyphs is
4796 realloced. Stop generating glyphs at TO. Fix handling of
4798 (layout_glyphs): Get metrics of all glyphs in advance. Set
4799 lbearing and rbearing of base of composition glyph correctly.
4800 Handle left-overhang glyphs correctly.
4801 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4803 (dump_combining_code): Change the defualt off_x character to ".".
4804 (mdraw__init): Initialize Mdepth.
4806 * face.c (work_gstring): New variable
4807 (mface__init): Initialize work_gstring.
4808 (mface__fini): Free work_gstring.glyphs.
4809 (mface__realize): Don't handle videomode property here. Adjusted
4810 for the change of mfont__get_metric.
4811 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4813 * face.h (enum face_gc): Moved to m17n-X.c.
4815 * font.h (struct MFontDriver): Arguments of find_metric changed.
4816 (mfont__select): Prototype adjusted.
4817 (mfont__get_metric): Likewise.
4818 (mfont__ft_drive_otf): Likewise.
4819 (mfont__flt_run): Likewise.
4821 * font.c (mfont__select): New argument layouter. If layouter is
4822 different in the registered font, make a new copy of realized
4824 (mfont__get_metric): Argument changed. Get metrics of multiple
4826 (mfont_find): Call mfont__select with layouter as Mnil.
4828 * font-flt.c (FontLayoutContext): New member rfont.
4829 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4830 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4832 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4834 (NUM_POINTS): New macro.
4835 (MPointTable): New type.
4836 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4837 (mfont__ft_drive_otf): New argument rfont.
4839 * fontset.c (realize_font_group): Adjusted for the changed of
4841 (check_fontset_element): This function deleted.
4843 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4844 off the parent window if the preedit text is zero length.
4846 * internal-gui.h (struct MFrame): New members foreground,
4847 background, videomode, font.
4848 (struct MGlyphString): New member anti_alias.
4849 (MDrawPoint): New type.
4850 (mwin__draw_bitmap): Prototype deleted.
4851 (mwin__draw_points): Prototype added.
4853 * m17n-gui.h (MDrawControl): New member anti_alias.
4855 * m17n-gui.c (free_frame): Free frame->font.
4856 (mframe): Set the fontset of frame->face to the default fontset.
4858 * m17n-X.c (RGB_GC): New type.
4859 (enum gc_index): Renamed from enum face_gc. Member names changed.
4861 (struct MWDevice): Members foreground and background deleted. New
4862 member scratch_gc, gc_list.
4863 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4864 (free_device): Free GCs in device->gc_list.
4865 (get_rgb_gc): New function.
4866 (get_gc): Renamed and argument changed from get_color.
4867 (get_gc_for_anti_alias): New function.
4868 (xfont_find_metric): Arguments changed. Get metrics of multiple
4870 (set_region): Argument changed. Caller changed.
4871 (xfont_render): Allways set a font in gc.
4872 (x_error_handler, x_io_error_handler): Define only if
4873 X_SET_ERROR_HANDLER is defined.
4874 (mwin__open_device): Create device->scratch_gc. Set members
4875 foreground, background, and videomode of frame. Call
4876 XSetErrorHandler and XSetIOErrorHandler only if
4877 X_SET_ERROR_HANDLER is defined.
4878 (struct gc_list): Deleted.
4879 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4880 (mwin__realize_face): Adjusted for the change of the format of
4881 rface->info and the charge of set_region.
4882 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4883 (mwin__draw_box): Likewise.
4884 (mwin__draw_bitmap): This function deleted.
4885 (mwin__draw_points): New function.
4886 (mwin__verify_region): Adjusted for the change of the format of
4887 rface->info and the charge of set_region.
4888 (mwin__create_window): Inherit backgound pixel from parent.
4889 (mwin__dump_gc): Adjusted for the change of the format of
4892 2004-03-16 Kenichi Handa <handa@m17n.org>
4894 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4896 * input.c (M_key_alias): New variable.
4897 (handle_key): Try M_key_alias property of a key too.
4898 (minput__init): Initialize M_key_alias. Give that property to
4899 symbols in one_char_symbol. Fix bug of initializing
4902 * draw.c (compose_glyph_string): Don't handle
4903 ignore_formatting_char here. Include formatting characters in the
4904 range processed by a FTL.
4905 (layout_glyph_string): Handle ignore_formatting_char here.
4907 2004-03-12 Kenichi Handa <handa@m17n.org>
4909 * input-gui.c (win_create_ic): Enable bidi in status control.
4911 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4913 2004-03-09 Kenichi Handa <handa@m17n.org>
4915 * input.c (load_input_method): If title is not specified, use the
4916 input method name as title.
4918 * m17n-X.c (get_color): Make it static.
4919 (xim_create_ic, xim_destroy_ic, x_error_handler)
4920 (x_io_error_handler): Likewise.
4922 2004-03-01 Kenichi Handa <handa@m17n.org>
4924 * Version 1.0 released.
4927 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4928 National Institute of Advanced Industrial Science and Technology (AIST)
4929 Registration Number H15PRO112
4931 This file is part of the m17n library.
4933 The m17n library is free software; you can redistribute it and/or
4934 modify it under the terms of the GNU Lesser General Public License
4935 as published by the Free Software Foundation; either version 2.1 of
4936 the License, or (at your option) any later version.
4938 The m17n library is distributed in the hope that it will be useful,
4939 but WITHOUT ANY WARRANTY; without even the implied warranty of
4940 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4941 Lesser General Public License for more details.
4943 You should have received a copy of the GNU Lesser General Public
4944 License along with the m17n library; if not, write to the Free
4945 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4946 Boston, MA 02110-1301, USA.