1 2010-08-19 Kenichi Handa <handa@m17n.org>
3 * m17n-X.c (MDisplayInfo): New member altgr_mask.
4 (find_modifier_bits): Set disp_info->altgr_mask.
6 * input.c (fully_initialize): Make it static.
8 * input.h (MINPUT_KEY_ALTGR_MODIFIER): New macro.
10 * input-gui.c (minput_event_to_key): Handle
11 MINPUT_KEY_ALTGR_MODIFIER.
13 2010-08-12 Kenichi Handa <handa@m17n.org>
15 * character.h (STRING_CHAR_ADVANCE_UTF8): Sanitize the code.
16 (STRING_CHAR_ADVANCE_UTF16): Likewise.
18 * font.c (mfont__init): Initialize buf to NULL.
19 (mfont__id): Likewise.
21 * font-ft.c (ft_encapsulate): Use MDEBUG_PRINT1 instead of
23 (ft_check_otf): Move the label not_otf: within #ifdef HAVE_OTF.
24 (get_otf): Move the code within #ifdef HAVE_OTF.
25 (ft_drive_otf): Move declarations of some local variables within
28 2010-08-11 Kenichi Handa <handa@m17n.org>
30 * input.h (MInputContextInfo): New member state_hook.
32 * input.c (shift_state): Just set ic_info->state_hook, instead of
33 taking state-hook actions.
34 (handle_key): Check ic_info->state_hook. If KEY is unhandled,
35 init ic_info->state_hook.
37 2010-08-09 Kenichi Handa <handa@m17n.org>
39 * m17n-flt.c (try_otf): Remove unused local vars.
41 * input.c (fully_initialize): Avoid compiler warning by casting.
43 * m17n-core.c (m17n_init_core): Fix handling of env_value.
45 * fontset.c (realize_fontset_elements): Fix typo (pl->plist).
47 * coding.c (decode_coding_iso_2022): Sanitize "if" condition.
49 2010-04-23 Kenichi Handa <handa@m17n.org>
51 * Version 1.6.1 released.
53 2010-04-23 Kenichi Handa <handa@m17n.org>
55 * m17n-flt.c (enum GlyphInfoMask): Shift upper masks 1-bit left.
56 (decode_packed_otf_tag): If a glyph has combining information,
59 2010-04-23 Kenichi Handa <handa@m17n.org>
61 * font-ft.c (ft_drive_otf): Reset 28th bit of g->g.internal for
62 storing OTF feature tag.
64 2010-04-19 Kenichi Handa <handa@m17n.org>
66 * m17n-flt.c (run_stages): Update category code of glyphs if
67 category table is changed.
69 2010-04-05 Kenichi Handa <handa@m17n.org>
71 * font-ft.c (ft_check_cap_otf): Fix conditions to call
74 * database.c (check_version): Fix previous change.
76 2010-04-02 Kenichi Handa <handa@m17n.org>
78 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 6.
79 (M17NLIB_PATCH_LEVEL): Changed to 1.
80 (M17NLIB_VERSION_NAME): 1.6.1.
82 2010-03-30 Kenichi Handa <handa@m17n.org>
84 * Version 1.6.0 released.
86 2010-03-01 Kenichi Handa <handa@m17n.org>
88 * m17n-flt.c (run_rule): Fix checking of glyph availability.
90 2010-02-18 Kenichi Handa <handa@m17n.org>
92 * m17n-gui.c (register_device_library): Preprend M17N_MODULE_DIR
93 to the module file name.
95 * input.c (load_external_module): Preprend M17N_MODULE_DIR to the
98 * charset.c (load_charset): Check the return value of fgets.
100 * Makefile.am: Build modules dynamically loaded with
101 -avoid-version and no -version-info.
103 2010-01-15 Kenichi Handa <handa@m17n.org>
105 * draw.c (run_flt): Set mflt_try_otf to rfont->driver->try_otf.
106 (mdraw__init): Set mflt_enable_new_feature to 1.
108 * font-ft.c (ft_try_otf): New function.
109 (mfont__ft_driver): Set ft_try_otf.
111 * font.h (struct MFontDriver): New member try_otf.
113 * m17n-X.c (xft_driver): Set xft_try_otf.
114 (xft_try_otf): New function.
116 * m17n-flt.h: (mflt_enable_new_feature): Extern it.
117 (mflt_try_otf): Extern it.
119 * m17n-flt.c (load_category_table): If mflt_enable_new_feature is
120 zero, return NULL for such categories that require the new
122 (parse_otf_command): If mflt_enable_new_feature is zero, return
124 (load_otf_command): Fix previous change.
125 (load_flt): Check the return value of load_category_table.
126 (try_otf): Renamed from run_otf_category. Call mflt_try_otf
127 instead of font->drive_otf.
128 (run_command): Call try_otf instead of run_otf_category.
129 (m17n_init_flt): Initialize mflt_enable_new_feature to 0,
130 mflt_try_otf to NULL.
131 (mflt_enable_new_feature): New variable.
132 (mflt_try_otf): New variable.
134 2009-12-10 Kenichi Handa <handa@m17n.org>
136 * m17n-flt.c (parse_otf_command): Handle ":otf?".
137 (run_otf_category): If not features are specified, reset category
139 (run_command): On copy, don't re-calculate a category code.
141 2009-12-03 Kenichi Handa <handa@m17n.org>
143 * m17n-flt.c (run_stages): Reset category code if category-table
145 (mflt_run): Don't set category code here.
146 (decode_packed_otf_tag): If no feature is applied, re-calculate
149 2009-12-02 Kenichi Handa <handa@m17n.org>
151 * m17n-flt.c (mflt_find): If FONT is specified but no flt is
153 (run_command): Don't set ENCODED and MEASURED of separator.
155 2009-11-30 Kenichi Handa <handa@m17n.org>
157 * m17n-flt.c (load_otf_command): Check 4th char against '?'.
158 (load_command): Likewise.
159 (decode_packed_otf_tag): New arg CTX. If CTX->in == gstring,
160 update CTX->encoded. Caller changed.
162 2009-11-30 Kenichi Handa <handa@m17n.org>
164 * font-ft.c (ft_drive_otf): Check if OUT is null or not.
165 (ft_drive_otf): Call OTF_drive_gsub_with_log and
166 OTF_drive_gpos_with_log. Record the applied feature in
169 * font.c (mfont__get_glyph_id): Encode g->c instead of g->code.
171 * internal-flt.h (MAKE_COMBINING_CODE_BY_CLASS)
172 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
173 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P):
175 (PACK_OTF_TAG): Extern it.
177 * draw.c (reorder_combining_chars): Delete it.
179 * m17n-flt.h (mflt_font_id): Use type MFLFont.
180 (mflt_iterate_otf_feature): Likewise.
182 * m17n-flt.c (enum GlyphInfoMask): New member CategoryCodeMask and
184 (GET_CATEGORY_CODE, SET_CATEGORY_CODE, GET_COMBINED): New macros.
185 (SET_COMBINING_CODE): Set also CombinedMask.
186 (FontLayoutFeatureTable): Delete it.
187 (FeatureCodeTable): New type.
188 (FontLayoutCategory): Type of feature_table changed.
189 (load_category_table): Adjusted for the change of
191 (unref_category_table): Likewise.
192 (gen_otf_tag): New member shift. Caller changed.
193 (FontLayoutContext): New member category.
194 (run_rule): Compare g->c instead of g->code.
195 (decode_packed_otf_tag): New function.
196 (run_otf): Call decode_packed_otf_tag. Don't reset combining-code
198 (run_otf_category): New function.
199 (run_command): Set category-code if necessary. Call
200 run_otf_category for FontLayoutCmdTypeOTFCategory.
201 (run_stages): Set ctx->category. Get category from glyph if
203 (mflt_dump_gstring): New function.
205 2009-11-26 Kenichi Handa <handa@m17n.org>
207 * m17n-flt.c (enum FontLayoutCmdType): New member
208 FontLayoutCmdTypeOTFCategory.
209 (FontLayoutFeatureTable): New type.
210 (FontLayoutCategory): New members feature_table_size and
212 (load_category_table): Handle feature_table.
213 (unref_category_table): Likewise.
214 (load_otf_command): Handle FontLayoutCmdTypeOTFCategory.
215 (load_command): Likewise.
216 (free_flt_command): Likewise.
218 2009-11-10 Kenichi Handa <handa@m17n.org>
220 * draw.c (run_flt): Update category code of each glyph.
222 2009-11-07 Kenichi Handa <handa@m17n.org>
224 * font-ft.c (ft_drive_otf): Don't accumulate anchor adjustments.
226 2009-11-05 Kenichi Handa <handa@m17n.org>
228 * m17n-flt.c (run_otf): Fix updating of g->lbearing, etc.
230 * font-ft.c (ft_drive_otf): Use OTF_drive_gpos2 if possible.
232 2009-10-28 Kenichi Handa <handa@m17n.org>
234 * fontset.c (mdebug_flag): New variable.
235 (mfont__lookup_fontset): Print debug info.
237 * m17n-core.c (m17n_init_core): Call SET_DEBUG_FLAG for
240 * internal.h (enum MDebugFlag): Add MDEBUG_FONTSET.
242 * language.c (mscript__from_otf_tag): Adjusted for the new format
243 of the database <standard script unicode>.
245 2009-10-22 Kenichi Handa <handa@m17n.org>
247 * database.c (check_version): Fix the check.
249 * input.c (surrounding_pos): New arg *pos.
250 (integer_value): Fix handling of "@+0".
251 (take_action_list): Adjusted for the change of surrounding_pos.
253 2009-10-05 Kenichi Handa <handa@m17n.org>
255 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
258 * m17n-flt.c (FontLayoutCategory): New typedef.
259 (FontLayoutStage): Type of the member `category' changed.
260 (struct _MFLT): Type of the member `coverage' changed. New member
261 need_config and font_id.
262 (apply_otf_feature): New function.
263 (load_category_table): New arg FONT. If FONT is non-NULL, call
264 apply_otf_feature. Setup category->definition.
265 (ref_category_table): New macro.
266 (unref_category_table): New function.
267 (load_flt): Adjusted for the type change of category.
268 (free_flt_stage): New arg FLT.
269 (list_flt): Adjusted for the type change of category.
270 (run_stages): Adjusted for the type change of category.
271 (configure_category, configure_flt): New function.
272 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
273 mflt_font_id to NULL.
274 (mflt_get): Skip the heading configured FLTs.
275 (mflt_find): Likewise. If necessary, configure the found flt.
276 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
277 Adjusted for the type change of category.
278 (mflt_iterate_otf_feature, mflt_font_id): New variable.
280 * m17n-X.c (xfont_open): Set rfont->id.
281 (xft_driver): Set xft_iterate_otf_feature.
282 (xft_open): Set rfont->id.
283 (xft_iterate_otf_feature): New function.
285 * font.h (struct MRealizedFont): New member id.
286 (struct MFontDriver): New member iterate_otf_feature.
288 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
290 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
291 (get_otf): New funcition.
292 (ft_check_otf, ft_drive_otf): Use get_otf.
293 (iterate_callback, ft_iterate_otf_feature): New functions.
294 (mfont__ft_driver): Set ft_iterate_otf_feature.
296 * draw.c: Docstring updated.
297 (font_id): New function.
298 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
301 2009-10-02 Kenichi Handa <handa@m17n.org>
303 * m17n-flt.c (load_flt): Check the return value of
306 2009-09-03 Kenichi Handa <handa@m17n.org>
308 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
309 positions are adjusted by GPOS table.
311 2009-08-13 Kenichi Handa <handa@m17n.org>
313 * Version 1.5.5 released.
315 2009-08-13 Kenichi Handa <handa@m17n.org>
317 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
318 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
320 2009-03-03 Kenichi Handa <handa@m17n.org>
322 * draw.c (compose_glyph_string): Check if category not Mnil.
324 2009-03-02 Kenichi Handa <handa@m17n.org>
326 * Version 1.5.4 released.
328 2009-02-25 Kenichi Handa <handa@m17n.org>
330 * m17n-core.c (report_object_array): For M-text and Plist, print
333 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
334 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
336 * input.c (get_candidate_list): Free unnecessary objects.
337 (take_action_list): Free plist.
339 2009-02-04 Kenichi Handa <handa@m17n.org>
341 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
343 2009-01-16 Kenichi Handa <handa@m17n.org>
345 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
348 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
351 2009-01-14 Kenichi Handa <handa@m17n.org>
353 * coding.c (decode_coding_iso_2022): Check invocation status
354 before updating charset0 and charset1.
356 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
358 2008-12-31 Kenichi Handa <handa@m17n.org>
360 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
363 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
365 * face.c (mface_get_prop): Fix strict aliasing bug.
366 (mface_put_prop): Likewise.
368 * m17n-gui.c (mframe): Fix strict aliasing bug.
370 2008-10-20 Kenichi Handa <handa@m17n.org>
372 * Version 1.5.3 released.
374 2008-10-06 Kenichi Handa <handa@m17n.org>
376 * draw.c (mdraw__init): Use TRUE only when
377 FRIBIDI_INTERFACE_VERSION is less than 3.
379 2008-10-03 Kenichi Handa <handa@m17n.org>
381 * database.c (mdatabase__find_file): Return a copy of filename if
382 it is absolute pathname.
384 2008-09-25 Kenichi Handa <handa@m17n.org>
386 * input.c (load_macros): Don't parse the action list here.
387 (load_im_info): Parse action lists of all macros.
389 2008-09-24 Kenichi Handa <handa@m17n.org>
391 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
393 2008-09-19 Kenichi Handa <handa@m17n.org>
395 * input.c (fully_initialize): Rename "@reload" to "-reload".
397 2008-09-17 Kenichi Handa <handa@m17n.org>
399 * m17n-flt.c (run_stages): Fix combining with a variable width
402 2008-08-04 Kenichi Handa <handa@m17n.org>
404 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
407 2008-07-22 Kenichi Handa <handa@m17n.org>
409 * input.c (fully_initialize): Fix previous change.
411 2008-07-19 Kenichi Handa <handa@m17n.org>
413 * input.c (fully_initialize): Fix previous change.
415 2008-07-14 Kenichi Handa <handa@m17n.org>
417 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
419 2008-07-14 Kenichi Handa <handa@m17n.org>
421 * input.c (fully_initialize): Handle C-M-1, etc.
423 2008-07-11 Kenichi Handa <handa@m17n.org>
425 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
427 2008-06-23 Kenichi Handa <handa@m17n.org>
429 * Version 1.5.2 released.
431 2008-06-23 Kenichi Handa <handa@m17n.org>
433 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
434 (M17NLIB_PATCH_LEVEL): Changed to 2.
435 (M17NLIB_VERSION_NAME): Changed "1.5.2".
437 2008-06-13 Kenichi Handa <handa@m17n.org>
439 * input.c (minput_config_file): Comment fixed for man-page.
441 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
443 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
445 2008-05-24 Kenichi Handa <handa@m17n.org>
447 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
449 2008-05-23 Kenichi Handa <handa@m17n.org>
451 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
452 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
454 (libm17n_gd_la_LIBADD): Likewise.
456 * input.c (take_action_list): Fix debug info.
458 2008-05-14 Kenichi Handa <handa@m17n.org>
460 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
461 (run_stages): Fix index of g_indices.
463 2008-04-03 Kenichi Handa <handa@m17n.org>
465 * draw.c (compose_glyph_string): Don't run flt striding over the
467 (get_gstring): Don't use the cached gstring if cursor position is
470 2008-04-02 Kenichi Handa <handa@m17n.org>
472 * input.c (integer_value): Delete the 3rd arg VALUE.
473 (resolve_expression): Adjust the call of integer_value.
474 (take_action_list): Likewise.
476 2008-03-06 Kenichi Handa <handa@m17n.org>
478 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
481 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
483 * Version 1.5.1 released.
485 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
487 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
488 HAVE_FREETYPE is defined.
490 * font.h (OTF_Tag): Be sure that it is defined in any cases.
492 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
494 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
497 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
499 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
501 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
503 * input.c (parse_action_list): Check M_candidates.
504 (get_im_info): If key is Mnil, be sure to set im_info->states to a
507 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
509 * input.c (integer_value): Fix interpretation of "@-N".
511 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
513 * input.c (get_following_char): Fix interpretation of POS.
514 (get_following_char): Fix interpretation of "@+N".
516 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
518 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
521 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
523 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
525 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
527 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
528 (run_command): Check if clustering now before calling
529 UPDATE_CLUSTER_RANGE.
531 2008-01-06 Kenichi Handa <handa@m17n.org>
533 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
535 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
537 * m17n-X.c (xft_find_metric): Set g->g.measured.
539 * m17n-flt.c (Mequal): New variable.
540 (m17n_init_flt): Initialize it.
541 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
542 into a new member facility.
543 (load_command): Modify parsing of Mfont_facility.
544 (run_rule): Adjuted for the change of FontLayoutCmdRule.
545 (run_otf): Adjusted metrics if a->back is nonzero.
547 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
549 * Version 1.5.0 released.
551 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
553 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
555 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
556 (run_rule): Check if a font has the specific glyph correctly.
558 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
559 MDEBUG_FONT_FLT to MDEBUG_FLT.
561 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
563 * font-flt.c: Delete it.
565 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
567 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
568 TO for the rule of SRC_HAS_GLYPH.
570 * draw.c (run_flt): Argument changed.
571 (compose_glyph_string): Adjusted for the above change.
573 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
575 * plist.c (read_mtext_element): Don't free the malloced buffer.
577 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
579 * m17n-core.h (merror_code): Extern it.
581 * m17n-misc.h (merror_code): Don't extern it.
583 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
585 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
587 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
589 * draw.c (compose_glyph_string): Check g->rface->layouter, not
590 g->rface->rfont->layouter.
592 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
594 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
595 (run_rule): Use ctx->encoded_offset.
596 (run_command): Likewise.
597 (run_stages): Set ctx->encoded_offset.
599 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
601 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
602 bit-size of MFLTGlyph->internal.
604 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
606 * draw.c (visual_order): Exclude the last anchor glyph from the
609 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
611 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
612 (run_stages): Likewise.
613 (load_flt): Unref top after checking plist.
615 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
617 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
619 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
621 * m17n-flt.c (Mcombining): New variable.
622 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
623 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
624 SRC_HAS_GLYPH and SRC_OTF_SPEC.
625 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
627 (load_command): Adjusted for the above changes.
628 (run_rule): Likewise.
629 (combining_code_from_class): Delete it.
630 (mflt_get): Check flt->name against Mcombining, not Mt.
632 * internal-flt.h (Mcombining): Extern it.
634 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
635 combining characters.
637 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
639 * face.c (mface__realize): Reset measured flag before calling
642 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
643 (setup_combining_coverage): New function.
644 (setup_combining_flt): New function.
645 (mflt_get): If flt is not found, return NULL. If name if Mt,
646 call setup_combining_flt.
647 (mflt_run): For debugging, print font family name.
649 * font-ft.c (ft_render): Fix handling of baseline_offset.
650 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
651 (ft_render): Check pixel_mode to determine anti_alias.
653 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
654 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
655 (xfont_render): Set baseline_offset in pixel.
656 (xft_render): Fix handling of baseline_offset.
658 * draw.c (run_flt): Set font.font.family.
659 (compose_glyph_string): Fix handling of combining characters.
661 * fontset.c (try_font_list): Check if the named flt is surely
664 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
666 * draw.c (analyse_bidi_level): New function.
667 (visual_order): Do reordering using the already decided
669 (compose_glyph_string): Decide bidi-level before calling flt.
671 * m17n-flt.c (mflt_run): Fix typo.
673 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
675 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
677 * draw.c (visual_order): Don't rely on the width of glyphs.
678 (run_flt): Fix culculation of g->g.to.
680 * m17n-flt.c (run_rule): Don't set error code here.
681 (run_cond): Likewise.
682 (run_otf): Fix culculation of xoff and yoff.
683 (run_command): Don't set error code here.
687 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
688 (xfont_find_metric): Set glyph's yadv to 0.
689 (xft_find_metric): Likewise.
691 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
692 (ft_find_metric): Adjust glyph's metrics.
693 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
694 (ft_drive_otf): Set mark glyph's xadv to 0.
696 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
699 2007-10-29 Kenichi Handa <handa@m17n.org>
701 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
702 (mflt_get): Adjusted for the argument change.
703 (mflt_name): Adjusted for the return value change.
705 * m17n-flt.c (Mgenerator, Mend): New variables.
706 (flt_min_coverage, flt_max_coverage): New variables.
709 (Mfont_has): Renamed from Mexist. Referrers chagned.
710 (gen_otf_tag): Handle the trailing whitespaces.
711 (otf_count_features, otf_store_features): Fix for negative features.
712 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
713 (load_otf_command): Likewise.
714 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
715 (load_flt): Argument changed. Caller changed.
716 (free_flt_list): New function.
717 (run_rule): Adjusted for the change of FontLayoutContext.
718 (mflt_run): Adjusted for the change of FontLayoutContext.
720 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
721 (m17n_fini_win): Call m17n_fini_flt.
723 * m17n-gui.h: Include m17n-flt.h.
725 * m17n-gd.c: Adusted for the change of MGlyph.
727 * m17n-X.c: Adusted for the change of MGlyph.
728 (xft_check_otf, xft_drive_otf): New functions.
730 * internal-gui.h (MGlyph): Modified for new FLT handling.
732 * fontset.c (try_font_list): Adusted for the change of MGlyph.
734 * font-ft.c: Adjusted for the change of MGlyph.
735 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
736 (get_glyph_metric): Deleted.
737 (ft_check_otf): New function.
738 (ft_drive_otf): New fucntion.
740 * font.c: Adjusted for the change of MGlyph.
741 (mfont__init): Don't call mfont__flt_init.
742 (mfont__fini): Don't call mfont__flt_fini.
743 (mfont__get_glyph_id, mfont__get_metrics): New functions.
745 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
746 (MFLTFontForRealized): New struct.
747 (struct MFontDriver): New members check_otf and drive_otf.
748 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
750 * face.c: Adjusted for the change of MGlyph.
752 * draw.c: Adjusted for the change of MGlyph.
754 * m17n.c (m17n_init): Don't call mchar_init.
756 * m17n-core.c (m17n_init_core): Call mchar_init.
758 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
760 * input.c: Include "m17n.h" instead of "m17n-gui.h".
762 * chartab.c (mchartable): Initialize table->min_char to -1.
763 (mchartable_min_char): New function.
764 (mchartable_max_char): New function.
766 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
767 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
769 2007-10-12 Kenichi Handa <handa@m17n.org>
771 * m17n-core.h (Mcharset): Extern it.
772 Move detabase related declarations from m17n.h.
774 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
775 (struct _MFLTOtfFeatures): New struct.
776 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
777 (struct _MFLTFont): Delete otf, add check_otf.
778 (MCHAR_INVALID_CODE): Define it.
780 * plist.c (read_mtext_element): Simplify the code.
782 * m17n.h: Move database related declarations to m17n-core.h
783 (Mharset): Don't extern it.
785 * m17n.c (m17n_init): Don't call mdatabase__init.
787 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
790 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
791 (Mexist): New variable.
792 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
793 (FontLayoutCmdRule): New member src.exist.
794 (parse_otf_command): Handle gsub_count and gpos_count separately.
795 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
796 (load_command): Handle the command "exist".
797 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
798 (run_rule): Handle the case SRC_EXIST.
799 (run_otf): Adjusted for the change of MFLTOtfSpec.
800 (run_command): Check the range of FROM.
801 (check_otf_spec): Delete it.
802 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
804 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
805 (mflt_find): Call font->check_otf instead of check_otf_spec.
806 (mflt_run): Keep the metrics in 26.6 fixed point.
808 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
809 (m17n_init_core): Call mdatabase__init.
811 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
813 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
816 * font-flt.c (Mexist): New variable.
817 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
818 (FontLayoutCmdRule): New member src.exist.
819 (load_category_table): Use isalnum, not isalpha.
820 (load_command): Check the command "exist".
821 (run_rule): Hande the case SRC_EXIST.
822 (run_command): Check the range of FROM.
823 (mfont__flt_init): Initialize Mexist.
825 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
827 * database.h (mdatabase__load_charset_func): Extern it.
829 * database.c: Include m17n-core.h instead of m17n.h.
830 (load_chartable): Use mtext__from_data.
831 (load_charset): Moved to charset.c
832 (load_database): Call mdatabase__load_charset_func instead of
834 (mdatabase__load_charset_func): New variable.
835 (mdatabase__init): Initialize mdatabase__load_charset_func and
836 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
837 (mdatabase__save): Use fwrite, not mconv_encode_stream.
838 (Mcharset): Declare it here.
840 * charset.c: Include "database.h.".
841 (load_charset): Moved from database.c.
842 (mcharset__init): Initialize mdatabase__load_charset_func, don't
845 * character.c (mchar_define_property): Call mdatabase_find directly.
846 (mchar_get_prop): Call mdatabase_add directly.
847 (mchar_put_prop): Call mdatabase_load directly.
848 (mchar_get_prop_table): Likewise.
850 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
851 (libm17n_la_SOURCES): Remove database.[ch].
852 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
854 2007-09-18 Kenichi Handa <handa@m17n.org>
856 * face.c (mface__realize): Try Freetype based font at first.
858 * font.c: Include <ctype.h>
860 2007-09-16 Kenichi Handa <handa@m17n.org>
862 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
864 (run_otf): Call font->get_metrics, not font->get_metric.
865 (run_stages): Likewise.
866 (CHECK_FLT_COVERAGE): New macro.
867 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
868 (check_otf_spec): New function.
869 (m17n_fini_flt): Unref flt->coverage.
870 (mflt_find): Argument changed.
871 (mflt_name): New function.
872 (mflt_coverage): Use CHECK_FLT_COVERAGE.
874 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
875 (mflt_find): Prototype adjusted.
876 (mflt_name): Extern it.
878 2007-09-14 Kenichi Handa <handa@m17n.org>
880 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
882 * font-flt.c (run_otf): Make debug info printing comaptible with
884 (run_command): Likewise.
885 (mfont__flt_run): Likewise.
887 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
888 invalid only when it's negative.
890 (run_command): Likewise.
891 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
893 2007-09-10 Kenichi Handa <handa@m17n.org>
895 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
896 (struct _MFLTFont): Prototype of get_glyph_id changed.
898 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
900 (GAPPEND): Delete this macro.
901 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
902 for the change of MFLTGlyph. Caller changed.
903 (run_otf): Simply calls font->get_glyph_id.
904 (run_command): Reset g->encoded and g->measured for direct code.
905 (positioning): Delete this function.
906 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
908 2007-09-07 Kenichi Handa <handa@m17n.org>
910 * draw.c (compose_glyph_string): Improve script detection.
912 2007-09-06 Kenichi Handa <handa@m17n.org>
914 * m17n-flt.h (mflt_get): Extern it.
916 * m17n-flt.c (run_stages): Call positioning only if
917 font->get_metric is non-NULL.
918 (CHECK_FLT_STAGES): Fix typo.
919 (mflt_get): New function.
921 * font-flt.c (mfont__flt_run): Improve debug info printing.
923 2007-09-04 Kenichi Handa <handa@m17n.org>
925 * m17n-flt.c (MFontLayoutTable): Delete this type.
926 (struct _MFLT): New member mdb and coverage.
927 (list_flt): Set flt->mdb.
928 (load_generator): Argument and return value changed. Caller
930 (get_font_layout_table): Delete this function.
931 (run_stages): Argument changed. Caller changed.
932 (CHECK_FLT_STAGES): New macro.
933 (mfont__flt_encode_char): Argument changed.
934 (mflt_find): Likewise.
935 (mflt_coverage): New function.
936 (mflt_run): Argument changed.
937 (mdebug_dump_flt): Likewise.
939 * m17n-flt.h (mflt_coverage): Extern it.
940 (mflt_find): Prototype adjusted.
942 2007-09-03 Kenichi Handa <handa@m17n.org>
944 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
946 * database.c (mdatabase__props): New function.
948 * database.h (mdatabase__props): Extern it.
950 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
952 (struct _MFLTFont): Add suitable_p.
953 (mflt_find): Extern it.
955 * m17n-flt.c: Include "database.h".
956 (struct _MFLT): New struct.
957 (list_flt): New function.
958 (load_flt): Don't update flt_list.
959 (get_font_layout_table): Use flt_list.
960 (m17n_init_flt): Don't initialize flt_list.
961 (m17n_fini_flt): Adjusted for the change of flt_list.
962 (mflt_find): New function.
963 (mflt_run): Fix debug printing.
965 2007-08-23 Kenichi Handa <handa@m17n.org>
967 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
968 (run_stages): Print separator in encoded string as "|".
970 2007-08-23 Kenichi Handa <handa@m17n.org>
972 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
973 the glyph is already handled by OTF.
975 2007-08-21 Kenichi Handa <handa@m17n.org>
977 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
979 2007-08-20 Kenichi Handa <handa@m17n.org>
981 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
984 2007-08-17 Kenichi Handa <handa@m17n.org>
986 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
988 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
989 (MFLTFont): Prototype of the member drive_otf adjusted.
991 * m17n-flt.c (run_stages): Fix handling of padding.
993 * font-ft.c (get_glyph_metric): New function.
994 (DEVICE_DELTA): Return 26.6 fixed point value.
995 (adjust_anchor): Likewise.
996 (mfont__ft_drive_otf): Use get_glyph_metric.
998 * font-flt.c (mfont__flt_run): Pay attention to padding on
1001 2007-08-16 Kenichi Handa <handa@m17n.org>
1003 * m17n-flt.c (run_stages): Fix typo.
1005 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
1007 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
1008 Adjusted for the argument change of adjust_anchor. Calculte based
1009 on 26.6 fixed point.
1011 2007-08-15 Kenichi Handa <handa@m17n.org>
1013 * charset.c (mcharset__load_from_database): Set mdebug_flag
1014 instead of mdebug_mask.
1016 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
1019 * database.c (load_database): Set mdebug_flag instead of
1021 (mdatabase__load_for_keys): Likewise.
1023 * draw.c: Include "internal-flt.h".
1024 (dump_combining_code): Don't subtract 128 from combining code
1027 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
1029 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
1031 (run_cond): Likewise.
1032 (run_otf): Likewise.
1033 (run_command): Likewise.
1034 (mfont__flt_run): Change format of debug info.
1036 * font-ft.c: Include "internal-flt.h".
1037 Set mdebug_flag instead of mdebug_mask.
1038 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
1040 * input.c: Set mdebug_flag instead of mdebug_mask.
1041 (shift_state): New MDEBUG_FLAG macro.
1042 (preedit_commit): Likewise.
1045 * internal-flt.h: New file.
1047 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
1048 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
1049 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
1050 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
1051 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
1052 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
1053 these macros to internal-flt.h.
1055 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
1057 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
1058 (enum MDebugMaskBit): Delete this enum.
1059 (enum MDebugFlag): New enum.
1060 (mdebug__flag): Don't extern it.
1061 (mdebug__flags): Extern it.
1062 (MDEBUG_FLAG): New macro.
1063 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
1064 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
1065 (MDEBUG_PRINT_TIME): Likewise.
1067 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
1068 (xfont_list): Likewise.
1070 * m17n-core.c (mdebug__flag): Delete this variable.
1071 (mdebug__flags): New variable.
1072 (SET_DEBUG_FLAG): Make it a function.
1073 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
1074 (m17n_fini_core): Likewise.
1076 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
1077 (m17n_fini_win): Likewise.
1079 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
1081 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
1082 (m17n_fini): Likewise.
1084 * symbol.c (msymbol__free_table): Adjusted for the change of
1087 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
1088 (BASICHEADERS): Add m17n-flt.h.
1089 (FLT_SOURCES): New variable.
1090 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
1091 (libm17n_flt_la_LDFLAGS): Likewise.
1093 * m17n-flt.h: New file.
1095 * m17n-flt.c: New file created by modifying font-flt.c.
1097 2007-07-13 Kenichi Handa <handa@m17n.org>
1099 * Version 1.4.0 released.
1101 2007-07-12 Kenichi Handa <handa@m17n.org>
1103 * input.c: Fix doxygen @ref commands.
1105 2007-07-10 Kenichi Handa <handa@m17n.org>
1107 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
1109 2007-07-09 Kenichi Handa <handa@m17n.org>
1111 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
1113 * m17n.h: Include m17n-core.h if not yet done. Use macros
1114 M17N_BEGIN_HEADER and M17N_END_HEADER.
1116 * m17n-gui.h: Likewise.
1118 * m17n-misc.h: Likewise.
1120 2007-06-13 Kenichi Handa <handa@m17n.org>
1122 * font-flt.c (load_command): Prepend "^" in the regular expression.
1124 2007-06-11 Kenichi Handa <handa@m17n.org>
1126 * language.c (mlanguage_name_list): Fix previous change.
1128 * coding.c (mcoding__load_from_database): Add aliases in
1129 coding_definition_list.
1131 2007-06-10 Kenichi Handa <handa@m17n.org>
1133 * language.c (mlanguage_name_list): Fix previous change.
1135 2007-06-08 Kenichi Handa <handa@m17n.org>
1137 * input.c (update_candidate): Copy candidate_list earlier.
1138 (re_init_ic): Provide pseudo initialize state if none.
1140 2007-06-05 Kenichi Handa <handa@m17n.org>
1142 * input.c (preedit_insert): Print debug information.
1144 * database.c (expand_wildcard_database): New function.
1145 (mdatabase_list): Fix handling of wildcard database.
1147 * language.c (load_lang_name): New function.
1148 (mlang__fini): Cancel the last two changes.
1149 (mlanguage_name_list): New arg script and territories. Use
1152 * m17n.h (mlangauge_name_list): Adjusted.
1154 2007-06-04 Kenichi Handa <handa@m17n.org>
1156 * input.c (open_im): Check if the input method has at least one
1159 2007-06-01 Kenichi Handa <handa@m17n.org>
1161 * input.c (shift_state): Change the format of debug print.
1162 (preedit_commit): New arg need_prefix. Caller changed.
1163 (update_candidate): Copy candidate_list.
1164 (take_action_list): Likewise.
1165 (handle_key): Change the format of debug print.
1167 * font-flt.c (load_flt): Ignore unknown directives.
1169 2007-05-25 Kenichi Handa <handa@m17n.org>
1171 * m17n-core.c (mdebug__unregister_object): Small optimization.
1173 * database.c (find_file): Merged into get_database_file.
1174 (get_database_file): New arg result. Caller changed.
1175 (mdatabase__check): Fix the logic.
1177 2007-05-24 Kenichi Handa <handa@m17n.org>
1179 * database.c (find_database): If unprocessed wildcard database is
1180 found, register database filed and recursively call find_database.
1181 (free_db_info): Unref db_info->properties.
1182 (register_database): New arg properties. Delete code for
1183 initializing mdatabase__list.
1184 (register_databases_in_files): Argument changed. Caller changed.
1185 (mdatabase__update): Don't list files by glob here.
1186 (mdatabase_list): If unprocessed wildcard database is found,
1187 register database filed and recursively call mdatabase_list.
1189 * database.h (enum MDatabaseStatus): New enum
1190 MDB_STATUS_AUTO_WILDCARD.
1192 * input.c (load_branch): Fix previous change.
1193 (update_global_info): If the global database is not found, return -1.
1195 2007-05-23 Kenichi Handa <handa@m17n.org>
1197 * database.c (Mversion): New variable.
1198 (mdatabase__init): Initialize it.
1199 (register_database): New arg properties. Caller changed.
1200 (register_databases_in_files): Don't check version here.
1201 (mdatabase__update): Likewise.
1203 * database.h (MDatabaseInfo): New member properties.
1205 2007-05-21 Kenichi Handa <handa@m17n.org>
1207 * language.c: Include <ctype.h>
1208 (mlanguage__info): Use strncasecmp (not memcmp).
1209 (mlanguage_name): Downcase language name for backward
1212 * input.c (filter): Don't check Mlanguage property of
1215 2007-05-18 Kenichi Handa <handa@m17n.org>
1217 * language.c (mlanguage_name): Fix it to handle M-text English
1220 * input.c (config_command): Set NAME before using it.
1221 (load_branch): Try to resolve a map name by variables.
1223 2007-05-17 Kenichi Handa <handa@m17n.org>
1225 * language.c (mlang__fini): Fix previous change.
1227 2007-05-16 Kenichi Handa <handa@m17n.org>
1229 * plist.c (free_plist): Cancel the last change.
1230 (write_element): Check if PLIST is nested.
1231 (mplist__from_plist): Label a plist as nested if appropriate.
1232 (mplist__from_alist): Label a plist as nested.
1233 (mplist__conc): Check the value of PL before referring it. Label
1234 a plist as nested if appropriate.
1235 (mplist_copy): Label a plist as nested if appropriate.
1236 (mplist_put_func): Return Mnil if KEY is a managing key.
1237 (mplist_push): Label a plist as nested if appropriate.
1239 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
1242 * language.c (mlang__fini): Unref each element of langname_list.
1244 2007-05-14 Kenichi Handa <handa@m17n.org>
1246 * language.c: Include <string.h> and <locale.h>.
1247 (langname_list): New variable.
1248 (load_lang_script_list): Exclude invalid list elements.
1249 (mlang__init): Initialize langname_list.
1250 (mlang__fini): Unref langname_list.
1251 (mlanguage__info): Adjusted for the change of English
1252 name (symbol->M-text).
1253 (mlanguage_name): Label it as obsolete.
1254 (mlanguage_name_list): New function.
1256 * m17n.h (mlanguage_name_list): Extern it.
1258 * locale.c (make_locale): Fix setting of members of locale.
1260 * plist.c (free_plist): Unref also nested plist.
1262 2007-05-11 Kenichi Handa <handa@m17n.org>
1264 * coding.c (mconv_reset_converter): Set internal->used to 0.
1266 2007-05-08 Kenichi Handa <handa@m17n.org>
1268 * input.c (check_description): Force copying the translated text.
1270 2007-05-02 Kenichi Handa <handa@m17n.org>
1272 * input.c (minput_save_config): Unref unnecessary plist. Use
1273 free_im_list to free im_config_list.
1275 2007-04-20 Kenichi Handa <handa@m17n.org>
1277 * input.c (config_command): Fix previous change again.
1278 (config_variable): Likewise.
1279 (minput_config_command): Fix for the case of setting back to
1281 (minput_config_variable): Likewise.
1282 (minput_save_config): Include nil as documentation of customized
1285 2007-04-05 Kenichi Handa <handa@m17n.org>
1287 * input.c (config_command): Fix previous change.
1288 (config_variable): Likewise.
1290 * plist.c (mplist_get_func): Fix for backward compatiblity.
1292 2007-04-04 Kenichi Handa <handa@m17n.org>
1294 * input.c (minput_get_command, minput_config_command): Fix example
1297 2007-03-29 Kenichi Handa <handa@m17n.org>
1299 These changes are to avoid unsafe casting of a function pointer.
1301 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1302 (struct MFace): New member hook.
1304 * face.c (serialize_face): Adjusted for the change of MFace.
1305 (deserialize_face): Likewise.
1306 (mface__init): Likewise. Use msymbol_put_func.
1307 (mface__realize): Adjusted for the change of MFace. Avoid
1309 (mface_get_prop): Adjusted for the change of MFace.
1310 (mface_put_prop): Likewise.
1311 (mface_get_hook): New function.
1312 (mface_put_hook): New function.
1313 (mface_update): Adjusted for the change of MFace.
1315 * input-gui.c (win_callback): Use mplsit_get_func.
1316 (minput__win_init): Use mplsit_put_func.
1318 * input.c (take_action_list): Use mplist_get_func.
1319 (init_ic_info): Likewise.
1320 (fini_ic_info): Likewise.
1321 (minput_callback): Likewise.
1322 (minput__init): Use mplist_put_func.
1324 * language.c (mlang__init): Use msymbol_put_func.
1326 * m17n-core.h (M17NFunc): New function type.
1327 (M17N_FUNC): New macro.
1328 (msymbol_put_func, msymbol_get_func): Extern them.
1329 (mplist_put_func, mplist_get_func): Extern them.
1331 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1333 * m17n-gui.c (mframe): Add a proper casting.
1335 * plist.h (struct MPlist): Make the member val a union.
1336 (MPLIST_VAL): Adjusted for the above change.
1337 (MPLIST_FUNC): New macro.
1338 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1340 * plist.c (mplist_put_func, mplist_get_func): New functions.
1342 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1343 (msymbol_put_func, msymbol_get_func): New functions.
1345 * textprop.c (mtext_serialize): Use msymbol_get_func.
1346 (mtext_deserialize): Likewise.
1348 2007-03-28 Kenichi Handa <handa@m17n.org>
1350 * input.c (get_candidate_list): Avoid unnecessary unref.
1352 2007-03-23 Kenichi Handa <handa@m17n.org>
1354 * database.c (mdatabase__update): Unref plist at the tail.
1356 2007-03-21 Kenichi Handa <handa@m17n.org>
1358 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1360 (config_command): Fix for the case that configuration is
1362 (config_variable): Likewise.
1363 (minput_config_command): If keyseqlist is an empty list, cancel
1365 (minput_config_variable) If value is an empty list, cancel the
1367 (minput_save_config): Handle cancellation of config and customize
1370 2007-03-15 Kenichi Handa <handa@m17n.org>
1372 * input.c (minput_config_variable): Check custom->vars (not
1375 2007-03-01 Kenichi Handa <handa@m17n.org>
1377 * input.c (reload_im_info): Setup cmds, vars, and title of
1379 (check_variable_value): Fix the return value.
1381 * database.c (mdatabase__check): If necessary, update database and
1384 2007-02-28 Kenichi Handa <handa@m17n.org>
1386 * database.c (get_dir_info): Set dir_info->status to
1387 MDB_STATUS_OUTDATED.
1388 (check_version): New function.
1389 (register_database): Don't call find_database.
1390 (register_databases_in_files): Don't register a database of
1392 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1394 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1395 and MDB_STATUS_OUTDATED.
1397 * font.h (struct MFont): Types of members type, source, and
1398 spacing changed to unsigned.
1400 * internal-gui.h (struct): Types of members category and type
1401 changed to unsigned.
1403 * internal.h (struct MText): Types of members format and coverage
1404 changed to unsigned.
1406 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1407 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1409 2007-02-23 Kenichi Handa <handa@m17n.org>
1411 * input.c (Mpop): New variable.
1412 (fully_initialize): Initialize Mpop.
1413 (parse_action_list): Handle Mpop.
1414 (take_action_list): Likewise.
1415 (handle_key): When a key is unhandled, shift to the initial state
1416 only if the current state has no branch action.
1418 2007-02-12 Kenichi Handa <handa@m17n.org>
1420 * input.c (get_preceding_char): Unref mt if necessary.
1421 (get_following_char): Likewise.
1422 (parse_action_list): Fix handling of `insert' action as
1424 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1425 (take_action_list): Check invalid candidate list.
1427 2007-02-06 Kenichi Handa <handa@m17n.org>
1429 * input.c (integer_value): Check also ic->produced for @-N.
1431 2007-01-26 Kenichi Handa <handa@m17n.org>
1433 * database.c (mdatabase__update): Check mdatabase__dir_list from
1436 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1438 2007-01-12 Kenichi Handa <handa@m17n.org>
1440 * input.c (handle_key): Handle a branch action of the initial
1443 2007-01-10 Kenichi Handa <handa@m17n.org>
1445 * m17n-gd.c (gd_render): Delete superfluous line.
1447 2006-12-26 Kenichi Handa <handa@m17n.org>
1449 * m17n.h (minput_callback): Extern it.
1451 * input.h (minput__callback): Delte extern.
1453 * input.c (get_surrounding_text): Adjusted for the change of
1454 minput__callback to minput_callback.
1455 (delete_surrounding_text): Likewise.
1456 (minput_create_ic): Likewise.
1457 (minput_destroy_ic): Likewise.
1458 (minput_filter): Likewise.
1459 (minput_set_spot): Likewise.
1460 (minput_toggle): Likewise.
1461 (minput_reset_ic): Likewise.
1463 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1464 and ic->candidate_to to 0.
1465 (minput_callback): Renamed from minput__callback.
1467 * input-gui.c (win_callback): Adjusted for the change of
1468 minput__callback to minput_callback.
1470 2006-12-15 Kenichi Handa <handa@m17n.org>
1472 * font-ft.c (ft_add_font): Fix typo.
1474 2006-12-06 Kenichi Handa <handa@m17n.org>
1476 * Version 1.3.4 released.
1478 2006-11-16 Kenichi Handa <handa@m17n.org>
1480 * input.c (parse_action_list): Allow (undo 0).
1481 (adjust_markers): New function.
1482 (preedit_insert, preedit_delete): Call adjust_markers.
1483 (preedit_replace): New function.
1484 (update_candidate): Call preedit_replace instead of preedit_insert
1486 (filter): When ic_info->commit_key_head is nonzero, shift input
1487 event keys even if there's no committed text.
1489 2006-11-10 Kenichi Handa <handa@m17n.org>
1491 * input.h (MInputContextInfo): New member commit_key_head.
1493 * input.c (preedit_commit): Update ic_info->commit_key_head.
1494 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1495 (filter): When committed, shift keys by ic_info->commit_key_head.
1497 2006-10-30 Kenichi Handa <handa@m17n.org>
1499 * input.c (preedit_delete): Fix typo.
1500 (take_action_list): Print more debugging information. Allow
1501 variable in arg of 'select' and `pushback'.
1503 * database.c (gen_database_name): Don't put extra space.
1504 (load_database): Print debugging information.
1505 (register_databases_in_files): New arg headlen. Callers changed.
1506 (mdatabase__load_for_keys): Shorten debugging information.
1507 (mdatabase_load): Don't print debugging information here.
1509 2006-10-27 Kenichi Handa <handa@m17n.org>
1511 * input.c (marker_code): New arg surrounding. Callers changed.
1512 (surrounding_pos): Check if name[0] == '@'.
1513 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1514 (take_action_list): Likewise.
1515 (get_preceding_char): If POS is zero, always call
1516 get_surrounding_text.
1518 2006-10-19 Kenichi Handa <handa@m17n.org>
1520 * input.c (load_variables): Fix setting of `global'.
1522 2006-10-16 Kenichi Handa <handa@m17n.org>
1524 * draw.c (draw_background): Be sure to set *to_x.
1525 (render_glyph_string): If from == to, just return.
1527 2006-10-18 Kenichi Handa <handa@m17n.org>
1529 * database.c (get_dir_info): Return NULL if the directory name is
1531 (register_databases_in_files): Call register_database with
1533 (mdatabase__update): Fix logic. Call register_database with
1535 (mdatabase_define): Call register_database with
1536 MDB_STATUS_EXPLICIT.
1538 * input.c (delete_surrounding_text): Be sure to set members
1539 preceding_text and following_text to NULL.
1540 (shift_state): Save variable values in ic_info->vars_saved.
1541 (preedit_commit): Don't print debug information here. Don't
1542 change ic_info->keys here.
1543 (get_candidate_list): Don't ref plist.
1544 (take_action_list): Don't unref return value of
1545 get_candidate_list. For undo, reset ic->produced and recover
1546 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1548 (init_ic_info): Set ic_info->vars_saved.
1549 (fini_ic_info): Unref ic_info->vars_saved.
1550 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1552 (filter): Be sure to set members preceding_text and following_text
1553 to NULL. Print debug information about produced text. Delete
1554 processed keys from ic_info->keys.
1556 * input.h (MInputContextInfo): New member vars_saved.
1558 2006-10-16 Kenichi Handa <handa@m17n.org>
1560 * database.c (mdatabase__update): Fix the way to get db_info.
1562 2006-10-02 Kenichi Handa <handa@m17n.org>
1564 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1565 `size' changed to 24.
1567 * font.c (xlfd_unparse_name): Adjusted for the change of
1569 (font_score): Likewise.
1570 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1572 * m17n-X.c (MFontX, _MFontX): Deleted.
1573 (SET_SIZE, HAVE_SIZE): Deleted.
1574 (free_display_info): Adjusted for the change of
1575 disp_info->font_list format.
1576 (xfont_registry_list): Likewise.
1577 (xfont_open): Likewise.
1578 (xfont_list): Likewise.
1579 (xfont_encode_char): Ignore size to find a realized font.
1580 (MRealizedFontXft): Change the order of members to make it
1581 compatible with MRealizedFontFT.
1583 2006-09-27 Kenichi Handa <handa@m17n.org>
1585 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1586 (mfont_close): Add comments.
1588 * mtext-lbrk.c (mtext_line_break): Add comment.
1590 2006-09-26 Kenichi Handa <handa@m17n.org>
1592 * input.c (minput_get_description): Handle description about
1593 inclusion-only input methods.
1595 2006-09-21 Kenichi Handa <handa@m17n.org>
1597 * input.c (M_gettext): New variable.
1598 (fully_initialize): Initialize M_gettext.
1599 (check_description): New function.
1600 (load_commands): Call check_description.
1601 (config_all_commands): Be sure to unref pl.
1602 (load_variables): Call check_description.
1603 (config_all_variables): Be sure to unref pl.
1604 (load_im_info): Call check_description.
1606 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1608 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1609 and bind_textdomain_codeset.
1611 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1613 2006-09-15 Kenichi Handa <handa@m17n.org>
1615 * input.c (reload_im_info): Update custom and global info.
1616 (init_ic_info): Fix previous change.
1618 2006-09-14 Kenichi Handa <handa@m17n.org>
1620 * database.c: Include <libgen.h>.
1621 (mdatabase__lock): Make a directory if necessary.
1623 * input.c (resolve_command): Adjusted for the format change of
1624 configured_cmds member.
1625 (load_commands, load_variables): Fix for errornous data handling.
1626 (config_command, config_variable): New function.
1627 (config_all_commands, config_all_variables): Renamed from
1628 config_commands and config_variables. Utilize the above function.
1629 (check_variable_value): Argument changed. Callers changed.
1630 (load_im_info): Call config_all_commands and config_all_variables.
1631 (init_ic_info): Adjusted for the format change of configured_vars
1633 (minput__init): Initialize Mcustomized, Mconfigured, and
1635 (Mcustomized, Mconfigured, Minherited): New variables.
1636 (minput_get_command): Be sure to return NULL if an input method
1637 use no local command.
1638 (minput_get_variable): Be sure to return NULL if an input method
1639 use no local variable.
1640 (minput_config_command, minput_config_variable)
1641 (minput_save_config): Adjusted for the format change of
1642 configured_cmds and configured_vars members.
1644 * plist.c (write_element): Delete superfluous ':'.
1646 2006-09-13 Kenichi Handa <handa@m17n.org>
1648 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1649 (minput_config_file): Extern it.
1651 * draw.c (Minherited): Declaration moved to input.c.
1652 (mdraw__init): Don't initialize Minherited here.
1654 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1656 2006-09-07 Kenichi Handa <handa@m17n.org>
1658 * textprop.c (mtext_serialize): Call mplist__serialize with the
1661 * plist.h (mplist__serialize): Prototype adjusted.
1662 (mplist__assq): Extern it.
1664 * plist.c: Include <ctype.h>
1665 (PUTC, PUTS): New macros.
1666 (write_symbol): New function.
1667 (write_element): New arg indent.
1668 (dump_string, dump_plist_element): Delete them.
1669 (mplist__from_string): New arg pretty.
1670 (mplist__assq): New function.
1671 (mdebug_dump_plist): Use write_element.
1673 * mtext.c (mtext_cat_char): Allocate more memory.
1674 (mdebug_dump_mtext): Don't escal a newline character.
1676 * m17n.h (minput_get_command, minput_get_variable)
1677 (minput_config_command, minput_config_variable)
1678 (minput_save_config): Extern them.
1680 * m17n-core.c: Include <string.h>.
1681 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1682 use the stream stdout instead of a file of that name.
1684 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1687 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1688 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1689 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1690 (MDEBUG_DUMP): Flush the stream.
1692 * input.h (struct _MInputMethodInfo): Delete member im. New
1693 members mdb, language, name, extra, cmds, configured_cmds,
1694 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1695 (MInputContextInfo): New member tick.
1697 * input.c: Big change to improve user-side input method
1698 customization. Here, list just public API changes.
1699 (minput_get_commands, minput_get_variables)
1700 (minput_assign_command_keys, minput_set_variable): Label them
1702 (minput_get_command, minput_get_variable)
1703 (minput_config_command, minput_config_variable)
1704 (minput_save_config): New functions.
1706 * database.h (PATH_MAX): Define it if not yet defined.
1707 (PATH_SEPARATOR): Likewise.
1708 (enum MDatabaseStatus): New enum.
1709 (struct MDatabaseInfo): Moved from database.c. New members status,
1710 time, lock_file, and uniq_file.
1711 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1712 (mdatabase__unlock): Extern them.
1714 * database.c: Include <time.h>.
1715 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1716 (GEN_PATH): Args changed. Callers changed.
1717 (struct MDatabaseInfo): Moved to database.h.
1718 (struct MDatabase, mdb_list): Deleted.
1719 (mdatabase__list): New var.
1720 (get_database_filename): Deleted. Callers changed to use
1722 (find_file, get_database_file): New files.
1723 (get_dir_info): Initialize new members of MDatabaseInfo.
1724 (find_database): Arg chagnded. Callers changed.
1725 (free_db_info, register_database, register_databases_in_files):
1727 (update_database_list): Deleted.
1728 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1729 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1730 (mdatabase__update): New function.
1731 (mdatabase__check): Return value changed.
1732 (mdatabase__file, mdatabase__lock, mdatabase__save)
1733 (mdatabase__unlock): New functions.
1735 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1737 * input.c (get_surrounding_text): Return -2 when surrounding text
1739 (get_following_char): Likewise.
1740 (get_preceding_char): Likewise.
1741 (minput__callback): Return 0 if there is a callback function,
1744 2006-08-17 Kenichi Handa <handa@m17n.org>
1746 * input.c (reset_ic): Use shift_state to setup the current state.
1748 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1750 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1751 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1752 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1754 2006-08-02 Kenichi Handa <handa@m17n.org>
1756 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1758 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1760 * font-ft.c (ft_encapsulate): Add code for debugging.
1761 (mfont__ft_drive_otf): Be sure to encode character before getting
1764 2006-07-21 Kenichi Handa <handa@m17n.org>
1766 * draw.c (mdraw_text_extents): Fix previous typo.
1768 2006-07-19 Kenichi Handa <handa@m17n.org>
1770 * draw.c (gstring_width): New arg lbearing.
1771 (render_glyph_string): Adjusted for the change of gstring_width.
1772 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1774 * m17n-core.h (Mlanguage): Extern it.
1776 * m17n.h (Mlanguage): Extern deleted.
1778 * mtext.c (mtext__init): Initialize Mlanguage.
1779 (Mlanguage): Declaration moved from locale.c
1781 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1782 (Mlanguage): Declaration moved to mtext.c.
1784 * language.c (mlang__init): Don't initialize Mlanguage here.
1786 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1788 2006-07-14 Kenichi Handa <handa@m17n.org>
1790 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1791 (MRealizedFontFT): New member face_encapsulated.
1792 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1793 (ft_gen_font): New function.
1794 (ft_add_font): Use ft_gen_font.
1795 (ft_list_script): Store lists in ft_script_list.
1796 (ft_check_otf): New arg ft_face. Caller changed.
1797 (ft_check_language): Likewise.
1798 (ft_check_script): Likewise.
1799 (ft_encapsulate, ft_close): New functions.
1800 (mfont__ft_driver): Initialize members encapsulate and close.
1801 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1803 * font.h (struct MRealizedFont): New member encapsulating.
1804 (struct MFontDriver): New members encapsulate and close.
1806 * font.c (mfont__match_p): If FONT is realized, check capability
1807 by font drivers's check_capability method.
1808 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1811 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1812 declarations of foundry and fam local vars.
1813 (xft_driver): Make it static.
1815 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1816 (mfont_close): Extern them.
1818 * m17n-gd.c (device_open): Don't specify foundry and family of the
1821 2006-07-11 Kenichi Handa <handa@m17n.org>
1823 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1825 2006-07-13 Kenichi Handa <handa@m17n.org>
1827 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1829 (ft_check_script): Delete unused var.
1830 (ft_list_capability): Likewise.
1832 * font.c (mfont__get_capability): Setup cap->otf.
1833 (Motf): Make it global.
1834 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1836 * font.h (MFontCapability): New member otf.
1838 * language.c (mlang__fini): Delete unused vars.
1840 * m17n-gui.h (Motf): Extern it.
1842 * database.c (update_database_list): Delete unused vars.
1844 2006-07-07 Kenichi Handa <handa@m17n.org>
1846 * font-ft.c (DEVICE_DELTA): Fix typo.
1848 2006-07-06 Kenichi Handa <handa@m17n.org>
1850 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1853 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1855 * database.c: Update comments.
1857 2006-07-05 Kenichi Handa <handa@m17n.org>
1859 * database.c (PATH_MAX): Define it if not yet defined.
1860 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1862 (get_database_filename): Use GEN_PATH.
1863 (get_dir_info): Don't include the last '/' in directory name.
1864 (register_database): New function.
1865 (update_database_list): Use register_database. Search all
1866 directories in mdatabase__dir_list for wildcard databases.
1867 (mdatabase__init): Check "~/.m17n.d".
1869 2006-07-03 Kenichi Handa <handa@m17n.org>
1871 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1872 push reverse property.
1874 * plist.c (dump_plist_element): Fix previous change.
1876 2006-06-28 Kenichi Handa <handa@m17n.org>
1878 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1881 * draw.c (MbidiNSM): New variable.
1882 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1883 attention to bidi type NSM.
1884 (mdraw__init): Initialize MbibiNSM.
1886 * language.c (mscript__char_list): Fix finding a char-list element.
1888 * plist.c (dump_string): Return number of printed characters.
1889 (dump_plist_element): Print elements more compactly.
1891 2006-06-23 Kenichi Handa <handa@m17n.org>
1893 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1894 (include_HEADERS): Likewise.
1896 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1898 * language.c: Update documentation.
1900 2006-06-23 Kenichi Handa <handa@m17n.org>
1902 * font-ft.c (struct MFontFT): Delete member lang.
1903 (free_ft_info): Don't unref member lang. Destroy members langset
1905 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1906 changed. Set members langset and charset.
1907 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1909 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1911 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1912 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1913 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1914 characters at first. If it fails, try listing by language names.
1915 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1916 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1917 change of MFontCapability.
1918 (ft_list_capability): Likewise. Try listing by languages, then by
1919 scripts. Check OTF at last.
1920 (ft_check_script): New function.
1921 (ft_select): Adjusted for the check of MFontCapability.
1922 (ft_list_family_names): New function.
1923 (ft_check_capability): If cap->script is not Mnil, call
1925 (mfont__ft_driver): Initialize with ft_list_family_names.
1927 * font.h (struct MFontDriver): New member list_fmaily_names.
1928 (struct): Change member "MSymbol *lang" to "MSymbol language".
1930 * font.c: Include "language.h".
1931 (Motf): New variable.
1932 (otf_script_list, load_otf_script_list): Delete it.
1933 (find_script_from_otf_tag): Delete it.
1934 (merge_capability): New function.
1935 (mfont__init): Init Motf.
1936 (mfont__fini): Don't unref otf_script_list.
1937 (free_font_capability): Check cap->script_tag to determine if
1938 OTF-related capability is set.
1939 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1940 the change of type MFontCapability.
1941 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1942 and Motf properties.
1943 (mfont_list): Call merge_capability for LANGUAGE arg.
1944 (mfont_list_family_names): New function.
1946 * input-gui.c: Typo in comments fixed.
1948 * input.c: Typo in comments fixed.
1950 * language.h (mlanguage__list): Delete it.
1951 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1954 * language.c: Include "mtext.h".
1955 (M_script_lang_list): Delete it.
1956 (language_list, script_list): New variables.
1957 (load_lang_script_list, init_language_list, init_script_list): New
1959 (mlang__init): Don't load language database here.
1960 (mlang__fini): Unref language_list and script_list if not NULL.
1961 (mlanguage__list): Delete it.
1962 (mlanguage__info, mscript__info, mscript__char_list)
1963 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1964 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1965 (mscript_list, mscript_language_list): New functions.
1967 * m17n-gui.h (mfont_list_family_names): Extern it.
1969 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1970 (mlanguage_text, mscript_list, mscript_language_list): Extern
1973 2006-06-21 Kenichi Handa <handa@m17n.org>
1975 * m17n-X.c (xfont_driver): Initialize with
1976 xfont_list_family_names.
1977 (xfont_list_family_names): New function.
1978 (xft_driver): Initialize with NULL for list_family_names member.
1979 (device_init): Set list_family_names member of xft_driver to that
1980 of mfont__ft_driver.
1982 2006-06-06 Kenichi Handa <handa@m17n.org>
1984 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1986 2006-03-24 Kenichi Handa <handa@m17n.org>
1988 * font-ft.c (ft_open): Improve debug message.
1990 * fontset.c (mfontset__get_font): Fix for the case that no font in
1991 per_script list is available.
1993 2006-02-06 Kenichi Handa <handa@m17n.org>
1995 * Version 1.3.3 released.
1997 2006-02-22 Kenichi Handa <handa@m17n.org>
1999 * textprop.c: Fix some typos in documentation.
2001 * plist.c: Fix some typos in documentation.
2003 * m17n-core.h: Fix some typos in documentation.
2004 (M17NLIB_PATCH_LEVEL): Updated to 3.
2005 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
2007 * symbol.c: Fix some typos in documentation.
2009 * mtext.c: Fix some typos in documentation.
2011 * input.c: Fix several typos in documentation.
2013 2006-02-06 Kenichi Handa <handa@m17n.org>
2015 * Version 1.3.2 released.
2017 2006-02-03 Kenichi Handa <handa@m17n.org>
2019 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
2020 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
2022 * font.c (xlfd_parse_name): Fix handling of the name "nil".
2024 * draw.c (layout_glyphs): Fix handling left_padding of
2027 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
2029 2006-02-02 Kenichi Handa <handa@m17n.org>
2031 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
2032 if WITH_GUI is true.
2034 2006-01-25 Kenichi Handa <handa@m17n.org>
2036 * input.c (resolve_expression): If the value of PLIST is a plist,
2037 but the first element is not symbol, return 0.
2039 2006-01-17 Kenichi Handa <handa@m17n.org>
2041 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
2042 HAVE_GD is 2 or the greater.
2044 2006-01-16 Kenichi Handa <handa@m17n.org>
2046 * Version 1.3.1 released.
2048 2006-01-16 Kenichi Handa <handa@m17n.org>
2050 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
2051 simulating anti-aliasing.
2053 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
2054 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
2056 2006-01-12 Kenichi Handa <handa@m17n.org>
2058 * input.c (get_surrounding_text): Always pop ic->plist.
2059 (reset_ic): Don't reset ic->plist.
2061 2006-01-10 Kenichi Handa <handa@m17n.org>
2063 * input.c (preedit_commit): For debugging, print only commiting
2064 charactes. Don't set ic->candidate_show to 0.
2065 (handle_key): Don't run branch-actions just by shifting to the
2067 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
2068 Reset vars and plist.
2070 2006-01-07 Kenichi Handa <handa@m17n.org>
2072 * input.c (load_branch): Confirm that maps is not NULL.
2074 2006-01-05 Kenichi Handa <handa@m17n.org>
2076 * input-gui.c (win_filter): Try to convert arg to key only when
2079 * plist.c (read_integer_element): If '#' and '-' are followed by
2080 non-integer-constituent, read them as a part of a symbol.
2081 (read_symbol_element): New arg C.
2082 (read_element): Adjust args to read_symbol_element.
2084 * input.c (load_macros): On overwriting a macro, free the old
2086 (minput__init): Store Mmap in load_im_info_keys.
2087 (minput_get_title_icon): If the input method has no title, be sure
2089 (minput_get_description): If the input method has no description,
2090 be sure to return NULL.
2091 (minput_get_variables): Fix documentation.
2092 (handle_key): Pay attention to the case that key is Mnil.
2093 (filter): Likewise. Fix handling of such symbol as S-A.
2095 2005-12-22 Kenichi Handa <handa@m17n.org>
2097 * Version 1.3.0 released.
2099 2005-12-22 Kenichi Handa <handa@m17n.org>
2101 * font-ft.c (ft_list): If the specified font has no property,
2104 2005-12-20 Kenichi Handa <handa@m17n.org>
2106 * character.c (mchar_get_prop): Check char_prop_list.
2107 (mchar_put_prop, mchar_get_prop_table): Likewise.
2109 2005-12-18 Kenichi Handa <handa@m17n.org>
2111 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
2112 file name sans language.
2114 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
2116 * input.c: Fix typo in comments.
2118 2005-12-14 Kenichi Handa <handa@m17n.org>
2120 * input.c (minput_get_title_icon): Check the default icon for the
2123 2005-12-13 Kenichi Handa <handa@m17n.org>
2125 * input.c (Mless_equal, Mgreater_equal): New variables.
2126 (parse_expression, resolve_expression, parse_action_list)
2127 (take_action_list): Handle the aboves.
2128 (filter): Treat key S-X as X.
2129 (minput__init): Initialize Mless_equal and Mgreater_equal.
2130 (minput_get_title_icon): New function.
2132 * m17n.h (minput_get_title_icon): Extern it.
2134 * database.c (get_database_filename): Return a filename instead of
2136 (load_database): Adjusted for the above change.
2137 (mdatabase__load_for_keys): Likewise.
2138 (mdatabase__find_file): New function.
2140 * database.h (mdatabase__find_file): Extern it.
2142 * font.h (mfont__resize): Delete extern.
2144 * font.c (mfont__list): Check resize ratio.
2145 (mfont__resize): Delete it.
2146 (mfont_resize_ratio): Include the code of mfont__resize.
2148 * font-ft.c (ft_open): Check resize ratio.
2150 * m17n-X.c (xfont_open): Check resize ratio.
2151 (xft_open): Likewise.
2153 2005-12-07 Kenichi Handa <handa@m17n.org>
2155 * input.c (take_action_list): If take_action_list return -1,
2157 (handle_key): Likewise.
2159 * face.c (mface__for_chars): When font is specified and layouter
2160 is found for it, if the layouter doesn't support one of a
2161 character, use a face sans layouter for it.
2163 2005-12-06 Kenichi Handa <handa@m17n.org>
2165 * fontset.c (mfont__lookup_fontset): If only a fallback font is
2166 found, don't use it for more than one character.
2168 2005-12-05 Kenichi Handa <handa@m17n.org>
2170 * face.c (mface__realize): Set rfont->layouter to Mnil.
2171 (mface__for_chars): Fix handling of layouter.
2173 * character.h (mchar__define_prop): Extern it.
2175 * database.c (update_database_list): Call mchar__define_prop if
2178 * character.c (mchar__init): Don't call mchar_define_property.
2179 Instead just initialize property keys.
2180 (mchar__fini): Free char_prop_list only if it's not NULL.
2181 (mchar__define_prop): New function.
2182 (mchar_define_property): Call mchar__define_prop.
2184 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
2187 2005-12-02 Kenichi Handa <handa@m17n.org>
2189 * language.c (mlang__init): Handle extra chars.
2191 * m17n-gui.h (mfont_check): Adjust prototype.
2193 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
2194 (xfont_check_capability): New function.
2195 (xft_driver): Specify xft_check_capability.
2196 (xft_check_capability): New function.
2198 * font-ft.c (M0_3): Delete it.
2200 (ft_get_charmaps): Refer to M0.
2201 (fc_parse_pattern): Fix previous change.
2202 (ft_list_language): Check also extra chars.
2203 (ft_check_otf): Define it even if HAVE_OTF is undef.
2204 (ft_check_lang): Check the result of FcLangSetHasLang against
2205 FcLangDifferentLang. Check also extra chars.
2206 (ft_list_capability): Delete ifdef HAVE_OTF.
2207 (ft_select): Likewise.
2208 (ft_open): Improve debug information.
2209 (ft_check_capability): New function.
2210 (mfont__ft_driver): Specify ft_check_capability.
2211 (mfont__ft_init): Initialize M0.
2213 * fontset.c (get_font_from_group): New function.
2214 (mfontset__get_font): New function.
2216 * fontset.h (mfontset__get_font): Extern it.
2218 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
2219 (mfont__fini): Delete ifdef HAVE_OTF.
2220 (free_font_capability): Likewise.
2221 (mfont__get_capability): Likewise.
2222 (mfont__check_capability): New function.
2223 (mfont_check): Change the order of arguments. Use
2226 * font.h (struct MFontDriver): New member check_capability.
2227 (MFontCapability): Delete ifdef HAVE_OTF.
2228 (mfont__check_capability): Extern it.
2230 * face.c (mface__realize): Fix handling of FONT arg.
2231 (mface__for_chars): Fix handling of explicitly specified font.
2233 2005-11-25 Kenichi Handa <handa@m17n.org>
2235 * font-flt.c (run_command): Print debug info for
2238 * draw.c (layout_glyphs): Fix handling of left/right_padding.
2240 * face.c (mface__for_chars): Check rfont before accessing the
2243 2005-11-21 Kenichi Handa <handa@m17n.org>
2245 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
2248 * fontset.c (fontset_table): New variable.
2249 (free_fontset): Call M17N_OBJECT_UNREGISTER.
2250 (mfont__fontset_init): Add fontset_table as an object array.
2251 (mfont__realize_fontset): Ref FONTSET.
2252 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2253 (mfontset): Call M17N_OBJECT_REGISTER.
2254 (mfontset_copy): Likewise.
2256 * input.c (handle_key): For debugging, print information about
2258 (filter): Add an alias for Meta and Alt modifiers.
2259 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2261 (minput__init): Initialize them.
2262 (parse_expression): New function.
2263 (resolve_expression): New function.
2264 (parse_action_list): Handle expressions by parse_expression.
2265 (take_action_list): Handle expressions by resolve_expression.
2266 (parse_nested_list_value): Fix previous change.
2267 (resolve_command): Fix handling of the return value of
2270 2005-11-18 Kenichi Handa <handa@m17n.org>
2272 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2273 HAVE_OTF is defined.
2274 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2276 (ft_select): Likewise.
2278 * font.c (mfont_list): Fix for the case that FONT is NULL.
2279 (OTF_tag): Delete it.
2280 (load_otf_script_list): Define only when HAVE_OTF is defined.
2281 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2284 * draw.c (truncate_gstring): Be sure to truncate at
2285 glapheme-cluster boundary.
2287 2005-11-11 Kenichi Handa <handa@m17n.org>
2289 * input.c (delete_surrounding_text): Clear cache if necessary.
2291 2005-11-09 Kenichi Handa <handa@m17n.org>
2293 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2294 glyph prev is also supported by the current flt.
2296 2005-11-08 Kenichi Handa <handa@m17n.org>
2298 * m17n-X.c (xft_render): Cancel previous change.
2300 2005-11-07 Kenichi Handa <handa@m17n.org>
2302 * input.c: Include <stdlib.h>.
2303 (get_surrounding_text, delete_surrounding_text)
2304 (get_preceding_char, get_following_char): New functions.
2305 (integer_value): New arg surrounding. If it is nonzero, try to
2306 get a surrounding character. Callers changed.
2307 (take_action_list): Check `value' before setting an element.
2308 (destroy_ic): Unref ic_info->preceding_text and
2309 ic_info->following_text.
2310 (minput__init): Initialize Minput_get_surrounding_text and
2311 Minput_delete_surrounding_text.
2312 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2314 (filter): Unref ic_info->preceding_text and
2315 ic_info->following_text.
2317 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2320 * input.h (MInputContextInfo): New members preceding_text and
2323 2005-11-04 Kenichi Handa <handa@m17n.org>
2325 * input.c (parse_nested_list_value): Fix handling of the global
2327 (get_nested_list): Get global definitions by load_partial_im_info.
2328 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2329 MInputCandidatesChanged.
2330 (take_action_list): Likewise.
2331 (reset_ic): Likewise.
2332 (create_ic): Don't pay special attention to
2333 Mcandidates_group_size.
2334 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2335 (minput_set_variable): Get a definition of varible by
2336 mplist_find_by_value, not mplist_get.
2338 * m17n.h (enum MInputCandidatesChanged): New enum.
2340 2005-11-01 Kenichi Handa <handa@m17n.org>
2342 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2344 (mwin__destroy_window): If xft_draw's drawable is win, change it
2345 to device->drawable before destroying win.
2347 2005-10-31 Kenichi Handa <handa@m17n.org>
2349 * input.c (load_im_info): Fix adding of state.
2351 * m17n-core.c (m17n_fini_core): Fix reporting of module
2354 * m17n.c (m17n_fini): Fix reporting of module finalization.
2356 * m17n-gui.c (m17n_init_win): Fix reporting of module
2359 2005-10-29 Kenichi Handa <handa@m17n.org>
2361 * input.c (get_candidate_list): Fix the timing of referring plist.
2363 2005-10-28 Kenichi Handa <handa@m17n.org>
2365 * input.c (load_branch): Ignore an undefined map name.
2366 (load_im_info): Set im_info->title from `name' only if it's not
2368 (shift_state): Always update ic->status.
2369 (adjust_candidates): Renamed from adjust_candidate_command.
2370 Argument changed. Caller changed.
2371 (get_candidate_list, regularize_action): New functions.
2372 (take_action_list): Use them. On handling Munhandle, don't set
2374 (handle_key): If KEY is not handled by MAP, and MAP has
2375 branch_actions, perform them.
2377 * database.c (mdatabase__fini): Free dir_info->filename;
2379 2005-10-20 Kenichi Handa <handa@m17n.org>
2381 * input.c (marker_code): Accept '@@'.
2382 (integer_value): Handle '@@'.
2383 (parse_action_list): Accept a symbol argument.
2384 (take_action_list): Resolve the symbol argument. Handle the
2387 2005-10-18 Kenichi Handa <handa@m17n.org>
2389 * input.c: Include "charset.h".
2390 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2392 (MIMState): New member (M17NObject control).
2393 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2394 (get_nested_list, resolve_variable): New functions.
2395 (integer_value): New arg (MPlist **value). Set it to the plist
2396 element containing the value.
2397 (resolve_command): New function.
2398 (load_translation): New arg (MPlist *map_actions).
2399 (load_branch): New args language and name. If `keylist' is a
2400 symbol, resolved that as a command name.
2401 (free_map): New arg top. Free map->map_actions only if top is
2403 (free_state): New function.
2404 (load_state): New arg name.
2405 (im_info_list): New variable.
2406 (free_im_info, get_im_info_by_tags): New functions.
2407 (load_im_info): Arg key changed to plist. Handle `include'.
2408 Return (MInputMethodInfo *).
2409 (preedit_commit): Ref ic->candidate_list.
2410 (get_select_charset, adjust_candidate_command): New functions.
2411 (take_action_list): Handle `include'. Adjust candidate action
2412 properly. Handle control variables `candidates-charset' and
2413 `candidates-group-size'.
2414 (open_im): Use get_im_info.
2415 (create_ic): Get global variables.
2416 (load_partial_im_info): New function.
2417 (get_im_info): New function.
2418 (check_command_keyseq, check_command_list, check_variable_list):
2420 (minput__init): Don't handle M_database_hook and Mdetail_text.
2421 Initialize M_candidates, Mcandidates_group_size,
2422 Mcandidates_charset.
2423 (parse_variable_list, get_variable_list, parse_command_list)
2424 (get_command_list): Delete them.
2425 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2426 (minput__fini): Simply unref command_list and variable_list.
2427 (minput_get_description): Adjusted for the new form of description.
2428 (minput_get_commands): Use get_nested_list.
2429 (minput_assign_command_keys): Likewise.
2430 (minput_get_variables, minput_set_variable): Likewise.
2432 * input.h (MInputMethodInfo): New members im and maps.
2434 * database.h (M_database_hook): Delete extern.
2435 (MDatabaseHookFunc): Delete extern.
2436 (mdatabase__check): Extern it.
2438 * database.c: Include <glob.h>.
2439 (MAX_TIME): New macro.
2440 (Masterisk): New variable.
2441 (get_database_stream): Argument changed to (MDatabaseInfo *).
2443 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2444 (find_database): New function.
2445 (update_database_list): New function.
2446 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2447 calling update_database_list.
2448 (mdatabase__check): New function.
2449 (mdatabase_find): Use update_database and find_database. Don't
2450 handle MDatabaseHookFunc.
2451 (mdatabase_list): Call update_database at first.
2452 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2453 (MDatabaseList): New type.
2455 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2457 * m17n.h (Mdetail_text): Delete extern.
2459 * m17n-core.h (mplist_conc): Delete extern.
2461 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2463 (mplist_conc): Renamed to mplist__conc.
2464 (mplist__pop_unref): New function.
2466 2005-10-14 Kenichi Handa <handa@m17n.org>
2468 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2470 (read_element): If keys is an empty plist, return any element
2472 (dump_plist_element): Check if plist is nested.
2473 (mplist_conc): Always ref tail.
2474 (mplist_set): If key is a managing key, ref val in advance.
2476 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2477 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2478 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2481 * fontset.c (free_fontset): Unref fontset_list if necessary.
2482 (mfont__fontset_fini): Don't free fontset_list. Unref
2484 (mfont__realize_fontset): Initialize request.
2485 (mfontset): Ref default_fontset or fontset only if necessary.
2486 (mfontset_copy): Don't ref copy.
2488 * draw.c (render_glyphs): Check gend->type before checking
2491 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2492 unrefed plists to NULL.
2494 2005-10-04 Kenichi Handa <handa@m17n.org>
2496 * textprop.c (mtext_serialize): Be sure to make mt
2497 MTEXT_FORMAT_UTF_8 and NULL terminated.
2499 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2501 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2503 2005-10-03 Kenichi Handa <handa@m17n.org>
2505 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2506 is not at the beginning of line.
2508 2005-09-22 Kenichi Handa <handa@m17n.org>
2510 * input.c: Include <sys/stat.h> and <unistd.h>.
2511 (Minclude, Mcommit, Munhandle): New variables.
2512 (minput__init): Initialize them. Push only Mstate to
2513 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2514 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2516 (load_input_method): Handle "include" directive. If no states are
2518 (shift_state): If state_name is Mt, shift back to the previous
2519 state. Call preedit_commit to commit preedit text.
2520 (preedit_commit): New function.
2521 (take_action_list): Improve debug printing. Handle commit and
2523 (handle_key): Check the return value of take_action_list. Don't
2524 take branch_actions just after changing to the root map.
2525 (reset_ic): Reset all ic_info members.
2526 (filter): When a key is not handled, just move ic_info->keys
2527 instead fo calling reset_ic.
2528 (load_im_info): If key is not Mstate, push Mmap to
2530 (MDatabaseStatList): New type.
2531 (imdir_stat_list): New variable.
2532 (input_method_hook): Don't cancel the hook. Check the
2533 modification time of directories.
2534 (minput__fini): Free imdir_stat_list;
2536 * input.h (MInputContextInfo): New member prev_state.
2538 * m17n-core.h (mplist_conc): Extern it.
2540 * plist.c (mplist_conc): New function.
2542 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2544 * font.h (MRealizedFont): New member average_width.
2546 * font-ft.c (ft_open): Set rface->average_width.
2548 * font.c (xlfd_unparse_name): Print '*' before registry name.
2550 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2551 (xfont_open): Set rfont->average_width.
2552 (xft_open): Likewise.
2553 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2555 * internal-gui.h (struct MFrame): New member average_width.
2557 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2558 (mframe_get_prop): Return the average_width of a font.
2560 * face.c (mface__realize): Set rface->average_width.
2561 (mface__update_frame_face): Set frame->average_width.
2563 * face.h (MRealizedFace): New member average_width.
2565 2005-09-19 Kenichi Handa <handa@m17n.org>
2567 * font.c (xlfd_unparse_name): New arg full_xlfd.
2568 (mfont__encode_char): Use shortcut only for X core fonts.
2569 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2570 (mfont_put_prop): Handle `language' property.
2571 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2572 Print file can capability info too.
2574 * m17n-core.c (mdebug__output): New variable.
2575 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2576 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2577 (m17n_fini_core): Close mdebug__output if it's not stderr.
2579 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2580 (xfont_open): Handle baseline_offset.
2581 (xfont_find_metric): Likewise.
2582 (xfont_render): Likewise.
2583 (xft_open): Likewise.
2584 (xft_render): Likewise.
2586 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2587 (mdebug__output): Extern it.
2588 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2589 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2590 (MDEBUG_DUMP): New macro.
2591 (MDEBUG_PRINT_TIME): Print to medebug__output.
2593 * font.h (MRealizedFont): New member baseline_offset.
2595 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2597 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2598 (ft_list_family): Check alias.
2599 (ft_list_language): If language is "en", don't try to the second
2601 (ft_default_list): New variable.
2602 (ft_list_default): New function.
2603 (ft_select): If family is not specified, try only the default
2604 fonts. Treat the weights normal and medium same.
2605 (ft_open): Fix debug message. If registry is not specified, try
2606 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2607 (ft_find_metric): Likewise.
2608 (ft_render): Likewise.
2609 (ft_list): Fix debug message. Accept the registring iso8859-1.
2610 If family is not specified, try only the default fonts.
2612 * face.c (mface__realize): Fix logic of opening a font.
2614 2005-09-16 Kenichi Handa <handa@m17n.org>
2616 * face.c (mface__realize):
2618 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2621 * input.c (shift_state): Fix the condition of taking init actions.
2622 (take_action_list): Fix handling of pushback action.
2623 (handle_key): Don't change key while checking its alias.
2624 (minput__init): Initialize new variables.
2625 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2628 2005-09-12 Kenichi Handa <handa@m17n.org>
2630 * mtext.c (mtext__uppercase): Add proper open/close parens.
2631 (mtext_titlecase): Add proper casting.
2633 * input.c (parse_action_list): Handle the case that the arg is a
2634 key sequence (MText or MPlist).
2635 (take_action_list): Likewise.
2636 (shift_state): Shorter debug message.
2637 (handle_key): Terminate a debug message by "\n".
2638 (reset_ic): Don't take initial actions here.
2639 (minput_open_im): Print a debug message.
2640 (minput_close_im): Likewise.
2641 (minput_create_ic): Likewise.
2642 (minput_destroy_ic): Likewise.
2644 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2646 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2649 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2650 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2653 * character.c: Add Japanese documentation for
2654 mchar_get_prop_table ().
2656 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2658 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2659 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2660 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2662 (init_case_conversion): New function.
2663 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2664 (uppercase_precheck, lowercase_precheck, final_sigma)
2665 (after_soft_dotted, more_above, before_dot, after_i)
2666 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2668 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2670 * plist.c (read_mtext_element): Fix previous change.
2672 2005-09-05 Kenichi Handa <handa@m17n.org>
2674 * plist.c (read_mtext_element): Handle \uXXXX notation.
2676 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2677 (MTABLE_ALLOCA): Change the name of local variable.
2679 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2680 HAVE_FREETYPE are defined.
2682 * m17n-X.c: Check HAVE_X11.
2684 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2685 directory listing libraries.
2686 (noinst_PROGRAMS): Define it only in maintainer mode.
2688 2005-09-02 Kenichi Handa <handa@m17n.org>
2690 * m17n-gui.h (mdraw_line_break_option): Extern it.
2692 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2693 end of the first glyph.
2694 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2696 (mdraw_line_break_option): New variable.
2697 (mdraw_default_line_break): Use mtext_line_break.
2699 * mtext.h (wordseg_func_table): Don't extern it.
2700 (mtext__wseg_fini): Extern it.
2702 * mtext.c: Don't include word-thai.h.
2703 (wordseg_func_table): Delete this variable.
2704 (mtext__init): Don't initialize above. Don't call
2705 mtext__word_thai_init.
2706 (mtext__fini): Don't free wordseg_func_table. Call
2707 mtext__wseg_fini instead fo mtext__word_thai_fini.
2708 (MTextWordsegFunc): Don't typedef it.
2709 (mtext__word_segment): Moved to mtext-wseg.c.
2711 * m17n-core.h (enum MTextLineBreakOption): New enum.
2712 (mtext_line_break): Extern it.
2714 * mtext-wseg.c: New file.
2716 * mtext-lbrk.c: New file.
2718 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2719 add mtext-lbrk.c and mtext-wseg.c.
2721 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2722 the case that head is NULL.
2724 2005-09-01 Kenichi Handa <handa@m17n.org>
2726 * word-thai.c (wordseg_propertize): If the property value is nil,
2727 don't make the property no-merge.
2728 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2729 attention to the case that they are NULL.
2730 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2733 * character.c (mchar_get_prop_table): New function.
2735 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2737 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2738 (mchar_get_prop_table): Extern it.
2740 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2741 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2743 * internal.h (enum MTextCoverage): New enum.
2744 (MText): New member coverage.
2746 * mtext.c (FORMAT_COVERAGE): New macro.
2747 (insert): Copy mt2->coverage.
2748 (mtext__from_data): Initialize mt->coverage.
2749 (mtext__adjust_format): Update mt->coverage.
2750 (mtext): Initialize mt->coverage.
2751 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2752 Update mt->coverage if necessary.
2753 (mtext_duplicate): Copy mt->coverage.
2754 (mtext_insert, mtext_replace): New functions.
2755 (mtext_dup): Use mtext_duplicate.
2756 (mtext__word_segment): Don't set *from and *to if a word
2757 segmentation funcion is not found.
2758 (mtext_ins_char): Fix typo.
2760 2005-08-25 Kenichi Handa <handa@m17n.org>
2762 * font.h (MFont): New member for_full_width.
2764 * font.c (compare_font_score): Prefer a font of not
2767 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2768 registry charset of a font is one of CJK charsets.
2770 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2771 supports some of CJK.
2773 2005-08-24 Kenichi Handa <handa@m17n.org>
2775 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2777 * m17n-gui.c (null_device_open): Check Mresolution param and set
2780 * m17n-gd.c (device_open): Check Mresolution param and set
2783 * m17n-X.c (MWDevice): New member resy.
2784 (xfont_open): Set ascent, descent, and max_advance members of
2786 (xft_open): Likewise.
2787 (device_open): Compare also screen_num to find a device. Set
2788 device->resy and frame->dpi.
2790 * internal-gui.h (MFrame): New member dpi.
2792 * font.h (MRealizedFont): New member max_advance.
2794 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2795 (mfont__init): Don't initialize Mascent, Mdescent.
2796 (Mascent, Mdescent): Delete these variables.
2797 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2798 Mfont_descent instead of Mascent and Mdescent.
2799 (mfont_put_prop): Allow negative size.
2800 (mfont_find): Handle the case of spec->size < 0. Fix previous
2802 (mfont_list): Handle the case of spec->size < 0.
2803 (mfont_check): Likewise.
2805 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2806 (fc_get_pattern): Handle the case of font->size < 0.
2807 (ft_open): Set ascent, descent, and max_advance members of rfont.
2808 (ft_find_metric): Improve rounding.
2809 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2812 * face.c (mface__realize): Handle the case of font->size < 0.
2814 2005-08-22 Kenichi Handa <handa@m17n.org>
2816 * coding.c (MConverterStatus): Change the member buf to union.
2817 (mconv_buffer_converter): Add const to the arg buf.
2818 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2819 (mconv_decode): Adjusted for the change of MConverterStatus.
2820 (mconv_encode_range): Likewise.
2822 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2823 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2825 2005-08-20 Kenichi Handa <handa@m17n.org>
2827 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2828 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2830 * m17n-X.c (xfont_open): Set members ascent, descent, and
2831 max_advance of rfont.
2832 (xft_open): Likewise.
2834 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2836 (mfont__ft_parse_name): Add const to the arg name.
2838 * font.c (xlfd_parse_name): Add const to the arg name. Call
2839 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2840 (xlfd_unparse_name): Handle spacing.
2841 (mfont__init): Initialize new variables.
2842 (mfont__id): Handle spacing.
2843 (mfont__merge): Likewise.
2844 (mfont__set_spec): This function deleted.
2845 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2846 condition of calling mfont__ft_parse_name.
2847 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2848 (mfont_get_prop): Handle properties spacing, ascent, descent,
2850 (mfont_find): Return a realized font.
2851 (mfont_from_name): Add const to the arg name.
2853 * font.h (enum MFontProperty): New member MFONT_SPACING.
2854 (enum MFontSpacing): New enum.
2855 (MFont): New members spacing and max_advance.
2856 (mfont__ft_parse_name): Prototype adjusted.
2857 (mfont__set_spec): Extern deleted.
2858 (mfont__parse_name_into_font): Prototype adjusted.
2860 2005-08-19 Kenichi Handa <handa@m17n.org>
2862 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2864 * font.c (mfont_list): If FONT is null, use a temporary font.
2865 (mfont_parse_name): Add const to the arg name.
2867 2005-08-18 Kenichi Handa <handa@m17n.org>
2869 * word-thai.c: Surround code by #ifdef and #endif to escape from
2872 * font-ft.c: Mostly re-written.
2874 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2875 (FontLayoutCmd): Type of the member otf changed..
2876 (load_otf_command): Adjusted for the format change of otf command.
2877 (load_command): Likewise.
2878 (free_flt_command): Unref cmd->body.otf.
2879 (run_otf): Ajusted for the type change of otf_cmd.
2880 (run_command): Ajusted for the type change of otf_cmd. On
2881 debugging, print ctx->combining_code.
2882 (mfont__flt_run): Initialize ctx's members code_offset,
2883 combining_code, and left_padding to 0.
2885 * face.h (struct MRealizedFace): New member font.
2886 (mface__realize): Prototype adjusted.
2888 * face.c (find_realized_face): New arg font.
2889 (find_realized_face): Adjusted for the change of MFont.
2890 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2891 (mface__fini): Don't call mdebug__report_object.
2892 (mface__realize): New arg font.
2893 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2894 Optimize the latin case.
2895 (mface__free_realized): Free rface->font.
2896 (mface__update_frame_face): Adjusted for the change of mface__realize.
2897 (mface_equal): New function.
2899 * draw.c (Mcommon): New variable.
2900 (visual_order): Args to mfont__encode_char changed.
2901 (compose_glyph_string): Handle Mfont text property.
2902 (layout_glyphs): Adjusted for the change of MFont.
2903 (mdraw__init): Initialize Mcommon.
2904 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2906 * font.h (enum MFontType): Members completely changed.
2907 (enum MFontProperty): Move MFONT_SIZE to the tail.
2908 (enum MFontSource): New enum.
2909 (struct MFont): New members type, source, sizes, file, capability,
2911 (struct MRealizedFont): Type of member font changed. Members
2912 score, status, and encoding deleted.
2913 (MFontScore): New type.
2914 (MFontList): Member changed.
2915 (struct MFontDriver): New member has_char. Types of members
2917 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2918 (Mapple_roman): Extern them.
2919 (OTF_Tag): Typedefed if not HAVE_OTF.
2920 (enum MFontOpenTypeTable): New enum.
2921 (MFontCapability): New type.
2922 (mfont__ft_drive_otf): Prototype adjusted.
2923 (mfont__score): Extern deleted.
2924 (mfont__merge): Extern it.
2925 (mfont__has_char): Extern it.
2926 (mfont__encode_char): Prototype adjusted.
2927 (mfont__open): Extern it.
2928 (mfont__set_spec): Prototype adjusted.
2929 (mfont__get_capability): Extern it.
2931 * font.c: Include "fontset.h".
2932 (M_font_capability, M_font_list, M_font_list_len): New variables.
2933 (font_score_priority): Change order of initial elements.
2934 (font_score_shift_bits): Fix array size.
2935 (common_weight): Add "thin", "semibold", and "heavy".
2936 (common_stretch): Add "ultracondensed", "extracondensed",
2937 "extraexpanded", and "utltraexpand".
2938 (font_weight_regular, font_weight_normal, font_weight_medium): New
2940 (gen_font_name): This function deleted.
2941 (find_encoding): Set font->encoding.
2942 (OTF_tag): New function.
2943 (otf_script_list): New variable.
2944 (load_otf_script_list): New function.
2945 (find_script_from_otf_tag): New function.
2946 (xlfd_parse_name): Set font->type and font->source.
2947 (mfont__free_realized): Free chains rfonts.
2948 (font_score): Renamed from mfont__score.
2949 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2950 (Mapple_roman): New variables.
2951 (mfont__init): Initilize new variables. Initalize
2952 default_encoding.encoding_name and
2953 default_encoding.encoding_charset to Municode_full and
2954 mcharset__unicode. Use SAFE* macros for allocating filepath
2956 (mfont__fini): Free otf_script_list.
2957 (mfont__id): New function.
2958 (mfont__match_p): Check also capability member of MFont.
2959 (mfont__merge): New funciton.
2960 (mfont__set_spec_from_face): Set type and source members.
2961 (mfont__set_spec_from_plist): Set capability and type members.
2962 (mfont__select): Argument changed.
2963 (mfont__available): New function.
2964 (compare_font_score): New function.
2965 (mfont__list): New function.
2966 (mfont__open): Return a realized font.
2967 (mfont__resize): Adjusted for the change of MFont.
2968 (mfont__has_char): New function.
2969 (mfont__encode_char): Argument changed.
2970 (mfont__set_spec): Argument changed.
2971 (free_font_capability): New function.
2972 (mfont__get_capability): New function.
2973 (MFontfile): New variable.
2974 (mfont_get_prop): Adjusted for the change of MFont.
2975 (mfont_put_prop): Likewise.
2976 (mfont_set_selection_priority): Fix the way of setting
2977 font_score_priority[].
2978 (mfont_find): Use mfont__list instead of mfont__select.
2979 (mfont_resize_ratio): Adjusted for the change of MFont.
2980 (mfont_list): Use mfont__list.
2981 (mfont_check): New function.
2982 (font_score): Make it static.
2984 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2985 (mfont__lookup_fontset): Likewise.
2987 * fontset.c (struct MFontset): Delete member font_spec_list.
2988 (struct MRealizedFontset): Type of member spec changed. New
2990 (load_font_group): Arg spec_list deleted.
2991 (load_fontset_contents): Adjusted for the change of fontset_def.
2992 (free_fontset): Fix the way of freeing fontset elements.
2993 (realize_fontset_elements): Argument changed.
2994 (get_per_script): New function.
2995 (free_realized_fontset_elements): Fix the way of feeing rfontset
2997 (update_fontset_elements): Fix args to realize_fontset_elements.
2998 (mfont__realize_fontset): New arg spec.
2999 (try_font_list): New function.
3000 (try_font_group): New arg request. Use try_font_list.
3001 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
3003 (mfontset): Adjusted for the change of MFontset.
3004 (mfontset_copy): Likewise. Don't share plists.
3005 (mfontset_modify_entry): Adjusted for the change of MFontset.
3006 (mfontset_lookup): Call get_per_script.
3007 (mdebug_dump_fontset): Print also the address of fonts.
3009 * input.c (shift_state): Don't reset ic_info->vars.
3010 (take_action_list): Call MDEBUG_PRINT fore calling
3013 * internal-gui.h (MFontDriver): Don't typedef it here.
3015 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
3016 (MXFont): This type deleted.
3018 (struct _MFontX): New struct.
3019 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
3020 (MDisplayInfo): Member base_font_list deleted.
3021 (DEFAULT_FONT): Definition changed.
3022 (FALLBACK_FONT): This maclr deleted.
3023 (free_display_info): Adjusted for the change of MDisplayInfo.
3024 (free_device): Argument to mfont__free_realized changed.
3025 (xfont_driver): Adjusted for the change of MFontDriver.
3026 (xfont_registry_list): Use MFontX instead of MXFont.
3027 (MRealizedFontX): Renamed from MXFontInfo.
3028 (xfont_select): Return the font found first.
3029 (close_xfont): Change MXFontInfo to MRealizedFontX.
3030 (xfont_open): Return the realized font.
3031 (xfont_find_metric): Get xfont from rfont->fontp.
3032 (xfont_has_char): New function.
3033 (xfont_encode_char): Adjusted for the argument change.
3034 (xfont_render): Get xfont from rfont->fontp.
3035 (xfont_list): Adjusted for the argument change.
3036 (MRealizedFontXft): Renamed from MXftFontInfo.
3037 (xft_driver): Ajusted for the change of MFontDriver.
3038 (close_xft): Change MXtfFontInfo to MRealizedFontXft
3039 (xft_open_font): Argument changed.
3040 (xft_open): Argument changed. Return the realized font.
3041 (xft_find_metric): Get xft_font from rfont->fontp.
3042 (xft_has_char, xft_encode_char): New functions.
3043 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
3044 font if not yet opened.
3045 (device_open): Don't set frame->font.
3047 * m17n-gd.c (gd_font_driver): Adjusted for the change of
3049 (gd_font_open): New function.
3050 (gd_render): Don't use the local variable ft_info.
3051 (device_init): Adjusted for the change of gd_font_driver.
3053 * textprop.c (mtext__prop_init): Initialize text_property_table.
3054 Call M17N_OBJECT_ADD_ARRAY.
3055 (mtext__prop_fini): Don't call mdebug__report_object.
3057 * plist.c (mplist__init): Initialize plist_table.
3058 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
3059 (mplist__fini): Don't call mdebug__report_object.
3061 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
3062 (mtext__fini): Don't call mdebug__report_object.
3063 (MTEXT_FORMAT_UTF_16): Correct type.
3064 (mtext_data): New function.
3065 (mtext_text): Fix calculation of limit and args to
3068 * language.c: Include "plist.h".
3069 (M_script_lang_list): New variable.
3070 (mlang__init): Read languages and their information from m17n
3072 (mlanguage__list): New function.
3073 (Miso639_1, Miso639_2): New variables.
3075 * language.h (mlanguage__list): Extern it.
3077 * database.c (get_database_stream): Use SAFE_* macros for
3078 allocating and freeing path.
3079 (mdatabase__init): Likewise.
3081 * symbol.c (msymbol__fini): Don't free symbols here.
3082 (msymbol__free_table): New function.
3083 (msymbol_is_managing_key): New function.
3085 * symbol.h (msymbol__free_table): Extern it.
3086 (msymbol__list): Extern it.
3088 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
3090 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
3091 (struct _M17NObjectArray): New member name and next.
3092 (mdebug__add_object_array): Extern it.
3093 (M17N_OBJECT_ADD_ARRAY): New macro.
3094 (mdebug__report_object): Don't extern it.
3096 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
3098 * m17n-gui.c (free_frame): Don't free frame->font.
3099 (null_device_fini): Fix code for freeing
3100 null_device.realized_font_list.
3101 (m17n_fini_win): Free interface.
3102 (mframe): Cast the return value of dlsym. Set frame->font here.
3103 (mframe_get_prop): Check frame->rface->rfont before accessing the
3106 * m17n-gui.h (Mfontfile): Extern it.
3107 (mfont_check): Extern it.
3108 (mface_equal): Extern it.
3110 * m17n-core.c: Include "symbol.h".
3111 (report_header_printed): This variable deleted.
3112 (object_array_root): New variable.
3113 (report_object_array): New function.
3114 (mdebug__report_object): This function deleted.
3115 (mdebug__add_object_array): New function.
3116 (m17n_init_core): Call mchartable_init () before mtext_init ().
3117 (m17n_fini_core): Call report_object_array (if necessary) and
3118 msymbol__free_atable at the end.
3120 * m17n-core.h (msymbol_is_managing_key): Extern it.
3121 (mtext_data): Extern it.
3122 (MTEXT_FORMAT_UTF_16): Correct type.
3123 (M17NLIB_MINOR_VERSION): Changed to 3.
3124 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
3126 * chartab.c (mchartable__init): Initalize chartable_table.count.
3127 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
3128 mdebug__report_object.
3130 2005-05-26 Kenichi Handa <handa@m17n.org>
3132 * m17n.h (Miso639_1, Miso639_2): Extern them.
3134 * symbol.h (msymbol__list): Extern it.
3136 * symbol.c (msymbol__list): New function.
3138 2005-05-19 Kenichi Handa <handa@m17n.org>
3140 * input-gui.c (minput__win_init): Don't change the value of
3143 2005-05-16 Kenichi Handa <handa@m17n.org>
3145 * m17n-core.c (m17n_object): Be sure to initialize all members.
3147 * font-ft.c (fc_decode_prop): Fix args to msymbol.
3149 2005-05-09 Kenichi Handa <handa@m17n.org>
3151 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
3153 2005-04-27 Kenichi Handa <handa@m17n.org>
3155 * language.c (mlang__init): Add "an" (Aragonese).
3157 * word-thai.c: Add support for libthai.
3158 (mtext__word_thai_init): Initialize wordseg library conditionaly.
3159 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
3161 * mtext.c: Include "word-thai.h" conditionaly.
3162 (mtext__init): Call mtext__word_thai_init conditionaly.
3163 (mtext__fini): Call mtext__word_thai_fini conditionaly.
3165 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
3166 not WORDCUT_LD_FLAGS.
3168 2005-04-19 Kenichi Handa <handa@m17n.org>
3170 * word-thai.c (wordseg_propertize): Always unref the attached
3172 (thai_wordseg): Don't unref the property.
3174 2005-04-18 Kenichi Handa <handa@m17n.org>
3176 * word-thai.c: Include stdlib.h.
3177 (wordseg_propertize): Add dummy function for the case that wordcut
3178 library doesn't exist.
3179 (wordseg_propertize): Fix for old wordcut library.
3181 2005-04-16 Kenichi Handa <handa@m17n.org>
3183 * word-thai.c: Include <stdio.h>.
3185 2005-04-15 Kenichi Handa <handa@m17n.org>
3187 * draw.c: Include mtext.h.
3188 (linebreak_table, M_break_at_space, M_break_at_word)
3189 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
3190 (compose_glyph_string): Check POS before getting Mface text
3192 (truncate_gstring): Give correct TO arg to line_break function.
3193 (GET_LB_TYPE): New macro.
3194 (find_break_backward, find_break_forward): New functions.
3195 (mdraw__init): Initialize the above new variables.
3196 (mdraw__fini): Free linebreak_table.
3197 (mdraw_default_line_break): Use find_break_backward and
3200 * word-thai.c: New file.
3202 * word-thai.h: New file.
3204 * mtext.c: Include word-thai.h.
3205 (wordseg_func_table): New variable.
3206 (mtext__init): Initialize wordseg_func_table and call
3207 mtext__word_thai_init.
3208 (mtext__fini): Call mtext__word_thai_fini, free
3210 (MTextWordsegFunc): New type.
3211 (mtext__word_segment): New function.
3213 * mtext.h (wordseg_func_table): Extern it.
3214 (mtext__word_segment): Extern it.
3216 * m17n.c (m17n_init): Fix typo (== -> =).
3218 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
3219 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
3221 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
3222 (MTEXTPROP_VAL): New macros.
3224 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
3226 2005-04-07 Kenichi Handa <handa@m17n.org>
3228 * database.c (load_chartable): Fix pursing of symbol name.
3230 2005-03-24 Kenichi Handa <handa@m17n.org>
3232 * m17n.c (m17n_init): Fix typo (== -> =).
3234 2005-03-11 Kenichi Handa <handa@m17n.org>
3236 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
3238 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
3240 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
3243 2005-03-09 handa <handa@m17n.org>
3245 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
3246 calling m17n_init ().
3248 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
3249 calling m17n_init_core ().
3251 2005-02-28 Kenichi Handa <handa@m17n.org>
3253 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3256 2005-02-17 Kenichi Handa <handa@m17n.org>
3258 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3259 (M_description, M_command, M_variable): New variables.
3260 (load_im_info_keys): New variables.
3261 (load_im_info, check_command_keyseq, get_description_advance)
3262 (parse_command_list, get_command_list, parse_variable_list)
3263 (get_variable_list, input_method_hook): New functions.
3264 (command_list, variable_list): New variables.
3265 (minput__init): Put input_method_hook to Minput_method.
3266 Initialize M_description, M_command, M_variable, Mdetail_text,
3267 load_im_info_keys, command_list, variable_list.
3268 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3269 (Mdetail_text): New variable.
3270 (minput_get_description, minput_get_commands)
3271 (minput_assign_command_keys, minput_get_variables)
3272 (minput_set_variable): New functions.
3274 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3275 (minput_assign_command_keys, minput_get_variables)
3276 (minput_set_variable): Extern them.
3278 * plist.c (UNGETC): Just decrement st->p.
3279 (read_mtext_element): New arg skip.
3280 (read_integer_element): Likewise.
3281 (read_symbol_element): Likewise.
3282 (read_element): New arg KEYS.
3283 (mplist__from_plist): Don't increment ref-count of NULL object.
3284 (mplist__from_file): New arg KEYS.
3285 (mplist_put): Don't increment ref-count of NULL object.
3286 (mplist_add): Likewise.
3287 (mplist_push): Likewise.
3288 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3290 * plist.h (mplist__from_file): Prototype adjusted.
3292 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3293 (get_database_stream): New function.
3294 (load_database): Use get_database_stream.
3295 (M_database_hook): New variable
3296 (mdatabase__init): Initialize M_database_hook.
3297 (mdatabase__load_for_keys): New function.
3298 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3300 (mdatabase_define): Free mdb->extra_info if necessary.
3302 * database.h (mdatabase__dir_list, M_database_hook)
3303 (mdatabase__load_for_keys): Extern them.
3304 (MDatabaseHookFunc): New type.
3306 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3308 2004-12-27 Kenichi Handa <handa@m17n.org>
3310 * Version 1.2.0 released.
3312 2004-12-27 Kenichi Handa <handa@m17n.org>
3314 * input.c (minput_filter): Don't reset ic->xxx_changed.
3316 * mtext.c (mtext_from_data): Fix documentation.
3318 2004-12-25 Kenichi Handa <handa@m17n.org>
3320 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3321 (M17NLIB_VERSION_NAME): Update to "1.2.".
3323 2004-12-24 Kenichi Handa <handa@m17n.org>
3325 * input.c (reset_ic): Set key_unhandled to 0.
3327 2004-12-21 Kenichi Handa <handa@m17n.org>
3329 * m17n-gui.h (mfont_from_spec): Delete extern.
3331 * input-gui.c (win_callback): Handle Minput_reset.
3332 (minput__win_init): Register reset_ic as a callback for
3335 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3336 changed. At first, shift to the initial state.
3337 (minput__init): Initialize Minput_reset. Register reset_ic as a
3338 callback for Minput_reset.
3339 (Minput_reset): New variable.
3340 (minput_filter): Always set ic->xxx_changed to 0.
3341 (minput_reset_ic): New function.
3342 (integer_value): Fix typo ('>' -> '<') and calculation of length
3345 * m17n-core.c (merror_code): Change type to `int'.
3347 * m17n-misc.h (merror_code): Adjust type.
3349 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3351 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3352 (mtext_change_prop): Delete extern.
3354 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3355 to `int'. Move the documents to m17n-core.h.
3357 2004-12-13 Kenichi Handa <handa@m17n.org>
3359 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3360 (MTextProperty): Document it.
3362 2004-12-09 Kenichi Handa <handa@m17n.org>
3364 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3366 2004-12-03 Kenichi Handa <handa@m17n.org>
3368 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3369 m17n__gui_initialized): New externs.
3371 * m17n-core.h (enum M17NStatus): New enum.
3372 (m17n_status): Extern it.
3374 * m17n-core.c (core_initialized): Delete this variable.
3375 (m17n__core_initialized, m17n__shell_initialized,
3376 m17n__gui_initialized): New variables.
3377 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3378 instead of core_initialized.
3379 (m17n_status): New function.
3381 * m17n.c (shell_initialized): Delete this variable.
3382 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3385 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3387 * m17n-gui.c (win_initialized): Delete this variable.
3388 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3389 instead of gui_initialized.
3391 2004-11-19 Kenichi Handa <handa@m17n.org>
3393 * input.c (reset_ic): Check if ic_info->state is NULL.
3394 (filter): If ic_info->state is NULL, return 0.
3395 (load_input_method): Don't unref `maps' it it's not created.
3397 2004-11-15 Kenichi Handa <handa@m17n.org>
3399 * input.c (find_candidates_group): If INDEX is -1, find the last
3401 (take_action_list): If the previous of the first candidate is
3402 requested, select the last candidate.
3404 2004-11-08 Kenichi Handa <handa@m17n.org>
3406 * m17n-X.c (device_open): Try at most 32 fonts to find a
3407 non-autoscaled font.
3409 * font.c (xlfd_parse_name): Fix previous change.
3411 2004-11-05 Kenichi Handa <handa@m17n.org>
3413 * font.c: (commont_style): Include dummy elements "slanted" and
3414 "rslanted" to prefer "o" to "r" if "i" is requested.
3416 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3418 2004-10-29 Kenichi Handa <handa@m17n.org>
3420 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3422 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3423 New members smallest and larger.
3424 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3425 (xfont_registry_list): Likewise.
3426 (xfont_select): Likewise.
3429 2004-10-28 Kenichi Handa <handa@m17n.org>
3431 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3432 font name comparison.
3433 (xfont_select): Fix logic for selecting a larger size font.
3435 2004-10-25 Kenichi Handa <handa@m17n.org>
3437 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3440 2004-10-22 Kenichi Handa <handa@m17n.org>
3442 * input.c (update_candidate): Renamed from udpate_candidate.
3443 (take_action_list): Show more debugging info on arithmetic commands.
3445 * m17n-X.c (device_open): Fix previous change.
3447 * draw.c (compose_glyph_string): Don't get face property at the
3450 2004-10-21 Kenichi Handa <handa@m17n.org>
3452 * draw.c (compose_glyph_string): Fix for the case of category
3455 2004-10-19 Kenichi Handa <handa@m17n.org>
3457 * input.c (mdebug_mask): New variable.
3458 (shift_state): Print debug information.
3459 (take_action_list): Likewise.
3460 (handle_key): Likewise.
3462 2004-10-14 Kenichi Handa <handa@m17n.org>
3464 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3466 2004-10-13 Kenichi Handa <handa@m17n.org>
3468 * m17n-X.c (device_open): Be sure to register at least one font
3471 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3472 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3474 2004-10-12 Kenichi Handa <handa@m17n.org>
3476 * draw.c (alloc_gstring): Fix previous change.
3478 * font-ft.c (ft_list_generic): Fix for the case of not
3481 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3483 * font.c (mfont_list): If no font is found, return NULL.
3484 (load_font_encoding_table): Put entries of nil registry first.
3485 (find_encoding): Adjust for the above change.
3487 2004-10-11 Kenichi Handa <handa@m17n.org>
3489 * m17n-gui.h (mfont_list): Adjust prototype.
3491 * m17n-X.c (xfont_list): New arg maxnum.
3493 * font.h (struct MFontDriver): Change prototype of <list>.
3495 * font-ft.c (fc_generic_family_list): Delete it.
3496 (Mserif, Msans_serif, Mmonospace): Delete them.
3497 (M_generic_family_info): New variable.
3498 (enum GenericFamilyType): New enum.
3499 (struct GenericFamilyInfo): New struct.
3500 (generic_family_table): New variable.
3501 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3503 (add_font_info): Get style here.
3504 (ft_list_family): Don't initialize fc_config here. Don't list
3506 (ft_list_generic): New function.
3507 (ft_select): Pay attention to generic familes here.
3508 (ft_open): Fix calculation of ascent and descent.
3509 (ft_list): Pay attention to generic families.
3510 (mfont__ft_init): Initialize M_generic_family_info,
3511 generic_family_table, and fc_config..
3512 (mfont__ft_fini): Finalize generic_family_table.
3514 * draw.c (compose_glyph_string): Use more constant font for
3515 glyphs. Adjust for the member change in MGlyph.
3516 (layout_glyph_string): Adjust for the member change in MGlyph.
3517 (alloc_gstring): Intilize scracth_glyph to avoid
3518 compose_glyph_string on it.
3519 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3520 (mdraw_coordinates_position): Fix previous change.
3522 * internal-gui.h (glyph_category): New enum.
3523 (MGlyph): Change type of <category> to enum glyph_category.
3525 * face.c (mface__realize): Delete args langauge and charset.
3526 (mface__for_chars): Fix for the case that glyphs have different
3528 (mface__update_frame_face): Adjust for mface__realize change.
3530 * face.h (mface__realize): Adjust prototype.
3532 2004-10-05 Kenichi Handa <handa@m17n.org>
3534 * language.c (mlang__init): Add Akan.
3536 2004-10-04 Kenichi Handa <handa@m17n.org>
3538 * font-ft.c (add_font_info): Add instead of push the element.
3539 (ft_list_family): For generic fonts, try all
3540 substituted. families.
3542 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3543 (run_rule): Don't update cluster range here.
3544 (run_command): Update cluster range on appending a glyph.
3545 (run_otf): Update cluster range for glyphs generated by OTF.
3547 2004-10-02 Kenichi Handa <handa@m17n.org>
3549 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3551 2004-09-30 Kenichi Handa <handa@m17n.org>
3553 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3555 2004-09-30 Kenichi Handa <handa@m17n.org>
3557 * font.h: Include <fontconfig/fontconfig.h>.
3558 (MFTInfo): New member langset.
3559 (mfont__encoding_list): Extern it.
3561 * font.c (mfont__encoding_list): New function.
3562 (mdebug_dump_font_list): New function.
3564 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3565 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3567 (ft_family_list): New variable.
3568 (set_font_info): New arg basep. Callers changed.
3569 (fc_list): Check the return value of FcPatternGetString.
3570 (add_font_info): New arg plist. Callers changed. Update
3572 (ft_list_family): New function (merged fc_list and ft_list_all).
3573 (ft_select): Use ft_list_family.
3574 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3576 (mfont__ft_init): Initialize above new variables.
3577 (mfont__ft_fini): Free ft_family_list.
3578 (STRDUP_LOWER): New macro.
3579 (set_font_info): Use STRDUP_LOWER.
3580 (ft_list_family): Avoid duplicate addition of font path. Use
3582 (fc_decode_prop): Fix typo.
3584 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3585 (xfont_registry_list): Change argument disp_info to frame.
3587 (xfont_list_all): New function.
3588 (xfont_list): If FONT is not NULL, check all fonts.
3590 2004-09-28 Kenichi Handa <handa@m17n.org>
3592 * m17n-X.c (MXFont, MXFontList): New types.
3593 (MDisplayInfo): Delete members font_registry_list,
3594 iso8859_1_family_list, iso10646_1_family_list, new members
3595 font_list, base_font_list.
3596 (free_display_info): Adusted for the change of MDisplayInfo.
3597 (xfont_driver): Initialize with xfont_list.
3598 (font_compare): New function.
3599 (build_font_list): Deleted.
3600 (xfont_registry_list): New function.
3601 (xfont_select): Use xfont_registry_list.
3602 (xfont_list): New function.
3603 (device_open): Adusted for the change of MDisplayInfo.
3605 * font-ft.c (add_font_info): New arg languages. Callers changed.
3606 (fc_list): Get languages from fonts..
3607 (ft_list_all): Renamed from ft_list. Callers changed.
3608 (ft_list): New function.
3609 (mfont__ft_driver): Initalize with ft_list.
3611 * font.c (mfont_list): New function.
3613 * font.h (struct MFontDriver): New member `list'.
3614 (MFTInfo): New member languages.
3616 * m17n-gui.h (mfont_list): Extern it.
3618 2004-09-27 Kenichi Handa <handa@m17n.org>
3620 * internal-gui.h (struct MGlyphString): Delete members mt,
3621 sub_width, sub_lbrearing, sub_rbearing, and region.
3623 * draw.c (MSubTextExtents): New type.
3624 (layout_glyphs): New arg extents. Set its members.
3625 (layout_glyph_string): Adjusted for the above change.
3626 (alloc_gstring): Don't set gstring->mt.
3627 (truncate_gstring): Call line_break function with mt instead of
3630 2004-09-22 Kenichi Handa <handa@m17n.org>
3632 * mtext.c (count_utf_16_chars): Count each code of invalid
3635 2004-09-19 Kenichi Handa <handa@m17n.org>
3637 * mtext.c (default_utf_16, default_utf_32): Rename them to
3638 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3641 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3644 2004-09-13 Kenichi Handa <handa@m17n.org>
3646 * draw.c (Mlatin): Don't declare it here.
3647 (visual_order): Fix reordering of combining characters.
3648 (compose_glyph_string): Fix detection of script.
3649 (layout_glyphs): Don't fix reordering of combining characters
3651 (layout_glyph_string): Pay attention to
3652 control->disable_overlapping_adjustment.
3653 (truncate_gstring): Include at least on character in a line.
3654 (get_gstring): Always scan one full line.
3655 (mdraw__init): Don't initialize Mlatin here.
3656 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3657 have a font, use ascent/descent of an ASCII font. Allow
3658 ink_array_return and logical_array_return to be NULL.
3659 (mdraw_coordinates_position): Fix iteration.
3661 * font-ft.c (MFTtoProp): Member completely changed.
3662 (ft_to_prop): Adjusted for the above change.
3663 (ft_to_prop_size): Likewise.
3664 (set_font_info): Adjusted for the change of MFTtoProp.
3665 (fc_generic_family_list): New variable.
3666 (fc_list): Add special handling of generic font names.
3667 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3668 Initialize fc_generic_family_list.
3669 (mfont__ft_fini): Don't free ft_to_prop. Free
3670 fc_generic_family_list.
3671 (FC_vs_M17N_font_prop): New type.
3672 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3673 (fc_decode_prop, fc_encode_prop): New functions.
3674 (mfont__ft_parse_name): Use fc_decode_prop.
3675 (mfont__ft_unparse_name): Use fc_encode_prop.
3677 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3678 (MWDevice): Add member realized_font_list.
3679 (free_display_info): Don't free disp_info->realized_font_list.
3680 (free_device): Free device->realized_fontset_list.
3681 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3682 (device_open): Don't initialize disp_info->realized_font_list.
3683 (device_open): Initialize device->realized_font_list and set it to
3684 frame->realized_font_list.
3686 * fontset.c (try_font_group): New function.
3687 (mfont__lookup_fontset): Use try_font_group.
3689 * font.c (common_weight): Change the order of "regular".
3691 * face.c (Mlatin): Don't make it static.
3692 (mface__realize): Be sure to set work_gstring.frame.
3693 (mface__for_chars): Likewise.
3695 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3698 * internal-gui.h (Mlatin): Extern it.
3700 * m17n-gui.h (MDrawControl): New member
3701 disable_overlapping_adjustment.
3703 2004-09-06 Kenichi Handa <handa@m17n.org>
3705 * font-flt.c (run_otf): Fix typo ('}'->']').
3707 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3708 (COMBINING_PRECOMPUTED_P): New macros.
3710 * draw.c (layout_glyphs): Handle precomputed combining code.
3712 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3713 precomupted combining code.
3715 2004-09-03 Kenichi Handa <handa@m17n.org>
3717 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3720 2004-08-27 Kenichi Handa <handa@m17n.org>
3722 * face.c (mface_put_prop): If the new value is the same as the
3723 current one, don't increment frame->tick.
3725 2004-08-25 Kenichi Handa <handa@m17n.org>
3727 * fontset.c (mfontset): Initialize font_spec_list member.
3728 (mfontset_copy): Load fontset if necessary.
3730 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3731 'metrics' to for C++.
3733 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3736 2004-08-16 Kenichi Handa <handa@m17n.org>
3738 * Version 1.1.0 released.
3740 2004-08-13 Kenichi Handa <handa@m17n.org>
3742 * language.c (mlang__init): Add Dhivehi.
3744 * m17n-gui.c (Mx, Mfreetype): Delete it.
3745 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3747 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3748 (mfont_resize_ratio): Extern it.
3749 (MDrawGlyphInfo): New member logical_width;
3750 (MDrawGlyph): New type.
3751 (mdraw_glyph_list): Prototype adjusted.
3753 * m17n-X.c (xfont_open): Set type and fontp members.
3754 (xft_open): Likewise.
3756 * internal-gui.h (Mx, Mfreetype): Delete extern.
3758 * font.h (struct MRealizedFont): New member type and fontp.
3760 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3761 (Mx, Mfreetype): Declare here.
3762 (Mxft): New variable.
3763 (mfont_resize_ratio): New function.
3765 * font-ft.c (ft_open): Set type and fontp members.
3767 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3770 2004-08-11 Kenichi Handa <handa@m17n.org>
3772 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3775 2004-08-06 Kenichi Handa <handa@m17n.org>
3777 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3780 * font-flt.c (run_otf): Print debugging information if necessary.
3782 2004-08-05 Kenichi Handa <handa@m17n.org>
3784 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3785 positioning_type 5 and 6. Switch simplified.
3787 2004-08-04 Kenichi Handa <handa@m17n.org>
3789 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3791 2004-08-02 Kenichi Handa <handa@m17n.org>
3793 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3794 set val to 1 even if it is greater than 1.
3796 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3798 2004-07-29 Kenichi Handa <handa@m17n.org>
3800 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3801 debugging information.
3803 * internal.h (MDEBUG_PRINT5): New macro.
3805 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3806 the previous one if the zero width glyph has left or right
3809 2004-07-26 Kenichi Handa <handa@m17n.org>
3811 * m17n-X.c (xft_render): Pay attention to members left_padding and
3812 right_padding of MGlyph.
3814 * draw.c (visual_order): Allocate one more elements for arrays as
3815 a workaround of fribidi bug.
3816 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3817 instead of MGlyph->bidi_sensitive.
3818 (layout_glyph_string): Pay attentinon to
3819 control->orientation_reversed when padding at the head or tail.
3820 Fix adjustment of space glyph width.
3821 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3824 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3825 instead of MGlyph->bidi_sensitive.
3827 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3829 2004-07-26 Kenichi Handa <handa@m17n.org>
3831 * draw.c (visual_order): Don't treat combined glyphs specially.
3832 (layout_glyphs): Don't get metrics glyphs that are already ready.
3833 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3834 width with the previous one.
3835 (draw_background): Fix bar cursor position on a r2l glyph.
3837 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3838 (run_rule): Fix place of updating cluster_begin_pos and
3839 cluster_end_pos here.
3840 (run_otf): Don't set left_padding.
3842 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3844 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3845 Fix handling of GPOS.
3846 (mfont__ft_drive_gpos): Delete this function.
3848 * font.h (mfont__ft_drive_otf): Renamed back from
3849 mfont__ft_drive_gsub.
3850 (mfont__ft_drive_gpos): Delete extern.
3852 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3853 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3855 2004-07-23 Kenichi Handa <handa@m17n.org>
3857 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3858 the same bidi level.
3860 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3862 2004-07-22 Kenichi Handa <handa@m17n.org>
3864 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3866 2004-07-20 Kenichi Handa <handa@m17n.org>
3868 * draw.c (render_glyphs): Fix checking of g->code validity.
3870 * face.c (mface__realize): Set g.type.
3872 2004-07-18 Kenichi Handa <handa@m17n.org>
3874 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3877 * m17n-gui.c (mframe): Print error message give by dlopen to
3880 2004-07-16 Kenichi Handa <handa@m17n.org>
3882 * draw.c (compose_glyph_string): Improve the way of deciding a
3883 script. For a character that doesn't have script property, use
3884 the last non-latin script.
3886 * font-ft.c (fc_list): Cancel previous change.
3887 (mfont__ft_init): Add more entries in ft_to_prop_name.
3889 2004-07-15 Kenichi Handa <handa@m17n.org>
3891 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3892 previous or next character glyphs.
3894 2004-07-14 Kenichi Handa <handa@m17n.org>
3896 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3897 of type GLYPH_SPACE.
3899 * fontset.c (mfont__lookup_fontset): If glyph type is
3900 GLYPH_SPACE, get codes for SPACE.
3902 * internal-gui.h (Mfont): Delete extern.
3904 * m17n-gui.h (Mfont): Delete duplicated extern.
3906 2004-07-13 Kenichi Handa <handa@m17n.org>
3908 * font-ft.c (DEVICE_DELTA): New macro.
3909 (adjust_anchor): New function.
3910 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3912 (mfont__ft_drive_gpos): New function.
3914 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3915 (FontLayoutContext): Delete member `rfont'.
3916 (run_otf): Set g->otf_cmd. Call
3917 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3918 only whne HAVE_OTF is defined.
3920 * fontset.c: Include "config.h".
3922 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3923 (MGlyph): New member otf_cmd.
3925 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3926 (mfont__ft_drive_gpos): Extern it.
3928 * face.c: Include "config.h".
3930 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3932 * input-gui.c: Include "config.h".
3934 * plist.c: Include "config.h".
3936 2004-07-06 Kenichi Handa <handa@m17n.org>
3938 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3939 internal-gui.h: Cancel previous changes.
3941 * m17n-gd.h: Delete it.
3943 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3944 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3945 @XML2_LD_FLAGS@ to above.
3946 (libm17n_la_LIBADD): Add -ldl.
3947 (libm17n_la_LDFLAGS): Add -export-dynamic.
3948 (X_LD_FLAGS): Fix the order of linking.
3949 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3950 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3951 (libm17n_X_la_LDFLAGS): Add -module.
3952 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3953 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3954 (libm17n_gd_la_LDFLAGS): Add -module.
3955 (include_HEADERS): Delete m17n-gd.h.
3957 2004-06-30 Kenichi Handa <handa@m17n.org>
3959 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3960 (MDeviceLibraryInterface): Delete it.
3961 (register_device_library): Delete it.
3962 (m17n__device_library_list): Renamed from device_library_list.
3964 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3965 (m17n_init_win): Adjust prototype.
3967 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3968 (m17n_init_gd): New function.
3970 * m17n-gd.h: New file.
3972 * m17n-X.h: Include <m17n-gui.h>.
3973 (m17n_init_X): Extern it.
3974 (M17N_INIT): Redefine it.
3976 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3977 (m17n_init_X): New function.
3979 * internal-gui.h (m17n__device_library_list): Extern it.
3980 (struct MDeviceDriver): New members initialized, init, and fini.
3982 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3984 (libm17n_X_la_LIBADD): Delete aboves.
3985 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3986 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3987 (libm17n_gd_la_LDFLAGS): Delete it.
3988 (include_HEADERS): Add m17n-gd.h.
3990 2004-06-25 Kenichi Handa <handa@m17n.org>
3992 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3993 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3995 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3997 * font-ft.c (fc_list): If FcFontList finds no font, try
4000 * draw.c (compose_glyph_string): Terminate the last loop after
4001 doing default combining if necessary.
4003 2004-06-24 Kenichi Handa <handa@m17n.org>
4005 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
4007 * character.c (mchar_define_property): Add const to an arg.
4009 * charset.c (mchar_define_charset): Add const to an arg.
4011 * coding.c (MCodingSystem): Add const to an arg or decoder.
4012 (finish_decoding): Add const to an arg.
4013 (decode_coding_charset, decode_coding_utf_8)
4014 (decode_coding_utf_16, decode_coding_utf_32)
4015 (decode_coding_iso_2022, decode_coding_sjis)
4016 (mconv_define_coding): Likewise.
4018 * m17n-X.c (xft_find_metric): Delete unused variable.
4020 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
4023 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
4026 * mtext.c (count_utf_8_chars, count_utf_16_chars)
4027 (mtext__from_data, mtext_from_data): Add `const' to an arg.
4029 * mtext.h (mtext__from_data): Ajust prototype.
4031 2004-06-23 Kenichi Handa <handa@m17n.org>
4033 * draw.c (compose_glyph_string): Always get glyph codes by
4035 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
4036 (mdraw_glyph_list): New function.
4038 * font-flt.c (mfont__flt_run): Be sure to call
4039 rfont->driver->encode_char.
4041 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
4042 (ft_encode_char): Delete arg C.
4043 (ft_render): Don't call FT_Get_Char_Index.
4045 * font.c (mfont__encodable_p): Delete it.
4046 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
4048 * font.h (struct MFontDriver): Delete arg C of encode_char.
4049 (mfont__encodable_p): Delete extern.
4051 * m17n-X.c (xfont_encode_char): Delete arg C.
4052 (xft_find_metric): Don't cal FT_Get_Char_Index.
4053 (xft_render): Likewise.
4055 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
4057 (mdraw_glyph_list): Extern it.
4059 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
4061 2004-06-22 Kenichi Handa <handa@m17n.org>
4063 * m17n-gui.h (mfontset_lookup): Extern it.
4065 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
4067 * fontset.c (realize_fontset_elements)
4068 (free_realized_fontset_elements, update_fontset_elements): New
4070 (mfont__realize_fontset): Call realize_fontset_elements.
4071 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
4072 (mfont__lookup_fontset): If a fontset was modified, update
4073 the realized fontset.
4074 (mfontset_modify_entry): Increment fontset->tick.
4075 (mfontset_lookup): New function.
4077 2004-06-21 Kenichi Handa <handa@m17n.org>
4079 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
4081 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
4082 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
4083 length of source text 0.
4085 2004-06-21 Kenichi Handa <handa@m17n.org>
4087 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
4088 (compare): Pay attention to format other than utf-8.
4089 (copy): Delete this function.
4090 (count_by_utf_8, count_by_utf_16, insert): New functions.
4091 (count_utf_16_chars): Fix handling of a surrogate pair.
4092 (find_char_forward, find_char_backward): Likewise.
4093 (mtext__from_data): Delete unnecessary check. Fix number of
4095 (mtext_from_data): Don't count items.
4096 (mtext_ref_char): Optimize the code.
4097 (mtext_set_char): Pay attention to format other than utf-8.
4098 (mtext_cat_char): Likewise.
4099 (mtext_dup): Don't call copy, instead do allocation here.
4100 (mtext_cat): Call insert instead of copy.
4101 (mtext_ncat): Likewise.
4102 (mtext_cpy): Delete character at first and call insert instead of
4104 (mtext_ncpy): Likewise.
4105 (mtext_copy): Likewise.
4106 (mtext_duplicate): Call insert instead of copy.
4107 (mtext_del): Pay attention to format other than utf-8.
4108 (mtext_ins): Simply call insert.
4109 (mtext_ins_char): Pay attention to format other than utf-8.
4110 (mtext_tok): Call insert instead of copy.
4111 (mtext_text): Call UNIT_BYTES.
4113 * textprop.c (mtext__adjust_plist_for_change): New function.
4115 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
4116 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
4117 (CHAR_UNITS_AT): Fix typo.
4118 (CHAR_UNITS_BY_HEAD): Fix typo.
4119 (STRING_CHAR_AND_UNITS): Fix typo.
4121 * internal.h (MTEXT_READ_ONLY_P): New macro.
4123 * mtext.h (mtext__replace): Delete the extern.
4124 (mtext__adjust_foramt): Adjust prototype.
4126 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
4127 if possible. Otherwise make a copy of mmt.
4129 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
4132 2004-06-18 Kenichi Handa <handa@m17n.org>
4134 * character.h (CHAR_STRING_UTF16): Fix syntax.
4136 2004-06-16 Kenichi Handa <handa@m17n.org>
4138 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
4139 (libm17n_X_la_LIBADD): Delete it.
4140 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
4142 * m17n-X.c (device_open): Add parens in `if' condition.
4144 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
4145 (DEC_POSITION): Likewise.
4146 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
4148 2004-06-15 Kenichi Handa <handa@m17n.org>
4150 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
4153 * draw.c (compose_glyph_string): If langauge is specified, call
4154 mface__for_chars even if a text is all latin. Fix condition for
4155 setting non_ascii_found.
4157 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
4159 * m17n.h (minput_char_to_key): Delete extern.
4161 * m17n-gui.h (minput_event_to_key): Cancel previous change.
4163 * m17n-gui.c (null_device_open): Set several members of frame.
4165 2004-06-14 Kenichi Handa <handa@m17n.org>
4167 * m17n-gui.h (minput_event_to_key): Delete extern.
4169 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
4171 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
4173 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
4175 2004-06-08 Kenichi Handa <handa@m17n.org>
4177 * character.c (mchar_put_prop): Don't increment the ref-count of
4180 2004-06-04 Kenichi Handa <handa@m17n.org>
4182 * m17n-core.c (mdebug__register_object): New function.
4183 (mdebug__unregister_object): Likewise.
4185 * internal.h (mdebug__register_object, mdebug__unregister_object):
4187 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
4190 * charset.c (mcharset__load_from_database): Don't call
4191 mconv__register_charset_coding here.
4193 * coding.c (find_coding): Get a real name from an element of
4194 coding_definition_list.
4195 (mconv__register_charset_coding): Set the real name at the top of
4197 (mcoding__load_from_database): Likewise.
4198 (mconv_list_codings): Adjusted for the above change.
4200 2004-06-03 Kenichi Handa <handa@m17n.org>
4202 * coding.c (find_coding): Find by canonicalized name. Don't have
4203 to modify the element of coding_definition_list by
4205 (mconv__define_coding_from_charset): Delete it.
4206 (mconv__register_charset_coding): Canonicalize sym.
4207 (mcoding__load_from_database): Register plist modified by
4210 * coding.h (mconv__define_coding_from_charset): Don't extern it.
4212 * font-ft.c (ft_open): Fix setting of rfont->descent.
4214 2004-06-02 Kenichi Handa <handa@m17n.org>
4216 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
4217 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
4218 (xlfd_unparse_name): Renamed from xfont_build_name.
4219 (mfont__init): Initialized Mfontconfig.
4220 (mfont__free_realized): Unconditionally unref rfont->info.
4221 (mfont__select): Free `this' if it's not best.
4222 (mfont__open): Don't check frame->realized_font_list.
4223 (mfont__parse_name_into_font): New function.
4224 (Mfontconfig): New variable.
4225 (mfont_from_name): Call mfont_parse_name.
4226 (mfont_name): Call mfont_unparse_name.
4227 (mdebug_dump_font): Likewise.
4229 * font.h (struct MFontDriver): Delete members parse_name and
4231 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
4232 (mfont__parse_name_into_font): Extern it.
4234 * font-ft.c: Include "symbol.h".
4235 (close_ft): Unconditionally free filename and charmap_list of
4237 (ft_open): Duplicate base->filename. Increment ref-count of
4238 ft_info->charmap_list. Free ft_info->charmap_list and
4239 ft_info->filename on error.
4240 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
4242 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
4244 (enum xlfd_field_idx): Moved to font.c.
4245 (split_font_name, build_font_name): Likewise.
4246 (build_font_list): Call mfont__parse_name_info_font.
4247 (xfont_open): Call mfont__unparse_name. Free name.
4248 (xfont_parse_name, xfont_build_name): Moved to font.c
4249 (xft_select): Prototype deleted.
4250 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
4251 Call mfont_pase_name.
4253 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4254 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4257 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4260 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4262 2004-06-01 Kenichi Handa <handa@m17n.org>
4264 * fontset.c (mfontset_modify_entry): Pay attention to the case
4265 that fontset->font_spec_list is NULL.
4267 2004-05-31 Kenichi Handa <handa@m17n.org>
4269 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4271 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4273 * font.c (mfont__select): Print score the a font for debugging.
4275 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4277 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4278 kanji_sym and kana_sym.
4280 2004-05-28 Kenichi Handa <handa@m17n.org>
4282 * Makefile.am (VINFO): New variable.
4283 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4284 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4286 2004-05-27 Kenichi Handa <handa@m17n.org>
4288 The following chanages are to make device dependent functions
4289 accessible only from MDeviceDriver structure, and to add GD and
4290 null device drivers. Font drivers get also device dependent.
4292 * m17n.c (m17n_init): Increament shell_initialized.
4293 (m17n_fini): Decremented shell_initialized.
4295 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4297 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4298 (Mwidget, Mcolormap, Mx): Extern them.
4300 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4301 (free_frame): Call frame->driver->close instead of
4303 (DLOPEN_SHLIB_EXT): New macro.
4304 (MDeviceLibraryInterface): New type.
4305 (device_library_list): New variable.
4306 (register_device_library): New function.
4307 (null_device): New variable.
4308 (null_device_close, null_device_get_prop)
4309 (null_device_realize_face, null_device_free_realized_face): New
4311 (null_driver): New variable.
4312 (null_device_init, null_device_fini, null_device_open): New
4314 (null_interface): New variable.
4315 (Mfreetype, Mdevice): Declare them.
4316 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4317 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4318 Mwin__Close_Device. Register drivers for Mx and Mgd.
4319 (m17n_fini_win): Decremented win_initialized. Call "fini"
4320 function of all opened devices. Don't call mwin__fini.
4321 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4323 (mframe): Handle Mdevice key of PLIST.
4324 (mframe_get_prop): Call frame->device->get_prop instead of
4325 mwin__device_get_prop.
4327 * m17n-gd.c: New file.
4329 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4330 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4332 * m17n-core.c (m17n_init_core): Increate core_initialized.
4333 (m17n_fini_core): Decremented core_initialized.
4335 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4336 (Mcolormap): Don't extern them here.
4338 * m17n-X.c (FRAME_DEVICE): New macro.
4339 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4340 (free_display_info): Use MPLIST_DO.
4341 (free_device): Free rface->info.
4342 (xft_close): Delete it.
4343 (device_init): Renamed from mwin__init.
4344 (device_fini): Renamed from mwin__fini.
4345 (device_open): Renamed from mwin__open_device.
4346 (x_driver): New variable.
4347 (MXFontInfo): Delete member frame, add member display.
4348 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4349 Don't declare them here.
4351 * internal-gui.h (MDeviceType): New enum.
4352 (MWDefice): Delete it.
4353 (struct MFrame): Change type of device to void *. New members
4354 device_type, driver, font_driver_list.
4355 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4356 (MDeviceDriver): New type.
4357 (Mx, Mgd, Mfreetype): Extern them.
4358 (mwin__XXX): Delete all of them.
4360 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4362 (win_destroy_ic): Likewise.
4363 (adjust_window_and_draw): Likewise.
4364 (win_callback): Likewise.
4365 (Mxim): Declare it here.
4366 (minput_event_to_key): Call M_CHECK_READABLE.
4368 * fontset.c (mfont__lookup_fontset): Delete local variable
4371 * font.h (struct MFontDriver): Delete member close, add members
4372 parse_name and build_name.
4373 (mfont__driver_list): Delete extern.
4374 (mfont__close): Delete extern.
4376 * font.c (mfont__init): Don't set mfont__driver_list.
4377 (mfont__fini): Don't unref mfont__driver_list.
4378 (mfont__select): Try font drivers in frame->font_driver_list. Set
4379 driver member of a realized font.
4380 (mfont__close): Delete it.
4381 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4382 functions of the default frame.
4384 * font-ft.c (close_ft): Check ft_info->ft_face and work
4386 (add_font_info): Allocate ft_info by M17N_OBJECT.
4387 (ft_close): Delete it.
4388 (mfont__ft_driver): Don't set ft_close.
4389 (ft_select): Increment ref-count of best_font.
4390 (ft_open): Decremented ref-count of base. On error, call
4391 FT_Done_Face and free ft_info.
4392 (ft_find_metric): Always use XXX_MONO in load_flags.
4393 (ft_render): Fix setting of width. Call
4394 frame->driver->draw_points instead of mwin__draw_points.
4395 (ft_to_prop): Don't set mfont__driver_list.
4396 (mfont__ft_fini): Just unref ft_info.
4398 * face.c (mface__init): Exchange foreground and background of
4399 mface__default. Call mface_put_prop to set hline of
4401 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4402 (mface__free_realized): Don't call mwin__free_realized_face.
4404 * draw.c (Mdepth): Don't declare it here.
4405 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4406 (render_glyphs, render_glyph_string): Likewise.
4407 (mdraw__init): Don't set Mdepth.
4408 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4410 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4412 (mdraw_text_items): Check FRAME is writable.
4413 (mdraw_per_char_extents): Implement body.
4415 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4417 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4418 (GUI_SOURCES): Delete it.
4419 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4420 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4421 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4422 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4423 (linkgui_LDADD): Set to libm17n-gui.la
4424 (linkgui_LDFLAGS): New target.
4425 (SRC): Include ${libm17n_gui_la_SOURCES} and
4426 ${libm17n_gd_la_SOURCES}.
4428 2004-05-24 Kenichi Handa <handa@m17n.org>
4430 * draw.c (draw_background): Don't draw background even if
4431 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4433 2004-05-22 Kenichi Handa <handa@m17n.org>
4435 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4437 2004-05-20 Kenichi Handa <handa@m17n.org>
4439 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4441 * m17n-gui.c: Include "plist.h".
4442 (mframe): If PLIST is NULL, initialize it to emply plist.
4444 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4445 (xft_driver): New variable.
4446 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4447 (xft_find_metric, xft_render): New function.
4448 (mwin__init): Adjusted for the new mfont__driver_list.
4449 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4450 generated face to PARAM.
4451 (mwin__realize_face): Fix setting of box colors. Don't call hook
4453 (mwin__draw_hline): New function.
4454 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4455 (mwin__xft_render): Delete these function.
4457 * internal-gui.h (struct MFrame): New member tick.
4458 (struct MGlyphString): New member tick.
4459 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4460 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4461 (mwin__xft_render): Delete extern.
4463 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4464 (mfontset): Always increment the reference count of returned
4467 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4468 (MFTInfo): Moved to font.h.
4469 (ft_iso8859_1_font_list): Delete this variable.
4470 (set_font_info): Don't set font->property[MFONT_TYPE].
4471 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4472 (add_font_info): Change type to void.
4473 (fc_list): Change anme from xft_list. Caller changed. Include
4474 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4475 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4476 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4477 (close_ft): Don't call mwin__xft_close. Unref
4478 ft_info->extra_info.
4479 (ft_open): Don't setup ft_info->fontname. Don't call
4481 (ft_find_metric): Don't call mwin__xft_get_metric.
4482 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4483 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4484 (mfont__ft_init): Adjusted for new mfont__driver_list.
4485 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4487 * font.c (mfont__driver_list): Make it MPlist.
4488 (mfont__init): Adjust initialization of mfont__driver_list.
4489 (mfont__fini): Free mfont__driver_list.
4490 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4491 (mfont__select): Adjusted for the new mfont__driver_list.
4493 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4494 (mfont__drirver_list): Adjust prototype.
4495 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4497 * face.h (struct MFace): Delete member realized_face_list, add
4499 (struct MRealizedFace): Delete member need_update
4500 andnofont_rface, add member non_ascii_list.
4501 (mface__update_frame_face): Extern it.
4503 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4505 (get_hline_create, get_box_create): New functions.
4506 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4508 (free_face): Cancep previous change. Free face->frame_list.
4509 (serialize_hline): Do nothing if hline->width is zero.
4510 (serialize_box): Do nothing if box->width is zero.
4511 (mface__init): Setup all properties of mface__default.
4512 (mface__fini): Free hline_prop_list and box_prop_list.
4513 (mface__realize): Cancel previous change. Update
4514 face->frame_list. Setup rface->non_ascii_list.
4515 (mface__for_chars): Update rface->non_ascii_list.
4516 (mface__free_realized): Free rface->non_ascii_list.
4517 (mface__update_frame_face): New function.
4518 (mface): Initialize face->frame_list.
4519 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4521 (mface_merge): Likewise.
4522 (mface_put_prop): If key is Mhline or Mbox, get value by
4523 get_hline_create or get_box_create respectively.
4524 (mface_put_prop): Update frame->tick and call
4525 mface__update_frame_face if necessary.
4526 (mface_update): Do nothing if func is noop_hook.
4528 * draw.c (render_glyphs): If a font is not found, use
4529 mwin__draw_empty_boxes.
4530 (alloc_gstring): Initialize gstring->tick.
4531 (get_gstring): Check gstring->tick.
4533 2004-05-17 Kenichi Handa <handa@m17n.org>
4535 * face.c (find_realized_face): Return value changed. If RFONT is
4536 NULL, avoid unnecessary checking.
4537 (free_face): Free face->realized_face_list.
4538 (mface__realize): Adjusted for the change of find_realized_face.
4539 If it returns a realized face that needs update, free it and
4540 realize a new one. Push a new realized face to
4541 frame->realized_face_list instead of appending.
4542 (mface__for_chars): Adjusted for the change of find_realized_face.
4543 Short cut if the required font is in rface->ascii_rface.
4544 (mface_put_prop): Free old value if necessary. Set need_update
4545 member of realized faces to 1.
4547 * face.h (struct MFace): Delete member tick, add member
4549 (struct MRealizedFace): Delete member tick, add member
4552 2004-05-13 Kenichi Handa <handa@m17n.org>
4554 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4556 2004-05-12 Kenichi Handa <handa@m17n.org>
4558 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4560 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4561 parse it XftNameParse.
4563 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4564 (all_fonts_scaned): New variable.
4565 (set_font_info): FAMILY may be Mnil.
4566 (add_font_info): Argument changed.
4567 (xft_list): Call add_font_info in it.
4568 (ft_list): Likewise.
4569 (ft_select): Make it work in the case family is Mnil.
4570 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4571 (mfont__ft_fini): Set all_fonts_scaned to 0.
4573 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4574 that is failed to open.
4576 2004-05-10 Kenichi Handa <handa@m17n.org>
4578 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4579 device's depth is 1 (i.e. monochrome).
4581 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4582 to work around the problem of libtool.
4584 * font-ft.c: Include <freetype/ftbdf.h>.
4585 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4587 (mfont__ft_init): Initialize them.
4588 (ft_iso8859_1_font_list): New variable.
4589 (set_font_info): Detect a font containing iso8859-1 glyphs and
4590 register it in ft_iso8859_1_font_list. If the font is not
4591 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4592 properties of the font from its properties.
4593 (add_font_list): If the font is not scalable, check if it is BDF
4594 or PCF font. If not, ignore it.
4595 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4596 registry is not iso8859-1.
4597 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4598 ft_iso8859_1_font_list.
4599 (ft_find_metric): If the font is not scalable, assume it as BDF
4600 or PCF, and get a metric from its properties.
4601 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4603 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4605 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4606 (libm17n_la_LDFLAGS): Delete it.
4607 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4608 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4610 2004-05-06 Kenichi Handa <handa@m17n.org>
4612 * draw.c (compose_glyph_string): Fix previous change.
4614 2004-04-30 Kenichi Handa <handa@m17n.org>
4616 * font-ft.c (ft_list): Delete unused variable `result'.
4617 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4619 2004-04-27 Kenichi Handa <handa@m17n.org>
4621 * m17n-X.c: Include config.h
4622 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4623 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4624 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4625 (FRAME_CMAP, FRAME_VISUAL): New macros.
4626 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4627 (xfont_driver): Make it static.
4628 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4629 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4630 info->xft_color_back.
4631 (MXftFontInfo) [HAVE_XFT2]: New type.
4632 (mwin__xft_close) [HAVE_XFT2]: New function.
4633 (mwin__xft_open) [HAVE_XFT2]: New function.
4634 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4635 (mwin__xft_render) [HAVE_XFT2]: New function.
4637 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4638 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4639 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4642 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4644 * font-ft.c: Don't include FT_FREETYPE_H here.
4645 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4646 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4647 (MFTInfo): New member charmap_index.
4648 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4649 (check_otf_filename): Renamed from check_filename. Return value
4651 (ft_set_property): This function deleted.
4652 (set_font_info): New function.
4653 (add_font_list): Argument changed. Add multiple fonts.
4654 (xft_list) [HAVE_XFT2]: New function.
4655 (ft_list) [not HAVE_XFT2]: New function.
4656 (ft_select): Add code for Xft.
4657 (close_ft): Likewise.
4658 (ft_open): Likewise.
4659 (ft_find_metric): Likewise.
4660 (ft_encode_char): Likewise.
4661 (ft_render): Likewise.
4663 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4665 2004-04-26 Kenichi Handa <handa@m17n.org>
4667 * textprop.c (mtext_attach_property): Declare the return type as
4670 2004-04-21 Kenichi Handa <handa@m17n.org>
4672 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4674 2004-04-09 Kenichi Handa <handa@m17n.org>
4676 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4678 (load_command): Setup above members.
4680 2004-04-05 Kenichi Handa <handa@m17n.org>
4682 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4684 2004-03-30 Kenichi Handa <handa@m17n.org>
4686 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4689 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4690 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4692 2004-03-29 Kenichi Handa <handa@m17n.org>
4694 * Version 1.0 Patch Level 2 released.
4696 2004-03-29 Kenichi Handa <handa@m17n.org>
4698 * charset.c (make_charset): Set charset->fully_loaded and
4699 charset->simple correctly. Don't try to get charset->min_char and
4700 charset->max_char for a charset of method subset and superset.
4701 Don't load a mapping file here.
4702 (mcharset__init): Set unified_max.
4703 (mcharset__load_from_database): Free a working plist.
4705 * coding.c (mcoding__fini): Free all malloced data.
4707 * input-gui.c (win_create_ic): Set control.as_image for preediting
4710 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4711 `count') to initialize the array.
4713 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4716 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4718 (mwin__create_window): Fix bug of setting a background pixel of a
4720 (mwin__adjust_window): Clear the window before drawing.
4722 * m17n-core.c (mdebug__report_object): Free array->objectes if
4724 (m17n_init_core): Don't set report_header_printed to 0 here.
4725 Fix debugging information.
4726 (m17n_fini_core): Set report_header_printed to 0 here.
4728 * m17n-core.h (mplist_deserialize): Extern it.
4730 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4732 * m17n.c (m17n_fini): Fix debugging information.
4734 * mtext.c (mtext__adjust_foramt): New function.
4736 * mtext.h (mtext__adjust_foramt): Extern it.
4738 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4740 * plist.h (mplist__deserialize): Don't extern it.
4742 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4743 elements of symbol_table to NULL. Report about created and freed
4744 symbols if MDEBUG_FINI is set.
4746 2004-03-22 Kenichi Handa <handa@m17n.org>
4748 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4750 * m17n.c (m17n_init): Fix the way of checking merror_code.
4752 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4754 2004-03-22 Kenichi Handa <handa@m17n.org>
4756 * fontset.c (realize_font_group): Adjust the font size by
4757 mfont__resize before selecting a font.
4759 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4761 2004-03-19 Kenichi Handa <handa@m17n.org>
4763 * Version 1.0 Patch Level 1 released.
4765 2004-03-19 Kenichi Handa <handa@m17n.org>
4767 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4769 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4771 2004-03-19 Kenichi Handa <handa@m17n.org>
4773 Re-apply the changes forgotten in the released version.
4775 * charset.c (mcharset__load_from_database): Call
4776 mchar_define_charset.
4778 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4779 (mconv_encode_range): Put Mcoding text property.
4781 2004-03-18 Kenichi Handa <handa@m17n.org>
4783 * draw.c (Mdepth): New variable.
4784 (visual_order): Delete unused local var `pos'.
4785 (compose_glyph_string): Fix for the case that gstring->glyphs is
4786 realloced. Stop generating glyphs at TO. Fix handling of
4788 (layout_glyphs): Get metrics of all glyphs in advance. Set
4789 lbearing and rbearing of base of composition glyph correctly.
4790 Handle left-overhang glyphs correctly.
4791 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4793 (dump_combining_code): Change the defualt off_x character to ".".
4794 (mdraw__init): Initialize Mdepth.
4796 * face.c (work_gstring): New variable
4797 (mface__init): Initialize work_gstring.
4798 (mface__fini): Free work_gstring.glyphs.
4799 (mface__realize): Don't handle videomode property here. Adjusted
4800 for the change of mfont__get_metric.
4801 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4803 * face.h (enum face_gc): Moved to m17n-X.c.
4805 * font.h (struct MFontDriver): Arguments of find_metric changed.
4806 (mfont__select): Prototype adjusted.
4807 (mfont__get_metric): Likewise.
4808 (mfont__ft_drive_otf): Likewise.
4809 (mfont__flt_run): Likewise.
4811 * font.c (mfont__select): New argument layouter. If layouter is
4812 different in the registered font, make a new copy of realized
4814 (mfont__get_metric): Argument changed. Get metrics of multiple
4816 (mfont_find): Call mfont__select with layouter as Mnil.
4818 * font-flt.c (FontLayoutContext): New member rfont.
4819 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4820 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4822 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4824 (NUM_POINTS): New macro.
4825 (MPointTable): New type.
4826 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4827 (mfont__ft_drive_otf): New argument rfont.
4829 * fontset.c (realize_font_group): Adjusted for the changed of
4831 (check_fontset_element): This function deleted.
4833 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4834 off the parent window if the preedit text is zero length.
4836 * internal-gui.h (struct MFrame): New members foreground,
4837 background, videomode, font.
4838 (struct MGlyphString): New member anti_alias.
4839 (MDrawPoint): New type.
4840 (mwin__draw_bitmap): Prototype deleted.
4841 (mwin__draw_points): Prototype added.
4843 * m17n-gui.h (MDrawControl): New member anti_alias.
4845 * m17n-gui.c (free_frame): Free frame->font.
4846 (mframe): Set the fontset of frame->face to the default fontset.
4848 * m17n-X.c (RGB_GC): New type.
4849 (enum gc_index): Renamed from enum face_gc. Member names changed.
4851 (struct MWDevice): Members foreground and background deleted. New
4852 member scratch_gc, gc_list.
4853 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4854 (free_device): Free GCs in device->gc_list.
4855 (get_rgb_gc): New function.
4856 (get_gc): Renamed and argument changed from get_color.
4857 (get_gc_for_anti_alias): New function.
4858 (xfont_find_metric): Arguments changed. Get metrics of multiple
4860 (set_region): Argument changed. Caller changed.
4861 (xfont_render): Allways set a font in gc.
4862 (x_error_handler, x_io_error_handler): Define only if
4863 X_SET_ERROR_HANDLER is defined.
4864 (mwin__open_device): Create device->scratch_gc. Set members
4865 foreground, background, and videomode of frame. Call
4866 XSetErrorHandler and XSetIOErrorHandler only if
4867 X_SET_ERROR_HANDLER is defined.
4868 (struct gc_list): Deleted.
4869 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4870 (mwin__realize_face): Adjusted for the change of the format of
4871 rface->info and the charge of set_region.
4872 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4873 (mwin__draw_box): Likewise.
4874 (mwin__draw_bitmap): This function deleted.
4875 (mwin__draw_points): New function.
4876 (mwin__verify_region): Adjusted for the change of the format of
4877 rface->info and the charge of set_region.
4878 (mwin__create_window): Inherit backgound pixel from parent.
4879 (mwin__dump_gc): Adjusted for the change of the format of
4882 2004-03-16 Kenichi Handa <handa@m17n.org>
4884 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4886 * input.c (M_key_alias): New variable.
4887 (handle_key): Try M_key_alias property of a key too.
4888 (minput__init): Initialize M_key_alias. Give that property to
4889 symbols in one_char_symbol. Fix bug of initializing
4892 * draw.c (compose_glyph_string): Don't handle
4893 ignore_formatting_char here. Include formatting characters in the
4894 range processed by a FTL.
4895 (layout_glyph_string): Handle ignore_formatting_char here.
4897 2004-03-12 Kenichi Handa <handa@m17n.org>
4899 * input-gui.c (win_create_ic): Enable bidi in status control.
4901 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4903 2004-03-09 Kenichi Handa <handa@m17n.org>
4905 * input.c (load_input_method): If title is not specified, use the
4906 input method name as title.
4908 * m17n-X.c (get_color): Make it static.
4909 (xim_create_ic, xim_destroy_ic, x_error_handler)
4910 (x_io_error_handler): Likewise.
4912 2004-03-01 Kenichi Handa <handa@m17n.org>
4914 * Version 1.0 released.
4917 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4918 National Institute of Advanced Industrial Science and Technology (AIST)
4919 Registration Number H15PRO112
4921 This file is part of the m17n library.
4923 The m17n library is free software; you can redistribute it and/or
4924 modify it under the terms of the GNU Lesser General Public License
4925 as published by the Free Software Foundation; either version 2.1 of
4926 the License, or (at your option) any later version.
4928 The m17n library is distributed in the hope that it will be useful,
4929 but WITHOUT ANY WARRANTY; without even the implied warranty of
4930 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4931 Lesser General Public License for more details.
4933 You should have received a copy of the GNU Lesser General Public
4934 License along with the m17n library; if not, write to the Free
4935 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4936 Boston, MA 02110-1301, USA.