1 2010-12-13 Kenichi Handa <handa@m17n.org>
3 * m17n-flt.c (mflt_enable_new_feature): Document it.
5 * m17n-flt.h: Exclude extern variables from Doxygen's scope.
7 2010-12-10 Kenichi Handa <handa@m17n.org>
9 * m17n-flt.c (mflt_dump_gstring): Document it.
11 2010-11-05 Kenichi Handa <handa@m17n.org>
13 * locale.c (make_locale): Don't call setlocale. Just parse the
16 2010-10-04 Kenichi Handa <handa@m17n.org>
18 * Version 1.6.2 released.
20 2010-09-30 Kenichi Handa <handa@m17n.org>
22 * input.c (open_im): Return -1 if the input method has no state.
24 2010-09-17 Kenichi Handa <handa@m17n.org>
26 * font-ft.c (ft_check_otf): Fix previous change.
28 2010-09-16 Kenichi Handa <handa@m17n.org>
30 * m17n-flt.c (parse_otf_command): Fix previous change.
32 2010-09-14 Kenichi Handa <handa@m17n.org>
34 * font-ft.c (ft_check_otf): Fix handling of negative features.
36 * m17n-flt.c (parse_otf_command): Fix handling of negative
38 (decode_packed_otf_tag): Fix updating category code.
39 (run_command): Fix `encoded' property of separator glyph.
40 (mflt_run): Improve debug info printing.
42 2010-09-11 Kenichi Handa <handa@m17n.org>
44 * src/charset.c, src/chartab.c, src/coding.c, src/face.c,
45 src/font.c, src/fontset.c, src/input.c, src/m17n-X.c,
46 src/m17n-core.c, src/m17n-flt.c, src/m17n-gd.c, src/m17n-gui.c,
47 src/m17n.c, src/mtext.c, src/plist.c, src/symbol.c,
48 src/textprop.c: Print debug information to mdebug__output instead
51 2010-09-02 Kenichi Handa <handa@m17n.org>
53 * draw.c (visual_order): Reorder only RTL composed-sequence.
55 2010-09-01 Kenichi Handa <handa@m17n.org>
57 * draw.c (compose_glyph_string): When the script `inherited' and
58 `common' can't be resolved, use "block" property of the character.
60 2010-08-31 Kenichi Handa <handa@m17n.org>
62 * draw.c (compose_glyph_string): Allow running flt striding over
65 2010-08-19 Kenichi Handa <handa@m17n.org>
67 * m17n-X.c (MDisplayInfo): New member altgr_mask.
68 (find_modifier_bits): Set disp_info->altgr_mask.
70 * input.c (fully_initialize): Make it static.
72 * input.h (MINPUT_KEY_ALTGR_MODIFIER): New macro.
74 * input-gui.c (minput_event_to_key): Handle
75 MINPUT_KEY_ALTGR_MODIFIER.
77 2010-08-12 Kenichi Handa <handa@m17n.org>
79 * character.h (STRING_CHAR_ADVANCE_UTF8): Sanitize the code.
80 (STRING_CHAR_ADVANCE_UTF16): Likewise.
82 * font.c (mfont__init): Initialize buf to NULL.
83 (mfont__id): Likewise.
85 * font-ft.c (ft_encapsulate): Use MDEBUG_PRINT1 instead of
87 (ft_check_otf): Move the label not_otf: within #ifdef HAVE_OTF.
88 (get_otf): Move the code within #ifdef HAVE_OTF.
89 (ft_drive_otf): Move declarations of some local variables within
92 2010-08-11 Kenichi Handa <handa@m17n.org>
94 * input.h (MInputContextInfo): New member state_hook.
96 * input.c (shift_state): Just set ic_info->state_hook, instead of
97 taking state-hook actions.
98 (handle_key): Check ic_info->state_hook. If KEY is unhandled,
99 init ic_info->state_hook.
101 2010-08-09 Kenichi Handa <handa@m17n.org>
103 * m17n-flt.c (try_otf): Remove unused local vars.
105 * input.c (fully_initialize): Avoid compiler warning by casting.
107 * m17n-core.c (m17n_init_core): Fix handling of env_value.
109 * fontset.c (realize_fontset_elements): Fix typo (pl->plist).
111 * coding.c (decode_coding_iso_2022): Sanitize "if" condition.
113 2010-04-23 Kenichi Handa <handa@m17n.org>
115 * Version 1.6.1 released.
117 2010-04-23 Kenichi Handa <handa@m17n.org>
119 * m17n-flt.c (enum GlyphInfoMask): Shift upper masks 1-bit left.
120 (decode_packed_otf_tag): If a glyph has combining information,
123 2010-04-23 Kenichi Handa <handa@m17n.org>
125 * font-ft.c (ft_drive_otf): Reset 28th bit of g->g.internal for
126 storing OTF feature tag.
128 2010-04-19 Kenichi Handa <handa@m17n.org>
130 * m17n-flt.c (run_stages): Update category code of glyphs if
131 category table is changed.
133 2010-04-05 Kenichi Handa <handa@m17n.org>
135 * font-ft.c (ft_check_cap_otf): Fix conditions to call
138 * database.c (check_version): Fix previous change.
140 2010-04-02 Kenichi Handa <handa@m17n.org>
142 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 6.
143 (M17NLIB_PATCH_LEVEL): Changed to 1.
144 (M17NLIB_VERSION_NAME): 1.6.1.
146 2010-03-30 Kenichi Handa <handa@m17n.org>
148 * Version 1.6.0 released.
150 2010-03-01 Kenichi Handa <handa@m17n.org>
152 * m17n-flt.c (run_rule): Fix checking of glyph availability.
154 2010-02-18 Kenichi Handa <handa@m17n.org>
156 * m17n-gui.c (register_device_library): Preprend M17N_MODULE_DIR
157 to the module file name.
159 * input.c (load_external_module): Preprend M17N_MODULE_DIR to the
162 * charset.c (load_charset): Check the return value of fgets.
164 * Makefile.am: Build modules dynamically loaded with
165 -avoid-version and no -version-info.
167 2010-01-15 Kenichi Handa <handa@m17n.org>
169 * draw.c (run_flt): Set mflt_try_otf to rfont->driver->try_otf.
170 (mdraw__init): Set mflt_enable_new_feature to 1.
172 * font-ft.c (ft_try_otf): New function.
173 (mfont__ft_driver): Set ft_try_otf.
175 * font.h (struct MFontDriver): New member try_otf.
177 * m17n-X.c (xft_driver): Set xft_try_otf.
178 (xft_try_otf): New function.
180 * m17n-flt.h: (mflt_enable_new_feature): Extern it.
181 (mflt_try_otf): Extern it.
183 * m17n-flt.c (load_category_table): If mflt_enable_new_feature is
184 zero, return NULL for such categories that require the new
186 (parse_otf_command): If mflt_enable_new_feature is zero, return
188 (load_otf_command): Fix previous change.
189 (load_flt): Check the return value of load_category_table.
190 (try_otf): Renamed from run_otf_category. Call mflt_try_otf
191 instead of font->drive_otf.
192 (run_command): Call try_otf instead of run_otf_category.
193 (m17n_init_flt): Initialize mflt_enable_new_feature to 0,
194 mflt_try_otf to NULL.
195 (mflt_enable_new_feature): New variable.
196 (mflt_try_otf): New variable.
198 2009-12-10 Kenichi Handa <handa@m17n.org>
200 * m17n-flt.c (parse_otf_command): Handle ":otf?".
201 (run_otf_category): If not features are specified, reset category
203 (run_command): On copy, don't re-calculate a category code.
205 2009-12-03 Kenichi Handa <handa@m17n.org>
207 * m17n-flt.c (run_stages): Reset category code if category-table
209 (mflt_run): Don't set category code here.
210 (decode_packed_otf_tag): If no feature is applied, re-calculate
213 2009-12-02 Kenichi Handa <handa@m17n.org>
215 * m17n-flt.c (mflt_find): If FONT is specified but no flt is
217 (run_command): Don't set ENCODED and MEASURED of separator.
219 2009-11-30 Kenichi Handa <handa@m17n.org>
221 * m17n-flt.c (load_otf_command): Check 4th char against '?'.
222 (load_command): Likewise.
223 (decode_packed_otf_tag): New arg CTX. If CTX->in == gstring,
224 update CTX->encoded. Caller changed.
226 2009-11-30 Kenichi Handa <handa@m17n.org>
228 * font-ft.c (ft_drive_otf): Check if OUT is null or not.
229 (ft_drive_otf): Call OTF_drive_gsub_with_log and
230 OTF_drive_gpos_with_log. Record the applied feature in
233 * font.c (mfont__get_glyph_id): Encode g->c instead of g->code.
235 * internal-flt.h (MAKE_COMBINING_CODE_BY_CLASS)
236 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
237 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P):
239 (PACK_OTF_TAG): Extern it.
241 * draw.c (reorder_combining_chars): Delete it.
243 * m17n-flt.h (mflt_font_id): Use type MFLFont.
244 (mflt_iterate_otf_feature): Likewise.
246 * m17n-flt.c (enum GlyphInfoMask): New member CategoryCodeMask and
248 (GET_CATEGORY_CODE, SET_CATEGORY_CODE, GET_COMBINED): New macros.
249 (SET_COMBINING_CODE): Set also CombinedMask.
250 (FontLayoutFeatureTable): Delete it.
251 (FeatureCodeTable): New type.
252 (FontLayoutCategory): Type of feature_table changed.
253 (load_category_table): Adjusted for the change of
255 (unref_category_table): Likewise.
256 (gen_otf_tag): New member shift. Caller changed.
257 (FontLayoutContext): New member category.
258 (run_rule): Compare g->c instead of g->code.
259 (decode_packed_otf_tag): New function.
260 (run_otf): Call decode_packed_otf_tag. Don't reset combining-code
262 (run_otf_category): New function.
263 (run_command): Set category-code if necessary. Call
264 run_otf_category for FontLayoutCmdTypeOTFCategory.
265 (run_stages): Set ctx->category. Get category from glyph if
267 (mflt_dump_gstring): New function.
269 2009-11-26 Kenichi Handa <handa@m17n.org>
271 * m17n-flt.c (enum FontLayoutCmdType): New member
272 FontLayoutCmdTypeOTFCategory.
273 (FontLayoutFeatureTable): New type.
274 (FontLayoutCategory): New members feature_table_size and
276 (load_category_table): Handle feature_table.
277 (unref_category_table): Likewise.
278 (load_otf_command): Handle FontLayoutCmdTypeOTFCategory.
279 (load_command): Likewise.
280 (free_flt_command): Likewise.
282 2009-11-10 Kenichi Handa <handa@m17n.org>
284 * draw.c (run_flt): Update category code of each glyph.
286 2009-11-07 Kenichi Handa <handa@m17n.org>
288 * font-ft.c (ft_drive_otf): Don't accumulate anchor adjustments.
290 2009-11-05 Kenichi Handa <handa@m17n.org>
292 * m17n-flt.c (run_otf): Fix updating of g->lbearing, etc.
294 * font-ft.c (ft_drive_otf): Use OTF_drive_gpos2 if possible.
296 2009-10-28 Kenichi Handa <handa@m17n.org>
298 * fontset.c (mdebug_flag): New variable.
299 (mfont__lookup_fontset): Print debug info.
301 * m17n-core.c (m17n_init_core): Call SET_DEBUG_FLAG for
304 * internal.h (enum MDebugFlag): Add MDEBUG_FONTSET.
306 * language.c (mscript__from_otf_tag): Adjusted for the new format
307 of the database <standard script unicode>.
309 2009-10-22 Kenichi Handa <handa@m17n.org>
311 * database.c (check_version): Fix the check.
313 * input.c (surrounding_pos): New arg *pos.
314 (integer_value): Fix handling of "@+0".
315 (take_action_list): Adjusted for the change of surrounding_pos.
317 2009-10-05 Kenichi Handa <handa@m17n.org>
319 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
322 * m17n-flt.c (FontLayoutCategory): New typedef.
323 (FontLayoutStage): Type of the member `category' changed.
324 (struct _MFLT): Type of the member `coverage' changed. New member
325 need_config and font_id.
326 (apply_otf_feature): New function.
327 (load_category_table): New arg FONT. If FONT is non-NULL, call
328 apply_otf_feature. Setup category->definition.
329 (ref_category_table): New macro.
330 (unref_category_table): New function.
331 (load_flt): Adjusted for the type change of category.
332 (free_flt_stage): New arg FLT.
333 (list_flt): Adjusted for the type change of category.
334 (run_stages): Adjusted for the type change of category.
335 (configure_category, configure_flt): New function.
336 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
337 mflt_font_id to NULL.
338 (mflt_get): Skip the heading configured FLTs.
339 (mflt_find): Likewise. If necessary, configure the found flt.
340 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
341 Adjusted for the type change of category.
342 (mflt_iterate_otf_feature, mflt_font_id): New variable.
344 * m17n-X.c (xfont_open): Set rfont->id.
345 (xft_driver): Set xft_iterate_otf_feature.
346 (xft_open): Set rfont->id.
347 (xft_iterate_otf_feature): New function.
349 * font.h (struct MRealizedFont): New member id.
350 (struct MFontDriver): New member iterate_otf_feature.
352 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
354 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
355 (get_otf): New funcition.
356 (ft_check_otf, ft_drive_otf): Use get_otf.
357 (iterate_callback, ft_iterate_otf_feature): New functions.
358 (mfont__ft_driver): Set ft_iterate_otf_feature.
360 * draw.c: Docstring updated.
361 (font_id): New function.
362 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
365 2009-10-02 Kenichi Handa <handa@m17n.org>
367 * m17n-flt.c (load_flt): Check the return value of
370 2009-09-03 Kenichi Handa <handa@m17n.org>
372 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
373 positions are adjusted by GPOS table.
375 2009-08-13 Kenichi Handa <handa@m17n.org>
377 * Version 1.5.5 released.
379 2009-08-13 Kenichi Handa <handa@m17n.org>
381 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
382 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
384 2009-03-03 Kenichi Handa <handa@m17n.org>
386 * draw.c (compose_glyph_string): Check if category not Mnil.
388 2009-03-02 Kenichi Handa <handa@m17n.org>
390 * Version 1.5.4 released.
392 2009-02-25 Kenichi Handa <handa@m17n.org>
394 * m17n-core.c (report_object_array): For M-text and Plist, print
397 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
398 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
400 * input.c (get_candidate_list): Free unnecessary objects.
401 (take_action_list): Free plist.
403 2009-02-04 Kenichi Handa <handa@m17n.org>
405 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
407 2009-01-16 Kenichi Handa <handa@m17n.org>
409 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
412 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
415 2009-01-14 Kenichi Handa <handa@m17n.org>
417 * coding.c (decode_coding_iso_2022): Check invocation status
418 before updating charset0 and charset1.
420 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
422 2008-12-31 Kenichi Handa <handa@m17n.org>
424 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
427 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
429 * face.c (mface_get_prop): Fix strict aliasing bug.
430 (mface_put_prop): Likewise.
432 * m17n-gui.c (mframe): Fix strict aliasing bug.
434 2008-10-20 Kenichi Handa <handa@m17n.org>
436 * Version 1.5.3 released.
438 2008-10-06 Kenichi Handa <handa@m17n.org>
440 * draw.c (mdraw__init): Use TRUE only when
441 FRIBIDI_INTERFACE_VERSION is less than 3.
443 2008-10-03 Kenichi Handa <handa@m17n.org>
445 * database.c (mdatabase__find_file): Return a copy of filename if
446 it is absolute pathname.
448 2008-09-25 Kenichi Handa <handa@m17n.org>
450 * input.c (load_macros): Don't parse the action list here.
451 (load_im_info): Parse action lists of all macros.
453 2008-09-24 Kenichi Handa <handa@m17n.org>
455 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
457 2008-09-19 Kenichi Handa <handa@m17n.org>
459 * input.c (fully_initialize): Rename "@reload" to "-reload".
461 2008-09-17 Kenichi Handa <handa@m17n.org>
463 * m17n-flt.c (run_stages): Fix combining with a variable width
466 2008-08-04 Kenichi Handa <handa@m17n.org>
468 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
471 2008-07-22 Kenichi Handa <handa@m17n.org>
473 * input.c (fully_initialize): Fix previous change.
475 2008-07-19 Kenichi Handa <handa@m17n.org>
477 * input.c (fully_initialize): Fix previous change.
479 2008-07-14 Kenichi Handa <handa@m17n.org>
481 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
483 2008-07-14 Kenichi Handa <handa@m17n.org>
485 * input.c (fully_initialize): Handle C-M-1, etc.
487 2008-07-11 Kenichi Handa <handa@m17n.org>
489 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
491 2008-06-23 Kenichi Handa <handa@m17n.org>
493 * Version 1.5.2 released.
495 2008-06-23 Kenichi Handa <handa@m17n.org>
497 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
498 (M17NLIB_PATCH_LEVEL): Changed to 2.
499 (M17NLIB_VERSION_NAME): Changed "1.5.2".
501 2008-06-13 Kenichi Handa <handa@m17n.org>
503 * input.c (minput_config_file): Comment fixed for man-page.
505 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
507 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
509 2008-05-24 Kenichi Handa <handa@m17n.org>
511 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
513 2008-05-23 Kenichi Handa <handa@m17n.org>
515 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
516 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
518 (libm17n_gd_la_LIBADD): Likewise.
520 * input.c (take_action_list): Fix debug info.
522 2008-05-14 Kenichi Handa <handa@m17n.org>
524 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
525 (run_stages): Fix index of g_indices.
527 2008-04-03 Kenichi Handa <handa@m17n.org>
529 * draw.c (compose_glyph_string): Don't run flt striding over the
531 (get_gstring): Don't use the cached gstring if cursor position is
534 2008-04-02 Kenichi Handa <handa@m17n.org>
536 * input.c (integer_value): Delete the 3rd arg VALUE.
537 (resolve_expression): Adjust the call of integer_value.
538 (take_action_list): Likewise.
540 2008-03-06 Kenichi Handa <handa@m17n.org>
542 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
545 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
547 * Version 1.5.1 released.
549 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
551 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
552 HAVE_FREETYPE is defined.
554 * font.h (OTF_Tag): Be sure that it is defined in any cases.
556 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
558 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
561 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
563 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
565 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
567 * input.c (parse_action_list): Check M_candidates.
568 (get_im_info): If key is Mnil, be sure to set im_info->states to a
571 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
573 * input.c (integer_value): Fix interpretation of "@-N".
575 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
577 * input.c (get_following_char): Fix interpretation of POS.
578 (get_following_char): Fix interpretation of "@+N".
580 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
582 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
585 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
587 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
589 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
591 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
592 (run_command): Check if clustering now before calling
593 UPDATE_CLUSTER_RANGE.
595 2008-01-06 Kenichi Handa <handa@m17n.org>
597 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
599 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
601 * m17n-X.c (xft_find_metric): Set g->g.measured.
603 * m17n-flt.c (Mequal): New variable.
604 (m17n_init_flt): Initialize it.
605 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
606 into a new member facility.
607 (load_command): Modify parsing of Mfont_facility.
608 (run_rule): Adjuted for the change of FontLayoutCmdRule.
609 (run_otf): Adjusted metrics if a->back is nonzero.
611 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
613 * Version 1.5.0 released.
615 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
617 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
619 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
620 (run_rule): Check if a font has the specific glyph correctly.
622 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
623 MDEBUG_FONT_FLT to MDEBUG_FLT.
625 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
627 * font-flt.c: Delete it.
629 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
631 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
632 TO for the rule of SRC_HAS_GLYPH.
634 * draw.c (run_flt): Argument changed.
635 (compose_glyph_string): Adjusted for the above change.
637 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
639 * plist.c (read_mtext_element): Don't free the malloced buffer.
641 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
643 * m17n-core.h (merror_code): Extern it.
645 * m17n-misc.h (merror_code): Don't extern it.
647 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
649 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
651 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
653 * draw.c (compose_glyph_string): Check g->rface->layouter, not
654 g->rface->rfont->layouter.
656 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
658 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
659 (run_rule): Use ctx->encoded_offset.
660 (run_command): Likewise.
661 (run_stages): Set ctx->encoded_offset.
663 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
665 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
666 bit-size of MFLTGlyph->internal.
668 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
670 * draw.c (visual_order): Exclude the last anchor glyph from the
673 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
675 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
676 (run_stages): Likewise.
677 (load_flt): Unref top after checking plist.
679 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
681 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
683 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
685 * m17n-flt.c (Mcombining): New variable.
686 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
687 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
688 SRC_HAS_GLYPH and SRC_OTF_SPEC.
689 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
691 (load_command): Adjusted for the above changes.
692 (run_rule): Likewise.
693 (combining_code_from_class): Delete it.
694 (mflt_get): Check flt->name against Mcombining, not Mt.
696 * internal-flt.h (Mcombining): Extern it.
698 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
699 combining characters.
701 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
703 * face.c (mface__realize): Reset measured flag before calling
706 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
707 (setup_combining_coverage): New function.
708 (setup_combining_flt): New function.
709 (mflt_get): If flt is not found, return NULL. If name if Mt,
710 call setup_combining_flt.
711 (mflt_run): For debugging, print font family name.
713 * font-ft.c (ft_render): Fix handling of baseline_offset.
714 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
715 (ft_render): Check pixel_mode to determine anti_alias.
717 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
718 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
719 (xfont_render): Set baseline_offset in pixel.
720 (xft_render): Fix handling of baseline_offset.
722 * draw.c (run_flt): Set font.font.family.
723 (compose_glyph_string): Fix handling of combining characters.
725 * fontset.c (try_font_list): Check if the named flt is surely
728 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
730 * draw.c (analyse_bidi_level): New function.
731 (visual_order): Do reordering using the already decided
733 (compose_glyph_string): Decide bidi-level before calling flt.
735 * m17n-flt.c (mflt_run): Fix typo.
737 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
739 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
741 * draw.c (visual_order): Don't rely on the width of glyphs.
742 (run_flt): Fix culculation of g->g.to.
744 * m17n-flt.c (run_rule): Don't set error code here.
745 (run_cond): Likewise.
746 (run_otf): Fix culculation of xoff and yoff.
747 (run_command): Don't set error code here.
751 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
752 (xfont_find_metric): Set glyph's yadv to 0.
753 (xft_find_metric): Likewise.
755 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
756 (ft_find_metric): Adjust glyph's metrics.
757 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
758 (ft_drive_otf): Set mark glyph's xadv to 0.
760 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
763 2007-10-29 Kenichi Handa <handa@m17n.org>
765 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
766 (mflt_get): Adjusted for the argument change.
767 (mflt_name): Adjusted for the return value change.
769 * m17n-flt.c (Mgenerator, Mend): New variables.
770 (flt_min_coverage, flt_max_coverage): New variables.
773 (Mfont_has): Renamed from Mexist. Referrers chagned.
774 (gen_otf_tag): Handle the trailing whitespaces.
775 (otf_count_features, otf_store_features): Fix for negative features.
776 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
777 (load_otf_command): Likewise.
778 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
779 (load_flt): Argument changed. Caller changed.
780 (free_flt_list): New function.
781 (run_rule): Adjusted for the change of FontLayoutContext.
782 (mflt_run): Adjusted for the change of FontLayoutContext.
784 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
785 (m17n_fini_win): Call m17n_fini_flt.
787 * m17n-gui.h: Include m17n-flt.h.
789 * m17n-gd.c: Adusted for the change of MGlyph.
791 * m17n-X.c: Adusted for the change of MGlyph.
792 (xft_check_otf, xft_drive_otf): New functions.
794 * internal-gui.h (MGlyph): Modified for new FLT handling.
796 * fontset.c (try_font_list): Adusted for the change of MGlyph.
798 * font-ft.c: Adjusted for the change of MGlyph.
799 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
800 (get_glyph_metric): Deleted.
801 (ft_check_otf): New function.
802 (ft_drive_otf): New fucntion.
804 * font.c: Adjusted for the change of MGlyph.
805 (mfont__init): Don't call mfont__flt_init.
806 (mfont__fini): Don't call mfont__flt_fini.
807 (mfont__get_glyph_id, mfont__get_metrics): New functions.
809 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
810 (MFLTFontForRealized): New struct.
811 (struct MFontDriver): New members check_otf and drive_otf.
812 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
814 * face.c: Adjusted for the change of MGlyph.
816 * draw.c: Adjusted for the change of MGlyph.
818 * m17n.c (m17n_init): Don't call mchar_init.
820 * m17n-core.c (m17n_init_core): Call mchar_init.
822 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
824 * input.c: Include "m17n.h" instead of "m17n-gui.h".
826 * chartab.c (mchartable): Initialize table->min_char to -1.
827 (mchartable_min_char): New function.
828 (mchartable_max_char): New function.
830 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
831 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
833 2007-10-12 Kenichi Handa <handa@m17n.org>
835 * m17n-core.h (Mcharset): Extern it.
836 Move detabase related declarations from m17n.h.
838 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
839 (struct _MFLTOtfFeatures): New struct.
840 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
841 (struct _MFLTFont): Delete otf, add check_otf.
842 (MCHAR_INVALID_CODE): Define it.
844 * plist.c (read_mtext_element): Simplify the code.
846 * m17n.h: Move database related declarations to m17n-core.h
847 (Mharset): Don't extern it.
849 * m17n.c (m17n_init): Don't call mdatabase__init.
851 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
854 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
855 (Mexist): New variable.
856 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
857 (FontLayoutCmdRule): New member src.exist.
858 (parse_otf_command): Handle gsub_count and gpos_count separately.
859 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
860 (load_command): Handle the command "exist".
861 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
862 (run_rule): Handle the case SRC_EXIST.
863 (run_otf): Adjusted for the change of MFLTOtfSpec.
864 (run_command): Check the range of FROM.
865 (check_otf_spec): Delete it.
866 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
868 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
869 (mflt_find): Call font->check_otf instead of check_otf_spec.
870 (mflt_run): Keep the metrics in 26.6 fixed point.
872 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
873 (m17n_init_core): Call mdatabase__init.
875 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
877 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
880 * font-flt.c (Mexist): New variable.
881 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
882 (FontLayoutCmdRule): New member src.exist.
883 (load_category_table): Use isalnum, not isalpha.
884 (load_command): Check the command "exist".
885 (run_rule): Hande the case SRC_EXIST.
886 (run_command): Check the range of FROM.
887 (mfont__flt_init): Initialize Mexist.
889 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
891 * database.h (mdatabase__load_charset_func): Extern it.
893 * database.c: Include m17n-core.h instead of m17n.h.
894 (load_chartable): Use mtext__from_data.
895 (load_charset): Moved to charset.c
896 (load_database): Call mdatabase__load_charset_func instead of
898 (mdatabase__load_charset_func): New variable.
899 (mdatabase__init): Initialize mdatabase__load_charset_func and
900 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
901 (mdatabase__save): Use fwrite, not mconv_encode_stream.
902 (Mcharset): Declare it here.
904 * charset.c: Include "database.h.".
905 (load_charset): Moved from database.c.
906 (mcharset__init): Initialize mdatabase__load_charset_func, don't
909 * character.c (mchar_define_property): Call mdatabase_find directly.
910 (mchar_get_prop): Call mdatabase_add directly.
911 (mchar_put_prop): Call mdatabase_load directly.
912 (mchar_get_prop_table): Likewise.
914 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
915 (libm17n_la_SOURCES): Remove database.[ch].
916 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
918 2007-09-18 Kenichi Handa <handa@m17n.org>
920 * face.c (mface__realize): Try Freetype based font at first.
922 * font.c: Include <ctype.h>
924 2007-09-16 Kenichi Handa <handa@m17n.org>
926 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
928 (run_otf): Call font->get_metrics, not font->get_metric.
929 (run_stages): Likewise.
930 (CHECK_FLT_COVERAGE): New macro.
931 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
932 (check_otf_spec): New function.
933 (m17n_fini_flt): Unref flt->coverage.
934 (mflt_find): Argument changed.
935 (mflt_name): New function.
936 (mflt_coverage): Use CHECK_FLT_COVERAGE.
938 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
939 (mflt_find): Prototype adjusted.
940 (mflt_name): Extern it.
942 2007-09-14 Kenichi Handa <handa@m17n.org>
944 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
946 * font-flt.c (run_otf): Make debug info printing comaptible with
948 (run_command): Likewise.
949 (mfont__flt_run): Likewise.
951 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
952 invalid only when it's negative.
954 (run_command): Likewise.
955 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
957 2007-09-10 Kenichi Handa <handa@m17n.org>
959 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
960 (struct _MFLTFont): Prototype of get_glyph_id changed.
962 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
964 (GAPPEND): Delete this macro.
965 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
966 for the change of MFLTGlyph. Caller changed.
967 (run_otf): Simply calls font->get_glyph_id.
968 (run_command): Reset g->encoded and g->measured for direct code.
969 (positioning): Delete this function.
970 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
972 2007-09-07 Kenichi Handa <handa@m17n.org>
974 * draw.c (compose_glyph_string): Improve script detection.
976 2007-09-06 Kenichi Handa <handa@m17n.org>
978 * m17n-flt.h (mflt_get): Extern it.
980 * m17n-flt.c (run_stages): Call positioning only if
981 font->get_metric is non-NULL.
982 (CHECK_FLT_STAGES): Fix typo.
983 (mflt_get): New function.
985 * font-flt.c (mfont__flt_run): Improve debug info printing.
987 2007-09-04 Kenichi Handa <handa@m17n.org>
989 * m17n-flt.c (MFontLayoutTable): Delete this type.
990 (struct _MFLT): New member mdb and coverage.
991 (list_flt): Set flt->mdb.
992 (load_generator): Argument and return value changed. Caller
994 (get_font_layout_table): Delete this function.
995 (run_stages): Argument changed. Caller changed.
996 (CHECK_FLT_STAGES): New macro.
997 (mfont__flt_encode_char): Argument changed.
998 (mflt_find): Likewise.
999 (mflt_coverage): New function.
1000 (mflt_run): Argument changed.
1001 (mdebug_dump_flt): Likewise.
1003 * m17n-flt.h (mflt_coverage): Extern it.
1004 (mflt_find): Prototype adjusted.
1006 2007-09-03 Kenichi Handa <handa@m17n.org>
1008 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
1010 * database.c (mdatabase__props): New function.
1012 * database.h (mdatabase__props): Extern it.
1014 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
1016 (struct _MFLTFont): Add suitable_p.
1017 (mflt_find): Extern it.
1019 * m17n-flt.c: Include "database.h".
1020 (struct _MFLT): New struct.
1021 (list_flt): New function.
1022 (load_flt): Don't update flt_list.
1023 (get_font_layout_table): Use flt_list.
1024 (m17n_init_flt): Don't initialize flt_list.
1025 (m17n_fini_flt): Adjusted for the change of flt_list.
1026 (mflt_find): New function.
1027 (mflt_run): Fix debug printing.
1029 2007-08-23 Kenichi Handa <handa@m17n.org>
1031 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
1032 (run_stages): Print separator in encoded string as "|".
1034 2007-08-23 Kenichi Handa <handa@m17n.org>
1036 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
1037 the glyph is already handled by OTF.
1039 2007-08-21 Kenichi Handa <handa@m17n.org>
1041 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
1043 2007-08-20 Kenichi Handa <handa@m17n.org>
1045 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
1048 2007-08-17 Kenichi Handa <handa@m17n.org>
1050 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
1052 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
1053 (MFLTFont): Prototype of the member drive_otf adjusted.
1055 * m17n-flt.c (run_stages): Fix handling of padding.
1057 * font-ft.c (get_glyph_metric): New function.
1058 (DEVICE_DELTA): Return 26.6 fixed point value.
1059 (adjust_anchor): Likewise.
1060 (mfont__ft_drive_otf): Use get_glyph_metric.
1062 * font-flt.c (mfont__flt_run): Pay attention to padding on
1063 printing debug info.
1065 2007-08-16 Kenichi Handa <handa@m17n.org>
1067 * m17n-flt.c (run_stages): Fix typo.
1069 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
1071 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
1072 Adjusted for the argument change of adjust_anchor. Calculte based
1073 on 26.6 fixed point.
1075 2007-08-15 Kenichi Handa <handa@m17n.org>
1077 * charset.c (mcharset__load_from_database): Set mdebug_flag
1078 instead of mdebug_mask.
1080 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
1083 * database.c (load_database): Set mdebug_flag instead of
1085 (mdatabase__load_for_keys): Likewise.
1087 * draw.c: Include "internal-flt.h".
1088 (dump_combining_code): Don't subtract 128 from combining code
1091 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
1093 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
1095 (run_cond): Likewise.
1096 (run_otf): Likewise.
1097 (run_command): Likewise.
1098 (mfont__flt_run): Change format of debug info.
1100 * font-ft.c: Include "internal-flt.h".
1101 Set mdebug_flag instead of mdebug_mask.
1102 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
1104 * input.c: Set mdebug_flag instead of mdebug_mask.
1105 (shift_state): New MDEBUG_FLAG macro.
1106 (preedit_commit): Likewise.
1109 * internal-flt.h: New file.
1111 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
1112 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
1113 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
1114 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
1115 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
1116 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
1117 these macros to internal-flt.h.
1119 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
1121 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
1122 (enum MDebugMaskBit): Delete this enum.
1123 (enum MDebugFlag): New enum.
1124 (mdebug__flag): Don't extern it.
1125 (mdebug__flags): Extern it.
1126 (MDEBUG_FLAG): New macro.
1127 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
1128 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
1129 (MDEBUG_PRINT_TIME): Likewise.
1131 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
1132 (xfont_list): Likewise.
1134 * m17n-core.c (mdebug__flag): Delete this variable.
1135 (mdebug__flags): New variable.
1136 (SET_DEBUG_FLAG): Make it a function.
1137 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
1138 (m17n_fini_core): Likewise.
1140 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
1141 (m17n_fini_win): Likewise.
1143 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
1145 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
1146 (m17n_fini): Likewise.
1148 * symbol.c (msymbol__free_table): Adjusted for the change of
1151 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
1152 (BASICHEADERS): Add m17n-flt.h.
1153 (FLT_SOURCES): New variable.
1154 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
1155 (libm17n_flt_la_LDFLAGS): Likewise.
1157 * m17n-flt.h: New file.
1159 * m17n-flt.c: New file created by modifying font-flt.c.
1161 2007-07-13 Kenichi Handa <handa@m17n.org>
1163 * Version 1.4.0 released.
1165 2007-07-12 Kenichi Handa <handa@m17n.org>
1167 * input.c: Fix doxygen @ref commands.
1169 2007-07-10 Kenichi Handa <handa@m17n.org>
1171 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
1173 2007-07-09 Kenichi Handa <handa@m17n.org>
1175 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
1177 * m17n.h: Include m17n-core.h if not yet done. Use macros
1178 M17N_BEGIN_HEADER and M17N_END_HEADER.
1180 * m17n-gui.h: Likewise.
1182 * m17n-misc.h: Likewise.
1184 2007-06-13 Kenichi Handa <handa@m17n.org>
1186 * font-flt.c (load_command): Prepend "^" in the regular expression.
1188 2007-06-11 Kenichi Handa <handa@m17n.org>
1190 * language.c (mlanguage_name_list): Fix previous change.
1192 * coding.c (mcoding__load_from_database): Add aliases in
1193 coding_definition_list.
1195 2007-06-10 Kenichi Handa <handa@m17n.org>
1197 * language.c (mlanguage_name_list): Fix previous change.
1199 2007-06-08 Kenichi Handa <handa@m17n.org>
1201 * input.c (update_candidate): Copy candidate_list earlier.
1202 (re_init_ic): Provide pseudo initialize state if none.
1204 2007-06-05 Kenichi Handa <handa@m17n.org>
1206 * input.c (preedit_insert): Print debug information.
1208 * database.c (expand_wildcard_database): New function.
1209 (mdatabase_list): Fix handling of wildcard database.
1211 * language.c (load_lang_name): New function.
1212 (mlang__fini): Cancel the last two changes.
1213 (mlanguage_name_list): New arg script and territories. Use
1216 * m17n.h (mlangauge_name_list): Adjusted.
1218 2007-06-04 Kenichi Handa <handa@m17n.org>
1220 * input.c (open_im): Check if the input method has at least one
1223 2007-06-01 Kenichi Handa <handa@m17n.org>
1225 * input.c (shift_state): Change the format of debug print.
1226 (preedit_commit): New arg need_prefix. Caller changed.
1227 (update_candidate): Copy candidate_list.
1228 (take_action_list): Likewise.
1229 (handle_key): Change the format of debug print.
1231 * font-flt.c (load_flt): Ignore unknown directives.
1233 2007-05-25 Kenichi Handa <handa@m17n.org>
1235 * m17n-core.c (mdebug__unregister_object): Small optimization.
1237 * database.c (find_file): Merged into get_database_file.
1238 (get_database_file): New arg result. Caller changed.
1239 (mdatabase__check): Fix the logic.
1241 2007-05-24 Kenichi Handa <handa@m17n.org>
1243 * database.c (find_database): If unprocessed wildcard database is
1244 found, register database filed and recursively call find_database.
1245 (free_db_info): Unref db_info->properties.
1246 (register_database): New arg properties. Delete code for
1247 initializing mdatabase__list.
1248 (register_databases_in_files): Argument changed. Caller changed.
1249 (mdatabase__update): Don't list files by glob here.
1250 (mdatabase_list): If unprocessed wildcard database is found,
1251 register database filed and recursively call mdatabase_list.
1253 * database.h (enum MDatabaseStatus): New enum
1254 MDB_STATUS_AUTO_WILDCARD.
1256 * input.c (load_branch): Fix previous change.
1257 (update_global_info): If the global database is not found, return -1.
1259 2007-05-23 Kenichi Handa <handa@m17n.org>
1261 * database.c (Mversion): New variable.
1262 (mdatabase__init): Initialize it.
1263 (register_database): New arg properties. Caller changed.
1264 (register_databases_in_files): Don't check version here.
1265 (mdatabase__update): Likewise.
1267 * database.h (MDatabaseInfo): New member properties.
1269 2007-05-21 Kenichi Handa <handa@m17n.org>
1271 * language.c: Include <ctype.h>
1272 (mlanguage__info): Use strncasecmp (not memcmp).
1273 (mlanguage_name): Downcase language name for backward
1276 * input.c (filter): Don't check Mlanguage property of
1279 2007-05-18 Kenichi Handa <handa@m17n.org>
1281 * language.c (mlanguage_name): Fix it to handle M-text English
1284 * input.c (config_command): Set NAME before using it.
1285 (load_branch): Try to resolve a map name by variables.
1287 2007-05-17 Kenichi Handa <handa@m17n.org>
1289 * language.c (mlang__fini): Fix previous change.
1291 2007-05-16 Kenichi Handa <handa@m17n.org>
1293 * plist.c (free_plist): Cancel the last change.
1294 (write_element): Check if PLIST is nested.
1295 (mplist__from_plist): Label a plist as nested if appropriate.
1296 (mplist__from_alist): Label a plist as nested.
1297 (mplist__conc): Check the value of PL before referring it. Label
1298 a plist as nested if appropriate.
1299 (mplist_copy): Label a plist as nested if appropriate.
1300 (mplist_put_func): Return Mnil if KEY is a managing key.
1301 (mplist_push): Label a plist as nested if appropriate.
1303 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
1306 * language.c (mlang__fini): Unref each element of langname_list.
1308 2007-05-14 Kenichi Handa <handa@m17n.org>
1310 * language.c: Include <string.h> and <locale.h>.
1311 (langname_list): New variable.
1312 (load_lang_script_list): Exclude invalid list elements.
1313 (mlang__init): Initialize langname_list.
1314 (mlang__fini): Unref langname_list.
1315 (mlanguage__info): Adjusted for the change of English
1316 name (symbol->M-text).
1317 (mlanguage_name): Label it as obsolete.
1318 (mlanguage_name_list): New function.
1320 * m17n.h (mlanguage_name_list): Extern it.
1322 * locale.c (make_locale): Fix setting of members of locale.
1324 * plist.c (free_plist): Unref also nested plist.
1326 2007-05-11 Kenichi Handa <handa@m17n.org>
1328 * coding.c (mconv_reset_converter): Set internal->used to 0.
1330 2007-05-08 Kenichi Handa <handa@m17n.org>
1332 * input.c (check_description): Force copying the translated text.
1334 2007-05-02 Kenichi Handa <handa@m17n.org>
1336 * input.c (minput_save_config): Unref unnecessary plist. Use
1337 free_im_list to free im_config_list.
1339 2007-04-20 Kenichi Handa <handa@m17n.org>
1341 * input.c (config_command): Fix previous change again.
1342 (config_variable): Likewise.
1343 (minput_config_command): Fix for the case of setting back to
1345 (minput_config_variable): Likewise.
1346 (minput_save_config): Include nil as documentation of customized
1349 2007-04-05 Kenichi Handa <handa@m17n.org>
1351 * input.c (config_command): Fix previous change.
1352 (config_variable): Likewise.
1354 * plist.c (mplist_get_func): Fix for backward compatiblity.
1356 2007-04-04 Kenichi Handa <handa@m17n.org>
1358 * input.c (minput_get_command, minput_config_command): Fix example
1361 2007-03-29 Kenichi Handa <handa@m17n.org>
1363 These changes are to avoid unsafe casting of a function pointer.
1365 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1366 (struct MFace): New member hook.
1368 * face.c (serialize_face): Adjusted for the change of MFace.
1369 (deserialize_face): Likewise.
1370 (mface__init): Likewise. Use msymbol_put_func.
1371 (mface__realize): Adjusted for the change of MFace. Avoid
1373 (mface_get_prop): Adjusted for the change of MFace.
1374 (mface_put_prop): Likewise.
1375 (mface_get_hook): New function.
1376 (mface_put_hook): New function.
1377 (mface_update): Adjusted for the change of MFace.
1379 * input-gui.c (win_callback): Use mplsit_get_func.
1380 (minput__win_init): Use mplsit_put_func.
1382 * input.c (take_action_list): Use mplist_get_func.
1383 (init_ic_info): Likewise.
1384 (fini_ic_info): Likewise.
1385 (minput_callback): Likewise.
1386 (minput__init): Use mplist_put_func.
1388 * language.c (mlang__init): Use msymbol_put_func.
1390 * m17n-core.h (M17NFunc): New function type.
1391 (M17N_FUNC): New macro.
1392 (msymbol_put_func, msymbol_get_func): Extern them.
1393 (mplist_put_func, mplist_get_func): Extern them.
1395 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1397 * m17n-gui.c (mframe): Add a proper casting.
1399 * plist.h (struct MPlist): Make the member val a union.
1400 (MPLIST_VAL): Adjusted for the above change.
1401 (MPLIST_FUNC): New macro.
1402 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1404 * plist.c (mplist_put_func, mplist_get_func): New functions.
1406 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1407 (msymbol_put_func, msymbol_get_func): New functions.
1409 * textprop.c (mtext_serialize): Use msymbol_get_func.
1410 (mtext_deserialize): Likewise.
1412 2007-03-28 Kenichi Handa <handa@m17n.org>
1414 * input.c (get_candidate_list): Avoid unnecessary unref.
1416 2007-03-23 Kenichi Handa <handa@m17n.org>
1418 * database.c (mdatabase__update): Unref plist at the tail.
1420 2007-03-21 Kenichi Handa <handa@m17n.org>
1422 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1424 (config_command): Fix for the case that configuration is
1426 (config_variable): Likewise.
1427 (minput_config_command): If keyseqlist is an empty list, cancel
1429 (minput_config_variable) If value is an empty list, cancel the
1431 (minput_save_config): Handle cancellation of config and customize
1434 2007-03-15 Kenichi Handa <handa@m17n.org>
1436 * input.c (minput_config_variable): Check custom->vars (not
1439 2007-03-01 Kenichi Handa <handa@m17n.org>
1441 * input.c (reload_im_info): Setup cmds, vars, and title of
1443 (check_variable_value): Fix the return value.
1445 * database.c (mdatabase__check): If necessary, update database and
1448 2007-02-28 Kenichi Handa <handa@m17n.org>
1450 * database.c (get_dir_info): Set dir_info->status to
1451 MDB_STATUS_OUTDATED.
1452 (check_version): New function.
1453 (register_database): Don't call find_database.
1454 (register_databases_in_files): Don't register a database of
1456 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1458 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1459 and MDB_STATUS_OUTDATED.
1461 * font.h (struct MFont): Types of members type, source, and
1462 spacing changed to unsigned.
1464 * internal-gui.h (struct): Types of members category and type
1465 changed to unsigned.
1467 * internal.h (struct MText): Types of members format and coverage
1468 changed to unsigned.
1470 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1471 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1473 2007-02-23 Kenichi Handa <handa@m17n.org>
1475 * input.c (Mpop): New variable.
1476 (fully_initialize): Initialize Mpop.
1477 (parse_action_list): Handle Mpop.
1478 (take_action_list): Likewise.
1479 (handle_key): When a key is unhandled, shift to the initial state
1480 only if the current state has no branch action.
1482 2007-02-12 Kenichi Handa <handa@m17n.org>
1484 * input.c (get_preceding_char): Unref mt if necessary.
1485 (get_following_char): Likewise.
1486 (parse_action_list): Fix handling of `insert' action as
1488 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1489 (take_action_list): Check invalid candidate list.
1491 2007-02-06 Kenichi Handa <handa@m17n.org>
1493 * input.c (integer_value): Check also ic->produced for @-N.
1495 2007-01-26 Kenichi Handa <handa@m17n.org>
1497 * database.c (mdatabase__update): Check mdatabase__dir_list from
1500 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1502 2007-01-12 Kenichi Handa <handa@m17n.org>
1504 * input.c (handle_key): Handle a branch action of the initial
1507 2007-01-10 Kenichi Handa <handa@m17n.org>
1509 * m17n-gd.c (gd_render): Delete superfluous line.
1511 2006-12-26 Kenichi Handa <handa@m17n.org>
1513 * m17n.h (minput_callback): Extern it.
1515 * input.h (minput__callback): Delte extern.
1517 * input.c (get_surrounding_text): Adjusted for the change of
1518 minput__callback to minput_callback.
1519 (delete_surrounding_text): Likewise.
1520 (minput_create_ic): Likewise.
1521 (minput_destroy_ic): Likewise.
1522 (minput_filter): Likewise.
1523 (minput_set_spot): Likewise.
1524 (minput_toggle): Likewise.
1525 (minput_reset_ic): Likewise.
1527 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1528 and ic->candidate_to to 0.
1529 (minput_callback): Renamed from minput__callback.
1531 * input-gui.c (win_callback): Adjusted for the change of
1532 minput__callback to minput_callback.
1534 2006-12-15 Kenichi Handa <handa@m17n.org>
1536 * font-ft.c (ft_add_font): Fix typo.
1538 2006-12-06 Kenichi Handa <handa@m17n.org>
1540 * Version 1.3.4 released.
1542 2006-11-16 Kenichi Handa <handa@m17n.org>
1544 * input.c (parse_action_list): Allow (undo 0).
1545 (adjust_markers): New function.
1546 (preedit_insert, preedit_delete): Call adjust_markers.
1547 (preedit_replace): New function.
1548 (update_candidate): Call preedit_replace instead of preedit_insert
1550 (filter): When ic_info->commit_key_head is nonzero, shift input
1551 event keys even if there's no committed text.
1553 2006-11-10 Kenichi Handa <handa@m17n.org>
1555 * input.h (MInputContextInfo): New member commit_key_head.
1557 * input.c (preedit_commit): Update ic_info->commit_key_head.
1558 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1559 (filter): When committed, shift keys by ic_info->commit_key_head.
1561 2006-10-30 Kenichi Handa <handa@m17n.org>
1563 * input.c (preedit_delete): Fix typo.
1564 (take_action_list): Print more debugging information. Allow
1565 variable in arg of 'select' and `pushback'.
1567 * database.c (gen_database_name): Don't put extra space.
1568 (load_database): Print debugging information.
1569 (register_databases_in_files): New arg headlen. Callers changed.
1570 (mdatabase__load_for_keys): Shorten debugging information.
1571 (mdatabase_load): Don't print debugging information here.
1573 2006-10-27 Kenichi Handa <handa@m17n.org>
1575 * input.c (marker_code): New arg surrounding. Callers changed.
1576 (surrounding_pos): Check if name[0] == '@'.
1577 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1578 (take_action_list): Likewise.
1579 (get_preceding_char): If POS is zero, always call
1580 get_surrounding_text.
1582 2006-10-19 Kenichi Handa <handa@m17n.org>
1584 * input.c (load_variables): Fix setting of `global'.
1586 2006-10-16 Kenichi Handa <handa@m17n.org>
1588 * draw.c (draw_background): Be sure to set *to_x.
1589 (render_glyph_string): If from == to, just return.
1591 2006-10-18 Kenichi Handa <handa@m17n.org>
1593 * database.c (get_dir_info): Return NULL if the directory name is
1595 (register_databases_in_files): Call register_database with
1597 (mdatabase__update): Fix logic. Call register_database with
1599 (mdatabase_define): Call register_database with
1600 MDB_STATUS_EXPLICIT.
1602 * input.c (delete_surrounding_text): Be sure to set members
1603 preceding_text and following_text to NULL.
1604 (shift_state): Save variable values in ic_info->vars_saved.
1605 (preedit_commit): Don't print debug information here. Don't
1606 change ic_info->keys here.
1607 (get_candidate_list): Don't ref plist.
1608 (take_action_list): Don't unref return value of
1609 get_candidate_list. For undo, reset ic->produced and recover
1610 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1612 (init_ic_info): Set ic_info->vars_saved.
1613 (fini_ic_info): Unref ic_info->vars_saved.
1614 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1616 (filter): Be sure to set members preceding_text and following_text
1617 to NULL. Print debug information about produced text. Delete
1618 processed keys from ic_info->keys.
1620 * input.h (MInputContextInfo): New member vars_saved.
1622 2006-10-16 Kenichi Handa <handa@m17n.org>
1624 * database.c (mdatabase__update): Fix the way to get db_info.
1626 2006-10-02 Kenichi Handa <handa@m17n.org>
1628 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1629 `size' changed to 24.
1631 * font.c (xlfd_unparse_name): Adjusted for the change of
1633 (font_score): Likewise.
1634 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1636 * m17n-X.c (MFontX, _MFontX): Deleted.
1637 (SET_SIZE, HAVE_SIZE): Deleted.
1638 (free_display_info): Adjusted for the change of
1639 disp_info->font_list format.
1640 (xfont_registry_list): Likewise.
1641 (xfont_open): Likewise.
1642 (xfont_list): Likewise.
1643 (xfont_encode_char): Ignore size to find a realized font.
1644 (MRealizedFontXft): Change the order of members to make it
1645 compatible with MRealizedFontFT.
1647 2006-09-27 Kenichi Handa <handa@m17n.org>
1649 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1650 (mfont_close): Add comments.
1652 * mtext-lbrk.c (mtext_line_break): Add comment.
1654 2006-09-26 Kenichi Handa <handa@m17n.org>
1656 * input.c (minput_get_description): Handle description about
1657 inclusion-only input methods.
1659 2006-09-21 Kenichi Handa <handa@m17n.org>
1661 * input.c (M_gettext): New variable.
1662 (fully_initialize): Initialize M_gettext.
1663 (check_description): New function.
1664 (load_commands): Call check_description.
1665 (config_all_commands): Be sure to unref pl.
1666 (load_variables): Call check_description.
1667 (config_all_variables): Be sure to unref pl.
1668 (load_im_info): Call check_description.
1670 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1672 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1673 and bind_textdomain_codeset.
1675 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1677 2006-09-15 Kenichi Handa <handa@m17n.org>
1679 * input.c (reload_im_info): Update custom and global info.
1680 (init_ic_info): Fix previous change.
1682 2006-09-14 Kenichi Handa <handa@m17n.org>
1684 * database.c: Include <libgen.h>.
1685 (mdatabase__lock): Make a directory if necessary.
1687 * input.c (resolve_command): Adjusted for the format change of
1688 configured_cmds member.
1689 (load_commands, load_variables): Fix for errornous data handling.
1690 (config_command, config_variable): New function.
1691 (config_all_commands, config_all_variables): Renamed from
1692 config_commands and config_variables. Utilize the above function.
1693 (check_variable_value): Argument changed. Callers changed.
1694 (load_im_info): Call config_all_commands and config_all_variables.
1695 (init_ic_info): Adjusted for the format change of configured_vars
1697 (minput__init): Initialize Mcustomized, Mconfigured, and
1699 (Mcustomized, Mconfigured, Minherited): New variables.
1700 (minput_get_command): Be sure to return NULL if an input method
1701 use no local command.
1702 (minput_get_variable): Be sure to return NULL if an input method
1703 use no local variable.
1704 (minput_config_command, minput_config_variable)
1705 (minput_save_config): Adjusted for the format change of
1706 configured_cmds and configured_vars members.
1708 * plist.c (write_element): Delete superfluous ':'.
1710 2006-09-13 Kenichi Handa <handa@m17n.org>
1712 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1713 (minput_config_file): Extern it.
1715 * draw.c (Minherited): Declaration moved to input.c.
1716 (mdraw__init): Don't initialize Minherited here.
1718 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1720 2006-09-07 Kenichi Handa <handa@m17n.org>
1722 * textprop.c (mtext_serialize): Call mplist__serialize with the
1725 * plist.h (mplist__serialize): Prototype adjusted.
1726 (mplist__assq): Extern it.
1728 * plist.c: Include <ctype.h>
1729 (PUTC, PUTS): New macros.
1730 (write_symbol): New function.
1731 (write_element): New arg indent.
1732 (dump_string, dump_plist_element): Delete them.
1733 (mplist__from_string): New arg pretty.
1734 (mplist__assq): New function.
1735 (mdebug_dump_plist): Use write_element.
1737 * mtext.c (mtext_cat_char): Allocate more memory.
1738 (mdebug_dump_mtext): Don't escal a newline character.
1740 * m17n.h (minput_get_command, minput_get_variable)
1741 (minput_config_command, minput_config_variable)
1742 (minput_save_config): Extern them.
1744 * m17n-core.c: Include <string.h>.
1745 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1746 use the stream stdout instead of a file of that name.
1748 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1751 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1752 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1753 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1754 (MDEBUG_DUMP): Flush the stream.
1756 * input.h (struct _MInputMethodInfo): Delete member im. New
1757 members mdb, language, name, extra, cmds, configured_cmds,
1758 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1759 (MInputContextInfo): New member tick.
1761 * input.c: Big change to improve user-side input method
1762 customization. Here, list just public API changes.
1763 (minput_get_commands, minput_get_variables)
1764 (minput_assign_command_keys, minput_set_variable): Label them
1766 (minput_get_command, minput_get_variable)
1767 (minput_config_command, minput_config_variable)
1768 (minput_save_config): New functions.
1770 * database.h (PATH_MAX): Define it if not yet defined.
1771 (PATH_SEPARATOR): Likewise.
1772 (enum MDatabaseStatus): New enum.
1773 (struct MDatabaseInfo): Moved from database.c. New members status,
1774 time, lock_file, and uniq_file.
1775 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1776 (mdatabase__unlock): Extern them.
1778 * database.c: Include <time.h>.
1779 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1780 (GEN_PATH): Args changed. Callers changed.
1781 (struct MDatabaseInfo): Moved to database.h.
1782 (struct MDatabase, mdb_list): Deleted.
1783 (mdatabase__list): New var.
1784 (get_database_filename): Deleted. Callers changed to use
1786 (find_file, get_database_file): New files.
1787 (get_dir_info): Initialize new members of MDatabaseInfo.
1788 (find_database): Arg chagnded. Callers changed.
1789 (free_db_info, register_database, register_databases_in_files):
1791 (update_database_list): Deleted.
1792 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1793 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1794 (mdatabase__update): New function.
1795 (mdatabase__check): Return value changed.
1796 (mdatabase__file, mdatabase__lock, mdatabase__save)
1797 (mdatabase__unlock): New functions.
1799 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1801 * input.c (get_surrounding_text): Return -2 when surrounding text
1803 (get_following_char): Likewise.
1804 (get_preceding_char): Likewise.
1805 (minput__callback): Return 0 if there is a callback function,
1808 2006-08-17 Kenichi Handa <handa@m17n.org>
1810 * input.c (reset_ic): Use shift_state to setup the current state.
1812 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1814 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1815 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1816 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1818 2006-08-02 Kenichi Handa <handa@m17n.org>
1820 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1822 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1824 * font-ft.c (ft_encapsulate): Add code for debugging.
1825 (mfont__ft_drive_otf): Be sure to encode character before getting
1828 2006-07-21 Kenichi Handa <handa@m17n.org>
1830 * draw.c (mdraw_text_extents): Fix previous typo.
1832 2006-07-19 Kenichi Handa <handa@m17n.org>
1834 * draw.c (gstring_width): New arg lbearing.
1835 (render_glyph_string): Adjusted for the change of gstring_width.
1836 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1838 * m17n-core.h (Mlanguage): Extern it.
1840 * m17n.h (Mlanguage): Extern deleted.
1842 * mtext.c (mtext__init): Initialize Mlanguage.
1843 (Mlanguage): Declaration moved from locale.c
1845 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1846 (Mlanguage): Declaration moved to mtext.c.
1848 * language.c (mlang__init): Don't initialize Mlanguage here.
1850 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1852 2006-07-14 Kenichi Handa <handa@m17n.org>
1854 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1855 (MRealizedFontFT): New member face_encapsulated.
1856 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1857 (ft_gen_font): New function.
1858 (ft_add_font): Use ft_gen_font.
1859 (ft_list_script): Store lists in ft_script_list.
1860 (ft_check_otf): New arg ft_face. Caller changed.
1861 (ft_check_language): Likewise.
1862 (ft_check_script): Likewise.
1863 (ft_encapsulate, ft_close): New functions.
1864 (mfont__ft_driver): Initialize members encapsulate and close.
1865 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1867 * font.h (struct MRealizedFont): New member encapsulating.
1868 (struct MFontDriver): New members encapsulate and close.
1870 * font.c (mfont__match_p): If FONT is realized, check capability
1871 by font drivers's check_capability method.
1872 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1875 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1876 declarations of foundry and fam local vars.
1877 (xft_driver): Make it static.
1879 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1880 (mfont_close): Extern them.
1882 * m17n-gd.c (device_open): Don't specify foundry and family of the
1885 2006-07-11 Kenichi Handa <handa@m17n.org>
1887 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1889 2006-07-13 Kenichi Handa <handa@m17n.org>
1891 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1893 (ft_check_script): Delete unused var.
1894 (ft_list_capability): Likewise.
1896 * font.c (mfont__get_capability): Setup cap->otf.
1897 (Motf): Make it global.
1898 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1900 * font.h (MFontCapability): New member otf.
1902 * language.c (mlang__fini): Delete unused vars.
1904 * m17n-gui.h (Motf): Extern it.
1906 * database.c (update_database_list): Delete unused vars.
1908 2006-07-07 Kenichi Handa <handa@m17n.org>
1910 * font-ft.c (DEVICE_DELTA): Fix typo.
1912 2006-07-06 Kenichi Handa <handa@m17n.org>
1914 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1917 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1919 * database.c: Update comments.
1921 2006-07-05 Kenichi Handa <handa@m17n.org>
1923 * database.c (PATH_MAX): Define it if not yet defined.
1924 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1926 (get_database_filename): Use GEN_PATH.
1927 (get_dir_info): Don't include the last '/' in directory name.
1928 (register_database): New function.
1929 (update_database_list): Use register_database. Search all
1930 directories in mdatabase__dir_list for wildcard databases.
1931 (mdatabase__init): Check "~/.m17n.d".
1933 2006-07-03 Kenichi Handa <handa@m17n.org>
1935 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1936 push reverse property.
1938 * plist.c (dump_plist_element): Fix previous change.
1940 2006-06-28 Kenichi Handa <handa@m17n.org>
1942 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1945 * draw.c (MbidiNSM): New variable.
1946 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1947 attention to bidi type NSM.
1948 (mdraw__init): Initialize MbibiNSM.
1950 * language.c (mscript__char_list): Fix finding a char-list element.
1952 * plist.c (dump_string): Return number of printed characters.
1953 (dump_plist_element): Print elements more compactly.
1955 2006-06-23 Kenichi Handa <handa@m17n.org>
1957 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1958 (include_HEADERS): Likewise.
1960 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1962 * language.c: Update documentation.
1964 2006-06-23 Kenichi Handa <handa@m17n.org>
1966 * font-ft.c (struct MFontFT): Delete member lang.
1967 (free_ft_info): Don't unref member lang. Destroy members langset
1969 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1970 changed. Set members langset and charset.
1971 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1973 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1975 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1976 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1977 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1978 characters at first. If it fails, try listing by language names.
1979 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1980 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1981 change of MFontCapability.
1982 (ft_list_capability): Likewise. Try listing by languages, then by
1983 scripts. Check OTF at last.
1984 (ft_check_script): New function.
1985 (ft_select): Adjusted for the check of MFontCapability.
1986 (ft_list_family_names): New function.
1987 (ft_check_capability): If cap->script is not Mnil, call
1989 (mfont__ft_driver): Initialize with ft_list_family_names.
1991 * font.h (struct MFontDriver): New member list_fmaily_names.
1992 (struct): Change member "MSymbol *lang" to "MSymbol language".
1994 * font.c: Include "language.h".
1995 (Motf): New variable.
1996 (otf_script_list, load_otf_script_list): Delete it.
1997 (find_script_from_otf_tag): Delete it.
1998 (merge_capability): New function.
1999 (mfont__init): Init Motf.
2000 (mfont__fini): Don't unref otf_script_list.
2001 (free_font_capability): Check cap->script_tag to determine if
2002 OTF-related capability is set.
2003 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
2004 the change of type MFontCapability.
2005 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
2006 and Motf properties.
2007 (mfont_list): Call merge_capability for LANGUAGE arg.
2008 (mfont_list_family_names): New function.
2010 * input-gui.c: Typo in comments fixed.
2012 * input.c: Typo in comments fixed.
2014 * language.h (mlanguage__list): Delete it.
2015 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
2018 * language.c: Include "mtext.h".
2019 (M_script_lang_list): Delete it.
2020 (language_list, script_list): New variables.
2021 (load_lang_script_list, init_language_list, init_script_list): New
2023 (mlang__init): Don't load language database here.
2024 (mlang__fini): Unref language_list and script_list if not NULL.
2025 (mlanguage__list): Delete it.
2026 (mlanguage__info, mscript__info, mscript__char_list)
2027 (mscript__otf_tag, mscript__from_otf_tag): New functions.
2028 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
2029 (mscript_list, mscript_language_list): New functions.
2031 * m17n-gui.h (mfont_list_family_names): Extern it.
2033 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
2034 (mlanguage_text, mscript_list, mscript_language_list): Extern
2037 2006-06-21 Kenichi Handa <handa@m17n.org>
2039 * m17n-X.c (xfont_driver): Initialize with
2040 xfont_list_family_names.
2041 (xfont_list_family_names): New function.
2042 (xft_driver): Initialize with NULL for list_family_names member.
2043 (device_init): Set list_family_names member of xft_driver to that
2044 of mfont__ft_driver.
2046 2006-06-06 Kenichi Handa <handa@m17n.org>
2048 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
2050 2006-03-24 Kenichi Handa <handa@m17n.org>
2052 * font-ft.c (ft_open): Improve debug message.
2054 * fontset.c (mfontset__get_font): Fix for the case that no font in
2055 per_script list is available.
2057 2006-02-06 Kenichi Handa <handa@m17n.org>
2059 * Version 1.3.3 released.
2061 2006-02-22 Kenichi Handa <handa@m17n.org>
2063 * textprop.c: Fix some typos in documentation.
2065 * plist.c: Fix some typos in documentation.
2067 * m17n-core.h: Fix some typos in documentation.
2068 (M17NLIB_PATCH_LEVEL): Updated to 3.
2069 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
2071 * symbol.c: Fix some typos in documentation.
2073 * mtext.c: Fix some typos in documentation.
2075 * input.c: Fix several typos in documentation.
2077 2006-02-06 Kenichi Handa <handa@m17n.org>
2079 * Version 1.3.2 released.
2081 2006-02-03 Kenichi Handa <handa@m17n.org>
2083 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
2084 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
2086 * font.c (xlfd_parse_name): Fix handling of the name "nil".
2088 * draw.c (layout_glyphs): Fix handling left_padding of
2091 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
2093 2006-02-02 Kenichi Handa <handa@m17n.org>
2095 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
2096 if WITH_GUI is true.
2098 2006-01-25 Kenichi Handa <handa@m17n.org>
2100 * input.c (resolve_expression): If the value of PLIST is a plist,
2101 but the first element is not symbol, return 0.
2103 2006-01-17 Kenichi Handa <handa@m17n.org>
2105 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
2106 HAVE_GD is 2 or the greater.
2108 2006-01-16 Kenichi Handa <handa@m17n.org>
2110 * Version 1.3.1 released.
2112 2006-01-16 Kenichi Handa <handa@m17n.org>
2114 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
2115 simulating anti-aliasing.
2117 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
2118 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
2120 2006-01-12 Kenichi Handa <handa@m17n.org>
2122 * input.c (get_surrounding_text): Always pop ic->plist.
2123 (reset_ic): Don't reset ic->plist.
2125 2006-01-10 Kenichi Handa <handa@m17n.org>
2127 * input.c (preedit_commit): For debugging, print only commiting
2128 charactes. Don't set ic->candidate_show to 0.
2129 (handle_key): Don't run branch-actions just by shifting to the
2131 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
2132 Reset vars and plist.
2134 2006-01-07 Kenichi Handa <handa@m17n.org>
2136 * input.c (load_branch): Confirm that maps is not NULL.
2138 2006-01-05 Kenichi Handa <handa@m17n.org>
2140 * input-gui.c (win_filter): Try to convert arg to key only when
2143 * plist.c (read_integer_element): If '#' and '-' are followed by
2144 non-integer-constituent, read them as a part of a symbol.
2145 (read_symbol_element): New arg C.
2146 (read_element): Adjust args to read_symbol_element.
2148 * input.c (load_macros): On overwriting a macro, free the old
2150 (minput__init): Store Mmap in load_im_info_keys.
2151 (minput_get_title_icon): If the input method has no title, be sure
2153 (minput_get_description): If the input method has no description,
2154 be sure to return NULL.
2155 (minput_get_variables): Fix documentation.
2156 (handle_key): Pay attention to the case that key is Mnil.
2157 (filter): Likewise. Fix handling of such symbol as S-A.
2159 2005-12-22 Kenichi Handa <handa@m17n.org>
2161 * Version 1.3.0 released.
2163 2005-12-22 Kenichi Handa <handa@m17n.org>
2165 * font-ft.c (ft_list): If the specified font has no property,
2168 2005-12-20 Kenichi Handa <handa@m17n.org>
2170 * character.c (mchar_get_prop): Check char_prop_list.
2171 (mchar_put_prop, mchar_get_prop_table): Likewise.
2173 2005-12-18 Kenichi Handa <handa@m17n.org>
2175 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
2176 file name sans language.
2178 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
2180 * input.c: Fix typo in comments.
2182 2005-12-14 Kenichi Handa <handa@m17n.org>
2184 * input.c (minput_get_title_icon): Check the default icon for the
2187 2005-12-13 Kenichi Handa <handa@m17n.org>
2189 * input.c (Mless_equal, Mgreater_equal): New variables.
2190 (parse_expression, resolve_expression, parse_action_list)
2191 (take_action_list): Handle the aboves.
2192 (filter): Treat key S-X as X.
2193 (minput__init): Initialize Mless_equal and Mgreater_equal.
2194 (minput_get_title_icon): New function.
2196 * m17n.h (minput_get_title_icon): Extern it.
2198 * database.c (get_database_filename): Return a filename instead of
2200 (load_database): Adjusted for the above change.
2201 (mdatabase__load_for_keys): Likewise.
2202 (mdatabase__find_file): New function.
2204 * database.h (mdatabase__find_file): Extern it.
2206 * font.h (mfont__resize): Delete extern.
2208 * font.c (mfont__list): Check resize ratio.
2209 (mfont__resize): Delete it.
2210 (mfont_resize_ratio): Include the code of mfont__resize.
2212 * font-ft.c (ft_open): Check resize ratio.
2214 * m17n-X.c (xfont_open): Check resize ratio.
2215 (xft_open): Likewise.
2217 2005-12-07 Kenichi Handa <handa@m17n.org>
2219 * input.c (take_action_list): If take_action_list return -1,
2221 (handle_key): Likewise.
2223 * face.c (mface__for_chars): When font is specified and layouter
2224 is found for it, if the layouter doesn't support one of a
2225 character, use a face sans layouter for it.
2227 2005-12-06 Kenichi Handa <handa@m17n.org>
2229 * fontset.c (mfont__lookup_fontset): If only a fallback font is
2230 found, don't use it for more than one character.
2232 2005-12-05 Kenichi Handa <handa@m17n.org>
2234 * face.c (mface__realize): Set rfont->layouter to Mnil.
2235 (mface__for_chars): Fix handling of layouter.
2237 * character.h (mchar__define_prop): Extern it.
2239 * database.c (update_database_list): Call mchar__define_prop if
2242 * character.c (mchar__init): Don't call mchar_define_property.
2243 Instead just initialize property keys.
2244 (mchar__fini): Free char_prop_list only if it's not NULL.
2245 (mchar__define_prop): New function.
2246 (mchar_define_property): Call mchar__define_prop.
2248 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
2251 2005-12-02 Kenichi Handa <handa@m17n.org>
2253 * language.c (mlang__init): Handle extra chars.
2255 * m17n-gui.h (mfont_check): Adjust prototype.
2257 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
2258 (xfont_check_capability): New function.
2259 (xft_driver): Specify xft_check_capability.
2260 (xft_check_capability): New function.
2262 * font-ft.c (M0_3): Delete it.
2264 (ft_get_charmaps): Refer to M0.
2265 (fc_parse_pattern): Fix previous change.
2266 (ft_list_language): Check also extra chars.
2267 (ft_check_otf): Define it even if HAVE_OTF is undef.
2268 (ft_check_lang): Check the result of FcLangSetHasLang against
2269 FcLangDifferentLang. Check also extra chars.
2270 (ft_list_capability): Delete ifdef HAVE_OTF.
2271 (ft_select): Likewise.
2272 (ft_open): Improve debug information.
2273 (ft_check_capability): New function.
2274 (mfont__ft_driver): Specify ft_check_capability.
2275 (mfont__ft_init): Initialize M0.
2277 * fontset.c (get_font_from_group): New function.
2278 (mfontset__get_font): New function.
2280 * fontset.h (mfontset__get_font): Extern it.
2282 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
2283 (mfont__fini): Delete ifdef HAVE_OTF.
2284 (free_font_capability): Likewise.
2285 (mfont__get_capability): Likewise.
2286 (mfont__check_capability): New function.
2287 (mfont_check): Change the order of arguments. Use
2290 * font.h (struct MFontDriver): New member check_capability.
2291 (MFontCapability): Delete ifdef HAVE_OTF.
2292 (mfont__check_capability): Extern it.
2294 * face.c (mface__realize): Fix handling of FONT arg.
2295 (mface__for_chars): Fix handling of explicitly specified font.
2297 2005-11-25 Kenichi Handa <handa@m17n.org>
2299 * font-flt.c (run_command): Print debug info for
2302 * draw.c (layout_glyphs): Fix handling of left/right_padding.
2304 * face.c (mface__for_chars): Check rfont before accessing the
2307 2005-11-21 Kenichi Handa <handa@m17n.org>
2309 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
2312 * fontset.c (fontset_table): New variable.
2313 (free_fontset): Call M17N_OBJECT_UNREGISTER.
2314 (mfont__fontset_init): Add fontset_table as an object array.
2315 (mfont__realize_fontset): Ref FONTSET.
2316 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2317 (mfontset): Call M17N_OBJECT_REGISTER.
2318 (mfontset_copy): Likewise.
2320 * input.c (handle_key): For debugging, print information about
2322 (filter): Add an alias for Meta and Alt modifiers.
2323 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2325 (minput__init): Initialize them.
2326 (parse_expression): New function.
2327 (resolve_expression): New function.
2328 (parse_action_list): Handle expressions by parse_expression.
2329 (take_action_list): Handle expressions by resolve_expression.
2330 (parse_nested_list_value): Fix previous change.
2331 (resolve_command): Fix handling of the return value of
2334 2005-11-18 Kenichi Handa <handa@m17n.org>
2336 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2337 HAVE_OTF is defined.
2338 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2340 (ft_select): Likewise.
2342 * font.c (mfont_list): Fix for the case that FONT is NULL.
2343 (OTF_tag): Delete it.
2344 (load_otf_script_list): Define only when HAVE_OTF is defined.
2345 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2348 * draw.c (truncate_gstring): Be sure to truncate at
2349 glapheme-cluster boundary.
2351 2005-11-11 Kenichi Handa <handa@m17n.org>
2353 * input.c (delete_surrounding_text): Clear cache if necessary.
2355 2005-11-09 Kenichi Handa <handa@m17n.org>
2357 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2358 glyph prev is also supported by the current flt.
2360 2005-11-08 Kenichi Handa <handa@m17n.org>
2362 * m17n-X.c (xft_render): Cancel previous change.
2364 2005-11-07 Kenichi Handa <handa@m17n.org>
2366 * input.c: Include <stdlib.h>.
2367 (get_surrounding_text, delete_surrounding_text)
2368 (get_preceding_char, get_following_char): New functions.
2369 (integer_value): New arg surrounding. If it is nonzero, try to
2370 get a surrounding character. Callers changed.
2371 (take_action_list): Check `value' before setting an element.
2372 (destroy_ic): Unref ic_info->preceding_text and
2373 ic_info->following_text.
2374 (minput__init): Initialize Minput_get_surrounding_text and
2375 Minput_delete_surrounding_text.
2376 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2378 (filter): Unref ic_info->preceding_text and
2379 ic_info->following_text.
2381 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2384 * input.h (MInputContextInfo): New members preceding_text and
2387 2005-11-04 Kenichi Handa <handa@m17n.org>
2389 * input.c (parse_nested_list_value): Fix handling of the global
2391 (get_nested_list): Get global definitions by load_partial_im_info.
2392 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2393 MInputCandidatesChanged.
2394 (take_action_list): Likewise.
2395 (reset_ic): Likewise.
2396 (create_ic): Don't pay special attention to
2397 Mcandidates_group_size.
2398 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2399 (minput_set_variable): Get a definition of varible by
2400 mplist_find_by_value, not mplist_get.
2402 * m17n.h (enum MInputCandidatesChanged): New enum.
2404 2005-11-01 Kenichi Handa <handa@m17n.org>
2406 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2408 (mwin__destroy_window): If xft_draw's drawable is win, change it
2409 to device->drawable before destroying win.
2411 2005-10-31 Kenichi Handa <handa@m17n.org>
2413 * input.c (load_im_info): Fix adding of state.
2415 * m17n-core.c (m17n_fini_core): Fix reporting of module
2418 * m17n.c (m17n_fini): Fix reporting of module finalization.
2420 * m17n-gui.c (m17n_init_win): Fix reporting of module
2423 2005-10-29 Kenichi Handa <handa@m17n.org>
2425 * input.c (get_candidate_list): Fix the timing of referring plist.
2427 2005-10-28 Kenichi Handa <handa@m17n.org>
2429 * input.c (load_branch): Ignore an undefined map name.
2430 (load_im_info): Set im_info->title from `name' only if it's not
2432 (shift_state): Always update ic->status.
2433 (adjust_candidates): Renamed from adjust_candidate_command.
2434 Argument changed. Caller changed.
2435 (get_candidate_list, regularize_action): New functions.
2436 (take_action_list): Use them. On handling Munhandle, don't set
2438 (handle_key): If KEY is not handled by MAP, and MAP has
2439 branch_actions, perform them.
2441 * database.c (mdatabase__fini): Free dir_info->filename;
2443 2005-10-20 Kenichi Handa <handa@m17n.org>
2445 * input.c (marker_code): Accept '@@'.
2446 (integer_value): Handle '@@'.
2447 (parse_action_list): Accept a symbol argument.
2448 (take_action_list): Resolve the symbol argument. Handle the
2451 2005-10-18 Kenichi Handa <handa@m17n.org>
2453 * input.c: Include "charset.h".
2454 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2456 (MIMState): New member (M17NObject control).
2457 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2458 (get_nested_list, resolve_variable): New functions.
2459 (integer_value): New arg (MPlist **value). Set it to the plist
2460 element containing the value.
2461 (resolve_command): New function.
2462 (load_translation): New arg (MPlist *map_actions).
2463 (load_branch): New args language and name. If `keylist' is a
2464 symbol, resolved that as a command name.
2465 (free_map): New arg top. Free map->map_actions only if top is
2467 (free_state): New function.
2468 (load_state): New arg name.
2469 (im_info_list): New variable.
2470 (free_im_info, get_im_info_by_tags): New functions.
2471 (load_im_info): Arg key changed to plist. Handle `include'.
2472 Return (MInputMethodInfo *).
2473 (preedit_commit): Ref ic->candidate_list.
2474 (get_select_charset, adjust_candidate_command): New functions.
2475 (take_action_list): Handle `include'. Adjust candidate action
2476 properly. Handle control variables `candidates-charset' and
2477 `candidates-group-size'.
2478 (open_im): Use get_im_info.
2479 (create_ic): Get global variables.
2480 (load_partial_im_info): New function.
2481 (get_im_info): New function.
2482 (check_command_keyseq, check_command_list, check_variable_list):
2484 (minput__init): Don't handle M_database_hook and Mdetail_text.
2485 Initialize M_candidates, Mcandidates_group_size,
2486 Mcandidates_charset.
2487 (parse_variable_list, get_variable_list, parse_command_list)
2488 (get_command_list): Delete them.
2489 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2490 (minput__fini): Simply unref command_list and variable_list.
2491 (minput_get_description): Adjusted for the new form of description.
2492 (minput_get_commands): Use get_nested_list.
2493 (minput_assign_command_keys): Likewise.
2494 (minput_get_variables, minput_set_variable): Likewise.
2496 * input.h (MInputMethodInfo): New members im and maps.
2498 * database.h (M_database_hook): Delete extern.
2499 (MDatabaseHookFunc): Delete extern.
2500 (mdatabase__check): Extern it.
2502 * database.c: Include <glob.h>.
2503 (MAX_TIME): New macro.
2504 (Masterisk): New variable.
2505 (get_database_stream): Argument changed to (MDatabaseInfo *).
2507 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2508 (find_database): New function.
2509 (update_database_list): New function.
2510 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2511 calling update_database_list.
2512 (mdatabase__check): New function.
2513 (mdatabase_find): Use update_database and find_database. Don't
2514 handle MDatabaseHookFunc.
2515 (mdatabase_list): Call update_database at first.
2516 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2517 (MDatabaseList): New type.
2519 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2521 * m17n.h (Mdetail_text): Delete extern.
2523 * m17n-core.h (mplist_conc): Delete extern.
2525 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2527 (mplist_conc): Renamed to mplist__conc.
2528 (mplist__pop_unref): New function.
2530 2005-10-14 Kenichi Handa <handa@m17n.org>
2532 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2534 (read_element): If keys is an empty plist, return any element
2536 (dump_plist_element): Check if plist is nested.
2537 (mplist_conc): Always ref tail.
2538 (mplist_set): If key is a managing key, ref val in advance.
2540 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2541 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2542 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2545 * fontset.c (free_fontset): Unref fontset_list if necessary.
2546 (mfont__fontset_fini): Don't free fontset_list. Unref
2548 (mfont__realize_fontset): Initialize request.
2549 (mfontset): Ref default_fontset or fontset only if necessary.
2550 (mfontset_copy): Don't ref copy.
2552 * draw.c (render_glyphs): Check gend->type before checking
2555 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2556 unrefed plists to NULL.
2558 2005-10-04 Kenichi Handa <handa@m17n.org>
2560 * textprop.c (mtext_serialize): Be sure to make mt
2561 MTEXT_FORMAT_UTF_8 and NULL terminated.
2563 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2565 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2567 2005-10-03 Kenichi Handa <handa@m17n.org>
2569 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2570 is not at the beginning of line.
2572 2005-09-22 Kenichi Handa <handa@m17n.org>
2574 * input.c: Include <sys/stat.h> and <unistd.h>.
2575 (Minclude, Mcommit, Munhandle): New variables.
2576 (minput__init): Initialize them. Push only Mstate to
2577 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2578 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2580 (load_input_method): Handle "include" directive. If no states are
2582 (shift_state): If state_name is Mt, shift back to the previous
2583 state. Call preedit_commit to commit preedit text.
2584 (preedit_commit): New function.
2585 (take_action_list): Improve debug printing. Handle commit and
2587 (handle_key): Check the return value of take_action_list. Don't
2588 take branch_actions just after changing to the root map.
2589 (reset_ic): Reset all ic_info members.
2590 (filter): When a key is not handled, just move ic_info->keys
2591 instead fo calling reset_ic.
2592 (load_im_info): If key is not Mstate, push Mmap to
2594 (MDatabaseStatList): New type.
2595 (imdir_stat_list): New variable.
2596 (input_method_hook): Don't cancel the hook. Check the
2597 modification time of directories.
2598 (minput__fini): Free imdir_stat_list;
2600 * input.h (MInputContextInfo): New member prev_state.
2602 * m17n-core.h (mplist_conc): Extern it.
2604 * plist.c (mplist_conc): New function.
2606 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2608 * font.h (MRealizedFont): New member average_width.
2610 * font-ft.c (ft_open): Set rface->average_width.
2612 * font.c (xlfd_unparse_name): Print '*' before registry name.
2614 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2615 (xfont_open): Set rfont->average_width.
2616 (xft_open): Likewise.
2617 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2619 * internal-gui.h (struct MFrame): New member average_width.
2621 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2622 (mframe_get_prop): Return the average_width of a font.
2624 * face.c (mface__realize): Set rface->average_width.
2625 (mface__update_frame_face): Set frame->average_width.
2627 * face.h (MRealizedFace): New member average_width.
2629 2005-09-19 Kenichi Handa <handa@m17n.org>
2631 * font.c (xlfd_unparse_name): New arg full_xlfd.
2632 (mfont__encode_char): Use shortcut only for X core fonts.
2633 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2634 (mfont_put_prop): Handle `language' property.
2635 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2636 Print file can capability info too.
2638 * m17n-core.c (mdebug__output): New variable.
2639 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2640 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2641 (m17n_fini_core): Close mdebug__output if it's not stderr.
2643 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2644 (xfont_open): Handle baseline_offset.
2645 (xfont_find_metric): Likewise.
2646 (xfont_render): Likewise.
2647 (xft_open): Likewise.
2648 (xft_render): Likewise.
2650 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2651 (mdebug__output): Extern it.
2652 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2653 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2654 (MDEBUG_DUMP): New macro.
2655 (MDEBUG_PRINT_TIME): Print to medebug__output.
2657 * font.h (MRealizedFont): New member baseline_offset.
2659 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2661 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2662 (ft_list_family): Check alias.
2663 (ft_list_language): If language is "en", don't try to the second
2665 (ft_default_list): New variable.
2666 (ft_list_default): New function.
2667 (ft_select): If family is not specified, try only the default
2668 fonts. Treat the weights normal and medium same.
2669 (ft_open): Fix debug message. If registry is not specified, try
2670 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2671 (ft_find_metric): Likewise.
2672 (ft_render): Likewise.
2673 (ft_list): Fix debug message. Accept the registring iso8859-1.
2674 If family is not specified, try only the default fonts.
2676 * face.c (mface__realize): Fix logic of opening a font.
2678 2005-09-16 Kenichi Handa <handa@m17n.org>
2680 * face.c (mface__realize):
2682 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2685 * input.c (shift_state): Fix the condition of taking init actions.
2686 (take_action_list): Fix handling of pushback action.
2687 (handle_key): Don't change key while checking its alias.
2688 (minput__init): Initialize new variables.
2689 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2692 2005-09-12 Kenichi Handa <handa@m17n.org>
2694 * mtext.c (mtext__uppercase): Add proper open/close parens.
2695 (mtext_titlecase): Add proper casting.
2697 * input.c (parse_action_list): Handle the case that the arg is a
2698 key sequence (MText or MPlist).
2699 (take_action_list): Likewise.
2700 (shift_state): Shorter debug message.
2701 (handle_key): Terminate a debug message by "\n".
2702 (reset_ic): Don't take initial actions here.
2703 (minput_open_im): Print a debug message.
2704 (minput_close_im): Likewise.
2705 (minput_create_ic): Likewise.
2706 (minput_destroy_ic): Likewise.
2708 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2710 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2713 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2714 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2717 * character.c: Add Japanese documentation for
2718 mchar_get_prop_table ().
2720 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2722 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2723 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2724 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2726 (init_case_conversion): New function.
2727 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2728 (uppercase_precheck, lowercase_precheck, final_sigma)
2729 (after_soft_dotted, more_above, before_dot, after_i)
2730 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2732 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2734 * plist.c (read_mtext_element): Fix previous change.
2736 2005-09-05 Kenichi Handa <handa@m17n.org>
2738 * plist.c (read_mtext_element): Handle \uXXXX notation.
2740 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2741 (MTABLE_ALLOCA): Change the name of local variable.
2743 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2744 HAVE_FREETYPE are defined.
2746 * m17n-X.c: Check HAVE_X11.
2748 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2749 directory listing libraries.
2750 (noinst_PROGRAMS): Define it only in maintainer mode.
2752 2005-09-02 Kenichi Handa <handa@m17n.org>
2754 * m17n-gui.h (mdraw_line_break_option): Extern it.
2756 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2757 end of the first glyph.
2758 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2760 (mdraw_line_break_option): New variable.
2761 (mdraw_default_line_break): Use mtext_line_break.
2763 * mtext.h (wordseg_func_table): Don't extern it.
2764 (mtext__wseg_fini): Extern it.
2766 * mtext.c: Don't include word-thai.h.
2767 (wordseg_func_table): Delete this variable.
2768 (mtext__init): Don't initialize above. Don't call
2769 mtext__word_thai_init.
2770 (mtext__fini): Don't free wordseg_func_table. Call
2771 mtext__wseg_fini instead fo mtext__word_thai_fini.
2772 (MTextWordsegFunc): Don't typedef it.
2773 (mtext__word_segment): Moved to mtext-wseg.c.
2775 * m17n-core.h (enum MTextLineBreakOption): New enum.
2776 (mtext_line_break): Extern it.
2778 * mtext-wseg.c: New file.
2780 * mtext-lbrk.c: New file.
2782 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2783 add mtext-lbrk.c and mtext-wseg.c.
2785 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2786 the case that head is NULL.
2788 2005-09-01 Kenichi Handa <handa@m17n.org>
2790 * word-thai.c (wordseg_propertize): If the property value is nil,
2791 don't make the property no-merge.
2792 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2793 attention to the case that they are NULL.
2794 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2797 * character.c (mchar_get_prop_table): New function.
2799 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2801 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2802 (mchar_get_prop_table): Extern it.
2804 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2805 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2807 * internal.h (enum MTextCoverage): New enum.
2808 (MText): New member coverage.
2810 * mtext.c (FORMAT_COVERAGE): New macro.
2811 (insert): Copy mt2->coverage.
2812 (mtext__from_data): Initialize mt->coverage.
2813 (mtext__adjust_format): Update mt->coverage.
2814 (mtext): Initialize mt->coverage.
2815 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2816 Update mt->coverage if necessary.
2817 (mtext_duplicate): Copy mt->coverage.
2818 (mtext_insert, mtext_replace): New functions.
2819 (mtext_dup): Use mtext_duplicate.
2820 (mtext__word_segment): Don't set *from and *to if a word
2821 segmentation funcion is not found.
2822 (mtext_ins_char): Fix typo.
2824 2005-08-25 Kenichi Handa <handa@m17n.org>
2826 * font.h (MFont): New member for_full_width.
2828 * font.c (compare_font_score): Prefer a font of not
2831 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2832 registry charset of a font is one of CJK charsets.
2834 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2835 supports some of CJK.
2837 2005-08-24 Kenichi Handa <handa@m17n.org>
2839 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2841 * m17n-gui.c (null_device_open): Check Mresolution param and set
2844 * m17n-gd.c (device_open): Check Mresolution param and set
2847 * m17n-X.c (MWDevice): New member resy.
2848 (xfont_open): Set ascent, descent, and max_advance members of
2850 (xft_open): Likewise.
2851 (device_open): Compare also screen_num to find a device. Set
2852 device->resy and frame->dpi.
2854 * internal-gui.h (MFrame): New member dpi.
2856 * font.h (MRealizedFont): New member max_advance.
2858 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2859 (mfont__init): Don't initialize Mascent, Mdescent.
2860 (Mascent, Mdescent): Delete these variables.
2861 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2862 Mfont_descent instead of Mascent and Mdescent.
2863 (mfont_put_prop): Allow negative size.
2864 (mfont_find): Handle the case of spec->size < 0. Fix previous
2866 (mfont_list): Handle the case of spec->size < 0.
2867 (mfont_check): Likewise.
2869 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2870 (fc_get_pattern): Handle the case of font->size < 0.
2871 (ft_open): Set ascent, descent, and max_advance members of rfont.
2872 (ft_find_metric): Improve rounding.
2873 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2876 * face.c (mface__realize): Handle the case of font->size < 0.
2878 2005-08-22 Kenichi Handa <handa@m17n.org>
2880 * coding.c (MConverterStatus): Change the member buf to union.
2881 (mconv_buffer_converter): Add const to the arg buf.
2882 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2883 (mconv_decode): Adjusted for the change of MConverterStatus.
2884 (mconv_encode_range): Likewise.
2886 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2887 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2889 2005-08-20 Kenichi Handa <handa@m17n.org>
2891 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2892 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2894 * m17n-X.c (xfont_open): Set members ascent, descent, and
2895 max_advance of rfont.
2896 (xft_open): Likewise.
2898 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2900 (mfont__ft_parse_name): Add const to the arg name.
2902 * font.c (xlfd_parse_name): Add const to the arg name. Call
2903 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2904 (xlfd_unparse_name): Handle spacing.
2905 (mfont__init): Initialize new variables.
2906 (mfont__id): Handle spacing.
2907 (mfont__merge): Likewise.
2908 (mfont__set_spec): This function deleted.
2909 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2910 condition of calling mfont__ft_parse_name.
2911 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2912 (mfont_get_prop): Handle properties spacing, ascent, descent,
2914 (mfont_find): Return a realized font.
2915 (mfont_from_name): Add const to the arg name.
2917 * font.h (enum MFontProperty): New member MFONT_SPACING.
2918 (enum MFontSpacing): New enum.
2919 (MFont): New members spacing and max_advance.
2920 (mfont__ft_parse_name): Prototype adjusted.
2921 (mfont__set_spec): Extern deleted.
2922 (mfont__parse_name_into_font): Prototype adjusted.
2924 2005-08-19 Kenichi Handa <handa@m17n.org>
2926 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2928 * font.c (mfont_list): If FONT is null, use a temporary font.
2929 (mfont_parse_name): Add const to the arg name.
2931 2005-08-18 Kenichi Handa <handa@m17n.org>
2933 * word-thai.c: Surround code by #ifdef and #endif to escape from
2936 * font-ft.c: Mostly re-written.
2938 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2939 (FontLayoutCmd): Type of the member otf changed..
2940 (load_otf_command): Adjusted for the format change of otf command.
2941 (load_command): Likewise.
2942 (free_flt_command): Unref cmd->body.otf.
2943 (run_otf): Ajusted for the type change of otf_cmd.
2944 (run_command): Ajusted for the type change of otf_cmd. On
2945 debugging, print ctx->combining_code.
2946 (mfont__flt_run): Initialize ctx's members code_offset,
2947 combining_code, and left_padding to 0.
2949 * face.h (struct MRealizedFace): New member font.
2950 (mface__realize): Prototype adjusted.
2952 * face.c (find_realized_face): New arg font.
2953 (find_realized_face): Adjusted for the change of MFont.
2954 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2955 (mface__fini): Don't call mdebug__report_object.
2956 (mface__realize): New arg font.
2957 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2958 Optimize the latin case.
2959 (mface__free_realized): Free rface->font.
2960 (mface__update_frame_face): Adjusted for the change of mface__realize.
2961 (mface_equal): New function.
2963 * draw.c (Mcommon): New variable.
2964 (visual_order): Args to mfont__encode_char changed.
2965 (compose_glyph_string): Handle Mfont text property.
2966 (layout_glyphs): Adjusted for the change of MFont.
2967 (mdraw__init): Initialize Mcommon.
2968 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2970 * font.h (enum MFontType): Members completely changed.
2971 (enum MFontProperty): Move MFONT_SIZE to the tail.
2972 (enum MFontSource): New enum.
2973 (struct MFont): New members type, source, sizes, file, capability,
2975 (struct MRealizedFont): Type of member font changed. Members
2976 score, status, and encoding deleted.
2977 (MFontScore): New type.
2978 (MFontList): Member changed.
2979 (struct MFontDriver): New member has_char. Types of members
2981 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2982 (Mapple_roman): Extern them.
2983 (OTF_Tag): Typedefed if not HAVE_OTF.
2984 (enum MFontOpenTypeTable): New enum.
2985 (MFontCapability): New type.
2986 (mfont__ft_drive_otf): Prototype adjusted.
2987 (mfont__score): Extern deleted.
2988 (mfont__merge): Extern it.
2989 (mfont__has_char): Extern it.
2990 (mfont__encode_char): Prototype adjusted.
2991 (mfont__open): Extern it.
2992 (mfont__set_spec): Prototype adjusted.
2993 (mfont__get_capability): Extern it.
2995 * font.c: Include "fontset.h".
2996 (M_font_capability, M_font_list, M_font_list_len): New variables.
2997 (font_score_priority): Change order of initial elements.
2998 (font_score_shift_bits): Fix array size.
2999 (common_weight): Add "thin", "semibold", and "heavy".
3000 (common_stretch): Add "ultracondensed", "extracondensed",
3001 "extraexpanded", and "utltraexpand".
3002 (font_weight_regular, font_weight_normal, font_weight_medium): New
3004 (gen_font_name): This function deleted.
3005 (find_encoding): Set font->encoding.
3006 (OTF_tag): New function.
3007 (otf_script_list): New variable.
3008 (load_otf_script_list): New function.
3009 (find_script_from_otf_tag): New function.
3010 (xlfd_parse_name): Set font->type and font->source.
3011 (mfont__free_realized): Free chains rfonts.
3012 (font_score): Renamed from mfont__score.
3013 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
3014 (Mapple_roman): New variables.
3015 (mfont__init): Initilize new variables. Initalize
3016 default_encoding.encoding_name and
3017 default_encoding.encoding_charset to Municode_full and
3018 mcharset__unicode. Use SAFE* macros for allocating filepath
3020 (mfont__fini): Free otf_script_list.
3021 (mfont__id): New function.
3022 (mfont__match_p): Check also capability member of MFont.
3023 (mfont__merge): New funciton.
3024 (mfont__set_spec_from_face): Set type and source members.
3025 (mfont__set_spec_from_plist): Set capability and type members.
3026 (mfont__select): Argument changed.
3027 (mfont__available): New function.
3028 (compare_font_score): New function.
3029 (mfont__list): New function.
3030 (mfont__open): Return a realized font.
3031 (mfont__resize): Adjusted for the change of MFont.
3032 (mfont__has_char): New function.
3033 (mfont__encode_char): Argument changed.
3034 (mfont__set_spec): Argument changed.
3035 (free_font_capability): New function.
3036 (mfont__get_capability): New function.
3037 (MFontfile): New variable.
3038 (mfont_get_prop): Adjusted for the change of MFont.
3039 (mfont_put_prop): Likewise.
3040 (mfont_set_selection_priority): Fix the way of setting
3041 font_score_priority[].
3042 (mfont_find): Use mfont__list instead of mfont__select.
3043 (mfont_resize_ratio): Adjusted for the change of MFont.
3044 (mfont_list): Use mfont__list.
3045 (mfont_check): New function.
3046 (font_score): Make it static.
3048 * fontset.h (mfont__realize_fontset): Prototype adjusted.
3049 (mfont__lookup_fontset): Likewise.
3051 * fontset.c (struct MFontset): Delete member font_spec_list.
3052 (struct MRealizedFontset): Type of member spec changed. New
3054 (load_font_group): Arg spec_list deleted.
3055 (load_fontset_contents): Adjusted for the change of fontset_def.
3056 (free_fontset): Fix the way of freeing fontset elements.
3057 (realize_fontset_elements): Argument changed.
3058 (get_per_script): New function.
3059 (free_realized_fontset_elements): Fix the way of feeing rfontset
3061 (update_fontset_elements): Fix args to realize_fontset_elements.
3062 (mfont__realize_fontset): New arg spec.
3063 (try_font_list): New function.
3064 (try_font_group): New arg request. Use try_font_list.
3065 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
3067 (mfontset): Adjusted for the change of MFontset.
3068 (mfontset_copy): Likewise. Don't share plists.
3069 (mfontset_modify_entry): Adjusted for the change of MFontset.
3070 (mfontset_lookup): Call get_per_script.
3071 (mdebug_dump_fontset): Print also the address of fonts.
3073 * input.c (shift_state): Don't reset ic_info->vars.
3074 (take_action_list): Call MDEBUG_PRINT fore calling
3077 * internal-gui.h (MFontDriver): Don't typedef it here.
3079 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
3080 (MXFont): This type deleted.
3082 (struct _MFontX): New struct.
3083 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
3084 (MDisplayInfo): Member base_font_list deleted.
3085 (DEFAULT_FONT): Definition changed.
3086 (FALLBACK_FONT): This maclr deleted.
3087 (free_display_info): Adjusted for the change of MDisplayInfo.
3088 (free_device): Argument to mfont__free_realized changed.
3089 (xfont_driver): Adjusted for the change of MFontDriver.
3090 (xfont_registry_list): Use MFontX instead of MXFont.
3091 (MRealizedFontX): Renamed from MXFontInfo.
3092 (xfont_select): Return the font found first.
3093 (close_xfont): Change MXFontInfo to MRealizedFontX.
3094 (xfont_open): Return the realized font.
3095 (xfont_find_metric): Get xfont from rfont->fontp.
3096 (xfont_has_char): New function.
3097 (xfont_encode_char): Adjusted for the argument change.
3098 (xfont_render): Get xfont from rfont->fontp.
3099 (xfont_list): Adjusted for the argument change.
3100 (MRealizedFontXft): Renamed from MXftFontInfo.
3101 (xft_driver): Ajusted for the change of MFontDriver.
3102 (close_xft): Change MXtfFontInfo to MRealizedFontXft
3103 (xft_open_font): Argument changed.
3104 (xft_open): Argument changed. Return the realized font.
3105 (xft_find_metric): Get xft_font from rfont->fontp.
3106 (xft_has_char, xft_encode_char): New functions.
3107 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
3108 font if not yet opened.
3109 (device_open): Don't set frame->font.
3111 * m17n-gd.c (gd_font_driver): Adjusted for the change of
3113 (gd_font_open): New function.
3114 (gd_render): Don't use the local variable ft_info.
3115 (device_init): Adjusted for the change of gd_font_driver.
3117 * textprop.c (mtext__prop_init): Initialize text_property_table.
3118 Call M17N_OBJECT_ADD_ARRAY.
3119 (mtext__prop_fini): Don't call mdebug__report_object.
3121 * plist.c (mplist__init): Initialize plist_table.
3122 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
3123 (mplist__fini): Don't call mdebug__report_object.
3125 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
3126 (mtext__fini): Don't call mdebug__report_object.
3127 (MTEXT_FORMAT_UTF_16): Correct type.
3128 (mtext_data): New function.
3129 (mtext_text): Fix calculation of limit and args to
3132 * language.c: Include "plist.h".
3133 (M_script_lang_list): New variable.
3134 (mlang__init): Read languages and their information from m17n
3136 (mlanguage__list): New function.
3137 (Miso639_1, Miso639_2): New variables.
3139 * language.h (mlanguage__list): Extern it.
3141 * database.c (get_database_stream): Use SAFE_* macros for
3142 allocating and freeing path.
3143 (mdatabase__init): Likewise.
3145 * symbol.c (msymbol__fini): Don't free symbols here.
3146 (msymbol__free_table): New function.
3147 (msymbol_is_managing_key): New function.
3149 * symbol.h (msymbol__free_table): Extern it.
3150 (msymbol__list): Extern it.
3152 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
3154 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
3155 (struct _M17NObjectArray): New member name and next.
3156 (mdebug__add_object_array): Extern it.
3157 (M17N_OBJECT_ADD_ARRAY): New macro.
3158 (mdebug__report_object): Don't extern it.
3160 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
3162 * m17n-gui.c (free_frame): Don't free frame->font.
3163 (null_device_fini): Fix code for freeing
3164 null_device.realized_font_list.
3165 (m17n_fini_win): Free interface.
3166 (mframe): Cast the return value of dlsym. Set frame->font here.
3167 (mframe_get_prop): Check frame->rface->rfont before accessing the
3170 * m17n-gui.h (Mfontfile): Extern it.
3171 (mfont_check): Extern it.
3172 (mface_equal): Extern it.
3174 * m17n-core.c: Include "symbol.h".
3175 (report_header_printed): This variable deleted.
3176 (object_array_root): New variable.
3177 (report_object_array): New function.
3178 (mdebug__report_object): This function deleted.
3179 (mdebug__add_object_array): New function.
3180 (m17n_init_core): Call mchartable_init () before mtext_init ().
3181 (m17n_fini_core): Call report_object_array (if necessary) and
3182 msymbol__free_atable at the end.
3184 * m17n-core.h (msymbol_is_managing_key): Extern it.
3185 (mtext_data): Extern it.
3186 (MTEXT_FORMAT_UTF_16): Correct type.
3187 (M17NLIB_MINOR_VERSION): Changed to 3.
3188 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
3190 * chartab.c (mchartable__init): Initalize chartable_table.count.
3191 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
3192 mdebug__report_object.
3194 2005-05-26 Kenichi Handa <handa@m17n.org>
3196 * m17n.h (Miso639_1, Miso639_2): Extern them.
3198 * symbol.h (msymbol__list): Extern it.
3200 * symbol.c (msymbol__list): New function.
3202 2005-05-19 Kenichi Handa <handa@m17n.org>
3204 * input-gui.c (minput__win_init): Don't change the value of
3207 2005-05-16 Kenichi Handa <handa@m17n.org>
3209 * m17n-core.c (m17n_object): Be sure to initialize all members.
3211 * font-ft.c (fc_decode_prop): Fix args to msymbol.
3213 2005-05-09 Kenichi Handa <handa@m17n.org>
3215 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
3217 2005-04-27 Kenichi Handa <handa@m17n.org>
3219 * language.c (mlang__init): Add "an" (Aragonese).
3221 * word-thai.c: Add support for libthai.
3222 (mtext__word_thai_init): Initialize wordseg library conditionaly.
3223 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
3225 * mtext.c: Include "word-thai.h" conditionaly.
3226 (mtext__init): Call mtext__word_thai_init conditionaly.
3227 (mtext__fini): Call mtext__word_thai_fini conditionaly.
3229 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
3230 not WORDCUT_LD_FLAGS.
3232 2005-04-19 Kenichi Handa <handa@m17n.org>
3234 * word-thai.c (wordseg_propertize): Always unref the attached
3236 (thai_wordseg): Don't unref the property.
3238 2005-04-18 Kenichi Handa <handa@m17n.org>
3240 * word-thai.c: Include stdlib.h.
3241 (wordseg_propertize): Add dummy function for the case that wordcut
3242 library doesn't exist.
3243 (wordseg_propertize): Fix for old wordcut library.
3245 2005-04-16 Kenichi Handa <handa@m17n.org>
3247 * word-thai.c: Include <stdio.h>.
3249 2005-04-15 Kenichi Handa <handa@m17n.org>
3251 * draw.c: Include mtext.h.
3252 (linebreak_table, M_break_at_space, M_break_at_word)
3253 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
3254 (compose_glyph_string): Check POS before getting Mface text
3256 (truncate_gstring): Give correct TO arg to line_break function.
3257 (GET_LB_TYPE): New macro.
3258 (find_break_backward, find_break_forward): New functions.
3259 (mdraw__init): Initialize the above new variables.
3260 (mdraw__fini): Free linebreak_table.
3261 (mdraw_default_line_break): Use find_break_backward and
3264 * word-thai.c: New file.
3266 * word-thai.h: New file.
3268 * mtext.c: Include word-thai.h.
3269 (wordseg_func_table): New variable.
3270 (mtext__init): Initialize wordseg_func_table and call
3271 mtext__word_thai_init.
3272 (mtext__fini): Call mtext__word_thai_fini, free
3274 (MTextWordsegFunc): New type.
3275 (mtext__word_segment): New function.
3277 * mtext.h (wordseg_func_table): Extern it.
3278 (mtext__word_segment): Extern it.
3280 * m17n.c (m17n_init): Fix typo (== -> =).
3282 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
3283 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
3285 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
3286 (MTEXTPROP_VAL): New macros.
3288 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
3290 2005-04-07 Kenichi Handa <handa@m17n.org>
3292 * database.c (load_chartable): Fix pursing of symbol name.
3294 2005-03-24 Kenichi Handa <handa@m17n.org>
3296 * m17n.c (m17n_init): Fix typo (== -> =).
3298 2005-03-11 Kenichi Handa <handa@m17n.org>
3300 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
3302 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
3304 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
3307 2005-03-09 handa <handa@m17n.org>
3309 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
3310 calling m17n_init ().
3312 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
3313 calling m17n_init_core ().
3315 2005-02-28 Kenichi Handa <handa@m17n.org>
3317 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3320 2005-02-17 Kenichi Handa <handa@m17n.org>
3322 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3323 (M_description, M_command, M_variable): New variables.
3324 (load_im_info_keys): New variables.
3325 (load_im_info, check_command_keyseq, get_description_advance)
3326 (parse_command_list, get_command_list, parse_variable_list)
3327 (get_variable_list, input_method_hook): New functions.
3328 (command_list, variable_list): New variables.
3329 (minput__init): Put input_method_hook to Minput_method.
3330 Initialize M_description, M_command, M_variable, Mdetail_text,
3331 load_im_info_keys, command_list, variable_list.
3332 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3333 (Mdetail_text): New variable.
3334 (minput_get_description, minput_get_commands)
3335 (minput_assign_command_keys, minput_get_variables)
3336 (minput_set_variable): New functions.
3338 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3339 (minput_assign_command_keys, minput_get_variables)
3340 (minput_set_variable): Extern them.
3342 * plist.c (UNGETC): Just decrement st->p.
3343 (read_mtext_element): New arg skip.
3344 (read_integer_element): Likewise.
3345 (read_symbol_element): Likewise.
3346 (read_element): New arg KEYS.
3347 (mplist__from_plist): Don't increment ref-count of NULL object.
3348 (mplist__from_file): New arg KEYS.
3349 (mplist_put): Don't increment ref-count of NULL object.
3350 (mplist_add): Likewise.
3351 (mplist_push): Likewise.
3352 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3354 * plist.h (mplist__from_file): Prototype adjusted.
3356 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3357 (get_database_stream): New function.
3358 (load_database): Use get_database_stream.
3359 (M_database_hook): New variable
3360 (mdatabase__init): Initialize M_database_hook.
3361 (mdatabase__load_for_keys): New function.
3362 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3364 (mdatabase_define): Free mdb->extra_info if necessary.
3366 * database.h (mdatabase__dir_list, M_database_hook)
3367 (mdatabase__load_for_keys): Extern them.
3368 (MDatabaseHookFunc): New type.
3370 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3372 2004-12-27 Kenichi Handa <handa@m17n.org>
3374 * Version 1.2.0 released.
3376 2004-12-27 Kenichi Handa <handa@m17n.org>
3378 * input.c (minput_filter): Don't reset ic->xxx_changed.
3380 * mtext.c (mtext_from_data): Fix documentation.
3382 2004-12-25 Kenichi Handa <handa@m17n.org>
3384 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3385 (M17NLIB_VERSION_NAME): Update to "1.2.".
3387 2004-12-24 Kenichi Handa <handa@m17n.org>
3389 * input.c (reset_ic): Set key_unhandled to 0.
3391 2004-12-21 Kenichi Handa <handa@m17n.org>
3393 * m17n-gui.h (mfont_from_spec): Delete extern.
3395 * input-gui.c (win_callback): Handle Minput_reset.
3396 (minput__win_init): Register reset_ic as a callback for
3399 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3400 changed. At first, shift to the initial state.
3401 (minput__init): Initialize Minput_reset. Register reset_ic as a
3402 callback for Minput_reset.
3403 (Minput_reset): New variable.
3404 (minput_filter): Always set ic->xxx_changed to 0.
3405 (minput_reset_ic): New function.
3406 (integer_value): Fix typo ('>' -> '<') and calculation of length
3409 * m17n-core.c (merror_code): Change type to `int'.
3411 * m17n-misc.h (merror_code): Adjust type.
3413 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3415 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3416 (mtext_change_prop): Delete extern.
3418 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3419 to `int'. Move the documents to m17n-core.h.
3421 2004-12-13 Kenichi Handa <handa@m17n.org>
3423 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3424 (MTextProperty): Document it.
3426 2004-12-09 Kenichi Handa <handa@m17n.org>
3428 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3430 2004-12-03 Kenichi Handa <handa@m17n.org>
3432 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3433 m17n__gui_initialized): New externs.
3435 * m17n-core.h (enum M17NStatus): New enum.
3436 (m17n_status): Extern it.
3438 * m17n-core.c (core_initialized): Delete this variable.
3439 (m17n__core_initialized, m17n__shell_initialized,
3440 m17n__gui_initialized): New variables.
3441 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3442 instead of core_initialized.
3443 (m17n_status): New function.
3445 * m17n.c (shell_initialized): Delete this variable.
3446 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3449 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3451 * m17n-gui.c (win_initialized): Delete this variable.
3452 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3453 instead of gui_initialized.
3455 2004-11-19 Kenichi Handa <handa@m17n.org>
3457 * input.c (reset_ic): Check if ic_info->state is NULL.
3458 (filter): If ic_info->state is NULL, return 0.
3459 (load_input_method): Don't unref `maps' it it's not created.
3461 2004-11-15 Kenichi Handa <handa@m17n.org>
3463 * input.c (find_candidates_group): If INDEX is -1, find the last
3465 (take_action_list): If the previous of the first candidate is
3466 requested, select the last candidate.
3468 2004-11-08 Kenichi Handa <handa@m17n.org>
3470 * m17n-X.c (device_open): Try at most 32 fonts to find a
3471 non-autoscaled font.
3473 * font.c (xlfd_parse_name): Fix previous change.
3475 2004-11-05 Kenichi Handa <handa@m17n.org>
3477 * font.c: (commont_style): Include dummy elements "slanted" and
3478 "rslanted" to prefer "o" to "r" if "i" is requested.
3480 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3482 2004-10-29 Kenichi Handa <handa@m17n.org>
3484 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3486 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3487 New members smallest and larger.
3488 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3489 (xfont_registry_list): Likewise.
3490 (xfont_select): Likewise.
3493 2004-10-28 Kenichi Handa <handa@m17n.org>
3495 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3496 font name comparison.
3497 (xfont_select): Fix logic for selecting a larger size font.
3499 2004-10-25 Kenichi Handa <handa@m17n.org>
3501 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3504 2004-10-22 Kenichi Handa <handa@m17n.org>
3506 * input.c (update_candidate): Renamed from udpate_candidate.
3507 (take_action_list): Show more debugging info on arithmetic commands.
3509 * m17n-X.c (device_open): Fix previous change.
3511 * draw.c (compose_glyph_string): Don't get face property at the
3514 2004-10-21 Kenichi Handa <handa@m17n.org>
3516 * draw.c (compose_glyph_string): Fix for the case of category
3519 2004-10-19 Kenichi Handa <handa@m17n.org>
3521 * input.c (mdebug_mask): New variable.
3522 (shift_state): Print debug information.
3523 (take_action_list): Likewise.
3524 (handle_key): Likewise.
3526 2004-10-14 Kenichi Handa <handa@m17n.org>
3528 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3530 2004-10-13 Kenichi Handa <handa@m17n.org>
3532 * m17n-X.c (device_open): Be sure to register at least one font
3535 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3536 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3538 2004-10-12 Kenichi Handa <handa@m17n.org>
3540 * draw.c (alloc_gstring): Fix previous change.
3542 * font-ft.c (ft_list_generic): Fix for the case of not
3545 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3547 * font.c (mfont_list): If no font is found, return NULL.
3548 (load_font_encoding_table): Put entries of nil registry first.
3549 (find_encoding): Adjust for the above change.
3551 2004-10-11 Kenichi Handa <handa@m17n.org>
3553 * m17n-gui.h (mfont_list): Adjust prototype.
3555 * m17n-X.c (xfont_list): New arg maxnum.
3557 * font.h (struct MFontDriver): Change prototype of <list>.
3559 * font-ft.c (fc_generic_family_list): Delete it.
3560 (Mserif, Msans_serif, Mmonospace): Delete them.
3561 (M_generic_family_info): New variable.
3562 (enum GenericFamilyType): New enum.
3563 (struct GenericFamilyInfo): New struct.
3564 (generic_family_table): New variable.
3565 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3567 (add_font_info): Get style here.
3568 (ft_list_family): Don't initialize fc_config here. Don't list
3570 (ft_list_generic): New function.
3571 (ft_select): Pay attention to generic familes here.
3572 (ft_open): Fix calculation of ascent and descent.
3573 (ft_list): Pay attention to generic families.
3574 (mfont__ft_init): Initialize M_generic_family_info,
3575 generic_family_table, and fc_config..
3576 (mfont__ft_fini): Finalize generic_family_table.
3578 * draw.c (compose_glyph_string): Use more constant font for
3579 glyphs. Adjust for the member change in MGlyph.
3580 (layout_glyph_string): Adjust for the member change in MGlyph.
3581 (alloc_gstring): Intilize scracth_glyph to avoid
3582 compose_glyph_string on it.
3583 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3584 (mdraw_coordinates_position): Fix previous change.
3586 * internal-gui.h (glyph_category): New enum.
3587 (MGlyph): Change type of <category> to enum glyph_category.
3589 * face.c (mface__realize): Delete args langauge and charset.
3590 (mface__for_chars): Fix for the case that glyphs have different
3592 (mface__update_frame_face): Adjust for mface__realize change.
3594 * face.h (mface__realize): Adjust prototype.
3596 2004-10-05 Kenichi Handa <handa@m17n.org>
3598 * language.c (mlang__init): Add Akan.
3600 2004-10-04 Kenichi Handa <handa@m17n.org>
3602 * font-ft.c (add_font_info): Add instead of push the element.
3603 (ft_list_family): For generic fonts, try all
3604 substituted. families.
3606 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3607 (run_rule): Don't update cluster range here.
3608 (run_command): Update cluster range on appending a glyph.
3609 (run_otf): Update cluster range for glyphs generated by OTF.
3611 2004-10-02 Kenichi Handa <handa@m17n.org>
3613 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3615 2004-09-30 Kenichi Handa <handa@m17n.org>
3617 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3619 2004-09-30 Kenichi Handa <handa@m17n.org>
3621 * font.h: Include <fontconfig/fontconfig.h>.
3622 (MFTInfo): New member langset.
3623 (mfont__encoding_list): Extern it.
3625 * font.c (mfont__encoding_list): New function.
3626 (mdebug_dump_font_list): New function.
3628 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3629 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3631 (ft_family_list): New variable.
3632 (set_font_info): New arg basep. Callers changed.
3633 (fc_list): Check the return value of FcPatternGetString.
3634 (add_font_info): New arg plist. Callers changed. Update
3636 (ft_list_family): New function (merged fc_list and ft_list_all).
3637 (ft_select): Use ft_list_family.
3638 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3640 (mfont__ft_init): Initialize above new variables.
3641 (mfont__ft_fini): Free ft_family_list.
3642 (STRDUP_LOWER): New macro.
3643 (set_font_info): Use STRDUP_LOWER.
3644 (ft_list_family): Avoid duplicate addition of font path. Use
3646 (fc_decode_prop): Fix typo.
3648 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3649 (xfont_registry_list): Change argument disp_info to frame.
3651 (xfont_list_all): New function.
3652 (xfont_list): If FONT is not NULL, check all fonts.
3654 2004-09-28 Kenichi Handa <handa@m17n.org>
3656 * m17n-X.c (MXFont, MXFontList): New types.
3657 (MDisplayInfo): Delete members font_registry_list,
3658 iso8859_1_family_list, iso10646_1_family_list, new members
3659 font_list, base_font_list.
3660 (free_display_info): Adusted for the change of MDisplayInfo.
3661 (xfont_driver): Initialize with xfont_list.
3662 (font_compare): New function.
3663 (build_font_list): Deleted.
3664 (xfont_registry_list): New function.
3665 (xfont_select): Use xfont_registry_list.
3666 (xfont_list): New function.
3667 (device_open): Adusted for the change of MDisplayInfo.
3669 * font-ft.c (add_font_info): New arg languages. Callers changed.
3670 (fc_list): Get languages from fonts..
3671 (ft_list_all): Renamed from ft_list. Callers changed.
3672 (ft_list): New function.
3673 (mfont__ft_driver): Initalize with ft_list.
3675 * font.c (mfont_list): New function.
3677 * font.h (struct MFontDriver): New member `list'.
3678 (MFTInfo): New member languages.
3680 * m17n-gui.h (mfont_list): Extern it.
3682 2004-09-27 Kenichi Handa <handa@m17n.org>
3684 * internal-gui.h (struct MGlyphString): Delete members mt,
3685 sub_width, sub_lbrearing, sub_rbearing, and region.
3687 * draw.c (MSubTextExtents): New type.
3688 (layout_glyphs): New arg extents. Set its members.
3689 (layout_glyph_string): Adjusted for the above change.
3690 (alloc_gstring): Don't set gstring->mt.
3691 (truncate_gstring): Call line_break function with mt instead of
3694 2004-09-22 Kenichi Handa <handa@m17n.org>
3696 * mtext.c (count_utf_16_chars): Count each code of invalid
3699 2004-09-19 Kenichi Handa <handa@m17n.org>
3701 * mtext.c (default_utf_16, default_utf_32): Rename them to
3702 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3705 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3708 2004-09-13 Kenichi Handa <handa@m17n.org>
3710 * draw.c (Mlatin): Don't declare it here.
3711 (visual_order): Fix reordering of combining characters.
3712 (compose_glyph_string): Fix detection of script.
3713 (layout_glyphs): Don't fix reordering of combining characters
3715 (layout_glyph_string): Pay attention to
3716 control->disable_overlapping_adjustment.
3717 (truncate_gstring): Include at least on character in a line.
3718 (get_gstring): Always scan one full line.
3719 (mdraw__init): Don't initialize Mlatin here.
3720 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3721 have a font, use ascent/descent of an ASCII font. Allow
3722 ink_array_return and logical_array_return to be NULL.
3723 (mdraw_coordinates_position): Fix iteration.
3725 * font-ft.c (MFTtoProp): Member completely changed.
3726 (ft_to_prop): Adjusted for the above change.
3727 (ft_to_prop_size): Likewise.
3728 (set_font_info): Adjusted for the change of MFTtoProp.
3729 (fc_generic_family_list): New variable.
3730 (fc_list): Add special handling of generic font names.
3731 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3732 Initialize fc_generic_family_list.
3733 (mfont__ft_fini): Don't free ft_to_prop. Free
3734 fc_generic_family_list.
3735 (FC_vs_M17N_font_prop): New type.
3736 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3737 (fc_decode_prop, fc_encode_prop): New functions.
3738 (mfont__ft_parse_name): Use fc_decode_prop.
3739 (mfont__ft_unparse_name): Use fc_encode_prop.
3741 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3742 (MWDevice): Add member realized_font_list.
3743 (free_display_info): Don't free disp_info->realized_font_list.
3744 (free_device): Free device->realized_fontset_list.
3745 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3746 (device_open): Don't initialize disp_info->realized_font_list.
3747 (device_open): Initialize device->realized_font_list and set it to
3748 frame->realized_font_list.
3750 * fontset.c (try_font_group): New function.
3751 (mfont__lookup_fontset): Use try_font_group.
3753 * font.c (common_weight): Change the order of "regular".
3755 * face.c (Mlatin): Don't make it static.
3756 (mface__realize): Be sure to set work_gstring.frame.
3757 (mface__for_chars): Likewise.
3759 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3762 * internal-gui.h (Mlatin): Extern it.
3764 * m17n-gui.h (MDrawControl): New member
3765 disable_overlapping_adjustment.
3767 2004-09-06 Kenichi Handa <handa@m17n.org>
3769 * font-flt.c (run_otf): Fix typo ('}'->']').
3771 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3772 (COMBINING_PRECOMPUTED_P): New macros.
3774 * draw.c (layout_glyphs): Handle precomputed combining code.
3776 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3777 precomupted combining code.
3779 2004-09-03 Kenichi Handa <handa@m17n.org>
3781 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3784 2004-08-27 Kenichi Handa <handa@m17n.org>
3786 * face.c (mface_put_prop): If the new value is the same as the
3787 current one, don't increment frame->tick.
3789 2004-08-25 Kenichi Handa <handa@m17n.org>
3791 * fontset.c (mfontset): Initialize font_spec_list member.
3792 (mfontset_copy): Load fontset if necessary.
3794 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3795 'metrics' to for C++.
3797 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3800 2004-08-16 Kenichi Handa <handa@m17n.org>
3802 * Version 1.1.0 released.
3804 2004-08-13 Kenichi Handa <handa@m17n.org>
3806 * language.c (mlang__init): Add Dhivehi.
3808 * m17n-gui.c (Mx, Mfreetype): Delete it.
3809 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3811 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3812 (mfont_resize_ratio): Extern it.
3813 (MDrawGlyphInfo): New member logical_width;
3814 (MDrawGlyph): New type.
3815 (mdraw_glyph_list): Prototype adjusted.
3817 * m17n-X.c (xfont_open): Set type and fontp members.
3818 (xft_open): Likewise.
3820 * internal-gui.h (Mx, Mfreetype): Delete extern.
3822 * font.h (struct MRealizedFont): New member type and fontp.
3824 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3825 (Mx, Mfreetype): Declare here.
3826 (Mxft): New variable.
3827 (mfont_resize_ratio): New function.
3829 * font-ft.c (ft_open): Set type and fontp members.
3831 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3834 2004-08-11 Kenichi Handa <handa@m17n.org>
3836 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3839 2004-08-06 Kenichi Handa <handa@m17n.org>
3841 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3844 * font-flt.c (run_otf): Print debugging information if necessary.
3846 2004-08-05 Kenichi Handa <handa@m17n.org>
3848 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3849 positioning_type 5 and 6. Switch simplified.
3851 2004-08-04 Kenichi Handa <handa@m17n.org>
3853 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3855 2004-08-02 Kenichi Handa <handa@m17n.org>
3857 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3858 set val to 1 even if it is greater than 1.
3860 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3862 2004-07-29 Kenichi Handa <handa@m17n.org>
3864 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3865 debugging information.
3867 * internal.h (MDEBUG_PRINT5): New macro.
3869 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3870 the previous one if the zero width glyph has left or right
3873 2004-07-26 Kenichi Handa <handa@m17n.org>
3875 * m17n-X.c (xft_render): Pay attention to members left_padding and
3876 right_padding of MGlyph.
3878 * draw.c (visual_order): Allocate one more elements for arrays as
3879 a workaround of fribidi bug.
3880 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3881 instead of MGlyph->bidi_sensitive.
3882 (layout_glyph_string): Pay attentinon to
3883 control->orientation_reversed when padding at the head or tail.
3884 Fix adjustment of space glyph width.
3885 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3888 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3889 instead of MGlyph->bidi_sensitive.
3891 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3893 2004-07-26 Kenichi Handa <handa@m17n.org>
3895 * draw.c (visual_order): Don't treat combined glyphs specially.
3896 (layout_glyphs): Don't get metrics glyphs that are already ready.
3897 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3898 width with the previous one.
3899 (draw_background): Fix bar cursor position on a r2l glyph.
3901 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3902 (run_rule): Fix place of updating cluster_begin_pos and
3903 cluster_end_pos here.
3904 (run_otf): Don't set left_padding.
3906 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3908 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3909 Fix handling of GPOS.
3910 (mfont__ft_drive_gpos): Delete this function.
3912 * font.h (mfont__ft_drive_otf): Renamed back from
3913 mfont__ft_drive_gsub.
3914 (mfont__ft_drive_gpos): Delete extern.
3916 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3917 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3919 2004-07-23 Kenichi Handa <handa@m17n.org>
3921 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3922 the same bidi level.
3924 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3926 2004-07-22 Kenichi Handa <handa@m17n.org>
3928 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3930 2004-07-20 Kenichi Handa <handa@m17n.org>
3932 * draw.c (render_glyphs): Fix checking of g->code validity.
3934 * face.c (mface__realize): Set g.type.
3936 2004-07-18 Kenichi Handa <handa@m17n.org>
3938 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3941 * m17n-gui.c (mframe): Print error message give by dlopen to
3944 2004-07-16 Kenichi Handa <handa@m17n.org>
3946 * draw.c (compose_glyph_string): Improve the way of deciding a
3947 script. For a character that doesn't have script property, use
3948 the last non-latin script.
3950 * font-ft.c (fc_list): Cancel previous change.
3951 (mfont__ft_init): Add more entries in ft_to_prop_name.
3953 2004-07-15 Kenichi Handa <handa@m17n.org>
3955 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3956 previous or next character glyphs.
3958 2004-07-14 Kenichi Handa <handa@m17n.org>
3960 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3961 of type GLYPH_SPACE.
3963 * fontset.c (mfont__lookup_fontset): If glyph type is
3964 GLYPH_SPACE, get codes for SPACE.
3966 * internal-gui.h (Mfont): Delete extern.
3968 * m17n-gui.h (Mfont): Delete duplicated extern.
3970 2004-07-13 Kenichi Handa <handa@m17n.org>
3972 * font-ft.c (DEVICE_DELTA): New macro.
3973 (adjust_anchor): New function.
3974 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3976 (mfont__ft_drive_gpos): New function.
3978 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3979 (FontLayoutContext): Delete member `rfont'.
3980 (run_otf): Set g->otf_cmd. Call
3981 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3982 only whne HAVE_OTF is defined.
3984 * fontset.c: Include "config.h".
3986 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3987 (MGlyph): New member otf_cmd.
3989 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3990 (mfont__ft_drive_gpos): Extern it.
3992 * face.c: Include "config.h".
3994 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3996 * input-gui.c: Include "config.h".
3998 * plist.c: Include "config.h".
4000 2004-07-06 Kenichi Handa <handa@m17n.org>
4002 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
4003 internal-gui.h: Cancel previous changes.
4005 * m17n-gd.h: Delete it.
4007 * Makefile.am (libm17n_core_la_LIBADD): New variable.
4008 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
4009 @XML2_LD_FLAGS@ to above.
4010 (libm17n_la_LIBADD): Add -ldl.
4011 (libm17n_la_LDFLAGS): Add -export-dynamic.
4012 (X_LD_FLAGS): Fix the order of linking.
4013 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
4014 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
4015 (libm17n_X_la_LDFLAGS): Add -module.
4016 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
4017 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
4018 (libm17n_gd_la_LDFLAGS): Add -module.
4019 (include_HEADERS): Delete m17n-gd.h.
4021 2004-06-30 Kenichi Handa <handa@m17n.org>
4023 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
4024 (MDeviceLibraryInterface): Delete it.
4025 (register_device_library): Delete it.
4026 (m17n__device_library_list): Renamed from device_library_list.
4028 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
4029 (m17n_init_win): Adjust prototype.
4031 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
4032 (m17n_init_gd): New function.
4034 * m17n-gd.h: New file.
4036 * m17n-X.h: Include <m17n-gui.h>.
4037 (m17n_init_X): Extern it.
4038 (M17N_INIT): Redefine it.
4040 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
4041 (m17n_init_X): New function.
4043 * internal-gui.h (m17n__device_library_list): Extern it.
4044 (struct MDeviceDriver): New members initialized, init, and fini.
4046 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
4048 (libm17n_X_la_LIBADD): Delete aboves.
4049 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
4050 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
4051 (libm17n_gd_la_LDFLAGS): Delete it.
4052 (include_HEADERS): Add m17n-gd.h.
4054 2004-06-25 Kenichi Handa <handa@m17n.org>
4056 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
4057 (libm17n_gd_la_LDFLAGS): Cancel previous change.
4059 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
4061 * font-ft.c (fc_list): If FcFontList finds no font, try
4064 * draw.c (compose_glyph_string): Terminate the last loop after
4065 doing default combining if necessary.
4067 2004-06-24 Kenichi Handa <handa@m17n.org>
4069 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
4071 * character.c (mchar_define_property): Add const to an arg.
4073 * charset.c (mchar_define_charset): Add const to an arg.
4075 * coding.c (MCodingSystem): Add const to an arg or decoder.
4076 (finish_decoding): Add const to an arg.
4077 (decode_coding_charset, decode_coding_utf_8)
4078 (decode_coding_utf_16, decode_coding_utf_32)
4079 (decode_coding_iso_2022, decode_coding_sjis)
4080 (mconv_define_coding): Likewise.
4082 * m17n-X.c (xft_find_metric): Delete unused variable.
4084 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
4087 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
4090 * mtext.c (count_utf_8_chars, count_utf_16_chars)
4091 (mtext__from_data, mtext_from_data): Add `const' to an arg.
4093 * mtext.h (mtext__from_data): Ajust prototype.
4095 2004-06-23 Kenichi Handa <handa@m17n.org>
4097 * draw.c (compose_glyph_string): Always get glyph codes by
4099 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
4100 (mdraw_glyph_list): New function.
4102 * font-flt.c (mfont__flt_run): Be sure to call
4103 rfont->driver->encode_char.
4105 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
4106 (ft_encode_char): Delete arg C.
4107 (ft_render): Don't call FT_Get_Char_Index.
4109 * font.c (mfont__encodable_p): Delete it.
4110 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
4112 * font.h (struct MFontDriver): Delete arg C of encode_char.
4113 (mfont__encodable_p): Delete extern.
4115 * m17n-X.c (xfont_encode_char): Delete arg C.
4116 (xft_find_metric): Don't cal FT_Get_Char_Index.
4117 (xft_render): Likewise.
4119 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
4121 (mdraw_glyph_list): Extern it.
4123 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
4125 2004-06-22 Kenichi Handa <handa@m17n.org>
4127 * m17n-gui.h (mfontset_lookup): Extern it.
4129 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
4131 * fontset.c (realize_fontset_elements)
4132 (free_realized_fontset_elements, update_fontset_elements): New
4134 (mfont__realize_fontset): Call realize_fontset_elements.
4135 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
4136 (mfont__lookup_fontset): If a fontset was modified, update
4137 the realized fontset.
4138 (mfontset_modify_entry): Increment fontset->tick.
4139 (mfontset_lookup): New function.
4141 2004-06-21 Kenichi Handa <handa@m17n.org>
4143 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
4145 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
4146 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
4147 length of source text 0.
4149 2004-06-21 Kenichi Handa <handa@m17n.org>
4151 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
4152 (compare): Pay attention to format other than utf-8.
4153 (copy): Delete this function.
4154 (count_by_utf_8, count_by_utf_16, insert): New functions.
4155 (count_utf_16_chars): Fix handling of a surrogate pair.
4156 (find_char_forward, find_char_backward): Likewise.
4157 (mtext__from_data): Delete unnecessary check. Fix number of
4159 (mtext_from_data): Don't count items.
4160 (mtext_ref_char): Optimize the code.
4161 (mtext_set_char): Pay attention to format other than utf-8.
4162 (mtext_cat_char): Likewise.
4163 (mtext_dup): Don't call copy, instead do allocation here.
4164 (mtext_cat): Call insert instead of copy.
4165 (mtext_ncat): Likewise.
4166 (mtext_cpy): Delete character at first and call insert instead of
4168 (mtext_ncpy): Likewise.
4169 (mtext_copy): Likewise.
4170 (mtext_duplicate): Call insert instead of copy.
4171 (mtext_del): Pay attention to format other than utf-8.
4172 (mtext_ins): Simply call insert.
4173 (mtext_ins_char): Pay attention to format other than utf-8.
4174 (mtext_tok): Call insert instead of copy.
4175 (mtext_text): Call UNIT_BYTES.
4177 * textprop.c (mtext__adjust_plist_for_change): New function.
4179 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
4180 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
4181 (CHAR_UNITS_AT): Fix typo.
4182 (CHAR_UNITS_BY_HEAD): Fix typo.
4183 (STRING_CHAR_AND_UNITS): Fix typo.
4185 * internal.h (MTEXT_READ_ONLY_P): New macro.
4187 * mtext.h (mtext__replace): Delete the extern.
4188 (mtext__adjust_foramt): Adjust prototype.
4190 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
4191 if possible. Otherwise make a copy of mmt.
4193 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
4196 2004-06-18 Kenichi Handa <handa@m17n.org>
4198 * character.h (CHAR_STRING_UTF16): Fix syntax.
4200 2004-06-16 Kenichi Handa <handa@m17n.org>
4202 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
4203 (libm17n_X_la_LIBADD): Delete it.
4204 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
4206 * m17n-X.c (device_open): Add parens in `if' condition.
4208 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
4209 (DEC_POSITION): Likewise.
4210 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
4212 2004-06-15 Kenichi Handa <handa@m17n.org>
4214 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
4217 * draw.c (compose_glyph_string): If langauge is specified, call
4218 mface__for_chars even if a text is all latin. Fix condition for
4219 setting non_ascii_found.
4221 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
4223 * m17n.h (minput_char_to_key): Delete extern.
4225 * m17n-gui.h (minput_event_to_key): Cancel previous change.
4227 * m17n-gui.c (null_device_open): Set several members of frame.
4229 2004-06-14 Kenichi Handa <handa@m17n.org>
4231 * m17n-gui.h (minput_event_to_key): Delete extern.
4233 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
4235 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
4237 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
4239 2004-06-08 Kenichi Handa <handa@m17n.org>
4241 * character.c (mchar_put_prop): Don't increment the ref-count of
4244 2004-06-04 Kenichi Handa <handa@m17n.org>
4246 * m17n-core.c (mdebug__register_object): New function.
4247 (mdebug__unregister_object): Likewise.
4249 * internal.h (mdebug__register_object, mdebug__unregister_object):
4251 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
4254 * charset.c (mcharset__load_from_database): Don't call
4255 mconv__register_charset_coding here.
4257 * coding.c (find_coding): Get a real name from an element of
4258 coding_definition_list.
4259 (mconv__register_charset_coding): Set the real name at the top of
4261 (mcoding__load_from_database): Likewise.
4262 (mconv_list_codings): Adjusted for the above change.
4264 2004-06-03 Kenichi Handa <handa@m17n.org>
4266 * coding.c (find_coding): Find by canonicalized name. Don't have
4267 to modify the element of coding_definition_list by
4269 (mconv__define_coding_from_charset): Delete it.
4270 (mconv__register_charset_coding): Canonicalize sym.
4271 (mcoding__load_from_database): Register plist modified by
4274 * coding.h (mconv__define_coding_from_charset): Don't extern it.
4276 * font-ft.c (ft_open): Fix setting of rfont->descent.
4278 2004-06-02 Kenichi Handa <handa@m17n.org>
4280 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
4281 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
4282 (xlfd_unparse_name): Renamed from xfont_build_name.
4283 (mfont__init): Initialized Mfontconfig.
4284 (mfont__free_realized): Unconditionally unref rfont->info.
4285 (mfont__select): Free `this' if it's not best.
4286 (mfont__open): Don't check frame->realized_font_list.
4287 (mfont__parse_name_into_font): New function.
4288 (Mfontconfig): New variable.
4289 (mfont_from_name): Call mfont_parse_name.
4290 (mfont_name): Call mfont_unparse_name.
4291 (mdebug_dump_font): Likewise.
4293 * font.h (struct MFontDriver): Delete members parse_name and
4295 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
4296 (mfont__parse_name_into_font): Extern it.
4298 * font-ft.c: Include "symbol.h".
4299 (close_ft): Unconditionally free filename and charmap_list of
4301 (ft_open): Duplicate base->filename. Increment ref-count of
4302 ft_info->charmap_list. Free ft_info->charmap_list and
4303 ft_info->filename on error.
4304 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
4306 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
4308 (enum xlfd_field_idx): Moved to font.c.
4309 (split_font_name, build_font_name): Likewise.
4310 (build_font_list): Call mfont__parse_name_info_font.
4311 (xfont_open): Call mfont__unparse_name. Free name.
4312 (xfont_parse_name, xfont_build_name): Moved to font.c
4313 (xft_select): Prototype deleted.
4314 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
4315 Call mfont_pase_name.
4317 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4318 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4321 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4324 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4326 2004-06-01 Kenichi Handa <handa@m17n.org>
4328 * fontset.c (mfontset_modify_entry): Pay attention to the case
4329 that fontset->font_spec_list is NULL.
4331 2004-05-31 Kenichi Handa <handa@m17n.org>
4333 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4335 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4337 * font.c (mfont__select): Print score the a font for debugging.
4339 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4341 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4342 kanji_sym and kana_sym.
4344 2004-05-28 Kenichi Handa <handa@m17n.org>
4346 * Makefile.am (VINFO): New variable.
4347 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4348 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4350 2004-05-27 Kenichi Handa <handa@m17n.org>
4352 The following chanages are to make device dependent functions
4353 accessible only from MDeviceDriver structure, and to add GD and
4354 null device drivers. Font drivers get also device dependent.
4356 * m17n.c (m17n_init): Increament shell_initialized.
4357 (m17n_fini): Decremented shell_initialized.
4359 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4361 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4362 (Mwidget, Mcolormap, Mx): Extern them.
4364 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4365 (free_frame): Call frame->driver->close instead of
4367 (DLOPEN_SHLIB_EXT): New macro.
4368 (MDeviceLibraryInterface): New type.
4369 (device_library_list): New variable.
4370 (register_device_library): New function.
4371 (null_device): New variable.
4372 (null_device_close, null_device_get_prop)
4373 (null_device_realize_face, null_device_free_realized_face): New
4375 (null_driver): New variable.
4376 (null_device_init, null_device_fini, null_device_open): New
4378 (null_interface): New variable.
4379 (Mfreetype, Mdevice): Declare them.
4380 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4381 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4382 Mwin__Close_Device. Register drivers for Mx and Mgd.
4383 (m17n_fini_win): Decremented win_initialized. Call "fini"
4384 function of all opened devices. Don't call mwin__fini.
4385 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4387 (mframe): Handle Mdevice key of PLIST.
4388 (mframe_get_prop): Call frame->device->get_prop instead of
4389 mwin__device_get_prop.
4391 * m17n-gd.c: New file.
4393 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4394 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4396 * m17n-core.c (m17n_init_core): Increate core_initialized.
4397 (m17n_fini_core): Decremented core_initialized.
4399 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4400 (Mcolormap): Don't extern them here.
4402 * m17n-X.c (FRAME_DEVICE): New macro.
4403 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4404 (free_display_info): Use MPLIST_DO.
4405 (free_device): Free rface->info.
4406 (xft_close): Delete it.
4407 (device_init): Renamed from mwin__init.
4408 (device_fini): Renamed from mwin__fini.
4409 (device_open): Renamed from mwin__open_device.
4410 (x_driver): New variable.
4411 (MXFontInfo): Delete member frame, add member display.
4412 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4413 Don't declare them here.
4415 * internal-gui.h (MDeviceType): New enum.
4416 (MWDefice): Delete it.
4417 (struct MFrame): Change type of device to void *. New members
4418 device_type, driver, font_driver_list.
4419 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4420 (MDeviceDriver): New type.
4421 (Mx, Mgd, Mfreetype): Extern them.
4422 (mwin__XXX): Delete all of them.
4424 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4426 (win_destroy_ic): Likewise.
4427 (adjust_window_and_draw): Likewise.
4428 (win_callback): Likewise.
4429 (Mxim): Declare it here.
4430 (minput_event_to_key): Call M_CHECK_READABLE.
4432 * fontset.c (mfont__lookup_fontset): Delete local variable
4435 * font.h (struct MFontDriver): Delete member close, add members
4436 parse_name and build_name.
4437 (mfont__driver_list): Delete extern.
4438 (mfont__close): Delete extern.
4440 * font.c (mfont__init): Don't set mfont__driver_list.
4441 (mfont__fini): Don't unref mfont__driver_list.
4442 (mfont__select): Try font drivers in frame->font_driver_list. Set
4443 driver member of a realized font.
4444 (mfont__close): Delete it.
4445 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4446 functions of the default frame.
4448 * font-ft.c (close_ft): Check ft_info->ft_face and work
4450 (add_font_info): Allocate ft_info by M17N_OBJECT.
4451 (ft_close): Delete it.
4452 (mfont__ft_driver): Don't set ft_close.
4453 (ft_select): Increment ref-count of best_font.
4454 (ft_open): Decremented ref-count of base. On error, call
4455 FT_Done_Face and free ft_info.
4456 (ft_find_metric): Always use XXX_MONO in load_flags.
4457 (ft_render): Fix setting of width. Call
4458 frame->driver->draw_points instead of mwin__draw_points.
4459 (ft_to_prop): Don't set mfont__driver_list.
4460 (mfont__ft_fini): Just unref ft_info.
4462 * face.c (mface__init): Exchange foreground and background of
4463 mface__default. Call mface_put_prop to set hline of
4465 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4466 (mface__free_realized): Don't call mwin__free_realized_face.
4468 * draw.c (Mdepth): Don't declare it here.
4469 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4470 (render_glyphs, render_glyph_string): Likewise.
4471 (mdraw__init): Don't set Mdepth.
4472 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4474 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4476 (mdraw_text_items): Check FRAME is writable.
4477 (mdraw_per_char_extents): Implement body.
4479 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4481 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4482 (GUI_SOURCES): Delete it.
4483 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4484 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4485 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4486 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4487 (linkgui_LDADD): Set to libm17n-gui.la
4488 (linkgui_LDFLAGS): New target.
4489 (SRC): Include ${libm17n_gui_la_SOURCES} and
4490 ${libm17n_gd_la_SOURCES}.
4492 2004-05-24 Kenichi Handa <handa@m17n.org>
4494 * draw.c (draw_background): Don't draw background even if
4495 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4497 2004-05-22 Kenichi Handa <handa@m17n.org>
4499 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4501 2004-05-20 Kenichi Handa <handa@m17n.org>
4503 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4505 * m17n-gui.c: Include "plist.h".
4506 (mframe): If PLIST is NULL, initialize it to emply plist.
4508 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4509 (xft_driver): New variable.
4510 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4511 (xft_find_metric, xft_render): New function.
4512 (mwin__init): Adjusted for the new mfont__driver_list.
4513 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4514 generated face to PARAM.
4515 (mwin__realize_face): Fix setting of box colors. Don't call hook
4517 (mwin__draw_hline): New function.
4518 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4519 (mwin__xft_render): Delete these function.
4521 * internal-gui.h (struct MFrame): New member tick.
4522 (struct MGlyphString): New member tick.
4523 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4524 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4525 (mwin__xft_render): Delete extern.
4527 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4528 (mfontset): Always increment the reference count of returned
4531 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4532 (MFTInfo): Moved to font.h.
4533 (ft_iso8859_1_font_list): Delete this variable.
4534 (set_font_info): Don't set font->property[MFONT_TYPE].
4535 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4536 (add_font_info): Change type to void.
4537 (fc_list): Change anme from xft_list. Caller changed. Include
4538 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4539 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4540 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4541 (close_ft): Don't call mwin__xft_close. Unref
4542 ft_info->extra_info.
4543 (ft_open): Don't setup ft_info->fontname. Don't call
4545 (ft_find_metric): Don't call mwin__xft_get_metric.
4546 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4547 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4548 (mfont__ft_init): Adjusted for new mfont__driver_list.
4549 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4551 * font.c (mfont__driver_list): Make it MPlist.
4552 (mfont__init): Adjust initialization of mfont__driver_list.
4553 (mfont__fini): Free mfont__driver_list.
4554 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4555 (mfont__select): Adjusted for the new mfont__driver_list.
4557 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4558 (mfont__drirver_list): Adjust prototype.
4559 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4561 * face.h (struct MFace): Delete member realized_face_list, add
4563 (struct MRealizedFace): Delete member need_update
4564 andnofont_rface, add member non_ascii_list.
4565 (mface__update_frame_face): Extern it.
4567 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4569 (get_hline_create, get_box_create): New functions.
4570 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4572 (free_face): Cancep previous change. Free face->frame_list.
4573 (serialize_hline): Do nothing if hline->width is zero.
4574 (serialize_box): Do nothing if box->width is zero.
4575 (mface__init): Setup all properties of mface__default.
4576 (mface__fini): Free hline_prop_list and box_prop_list.
4577 (mface__realize): Cancel previous change. Update
4578 face->frame_list. Setup rface->non_ascii_list.
4579 (mface__for_chars): Update rface->non_ascii_list.
4580 (mface__free_realized): Free rface->non_ascii_list.
4581 (mface__update_frame_face): New function.
4582 (mface): Initialize face->frame_list.
4583 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4585 (mface_merge): Likewise.
4586 (mface_put_prop): If key is Mhline or Mbox, get value by
4587 get_hline_create or get_box_create respectively.
4588 (mface_put_prop): Update frame->tick and call
4589 mface__update_frame_face if necessary.
4590 (mface_update): Do nothing if func is noop_hook.
4592 * draw.c (render_glyphs): If a font is not found, use
4593 mwin__draw_empty_boxes.
4594 (alloc_gstring): Initialize gstring->tick.
4595 (get_gstring): Check gstring->tick.
4597 2004-05-17 Kenichi Handa <handa@m17n.org>
4599 * face.c (find_realized_face): Return value changed. If RFONT is
4600 NULL, avoid unnecessary checking.
4601 (free_face): Free face->realized_face_list.
4602 (mface__realize): Adjusted for the change of find_realized_face.
4603 If it returns a realized face that needs update, free it and
4604 realize a new one. Push a new realized face to
4605 frame->realized_face_list instead of appending.
4606 (mface__for_chars): Adjusted for the change of find_realized_face.
4607 Short cut if the required font is in rface->ascii_rface.
4608 (mface_put_prop): Free old value if necessary. Set need_update
4609 member of realized faces to 1.
4611 * face.h (struct MFace): Delete member tick, add member
4613 (struct MRealizedFace): Delete member tick, add member
4616 2004-05-13 Kenichi Handa <handa@m17n.org>
4618 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4620 2004-05-12 Kenichi Handa <handa@m17n.org>
4622 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4624 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4625 parse it XftNameParse.
4627 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4628 (all_fonts_scaned): New variable.
4629 (set_font_info): FAMILY may be Mnil.
4630 (add_font_info): Argument changed.
4631 (xft_list): Call add_font_info in it.
4632 (ft_list): Likewise.
4633 (ft_select): Make it work in the case family is Mnil.
4634 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4635 (mfont__ft_fini): Set all_fonts_scaned to 0.
4637 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4638 that is failed to open.
4640 2004-05-10 Kenichi Handa <handa@m17n.org>
4642 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4643 device's depth is 1 (i.e. monochrome).
4645 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4646 to work around the problem of libtool.
4648 * font-ft.c: Include <freetype/ftbdf.h>.
4649 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4651 (mfont__ft_init): Initialize them.
4652 (ft_iso8859_1_font_list): New variable.
4653 (set_font_info): Detect a font containing iso8859-1 glyphs and
4654 register it in ft_iso8859_1_font_list. If the font is not
4655 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4656 properties of the font from its properties.
4657 (add_font_list): If the font is not scalable, check if it is BDF
4658 or PCF font. If not, ignore it.
4659 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4660 registry is not iso8859-1.
4661 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4662 ft_iso8859_1_font_list.
4663 (ft_find_metric): If the font is not scalable, assume it as BDF
4664 or PCF, and get a metric from its properties.
4665 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4667 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4669 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4670 (libm17n_la_LDFLAGS): Delete it.
4671 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4672 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4674 2004-05-06 Kenichi Handa <handa@m17n.org>
4676 * draw.c (compose_glyph_string): Fix previous change.
4678 2004-04-30 Kenichi Handa <handa@m17n.org>
4680 * font-ft.c (ft_list): Delete unused variable `result'.
4681 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4683 2004-04-27 Kenichi Handa <handa@m17n.org>
4685 * m17n-X.c: Include config.h
4686 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4687 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4688 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4689 (FRAME_CMAP, FRAME_VISUAL): New macros.
4690 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4691 (xfont_driver): Make it static.
4692 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4693 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4694 info->xft_color_back.
4695 (MXftFontInfo) [HAVE_XFT2]: New type.
4696 (mwin__xft_close) [HAVE_XFT2]: New function.
4697 (mwin__xft_open) [HAVE_XFT2]: New function.
4698 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4699 (mwin__xft_render) [HAVE_XFT2]: New function.
4701 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4702 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4703 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4706 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4708 * font-ft.c: Don't include FT_FREETYPE_H here.
4709 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4710 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4711 (MFTInfo): New member charmap_index.
4712 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4713 (check_otf_filename): Renamed from check_filename. Return value
4715 (ft_set_property): This function deleted.
4716 (set_font_info): New function.
4717 (add_font_list): Argument changed. Add multiple fonts.
4718 (xft_list) [HAVE_XFT2]: New function.
4719 (ft_list) [not HAVE_XFT2]: New function.
4720 (ft_select): Add code for Xft.
4721 (close_ft): Likewise.
4722 (ft_open): Likewise.
4723 (ft_find_metric): Likewise.
4724 (ft_encode_char): Likewise.
4725 (ft_render): Likewise.
4727 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4729 2004-04-26 Kenichi Handa <handa@m17n.org>
4731 * textprop.c (mtext_attach_property): Declare the return type as
4734 2004-04-21 Kenichi Handa <handa@m17n.org>
4736 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4738 2004-04-09 Kenichi Handa <handa@m17n.org>
4740 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4742 (load_command): Setup above members.
4744 2004-04-05 Kenichi Handa <handa@m17n.org>
4746 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4748 2004-03-30 Kenichi Handa <handa@m17n.org>
4750 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4753 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4754 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4756 2004-03-29 Kenichi Handa <handa@m17n.org>
4758 * Version 1.0 Patch Level 2 released.
4760 2004-03-29 Kenichi Handa <handa@m17n.org>
4762 * charset.c (make_charset): Set charset->fully_loaded and
4763 charset->simple correctly. Don't try to get charset->min_char and
4764 charset->max_char for a charset of method subset and superset.
4765 Don't load a mapping file here.
4766 (mcharset__init): Set unified_max.
4767 (mcharset__load_from_database): Free a working plist.
4769 * coding.c (mcoding__fini): Free all malloced data.
4771 * input-gui.c (win_create_ic): Set control.as_image for preediting
4774 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4775 `count') to initialize the array.
4777 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4780 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4782 (mwin__create_window): Fix bug of setting a background pixel of a
4784 (mwin__adjust_window): Clear the window before drawing.
4786 * m17n-core.c (mdebug__report_object): Free array->objectes if
4788 (m17n_init_core): Don't set report_header_printed to 0 here.
4789 Fix debugging information.
4790 (m17n_fini_core): Set report_header_printed to 0 here.
4792 * m17n-core.h (mplist_deserialize): Extern it.
4794 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4796 * m17n.c (m17n_fini): Fix debugging information.
4798 * mtext.c (mtext__adjust_foramt): New function.
4800 * mtext.h (mtext__adjust_foramt): Extern it.
4802 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4804 * plist.h (mplist__deserialize): Don't extern it.
4806 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4807 elements of symbol_table to NULL. Report about created and freed
4808 symbols if MDEBUG_FINI is set.
4810 2004-03-22 Kenichi Handa <handa@m17n.org>
4812 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4814 * m17n.c (m17n_init): Fix the way of checking merror_code.
4816 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4818 2004-03-22 Kenichi Handa <handa@m17n.org>
4820 * fontset.c (realize_font_group): Adjust the font size by
4821 mfont__resize before selecting a font.
4823 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4825 2004-03-19 Kenichi Handa <handa@m17n.org>
4827 * Version 1.0 Patch Level 1 released.
4829 2004-03-19 Kenichi Handa <handa@m17n.org>
4831 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4833 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4835 2004-03-19 Kenichi Handa <handa@m17n.org>
4837 Re-apply the changes forgotten in the released version.
4839 * charset.c (mcharset__load_from_database): Call
4840 mchar_define_charset.
4842 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4843 (mconv_encode_range): Put Mcoding text property.
4845 2004-03-18 Kenichi Handa <handa@m17n.org>
4847 * draw.c (Mdepth): New variable.
4848 (visual_order): Delete unused local var `pos'.
4849 (compose_glyph_string): Fix for the case that gstring->glyphs is
4850 realloced. Stop generating glyphs at TO. Fix handling of
4852 (layout_glyphs): Get metrics of all glyphs in advance. Set
4853 lbearing and rbearing of base of composition glyph correctly.
4854 Handle left-overhang glyphs correctly.
4855 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4857 (dump_combining_code): Change the defualt off_x character to ".".
4858 (mdraw__init): Initialize Mdepth.
4860 * face.c (work_gstring): New variable
4861 (mface__init): Initialize work_gstring.
4862 (mface__fini): Free work_gstring.glyphs.
4863 (mface__realize): Don't handle videomode property here. Adjusted
4864 for the change of mfont__get_metric.
4865 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4867 * face.h (enum face_gc): Moved to m17n-X.c.
4869 * font.h (struct MFontDriver): Arguments of find_metric changed.
4870 (mfont__select): Prototype adjusted.
4871 (mfont__get_metric): Likewise.
4872 (mfont__ft_drive_otf): Likewise.
4873 (mfont__flt_run): Likewise.
4875 * font.c (mfont__select): New argument layouter. If layouter is
4876 different in the registered font, make a new copy of realized
4878 (mfont__get_metric): Argument changed. Get metrics of multiple
4880 (mfont_find): Call mfont__select with layouter as Mnil.
4882 * font-flt.c (FontLayoutContext): New member rfont.
4883 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4884 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4886 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4888 (NUM_POINTS): New macro.
4889 (MPointTable): New type.
4890 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4891 (mfont__ft_drive_otf): New argument rfont.
4893 * fontset.c (realize_font_group): Adjusted for the changed of
4895 (check_fontset_element): This function deleted.
4897 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4898 off the parent window if the preedit text is zero length.
4900 * internal-gui.h (struct MFrame): New members foreground,
4901 background, videomode, font.
4902 (struct MGlyphString): New member anti_alias.
4903 (MDrawPoint): New type.
4904 (mwin__draw_bitmap): Prototype deleted.
4905 (mwin__draw_points): Prototype added.
4907 * m17n-gui.h (MDrawControl): New member anti_alias.
4909 * m17n-gui.c (free_frame): Free frame->font.
4910 (mframe): Set the fontset of frame->face to the default fontset.
4912 * m17n-X.c (RGB_GC): New type.
4913 (enum gc_index): Renamed from enum face_gc. Member names changed.
4915 (struct MWDevice): Members foreground and background deleted. New
4916 member scratch_gc, gc_list.
4917 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4918 (free_device): Free GCs in device->gc_list.
4919 (get_rgb_gc): New function.
4920 (get_gc): Renamed and argument changed from get_color.
4921 (get_gc_for_anti_alias): New function.
4922 (xfont_find_metric): Arguments changed. Get metrics of multiple
4924 (set_region): Argument changed. Caller changed.
4925 (xfont_render): Allways set a font in gc.
4926 (x_error_handler, x_io_error_handler): Define only if
4927 X_SET_ERROR_HANDLER is defined.
4928 (mwin__open_device): Create device->scratch_gc. Set members
4929 foreground, background, and videomode of frame. Call
4930 XSetErrorHandler and XSetIOErrorHandler only if
4931 X_SET_ERROR_HANDLER is defined.
4932 (struct gc_list): Deleted.
4933 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4934 (mwin__realize_face): Adjusted for the change of the format of
4935 rface->info and the charge of set_region.
4936 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4937 (mwin__draw_box): Likewise.
4938 (mwin__draw_bitmap): This function deleted.
4939 (mwin__draw_points): New function.
4940 (mwin__verify_region): Adjusted for the change of the format of
4941 rface->info and the charge of set_region.
4942 (mwin__create_window): Inherit backgound pixel from parent.
4943 (mwin__dump_gc): Adjusted for the change of the format of
4946 2004-03-16 Kenichi Handa <handa@m17n.org>
4948 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4950 * input.c (M_key_alias): New variable.
4951 (handle_key): Try M_key_alias property of a key too.
4952 (minput__init): Initialize M_key_alias. Give that property to
4953 symbols in one_char_symbol. Fix bug of initializing
4956 * draw.c (compose_glyph_string): Don't handle
4957 ignore_formatting_char here. Include formatting characters in the
4958 range processed by a FTL.
4959 (layout_glyph_string): Handle ignore_formatting_char here.
4961 2004-03-12 Kenichi Handa <handa@m17n.org>
4963 * input-gui.c (win_create_ic): Enable bidi in status control.
4965 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4967 2004-03-09 Kenichi Handa <handa@m17n.org>
4969 * input.c (load_input_method): If title is not specified, use the
4970 input method name as title.
4972 * m17n-X.c (get_color): Make it static.
4973 (xim_create_ic, xim_destroy_ic, x_error_handler)
4974 (x_io_error_handler): Likewise.
4976 2004-03-01 Kenichi Handa <handa@m17n.org>
4978 * Version 1.0 released.
4981 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4982 National Institute of Advanced Industrial Science and Technology (AIST)
4983 Registration Number H15PRO112
4985 This file is part of the m17n library.
4987 The m17n library is free software; you can redistribute it and/or
4988 modify it under the terms of the GNU Lesser General Public License
4989 as published by the Free Software Foundation; either version 2.1 of
4990 the License, or (at your option) any later version.
4992 The m17n library is distributed in the hope that it will be useful,
4993 but WITHOUT ANY WARRANTY; without even the implied warranty of
4994 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4995 Lesser General Public License for more details.
4997 You should have received a copy of the GNU Lesser General Public
4998 License along with the m17n library; if not, write to the Free
4999 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
5000 Boston, MA 02110-1301, USA.