1 2010-09-02 Kenichi Handa <handa@m17n.org>
3 * draw.c (visual_order): Reorder only RTL composed-sequence.
5 2010-09-01 Kenichi Handa <handa@m17n.org>
7 * draw.c (compose_glyph_string): When the script `inherited' and
8 `common' can't be resolved, use "block" property of the character.
10 2010-08-31 Kenichi Handa <handa@m17n.org>
12 * draw.c (compose_glyph_string): Allow running flt striding over
15 2010-08-19 Kenichi Handa <handa@m17n.org>
17 * m17n-X.c (MDisplayInfo): New member altgr_mask.
18 (find_modifier_bits): Set disp_info->altgr_mask.
20 * input.c (fully_initialize): Make it static.
22 * input.h (MINPUT_KEY_ALTGR_MODIFIER): New macro.
24 * input-gui.c (minput_event_to_key): Handle
25 MINPUT_KEY_ALTGR_MODIFIER.
27 2010-08-12 Kenichi Handa <handa@m17n.org>
29 * character.h (STRING_CHAR_ADVANCE_UTF8): Sanitize the code.
30 (STRING_CHAR_ADVANCE_UTF16): Likewise.
32 * font.c (mfont__init): Initialize buf to NULL.
33 (mfont__id): Likewise.
35 * font-ft.c (ft_encapsulate): Use MDEBUG_PRINT1 instead of
37 (ft_check_otf): Move the label not_otf: within #ifdef HAVE_OTF.
38 (get_otf): Move the code within #ifdef HAVE_OTF.
39 (ft_drive_otf): Move declarations of some local variables within
42 2010-08-11 Kenichi Handa <handa@m17n.org>
44 * input.h (MInputContextInfo): New member state_hook.
46 * input.c (shift_state): Just set ic_info->state_hook, instead of
47 taking state-hook actions.
48 (handle_key): Check ic_info->state_hook. If KEY is unhandled,
49 init ic_info->state_hook.
51 2010-08-09 Kenichi Handa <handa@m17n.org>
53 * m17n-flt.c (try_otf): Remove unused local vars.
55 * input.c (fully_initialize): Avoid compiler warning by casting.
57 * m17n-core.c (m17n_init_core): Fix handling of env_value.
59 * fontset.c (realize_fontset_elements): Fix typo (pl->plist).
61 * coding.c (decode_coding_iso_2022): Sanitize "if" condition.
63 2010-04-23 Kenichi Handa <handa@m17n.org>
65 * Version 1.6.1 released.
67 2010-04-23 Kenichi Handa <handa@m17n.org>
69 * m17n-flt.c (enum GlyphInfoMask): Shift upper masks 1-bit left.
70 (decode_packed_otf_tag): If a glyph has combining information,
73 2010-04-23 Kenichi Handa <handa@m17n.org>
75 * font-ft.c (ft_drive_otf): Reset 28th bit of g->g.internal for
76 storing OTF feature tag.
78 2010-04-19 Kenichi Handa <handa@m17n.org>
80 * m17n-flt.c (run_stages): Update category code of glyphs if
81 category table is changed.
83 2010-04-05 Kenichi Handa <handa@m17n.org>
85 * font-ft.c (ft_check_cap_otf): Fix conditions to call
88 * database.c (check_version): Fix previous change.
90 2010-04-02 Kenichi Handa <handa@m17n.org>
92 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 6.
93 (M17NLIB_PATCH_LEVEL): Changed to 1.
94 (M17NLIB_VERSION_NAME): 1.6.1.
96 2010-03-30 Kenichi Handa <handa@m17n.org>
98 * Version 1.6.0 released.
100 2010-03-01 Kenichi Handa <handa@m17n.org>
102 * m17n-flt.c (run_rule): Fix checking of glyph availability.
104 2010-02-18 Kenichi Handa <handa@m17n.org>
106 * m17n-gui.c (register_device_library): Preprend M17N_MODULE_DIR
107 to the module file name.
109 * input.c (load_external_module): Preprend M17N_MODULE_DIR to the
112 * charset.c (load_charset): Check the return value of fgets.
114 * Makefile.am: Build modules dynamically loaded with
115 -avoid-version and no -version-info.
117 2010-01-15 Kenichi Handa <handa@m17n.org>
119 * draw.c (run_flt): Set mflt_try_otf to rfont->driver->try_otf.
120 (mdraw__init): Set mflt_enable_new_feature to 1.
122 * font-ft.c (ft_try_otf): New function.
123 (mfont__ft_driver): Set ft_try_otf.
125 * font.h (struct MFontDriver): New member try_otf.
127 * m17n-X.c (xft_driver): Set xft_try_otf.
128 (xft_try_otf): New function.
130 * m17n-flt.h: (mflt_enable_new_feature): Extern it.
131 (mflt_try_otf): Extern it.
133 * m17n-flt.c (load_category_table): If mflt_enable_new_feature is
134 zero, return NULL for such categories that require the new
136 (parse_otf_command): If mflt_enable_new_feature is zero, return
138 (load_otf_command): Fix previous change.
139 (load_flt): Check the return value of load_category_table.
140 (try_otf): Renamed from run_otf_category. Call mflt_try_otf
141 instead of font->drive_otf.
142 (run_command): Call try_otf instead of run_otf_category.
143 (m17n_init_flt): Initialize mflt_enable_new_feature to 0,
144 mflt_try_otf to NULL.
145 (mflt_enable_new_feature): New variable.
146 (mflt_try_otf): New variable.
148 2009-12-10 Kenichi Handa <handa@m17n.org>
150 * m17n-flt.c (parse_otf_command): Handle ":otf?".
151 (run_otf_category): If not features are specified, reset category
153 (run_command): On copy, don't re-calculate a category code.
155 2009-12-03 Kenichi Handa <handa@m17n.org>
157 * m17n-flt.c (run_stages): Reset category code if category-table
159 (mflt_run): Don't set category code here.
160 (decode_packed_otf_tag): If no feature is applied, re-calculate
163 2009-12-02 Kenichi Handa <handa@m17n.org>
165 * m17n-flt.c (mflt_find): If FONT is specified but no flt is
167 (run_command): Don't set ENCODED and MEASURED of separator.
169 2009-11-30 Kenichi Handa <handa@m17n.org>
171 * m17n-flt.c (load_otf_command): Check 4th char against '?'.
172 (load_command): Likewise.
173 (decode_packed_otf_tag): New arg CTX. If CTX->in == gstring,
174 update CTX->encoded. Caller changed.
176 2009-11-30 Kenichi Handa <handa@m17n.org>
178 * font-ft.c (ft_drive_otf): Check if OUT is null or not.
179 (ft_drive_otf): Call OTF_drive_gsub_with_log and
180 OTF_drive_gpos_with_log. Record the applied feature in
183 * font.c (mfont__get_glyph_id): Encode g->c instead of g->code.
185 * internal-flt.h (MAKE_COMBINING_CODE_BY_CLASS)
186 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
187 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P):
189 (PACK_OTF_TAG): Extern it.
191 * draw.c (reorder_combining_chars): Delete it.
193 * m17n-flt.h (mflt_font_id): Use type MFLFont.
194 (mflt_iterate_otf_feature): Likewise.
196 * m17n-flt.c (enum GlyphInfoMask): New member CategoryCodeMask and
198 (GET_CATEGORY_CODE, SET_CATEGORY_CODE, GET_COMBINED): New macros.
199 (SET_COMBINING_CODE): Set also CombinedMask.
200 (FontLayoutFeatureTable): Delete it.
201 (FeatureCodeTable): New type.
202 (FontLayoutCategory): Type of feature_table changed.
203 (load_category_table): Adjusted for the change of
205 (unref_category_table): Likewise.
206 (gen_otf_tag): New member shift. Caller changed.
207 (FontLayoutContext): New member category.
208 (run_rule): Compare g->c instead of g->code.
209 (decode_packed_otf_tag): New function.
210 (run_otf): Call decode_packed_otf_tag. Don't reset combining-code
212 (run_otf_category): New function.
213 (run_command): Set category-code if necessary. Call
214 run_otf_category for FontLayoutCmdTypeOTFCategory.
215 (run_stages): Set ctx->category. Get category from glyph if
217 (mflt_dump_gstring): New function.
219 2009-11-26 Kenichi Handa <handa@m17n.org>
221 * m17n-flt.c (enum FontLayoutCmdType): New member
222 FontLayoutCmdTypeOTFCategory.
223 (FontLayoutFeatureTable): New type.
224 (FontLayoutCategory): New members feature_table_size and
226 (load_category_table): Handle feature_table.
227 (unref_category_table): Likewise.
228 (load_otf_command): Handle FontLayoutCmdTypeOTFCategory.
229 (load_command): Likewise.
230 (free_flt_command): Likewise.
232 2009-11-10 Kenichi Handa <handa@m17n.org>
234 * draw.c (run_flt): Update category code of each glyph.
236 2009-11-07 Kenichi Handa <handa@m17n.org>
238 * font-ft.c (ft_drive_otf): Don't accumulate anchor adjustments.
240 2009-11-05 Kenichi Handa <handa@m17n.org>
242 * m17n-flt.c (run_otf): Fix updating of g->lbearing, etc.
244 * font-ft.c (ft_drive_otf): Use OTF_drive_gpos2 if possible.
246 2009-10-28 Kenichi Handa <handa@m17n.org>
248 * fontset.c (mdebug_flag): New variable.
249 (mfont__lookup_fontset): Print debug info.
251 * m17n-core.c (m17n_init_core): Call SET_DEBUG_FLAG for
254 * internal.h (enum MDebugFlag): Add MDEBUG_FONTSET.
256 * language.c (mscript__from_otf_tag): Adjusted for the new format
257 of the database <standard script unicode>.
259 2009-10-22 Kenichi Handa <handa@m17n.org>
261 * database.c (check_version): Fix the check.
263 * input.c (surrounding_pos): New arg *pos.
264 (integer_value): Fix handling of "@+0".
265 (take_action_list): Adjusted for the change of surrounding_pos.
267 2009-10-05 Kenichi Handa <handa@m17n.org>
269 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
272 * m17n-flt.c (FontLayoutCategory): New typedef.
273 (FontLayoutStage): Type of the member `category' changed.
274 (struct _MFLT): Type of the member `coverage' changed. New member
275 need_config and font_id.
276 (apply_otf_feature): New function.
277 (load_category_table): New arg FONT. If FONT is non-NULL, call
278 apply_otf_feature. Setup category->definition.
279 (ref_category_table): New macro.
280 (unref_category_table): New function.
281 (load_flt): Adjusted for the type change of category.
282 (free_flt_stage): New arg FLT.
283 (list_flt): Adjusted for the type change of category.
284 (run_stages): Adjusted for the type change of category.
285 (configure_category, configure_flt): New function.
286 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
287 mflt_font_id to NULL.
288 (mflt_get): Skip the heading configured FLTs.
289 (mflt_find): Likewise. If necessary, configure the found flt.
290 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
291 Adjusted for the type change of category.
292 (mflt_iterate_otf_feature, mflt_font_id): New variable.
294 * m17n-X.c (xfont_open): Set rfont->id.
295 (xft_driver): Set xft_iterate_otf_feature.
296 (xft_open): Set rfont->id.
297 (xft_iterate_otf_feature): New function.
299 * font.h (struct MRealizedFont): New member id.
300 (struct MFontDriver): New member iterate_otf_feature.
302 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
304 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
305 (get_otf): New funcition.
306 (ft_check_otf, ft_drive_otf): Use get_otf.
307 (iterate_callback, ft_iterate_otf_feature): New functions.
308 (mfont__ft_driver): Set ft_iterate_otf_feature.
310 * draw.c: Docstring updated.
311 (font_id): New function.
312 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
315 2009-10-02 Kenichi Handa <handa@m17n.org>
317 * m17n-flt.c (load_flt): Check the return value of
320 2009-09-03 Kenichi Handa <handa@m17n.org>
322 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
323 positions are adjusted by GPOS table.
325 2009-08-13 Kenichi Handa <handa@m17n.org>
327 * Version 1.5.5 released.
329 2009-08-13 Kenichi Handa <handa@m17n.org>
331 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
332 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
334 2009-03-03 Kenichi Handa <handa@m17n.org>
336 * draw.c (compose_glyph_string): Check if category not Mnil.
338 2009-03-02 Kenichi Handa <handa@m17n.org>
340 * Version 1.5.4 released.
342 2009-02-25 Kenichi Handa <handa@m17n.org>
344 * m17n-core.c (report_object_array): For M-text and Plist, print
347 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
348 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
350 * input.c (get_candidate_list): Free unnecessary objects.
351 (take_action_list): Free plist.
353 2009-02-04 Kenichi Handa <handa@m17n.org>
355 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
357 2009-01-16 Kenichi Handa <handa@m17n.org>
359 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
362 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
365 2009-01-14 Kenichi Handa <handa@m17n.org>
367 * coding.c (decode_coding_iso_2022): Check invocation status
368 before updating charset0 and charset1.
370 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
372 2008-12-31 Kenichi Handa <handa@m17n.org>
374 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
377 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
379 * face.c (mface_get_prop): Fix strict aliasing bug.
380 (mface_put_prop): Likewise.
382 * m17n-gui.c (mframe): Fix strict aliasing bug.
384 2008-10-20 Kenichi Handa <handa@m17n.org>
386 * Version 1.5.3 released.
388 2008-10-06 Kenichi Handa <handa@m17n.org>
390 * draw.c (mdraw__init): Use TRUE only when
391 FRIBIDI_INTERFACE_VERSION is less than 3.
393 2008-10-03 Kenichi Handa <handa@m17n.org>
395 * database.c (mdatabase__find_file): Return a copy of filename if
396 it is absolute pathname.
398 2008-09-25 Kenichi Handa <handa@m17n.org>
400 * input.c (load_macros): Don't parse the action list here.
401 (load_im_info): Parse action lists of all macros.
403 2008-09-24 Kenichi Handa <handa@m17n.org>
405 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
407 2008-09-19 Kenichi Handa <handa@m17n.org>
409 * input.c (fully_initialize): Rename "@reload" to "-reload".
411 2008-09-17 Kenichi Handa <handa@m17n.org>
413 * m17n-flt.c (run_stages): Fix combining with a variable width
416 2008-08-04 Kenichi Handa <handa@m17n.org>
418 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
421 2008-07-22 Kenichi Handa <handa@m17n.org>
423 * input.c (fully_initialize): Fix previous change.
425 2008-07-19 Kenichi Handa <handa@m17n.org>
427 * input.c (fully_initialize): Fix previous change.
429 2008-07-14 Kenichi Handa <handa@m17n.org>
431 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
433 2008-07-14 Kenichi Handa <handa@m17n.org>
435 * input.c (fully_initialize): Handle C-M-1, etc.
437 2008-07-11 Kenichi Handa <handa@m17n.org>
439 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
441 2008-06-23 Kenichi Handa <handa@m17n.org>
443 * Version 1.5.2 released.
445 2008-06-23 Kenichi Handa <handa@m17n.org>
447 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
448 (M17NLIB_PATCH_LEVEL): Changed to 2.
449 (M17NLIB_VERSION_NAME): Changed "1.5.2".
451 2008-06-13 Kenichi Handa <handa@m17n.org>
453 * input.c (minput_config_file): Comment fixed for man-page.
455 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
457 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
459 2008-05-24 Kenichi Handa <handa@m17n.org>
461 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
463 2008-05-23 Kenichi Handa <handa@m17n.org>
465 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
466 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
468 (libm17n_gd_la_LIBADD): Likewise.
470 * input.c (take_action_list): Fix debug info.
472 2008-05-14 Kenichi Handa <handa@m17n.org>
474 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
475 (run_stages): Fix index of g_indices.
477 2008-04-03 Kenichi Handa <handa@m17n.org>
479 * draw.c (compose_glyph_string): Don't run flt striding over the
481 (get_gstring): Don't use the cached gstring if cursor position is
484 2008-04-02 Kenichi Handa <handa@m17n.org>
486 * input.c (integer_value): Delete the 3rd arg VALUE.
487 (resolve_expression): Adjust the call of integer_value.
488 (take_action_list): Likewise.
490 2008-03-06 Kenichi Handa <handa@m17n.org>
492 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
495 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
497 * Version 1.5.1 released.
499 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
501 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
502 HAVE_FREETYPE is defined.
504 * font.h (OTF_Tag): Be sure that it is defined in any cases.
506 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
508 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
511 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
513 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
515 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
517 * input.c (parse_action_list): Check M_candidates.
518 (get_im_info): If key is Mnil, be sure to set im_info->states to a
521 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
523 * input.c (integer_value): Fix interpretation of "@-N".
525 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
527 * input.c (get_following_char): Fix interpretation of POS.
528 (get_following_char): Fix interpretation of "@+N".
530 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
532 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
535 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
537 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
539 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
541 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
542 (run_command): Check if clustering now before calling
543 UPDATE_CLUSTER_RANGE.
545 2008-01-06 Kenichi Handa <handa@m17n.org>
547 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
549 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
551 * m17n-X.c (xft_find_metric): Set g->g.measured.
553 * m17n-flt.c (Mequal): New variable.
554 (m17n_init_flt): Initialize it.
555 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
556 into a new member facility.
557 (load_command): Modify parsing of Mfont_facility.
558 (run_rule): Adjuted for the change of FontLayoutCmdRule.
559 (run_otf): Adjusted metrics if a->back is nonzero.
561 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
563 * Version 1.5.0 released.
565 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
567 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
569 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
570 (run_rule): Check if a font has the specific glyph correctly.
572 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
573 MDEBUG_FONT_FLT to MDEBUG_FLT.
575 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
577 * font-flt.c: Delete it.
579 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
581 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
582 TO for the rule of SRC_HAS_GLYPH.
584 * draw.c (run_flt): Argument changed.
585 (compose_glyph_string): Adjusted for the above change.
587 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
589 * plist.c (read_mtext_element): Don't free the malloced buffer.
591 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
593 * m17n-core.h (merror_code): Extern it.
595 * m17n-misc.h (merror_code): Don't extern it.
597 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
599 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
601 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
603 * draw.c (compose_glyph_string): Check g->rface->layouter, not
604 g->rface->rfont->layouter.
606 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
608 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
609 (run_rule): Use ctx->encoded_offset.
610 (run_command): Likewise.
611 (run_stages): Set ctx->encoded_offset.
613 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
615 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
616 bit-size of MFLTGlyph->internal.
618 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
620 * draw.c (visual_order): Exclude the last anchor glyph from the
623 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
625 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
626 (run_stages): Likewise.
627 (load_flt): Unref top after checking plist.
629 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
631 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
633 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
635 * m17n-flt.c (Mcombining): New variable.
636 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
637 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
638 SRC_HAS_GLYPH and SRC_OTF_SPEC.
639 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
641 (load_command): Adjusted for the above changes.
642 (run_rule): Likewise.
643 (combining_code_from_class): Delete it.
644 (mflt_get): Check flt->name against Mcombining, not Mt.
646 * internal-flt.h (Mcombining): Extern it.
648 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
649 combining characters.
651 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
653 * face.c (mface__realize): Reset measured flag before calling
656 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
657 (setup_combining_coverage): New function.
658 (setup_combining_flt): New function.
659 (mflt_get): If flt is not found, return NULL. If name if Mt,
660 call setup_combining_flt.
661 (mflt_run): For debugging, print font family name.
663 * font-ft.c (ft_render): Fix handling of baseline_offset.
664 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
665 (ft_render): Check pixel_mode to determine anti_alias.
667 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
668 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
669 (xfont_render): Set baseline_offset in pixel.
670 (xft_render): Fix handling of baseline_offset.
672 * draw.c (run_flt): Set font.font.family.
673 (compose_glyph_string): Fix handling of combining characters.
675 * fontset.c (try_font_list): Check if the named flt is surely
678 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
680 * draw.c (analyse_bidi_level): New function.
681 (visual_order): Do reordering using the already decided
683 (compose_glyph_string): Decide bidi-level before calling flt.
685 * m17n-flt.c (mflt_run): Fix typo.
687 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
689 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
691 * draw.c (visual_order): Don't rely on the width of glyphs.
692 (run_flt): Fix culculation of g->g.to.
694 * m17n-flt.c (run_rule): Don't set error code here.
695 (run_cond): Likewise.
696 (run_otf): Fix culculation of xoff and yoff.
697 (run_command): Don't set error code here.
701 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
702 (xfont_find_metric): Set glyph's yadv to 0.
703 (xft_find_metric): Likewise.
705 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
706 (ft_find_metric): Adjust glyph's metrics.
707 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
708 (ft_drive_otf): Set mark glyph's xadv to 0.
710 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
713 2007-10-29 Kenichi Handa <handa@m17n.org>
715 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
716 (mflt_get): Adjusted for the argument change.
717 (mflt_name): Adjusted for the return value change.
719 * m17n-flt.c (Mgenerator, Mend): New variables.
720 (flt_min_coverage, flt_max_coverage): New variables.
723 (Mfont_has): Renamed from Mexist. Referrers chagned.
724 (gen_otf_tag): Handle the trailing whitespaces.
725 (otf_count_features, otf_store_features): Fix for negative features.
726 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
727 (load_otf_command): Likewise.
728 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
729 (load_flt): Argument changed. Caller changed.
730 (free_flt_list): New function.
731 (run_rule): Adjusted for the change of FontLayoutContext.
732 (mflt_run): Adjusted for the change of FontLayoutContext.
734 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
735 (m17n_fini_win): Call m17n_fini_flt.
737 * m17n-gui.h: Include m17n-flt.h.
739 * m17n-gd.c: Adusted for the change of MGlyph.
741 * m17n-X.c: Adusted for the change of MGlyph.
742 (xft_check_otf, xft_drive_otf): New functions.
744 * internal-gui.h (MGlyph): Modified for new FLT handling.
746 * fontset.c (try_font_list): Adusted for the change of MGlyph.
748 * font-ft.c: Adjusted for the change of MGlyph.
749 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
750 (get_glyph_metric): Deleted.
751 (ft_check_otf): New function.
752 (ft_drive_otf): New fucntion.
754 * font.c: Adjusted for the change of MGlyph.
755 (mfont__init): Don't call mfont__flt_init.
756 (mfont__fini): Don't call mfont__flt_fini.
757 (mfont__get_glyph_id, mfont__get_metrics): New functions.
759 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
760 (MFLTFontForRealized): New struct.
761 (struct MFontDriver): New members check_otf and drive_otf.
762 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
764 * face.c: Adjusted for the change of MGlyph.
766 * draw.c: Adjusted for the change of MGlyph.
768 * m17n.c (m17n_init): Don't call mchar_init.
770 * m17n-core.c (m17n_init_core): Call mchar_init.
772 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
774 * input.c: Include "m17n.h" instead of "m17n-gui.h".
776 * chartab.c (mchartable): Initialize table->min_char to -1.
777 (mchartable_min_char): New function.
778 (mchartable_max_char): New function.
780 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
781 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
783 2007-10-12 Kenichi Handa <handa@m17n.org>
785 * m17n-core.h (Mcharset): Extern it.
786 Move detabase related declarations from m17n.h.
788 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
789 (struct _MFLTOtfFeatures): New struct.
790 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
791 (struct _MFLTFont): Delete otf, add check_otf.
792 (MCHAR_INVALID_CODE): Define it.
794 * plist.c (read_mtext_element): Simplify the code.
796 * m17n.h: Move database related declarations to m17n-core.h
797 (Mharset): Don't extern it.
799 * m17n.c (m17n_init): Don't call mdatabase__init.
801 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
804 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
805 (Mexist): New variable.
806 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
807 (FontLayoutCmdRule): New member src.exist.
808 (parse_otf_command): Handle gsub_count and gpos_count separately.
809 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
810 (load_command): Handle the command "exist".
811 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
812 (run_rule): Handle the case SRC_EXIST.
813 (run_otf): Adjusted for the change of MFLTOtfSpec.
814 (run_command): Check the range of FROM.
815 (check_otf_spec): Delete it.
816 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
818 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
819 (mflt_find): Call font->check_otf instead of check_otf_spec.
820 (mflt_run): Keep the metrics in 26.6 fixed point.
822 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
823 (m17n_init_core): Call mdatabase__init.
825 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
827 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
830 * font-flt.c (Mexist): New variable.
831 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
832 (FontLayoutCmdRule): New member src.exist.
833 (load_category_table): Use isalnum, not isalpha.
834 (load_command): Check the command "exist".
835 (run_rule): Hande the case SRC_EXIST.
836 (run_command): Check the range of FROM.
837 (mfont__flt_init): Initialize Mexist.
839 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
841 * database.h (mdatabase__load_charset_func): Extern it.
843 * database.c: Include m17n-core.h instead of m17n.h.
844 (load_chartable): Use mtext__from_data.
845 (load_charset): Moved to charset.c
846 (load_database): Call mdatabase__load_charset_func instead of
848 (mdatabase__load_charset_func): New variable.
849 (mdatabase__init): Initialize mdatabase__load_charset_func and
850 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
851 (mdatabase__save): Use fwrite, not mconv_encode_stream.
852 (Mcharset): Declare it here.
854 * charset.c: Include "database.h.".
855 (load_charset): Moved from database.c.
856 (mcharset__init): Initialize mdatabase__load_charset_func, don't
859 * character.c (mchar_define_property): Call mdatabase_find directly.
860 (mchar_get_prop): Call mdatabase_add directly.
861 (mchar_put_prop): Call mdatabase_load directly.
862 (mchar_get_prop_table): Likewise.
864 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
865 (libm17n_la_SOURCES): Remove database.[ch].
866 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
868 2007-09-18 Kenichi Handa <handa@m17n.org>
870 * face.c (mface__realize): Try Freetype based font at first.
872 * font.c: Include <ctype.h>
874 2007-09-16 Kenichi Handa <handa@m17n.org>
876 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
878 (run_otf): Call font->get_metrics, not font->get_metric.
879 (run_stages): Likewise.
880 (CHECK_FLT_COVERAGE): New macro.
881 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
882 (check_otf_spec): New function.
883 (m17n_fini_flt): Unref flt->coverage.
884 (mflt_find): Argument changed.
885 (mflt_name): New function.
886 (mflt_coverage): Use CHECK_FLT_COVERAGE.
888 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
889 (mflt_find): Prototype adjusted.
890 (mflt_name): Extern it.
892 2007-09-14 Kenichi Handa <handa@m17n.org>
894 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
896 * font-flt.c (run_otf): Make debug info printing comaptible with
898 (run_command): Likewise.
899 (mfont__flt_run): Likewise.
901 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
902 invalid only when it's negative.
904 (run_command): Likewise.
905 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
907 2007-09-10 Kenichi Handa <handa@m17n.org>
909 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
910 (struct _MFLTFont): Prototype of get_glyph_id changed.
912 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
914 (GAPPEND): Delete this macro.
915 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
916 for the change of MFLTGlyph. Caller changed.
917 (run_otf): Simply calls font->get_glyph_id.
918 (run_command): Reset g->encoded and g->measured for direct code.
919 (positioning): Delete this function.
920 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
922 2007-09-07 Kenichi Handa <handa@m17n.org>
924 * draw.c (compose_glyph_string): Improve script detection.
926 2007-09-06 Kenichi Handa <handa@m17n.org>
928 * m17n-flt.h (mflt_get): Extern it.
930 * m17n-flt.c (run_stages): Call positioning only if
931 font->get_metric is non-NULL.
932 (CHECK_FLT_STAGES): Fix typo.
933 (mflt_get): New function.
935 * font-flt.c (mfont__flt_run): Improve debug info printing.
937 2007-09-04 Kenichi Handa <handa@m17n.org>
939 * m17n-flt.c (MFontLayoutTable): Delete this type.
940 (struct _MFLT): New member mdb and coverage.
941 (list_flt): Set flt->mdb.
942 (load_generator): Argument and return value changed. Caller
944 (get_font_layout_table): Delete this function.
945 (run_stages): Argument changed. Caller changed.
946 (CHECK_FLT_STAGES): New macro.
947 (mfont__flt_encode_char): Argument changed.
948 (mflt_find): Likewise.
949 (mflt_coverage): New function.
950 (mflt_run): Argument changed.
951 (mdebug_dump_flt): Likewise.
953 * m17n-flt.h (mflt_coverage): Extern it.
954 (mflt_find): Prototype adjusted.
956 2007-09-03 Kenichi Handa <handa@m17n.org>
958 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
960 * database.c (mdatabase__props): New function.
962 * database.h (mdatabase__props): Extern it.
964 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
966 (struct _MFLTFont): Add suitable_p.
967 (mflt_find): Extern it.
969 * m17n-flt.c: Include "database.h".
970 (struct _MFLT): New struct.
971 (list_flt): New function.
972 (load_flt): Don't update flt_list.
973 (get_font_layout_table): Use flt_list.
974 (m17n_init_flt): Don't initialize flt_list.
975 (m17n_fini_flt): Adjusted for the change of flt_list.
976 (mflt_find): New function.
977 (mflt_run): Fix debug printing.
979 2007-08-23 Kenichi Handa <handa@m17n.org>
981 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
982 (run_stages): Print separator in encoded string as "|".
984 2007-08-23 Kenichi Handa <handa@m17n.org>
986 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
987 the glyph is already handled by OTF.
989 2007-08-21 Kenichi Handa <handa@m17n.org>
991 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
993 2007-08-20 Kenichi Handa <handa@m17n.org>
995 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
998 2007-08-17 Kenichi Handa <handa@m17n.org>
1000 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
1002 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
1003 (MFLTFont): Prototype of the member drive_otf adjusted.
1005 * m17n-flt.c (run_stages): Fix handling of padding.
1007 * font-ft.c (get_glyph_metric): New function.
1008 (DEVICE_DELTA): Return 26.6 fixed point value.
1009 (adjust_anchor): Likewise.
1010 (mfont__ft_drive_otf): Use get_glyph_metric.
1012 * font-flt.c (mfont__flt_run): Pay attention to padding on
1013 printing debug info.
1015 2007-08-16 Kenichi Handa <handa@m17n.org>
1017 * m17n-flt.c (run_stages): Fix typo.
1019 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
1021 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
1022 Adjusted for the argument change of adjust_anchor. Calculte based
1023 on 26.6 fixed point.
1025 2007-08-15 Kenichi Handa <handa@m17n.org>
1027 * charset.c (mcharset__load_from_database): Set mdebug_flag
1028 instead of mdebug_mask.
1030 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
1033 * database.c (load_database): Set mdebug_flag instead of
1035 (mdatabase__load_for_keys): Likewise.
1037 * draw.c: Include "internal-flt.h".
1038 (dump_combining_code): Don't subtract 128 from combining code
1041 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
1043 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
1045 (run_cond): Likewise.
1046 (run_otf): Likewise.
1047 (run_command): Likewise.
1048 (mfont__flt_run): Change format of debug info.
1050 * font-ft.c: Include "internal-flt.h".
1051 Set mdebug_flag instead of mdebug_mask.
1052 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
1054 * input.c: Set mdebug_flag instead of mdebug_mask.
1055 (shift_state): New MDEBUG_FLAG macro.
1056 (preedit_commit): Likewise.
1059 * internal-flt.h: New file.
1061 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
1062 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
1063 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
1064 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
1065 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
1066 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
1067 these macros to internal-flt.h.
1069 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
1071 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
1072 (enum MDebugMaskBit): Delete this enum.
1073 (enum MDebugFlag): New enum.
1074 (mdebug__flag): Don't extern it.
1075 (mdebug__flags): Extern it.
1076 (MDEBUG_FLAG): New macro.
1077 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
1078 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
1079 (MDEBUG_PRINT_TIME): Likewise.
1081 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
1082 (xfont_list): Likewise.
1084 * m17n-core.c (mdebug__flag): Delete this variable.
1085 (mdebug__flags): New variable.
1086 (SET_DEBUG_FLAG): Make it a function.
1087 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
1088 (m17n_fini_core): Likewise.
1090 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
1091 (m17n_fini_win): Likewise.
1093 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
1095 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
1096 (m17n_fini): Likewise.
1098 * symbol.c (msymbol__free_table): Adjusted for the change of
1101 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
1102 (BASICHEADERS): Add m17n-flt.h.
1103 (FLT_SOURCES): New variable.
1104 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
1105 (libm17n_flt_la_LDFLAGS): Likewise.
1107 * m17n-flt.h: New file.
1109 * m17n-flt.c: New file created by modifying font-flt.c.
1111 2007-07-13 Kenichi Handa <handa@m17n.org>
1113 * Version 1.4.0 released.
1115 2007-07-12 Kenichi Handa <handa@m17n.org>
1117 * input.c: Fix doxygen @ref commands.
1119 2007-07-10 Kenichi Handa <handa@m17n.org>
1121 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
1123 2007-07-09 Kenichi Handa <handa@m17n.org>
1125 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
1127 * m17n.h: Include m17n-core.h if not yet done. Use macros
1128 M17N_BEGIN_HEADER and M17N_END_HEADER.
1130 * m17n-gui.h: Likewise.
1132 * m17n-misc.h: Likewise.
1134 2007-06-13 Kenichi Handa <handa@m17n.org>
1136 * font-flt.c (load_command): Prepend "^" in the regular expression.
1138 2007-06-11 Kenichi Handa <handa@m17n.org>
1140 * language.c (mlanguage_name_list): Fix previous change.
1142 * coding.c (mcoding__load_from_database): Add aliases in
1143 coding_definition_list.
1145 2007-06-10 Kenichi Handa <handa@m17n.org>
1147 * language.c (mlanguage_name_list): Fix previous change.
1149 2007-06-08 Kenichi Handa <handa@m17n.org>
1151 * input.c (update_candidate): Copy candidate_list earlier.
1152 (re_init_ic): Provide pseudo initialize state if none.
1154 2007-06-05 Kenichi Handa <handa@m17n.org>
1156 * input.c (preedit_insert): Print debug information.
1158 * database.c (expand_wildcard_database): New function.
1159 (mdatabase_list): Fix handling of wildcard database.
1161 * language.c (load_lang_name): New function.
1162 (mlang__fini): Cancel the last two changes.
1163 (mlanguage_name_list): New arg script and territories. Use
1166 * m17n.h (mlangauge_name_list): Adjusted.
1168 2007-06-04 Kenichi Handa <handa@m17n.org>
1170 * input.c (open_im): Check if the input method has at least one
1173 2007-06-01 Kenichi Handa <handa@m17n.org>
1175 * input.c (shift_state): Change the format of debug print.
1176 (preedit_commit): New arg need_prefix. Caller changed.
1177 (update_candidate): Copy candidate_list.
1178 (take_action_list): Likewise.
1179 (handle_key): Change the format of debug print.
1181 * font-flt.c (load_flt): Ignore unknown directives.
1183 2007-05-25 Kenichi Handa <handa@m17n.org>
1185 * m17n-core.c (mdebug__unregister_object): Small optimization.
1187 * database.c (find_file): Merged into get_database_file.
1188 (get_database_file): New arg result. Caller changed.
1189 (mdatabase__check): Fix the logic.
1191 2007-05-24 Kenichi Handa <handa@m17n.org>
1193 * database.c (find_database): If unprocessed wildcard database is
1194 found, register database filed and recursively call find_database.
1195 (free_db_info): Unref db_info->properties.
1196 (register_database): New arg properties. Delete code for
1197 initializing mdatabase__list.
1198 (register_databases_in_files): Argument changed. Caller changed.
1199 (mdatabase__update): Don't list files by glob here.
1200 (mdatabase_list): If unprocessed wildcard database is found,
1201 register database filed and recursively call mdatabase_list.
1203 * database.h (enum MDatabaseStatus): New enum
1204 MDB_STATUS_AUTO_WILDCARD.
1206 * input.c (load_branch): Fix previous change.
1207 (update_global_info): If the global database is not found, return -1.
1209 2007-05-23 Kenichi Handa <handa@m17n.org>
1211 * database.c (Mversion): New variable.
1212 (mdatabase__init): Initialize it.
1213 (register_database): New arg properties. Caller changed.
1214 (register_databases_in_files): Don't check version here.
1215 (mdatabase__update): Likewise.
1217 * database.h (MDatabaseInfo): New member properties.
1219 2007-05-21 Kenichi Handa <handa@m17n.org>
1221 * language.c: Include <ctype.h>
1222 (mlanguage__info): Use strncasecmp (not memcmp).
1223 (mlanguage_name): Downcase language name for backward
1226 * input.c (filter): Don't check Mlanguage property of
1229 2007-05-18 Kenichi Handa <handa@m17n.org>
1231 * language.c (mlanguage_name): Fix it to handle M-text English
1234 * input.c (config_command): Set NAME before using it.
1235 (load_branch): Try to resolve a map name by variables.
1237 2007-05-17 Kenichi Handa <handa@m17n.org>
1239 * language.c (mlang__fini): Fix previous change.
1241 2007-05-16 Kenichi Handa <handa@m17n.org>
1243 * plist.c (free_plist): Cancel the last change.
1244 (write_element): Check if PLIST is nested.
1245 (mplist__from_plist): Label a plist as nested if appropriate.
1246 (mplist__from_alist): Label a plist as nested.
1247 (mplist__conc): Check the value of PL before referring it. Label
1248 a plist as nested if appropriate.
1249 (mplist_copy): Label a plist as nested if appropriate.
1250 (mplist_put_func): Return Mnil if KEY is a managing key.
1251 (mplist_push): Label a plist as nested if appropriate.
1253 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
1256 * language.c (mlang__fini): Unref each element of langname_list.
1258 2007-05-14 Kenichi Handa <handa@m17n.org>
1260 * language.c: Include <string.h> and <locale.h>.
1261 (langname_list): New variable.
1262 (load_lang_script_list): Exclude invalid list elements.
1263 (mlang__init): Initialize langname_list.
1264 (mlang__fini): Unref langname_list.
1265 (mlanguage__info): Adjusted for the change of English
1266 name (symbol->M-text).
1267 (mlanguage_name): Label it as obsolete.
1268 (mlanguage_name_list): New function.
1270 * m17n.h (mlanguage_name_list): Extern it.
1272 * locale.c (make_locale): Fix setting of members of locale.
1274 * plist.c (free_plist): Unref also nested plist.
1276 2007-05-11 Kenichi Handa <handa@m17n.org>
1278 * coding.c (mconv_reset_converter): Set internal->used to 0.
1280 2007-05-08 Kenichi Handa <handa@m17n.org>
1282 * input.c (check_description): Force copying the translated text.
1284 2007-05-02 Kenichi Handa <handa@m17n.org>
1286 * input.c (minput_save_config): Unref unnecessary plist. Use
1287 free_im_list to free im_config_list.
1289 2007-04-20 Kenichi Handa <handa@m17n.org>
1291 * input.c (config_command): Fix previous change again.
1292 (config_variable): Likewise.
1293 (minput_config_command): Fix for the case of setting back to
1295 (minput_config_variable): Likewise.
1296 (minput_save_config): Include nil as documentation of customized
1299 2007-04-05 Kenichi Handa <handa@m17n.org>
1301 * input.c (config_command): Fix previous change.
1302 (config_variable): Likewise.
1304 * plist.c (mplist_get_func): Fix for backward compatiblity.
1306 2007-04-04 Kenichi Handa <handa@m17n.org>
1308 * input.c (minput_get_command, minput_config_command): Fix example
1311 2007-03-29 Kenichi Handa <handa@m17n.org>
1313 These changes are to avoid unsafe casting of a function pointer.
1315 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1316 (struct MFace): New member hook.
1318 * face.c (serialize_face): Adjusted for the change of MFace.
1319 (deserialize_face): Likewise.
1320 (mface__init): Likewise. Use msymbol_put_func.
1321 (mface__realize): Adjusted for the change of MFace. Avoid
1323 (mface_get_prop): Adjusted for the change of MFace.
1324 (mface_put_prop): Likewise.
1325 (mface_get_hook): New function.
1326 (mface_put_hook): New function.
1327 (mface_update): Adjusted for the change of MFace.
1329 * input-gui.c (win_callback): Use mplsit_get_func.
1330 (minput__win_init): Use mplsit_put_func.
1332 * input.c (take_action_list): Use mplist_get_func.
1333 (init_ic_info): Likewise.
1334 (fini_ic_info): Likewise.
1335 (minput_callback): Likewise.
1336 (minput__init): Use mplist_put_func.
1338 * language.c (mlang__init): Use msymbol_put_func.
1340 * m17n-core.h (M17NFunc): New function type.
1341 (M17N_FUNC): New macro.
1342 (msymbol_put_func, msymbol_get_func): Extern them.
1343 (mplist_put_func, mplist_get_func): Extern them.
1345 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1347 * m17n-gui.c (mframe): Add a proper casting.
1349 * plist.h (struct MPlist): Make the member val a union.
1350 (MPLIST_VAL): Adjusted for the above change.
1351 (MPLIST_FUNC): New macro.
1352 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1354 * plist.c (mplist_put_func, mplist_get_func): New functions.
1356 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1357 (msymbol_put_func, msymbol_get_func): New functions.
1359 * textprop.c (mtext_serialize): Use msymbol_get_func.
1360 (mtext_deserialize): Likewise.
1362 2007-03-28 Kenichi Handa <handa@m17n.org>
1364 * input.c (get_candidate_list): Avoid unnecessary unref.
1366 2007-03-23 Kenichi Handa <handa@m17n.org>
1368 * database.c (mdatabase__update): Unref plist at the tail.
1370 2007-03-21 Kenichi Handa <handa@m17n.org>
1372 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1374 (config_command): Fix for the case that configuration is
1376 (config_variable): Likewise.
1377 (minput_config_command): If keyseqlist is an empty list, cancel
1379 (minput_config_variable) If value is an empty list, cancel the
1381 (minput_save_config): Handle cancellation of config and customize
1384 2007-03-15 Kenichi Handa <handa@m17n.org>
1386 * input.c (minput_config_variable): Check custom->vars (not
1389 2007-03-01 Kenichi Handa <handa@m17n.org>
1391 * input.c (reload_im_info): Setup cmds, vars, and title of
1393 (check_variable_value): Fix the return value.
1395 * database.c (mdatabase__check): If necessary, update database and
1398 2007-02-28 Kenichi Handa <handa@m17n.org>
1400 * database.c (get_dir_info): Set dir_info->status to
1401 MDB_STATUS_OUTDATED.
1402 (check_version): New function.
1403 (register_database): Don't call find_database.
1404 (register_databases_in_files): Don't register a database of
1406 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1408 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1409 and MDB_STATUS_OUTDATED.
1411 * font.h (struct MFont): Types of members type, source, and
1412 spacing changed to unsigned.
1414 * internal-gui.h (struct): Types of members category and type
1415 changed to unsigned.
1417 * internal.h (struct MText): Types of members format and coverage
1418 changed to unsigned.
1420 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1421 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1423 2007-02-23 Kenichi Handa <handa@m17n.org>
1425 * input.c (Mpop): New variable.
1426 (fully_initialize): Initialize Mpop.
1427 (parse_action_list): Handle Mpop.
1428 (take_action_list): Likewise.
1429 (handle_key): When a key is unhandled, shift to the initial state
1430 only if the current state has no branch action.
1432 2007-02-12 Kenichi Handa <handa@m17n.org>
1434 * input.c (get_preceding_char): Unref mt if necessary.
1435 (get_following_char): Likewise.
1436 (parse_action_list): Fix handling of `insert' action as
1438 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1439 (take_action_list): Check invalid candidate list.
1441 2007-02-06 Kenichi Handa <handa@m17n.org>
1443 * input.c (integer_value): Check also ic->produced for @-N.
1445 2007-01-26 Kenichi Handa <handa@m17n.org>
1447 * database.c (mdatabase__update): Check mdatabase__dir_list from
1450 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1452 2007-01-12 Kenichi Handa <handa@m17n.org>
1454 * input.c (handle_key): Handle a branch action of the initial
1457 2007-01-10 Kenichi Handa <handa@m17n.org>
1459 * m17n-gd.c (gd_render): Delete superfluous line.
1461 2006-12-26 Kenichi Handa <handa@m17n.org>
1463 * m17n.h (minput_callback): Extern it.
1465 * input.h (minput__callback): Delte extern.
1467 * input.c (get_surrounding_text): Adjusted for the change of
1468 minput__callback to minput_callback.
1469 (delete_surrounding_text): Likewise.
1470 (minput_create_ic): Likewise.
1471 (minput_destroy_ic): Likewise.
1472 (minput_filter): Likewise.
1473 (minput_set_spot): Likewise.
1474 (minput_toggle): Likewise.
1475 (minput_reset_ic): Likewise.
1477 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1478 and ic->candidate_to to 0.
1479 (minput_callback): Renamed from minput__callback.
1481 * input-gui.c (win_callback): Adjusted for the change of
1482 minput__callback to minput_callback.
1484 2006-12-15 Kenichi Handa <handa@m17n.org>
1486 * font-ft.c (ft_add_font): Fix typo.
1488 2006-12-06 Kenichi Handa <handa@m17n.org>
1490 * Version 1.3.4 released.
1492 2006-11-16 Kenichi Handa <handa@m17n.org>
1494 * input.c (parse_action_list): Allow (undo 0).
1495 (adjust_markers): New function.
1496 (preedit_insert, preedit_delete): Call adjust_markers.
1497 (preedit_replace): New function.
1498 (update_candidate): Call preedit_replace instead of preedit_insert
1500 (filter): When ic_info->commit_key_head is nonzero, shift input
1501 event keys even if there's no committed text.
1503 2006-11-10 Kenichi Handa <handa@m17n.org>
1505 * input.h (MInputContextInfo): New member commit_key_head.
1507 * input.c (preedit_commit): Update ic_info->commit_key_head.
1508 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1509 (filter): When committed, shift keys by ic_info->commit_key_head.
1511 2006-10-30 Kenichi Handa <handa@m17n.org>
1513 * input.c (preedit_delete): Fix typo.
1514 (take_action_list): Print more debugging information. Allow
1515 variable in arg of 'select' and `pushback'.
1517 * database.c (gen_database_name): Don't put extra space.
1518 (load_database): Print debugging information.
1519 (register_databases_in_files): New arg headlen. Callers changed.
1520 (mdatabase__load_for_keys): Shorten debugging information.
1521 (mdatabase_load): Don't print debugging information here.
1523 2006-10-27 Kenichi Handa <handa@m17n.org>
1525 * input.c (marker_code): New arg surrounding. Callers changed.
1526 (surrounding_pos): Check if name[0] == '@'.
1527 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1528 (take_action_list): Likewise.
1529 (get_preceding_char): If POS is zero, always call
1530 get_surrounding_text.
1532 2006-10-19 Kenichi Handa <handa@m17n.org>
1534 * input.c (load_variables): Fix setting of `global'.
1536 2006-10-16 Kenichi Handa <handa@m17n.org>
1538 * draw.c (draw_background): Be sure to set *to_x.
1539 (render_glyph_string): If from == to, just return.
1541 2006-10-18 Kenichi Handa <handa@m17n.org>
1543 * database.c (get_dir_info): Return NULL if the directory name is
1545 (register_databases_in_files): Call register_database with
1547 (mdatabase__update): Fix logic. Call register_database with
1549 (mdatabase_define): Call register_database with
1550 MDB_STATUS_EXPLICIT.
1552 * input.c (delete_surrounding_text): Be sure to set members
1553 preceding_text and following_text to NULL.
1554 (shift_state): Save variable values in ic_info->vars_saved.
1555 (preedit_commit): Don't print debug information here. Don't
1556 change ic_info->keys here.
1557 (get_candidate_list): Don't ref plist.
1558 (take_action_list): Don't unref return value of
1559 get_candidate_list. For undo, reset ic->produced and recover
1560 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1562 (init_ic_info): Set ic_info->vars_saved.
1563 (fini_ic_info): Unref ic_info->vars_saved.
1564 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1566 (filter): Be sure to set members preceding_text and following_text
1567 to NULL. Print debug information about produced text. Delete
1568 processed keys from ic_info->keys.
1570 * input.h (MInputContextInfo): New member vars_saved.
1572 2006-10-16 Kenichi Handa <handa@m17n.org>
1574 * database.c (mdatabase__update): Fix the way to get db_info.
1576 2006-10-02 Kenichi Handa <handa@m17n.org>
1578 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1579 `size' changed to 24.
1581 * font.c (xlfd_unparse_name): Adjusted for the change of
1583 (font_score): Likewise.
1584 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1586 * m17n-X.c (MFontX, _MFontX): Deleted.
1587 (SET_SIZE, HAVE_SIZE): Deleted.
1588 (free_display_info): Adjusted for the change of
1589 disp_info->font_list format.
1590 (xfont_registry_list): Likewise.
1591 (xfont_open): Likewise.
1592 (xfont_list): Likewise.
1593 (xfont_encode_char): Ignore size to find a realized font.
1594 (MRealizedFontXft): Change the order of members to make it
1595 compatible with MRealizedFontFT.
1597 2006-09-27 Kenichi Handa <handa@m17n.org>
1599 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1600 (mfont_close): Add comments.
1602 * mtext-lbrk.c (mtext_line_break): Add comment.
1604 2006-09-26 Kenichi Handa <handa@m17n.org>
1606 * input.c (minput_get_description): Handle description about
1607 inclusion-only input methods.
1609 2006-09-21 Kenichi Handa <handa@m17n.org>
1611 * input.c (M_gettext): New variable.
1612 (fully_initialize): Initialize M_gettext.
1613 (check_description): New function.
1614 (load_commands): Call check_description.
1615 (config_all_commands): Be sure to unref pl.
1616 (load_variables): Call check_description.
1617 (config_all_variables): Be sure to unref pl.
1618 (load_im_info): Call check_description.
1620 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1622 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1623 and bind_textdomain_codeset.
1625 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1627 2006-09-15 Kenichi Handa <handa@m17n.org>
1629 * input.c (reload_im_info): Update custom and global info.
1630 (init_ic_info): Fix previous change.
1632 2006-09-14 Kenichi Handa <handa@m17n.org>
1634 * database.c: Include <libgen.h>.
1635 (mdatabase__lock): Make a directory if necessary.
1637 * input.c (resolve_command): Adjusted for the format change of
1638 configured_cmds member.
1639 (load_commands, load_variables): Fix for errornous data handling.
1640 (config_command, config_variable): New function.
1641 (config_all_commands, config_all_variables): Renamed from
1642 config_commands and config_variables. Utilize the above function.
1643 (check_variable_value): Argument changed. Callers changed.
1644 (load_im_info): Call config_all_commands and config_all_variables.
1645 (init_ic_info): Adjusted for the format change of configured_vars
1647 (minput__init): Initialize Mcustomized, Mconfigured, and
1649 (Mcustomized, Mconfigured, Minherited): New variables.
1650 (minput_get_command): Be sure to return NULL if an input method
1651 use no local command.
1652 (minput_get_variable): Be sure to return NULL if an input method
1653 use no local variable.
1654 (minput_config_command, minput_config_variable)
1655 (minput_save_config): Adjusted for the format change of
1656 configured_cmds and configured_vars members.
1658 * plist.c (write_element): Delete superfluous ':'.
1660 2006-09-13 Kenichi Handa <handa@m17n.org>
1662 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1663 (minput_config_file): Extern it.
1665 * draw.c (Minherited): Declaration moved to input.c.
1666 (mdraw__init): Don't initialize Minherited here.
1668 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1670 2006-09-07 Kenichi Handa <handa@m17n.org>
1672 * textprop.c (mtext_serialize): Call mplist__serialize with the
1675 * plist.h (mplist__serialize): Prototype adjusted.
1676 (mplist__assq): Extern it.
1678 * plist.c: Include <ctype.h>
1679 (PUTC, PUTS): New macros.
1680 (write_symbol): New function.
1681 (write_element): New arg indent.
1682 (dump_string, dump_plist_element): Delete them.
1683 (mplist__from_string): New arg pretty.
1684 (mplist__assq): New function.
1685 (mdebug_dump_plist): Use write_element.
1687 * mtext.c (mtext_cat_char): Allocate more memory.
1688 (mdebug_dump_mtext): Don't escal a newline character.
1690 * m17n.h (minput_get_command, minput_get_variable)
1691 (minput_config_command, minput_config_variable)
1692 (minput_save_config): Extern them.
1694 * m17n-core.c: Include <string.h>.
1695 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1696 use the stream stdout instead of a file of that name.
1698 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1701 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1702 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1703 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1704 (MDEBUG_DUMP): Flush the stream.
1706 * input.h (struct _MInputMethodInfo): Delete member im. New
1707 members mdb, language, name, extra, cmds, configured_cmds,
1708 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1709 (MInputContextInfo): New member tick.
1711 * input.c: Big change to improve user-side input method
1712 customization. Here, list just public API changes.
1713 (minput_get_commands, minput_get_variables)
1714 (minput_assign_command_keys, minput_set_variable): Label them
1716 (minput_get_command, minput_get_variable)
1717 (minput_config_command, minput_config_variable)
1718 (minput_save_config): New functions.
1720 * database.h (PATH_MAX): Define it if not yet defined.
1721 (PATH_SEPARATOR): Likewise.
1722 (enum MDatabaseStatus): New enum.
1723 (struct MDatabaseInfo): Moved from database.c. New members status,
1724 time, lock_file, and uniq_file.
1725 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1726 (mdatabase__unlock): Extern them.
1728 * database.c: Include <time.h>.
1729 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1730 (GEN_PATH): Args changed. Callers changed.
1731 (struct MDatabaseInfo): Moved to database.h.
1732 (struct MDatabase, mdb_list): Deleted.
1733 (mdatabase__list): New var.
1734 (get_database_filename): Deleted. Callers changed to use
1736 (find_file, get_database_file): New files.
1737 (get_dir_info): Initialize new members of MDatabaseInfo.
1738 (find_database): Arg chagnded. Callers changed.
1739 (free_db_info, register_database, register_databases_in_files):
1741 (update_database_list): Deleted.
1742 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1743 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1744 (mdatabase__update): New function.
1745 (mdatabase__check): Return value changed.
1746 (mdatabase__file, mdatabase__lock, mdatabase__save)
1747 (mdatabase__unlock): New functions.
1749 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1751 * input.c (get_surrounding_text): Return -2 when surrounding text
1753 (get_following_char): Likewise.
1754 (get_preceding_char): Likewise.
1755 (minput__callback): Return 0 if there is a callback function,
1758 2006-08-17 Kenichi Handa <handa@m17n.org>
1760 * input.c (reset_ic): Use shift_state to setup the current state.
1762 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1764 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1765 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1766 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1768 2006-08-02 Kenichi Handa <handa@m17n.org>
1770 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1772 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1774 * font-ft.c (ft_encapsulate): Add code for debugging.
1775 (mfont__ft_drive_otf): Be sure to encode character before getting
1778 2006-07-21 Kenichi Handa <handa@m17n.org>
1780 * draw.c (mdraw_text_extents): Fix previous typo.
1782 2006-07-19 Kenichi Handa <handa@m17n.org>
1784 * draw.c (gstring_width): New arg lbearing.
1785 (render_glyph_string): Adjusted for the change of gstring_width.
1786 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1788 * m17n-core.h (Mlanguage): Extern it.
1790 * m17n.h (Mlanguage): Extern deleted.
1792 * mtext.c (mtext__init): Initialize Mlanguage.
1793 (Mlanguage): Declaration moved from locale.c
1795 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1796 (Mlanguage): Declaration moved to mtext.c.
1798 * language.c (mlang__init): Don't initialize Mlanguage here.
1800 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1802 2006-07-14 Kenichi Handa <handa@m17n.org>
1804 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1805 (MRealizedFontFT): New member face_encapsulated.
1806 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1807 (ft_gen_font): New function.
1808 (ft_add_font): Use ft_gen_font.
1809 (ft_list_script): Store lists in ft_script_list.
1810 (ft_check_otf): New arg ft_face. Caller changed.
1811 (ft_check_language): Likewise.
1812 (ft_check_script): Likewise.
1813 (ft_encapsulate, ft_close): New functions.
1814 (mfont__ft_driver): Initialize members encapsulate and close.
1815 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1817 * font.h (struct MRealizedFont): New member encapsulating.
1818 (struct MFontDriver): New members encapsulate and close.
1820 * font.c (mfont__match_p): If FONT is realized, check capability
1821 by font drivers's check_capability method.
1822 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1825 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1826 declarations of foundry and fam local vars.
1827 (xft_driver): Make it static.
1829 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1830 (mfont_close): Extern them.
1832 * m17n-gd.c (device_open): Don't specify foundry and family of the
1835 2006-07-11 Kenichi Handa <handa@m17n.org>
1837 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1839 2006-07-13 Kenichi Handa <handa@m17n.org>
1841 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1843 (ft_check_script): Delete unused var.
1844 (ft_list_capability): Likewise.
1846 * font.c (mfont__get_capability): Setup cap->otf.
1847 (Motf): Make it global.
1848 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1850 * font.h (MFontCapability): New member otf.
1852 * language.c (mlang__fini): Delete unused vars.
1854 * m17n-gui.h (Motf): Extern it.
1856 * database.c (update_database_list): Delete unused vars.
1858 2006-07-07 Kenichi Handa <handa@m17n.org>
1860 * font-ft.c (DEVICE_DELTA): Fix typo.
1862 2006-07-06 Kenichi Handa <handa@m17n.org>
1864 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1867 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1869 * database.c: Update comments.
1871 2006-07-05 Kenichi Handa <handa@m17n.org>
1873 * database.c (PATH_MAX): Define it if not yet defined.
1874 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1876 (get_database_filename): Use GEN_PATH.
1877 (get_dir_info): Don't include the last '/' in directory name.
1878 (register_database): New function.
1879 (update_database_list): Use register_database. Search all
1880 directories in mdatabase__dir_list for wildcard databases.
1881 (mdatabase__init): Check "~/.m17n.d".
1883 2006-07-03 Kenichi Handa <handa@m17n.org>
1885 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1886 push reverse property.
1888 * plist.c (dump_plist_element): Fix previous change.
1890 2006-06-28 Kenichi Handa <handa@m17n.org>
1892 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1895 * draw.c (MbidiNSM): New variable.
1896 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1897 attention to bidi type NSM.
1898 (mdraw__init): Initialize MbibiNSM.
1900 * language.c (mscript__char_list): Fix finding a char-list element.
1902 * plist.c (dump_string): Return number of printed characters.
1903 (dump_plist_element): Print elements more compactly.
1905 2006-06-23 Kenichi Handa <handa@m17n.org>
1907 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1908 (include_HEADERS): Likewise.
1910 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1912 * language.c: Update documentation.
1914 2006-06-23 Kenichi Handa <handa@m17n.org>
1916 * font-ft.c (struct MFontFT): Delete member lang.
1917 (free_ft_info): Don't unref member lang. Destroy members langset
1919 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1920 changed. Set members langset and charset.
1921 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1923 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1925 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1926 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1927 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1928 characters at first. If it fails, try listing by language names.
1929 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1930 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1931 change of MFontCapability.
1932 (ft_list_capability): Likewise. Try listing by languages, then by
1933 scripts. Check OTF at last.
1934 (ft_check_script): New function.
1935 (ft_select): Adjusted for the check of MFontCapability.
1936 (ft_list_family_names): New function.
1937 (ft_check_capability): If cap->script is not Mnil, call
1939 (mfont__ft_driver): Initialize with ft_list_family_names.
1941 * font.h (struct MFontDriver): New member list_fmaily_names.
1942 (struct): Change member "MSymbol *lang" to "MSymbol language".
1944 * font.c: Include "language.h".
1945 (Motf): New variable.
1946 (otf_script_list, load_otf_script_list): Delete it.
1947 (find_script_from_otf_tag): Delete it.
1948 (merge_capability): New function.
1949 (mfont__init): Init Motf.
1950 (mfont__fini): Don't unref otf_script_list.
1951 (free_font_capability): Check cap->script_tag to determine if
1952 OTF-related capability is set.
1953 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1954 the change of type MFontCapability.
1955 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1956 and Motf properties.
1957 (mfont_list): Call merge_capability for LANGUAGE arg.
1958 (mfont_list_family_names): New function.
1960 * input-gui.c: Typo in comments fixed.
1962 * input.c: Typo in comments fixed.
1964 * language.h (mlanguage__list): Delete it.
1965 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1968 * language.c: Include "mtext.h".
1969 (M_script_lang_list): Delete it.
1970 (language_list, script_list): New variables.
1971 (load_lang_script_list, init_language_list, init_script_list): New
1973 (mlang__init): Don't load language database here.
1974 (mlang__fini): Unref language_list and script_list if not NULL.
1975 (mlanguage__list): Delete it.
1976 (mlanguage__info, mscript__info, mscript__char_list)
1977 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1978 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1979 (mscript_list, mscript_language_list): New functions.
1981 * m17n-gui.h (mfont_list_family_names): Extern it.
1983 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1984 (mlanguage_text, mscript_list, mscript_language_list): Extern
1987 2006-06-21 Kenichi Handa <handa@m17n.org>
1989 * m17n-X.c (xfont_driver): Initialize with
1990 xfont_list_family_names.
1991 (xfont_list_family_names): New function.
1992 (xft_driver): Initialize with NULL for list_family_names member.
1993 (device_init): Set list_family_names member of xft_driver to that
1994 of mfont__ft_driver.
1996 2006-06-06 Kenichi Handa <handa@m17n.org>
1998 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
2000 2006-03-24 Kenichi Handa <handa@m17n.org>
2002 * font-ft.c (ft_open): Improve debug message.
2004 * fontset.c (mfontset__get_font): Fix for the case that no font in
2005 per_script list is available.
2007 2006-02-06 Kenichi Handa <handa@m17n.org>
2009 * Version 1.3.3 released.
2011 2006-02-22 Kenichi Handa <handa@m17n.org>
2013 * textprop.c: Fix some typos in documentation.
2015 * plist.c: Fix some typos in documentation.
2017 * m17n-core.h: Fix some typos in documentation.
2018 (M17NLIB_PATCH_LEVEL): Updated to 3.
2019 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
2021 * symbol.c: Fix some typos in documentation.
2023 * mtext.c: Fix some typos in documentation.
2025 * input.c: Fix several typos in documentation.
2027 2006-02-06 Kenichi Handa <handa@m17n.org>
2029 * Version 1.3.2 released.
2031 2006-02-03 Kenichi Handa <handa@m17n.org>
2033 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
2034 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
2036 * font.c (xlfd_parse_name): Fix handling of the name "nil".
2038 * draw.c (layout_glyphs): Fix handling left_padding of
2041 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
2043 2006-02-02 Kenichi Handa <handa@m17n.org>
2045 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
2046 if WITH_GUI is true.
2048 2006-01-25 Kenichi Handa <handa@m17n.org>
2050 * input.c (resolve_expression): If the value of PLIST is a plist,
2051 but the first element is not symbol, return 0.
2053 2006-01-17 Kenichi Handa <handa@m17n.org>
2055 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
2056 HAVE_GD is 2 or the greater.
2058 2006-01-16 Kenichi Handa <handa@m17n.org>
2060 * Version 1.3.1 released.
2062 2006-01-16 Kenichi Handa <handa@m17n.org>
2064 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
2065 simulating anti-aliasing.
2067 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
2068 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
2070 2006-01-12 Kenichi Handa <handa@m17n.org>
2072 * input.c (get_surrounding_text): Always pop ic->plist.
2073 (reset_ic): Don't reset ic->plist.
2075 2006-01-10 Kenichi Handa <handa@m17n.org>
2077 * input.c (preedit_commit): For debugging, print only commiting
2078 charactes. Don't set ic->candidate_show to 0.
2079 (handle_key): Don't run branch-actions just by shifting to the
2081 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
2082 Reset vars and plist.
2084 2006-01-07 Kenichi Handa <handa@m17n.org>
2086 * input.c (load_branch): Confirm that maps is not NULL.
2088 2006-01-05 Kenichi Handa <handa@m17n.org>
2090 * input-gui.c (win_filter): Try to convert arg to key only when
2093 * plist.c (read_integer_element): If '#' and '-' are followed by
2094 non-integer-constituent, read them as a part of a symbol.
2095 (read_symbol_element): New arg C.
2096 (read_element): Adjust args to read_symbol_element.
2098 * input.c (load_macros): On overwriting a macro, free the old
2100 (minput__init): Store Mmap in load_im_info_keys.
2101 (minput_get_title_icon): If the input method has no title, be sure
2103 (minput_get_description): If the input method has no description,
2104 be sure to return NULL.
2105 (minput_get_variables): Fix documentation.
2106 (handle_key): Pay attention to the case that key is Mnil.
2107 (filter): Likewise. Fix handling of such symbol as S-A.
2109 2005-12-22 Kenichi Handa <handa@m17n.org>
2111 * Version 1.3.0 released.
2113 2005-12-22 Kenichi Handa <handa@m17n.org>
2115 * font-ft.c (ft_list): If the specified font has no property,
2118 2005-12-20 Kenichi Handa <handa@m17n.org>
2120 * character.c (mchar_get_prop): Check char_prop_list.
2121 (mchar_put_prop, mchar_get_prop_table): Likewise.
2123 2005-12-18 Kenichi Handa <handa@m17n.org>
2125 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
2126 file name sans language.
2128 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
2130 * input.c: Fix typo in comments.
2132 2005-12-14 Kenichi Handa <handa@m17n.org>
2134 * input.c (minput_get_title_icon): Check the default icon for the
2137 2005-12-13 Kenichi Handa <handa@m17n.org>
2139 * input.c (Mless_equal, Mgreater_equal): New variables.
2140 (parse_expression, resolve_expression, parse_action_list)
2141 (take_action_list): Handle the aboves.
2142 (filter): Treat key S-X as X.
2143 (minput__init): Initialize Mless_equal and Mgreater_equal.
2144 (minput_get_title_icon): New function.
2146 * m17n.h (minput_get_title_icon): Extern it.
2148 * database.c (get_database_filename): Return a filename instead of
2150 (load_database): Adjusted for the above change.
2151 (mdatabase__load_for_keys): Likewise.
2152 (mdatabase__find_file): New function.
2154 * database.h (mdatabase__find_file): Extern it.
2156 * font.h (mfont__resize): Delete extern.
2158 * font.c (mfont__list): Check resize ratio.
2159 (mfont__resize): Delete it.
2160 (mfont_resize_ratio): Include the code of mfont__resize.
2162 * font-ft.c (ft_open): Check resize ratio.
2164 * m17n-X.c (xfont_open): Check resize ratio.
2165 (xft_open): Likewise.
2167 2005-12-07 Kenichi Handa <handa@m17n.org>
2169 * input.c (take_action_list): If take_action_list return -1,
2171 (handle_key): Likewise.
2173 * face.c (mface__for_chars): When font is specified and layouter
2174 is found for it, if the layouter doesn't support one of a
2175 character, use a face sans layouter for it.
2177 2005-12-06 Kenichi Handa <handa@m17n.org>
2179 * fontset.c (mfont__lookup_fontset): If only a fallback font is
2180 found, don't use it for more than one character.
2182 2005-12-05 Kenichi Handa <handa@m17n.org>
2184 * face.c (mface__realize): Set rfont->layouter to Mnil.
2185 (mface__for_chars): Fix handling of layouter.
2187 * character.h (mchar__define_prop): Extern it.
2189 * database.c (update_database_list): Call mchar__define_prop if
2192 * character.c (mchar__init): Don't call mchar_define_property.
2193 Instead just initialize property keys.
2194 (mchar__fini): Free char_prop_list only if it's not NULL.
2195 (mchar__define_prop): New function.
2196 (mchar_define_property): Call mchar__define_prop.
2198 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
2201 2005-12-02 Kenichi Handa <handa@m17n.org>
2203 * language.c (mlang__init): Handle extra chars.
2205 * m17n-gui.h (mfont_check): Adjust prototype.
2207 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
2208 (xfont_check_capability): New function.
2209 (xft_driver): Specify xft_check_capability.
2210 (xft_check_capability): New function.
2212 * font-ft.c (M0_3): Delete it.
2214 (ft_get_charmaps): Refer to M0.
2215 (fc_parse_pattern): Fix previous change.
2216 (ft_list_language): Check also extra chars.
2217 (ft_check_otf): Define it even if HAVE_OTF is undef.
2218 (ft_check_lang): Check the result of FcLangSetHasLang against
2219 FcLangDifferentLang. Check also extra chars.
2220 (ft_list_capability): Delete ifdef HAVE_OTF.
2221 (ft_select): Likewise.
2222 (ft_open): Improve debug information.
2223 (ft_check_capability): New function.
2224 (mfont__ft_driver): Specify ft_check_capability.
2225 (mfont__ft_init): Initialize M0.
2227 * fontset.c (get_font_from_group): New function.
2228 (mfontset__get_font): New function.
2230 * fontset.h (mfontset__get_font): Extern it.
2232 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
2233 (mfont__fini): Delete ifdef HAVE_OTF.
2234 (free_font_capability): Likewise.
2235 (mfont__get_capability): Likewise.
2236 (mfont__check_capability): New function.
2237 (mfont_check): Change the order of arguments. Use
2240 * font.h (struct MFontDriver): New member check_capability.
2241 (MFontCapability): Delete ifdef HAVE_OTF.
2242 (mfont__check_capability): Extern it.
2244 * face.c (mface__realize): Fix handling of FONT arg.
2245 (mface__for_chars): Fix handling of explicitly specified font.
2247 2005-11-25 Kenichi Handa <handa@m17n.org>
2249 * font-flt.c (run_command): Print debug info for
2252 * draw.c (layout_glyphs): Fix handling of left/right_padding.
2254 * face.c (mface__for_chars): Check rfont before accessing the
2257 2005-11-21 Kenichi Handa <handa@m17n.org>
2259 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
2262 * fontset.c (fontset_table): New variable.
2263 (free_fontset): Call M17N_OBJECT_UNREGISTER.
2264 (mfont__fontset_init): Add fontset_table as an object array.
2265 (mfont__realize_fontset): Ref FONTSET.
2266 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2267 (mfontset): Call M17N_OBJECT_REGISTER.
2268 (mfontset_copy): Likewise.
2270 * input.c (handle_key): For debugging, print information about
2272 (filter): Add an alias for Meta and Alt modifiers.
2273 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2275 (minput__init): Initialize them.
2276 (parse_expression): New function.
2277 (resolve_expression): New function.
2278 (parse_action_list): Handle expressions by parse_expression.
2279 (take_action_list): Handle expressions by resolve_expression.
2280 (parse_nested_list_value): Fix previous change.
2281 (resolve_command): Fix handling of the return value of
2284 2005-11-18 Kenichi Handa <handa@m17n.org>
2286 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2287 HAVE_OTF is defined.
2288 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2290 (ft_select): Likewise.
2292 * font.c (mfont_list): Fix for the case that FONT is NULL.
2293 (OTF_tag): Delete it.
2294 (load_otf_script_list): Define only when HAVE_OTF is defined.
2295 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2298 * draw.c (truncate_gstring): Be sure to truncate at
2299 glapheme-cluster boundary.
2301 2005-11-11 Kenichi Handa <handa@m17n.org>
2303 * input.c (delete_surrounding_text): Clear cache if necessary.
2305 2005-11-09 Kenichi Handa <handa@m17n.org>
2307 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2308 glyph prev is also supported by the current flt.
2310 2005-11-08 Kenichi Handa <handa@m17n.org>
2312 * m17n-X.c (xft_render): Cancel previous change.
2314 2005-11-07 Kenichi Handa <handa@m17n.org>
2316 * input.c: Include <stdlib.h>.
2317 (get_surrounding_text, delete_surrounding_text)
2318 (get_preceding_char, get_following_char): New functions.
2319 (integer_value): New arg surrounding. If it is nonzero, try to
2320 get a surrounding character. Callers changed.
2321 (take_action_list): Check `value' before setting an element.
2322 (destroy_ic): Unref ic_info->preceding_text and
2323 ic_info->following_text.
2324 (minput__init): Initialize Minput_get_surrounding_text and
2325 Minput_delete_surrounding_text.
2326 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2328 (filter): Unref ic_info->preceding_text and
2329 ic_info->following_text.
2331 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2334 * input.h (MInputContextInfo): New members preceding_text and
2337 2005-11-04 Kenichi Handa <handa@m17n.org>
2339 * input.c (parse_nested_list_value): Fix handling of the global
2341 (get_nested_list): Get global definitions by load_partial_im_info.
2342 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2343 MInputCandidatesChanged.
2344 (take_action_list): Likewise.
2345 (reset_ic): Likewise.
2346 (create_ic): Don't pay special attention to
2347 Mcandidates_group_size.
2348 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2349 (minput_set_variable): Get a definition of varible by
2350 mplist_find_by_value, not mplist_get.
2352 * m17n.h (enum MInputCandidatesChanged): New enum.
2354 2005-11-01 Kenichi Handa <handa@m17n.org>
2356 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2358 (mwin__destroy_window): If xft_draw's drawable is win, change it
2359 to device->drawable before destroying win.
2361 2005-10-31 Kenichi Handa <handa@m17n.org>
2363 * input.c (load_im_info): Fix adding of state.
2365 * m17n-core.c (m17n_fini_core): Fix reporting of module
2368 * m17n.c (m17n_fini): Fix reporting of module finalization.
2370 * m17n-gui.c (m17n_init_win): Fix reporting of module
2373 2005-10-29 Kenichi Handa <handa@m17n.org>
2375 * input.c (get_candidate_list): Fix the timing of referring plist.
2377 2005-10-28 Kenichi Handa <handa@m17n.org>
2379 * input.c (load_branch): Ignore an undefined map name.
2380 (load_im_info): Set im_info->title from `name' only if it's not
2382 (shift_state): Always update ic->status.
2383 (adjust_candidates): Renamed from adjust_candidate_command.
2384 Argument changed. Caller changed.
2385 (get_candidate_list, regularize_action): New functions.
2386 (take_action_list): Use them. On handling Munhandle, don't set
2388 (handle_key): If KEY is not handled by MAP, and MAP has
2389 branch_actions, perform them.
2391 * database.c (mdatabase__fini): Free dir_info->filename;
2393 2005-10-20 Kenichi Handa <handa@m17n.org>
2395 * input.c (marker_code): Accept '@@'.
2396 (integer_value): Handle '@@'.
2397 (parse_action_list): Accept a symbol argument.
2398 (take_action_list): Resolve the symbol argument. Handle the
2401 2005-10-18 Kenichi Handa <handa@m17n.org>
2403 * input.c: Include "charset.h".
2404 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2406 (MIMState): New member (M17NObject control).
2407 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2408 (get_nested_list, resolve_variable): New functions.
2409 (integer_value): New arg (MPlist **value). Set it to the plist
2410 element containing the value.
2411 (resolve_command): New function.
2412 (load_translation): New arg (MPlist *map_actions).
2413 (load_branch): New args language and name. If `keylist' is a
2414 symbol, resolved that as a command name.
2415 (free_map): New arg top. Free map->map_actions only if top is
2417 (free_state): New function.
2418 (load_state): New arg name.
2419 (im_info_list): New variable.
2420 (free_im_info, get_im_info_by_tags): New functions.
2421 (load_im_info): Arg key changed to plist. Handle `include'.
2422 Return (MInputMethodInfo *).
2423 (preedit_commit): Ref ic->candidate_list.
2424 (get_select_charset, adjust_candidate_command): New functions.
2425 (take_action_list): Handle `include'. Adjust candidate action
2426 properly. Handle control variables `candidates-charset' and
2427 `candidates-group-size'.
2428 (open_im): Use get_im_info.
2429 (create_ic): Get global variables.
2430 (load_partial_im_info): New function.
2431 (get_im_info): New function.
2432 (check_command_keyseq, check_command_list, check_variable_list):
2434 (minput__init): Don't handle M_database_hook and Mdetail_text.
2435 Initialize M_candidates, Mcandidates_group_size,
2436 Mcandidates_charset.
2437 (parse_variable_list, get_variable_list, parse_command_list)
2438 (get_command_list): Delete them.
2439 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2440 (minput__fini): Simply unref command_list and variable_list.
2441 (minput_get_description): Adjusted for the new form of description.
2442 (minput_get_commands): Use get_nested_list.
2443 (minput_assign_command_keys): Likewise.
2444 (minput_get_variables, minput_set_variable): Likewise.
2446 * input.h (MInputMethodInfo): New members im and maps.
2448 * database.h (M_database_hook): Delete extern.
2449 (MDatabaseHookFunc): Delete extern.
2450 (mdatabase__check): Extern it.
2452 * database.c: Include <glob.h>.
2453 (MAX_TIME): New macro.
2454 (Masterisk): New variable.
2455 (get_database_stream): Argument changed to (MDatabaseInfo *).
2457 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2458 (find_database): New function.
2459 (update_database_list): New function.
2460 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2461 calling update_database_list.
2462 (mdatabase__check): New function.
2463 (mdatabase_find): Use update_database and find_database. Don't
2464 handle MDatabaseHookFunc.
2465 (mdatabase_list): Call update_database at first.
2466 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2467 (MDatabaseList): New type.
2469 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2471 * m17n.h (Mdetail_text): Delete extern.
2473 * m17n-core.h (mplist_conc): Delete extern.
2475 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2477 (mplist_conc): Renamed to mplist__conc.
2478 (mplist__pop_unref): New function.
2480 2005-10-14 Kenichi Handa <handa@m17n.org>
2482 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2484 (read_element): If keys is an empty plist, return any element
2486 (dump_plist_element): Check if plist is nested.
2487 (mplist_conc): Always ref tail.
2488 (mplist_set): If key is a managing key, ref val in advance.
2490 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2491 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2492 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2495 * fontset.c (free_fontset): Unref fontset_list if necessary.
2496 (mfont__fontset_fini): Don't free fontset_list. Unref
2498 (mfont__realize_fontset): Initialize request.
2499 (mfontset): Ref default_fontset or fontset only if necessary.
2500 (mfontset_copy): Don't ref copy.
2502 * draw.c (render_glyphs): Check gend->type before checking
2505 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2506 unrefed plists to NULL.
2508 2005-10-04 Kenichi Handa <handa@m17n.org>
2510 * textprop.c (mtext_serialize): Be sure to make mt
2511 MTEXT_FORMAT_UTF_8 and NULL terminated.
2513 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2515 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2517 2005-10-03 Kenichi Handa <handa@m17n.org>
2519 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2520 is not at the beginning of line.
2522 2005-09-22 Kenichi Handa <handa@m17n.org>
2524 * input.c: Include <sys/stat.h> and <unistd.h>.
2525 (Minclude, Mcommit, Munhandle): New variables.
2526 (minput__init): Initialize them. Push only Mstate to
2527 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2528 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2530 (load_input_method): Handle "include" directive. If no states are
2532 (shift_state): If state_name is Mt, shift back to the previous
2533 state. Call preedit_commit to commit preedit text.
2534 (preedit_commit): New function.
2535 (take_action_list): Improve debug printing. Handle commit and
2537 (handle_key): Check the return value of take_action_list. Don't
2538 take branch_actions just after changing to the root map.
2539 (reset_ic): Reset all ic_info members.
2540 (filter): When a key is not handled, just move ic_info->keys
2541 instead fo calling reset_ic.
2542 (load_im_info): If key is not Mstate, push Mmap to
2544 (MDatabaseStatList): New type.
2545 (imdir_stat_list): New variable.
2546 (input_method_hook): Don't cancel the hook. Check the
2547 modification time of directories.
2548 (minput__fini): Free imdir_stat_list;
2550 * input.h (MInputContextInfo): New member prev_state.
2552 * m17n-core.h (mplist_conc): Extern it.
2554 * plist.c (mplist_conc): New function.
2556 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2558 * font.h (MRealizedFont): New member average_width.
2560 * font-ft.c (ft_open): Set rface->average_width.
2562 * font.c (xlfd_unparse_name): Print '*' before registry name.
2564 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2565 (xfont_open): Set rfont->average_width.
2566 (xft_open): Likewise.
2567 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2569 * internal-gui.h (struct MFrame): New member average_width.
2571 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2572 (mframe_get_prop): Return the average_width of a font.
2574 * face.c (mface__realize): Set rface->average_width.
2575 (mface__update_frame_face): Set frame->average_width.
2577 * face.h (MRealizedFace): New member average_width.
2579 2005-09-19 Kenichi Handa <handa@m17n.org>
2581 * font.c (xlfd_unparse_name): New arg full_xlfd.
2582 (mfont__encode_char): Use shortcut only for X core fonts.
2583 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2584 (mfont_put_prop): Handle `language' property.
2585 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2586 Print file can capability info too.
2588 * m17n-core.c (mdebug__output): New variable.
2589 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2590 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2591 (m17n_fini_core): Close mdebug__output if it's not stderr.
2593 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2594 (xfont_open): Handle baseline_offset.
2595 (xfont_find_metric): Likewise.
2596 (xfont_render): Likewise.
2597 (xft_open): Likewise.
2598 (xft_render): Likewise.
2600 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2601 (mdebug__output): Extern it.
2602 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2603 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2604 (MDEBUG_DUMP): New macro.
2605 (MDEBUG_PRINT_TIME): Print to medebug__output.
2607 * font.h (MRealizedFont): New member baseline_offset.
2609 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2611 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2612 (ft_list_family): Check alias.
2613 (ft_list_language): If language is "en", don't try to the second
2615 (ft_default_list): New variable.
2616 (ft_list_default): New function.
2617 (ft_select): If family is not specified, try only the default
2618 fonts. Treat the weights normal and medium same.
2619 (ft_open): Fix debug message. If registry is not specified, try
2620 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2621 (ft_find_metric): Likewise.
2622 (ft_render): Likewise.
2623 (ft_list): Fix debug message. Accept the registring iso8859-1.
2624 If family is not specified, try only the default fonts.
2626 * face.c (mface__realize): Fix logic of opening a font.
2628 2005-09-16 Kenichi Handa <handa@m17n.org>
2630 * face.c (mface__realize):
2632 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2635 * input.c (shift_state): Fix the condition of taking init actions.
2636 (take_action_list): Fix handling of pushback action.
2637 (handle_key): Don't change key while checking its alias.
2638 (minput__init): Initialize new variables.
2639 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2642 2005-09-12 Kenichi Handa <handa@m17n.org>
2644 * mtext.c (mtext__uppercase): Add proper open/close parens.
2645 (mtext_titlecase): Add proper casting.
2647 * input.c (parse_action_list): Handle the case that the arg is a
2648 key sequence (MText or MPlist).
2649 (take_action_list): Likewise.
2650 (shift_state): Shorter debug message.
2651 (handle_key): Terminate a debug message by "\n".
2652 (reset_ic): Don't take initial actions here.
2653 (minput_open_im): Print a debug message.
2654 (minput_close_im): Likewise.
2655 (minput_create_ic): Likewise.
2656 (minput_destroy_ic): Likewise.
2658 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2660 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2663 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2664 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2667 * character.c: Add Japanese documentation for
2668 mchar_get_prop_table ().
2670 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2672 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2673 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2674 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2676 (init_case_conversion): New function.
2677 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2678 (uppercase_precheck, lowercase_precheck, final_sigma)
2679 (after_soft_dotted, more_above, before_dot, after_i)
2680 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2682 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2684 * plist.c (read_mtext_element): Fix previous change.
2686 2005-09-05 Kenichi Handa <handa@m17n.org>
2688 * plist.c (read_mtext_element): Handle \uXXXX notation.
2690 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2691 (MTABLE_ALLOCA): Change the name of local variable.
2693 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2694 HAVE_FREETYPE are defined.
2696 * m17n-X.c: Check HAVE_X11.
2698 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2699 directory listing libraries.
2700 (noinst_PROGRAMS): Define it only in maintainer mode.
2702 2005-09-02 Kenichi Handa <handa@m17n.org>
2704 * m17n-gui.h (mdraw_line_break_option): Extern it.
2706 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2707 end of the first glyph.
2708 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2710 (mdraw_line_break_option): New variable.
2711 (mdraw_default_line_break): Use mtext_line_break.
2713 * mtext.h (wordseg_func_table): Don't extern it.
2714 (mtext__wseg_fini): Extern it.
2716 * mtext.c: Don't include word-thai.h.
2717 (wordseg_func_table): Delete this variable.
2718 (mtext__init): Don't initialize above. Don't call
2719 mtext__word_thai_init.
2720 (mtext__fini): Don't free wordseg_func_table. Call
2721 mtext__wseg_fini instead fo mtext__word_thai_fini.
2722 (MTextWordsegFunc): Don't typedef it.
2723 (mtext__word_segment): Moved to mtext-wseg.c.
2725 * m17n-core.h (enum MTextLineBreakOption): New enum.
2726 (mtext_line_break): Extern it.
2728 * mtext-wseg.c: New file.
2730 * mtext-lbrk.c: New file.
2732 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2733 add mtext-lbrk.c and mtext-wseg.c.
2735 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2736 the case that head is NULL.
2738 2005-09-01 Kenichi Handa <handa@m17n.org>
2740 * word-thai.c (wordseg_propertize): If the property value is nil,
2741 don't make the property no-merge.
2742 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2743 attention to the case that they are NULL.
2744 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2747 * character.c (mchar_get_prop_table): New function.
2749 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2751 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2752 (mchar_get_prop_table): Extern it.
2754 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2755 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2757 * internal.h (enum MTextCoverage): New enum.
2758 (MText): New member coverage.
2760 * mtext.c (FORMAT_COVERAGE): New macro.
2761 (insert): Copy mt2->coverage.
2762 (mtext__from_data): Initialize mt->coverage.
2763 (mtext__adjust_format): Update mt->coverage.
2764 (mtext): Initialize mt->coverage.
2765 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2766 Update mt->coverage if necessary.
2767 (mtext_duplicate): Copy mt->coverage.
2768 (mtext_insert, mtext_replace): New functions.
2769 (mtext_dup): Use mtext_duplicate.
2770 (mtext__word_segment): Don't set *from and *to if a word
2771 segmentation funcion is not found.
2772 (mtext_ins_char): Fix typo.
2774 2005-08-25 Kenichi Handa <handa@m17n.org>
2776 * font.h (MFont): New member for_full_width.
2778 * font.c (compare_font_score): Prefer a font of not
2781 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2782 registry charset of a font is one of CJK charsets.
2784 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2785 supports some of CJK.
2787 2005-08-24 Kenichi Handa <handa@m17n.org>
2789 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2791 * m17n-gui.c (null_device_open): Check Mresolution param and set
2794 * m17n-gd.c (device_open): Check Mresolution param and set
2797 * m17n-X.c (MWDevice): New member resy.
2798 (xfont_open): Set ascent, descent, and max_advance members of
2800 (xft_open): Likewise.
2801 (device_open): Compare also screen_num to find a device. Set
2802 device->resy and frame->dpi.
2804 * internal-gui.h (MFrame): New member dpi.
2806 * font.h (MRealizedFont): New member max_advance.
2808 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2809 (mfont__init): Don't initialize Mascent, Mdescent.
2810 (Mascent, Mdescent): Delete these variables.
2811 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2812 Mfont_descent instead of Mascent and Mdescent.
2813 (mfont_put_prop): Allow negative size.
2814 (mfont_find): Handle the case of spec->size < 0. Fix previous
2816 (mfont_list): Handle the case of spec->size < 0.
2817 (mfont_check): Likewise.
2819 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2820 (fc_get_pattern): Handle the case of font->size < 0.
2821 (ft_open): Set ascent, descent, and max_advance members of rfont.
2822 (ft_find_metric): Improve rounding.
2823 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2826 * face.c (mface__realize): Handle the case of font->size < 0.
2828 2005-08-22 Kenichi Handa <handa@m17n.org>
2830 * coding.c (MConverterStatus): Change the member buf to union.
2831 (mconv_buffer_converter): Add const to the arg buf.
2832 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2833 (mconv_decode): Adjusted for the change of MConverterStatus.
2834 (mconv_encode_range): Likewise.
2836 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2837 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2839 2005-08-20 Kenichi Handa <handa@m17n.org>
2841 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2842 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2844 * m17n-X.c (xfont_open): Set members ascent, descent, and
2845 max_advance of rfont.
2846 (xft_open): Likewise.
2848 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2850 (mfont__ft_parse_name): Add const to the arg name.
2852 * font.c (xlfd_parse_name): Add const to the arg name. Call
2853 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2854 (xlfd_unparse_name): Handle spacing.
2855 (mfont__init): Initialize new variables.
2856 (mfont__id): Handle spacing.
2857 (mfont__merge): Likewise.
2858 (mfont__set_spec): This function deleted.
2859 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2860 condition of calling mfont__ft_parse_name.
2861 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2862 (mfont_get_prop): Handle properties spacing, ascent, descent,
2864 (mfont_find): Return a realized font.
2865 (mfont_from_name): Add const to the arg name.
2867 * font.h (enum MFontProperty): New member MFONT_SPACING.
2868 (enum MFontSpacing): New enum.
2869 (MFont): New members spacing and max_advance.
2870 (mfont__ft_parse_name): Prototype adjusted.
2871 (mfont__set_spec): Extern deleted.
2872 (mfont__parse_name_into_font): Prototype adjusted.
2874 2005-08-19 Kenichi Handa <handa@m17n.org>
2876 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2878 * font.c (mfont_list): If FONT is null, use a temporary font.
2879 (mfont_parse_name): Add const to the arg name.
2881 2005-08-18 Kenichi Handa <handa@m17n.org>
2883 * word-thai.c: Surround code by #ifdef and #endif to escape from
2886 * font-ft.c: Mostly re-written.
2888 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2889 (FontLayoutCmd): Type of the member otf changed..
2890 (load_otf_command): Adjusted for the format change of otf command.
2891 (load_command): Likewise.
2892 (free_flt_command): Unref cmd->body.otf.
2893 (run_otf): Ajusted for the type change of otf_cmd.
2894 (run_command): Ajusted for the type change of otf_cmd. On
2895 debugging, print ctx->combining_code.
2896 (mfont__flt_run): Initialize ctx's members code_offset,
2897 combining_code, and left_padding to 0.
2899 * face.h (struct MRealizedFace): New member font.
2900 (mface__realize): Prototype adjusted.
2902 * face.c (find_realized_face): New arg font.
2903 (find_realized_face): Adjusted for the change of MFont.
2904 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2905 (mface__fini): Don't call mdebug__report_object.
2906 (mface__realize): New arg font.
2907 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2908 Optimize the latin case.
2909 (mface__free_realized): Free rface->font.
2910 (mface__update_frame_face): Adjusted for the change of mface__realize.
2911 (mface_equal): New function.
2913 * draw.c (Mcommon): New variable.
2914 (visual_order): Args to mfont__encode_char changed.
2915 (compose_glyph_string): Handle Mfont text property.
2916 (layout_glyphs): Adjusted for the change of MFont.
2917 (mdraw__init): Initialize Mcommon.
2918 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2920 * font.h (enum MFontType): Members completely changed.
2921 (enum MFontProperty): Move MFONT_SIZE to the tail.
2922 (enum MFontSource): New enum.
2923 (struct MFont): New members type, source, sizes, file, capability,
2925 (struct MRealizedFont): Type of member font changed. Members
2926 score, status, and encoding deleted.
2927 (MFontScore): New type.
2928 (MFontList): Member changed.
2929 (struct MFontDriver): New member has_char. Types of members
2931 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2932 (Mapple_roman): Extern them.
2933 (OTF_Tag): Typedefed if not HAVE_OTF.
2934 (enum MFontOpenTypeTable): New enum.
2935 (MFontCapability): New type.
2936 (mfont__ft_drive_otf): Prototype adjusted.
2937 (mfont__score): Extern deleted.
2938 (mfont__merge): Extern it.
2939 (mfont__has_char): Extern it.
2940 (mfont__encode_char): Prototype adjusted.
2941 (mfont__open): Extern it.
2942 (mfont__set_spec): Prototype adjusted.
2943 (mfont__get_capability): Extern it.
2945 * font.c: Include "fontset.h".
2946 (M_font_capability, M_font_list, M_font_list_len): New variables.
2947 (font_score_priority): Change order of initial elements.
2948 (font_score_shift_bits): Fix array size.
2949 (common_weight): Add "thin", "semibold", and "heavy".
2950 (common_stretch): Add "ultracondensed", "extracondensed",
2951 "extraexpanded", and "utltraexpand".
2952 (font_weight_regular, font_weight_normal, font_weight_medium): New
2954 (gen_font_name): This function deleted.
2955 (find_encoding): Set font->encoding.
2956 (OTF_tag): New function.
2957 (otf_script_list): New variable.
2958 (load_otf_script_list): New function.
2959 (find_script_from_otf_tag): New function.
2960 (xlfd_parse_name): Set font->type and font->source.
2961 (mfont__free_realized): Free chains rfonts.
2962 (font_score): Renamed from mfont__score.
2963 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2964 (Mapple_roman): New variables.
2965 (mfont__init): Initilize new variables. Initalize
2966 default_encoding.encoding_name and
2967 default_encoding.encoding_charset to Municode_full and
2968 mcharset__unicode. Use SAFE* macros for allocating filepath
2970 (mfont__fini): Free otf_script_list.
2971 (mfont__id): New function.
2972 (mfont__match_p): Check also capability member of MFont.
2973 (mfont__merge): New funciton.
2974 (mfont__set_spec_from_face): Set type and source members.
2975 (mfont__set_spec_from_plist): Set capability and type members.
2976 (mfont__select): Argument changed.
2977 (mfont__available): New function.
2978 (compare_font_score): New function.
2979 (mfont__list): New function.
2980 (mfont__open): Return a realized font.
2981 (mfont__resize): Adjusted for the change of MFont.
2982 (mfont__has_char): New function.
2983 (mfont__encode_char): Argument changed.
2984 (mfont__set_spec): Argument changed.
2985 (free_font_capability): New function.
2986 (mfont__get_capability): New function.
2987 (MFontfile): New variable.
2988 (mfont_get_prop): Adjusted for the change of MFont.
2989 (mfont_put_prop): Likewise.
2990 (mfont_set_selection_priority): Fix the way of setting
2991 font_score_priority[].
2992 (mfont_find): Use mfont__list instead of mfont__select.
2993 (mfont_resize_ratio): Adjusted for the change of MFont.
2994 (mfont_list): Use mfont__list.
2995 (mfont_check): New function.
2996 (font_score): Make it static.
2998 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2999 (mfont__lookup_fontset): Likewise.
3001 * fontset.c (struct MFontset): Delete member font_spec_list.
3002 (struct MRealizedFontset): Type of member spec changed. New
3004 (load_font_group): Arg spec_list deleted.
3005 (load_fontset_contents): Adjusted for the change of fontset_def.
3006 (free_fontset): Fix the way of freeing fontset elements.
3007 (realize_fontset_elements): Argument changed.
3008 (get_per_script): New function.
3009 (free_realized_fontset_elements): Fix the way of feeing rfontset
3011 (update_fontset_elements): Fix args to realize_fontset_elements.
3012 (mfont__realize_fontset): New arg spec.
3013 (try_font_list): New function.
3014 (try_font_group): New arg request. Use try_font_list.
3015 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
3017 (mfontset): Adjusted for the change of MFontset.
3018 (mfontset_copy): Likewise. Don't share plists.
3019 (mfontset_modify_entry): Adjusted for the change of MFontset.
3020 (mfontset_lookup): Call get_per_script.
3021 (mdebug_dump_fontset): Print also the address of fonts.
3023 * input.c (shift_state): Don't reset ic_info->vars.
3024 (take_action_list): Call MDEBUG_PRINT fore calling
3027 * internal-gui.h (MFontDriver): Don't typedef it here.
3029 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
3030 (MXFont): This type deleted.
3032 (struct _MFontX): New struct.
3033 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
3034 (MDisplayInfo): Member base_font_list deleted.
3035 (DEFAULT_FONT): Definition changed.
3036 (FALLBACK_FONT): This maclr deleted.
3037 (free_display_info): Adjusted for the change of MDisplayInfo.
3038 (free_device): Argument to mfont__free_realized changed.
3039 (xfont_driver): Adjusted for the change of MFontDriver.
3040 (xfont_registry_list): Use MFontX instead of MXFont.
3041 (MRealizedFontX): Renamed from MXFontInfo.
3042 (xfont_select): Return the font found first.
3043 (close_xfont): Change MXFontInfo to MRealizedFontX.
3044 (xfont_open): Return the realized font.
3045 (xfont_find_metric): Get xfont from rfont->fontp.
3046 (xfont_has_char): New function.
3047 (xfont_encode_char): Adjusted for the argument change.
3048 (xfont_render): Get xfont from rfont->fontp.
3049 (xfont_list): Adjusted for the argument change.
3050 (MRealizedFontXft): Renamed from MXftFontInfo.
3051 (xft_driver): Ajusted for the change of MFontDriver.
3052 (close_xft): Change MXtfFontInfo to MRealizedFontXft
3053 (xft_open_font): Argument changed.
3054 (xft_open): Argument changed. Return the realized font.
3055 (xft_find_metric): Get xft_font from rfont->fontp.
3056 (xft_has_char, xft_encode_char): New functions.
3057 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
3058 font if not yet opened.
3059 (device_open): Don't set frame->font.
3061 * m17n-gd.c (gd_font_driver): Adjusted for the change of
3063 (gd_font_open): New function.
3064 (gd_render): Don't use the local variable ft_info.
3065 (device_init): Adjusted for the change of gd_font_driver.
3067 * textprop.c (mtext__prop_init): Initialize text_property_table.
3068 Call M17N_OBJECT_ADD_ARRAY.
3069 (mtext__prop_fini): Don't call mdebug__report_object.
3071 * plist.c (mplist__init): Initialize plist_table.
3072 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
3073 (mplist__fini): Don't call mdebug__report_object.
3075 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
3076 (mtext__fini): Don't call mdebug__report_object.
3077 (MTEXT_FORMAT_UTF_16): Correct type.
3078 (mtext_data): New function.
3079 (mtext_text): Fix calculation of limit and args to
3082 * language.c: Include "plist.h".
3083 (M_script_lang_list): New variable.
3084 (mlang__init): Read languages and their information from m17n
3086 (mlanguage__list): New function.
3087 (Miso639_1, Miso639_2): New variables.
3089 * language.h (mlanguage__list): Extern it.
3091 * database.c (get_database_stream): Use SAFE_* macros for
3092 allocating and freeing path.
3093 (mdatabase__init): Likewise.
3095 * symbol.c (msymbol__fini): Don't free symbols here.
3096 (msymbol__free_table): New function.
3097 (msymbol_is_managing_key): New function.
3099 * symbol.h (msymbol__free_table): Extern it.
3100 (msymbol__list): Extern it.
3102 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
3104 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
3105 (struct _M17NObjectArray): New member name and next.
3106 (mdebug__add_object_array): Extern it.
3107 (M17N_OBJECT_ADD_ARRAY): New macro.
3108 (mdebug__report_object): Don't extern it.
3110 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
3112 * m17n-gui.c (free_frame): Don't free frame->font.
3113 (null_device_fini): Fix code for freeing
3114 null_device.realized_font_list.
3115 (m17n_fini_win): Free interface.
3116 (mframe): Cast the return value of dlsym. Set frame->font here.
3117 (mframe_get_prop): Check frame->rface->rfont before accessing the
3120 * m17n-gui.h (Mfontfile): Extern it.
3121 (mfont_check): Extern it.
3122 (mface_equal): Extern it.
3124 * m17n-core.c: Include "symbol.h".
3125 (report_header_printed): This variable deleted.
3126 (object_array_root): New variable.
3127 (report_object_array): New function.
3128 (mdebug__report_object): This function deleted.
3129 (mdebug__add_object_array): New function.
3130 (m17n_init_core): Call mchartable_init () before mtext_init ().
3131 (m17n_fini_core): Call report_object_array (if necessary) and
3132 msymbol__free_atable at the end.
3134 * m17n-core.h (msymbol_is_managing_key): Extern it.
3135 (mtext_data): Extern it.
3136 (MTEXT_FORMAT_UTF_16): Correct type.
3137 (M17NLIB_MINOR_VERSION): Changed to 3.
3138 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
3140 * chartab.c (mchartable__init): Initalize chartable_table.count.
3141 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
3142 mdebug__report_object.
3144 2005-05-26 Kenichi Handa <handa@m17n.org>
3146 * m17n.h (Miso639_1, Miso639_2): Extern them.
3148 * symbol.h (msymbol__list): Extern it.
3150 * symbol.c (msymbol__list): New function.
3152 2005-05-19 Kenichi Handa <handa@m17n.org>
3154 * input-gui.c (minput__win_init): Don't change the value of
3157 2005-05-16 Kenichi Handa <handa@m17n.org>
3159 * m17n-core.c (m17n_object): Be sure to initialize all members.
3161 * font-ft.c (fc_decode_prop): Fix args to msymbol.
3163 2005-05-09 Kenichi Handa <handa@m17n.org>
3165 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
3167 2005-04-27 Kenichi Handa <handa@m17n.org>
3169 * language.c (mlang__init): Add "an" (Aragonese).
3171 * word-thai.c: Add support for libthai.
3172 (mtext__word_thai_init): Initialize wordseg library conditionaly.
3173 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
3175 * mtext.c: Include "word-thai.h" conditionaly.
3176 (mtext__init): Call mtext__word_thai_init conditionaly.
3177 (mtext__fini): Call mtext__word_thai_fini conditionaly.
3179 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
3180 not WORDCUT_LD_FLAGS.
3182 2005-04-19 Kenichi Handa <handa@m17n.org>
3184 * word-thai.c (wordseg_propertize): Always unref the attached
3186 (thai_wordseg): Don't unref the property.
3188 2005-04-18 Kenichi Handa <handa@m17n.org>
3190 * word-thai.c: Include stdlib.h.
3191 (wordseg_propertize): Add dummy function for the case that wordcut
3192 library doesn't exist.
3193 (wordseg_propertize): Fix for old wordcut library.
3195 2005-04-16 Kenichi Handa <handa@m17n.org>
3197 * word-thai.c: Include <stdio.h>.
3199 2005-04-15 Kenichi Handa <handa@m17n.org>
3201 * draw.c: Include mtext.h.
3202 (linebreak_table, M_break_at_space, M_break_at_word)
3203 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
3204 (compose_glyph_string): Check POS before getting Mface text
3206 (truncate_gstring): Give correct TO arg to line_break function.
3207 (GET_LB_TYPE): New macro.
3208 (find_break_backward, find_break_forward): New functions.
3209 (mdraw__init): Initialize the above new variables.
3210 (mdraw__fini): Free linebreak_table.
3211 (mdraw_default_line_break): Use find_break_backward and
3214 * word-thai.c: New file.
3216 * word-thai.h: New file.
3218 * mtext.c: Include word-thai.h.
3219 (wordseg_func_table): New variable.
3220 (mtext__init): Initialize wordseg_func_table and call
3221 mtext__word_thai_init.
3222 (mtext__fini): Call mtext__word_thai_fini, free
3224 (MTextWordsegFunc): New type.
3225 (mtext__word_segment): New function.
3227 * mtext.h (wordseg_func_table): Extern it.
3228 (mtext__word_segment): Extern it.
3230 * m17n.c (m17n_init): Fix typo (== -> =).
3232 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
3233 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
3235 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
3236 (MTEXTPROP_VAL): New macros.
3238 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
3240 2005-04-07 Kenichi Handa <handa@m17n.org>
3242 * database.c (load_chartable): Fix pursing of symbol name.
3244 2005-03-24 Kenichi Handa <handa@m17n.org>
3246 * m17n.c (m17n_init): Fix typo (== -> =).
3248 2005-03-11 Kenichi Handa <handa@m17n.org>
3250 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
3252 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
3254 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
3257 2005-03-09 handa <handa@m17n.org>
3259 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
3260 calling m17n_init ().
3262 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
3263 calling m17n_init_core ().
3265 2005-02-28 Kenichi Handa <handa@m17n.org>
3267 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3270 2005-02-17 Kenichi Handa <handa@m17n.org>
3272 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3273 (M_description, M_command, M_variable): New variables.
3274 (load_im_info_keys): New variables.
3275 (load_im_info, check_command_keyseq, get_description_advance)
3276 (parse_command_list, get_command_list, parse_variable_list)
3277 (get_variable_list, input_method_hook): New functions.
3278 (command_list, variable_list): New variables.
3279 (minput__init): Put input_method_hook to Minput_method.
3280 Initialize M_description, M_command, M_variable, Mdetail_text,
3281 load_im_info_keys, command_list, variable_list.
3282 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3283 (Mdetail_text): New variable.
3284 (minput_get_description, minput_get_commands)
3285 (minput_assign_command_keys, minput_get_variables)
3286 (minput_set_variable): New functions.
3288 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3289 (minput_assign_command_keys, minput_get_variables)
3290 (minput_set_variable): Extern them.
3292 * plist.c (UNGETC): Just decrement st->p.
3293 (read_mtext_element): New arg skip.
3294 (read_integer_element): Likewise.
3295 (read_symbol_element): Likewise.
3296 (read_element): New arg KEYS.
3297 (mplist__from_plist): Don't increment ref-count of NULL object.
3298 (mplist__from_file): New arg KEYS.
3299 (mplist_put): Don't increment ref-count of NULL object.
3300 (mplist_add): Likewise.
3301 (mplist_push): Likewise.
3302 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3304 * plist.h (mplist__from_file): Prototype adjusted.
3306 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3307 (get_database_stream): New function.
3308 (load_database): Use get_database_stream.
3309 (M_database_hook): New variable
3310 (mdatabase__init): Initialize M_database_hook.
3311 (mdatabase__load_for_keys): New function.
3312 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3314 (mdatabase_define): Free mdb->extra_info if necessary.
3316 * database.h (mdatabase__dir_list, M_database_hook)
3317 (mdatabase__load_for_keys): Extern them.
3318 (MDatabaseHookFunc): New type.
3320 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3322 2004-12-27 Kenichi Handa <handa@m17n.org>
3324 * Version 1.2.0 released.
3326 2004-12-27 Kenichi Handa <handa@m17n.org>
3328 * input.c (minput_filter): Don't reset ic->xxx_changed.
3330 * mtext.c (mtext_from_data): Fix documentation.
3332 2004-12-25 Kenichi Handa <handa@m17n.org>
3334 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3335 (M17NLIB_VERSION_NAME): Update to "1.2.".
3337 2004-12-24 Kenichi Handa <handa@m17n.org>
3339 * input.c (reset_ic): Set key_unhandled to 0.
3341 2004-12-21 Kenichi Handa <handa@m17n.org>
3343 * m17n-gui.h (mfont_from_spec): Delete extern.
3345 * input-gui.c (win_callback): Handle Minput_reset.
3346 (minput__win_init): Register reset_ic as a callback for
3349 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3350 changed. At first, shift to the initial state.
3351 (minput__init): Initialize Minput_reset. Register reset_ic as a
3352 callback for Minput_reset.
3353 (Minput_reset): New variable.
3354 (minput_filter): Always set ic->xxx_changed to 0.
3355 (minput_reset_ic): New function.
3356 (integer_value): Fix typo ('>' -> '<') and calculation of length
3359 * m17n-core.c (merror_code): Change type to `int'.
3361 * m17n-misc.h (merror_code): Adjust type.
3363 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3365 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3366 (mtext_change_prop): Delete extern.
3368 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3369 to `int'. Move the documents to m17n-core.h.
3371 2004-12-13 Kenichi Handa <handa@m17n.org>
3373 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3374 (MTextProperty): Document it.
3376 2004-12-09 Kenichi Handa <handa@m17n.org>
3378 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3380 2004-12-03 Kenichi Handa <handa@m17n.org>
3382 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3383 m17n__gui_initialized): New externs.
3385 * m17n-core.h (enum M17NStatus): New enum.
3386 (m17n_status): Extern it.
3388 * m17n-core.c (core_initialized): Delete this variable.
3389 (m17n__core_initialized, m17n__shell_initialized,
3390 m17n__gui_initialized): New variables.
3391 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3392 instead of core_initialized.
3393 (m17n_status): New function.
3395 * m17n.c (shell_initialized): Delete this variable.
3396 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3399 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3401 * m17n-gui.c (win_initialized): Delete this variable.
3402 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3403 instead of gui_initialized.
3405 2004-11-19 Kenichi Handa <handa@m17n.org>
3407 * input.c (reset_ic): Check if ic_info->state is NULL.
3408 (filter): If ic_info->state is NULL, return 0.
3409 (load_input_method): Don't unref `maps' it it's not created.
3411 2004-11-15 Kenichi Handa <handa@m17n.org>
3413 * input.c (find_candidates_group): If INDEX is -1, find the last
3415 (take_action_list): If the previous of the first candidate is
3416 requested, select the last candidate.
3418 2004-11-08 Kenichi Handa <handa@m17n.org>
3420 * m17n-X.c (device_open): Try at most 32 fonts to find a
3421 non-autoscaled font.
3423 * font.c (xlfd_parse_name): Fix previous change.
3425 2004-11-05 Kenichi Handa <handa@m17n.org>
3427 * font.c: (commont_style): Include dummy elements "slanted" and
3428 "rslanted" to prefer "o" to "r" if "i" is requested.
3430 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3432 2004-10-29 Kenichi Handa <handa@m17n.org>
3434 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3436 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3437 New members smallest and larger.
3438 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3439 (xfont_registry_list): Likewise.
3440 (xfont_select): Likewise.
3443 2004-10-28 Kenichi Handa <handa@m17n.org>
3445 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3446 font name comparison.
3447 (xfont_select): Fix logic for selecting a larger size font.
3449 2004-10-25 Kenichi Handa <handa@m17n.org>
3451 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3454 2004-10-22 Kenichi Handa <handa@m17n.org>
3456 * input.c (update_candidate): Renamed from udpate_candidate.
3457 (take_action_list): Show more debugging info on arithmetic commands.
3459 * m17n-X.c (device_open): Fix previous change.
3461 * draw.c (compose_glyph_string): Don't get face property at the
3464 2004-10-21 Kenichi Handa <handa@m17n.org>
3466 * draw.c (compose_glyph_string): Fix for the case of category
3469 2004-10-19 Kenichi Handa <handa@m17n.org>
3471 * input.c (mdebug_mask): New variable.
3472 (shift_state): Print debug information.
3473 (take_action_list): Likewise.
3474 (handle_key): Likewise.
3476 2004-10-14 Kenichi Handa <handa@m17n.org>
3478 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3480 2004-10-13 Kenichi Handa <handa@m17n.org>
3482 * m17n-X.c (device_open): Be sure to register at least one font
3485 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3486 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3488 2004-10-12 Kenichi Handa <handa@m17n.org>
3490 * draw.c (alloc_gstring): Fix previous change.
3492 * font-ft.c (ft_list_generic): Fix for the case of not
3495 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3497 * font.c (mfont_list): If no font is found, return NULL.
3498 (load_font_encoding_table): Put entries of nil registry first.
3499 (find_encoding): Adjust for the above change.
3501 2004-10-11 Kenichi Handa <handa@m17n.org>
3503 * m17n-gui.h (mfont_list): Adjust prototype.
3505 * m17n-X.c (xfont_list): New arg maxnum.
3507 * font.h (struct MFontDriver): Change prototype of <list>.
3509 * font-ft.c (fc_generic_family_list): Delete it.
3510 (Mserif, Msans_serif, Mmonospace): Delete them.
3511 (M_generic_family_info): New variable.
3512 (enum GenericFamilyType): New enum.
3513 (struct GenericFamilyInfo): New struct.
3514 (generic_family_table): New variable.
3515 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3517 (add_font_info): Get style here.
3518 (ft_list_family): Don't initialize fc_config here. Don't list
3520 (ft_list_generic): New function.
3521 (ft_select): Pay attention to generic familes here.
3522 (ft_open): Fix calculation of ascent and descent.
3523 (ft_list): Pay attention to generic families.
3524 (mfont__ft_init): Initialize M_generic_family_info,
3525 generic_family_table, and fc_config..
3526 (mfont__ft_fini): Finalize generic_family_table.
3528 * draw.c (compose_glyph_string): Use more constant font for
3529 glyphs. Adjust for the member change in MGlyph.
3530 (layout_glyph_string): Adjust for the member change in MGlyph.
3531 (alloc_gstring): Intilize scracth_glyph to avoid
3532 compose_glyph_string on it.
3533 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3534 (mdraw_coordinates_position): Fix previous change.
3536 * internal-gui.h (glyph_category): New enum.
3537 (MGlyph): Change type of <category> to enum glyph_category.
3539 * face.c (mface__realize): Delete args langauge and charset.
3540 (mface__for_chars): Fix for the case that glyphs have different
3542 (mface__update_frame_face): Adjust for mface__realize change.
3544 * face.h (mface__realize): Adjust prototype.
3546 2004-10-05 Kenichi Handa <handa@m17n.org>
3548 * language.c (mlang__init): Add Akan.
3550 2004-10-04 Kenichi Handa <handa@m17n.org>
3552 * font-ft.c (add_font_info): Add instead of push the element.
3553 (ft_list_family): For generic fonts, try all
3554 substituted. families.
3556 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3557 (run_rule): Don't update cluster range here.
3558 (run_command): Update cluster range on appending a glyph.
3559 (run_otf): Update cluster range for glyphs generated by OTF.
3561 2004-10-02 Kenichi Handa <handa@m17n.org>
3563 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3565 2004-09-30 Kenichi Handa <handa@m17n.org>
3567 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3569 2004-09-30 Kenichi Handa <handa@m17n.org>
3571 * font.h: Include <fontconfig/fontconfig.h>.
3572 (MFTInfo): New member langset.
3573 (mfont__encoding_list): Extern it.
3575 * font.c (mfont__encoding_list): New function.
3576 (mdebug_dump_font_list): New function.
3578 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3579 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3581 (ft_family_list): New variable.
3582 (set_font_info): New arg basep. Callers changed.
3583 (fc_list): Check the return value of FcPatternGetString.
3584 (add_font_info): New arg plist. Callers changed. Update
3586 (ft_list_family): New function (merged fc_list and ft_list_all).
3587 (ft_select): Use ft_list_family.
3588 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3590 (mfont__ft_init): Initialize above new variables.
3591 (mfont__ft_fini): Free ft_family_list.
3592 (STRDUP_LOWER): New macro.
3593 (set_font_info): Use STRDUP_LOWER.
3594 (ft_list_family): Avoid duplicate addition of font path. Use
3596 (fc_decode_prop): Fix typo.
3598 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3599 (xfont_registry_list): Change argument disp_info to frame.
3601 (xfont_list_all): New function.
3602 (xfont_list): If FONT is not NULL, check all fonts.
3604 2004-09-28 Kenichi Handa <handa@m17n.org>
3606 * m17n-X.c (MXFont, MXFontList): New types.
3607 (MDisplayInfo): Delete members font_registry_list,
3608 iso8859_1_family_list, iso10646_1_family_list, new members
3609 font_list, base_font_list.
3610 (free_display_info): Adusted for the change of MDisplayInfo.
3611 (xfont_driver): Initialize with xfont_list.
3612 (font_compare): New function.
3613 (build_font_list): Deleted.
3614 (xfont_registry_list): New function.
3615 (xfont_select): Use xfont_registry_list.
3616 (xfont_list): New function.
3617 (device_open): Adusted for the change of MDisplayInfo.
3619 * font-ft.c (add_font_info): New arg languages. Callers changed.
3620 (fc_list): Get languages from fonts..
3621 (ft_list_all): Renamed from ft_list. Callers changed.
3622 (ft_list): New function.
3623 (mfont__ft_driver): Initalize with ft_list.
3625 * font.c (mfont_list): New function.
3627 * font.h (struct MFontDriver): New member `list'.
3628 (MFTInfo): New member languages.
3630 * m17n-gui.h (mfont_list): Extern it.
3632 2004-09-27 Kenichi Handa <handa@m17n.org>
3634 * internal-gui.h (struct MGlyphString): Delete members mt,
3635 sub_width, sub_lbrearing, sub_rbearing, and region.
3637 * draw.c (MSubTextExtents): New type.
3638 (layout_glyphs): New arg extents. Set its members.
3639 (layout_glyph_string): Adjusted for the above change.
3640 (alloc_gstring): Don't set gstring->mt.
3641 (truncate_gstring): Call line_break function with mt instead of
3644 2004-09-22 Kenichi Handa <handa@m17n.org>
3646 * mtext.c (count_utf_16_chars): Count each code of invalid
3649 2004-09-19 Kenichi Handa <handa@m17n.org>
3651 * mtext.c (default_utf_16, default_utf_32): Rename them to
3652 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3655 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3658 2004-09-13 Kenichi Handa <handa@m17n.org>
3660 * draw.c (Mlatin): Don't declare it here.
3661 (visual_order): Fix reordering of combining characters.
3662 (compose_glyph_string): Fix detection of script.
3663 (layout_glyphs): Don't fix reordering of combining characters
3665 (layout_glyph_string): Pay attention to
3666 control->disable_overlapping_adjustment.
3667 (truncate_gstring): Include at least on character in a line.
3668 (get_gstring): Always scan one full line.
3669 (mdraw__init): Don't initialize Mlatin here.
3670 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3671 have a font, use ascent/descent of an ASCII font. Allow
3672 ink_array_return and logical_array_return to be NULL.
3673 (mdraw_coordinates_position): Fix iteration.
3675 * font-ft.c (MFTtoProp): Member completely changed.
3676 (ft_to_prop): Adjusted for the above change.
3677 (ft_to_prop_size): Likewise.
3678 (set_font_info): Adjusted for the change of MFTtoProp.
3679 (fc_generic_family_list): New variable.
3680 (fc_list): Add special handling of generic font names.
3681 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3682 Initialize fc_generic_family_list.
3683 (mfont__ft_fini): Don't free ft_to_prop. Free
3684 fc_generic_family_list.
3685 (FC_vs_M17N_font_prop): New type.
3686 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3687 (fc_decode_prop, fc_encode_prop): New functions.
3688 (mfont__ft_parse_name): Use fc_decode_prop.
3689 (mfont__ft_unparse_name): Use fc_encode_prop.
3691 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3692 (MWDevice): Add member realized_font_list.
3693 (free_display_info): Don't free disp_info->realized_font_list.
3694 (free_device): Free device->realized_fontset_list.
3695 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3696 (device_open): Don't initialize disp_info->realized_font_list.
3697 (device_open): Initialize device->realized_font_list and set it to
3698 frame->realized_font_list.
3700 * fontset.c (try_font_group): New function.
3701 (mfont__lookup_fontset): Use try_font_group.
3703 * font.c (common_weight): Change the order of "regular".
3705 * face.c (Mlatin): Don't make it static.
3706 (mface__realize): Be sure to set work_gstring.frame.
3707 (mface__for_chars): Likewise.
3709 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3712 * internal-gui.h (Mlatin): Extern it.
3714 * m17n-gui.h (MDrawControl): New member
3715 disable_overlapping_adjustment.
3717 2004-09-06 Kenichi Handa <handa@m17n.org>
3719 * font-flt.c (run_otf): Fix typo ('}'->']').
3721 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3722 (COMBINING_PRECOMPUTED_P): New macros.
3724 * draw.c (layout_glyphs): Handle precomputed combining code.
3726 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3727 precomupted combining code.
3729 2004-09-03 Kenichi Handa <handa@m17n.org>
3731 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3734 2004-08-27 Kenichi Handa <handa@m17n.org>
3736 * face.c (mface_put_prop): If the new value is the same as the
3737 current one, don't increment frame->tick.
3739 2004-08-25 Kenichi Handa <handa@m17n.org>
3741 * fontset.c (mfontset): Initialize font_spec_list member.
3742 (mfontset_copy): Load fontset if necessary.
3744 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3745 'metrics' to for C++.
3747 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3750 2004-08-16 Kenichi Handa <handa@m17n.org>
3752 * Version 1.1.0 released.
3754 2004-08-13 Kenichi Handa <handa@m17n.org>
3756 * language.c (mlang__init): Add Dhivehi.
3758 * m17n-gui.c (Mx, Mfreetype): Delete it.
3759 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3761 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3762 (mfont_resize_ratio): Extern it.
3763 (MDrawGlyphInfo): New member logical_width;
3764 (MDrawGlyph): New type.
3765 (mdraw_glyph_list): Prototype adjusted.
3767 * m17n-X.c (xfont_open): Set type and fontp members.
3768 (xft_open): Likewise.
3770 * internal-gui.h (Mx, Mfreetype): Delete extern.
3772 * font.h (struct MRealizedFont): New member type and fontp.
3774 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3775 (Mx, Mfreetype): Declare here.
3776 (Mxft): New variable.
3777 (mfont_resize_ratio): New function.
3779 * font-ft.c (ft_open): Set type and fontp members.
3781 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3784 2004-08-11 Kenichi Handa <handa@m17n.org>
3786 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3789 2004-08-06 Kenichi Handa <handa@m17n.org>
3791 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3794 * font-flt.c (run_otf): Print debugging information if necessary.
3796 2004-08-05 Kenichi Handa <handa@m17n.org>
3798 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3799 positioning_type 5 and 6. Switch simplified.
3801 2004-08-04 Kenichi Handa <handa@m17n.org>
3803 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3805 2004-08-02 Kenichi Handa <handa@m17n.org>
3807 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3808 set val to 1 even if it is greater than 1.
3810 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3812 2004-07-29 Kenichi Handa <handa@m17n.org>
3814 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3815 debugging information.
3817 * internal.h (MDEBUG_PRINT5): New macro.
3819 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3820 the previous one if the zero width glyph has left or right
3823 2004-07-26 Kenichi Handa <handa@m17n.org>
3825 * m17n-X.c (xft_render): Pay attention to members left_padding and
3826 right_padding of MGlyph.
3828 * draw.c (visual_order): Allocate one more elements for arrays as
3829 a workaround of fribidi bug.
3830 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3831 instead of MGlyph->bidi_sensitive.
3832 (layout_glyph_string): Pay attentinon to
3833 control->orientation_reversed when padding at the head or tail.
3834 Fix adjustment of space glyph width.
3835 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3838 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3839 instead of MGlyph->bidi_sensitive.
3841 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3843 2004-07-26 Kenichi Handa <handa@m17n.org>
3845 * draw.c (visual_order): Don't treat combined glyphs specially.
3846 (layout_glyphs): Don't get metrics glyphs that are already ready.
3847 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3848 width with the previous one.
3849 (draw_background): Fix bar cursor position on a r2l glyph.
3851 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3852 (run_rule): Fix place of updating cluster_begin_pos and
3853 cluster_end_pos here.
3854 (run_otf): Don't set left_padding.
3856 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3858 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3859 Fix handling of GPOS.
3860 (mfont__ft_drive_gpos): Delete this function.
3862 * font.h (mfont__ft_drive_otf): Renamed back from
3863 mfont__ft_drive_gsub.
3864 (mfont__ft_drive_gpos): Delete extern.
3866 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3867 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3869 2004-07-23 Kenichi Handa <handa@m17n.org>
3871 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3872 the same bidi level.
3874 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3876 2004-07-22 Kenichi Handa <handa@m17n.org>
3878 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3880 2004-07-20 Kenichi Handa <handa@m17n.org>
3882 * draw.c (render_glyphs): Fix checking of g->code validity.
3884 * face.c (mface__realize): Set g.type.
3886 2004-07-18 Kenichi Handa <handa@m17n.org>
3888 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3891 * m17n-gui.c (mframe): Print error message give by dlopen to
3894 2004-07-16 Kenichi Handa <handa@m17n.org>
3896 * draw.c (compose_glyph_string): Improve the way of deciding a
3897 script. For a character that doesn't have script property, use
3898 the last non-latin script.
3900 * font-ft.c (fc_list): Cancel previous change.
3901 (mfont__ft_init): Add more entries in ft_to_prop_name.
3903 2004-07-15 Kenichi Handa <handa@m17n.org>
3905 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3906 previous or next character glyphs.
3908 2004-07-14 Kenichi Handa <handa@m17n.org>
3910 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3911 of type GLYPH_SPACE.
3913 * fontset.c (mfont__lookup_fontset): If glyph type is
3914 GLYPH_SPACE, get codes for SPACE.
3916 * internal-gui.h (Mfont): Delete extern.
3918 * m17n-gui.h (Mfont): Delete duplicated extern.
3920 2004-07-13 Kenichi Handa <handa@m17n.org>
3922 * font-ft.c (DEVICE_DELTA): New macro.
3923 (adjust_anchor): New function.
3924 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3926 (mfont__ft_drive_gpos): New function.
3928 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3929 (FontLayoutContext): Delete member `rfont'.
3930 (run_otf): Set g->otf_cmd. Call
3931 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3932 only whne HAVE_OTF is defined.
3934 * fontset.c: Include "config.h".
3936 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3937 (MGlyph): New member otf_cmd.
3939 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3940 (mfont__ft_drive_gpos): Extern it.
3942 * face.c: Include "config.h".
3944 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3946 * input-gui.c: Include "config.h".
3948 * plist.c: Include "config.h".
3950 2004-07-06 Kenichi Handa <handa@m17n.org>
3952 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3953 internal-gui.h: Cancel previous changes.
3955 * m17n-gd.h: Delete it.
3957 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3958 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3959 @XML2_LD_FLAGS@ to above.
3960 (libm17n_la_LIBADD): Add -ldl.
3961 (libm17n_la_LDFLAGS): Add -export-dynamic.
3962 (X_LD_FLAGS): Fix the order of linking.
3963 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3964 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3965 (libm17n_X_la_LDFLAGS): Add -module.
3966 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3967 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3968 (libm17n_gd_la_LDFLAGS): Add -module.
3969 (include_HEADERS): Delete m17n-gd.h.
3971 2004-06-30 Kenichi Handa <handa@m17n.org>
3973 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3974 (MDeviceLibraryInterface): Delete it.
3975 (register_device_library): Delete it.
3976 (m17n__device_library_list): Renamed from device_library_list.
3978 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3979 (m17n_init_win): Adjust prototype.
3981 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3982 (m17n_init_gd): New function.
3984 * m17n-gd.h: New file.
3986 * m17n-X.h: Include <m17n-gui.h>.
3987 (m17n_init_X): Extern it.
3988 (M17N_INIT): Redefine it.
3990 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3991 (m17n_init_X): New function.
3993 * internal-gui.h (m17n__device_library_list): Extern it.
3994 (struct MDeviceDriver): New members initialized, init, and fini.
3996 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3998 (libm17n_X_la_LIBADD): Delete aboves.
3999 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
4000 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
4001 (libm17n_gd_la_LDFLAGS): Delete it.
4002 (include_HEADERS): Add m17n-gd.h.
4004 2004-06-25 Kenichi Handa <handa@m17n.org>
4006 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
4007 (libm17n_gd_la_LDFLAGS): Cancel previous change.
4009 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
4011 * font-ft.c (fc_list): If FcFontList finds no font, try
4014 * draw.c (compose_glyph_string): Terminate the last loop after
4015 doing default combining if necessary.
4017 2004-06-24 Kenichi Handa <handa@m17n.org>
4019 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
4021 * character.c (mchar_define_property): Add const to an arg.
4023 * charset.c (mchar_define_charset): Add const to an arg.
4025 * coding.c (MCodingSystem): Add const to an arg or decoder.
4026 (finish_decoding): Add const to an arg.
4027 (decode_coding_charset, decode_coding_utf_8)
4028 (decode_coding_utf_16, decode_coding_utf_32)
4029 (decode_coding_iso_2022, decode_coding_sjis)
4030 (mconv_define_coding): Likewise.
4032 * m17n-X.c (xft_find_metric): Delete unused variable.
4034 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
4037 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
4040 * mtext.c (count_utf_8_chars, count_utf_16_chars)
4041 (mtext__from_data, mtext_from_data): Add `const' to an arg.
4043 * mtext.h (mtext__from_data): Ajust prototype.
4045 2004-06-23 Kenichi Handa <handa@m17n.org>
4047 * draw.c (compose_glyph_string): Always get glyph codes by
4049 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
4050 (mdraw_glyph_list): New function.
4052 * font-flt.c (mfont__flt_run): Be sure to call
4053 rfont->driver->encode_char.
4055 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
4056 (ft_encode_char): Delete arg C.
4057 (ft_render): Don't call FT_Get_Char_Index.
4059 * font.c (mfont__encodable_p): Delete it.
4060 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
4062 * font.h (struct MFontDriver): Delete arg C of encode_char.
4063 (mfont__encodable_p): Delete extern.
4065 * m17n-X.c (xfont_encode_char): Delete arg C.
4066 (xft_find_metric): Don't cal FT_Get_Char_Index.
4067 (xft_render): Likewise.
4069 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
4071 (mdraw_glyph_list): Extern it.
4073 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
4075 2004-06-22 Kenichi Handa <handa@m17n.org>
4077 * m17n-gui.h (mfontset_lookup): Extern it.
4079 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
4081 * fontset.c (realize_fontset_elements)
4082 (free_realized_fontset_elements, update_fontset_elements): New
4084 (mfont__realize_fontset): Call realize_fontset_elements.
4085 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
4086 (mfont__lookup_fontset): If a fontset was modified, update
4087 the realized fontset.
4088 (mfontset_modify_entry): Increment fontset->tick.
4089 (mfontset_lookup): New function.
4091 2004-06-21 Kenichi Handa <handa@m17n.org>
4093 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
4095 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
4096 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
4097 length of source text 0.
4099 2004-06-21 Kenichi Handa <handa@m17n.org>
4101 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
4102 (compare): Pay attention to format other than utf-8.
4103 (copy): Delete this function.
4104 (count_by_utf_8, count_by_utf_16, insert): New functions.
4105 (count_utf_16_chars): Fix handling of a surrogate pair.
4106 (find_char_forward, find_char_backward): Likewise.
4107 (mtext__from_data): Delete unnecessary check. Fix number of
4109 (mtext_from_data): Don't count items.
4110 (mtext_ref_char): Optimize the code.
4111 (mtext_set_char): Pay attention to format other than utf-8.
4112 (mtext_cat_char): Likewise.
4113 (mtext_dup): Don't call copy, instead do allocation here.
4114 (mtext_cat): Call insert instead of copy.
4115 (mtext_ncat): Likewise.
4116 (mtext_cpy): Delete character at first and call insert instead of
4118 (mtext_ncpy): Likewise.
4119 (mtext_copy): Likewise.
4120 (mtext_duplicate): Call insert instead of copy.
4121 (mtext_del): Pay attention to format other than utf-8.
4122 (mtext_ins): Simply call insert.
4123 (mtext_ins_char): Pay attention to format other than utf-8.
4124 (mtext_tok): Call insert instead of copy.
4125 (mtext_text): Call UNIT_BYTES.
4127 * textprop.c (mtext__adjust_plist_for_change): New function.
4129 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
4130 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
4131 (CHAR_UNITS_AT): Fix typo.
4132 (CHAR_UNITS_BY_HEAD): Fix typo.
4133 (STRING_CHAR_AND_UNITS): Fix typo.
4135 * internal.h (MTEXT_READ_ONLY_P): New macro.
4137 * mtext.h (mtext__replace): Delete the extern.
4138 (mtext__adjust_foramt): Adjust prototype.
4140 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
4141 if possible. Otherwise make a copy of mmt.
4143 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
4146 2004-06-18 Kenichi Handa <handa@m17n.org>
4148 * character.h (CHAR_STRING_UTF16): Fix syntax.
4150 2004-06-16 Kenichi Handa <handa@m17n.org>
4152 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
4153 (libm17n_X_la_LIBADD): Delete it.
4154 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
4156 * m17n-X.c (device_open): Add parens in `if' condition.
4158 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
4159 (DEC_POSITION): Likewise.
4160 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
4162 2004-06-15 Kenichi Handa <handa@m17n.org>
4164 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
4167 * draw.c (compose_glyph_string): If langauge is specified, call
4168 mface__for_chars even if a text is all latin. Fix condition for
4169 setting non_ascii_found.
4171 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
4173 * m17n.h (minput_char_to_key): Delete extern.
4175 * m17n-gui.h (minput_event_to_key): Cancel previous change.
4177 * m17n-gui.c (null_device_open): Set several members of frame.
4179 2004-06-14 Kenichi Handa <handa@m17n.org>
4181 * m17n-gui.h (minput_event_to_key): Delete extern.
4183 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
4185 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
4187 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
4189 2004-06-08 Kenichi Handa <handa@m17n.org>
4191 * character.c (mchar_put_prop): Don't increment the ref-count of
4194 2004-06-04 Kenichi Handa <handa@m17n.org>
4196 * m17n-core.c (mdebug__register_object): New function.
4197 (mdebug__unregister_object): Likewise.
4199 * internal.h (mdebug__register_object, mdebug__unregister_object):
4201 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
4204 * charset.c (mcharset__load_from_database): Don't call
4205 mconv__register_charset_coding here.
4207 * coding.c (find_coding): Get a real name from an element of
4208 coding_definition_list.
4209 (mconv__register_charset_coding): Set the real name at the top of
4211 (mcoding__load_from_database): Likewise.
4212 (mconv_list_codings): Adjusted for the above change.
4214 2004-06-03 Kenichi Handa <handa@m17n.org>
4216 * coding.c (find_coding): Find by canonicalized name. Don't have
4217 to modify the element of coding_definition_list by
4219 (mconv__define_coding_from_charset): Delete it.
4220 (mconv__register_charset_coding): Canonicalize sym.
4221 (mcoding__load_from_database): Register plist modified by
4224 * coding.h (mconv__define_coding_from_charset): Don't extern it.
4226 * font-ft.c (ft_open): Fix setting of rfont->descent.
4228 2004-06-02 Kenichi Handa <handa@m17n.org>
4230 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
4231 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
4232 (xlfd_unparse_name): Renamed from xfont_build_name.
4233 (mfont__init): Initialized Mfontconfig.
4234 (mfont__free_realized): Unconditionally unref rfont->info.
4235 (mfont__select): Free `this' if it's not best.
4236 (mfont__open): Don't check frame->realized_font_list.
4237 (mfont__parse_name_into_font): New function.
4238 (Mfontconfig): New variable.
4239 (mfont_from_name): Call mfont_parse_name.
4240 (mfont_name): Call mfont_unparse_name.
4241 (mdebug_dump_font): Likewise.
4243 * font.h (struct MFontDriver): Delete members parse_name and
4245 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
4246 (mfont__parse_name_into_font): Extern it.
4248 * font-ft.c: Include "symbol.h".
4249 (close_ft): Unconditionally free filename and charmap_list of
4251 (ft_open): Duplicate base->filename. Increment ref-count of
4252 ft_info->charmap_list. Free ft_info->charmap_list and
4253 ft_info->filename on error.
4254 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
4256 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
4258 (enum xlfd_field_idx): Moved to font.c.
4259 (split_font_name, build_font_name): Likewise.
4260 (build_font_list): Call mfont__parse_name_info_font.
4261 (xfont_open): Call mfont__unparse_name. Free name.
4262 (xfont_parse_name, xfont_build_name): Moved to font.c
4263 (xft_select): Prototype deleted.
4264 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
4265 Call mfont_pase_name.
4267 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4268 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4271 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4274 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4276 2004-06-01 Kenichi Handa <handa@m17n.org>
4278 * fontset.c (mfontset_modify_entry): Pay attention to the case
4279 that fontset->font_spec_list is NULL.
4281 2004-05-31 Kenichi Handa <handa@m17n.org>
4283 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4285 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4287 * font.c (mfont__select): Print score the a font for debugging.
4289 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4291 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4292 kanji_sym and kana_sym.
4294 2004-05-28 Kenichi Handa <handa@m17n.org>
4296 * Makefile.am (VINFO): New variable.
4297 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4298 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4300 2004-05-27 Kenichi Handa <handa@m17n.org>
4302 The following chanages are to make device dependent functions
4303 accessible only from MDeviceDriver structure, and to add GD and
4304 null device drivers. Font drivers get also device dependent.
4306 * m17n.c (m17n_init): Increament shell_initialized.
4307 (m17n_fini): Decremented shell_initialized.
4309 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4311 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4312 (Mwidget, Mcolormap, Mx): Extern them.
4314 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4315 (free_frame): Call frame->driver->close instead of
4317 (DLOPEN_SHLIB_EXT): New macro.
4318 (MDeviceLibraryInterface): New type.
4319 (device_library_list): New variable.
4320 (register_device_library): New function.
4321 (null_device): New variable.
4322 (null_device_close, null_device_get_prop)
4323 (null_device_realize_face, null_device_free_realized_face): New
4325 (null_driver): New variable.
4326 (null_device_init, null_device_fini, null_device_open): New
4328 (null_interface): New variable.
4329 (Mfreetype, Mdevice): Declare them.
4330 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4331 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4332 Mwin__Close_Device. Register drivers for Mx and Mgd.
4333 (m17n_fini_win): Decremented win_initialized. Call "fini"
4334 function of all opened devices. Don't call mwin__fini.
4335 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4337 (mframe): Handle Mdevice key of PLIST.
4338 (mframe_get_prop): Call frame->device->get_prop instead of
4339 mwin__device_get_prop.
4341 * m17n-gd.c: New file.
4343 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4344 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4346 * m17n-core.c (m17n_init_core): Increate core_initialized.
4347 (m17n_fini_core): Decremented core_initialized.
4349 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4350 (Mcolormap): Don't extern them here.
4352 * m17n-X.c (FRAME_DEVICE): New macro.
4353 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4354 (free_display_info): Use MPLIST_DO.
4355 (free_device): Free rface->info.
4356 (xft_close): Delete it.
4357 (device_init): Renamed from mwin__init.
4358 (device_fini): Renamed from mwin__fini.
4359 (device_open): Renamed from mwin__open_device.
4360 (x_driver): New variable.
4361 (MXFontInfo): Delete member frame, add member display.
4362 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4363 Don't declare them here.
4365 * internal-gui.h (MDeviceType): New enum.
4366 (MWDefice): Delete it.
4367 (struct MFrame): Change type of device to void *. New members
4368 device_type, driver, font_driver_list.
4369 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4370 (MDeviceDriver): New type.
4371 (Mx, Mgd, Mfreetype): Extern them.
4372 (mwin__XXX): Delete all of them.
4374 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4376 (win_destroy_ic): Likewise.
4377 (adjust_window_and_draw): Likewise.
4378 (win_callback): Likewise.
4379 (Mxim): Declare it here.
4380 (minput_event_to_key): Call M_CHECK_READABLE.
4382 * fontset.c (mfont__lookup_fontset): Delete local variable
4385 * font.h (struct MFontDriver): Delete member close, add members
4386 parse_name and build_name.
4387 (mfont__driver_list): Delete extern.
4388 (mfont__close): Delete extern.
4390 * font.c (mfont__init): Don't set mfont__driver_list.
4391 (mfont__fini): Don't unref mfont__driver_list.
4392 (mfont__select): Try font drivers in frame->font_driver_list. Set
4393 driver member of a realized font.
4394 (mfont__close): Delete it.
4395 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4396 functions of the default frame.
4398 * font-ft.c (close_ft): Check ft_info->ft_face and work
4400 (add_font_info): Allocate ft_info by M17N_OBJECT.
4401 (ft_close): Delete it.
4402 (mfont__ft_driver): Don't set ft_close.
4403 (ft_select): Increment ref-count of best_font.
4404 (ft_open): Decremented ref-count of base. On error, call
4405 FT_Done_Face and free ft_info.
4406 (ft_find_metric): Always use XXX_MONO in load_flags.
4407 (ft_render): Fix setting of width. Call
4408 frame->driver->draw_points instead of mwin__draw_points.
4409 (ft_to_prop): Don't set mfont__driver_list.
4410 (mfont__ft_fini): Just unref ft_info.
4412 * face.c (mface__init): Exchange foreground and background of
4413 mface__default. Call mface_put_prop to set hline of
4415 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4416 (mface__free_realized): Don't call mwin__free_realized_face.
4418 * draw.c (Mdepth): Don't declare it here.
4419 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4420 (render_glyphs, render_glyph_string): Likewise.
4421 (mdraw__init): Don't set Mdepth.
4422 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4424 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4426 (mdraw_text_items): Check FRAME is writable.
4427 (mdraw_per_char_extents): Implement body.
4429 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4431 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4432 (GUI_SOURCES): Delete it.
4433 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4434 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4435 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4436 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4437 (linkgui_LDADD): Set to libm17n-gui.la
4438 (linkgui_LDFLAGS): New target.
4439 (SRC): Include ${libm17n_gui_la_SOURCES} and
4440 ${libm17n_gd_la_SOURCES}.
4442 2004-05-24 Kenichi Handa <handa@m17n.org>
4444 * draw.c (draw_background): Don't draw background even if
4445 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4447 2004-05-22 Kenichi Handa <handa@m17n.org>
4449 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4451 2004-05-20 Kenichi Handa <handa@m17n.org>
4453 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4455 * m17n-gui.c: Include "plist.h".
4456 (mframe): If PLIST is NULL, initialize it to emply plist.
4458 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4459 (xft_driver): New variable.
4460 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4461 (xft_find_metric, xft_render): New function.
4462 (mwin__init): Adjusted for the new mfont__driver_list.
4463 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4464 generated face to PARAM.
4465 (mwin__realize_face): Fix setting of box colors. Don't call hook
4467 (mwin__draw_hline): New function.
4468 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4469 (mwin__xft_render): Delete these function.
4471 * internal-gui.h (struct MFrame): New member tick.
4472 (struct MGlyphString): New member tick.
4473 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4474 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4475 (mwin__xft_render): Delete extern.
4477 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4478 (mfontset): Always increment the reference count of returned
4481 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4482 (MFTInfo): Moved to font.h.
4483 (ft_iso8859_1_font_list): Delete this variable.
4484 (set_font_info): Don't set font->property[MFONT_TYPE].
4485 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4486 (add_font_info): Change type to void.
4487 (fc_list): Change anme from xft_list. Caller changed. Include
4488 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4489 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4490 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4491 (close_ft): Don't call mwin__xft_close. Unref
4492 ft_info->extra_info.
4493 (ft_open): Don't setup ft_info->fontname. Don't call
4495 (ft_find_metric): Don't call mwin__xft_get_metric.
4496 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4497 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4498 (mfont__ft_init): Adjusted for new mfont__driver_list.
4499 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4501 * font.c (mfont__driver_list): Make it MPlist.
4502 (mfont__init): Adjust initialization of mfont__driver_list.
4503 (mfont__fini): Free mfont__driver_list.
4504 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4505 (mfont__select): Adjusted for the new mfont__driver_list.
4507 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4508 (mfont__drirver_list): Adjust prototype.
4509 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4511 * face.h (struct MFace): Delete member realized_face_list, add
4513 (struct MRealizedFace): Delete member need_update
4514 andnofont_rface, add member non_ascii_list.
4515 (mface__update_frame_face): Extern it.
4517 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4519 (get_hline_create, get_box_create): New functions.
4520 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4522 (free_face): Cancep previous change. Free face->frame_list.
4523 (serialize_hline): Do nothing if hline->width is zero.
4524 (serialize_box): Do nothing if box->width is zero.
4525 (mface__init): Setup all properties of mface__default.
4526 (mface__fini): Free hline_prop_list and box_prop_list.
4527 (mface__realize): Cancel previous change. Update
4528 face->frame_list. Setup rface->non_ascii_list.
4529 (mface__for_chars): Update rface->non_ascii_list.
4530 (mface__free_realized): Free rface->non_ascii_list.
4531 (mface__update_frame_face): New function.
4532 (mface): Initialize face->frame_list.
4533 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4535 (mface_merge): Likewise.
4536 (mface_put_prop): If key is Mhline or Mbox, get value by
4537 get_hline_create or get_box_create respectively.
4538 (mface_put_prop): Update frame->tick and call
4539 mface__update_frame_face if necessary.
4540 (mface_update): Do nothing if func is noop_hook.
4542 * draw.c (render_glyphs): If a font is not found, use
4543 mwin__draw_empty_boxes.
4544 (alloc_gstring): Initialize gstring->tick.
4545 (get_gstring): Check gstring->tick.
4547 2004-05-17 Kenichi Handa <handa@m17n.org>
4549 * face.c (find_realized_face): Return value changed. If RFONT is
4550 NULL, avoid unnecessary checking.
4551 (free_face): Free face->realized_face_list.
4552 (mface__realize): Adjusted for the change of find_realized_face.
4553 If it returns a realized face that needs update, free it and
4554 realize a new one. Push a new realized face to
4555 frame->realized_face_list instead of appending.
4556 (mface__for_chars): Adjusted for the change of find_realized_face.
4557 Short cut if the required font is in rface->ascii_rface.
4558 (mface_put_prop): Free old value if necessary. Set need_update
4559 member of realized faces to 1.
4561 * face.h (struct MFace): Delete member tick, add member
4563 (struct MRealizedFace): Delete member tick, add member
4566 2004-05-13 Kenichi Handa <handa@m17n.org>
4568 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4570 2004-05-12 Kenichi Handa <handa@m17n.org>
4572 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4574 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4575 parse it XftNameParse.
4577 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4578 (all_fonts_scaned): New variable.
4579 (set_font_info): FAMILY may be Mnil.
4580 (add_font_info): Argument changed.
4581 (xft_list): Call add_font_info in it.
4582 (ft_list): Likewise.
4583 (ft_select): Make it work in the case family is Mnil.
4584 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4585 (mfont__ft_fini): Set all_fonts_scaned to 0.
4587 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4588 that is failed to open.
4590 2004-05-10 Kenichi Handa <handa@m17n.org>
4592 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4593 device's depth is 1 (i.e. monochrome).
4595 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4596 to work around the problem of libtool.
4598 * font-ft.c: Include <freetype/ftbdf.h>.
4599 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4601 (mfont__ft_init): Initialize them.
4602 (ft_iso8859_1_font_list): New variable.
4603 (set_font_info): Detect a font containing iso8859-1 glyphs and
4604 register it in ft_iso8859_1_font_list. If the font is not
4605 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4606 properties of the font from its properties.
4607 (add_font_list): If the font is not scalable, check if it is BDF
4608 or PCF font. If not, ignore it.
4609 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4610 registry is not iso8859-1.
4611 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4612 ft_iso8859_1_font_list.
4613 (ft_find_metric): If the font is not scalable, assume it as BDF
4614 or PCF, and get a metric from its properties.
4615 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4617 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4619 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4620 (libm17n_la_LDFLAGS): Delete it.
4621 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4622 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4624 2004-05-06 Kenichi Handa <handa@m17n.org>
4626 * draw.c (compose_glyph_string): Fix previous change.
4628 2004-04-30 Kenichi Handa <handa@m17n.org>
4630 * font-ft.c (ft_list): Delete unused variable `result'.
4631 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4633 2004-04-27 Kenichi Handa <handa@m17n.org>
4635 * m17n-X.c: Include config.h
4636 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4637 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4638 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4639 (FRAME_CMAP, FRAME_VISUAL): New macros.
4640 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4641 (xfont_driver): Make it static.
4642 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4643 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4644 info->xft_color_back.
4645 (MXftFontInfo) [HAVE_XFT2]: New type.
4646 (mwin__xft_close) [HAVE_XFT2]: New function.
4647 (mwin__xft_open) [HAVE_XFT2]: New function.
4648 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4649 (mwin__xft_render) [HAVE_XFT2]: New function.
4651 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4652 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4653 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4656 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4658 * font-ft.c: Don't include FT_FREETYPE_H here.
4659 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4660 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4661 (MFTInfo): New member charmap_index.
4662 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4663 (check_otf_filename): Renamed from check_filename. Return value
4665 (ft_set_property): This function deleted.
4666 (set_font_info): New function.
4667 (add_font_list): Argument changed. Add multiple fonts.
4668 (xft_list) [HAVE_XFT2]: New function.
4669 (ft_list) [not HAVE_XFT2]: New function.
4670 (ft_select): Add code for Xft.
4671 (close_ft): Likewise.
4672 (ft_open): Likewise.
4673 (ft_find_metric): Likewise.
4674 (ft_encode_char): Likewise.
4675 (ft_render): Likewise.
4677 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4679 2004-04-26 Kenichi Handa <handa@m17n.org>
4681 * textprop.c (mtext_attach_property): Declare the return type as
4684 2004-04-21 Kenichi Handa <handa@m17n.org>
4686 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4688 2004-04-09 Kenichi Handa <handa@m17n.org>
4690 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4692 (load_command): Setup above members.
4694 2004-04-05 Kenichi Handa <handa@m17n.org>
4696 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4698 2004-03-30 Kenichi Handa <handa@m17n.org>
4700 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4703 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4704 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4706 2004-03-29 Kenichi Handa <handa@m17n.org>
4708 * Version 1.0 Patch Level 2 released.
4710 2004-03-29 Kenichi Handa <handa@m17n.org>
4712 * charset.c (make_charset): Set charset->fully_loaded and
4713 charset->simple correctly. Don't try to get charset->min_char and
4714 charset->max_char for a charset of method subset and superset.
4715 Don't load a mapping file here.
4716 (mcharset__init): Set unified_max.
4717 (mcharset__load_from_database): Free a working plist.
4719 * coding.c (mcoding__fini): Free all malloced data.
4721 * input-gui.c (win_create_ic): Set control.as_image for preediting
4724 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4725 `count') to initialize the array.
4727 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4730 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4732 (mwin__create_window): Fix bug of setting a background pixel of a
4734 (mwin__adjust_window): Clear the window before drawing.
4736 * m17n-core.c (mdebug__report_object): Free array->objectes if
4738 (m17n_init_core): Don't set report_header_printed to 0 here.
4739 Fix debugging information.
4740 (m17n_fini_core): Set report_header_printed to 0 here.
4742 * m17n-core.h (mplist_deserialize): Extern it.
4744 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4746 * m17n.c (m17n_fini): Fix debugging information.
4748 * mtext.c (mtext__adjust_foramt): New function.
4750 * mtext.h (mtext__adjust_foramt): Extern it.
4752 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4754 * plist.h (mplist__deserialize): Don't extern it.
4756 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4757 elements of symbol_table to NULL. Report about created and freed
4758 symbols if MDEBUG_FINI is set.
4760 2004-03-22 Kenichi Handa <handa@m17n.org>
4762 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4764 * m17n.c (m17n_init): Fix the way of checking merror_code.
4766 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4768 2004-03-22 Kenichi Handa <handa@m17n.org>
4770 * fontset.c (realize_font_group): Adjust the font size by
4771 mfont__resize before selecting a font.
4773 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4775 2004-03-19 Kenichi Handa <handa@m17n.org>
4777 * Version 1.0 Patch Level 1 released.
4779 2004-03-19 Kenichi Handa <handa@m17n.org>
4781 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4783 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4785 2004-03-19 Kenichi Handa <handa@m17n.org>
4787 Re-apply the changes forgotten in the released version.
4789 * charset.c (mcharset__load_from_database): Call
4790 mchar_define_charset.
4792 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4793 (mconv_encode_range): Put Mcoding text property.
4795 2004-03-18 Kenichi Handa <handa@m17n.org>
4797 * draw.c (Mdepth): New variable.
4798 (visual_order): Delete unused local var `pos'.
4799 (compose_glyph_string): Fix for the case that gstring->glyphs is
4800 realloced. Stop generating glyphs at TO. Fix handling of
4802 (layout_glyphs): Get metrics of all glyphs in advance. Set
4803 lbearing and rbearing of base of composition glyph correctly.
4804 Handle left-overhang glyphs correctly.
4805 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4807 (dump_combining_code): Change the defualt off_x character to ".".
4808 (mdraw__init): Initialize Mdepth.
4810 * face.c (work_gstring): New variable
4811 (mface__init): Initialize work_gstring.
4812 (mface__fini): Free work_gstring.glyphs.
4813 (mface__realize): Don't handle videomode property here. Adjusted
4814 for the change of mfont__get_metric.
4815 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4817 * face.h (enum face_gc): Moved to m17n-X.c.
4819 * font.h (struct MFontDriver): Arguments of find_metric changed.
4820 (mfont__select): Prototype adjusted.
4821 (mfont__get_metric): Likewise.
4822 (mfont__ft_drive_otf): Likewise.
4823 (mfont__flt_run): Likewise.
4825 * font.c (mfont__select): New argument layouter. If layouter is
4826 different in the registered font, make a new copy of realized
4828 (mfont__get_metric): Argument changed. Get metrics of multiple
4830 (mfont_find): Call mfont__select with layouter as Mnil.
4832 * font-flt.c (FontLayoutContext): New member rfont.
4833 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4834 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4836 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4838 (NUM_POINTS): New macro.
4839 (MPointTable): New type.
4840 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4841 (mfont__ft_drive_otf): New argument rfont.
4843 * fontset.c (realize_font_group): Adjusted for the changed of
4845 (check_fontset_element): This function deleted.
4847 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4848 off the parent window if the preedit text is zero length.
4850 * internal-gui.h (struct MFrame): New members foreground,
4851 background, videomode, font.
4852 (struct MGlyphString): New member anti_alias.
4853 (MDrawPoint): New type.
4854 (mwin__draw_bitmap): Prototype deleted.
4855 (mwin__draw_points): Prototype added.
4857 * m17n-gui.h (MDrawControl): New member anti_alias.
4859 * m17n-gui.c (free_frame): Free frame->font.
4860 (mframe): Set the fontset of frame->face to the default fontset.
4862 * m17n-X.c (RGB_GC): New type.
4863 (enum gc_index): Renamed from enum face_gc. Member names changed.
4865 (struct MWDevice): Members foreground and background deleted. New
4866 member scratch_gc, gc_list.
4867 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4868 (free_device): Free GCs in device->gc_list.
4869 (get_rgb_gc): New function.
4870 (get_gc): Renamed and argument changed from get_color.
4871 (get_gc_for_anti_alias): New function.
4872 (xfont_find_metric): Arguments changed. Get metrics of multiple
4874 (set_region): Argument changed. Caller changed.
4875 (xfont_render): Allways set a font in gc.
4876 (x_error_handler, x_io_error_handler): Define only if
4877 X_SET_ERROR_HANDLER is defined.
4878 (mwin__open_device): Create device->scratch_gc. Set members
4879 foreground, background, and videomode of frame. Call
4880 XSetErrorHandler and XSetIOErrorHandler only if
4881 X_SET_ERROR_HANDLER is defined.
4882 (struct gc_list): Deleted.
4883 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4884 (mwin__realize_face): Adjusted for the change of the format of
4885 rface->info and the charge of set_region.
4886 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4887 (mwin__draw_box): Likewise.
4888 (mwin__draw_bitmap): This function deleted.
4889 (mwin__draw_points): New function.
4890 (mwin__verify_region): Adjusted for the change of the format of
4891 rface->info and the charge of set_region.
4892 (mwin__create_window): Inherit backgound pixel from parent.
4893 (mwin__dump_gc): Adjusted for the change of the format of
4896 2004-03-16 Kenichi Handa <handa@m17n.org>
4898 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4900 * input.c (M_key_alias): New variable.
4901 (handle_key): Try M_key_alias property of a key too.
4902 (minput__init): Initialize M_key_alias. Give that property to
4903 symbols in one_char_symbol. Fix bug of initializing
4906 * draw.c (compose_glyph_string): Don't handle
4907 ignore_formatting_char here. Include formatting characters in the
4908 range processed by a FTL.
4909 (layout_glyph_string): Handle ignore_formatting_char here.
4911 2004-03-12 Kenichi Handa <handa@m17n.org>
4913 * input-gui.c (win_create_ic): Enable bidi in status control.
4915 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4917 2004-03-09 Kenichi Handa <handa@m17n.org>
4919 * input.c (load_input_method): If title is not specified, use the
4920 input method name as title.
4922 * m17n-X.c (get_color): Make it static.
4923 (xim_create_ic, xim_destroy_ic, x_error_handler)
4924 (x_io_error_handler): Likewise.
4926 2004-03-01 Kenichi Handa <handa@m17n.org>
4928 * Version 1.0 released.
4931 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4932 National Institute of Advanced Industrial Science and Technology (AIST)
4933 Registration Number H15PRO112
4935 This file is part of the m17n library.
4937 The m17n library is free software; you can redistribute it and/or
4938 modify it under the terms of the GNU Lesser General Public License
4939 as published by the Free Software Foundation; either version 2.1 of
4940 the License, or (at your option) any later version.
4942 The m17n library is distributed in the hope that it will be useful,
4943 but WITHOUT ANY WARRANTY; without even the implied warranty of
4944 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4945 Lesser General Public License for more details.
4947 You should have received a copy of the GNU Lesser General Public
4948 License along with the m17n library; if not, write to the Free
4949 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4950 Boston, MA 02110-1301, USA.