1 2011-10-11 Kenichi Handa <handa@m17n.org>
3 * Version 1.6.3 released.
5 2011-09-12 Kenichi Handa <handa@m17n.org>
7 * draw.c (analyse_bidi_level): Adjust a type (FriBidiParType).
9 2011-06-19 Kenichi Handa <handa@m17n.org>
11 * Makefile.am (libm17n_X_la_LIBADD): Add @FONTCONFIG_LD_FLAGS@.
13 2011-03-09 Kenichi Handa <handa@m17n.org>
15 * input.c (take_action_list): Move the handling of candidate-list
16 change to the function filter.
17 (filter): Adjusted as above.
19 2011-02-14 Kenichi Handa <handa@m17n.org>
21 * input.c (minput_list): Change the format of returning plist.
23 2011-02-14 Kenichi Handa <handa@m17n.org>
25 * m17n.h (minput_list): Extern it.
27 * input.c (MIMExternalModule): New member 'name'.
28 (load_external_module): Return value changed.
29 (unload_external_module): New function.
30 (fini_im_info): Use unload_external_module.
31 (load_im_info): Adjuted for the change of load_external_module.
32 (minput_list): New function.
34 2011-01-06 Kenichi Handa <handa@m17n.org>
36 * coding.c: Fix comment syntax for doxygen.
38 2010-12-13 Kenichi Handa <handa@m17n.org>
40 * m17n-flt.c (mflt_enable_new_feature): Document it.
42 * m17n-flt.h: Exclude extern variables from Doxygen's scope.
44 2010-12-10 Kenichi Handa <handa@m17n.org>
46 * m17n-flt.c (mflt_dump_gstring): Document it.
48 2010-11-05 Kenichi Handa <handa@m17n.org>
50 * locale.c (make_locale): Don't call setlocale. Just parse the
53 2010-10-04 Kenichi Handa <handa@m17n.org>
55 * Version 1.6.2 released.
57 2010-09-30 Kenichi Handa <handa@m17n.org>
59 * input.c (open_im): Return -1 if the input method has no state.
61 2010-09-17 Kenichi Handa <handa@m17n.org>
63 * font-ft.c (ft_check_otf): Fix previous change.
65 2010-09-16 Kenichi Handa <handa@m17n.org>
67 * m17n-flt.c (parse_otf_command): Fix previous change.
69 2010-09-14 Kenichi Handa <handa@m17n.org>
71 * font-ft.c (ft_check_otf): Fix handling of negative features.
73 * m17n-flt.c (parse_otf_command): Fix handling of negative
75 (decode_packed_otf_tag): Fix updating category code.
76 (run_command): Fix `encoded' property of separator glyph.
77 (mflt_run): Improve debug info printing.
79 2010-09-11 Kenichi Handa <handa@m17n.org>
81 * src/charset.c, src/chartab.c, src/coding.c, src/face.c,
82 src/font.c, src/fontset.c, src/input.c, src/m17n-X.c,
83 src/m17n-core.c, src/m17n-flt.c, src/m17n-gd.c, src/m17n-gui.c,
84 src/m17n.c, src/mtext.c, src/plist.c, src/symbol.c,
85 src/textprop.c: Print debug information to mdebug__output instead
88 2010-09-02 Kenichi Handa <handa@m17n.org>
90 * draw.c (visual_order): Reorder only RTL composed-sequence.
92 2010-09-01 Kenichi Handa <handa@m17n.org>
94 * draw.c (compose_glyph_string): When the script `inherited' and
95 `common' can't be resolved, use "block" property of the character.
97 2010-08-31 Kenichi Handa <handa@m17n.org>
99 * draw.c (compose_glyph_string): Allow running flt striding over
102 2010-08-19 Kenichi Handa <handa@m17n.org>
104 * m17n-X.c (MDisplayInfo): New member altgr_mask.
105 (find_modifier_bits): Set disp_info->altgr_mask.
107 * input.c (fully_initialize): Make it static.
109 * input.h (MINPUT_KEY_ALTGR_MODIFIER): New macro.
111 * input-gui.c (minput_event_to_key): Handle
112 MINPUT_KEY_ALTGR_MODIFIER.
114 2010-08-12 Kenichi Handa <handa@m17n.org>
116 * character.h (STRING_CHAR_ADVANCE_UTF8): Sanitize the code.
117 (STRING_CHAR_ADVANCE_UTF16): Likewise.
119 * font.c (mfont__init): Initialize buf to NULL.
120 (mfont__id): Likewise.
122 * font-ft.c (ft_encapsulate): Use MDEBUG_PRINT1 instead of
124 (ft_check_otf): Move the label not_otf: within #ifdef HAVE_OTF.
125 (get_otf): Move the code within #ifdef HAVE_OTF.
126 (ft_drive_otf): Move declarations of some local variables within
129 2010-08-11 Kenichi Handa <handa@m17n.org>
131 * input.h (MInputContextInfo): New member state_hook.
133 * input.c (shift_state): Just set ic_info->state_hook, instead of
134 taking state-hook actions.
135 (handle_key): Check ic_info->state_hook. If KEY is unhandled,
136 init ic_info->state_hook.
138 2010-08-09 Kenichi Handa <handa@m17n.org>
140 * m17n-flt.c (try_otf): Remove unused local vars.
142 * input.c (fully_initialize): Avoid compiler warning by casting.
144 * m17n-core.c (m17n_init_core): Fix handling of env_value.
146 * fontset.c (realize_fontset_elements): Fix typo (pl->plist).
148 * coding.c (decode_coding_iso_2022): Sanitize "if" condition.
150 2010-04-23 Kenichi Handa <handa@m17n.org>
152 * Version 1.6.1 released.
154 2010-04-23 Kenichi Handa <handa@m17n.org>
156 * m17n-flt.c (enum GlyphInfoMask): Shift upper masks 1-bit left.
157 (decode_packed_otf_tag): If a glyph has combining information,
160 2010-04-23 Kenichi Handa <handa@m17n.org>
162 * font-ft.c (ft_drive_otf): Reset 28th bit of g->g.internal for
163 storing OTF feature tag.
165 2010-04-19 Kenichi Handa <handa@m17n.org>
167 * m17n-flt.c (run_stages): Update category code of glyphs if
168 category table is changed.
170 2010-04-05 Kenichi Handa <handa@m17n.org>
172 * font-ft.c (ft_check_cap_otf): Fix conditions to call
175 * database.c (check_version): Fix previous change.
177 2010-04-02 Kenichi Handa <handa@m17n.org>
179 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 6.
180 (M17NLIB_PATCH_LEVEL): Changed to 1.
181 (M17NLIB_VERSION_NAME): 1.6.1.
183 2010-03-30 Kenichi Handa <handa@m17n.org>
185 * Version 1.6.0 released.
187 2010-03-01 Kenichi Handa <handa@m17n.org>
189 * m17n-flt.c (run_rule): Fix checking of glyph availability.
191 2010-02-18 Kenichi Handa <handa@m17n.org>
193 * m17n-gui.c (register_device_library): Preprend M17N_MODULE_DIR
194 to the module file name.
196 * input.c (load_external_module): Preprend M17N_MODULE_DIR to the
199 * charset.c (load_charset): Check the return value of fgets.
201 * Makefile.am: Build modules dynamically loaded with
202 -avoid-version and no -version-info.
204 2010-01-15 Kenichi Handa <handa@m17n.org>
206 * draw.c (run_flt): Set mflt_try_otf to rfont->driver->try_otf.
207 (mdraw__init): Set mflt_enable_new_feature to 1.
209 * font-ft.c (ft_try_otf): New function.
210 (mfont__ft_driver): Set ft_try_otf.
212 * font.h (struct MFontDriver): New member try_otf.
214 * m17n-X.c (xft_driver): Set xft_try_otf.
215 (xft_try_otf): New function.
217 * m17n-flt.h: (mflt_enable_new_feature): Extern it.
218 (mflt_try_otf): Extern it.
220 * m17n-flt.c (load_category_table): If mflt_enable_new_feature is
221 zero, return NULL for such categories that require the new
223 (parse_otf_command): If mflt_enable_new_feature is zero, return
225 (load_otf_command): Fix previous change.
226 (load_flt): Check the return value of load_category_table.
227 (try_otf): Renamed from run_otf_category. Call mflt_try_otf
228 instead of font->drive_otf.
229 (run_command): Call try_otf instead of run_otf_category.
230 (m17n_init_flt): Initialize mflt_enable_new_feature to 0,
231 mflt_try_otf to NULL.
232 (mflt_enable_new_feature): New variable.
233 (mflt_try_otf): New variable.
235 2009-12-10 Kenichi Handa <handa@m17n.org>
237 * m17n-flt.c (parse_otf_command): Handle ":otf?".
238 (run_otf_category): If not features are specified, reset category
240 (run_command): On copy, don't re-calculate a category code.
242 2009-12-03 Kenichi Handa <handa@m17n.org>
244 * m17n-flt.c (run_stages): Reset category code if category-table
246 (mflt_run): Don't set category code here.
247 (decode_packed_otf_tag): If no feature is applied, re-calculate
250 2009-12-02 Kenichi Handa <handa@m17n.org>
252 * m17n-flt.c (mflt_find): If FONT is specified but no flt is
254 (run_command): Don't set ENCODED and MEASURED of separator.
256 2009-11-30 Kenichi Handa <handa@m17n.org>
258 * m17n-flt.c (load_otf_command): Check 4th char against '?'.
259 (load_command): Likewise.
260 (decode_packed_otf_tag): New arg CTX. If CTX->in == gstring,
261 update CTX->encoded. Caller changed.
263 2009-11-30 Kenichi Handa <handa@m17n.org>
265 * font-ft.c (ft_drive_otf): Check if OUT is null or not.
266 (ft_drive_otf): Call OTF_drive_gsub_with_log and
267 OTF_drive_gpos_with_log. Record the applied feature in
270 * font.c (mfont__get_glyph_id): Encode g->c instead of g->code.
272 * internal-flt.h (MAKE_COMBINING_CODE_BY_CLASS)
273 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
274 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P):
276 (PACK_OTF_TAG): Extern it.
278 * draw.c (reorder_combining_chars): Delete it.
280 * m17n-flt.h (mflt_font_id): Use type MFLFont.
281 (mflt_iterate_otf_feature): Likewise.
283 * m17n-flt.c (enum GlyphInfoMask): New member CategoryCodeMask and
285 (GET_CATEGORY_CODE, SET_CATEGORY_CODE, GET_COMBINED): New macros.
286 (SET_COMBINING_CODE): Set also CombinedMask.
287 (FontLayoutFeatureTable): Delete it.
288 (FeatureCodeTable): New type.
289 (FontLayoutCategory): Type of feature_table changed.
290 (load_category_table): Adjusted for the change of
292 (unref_category_table): Likewise.
293 (gen_otf_tag): New member shift. Caller changed.
294 (FontLayoutContext): New member category.
295 (run_rule): Compare g->c instead of g->code.
296 (decode_packed_otf_tag): New function.
297 (run_otf): Call decode_packed_otf_tag. Don't reset combining-code
299 (run_otf_category): New function.
300 (run_command): Set category-code if necessary. Call
301 run_otf_category for FontLayoutCmdTypeOTFCategory.
302 (run_stages): Set ctx->category. Get category from glyph if
304 (mflt_dump_gstring): New function.
306 2009-11-26 Kenichi Handa <handa@m17n.org>
308 * m17n-flt.c (enum FontLayoutCmdType): New member
309 FontLayoutCmdTypeOTFCategory.
310 (FontLayoutFeatureTable): New type.
311 (FontLayoutCategory): New members feature_table_size and
313 (load_category_table): Handle feature_table.
314 (unref_category_table): Likewise.
315 (load_otf_command): Handle FontLayoutCmdTypeOTFCategory.
316 (load_command): Likewise.
317 (free_flt_command): Likewise.
319 2009-11-10 Kenichi Handa <handa@m17n.org>
321 * draw.c (run_flt): Update category code of each glyph.
323 2009-11-07 Kenichi Handa <handa@m17n.org>
325 * font-ft.c (ft_drive_otf): Don't accumulate anchor adjustments.
327 2009-11-05 Kenichi Handa <handa@m17n.org>
329 * m17n-flt.c (run_otf): Fix updating of g->lbearing, etc.
331 * font-ft.c (ft_drive_otf): Use OTF_drive_gpos2 if possible.
333 2009-10-28 Kenichi Handa <handa@m17n.org>
335 * fontset.c (mdebug_flag): New variable.
336 (mfont__lookup_fontset): Print debug info.
338 * m17n-core.c (m17n_init_core): Call SET_DEBUG_FLAG for
341 * internal.h (enum MDebugFlag): Add MDEBUG_FONTSET.
343 * language.c (mscript__from_otf_tag): Adjusted for the new format
344 of the database <standard script unicode>.
346 2009-10-22 Kenichi Handa <handa@m17n.org>
348 * database.c (check_version): Fix the check.
350 * input.c (surrounding_pos): New arg *pos.
351 (integer_value): Fix handling of "@+0".
352 (take_action_list): Adjusted for the change of surrounding_pos.
354 2009-10-05 Kenichi Handa <handa@m17n.org>
356 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
359 * m17n-flt.c (FontLayoutCategory): New typedef.
360 (FontLayoutStage): Type of the member `category' changed.
361 (struct _MFLT): Type of the member `coverage' changed. New member
362 need_config and font_id.
363 (apply_otf_feature): New function.
364 (load_category_table): New arg FONT. If FONT is non-NULL, call
365 apply_otf_feature. Setup category->definition.
366 (ref_category_table): New macro.
367 (unref_category_table): New function.
368 (load_flt): Adjusted for the type change of category.
369 (free_flt_stage): New arg FLT.
370 (list_flt): Adjusted for the type change of category.
371 (run_stages): Adjusted for the type change of category.
372 (configure_category, configure_flt): New function.
373 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
374 mflt_font_id to NULL.
375 (mflt_get): Skip the heading configured FLTs.
376 (mflt_find): Likewise. If necessary, configure the found flt.
377 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
378 Adjusted for the type change of category.
379 (mflt_iterate_otf_feature, mflt_font_id): New variable.
381 * m17n-X.c (xfont_open): Set rfont->id.
382 (xft_driver): Set xft_iterate_otf_feature.
383 (xft_open): Set rfont->id.
384 (xft_iterate_otf_feature): New function.
386 * font.h (struct MRealizedFont): New member id.
387 (struct MFontDriver): New member iterate_otf_feature.
389 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
391 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
392 (get_otf): New funcition.
393 (ft_check_otf, ft_drive_otf): Use get_otf.
394 (iterate_callback, ft_iterate_otf_feature): New functions.
395 (mfont__ft_driver): Set ft_iterate_otf_feature.
397 * draw.c: Docstring updated.
398 (font_id): New function.
399 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
402 2009-10-02 Kenichi Handa <handa@m17n.org>
404 * m17n-flt.c (load_flt): Check the return value of
407 2009-09-03 Kenichi Handa <handa@m17n.org>
409 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
410 positions are adjusted by GPOS table.
412 2009-08-13 Kenichi Handa <handa@m17n.org>
414 * Version 1.5.5 released.
416 2009-08-13 Kenichi Handa <handa@m17n.org>
418 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
419 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
421 2009-03-03 Kenichi Handa <handa@m17n.org>
423 * draw.c (compose_glyph_string): Check if category not Mnil.
425 2009-03-02 Kenichi Handa <handa@m17n.org>
427 * Version 1.5.4 released.
429 2009-02-25 Kenichi Handa <handa@m17n.org>
431 * m17n-core.c (report_object_array): For M-text and Plist, print
434 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
435 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
437 * input.c (get_candidate_list): Free unnecessary objects.
438 (take_action_list): Free plist.
440 2009-02-04 Kenichi Handa <handa@m17n.org>
442 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
444 2009-01-16 Kenichi Handa <handa@m17n.org>
446 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
449 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
452 2009-01-14 Kenichi Handa <handa@m17n.org>
454 * coding.c (decode_coding_iso_2022): Check invocation status
455 before updating charset0 and charset1.
457 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
459 2008-12-31 Kenichi Handa <handa@m17n.org>
461 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
464 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
466 * face.c (mface_get_prop): Fix strict aliasing bug.
467 (mface_put_prop): Likewise.
469 * m17n-gui.c (mframe): Fix strict aliasing bug.
471 2008-10-20 Kenichi Handa <handa@m17n.org>
473 * Version 1.5.3 released.
475 2008-10-06 Kenichi Handa <handa@m17n.org>
477 * draw.c (mdraw__init): Use TRUE only when
478 FRIBIDI_INTERFACE_VERSION is less than 3.
480 2008-10-03 Kenichi Handa <handa@m17n.org>
482 * database.c (mdatabase__find_file): Return a copy of filename if
483 it is absolute pathname.
485 2008-09-25 Kenichi Handa <handa@m17n.org>
487 * input.c (load_macros): Don't parse the action list here.
488 (load_im_info): Parse action lists of all macros.
490 2008-09-24 Kenichi Handa <handa@m17n.org>
492 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
494 2008-09-19 Kenichi Handa <handa@m17n.org>
496 * input.c (fully_initialize): Rename "@reload" to "-reload".
498 2008-09-17 Kenichi Handa <handa@m17n.org>
500 * m17n-flt.c (run_stages): Fix combining with a variable width
503 2008-08-04 Kenichi Handa <handa@m17n.org>
505 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
508 2008-07-22 Kenichi Handa <handa@m17n.org>
510 * input.c (fully_initialize): Fix previous change.
512 2008-07-19 Kenichi Handa <handa@m17n.org>
514 * input.c (fully_initialize): Fix previous change.
516 2008-07-14 Kenichi Handa <handa@m17n.org>
518 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
520 2008-07-14 Kenichi Handa <handa@m17n.org>
522 * input.c (fully_initialize): Handle C-M-1, etc.
524 2008-07-11 Kenichi Handa <handa@m17n.org>
526 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
528 2008-06-23 Kenichi Handa <handa@m17n.org>
530 * Version 1.5.2 released.
532 2008-06-23 Kenichi Handa <handa@m17n.org>
534 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
535 (M17NLIB_PATCH_LEVEL): Changed to 2.
536 (M17NLIB_VERSION_NAME): Changed "1.5.2".
538 2008-06-13 Kenichi Handa <handa@m17n.org>
540 * input.c (minput_config_file): Comment fixed for man-page.
542 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
544 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
546 2008-05-24 Kenichi Handa <handa@m17n.org>
548 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
550 2008-05-23 Kenichi Handa <handa@m17n.org>
552 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
553 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
555 (libm17n_gd_la_LIBADD): Likewise.
557 * input.c (take_action_list): Fix debug info.
559 2008-05-14 Kenichi Handa <handa@m17n.org>
561 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
562 (run_stages): Fix index of g_indices.
564 2008-04-03 Kenichi Handa <handa@m17n.org>
566 * draw.c (compose_glyph_string): Don't run flt striding over the
568 (get_gstring): Don't use the cached gstring if cursor position is
571 2008-04-02 Kenichi Handa <handa@m17n.org>
573 * input.c (integer_value): Delete the 3rd arg VALUE.
574 (resolve_expression): Adjust the call of integer_value.
575 (take_action_list): Likewise.
577 2008-03-06 Kenichi Handa <handa@m17n.org>
579 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
582 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
584 * Version 1.5.1 released.
586 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
588 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
589 HAVE_FREETYPE is defined.
591 * font.h (OTF_Tag): Be sure that it is defined in any cases.
593 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
595 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
598 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
600 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
602 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
604 * input.c (parse_action_list): Check M_candidates.
605 (get_im_info): If key is Mnil, be sure to set im_info->states to a
608 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
610 * input.c (integer_value): Fix interpretation of "@-N".
612 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
614 * input.c (get_following_char): Fix interpretation of POS.
615 (get_following_char): Fix interpretation of "@+N".
617 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
619 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
622 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
624 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
626 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
628 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
629 (run_command): Check if clustering now before calling
630 UPDATE_CLUSTER_RANGE.
632 2008-01-06 Kenichi Handa <handa@m17n.org>
634 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
636 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
638 * m17n-X.c (xft_find_metric): Set g->g.measured.
640 * m17n-flt.c (Mequal): New variable.
641 (m17n_init_flt): Initialize it.
642 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
643 into a new member facility.
644 (load_command): Modify parsing of Mfont_facility.
645 (run_rule): Adjuted for the change of FontLayoutCmdRule.
646 (run_otf): Adjusted metrics if a->back is nonzero.
648 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
650 * Version 1.5.0 released.
652 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
654 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
656 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
657 (run_rule): Check if a font has the specific glyph correctly.
659 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
660 MDEBUG_FONT_FLT to MDEBUG_FLT.
662 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
664 * font-flt.c: Delete it.
666 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
668 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
669 TO for the rule of SRC_HAS_GLYPH.
671 * draw.c (run_flt): Argument changed.
672 (compose_glyph_string): Adjusted for the above change.
674 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
676 * plist.c (read_mtext_element): Don't free the malloced buffer.
678 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
680 * m17n-core.h (merror_code): Extern it.
682 * m17n-misc.h (merror_code): Don't extern it.
684 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
686 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
688 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
690 * draw.c (compose_glyph_string): Check g->rface->layouter, not
691 g->rface->rfont->layouter.
693 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
695 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
696 (run_rule): Use ctx->encoded_offset.
697 (run_command): Likewise.
698 (run_stages): Set ctx->encoded_offset.
700 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
702 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
703 bit-size of MFLTGlyph->internal.
705 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
707 * draw.c (visual_order): Exclude the last anchor glyph from the
710 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
712 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
713 (run_stages): Likewise.
714 (load_flt): Unref top after checking plist.
716 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
718 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
720 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
722 * m17n-flt.c (Mcombining): New variable.
723 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
724 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
725 SRC_HAS_GLYPH and SRC_OTF_SPEC.
726 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
728 (load_command): Adjusted for the above changes.
729 (run_rule): Likewise.
730 (combining_code_from_class): Delete it.
731 (mflt_get): Check flt->name against Mcombining, not Mt.
733 * internal-flt.h (Mcombining): Extern it.
735 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
736 combining characters.
738 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
740 * face.c (mface__realize): Reset measured flag before calling
743 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
744 (setup_combining_coverage): New function.
745 (setup_combining_flt): New function.
746 (mflt_get): If flt is not found, return NULL. If name if Mt,
747 call setup_combining_flt.
748 (mflt_run): For debugging, print font family name.
750 * font-ft.c (ft_render): Fix handling of baseline_offset.
751 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
752 (ft_render): Check pixel_mode to determine anti_alias.
754 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
755 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
756 (xfont_render): Set baseline_offset in pixel.
757 (xft_render): Fix handling of baseline_offset.
759 * draw.c (run_flt): Set font.font.family.
760 (compose_glyph_string): Fix handling of combining characters.
762 * fontset.c (try_font_list): Check if the named flt is surely
765 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
767 * draw.c (analyse_bidi_level): New function.
768 (visual_order): Do reordering using the already decided
770 (compose_glyph_string): Decide bidi-level before calling flt.
772 * m17n-flt.c (mflt_run): Fix typo.
774 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
776 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
778 * draw.c (visual_order): Don't rely on the width of glyphs.
779 (run_flt): Fix culculation of g->g.to.
781 * m17n-flt.c (run_rule): Don't set error code here.
782 (run_cond): Likewise.
783 (run_otf): Fix culculation of xoff and yoff.
784 (run_command): Don't set error code here.
788 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
789 (xfont_find_metric): Set glyph's yadv to 0.
790 (xft_find_metric): Likewise.
792 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
793 (ft_find_metric): Adjust glyph's metrics.
794 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
795 (ft_drive_otf): Set mark glyph's xadv to 0.
797 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
800 2007-10-29 Kenichi Handa <handa@m17n.org>
802 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
803 (mflt_get): Adjusted for the argument change.
804 (mflt_name): Adjusted for the return value change.
806 * m17n-flt.c (Mgenerator, Mend): New variables.
807 (flt_min_coverage, flt_max_coverage): New variables.
810 (Mfont_has): Renamed from Mexist. Referrers chagned.
811 (gen_otf_tag): Handle the trailing whitespaces.
812 (otf_count_features, otf_store_features): Fix for negative features.
813 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
814 (load_otf_command): Likewise.
815 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
816 (load_flt): Argument changed. Caller changed.
817 (free_flt_list): New function.
818 (run_rule): Adjusted for the change of FontLayoutContext.
819 (mflt_run): Adjusted for the change of FontLayoutContext.
821 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
822 (m17n_fini_win): Call m17n_fini_flt.
824 * m17n-gui.h: Include m17n-flt.h.
826 * m17n-gd.c: Adusted for the change of MGlyph.
828 * m17n-X.c: Adusted for the change of MGlyph.
829 (xft_check_otf, xft_drive_otf): New functions.
831 * internal-gui.h (MGlyph): Modified for new FLT handling.
833 * fontset.c (try_font_list): Adusted for the change of MGlyph.
835 * font-ft.c: Adjusted for the change of MGlyph.
836 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
837 (get_glyph_metric): Deleted.
838 (ft_check_otf): New function.
839 (ft_drive_otf): New fucntion.
841 * font.c: Adjusted for the change of MGlyph.
842 (mfont__init): Don't call mfont__flt_init.
843 (mfont__fini): Don't call mfont__flt_fini.
844 (mfont__get_glyph_id, mfont__get_metrics): New functions.
846 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
847 (MFLTFontForRealized): New struct.
848 (struct MFontDriver): New members check_otf and drive_otf.
849 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
851 * face.c: Adjusted for the change of MGlyph.
853 * draw.c: Adjusted for the change of MGlyph.
855 * m17n.c (m17n_init): Don't call mchar_init.
857 * m17n-core.c (m17n_init_core): Call mchar_init.
859 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
861 * input.c: Include "m17n.h" instead of "m17n-gui.h".
863 * chartab.c (mchartable): Initialize table->min_char to -1.
864 (mchartable_min_char): New function.
865 (mchartable_max_char): New function.
867 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
868 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
870 2007-10-12 Kenichi Handa <handa@m17n.org>
872 * m17n-core.h (Mcharset): Extern it.
873 Move detabase related declarations from m17n.h.
875 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
876 (struct _MFLTOtfFeatures): New struct.
877 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
878 (struct _MFLTFont): Delete otf, add check_otf.
879 (MCHAR_INVALID_CODE): Define it.
881 * plist.c (read_mtext_element): Simplify the code.
883 * m17n.h: Move database related declarations to m17n-core.h
884 (Mharset): Don't extern it.
886 * m17n.c (m17n_init): Don't call mdatabase__init.
888 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
891 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
892 (Mexist): New variable.
893 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
894 (FontLayoutCmdRule): New member src.exist.
895 (parse_otf_command): Handle gsub_count and gpos_count separately.
896 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
897 (load_command): Handle the command "exist".
898 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
899 (run_rule): Handle the case SRC_EXIST.
900 (run_otf): Adjusted for the change of MFLTOtfSpec.
901 (run_command): Check the range of FROM.
902 (check_otf_spec): Delete it.
903 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
905 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
906 (mflt_find): Call font->check_otf instead of check_otf_spec.
907 (mflt_run): Keep the metrics in 26.6 fixed point.
909 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
910 (m17n_init_core): Call mdatabase__init.
912 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
914 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
917 * font-flt.c (Mexist): New variable.
918 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
919 (FontLayoutCmdRule): New member src.exist.
920 (load_category_table): Use isalnum, not isalpha.
921 (load_command): Check the command "exist".
922 (run_rule): Hande the case SRC_EXIST.
923 (run_command): Check the range of FROM.
924 (mfont__flt_init): Initialize Mexist.
926 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
928 * database.h (mdatabase__load_charset_func): Extern it.
930 * database.c: Include m17n-core.h instead of m17n.h.
931 (load_chartable): Use mtext__from_data.
932 (load_charset): Moved to charset.c
933 (load_database): Call mdatabase__load_charset_func instead of
935 (mdatabase__load_charset_func): New variable.
936 (mdatabase__init): Initialize mdatabase__load_charset_func and
937 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
938 (mdatabase__save): Use fwrite, not mconv_encode_stream.
939 (Mcharset): Declare it here.
941 * charset.c: Include "database.h.".
942 (load_charset): Moved from database.c.
943 (mcharset__init): Initialize mdatabase__load_charset_func, don't
946 * character.c (mchar_define_property): Call mdatabase_find directly.
947 (mchar_get_prop): Call mdatabase_add directly.
948 (mchar_put_prop): Call mdatabase_load directly.
949 (mchar_get_prop_table): Likewise.
951 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
952 (libm17n_la_SOURCES): Remove database.[ch].
953 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
955 2007-09-18 Kenichi Handa <handa@m17n.org>
957 * face.c (mface__realize): Try Freetype based font at first.
959 * font.c: Include <ctype.h>
961 2007-09-16 Kenichi Handa <handa@m17n.org>
963 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
965 (run_otf): Call font->get_metrics, not font->get_metric.
966 (run_stages): Likewise.
967 (CHECK_FLT_COVERAGE): New macro.
968 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
969 (check_otf_spec): New function.
970 (m17n_fini_flt): Unref flt->coverage.
971 (mflt_find): Argument changed.
972 (mflt_name): New function.
973 (mflt_coverage): Use CHECK_FLT_COVERAGE.
975 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
976 (mflt_find): Prototype adjusted.
977 (mflt_name): Extern it.
979 2007-09-14 Kenichi Handa <handa@m17n.org>
981 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
983 * font-flt.c (run_otf): Make debug info printing comaptible with
985 (run_command): Likewise.
986 (mfont__flt_run): Likewise.
988 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
989 invalid only when it's negative.
991 (run_command): Likewise.
992 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
994 2007-09-10 Kenichi Handa <handa@m17n.org>
996 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
997 (struct _MFLTFont): Prototype of get_glyph_id changed.
999 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
1001 (GAPPEND): Delete this macro.
1002 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
1003 for the change of MFLTGlyph. Caller changed.
1004 (run_otf): Simply calls font->get_glyph_id.
1005 (run_command): Reset g->encoded and g->measured for direct code.
1006 (positioning): Delete this function.
1007 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
1009 2007-09-07 Kenichi Handa <handa@m17n.org>
1011 * draw.c (compose_glyph_string): Improve script detection.
1013 2007-09-06 Kenichi Handa <handa@m17n.org>
1015 * m17n-flt.h (mflt_get): Extern it.
1017 * m17n-flt.c (run_stages): Call positioning only if
1018 font->get_metric is non-NULL.
1019 (CHECK_FLT_STAGES): Fix typo.
1020 (mflt_get): New function.
1022 * font-flt.c (mfont__flt_run): Improve debug info printing.
1024 2007-09-04 Kenichi Handa <handa@m17n.org>
1026 * m17n-flt.c (MFontLayoutTable): Delete this type.
1027 (struct _MFLT): New member mdb and coverage.
1028 (list_flt): Set flt->mdb.
1029 (load_generator): Argument and return value changed. Caller
1031 (get_font_layout_table): Delete this function.
1032 (run_stages): Argument changed. Caller changed.
1033 (CHECK_FLT_STAGES): New macro.
1034 (mfont__flt_encode_char): Argument changed.
1035 (mflt_find): Likewise.
1036 (mflt_coverage): New function.
1037 (mflt_run): Argument changed.
1038 (mdebug_dump_flt): Likewise.
1040 * m17n-flt.h (mflt_coverage): Extern it.
1041 (mflt_find): Prototype adjusted.
1043 2007-09-03 Kenichi Handa <handa@m17n.org>
1045 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
1047 * database.c (mdatabase__props): New function.
1049 * database.h (mdatabase__props): Extern it.
1051 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
1053 (struct _MFLTFont): Add suitable_p.
1054 (mflt_find): Extern it.
1056 * m17n-flt.c: Include "database.h".
1057 (struct _MFLT): New struct.
1058 (list_flt): New function.
1059 (load_flt): Don't update flt_list.
1060 (get_font_layout_table): Use flt_list.
1061 (m17n_init_flt): Don't initialize flt_list.
1062 (m17n_fini_flt): Adjusted for the change of flt_list.
1063 (mflt_find): New function.
1064 (mflt_run): Fix debug printing.
1066 2007-08-23 Kenichi Handa <handa@m17n.org>
1068 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
1069 (run_stages): Print separator in encoded string as "|".
1071 2007-08-23 Kenichi Handa <handa@m17n.org>
1073 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
1074 the glyph is already handled by OTF.
1076 2007-08-21 Kenichi Handa <handa@m17n.org>
1078 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
1080 2007-08-20 Kenichi Handa <handa@m17n.org>
1082 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
1085 2007-08-17 Kenichi Handa <handa@m17n.org>
1087 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
1089 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
1090 (MFLTFont): Prototype of the member drive_otf adjusted.
1092 * m17n-flt.c (run_stages): Fix handling of padding.
1094 * font-ft.c (get_glyph_metric): New function.
1095 (DEVICE_DELTA): Return 26.6 fixed point value.
1096 (adjust_anchor): Likewise.
1097 (mfont__ft_drive_otf): Use get_glyph_metric.
1099 * font-flt.c (mfont__flt_run): Pay attention to padding on
1100 printing debug info.
1102 2007-08-16 Kenichi Handa <handa@m17n.org>
1104 * m17n-flt.c (run_stages): Fix typo.
1106 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
1108 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
1109 Adjusted for the argument change of adjust_anchor. Calculte based
1110 on 26.6 fixed point.
1112 2007-08-15 Kenichi Handa <handa@m17n.org>
1114 * charset.c (mcharset__load_from_database): Set mdebug_flag
1115 instead of mdebug_mask.
1117 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
1120 * database.c (load_database): Set mdebug_flag instead of
1122 (mdatabase__load_for_keys): Likewise.
1124 * draw.c: Include "internal-flt.h".
1125 (dump_combining_code): Don't subtract 128 from combining code
1128 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
1130 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
1132 (run_cond): Likewise.
1133 (run_otf): Likewise.
1134 (run_command): Likewise.
1135 (mfont__flt_run): Change format of debug info.
1137 * font-ft.c: Include "internal-flt.h".
1138 Set mdebug_flag instead of mdebug_mask.
1139 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
1141 * input.c: Set mdebug_flag instead of mdebug_mask.
1142 (shift_state): New MDEBUG_FLAG macro.
1143 (preedit_commit): Likewise.
1146 * internal-flt.h: New file.
1148 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
1149 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
1150 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
1151 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
1152 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
1153 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
1154 these macros to internal-flt.h.
1156 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
1158 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
1159 (enum MDebugMaskBit): Delete this enum.
1160 (enum MDebugFlag): New enum.
1161 (mdebug__flag): Don't extern it.
1162 (mdebug__flags): Extern it.
1163 (MDEBUG_FLAG): New macro.
1164 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
1165 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
1166 (MDEBUG_PRINT_TIME): Likewise.
1168 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
1169 (xfont_list): Likewise.
1171 * m17n-core.c (mdebug__flag): Delete this variable.
1172 (mdebug__flags): New variable.
1173 (SET_DEBUG_FLAG): Make it a function.
1174 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
1175 (m17n_fini_core): Likewise.
1177 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
1178 (m17n_fini_win): Likewise.
1180 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
1182 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
1183 (m17n_fini): Likewise.
1185 * symbol.c (msymbol__free_table): Adjusted for the change of
1188 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
1189 (BASICHEADERS): Add m17n-flt.h.
1190 (FLT_SOURCES): New variable.
1191 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
1192 (libm17n_flt_la_LDFLAGS): Likewise.
1194 * m17n-flt.h: New file.
1196 * m17n-flt.c: New file created by modifying font-flt.c.
1198 2007-07-13 Kenichi Handa <handa@m17n.org>
1200 * Version 1.4.0 released.
1202 2007-07-12 Kenichi Handa <handa@m17n.org>
1204 * input.c: Fix doxygen @ref commands.
1206 2007-07-10 Kenichi Handa <handa@m17n.org>
1208 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
1210 2007-07-09 Kenichi Handa <handa@m17n.org>
1212 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
1214 * m17n.h: Include m17n-core.h if not yet done. Use macros
1215 M17N_BEGIN_HEADER and M17N_END_HEADER.
1217 * m17n-gui.h: Likewise.
1219 * m17n-misc.h: Likewise.
1221 2007-06-13 Kenichi Handa <handa@m17n.org>
1223 * font-flt.c (load_command): Prepend "^" in the regular expression.
1225 2007-06-11 Kenichi Handa <handa@m17n.org>
1227 * language.c (mlanguage_name_list): Fix previous change.
1229 * coding.c (mcoding__load_from_database): Add aliases in
1230 coding_definition_list.
1232 2007-06-10 Kenichi Handa <handa@m17n.org>
1234 * language.c (mlanguage_name_list): Fix previous change.
1236 2007-06-08 Kenichi Handa <handa@m17n.org>
1238 * input.c (update_candidate): Copy candidate_list earlier.
1239 (re_init_ic): Provide pseudo initialize state if none.
1241 2007-06-05 Kenichi Handa <handa@m17n.org>
1243 * input.c (preedit_insert): Print debug information.
1245 * database.c (expand_wildcard_database): New function.
1246 (mdatabase_list): Fix handling of wildcard database.
1248 * language.c (load_lang_name): New function.
1249 (mlang__fini): Cancel the last two changes.
1250 (mlanguage_name_list): New arg script and territories. Use
1253 * m17n.h (mlangauge_name_list): Adjusted.
1255 2007-06-04 Kenichi Handa <handa@m17n.org>
1257 * input.c (open_im): Check if the input method has at least one
1260 2007-06-01 Kenichi Handa <handa@m17n.org>
1262 * input.c (shift_state): Change the format of debug print.
1263 (preedit_commit): New arg need_prefix. Caller changed.
1264 (update_candidate): Copy candidate_list.
1265 (take_action_list): Likewise.
1266 (handle_key): Change the format of debug print.
1268 * font-flt.c (load_flt): Ignore unknown directives.
1270 2007-05-25 Kenichi Handa <handa@m17n.org>
1272 * m17n-core.c (mdebug__unregister_object): Small optimization.
1274 * database.c (find_file): Merged into get_database_file.
1275 (get_database_file): New arg result. Caller changed.
1276 (mdatabase__check): Fix the logic.
1278 2007-05-24 Kenichi Handa <handa@m17n.org>
1280 * database.c (find_database): If unprocessed wildcard database is
1281 found, register database filed and recursively call find_database.
1282 (free_db_info): Unref db_info->properties.
1283 (register_database): New arg properties. Delete code for
1284 initializing mdatabase__list.
1285 (register_databases_in_files): Argument changed. Caller changed.
1286 (mdatabase__update): Don't list files by glob here.
1287 (mdatabase_list): If unprocessed wildcard database is found,
1288 register database filed and recursively call mdatabase_list.
1290 * database.h (enum MDatabaseStatus): New enum
1291 MDB_STATUS_AUTO_WILDCARD.
1293 * input.c (load_branch): Fix previous change.
1294 (update_global_info): If the global database is not found, return -1.
1296 2007-05-23 Kenichi Handa <handa@m17n.org>
1298 * database.c (Mversion): New variable.
1299 (mdatabase__init): Initialize it.
1300 (register_database): New arg properties. Caller changed.
1301 (register_databases_in_files): Don't check version here.
1302 (mdatabase__update): Likewise.
1304 * database.h (MDatabaseInfo): New member properties.
1306 2007-05-21 Kenichi Handa <handa@m17n.org>
1308 * language.c: Include <ctype.h>
1309 (mlanguage__info): Use strncasecmp (not memcmp).
1310 (mlanguage_name): Downcase language name for backward
1313 * input.c (filter): Don't check Mlanguage property of
1316 2007-05-18 Kenichi Handa <handa@m17n.org>
1318 * language.c (mlanguage_name): Fix it to handle M-text English
1321 * input.c (config_command): Set NAME before using it.
1322 (load_branch): Try to resolve a map name by variables.
1324 2007-05-17 Kenichi Handa <handa@m17n.org>
1326 * language.c (mlang__fini): Fix previous change.
1328 2007-05-16 Kenichi Handa <handa@m17n.org>
1330 * plist.c (free_plist): Cancel the last change.
1331 (write_element): Check if PLIST is nested.
1332 (mplist__from_plist): Label a plist as nested if appropriate.
1333 (mplist__from_alist): Label a plist as nested.
1334 (mplist__conc): Check the value of PL before referring it. Label
1335 a plist as nested if appropriate.
1336 (mplist_copy): Label a plist as nested if appropriate.
1337 (mplist_put_func): Return Mnil if KEY is a managing key.
1338 (mplist_push): Label a plist as nested if appropriate.
1340 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
1343 * language.c (mlang__fini): Unref each element of langname_list.
1345 2007-05-14 Kenichi Handa <handa@m17n.org>
1347 * language.c: Include <string.h> and <locale.h>.
1348 (langname_list): New variable.
1349 (load_lang_script_list): Exclude invalid list elements.
1350 (mlang__init): Initialize langname_list.
1351 (mlang__fini): Unref langname_list.
1352 (mlanguage__info): Adjusted for the change of English
1353 name (symbol->M-text).
1354 (mlanguage_name): Label it as obsolete.
1355 (mlanguage_name_list): New function.
1357 * m17n.h (mlanguage_name_list): Extern it.
1359 * locale.c (make_locale): Fix setting of members of locale.
1361 * plist.c (free_plist): Unref also nested plist.
1363 2007-05-11 Kenichi Handa <handa@m17n.org>
1365 * coding.c (mconv_reset_converter): Set internal->used to 0.
1367 2007-05-08 Kenichi Handa <handa@m17n.org>
1369 * input.c (check_description): Force copying the translated text.
1371 2007-05-02 Kenichi Handa <handa@m17n.org>
1373 * input.c (minput_save_config): Unref unnecessary plist. Use
1374 free_im_list to free im_config_list.
1376 2007-04-20 Kenichi Handa <handa@m17n.org>
1378 * input.c (config_command): Fix previous change again.
1379 (config_variable): Likewise.
1380 (minput_config_command): Fix for the case of setting back to
1382 (minput_config_variable): Likewise.
1383 (minput_save_config): Include nil as documentation of customized
1386 2007-04-05 Kenichi Handa <handa@m17n.org>
1388 * input.c (config_command): Fix previous change.
1389 (config_variable): Likewise.
1391 * plist.c (mplist_get_func): Fix for backward compatiblity.
1393 2007-04-04 Kenichi Handa <handa@m17n.org>
1395 * input.c (minput_get_command, minput_config_command): Fix example
1398 2007-03-29 Kenichi Handa <handa@m17n.org>
1400 These changes are to avoid unsafe casting of a function pointer.
1402 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1403 (struct MFace): New member hook.
1405 * face.c (serialize_face): Adjusted for the change of MFace.
1406 (deserialize_face): Likewise.
1407 (mface__init): Likewise. Use msymbol_put_func.
1408 (mface__realize): Adjusted for the change of MFace. Avoid
1410 (mface_get_prop): Adjusted for the change of MFace.
1411 (mface_put_prop): Likewise.
1412 (mface_get_hook): New function.
1413 (mface_put_hook): New function.
1414 (mface_update): Adjusted for the change of MFace.
1416 * input-gui.c (win_callback): Use mplsit_get_func.
1417 (minput__win_init): Use mplsit_put_func.
1419 * input.c (take_action_list): Use mplist_get_func.
1420 (init_ic_info): Likewise.
1421 (fini_ic_info): Likewise.
1422 (minput_callback): Likewise.
1423 (minput__init): Use mplist_put_func.
1425 * language.c (mlang__init): Use msymbol_put_func.
1427 * m17n-core.h (M17NFunc): New function type.
1428 (M17N_FUNC): New macro.
1429 (msymbol_put_func, msymbol_get_func): Extern them.
1430 (mplist_put_func, mplist_get_func): Extern them.
1432 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1434 * m17n-gui.c (mframe): Add a proper casting.
1436 * plist.h (struct MPlist): Make the member val a union.
1437 (MPLIST_VAL): Adjusted for the above change.
1438 (MPLIST_FUNC): New macro.
1439 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1441 * plist.c (mplist_put_func, mplist_get_func): New functions.
1443 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1444 (msymbol_put_func, msymbol_get_func): New functions.
1446 * textprop.c (mtext_serialize): Use msymbol_get_func.
1447 (mtext_deserialize): Likewise.
1449 2007-03-28 Kenichi Handa <handa@m17n.org>
1451 * input.c (get_candidate_list): Avoid unnecessary unref.
1453 2007-03-23 Kenichi Handa <handa@m17n.org>
1455 * database.c (mdatabase__update): Unref plist at the tail.
1457 2007-03-21 Kenichi Handa <handa@m17n.org>
1459 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1461 (config_command): Fix for the case that configuration is
1463 (config_variable): Likewise.
1464 (minput_config_command): If keyseqlist is an empty list, cancel
1466 (minput_config_variable) If value is an empty list, cancel the
1468 (minput_save_config): Handle cancellation of config and customize
1471 2007-03-15 Kenichi Handa <handa@m17n.org>
1473 * input.c (minput_config_variable): Check custom->vars (not
1476 2007-03-01 Kenichi Handa <handa@m17n.org>
1478 * input.c (reload_im_info): Setup cmds, vars, and title of
1480 (check_variable_value): Fix the return value.
1482 * database.c (mdatabase__check): If necessary, update database and
1485 2007-02-28 Kenichi Handa <handa@m17n.org>
1487 * database.c (get_dir_info): Set dir_info->status to
1488 MDB_STATUS_OUTDATED.
1489 (check_version): New function.
1490 (register_database): Don't call find_database.
1491 (register_databases_in_files): Don't register a database of
1493 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1495 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1496 and MDB_STATUS_OUTDATED.
1498 * font.h (struct MFont): Types of members type, source, and
1499 spacing changed to unsigned.
1501 * internal-gui.h (struct): Types of members category and type
1502 changed to unsigned.
1504 * internal.h (struct MText): Types of members format and coverage
1505 changed to unsigned.
1507 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1508 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1510 2007-02-23 Kenichi Handa <handa@m17n.org>
1512 * input.c (Mpop): New variable.
1513 (fully_initialize): Initialize Mpop.
1514 (parse_action_list): Handle Mpop.
1515 (take_action_list): Likewise.
1516 (handle_key): When a key is unhandled, shift to the initial state
1517 only if the current state has no branch action.
1519 2007-02-12 Kenichi Handa <handa@m17n.org>
1521 * input.c (get_preceding_char): Unref mt if necessary.
1522 (get_following_char): Likewise.
1523 (parse_action_list): Fix handling of `insert' action as
1525 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1526 (take_action_list): Check invalid candidate list.
1528 2007-02-06 Kenichi Handa <handa@m17n.org>
1530 * input.c (integer_value): Check also ic->produced for @-N.
1532 2007-01-26 Kenichi Handa <handa@m17n.org>
1534 * database.c (mdatabase__update): Check mdatabase__dir_list from
1537 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1539 2007-01-12 Kenichi Handa <handa@m17n.org>
1541 * input.c (handle_key): Handle a branch action of the initial
1544 2007-01-10 Kenichi Handa <handa@m17n.org>
1546 * m17n-gd.c (gd_render): Delete superfluous line.
1548 2006-12-26 Kenichi Handa <handa@m17n.org>
1550 * m17n.h (minput_callback): Extern it.
1552 * input.h (minput__callback): Delte extern.
1554 * input.c (get_surrounding_text): Adjusted for the change of
1555 minput__callback to minput_callback.
1556 (delete_surrounding_text): Likewise.
1557 (minput_create_ic): Likewise.
1558 (minput_destroy_ic): Likewise.
1559 (minput_filter): Likewise.
1560 (minput_set_spot): Likewise.
1561 (minput_toggle): Likewise.
1562 (minput_reset_ic): Likewise.
1564 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1565 and ic->candidate_to to 0.
1566 (minput_callback): Renamed from minput__callback.
1568 * input-gui.c (win_callback): Adjusted for the change of
1569 minput__callback to minput_callback.
1571 2006-12-15 Kenichi Handa <handa@m17n.org>
1573 * font-ft.c (ft_add_font): Fix typo.
1575 2006-12-06 Kenichi Handa <handa@m17n.org>
1577 * Version 1.3.4 released.
1579 2006-11-16 Kenichi Handa <handa@m17n.org>
1581 * input.c (parse_action_list): Allow (undo 0).
1582 (adjust_markers): New function.
1583 (preedit_insert, preedit_delete): Call adjust_markers.
1584 (preedit_replace): New function.
1585 (update_candidate): Call preedit_replace instead of preedit_insert
1587 (filter): When ic_info->commit_key_head is nonzero, shift input
1588 event keys even if there's no committed text.
1590 2006-11-10 Kenichi Handa <handa@m17n.org>
1592 * input.h (MInputContextInfo): New member commit_key_head.
1594 * input.c (preedit_commit): Update ic_info->commit_key_head.
1595 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1596 (filter): When committed, shift keys by ic_info->commit_key_head.
1598 2006-10-30 Kenichi Handa <handa@m17n.org>
1600 * input.c (preedit_delete): Fix typo.
1601 (take_action_list): Print more debugging information. Allow
1602 variable in arg of 'select' and `pushback'.
1604 * database.c (gen_database_name): Don't put extra space.
1605 (load_database): Print debugging information.
1606 (register_databases_in_files): New arg headlen. Callers changed.
1607 (mdatabase__load_for_keys): Shorten debugging information.
1608 (mdatabase_load): Don't print debugging information here.
1610 2006-10-27 Kenichi Handa <handa@m17n.org>
1612 * input.c (marker_code): New arg surrounding. Callers changed.
1613 (surrounding_pos): Check if name[0] == '@'.
1614 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1615 (take_action_list): Likewise.
1616 (get_preceding_char): If POS is zero, always call
1617 get_surrounding_text.
1619 2006-10-19 Kenichi Handa <handa@m17n.org>
1621 * input.c (load_variables): Fix setting of `global'.
1623 2006-10-16 Kenichi Handa <handa@m17n.org>
1625 * draw.c (draw_background): Be sure to set *to_x.
1626 (render_glyph_string): If from == to, just return.
1628 2006-10-18 Kenichi Handa <handa@m17n.org>
1630 * database.c (get_dir_info): Return NULL if the directory name is
1632 (register_databases_in_files): Call register_database with
1634 (mdatabase__update): Fix logic. Call register_database with
1636 (mdatabase_define): Call register_database with
1637 MDB_STATUS_EXPLICIT.
1639 * input.c (delete_surrounding_text): Be sure to set members
1640 preceding_text and following_text to NULL.
1641 (shift_state): Save variable values in ic_info->vars_saved.
1642 (preedit_commit): Don't print debug information here. Don't
1643 change ic_info->keys here.
1644 (get_candidate_list): Don't ref plist.
1645 (take_action_list): Don't unref return value of
1646 get_candidate_list. For undo, reset ic->produced and recover
1647 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1649 (init_ic_info): Set ic_info->vars_saved.
1650 (fini_ic_info): Unref ic_info->vars_saved.
1651 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1653 (filter): Be sure to set members preceding_text and following_text
1654 to NULL. Print debug information about produced text. Delete
1655 processed keys from ic_info->keys.
1657 * input.h (MInputContextInfo): New member vars_saved.
1659 2006-10-16 Kenichi Handa <handa@m17n.org>
1661 * database.c (mdatabase__update): Fix the way to get db_info.
1663 2006-10-02 Kenichi Handa <handa@m17n.org>
1665 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1666 `size' changed to 24.
1668 * font.c (xlfd_unparse_name): Adjusted for the change of
1670 (font_score): Likewise.
1671 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1673 * m17n-X.c (MFontX, _MFontX): Deleted.
1674 (SET_SIZE, HAVE_SIZE): Deleted.
1675 (free_display_info): Adjusted for the change of
1676 disp_info->font_list format.
1677 (xfont_registry_list): Likewise.
1678 (xfont_open): Likewise.
1679 (xfont_list): Likewise.
1680 (xfont_encode_char): Ignore size to find a realized font.
1681 (MRealizedFontXft): Change the order of members to make it
1682 compatible with MRealizedFontFT.
1684 2006-09-27 Kenichi Handa <handa@m17n.org>
1686 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1687 (mfont_close): Add comments.
1689 * mtext-lbrk.c (mtext_line_break): Add comment.
1691 2006-09-26 Kenichi Handa <handa@m17n.org>
1693 * input.c (minput_get_description): Handle description about
1694 inclusion-only input methods.
1696 2006-09-21 Kenichi Handa <handa@m17n.org>
1698 * input.c (M_gettext): New variable.
1699 (fully_initialize): Initialize M_gettext.
1700 (check_description): New function.
1701 (load_commands): Call check_description.
1702 (config_all_commands): Be sure to unref pl.
1703 (load_variables): Call check_description.
1704 (config_all_variables): Be sure to unref pl.
1705 (load_im_info): Call check_description.
1707 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1709 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1710 and bind_textdomain_codeset.
1712 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1714 2006-09-15 Kenichi Handa <handa@m17n.org>
1716 * input.c (reload_im_info): Update custom and global info.
1717 (init_ic_info): Fix previous change.
1719 2006-09-14 Kenichi Handa <handa@m17n.org>
1721 * database.c: Include <libgen.h>.
1722 (mdatabase__lock): Make a directory if necessary.
1724 * input.c (resolve_command): Adjusted for the format change of
1725 configured_cmds member.
1726 (load_commands, load_variables): Fix for errornous data handling.
1727 (config_command, config_variable): New function.
1728 (config_all_commands, config_all_variables): Renamed from
1729 config_commands and config_variables. Utilize the above function.
1730 (check_variable_value): Argument changed. Callers changed.
1731 (load_im_info): Call config_all_commands and config_all_variables.
1732 (init_ic_info): Adjusted for the format change of configured_vars
1734 (minput__init): Initialize Mcustomized, Mconfigured, and
1736 (Mcustomized, Mconfigured, Minherited): New variables.
1737 (minput_get_command): Be sure to return NULL if an input method
1738 use no local command.
1739 (minput_get_variable): Be sure to return NULL if an input method
1740 use no local variable.
1741 (minput_config_command, minput_config_variable)
1742 (minput_save_config): Adjusted for the format change of
1743 configured_cmds and configured_vars members.
1745 * plist.c (write_element): Delete superfluous ':'.
1747 2006-09-13 Kenichi Handa <handa@m17n.org>
1749 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1750 (minput_config_file): Extern it.
1752 * draw.c (Minherited): Declaration moved to input.c.
1753 (mdraw__init): Don't initialize Minherited here.
1755 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1757 2006-09-07 Kenichi Handa <handa@m17n.org>
1759 * textprop.c (mtext_serialize): Call mplist__serialize with the
1762 * plist.h (mplist__serialize): Prototype adjusted.
1763 (mplist__assq): Extern it.
1765 * plist.c: Include <ctype.h>
1766 (PUTC, PUTS): New macros.
1767 (write_symbol): New function.
1768 (write_element): New arg indent.
1769 (dump_string, dump_plist_element): Delete them.
1770 (mplist__from_string): New arg pretty.
1771 (mplist__assq): New function.
1772 (mdebug_dump_plist): Use write_element.
1774 * mtext.c (mtext_cat_char): Allocate more memory.
1775 (mdebug_dump_mtext): Don't escal a newline character.
1777 * m17n.h (minput_get_command, minput_get_variable)
1778 (minput_config_command, minput_config_variable)
1779 (minput_save_config): Extern them.
1781 * m17n-core.c: Include <string.h>.
1782 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1783 use the stream stdout instead of a file of that name.
1785 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1788 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1789 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1790 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1791 (MDEBUG_DUMP): Flush the stream.
1793 * input.h (struct _MInputMethodInfo): Delete member im. New
1794 members mdb, language, name, extra, cmds, configured_cmds,
1795 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1796 (MInputContextInfo): New member tick.
1798 * input.c: Big change to improve user-side input method
1799 customization. Here, list just public API changes.
1800 (minput_get_commands, minput_get_variables)
1801 (minput_assign_command_keys, minput_set_variable): Label them
1803 (minput_get_command, minput_get_variable)
1804 (minput_config_command, minput_config_variable)
1805 (minput_save_config): New functions.
1807 * database.h (PATH_MAX): Define it if not yet defined.
1808 (PATH_SEPARATOR): Likewise.
1809 (enum MDatabaseStatus): New enum.
1810 (struct MDatabaseInfo): Moved from database.c. New members status,
1811 time, lock_file, and uniq_file.
1812 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1813 (mdatabase__unlock): Extern them.
1815 * database.c: Include <time.h>.
1816 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1817 (GEN_PATH): Args changed. Callers changed.
1818 (struct MDatabaseInfo): Moved to database.h.
1819 (struct MDatabase, mdb_list): Deleted.
1820 (mdatabase__list): New var.
1821 (get_database_filename): Deleted. Callers changed to use
1823 (find_file, get_database_file): New files.
1824 (get_dir_info): Initialize new members of MDatabaseInfo.
1825 (find_database): Arg chagnded. Callers changed.
1826 (free_db_info, register_database, register_databases_in_files):
1828 (update_database_list): Deleted.
1829 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1830 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1831 (mdatabase__update): New function.
1832 (mdatabase__check): Return value changed.
1833 (mdatabase__file, mdatabase__lock, mdatabase__save)
1834 (mdatabase__unlock): New functions.
1836 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1838 * input.c (get_surrounding_text): Return -2 when surrounding text
1840 (get_following_char): Likewise.
1841 (get_preceding_char): Likewise.
1842 (minput__callback): Return 0 if there is a callback function,
1845 2006-08-17 Kenichi Handa <handa@m17n.org>
1847 * input.c (reset_ic): Use shift_state to setup the current state.
1849 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1851 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1852 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1853 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1855 2006-08-02 Kenichi Handa <handa@m17n.org>
1857 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1859 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1861 * font-ft.c (ft_encapsulate): Add code for debugging.
1862 (mfont__ft_drive_otf): Be sure to encode character before getting
1865 2006-07-21 Kenichi Handa <handa@m17n.org>
1867 * draw.c (mdraw_text_extents): Fix previous typo.
1869 2006-07-19 Kenichi Handa <handa@m17n.org>
1871 * draw.c (gstring_width): New arg lbearing.
1872 (render_glyph_string): Adjusted for the change of gstring_width.
1873 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1875 * m17n-core.h (Mlanguage): Extern it.
1877 * m17n.h (Mlanguage): Extern deleted.
1879 * mtext.c (mtext__init): Initialize Mlanguage.
1880 (Mlanguage): Declaration moved from locale.c
1882 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1883 (Mlanguage): Declaration moved to mtext.c.
1885 * language.c (mlang__init): Don't initialize Mlanguage here.
1887 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1889 2006-07-14 Kenichi Handa <handa@m17n.org>
1891 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1892 (MRealizedFontFT): New member face_encapsulated.
1893 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1894 (ft_gen_font): New function.
1895 (ft_add_font): Use ft_gen_font.
1896 (ft_list_script): Store lists in ft_script_list.
1897 (ft_check_otf): New arg ft_face. Caller changed.
1898 (ft_check_language): Likewise.
1899 (ft_check_script): Likewise.
1900 (ft_encapsulate, ft_close): New functions.
1901 (mfont__ft_driver): Initialize members encapsulate and close.
1902 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1904 * font.h (struct MRealizedFont): New member encapsulating.
1905 (struct MFontDriver): New members encapsulate and close.
1907 * font.c (mfont__match_p): If FONT is realized, check capability
1908 by font drivers's check_capability method.
1909 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1912 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1913 declarations of foundry and fam local vars.
1914 (xft_driver): Make it static.
1916 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1917 (mfont_close): Extern them.
1919 * m17n-gd.c (device_open): Don't specify foundry and family of the
1922 2006-07-11 Kenichi Handa <handa@m17n.org>
1924 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1926 2006-07-13 Kenichi Handa <handa@m17n.org>
1928 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1930 (ft_check_script): Delete unused var.
1931 (ft_list_capability): Likewise.
1933 * font.c (mfont__get_capability): Setup cap->otf.
1934 (Motf): Make it global.
1935 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1937 * font.h (MFontCapability): New member otf.
1939 * language.c (mlang__fini): Delete unused vars.
1941 * m17n-gui.h (Motf): Extern it.
1943 * database.c (update_database_list): Delete unused vars.
1945 2006-07-07 Kenichi Handa <handa@m17n.org>
1947 * font-ft.c (DEVICE_DELTA): Fix typo.
1949 2006-07-06 Kenichi Handa <handa@m17n.org>
1951 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1954 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1956 * database.c: Update comments.
1958 2006-07-05 Kenichi Handa <handa@m17n.org>
1960 * database.c (PATH_MAX): Define it if not yet defined.
1961 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1963 (get_database_filename): Use GEN_PATH.
1964 (get_dir_info): Don't include the last '/' in directory name.
1965 (register_database): New function.
1966 (update_database_list): Use register_database. Search all
1967 directories in mdatabase__dir_list for wildcard databases.
1968 (mdatabase__init): Check "~/.m17n.d".
1970 2006-07-03 Kenichi Handa <handa@m17n.org>
1972 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1973 push reverse property.
1975 * plist.c (dump_plist_element): Fix previous change.
1977 2006-06-28 Kenichi Handa <handa@m17n.org>
1979 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1982 * draw.c (MbidiNSM): New variable.
1983 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1984 attention to bidi type NSM.
1985 (mdraw__init): Initialize MbibiNSM.
1987 * language.c (mscript__char_list): Fix finding a char-list element.
1989 * plist.c (dump_string): Return number of printed characters.
1990 (dump_plist_element): Print elements more compactly.
1992 2006-06-23 Kenichi Handa <handa@m17n.org>
1994 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1995 (include_HEADERS): Likewise.
1997 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1999 * language.c: Update documentation.
2001 2006-06-23 Kenichi Handa <handa@m17n.org>
2003 * font-ft.c (struct MFontFT): Delete member lang.
2004 (free_ft_info): Don't unref member lang. Destroy members langset
2006 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
2007 changed. Set members langset and charset.
2008 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
2010 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
2012 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
2013 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
2014 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
2015 characters at first. If it fails, try listing by language names.
2016 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
2017 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
2018 change of MFontCapability.
2019 (ft_list_capability): Likewise. Try listing by languages, then by
2020 scripts. Check OTF at last.
2021 (ft_check_script): New function.
2022 (ft_select): Adjusted for the check of MFontCapability.
2023 (ft_list_family_names): New function.
2024 (ft_check_capability): If cap->script is not Mnil, call
2026 (mfont__ft_driver): Initialize with ft_list_family_names.
2028 * font.h (struct MFontDriver): New member list_fmaily_names.
2029 (struct): Change member "MSymbol *lang" to "MSymbol language".
2031 * font.c: Include "language.h".
2032 (Motf): New variable.
2033 (otf_script_list, load_otf_script_list): Delete it.
2034 (find_script_from_otf_tag): Delete it.
2035 (merge_capability): New function.
2036 (mfont__init): Init Motf.
2037 (mfont__fini): Don't unref otf_script_list.
2038 (free_font_capability): Check cap->script_tag to determine if
2039 OTF-related capability is set.
2040 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
2041 the change of type MFontCapability.
2042 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
2043 and Motf properties.
2044 (mfont_list): Call merge_capability for LANGUAGE arg.
2045 (mfont_list_family_names): New function.
2047 * input-gui.c: Typo in comments fixed.
2049 * input.c: Typo in comments fixed.
2051 * language.h (mlanguage__list): Delete it.
2052 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
2055 * language.c: Include "mtext.h".
2056 (M_script_lang_list): Delete it.
2057 (language_list, script_list): New variables.
2058 (load_lang_script_list, init_language_list, init_script_list): New
2060 (mlang__init): Don't load language database here.
2061 (mlang__fini): Unref language_list and script_list if not NULL.
2062 (mlanguage__list): Delete it.
2063 (mlanguage__info, mscript__info, mscript__char_list)
2064 (mscript__otf_tag, mscript__from_otf_tag): New functions.
2065 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
2066 (mscript_list, mscript_language_list): New functions.
2068 * m17n-gui.h (mfont_list_family_names): Extern it.
2070 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
2071 (mlanguage_text, mscript_list, mscript_language_list): Extern
2074 2006-06-21 Kenichi Handa <handa@m17n.org>
2076 * m17n-X.c (xfont_driver): Initialize with
2077 xfont_list_family_names.
2078 (xfont_list_family_names): New function.
2079 (xft_driver): Initialize with NULL for list_family_names member.
2080 (device_init): Set list_family_names member of xft_driver to that
2081 of mfont__ft_driver.
2083 2006-06-06 Kenichi Handa <handa@m17n.org>
2085 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
2087 2006-03-24 Kenichi Handa <handa@m17n.org>
2089 * font-ft.c (ft_open): Improve debug message.
2091 * fontset.c (mfontset__get_font): Fix for the case that no font in
2092 per_script list is available.
2094 2006-02-06 Kenichi Handa <handa@m17n.org>
2096 * Version 1.3.3 released.
2098 2006-02-22 Kenichi Handa <handa@m17n.org>
2100 * textprop.c: Fix some typos in documentation.
2102 * plist.c: Fix some typos in documentation.
2104 * m17n-core.h: Fix some typos in documentation.
2105 (M17NLIB_PATCH_LEVEL): Updated to 3.
2106 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
2108 * symbol.c: Fix some typos in documentation.
2110 * mtext.c: Fix some typos in documentation.
2112 * input.c: Fix several typos in documentation.
2114 2006-02-06 Kenichi Handa <handa@m17n.org>
2116 * Version 1.3.2 released.
2118 2006-02-03 Kenichi Handa <handa@m17n.org>
2120 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
2121 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
2123 * font.c (xlfd_parse_name): Fix handling of the name "nil".
2125 * draw.c (layout_glyphs): Fix handling left_padding of
2128 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
2130 2006-02-02 Kenichi Handa <handa@m17n.org>
2132 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
2133 if WITH_GUI is true.
2135 2006-01-25 Kenichi Handa <handa@m17n.org>
2137 * input.c (resolve_expression): If the value of PLIST is a plist,
2138 but the first element is not symbol, return 0.
2140 2006-01-17 Kenichi Handa <handa@m17n.org>
2142 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
2143 HAVE_GD is 2 or the greater.
2145 2006-01-16 Kenichi Handa <handa@m17n.org>
2147 * Version 1.3.1 released.
2149 2006-01-16 Kenichi Handa <handa@m17n.org>
2151 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
2152 simulating anti-aliasing.
2154 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
2155 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
2157 2006-01-12 Kenichi Handa <handa@m17n.org>
2159 * input.c (get_surrounding_text): Always pop ic->plist.
2160 (reset_ic): Don't reset ic->plist.
2162 2006-01-10 Kenichi Handa <handa@m17n.org>
2164 * input.c (preedit_commit): For debugging, print only commiting
2165 charactes. Don't set ic->candidate_show to 0.
2166 (handle_key): Don't run branch-actions just by shifting to the
2168 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
2169 Reset vars and plist.
2171 2006-01-07 Kenichi Handa <handa@m17n.org>
2173 * input.c (load_branch): Confirm that maps is not NULL.
2175 2006-01-05 Kenichi Handa <handa@m17n.org>
2177 * input-gui.c (win_filter): Try to convert arg to key only when
2180 * plist.c (read_integer_element): If '#' and '-' are followed by
2181 non-integer-constituent, read them as a part of a symbol.
2182 (read_symbol_element): New arg C.
2183 (read_element): Adjust args to read_symbol_element.
2185 * input.c (load_macros): On overwriting a macro, free the old
2187 (minput__init): Store Mmap in load_im_info_keys.
2188 (minput_get_title_icon): If the input method has no title, be sure
2190 (minput_get_description): If the input method has no description,
2191 be sure to return NULL.
2192 (minput_get_variables): Fix documentation.
2193 (handle_key): Pay attention to the case that key is Mnil.
2194 (filter): Likewise. Fix handling of such symbol as S-A.
2196 2005-12-22 Kenichi Handa <handa@m17n.org>
2198 * Version 1.3.0 released.
2200 2005-12-22 Kenichi Handa <handa@m17n.org>
2202 * font-ft.c (ft_list): If the specified font has no property,
2205 2005-12-20 Kenichi Handa <handa@m17n.org>
2207 * character.c (mchar_get_prop): Check char_prop_list.
2208 (mchar_put_prop, mchar_get_prop_table): Likewise.
2210 2005-12-18 Kenichi Handa <handa@m17n.org>
2212 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
2213 file name sans language.
2215 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
2217 * input.c: Fix typo in comments.
2219 2005-12-14 Kenichi Handa <handa@m17n.org>
2221 * input.c (minput_get_title_icon): Check the default icon for the
2224 2005-12-13 Kenichi Handa <handa@m17n.org>
2226 * input.c (Mless_equal, Mgreater_equal): New variables.
2227 (parse_expression, resolve_expression, parse_action_list)
2228 (take_action_list): Handle the aboves.
2229 (filter): Treat key S-X as X.
2230 (minput__init): Initialize Mless_equal and Mgreater_equal.
2231 (minput_get_title_icon): New function.
2233 * m17n.h (minput_get_title_icon): Extern it.
2235 * database.c (get_database_filename): Return a filename instead of
2237 (load_database): Adjusted for the above change.
2238 (mdatabase__load_for_keys): Likewise.
2239 (mdatabase__find_file): New function.
2241 * database.h (mdatabase__find_file): Extern it.
2243 * font.h (mfont__resize): Delete extern.
2245 * font.c (mfont__list): Check resize ratio.
2246 (mfont__resize): Delete it.
2247 (mfont_resize_ratio): Include the code of mfont__resize.
2249 * font-ft.c (ft_open): Check resize ratio.
2251 * m17n-X.c (xfont_open): Check resize ratio.
2252 (xft_open): Likewise.
2254 2005-12-07 Kenichi Handa <handa@m17n.org>
2256 * input.c (take_action_list): If take_action_list return -1,
2258 (handle_key): Likewise.
2260 * face.c (mface__for_chars): When font is specified and layouter
2261 is found for it, if the layouter doesn't support one of a
2262 character, use a face sans layouter for it.
2264 2005-12-06 Kenichi Handa <handa@m17n.org>
2266 * fontset.c (mfont__lookup_fontset): If only a fallback font is
2267 found, don't use it for more than one character.
2269 2005-12-05 Kenichi Handa <handa@m17n.org>
2271 * face.c (mface__realize): Set rfont->layouter to Mnil.
2272 (mface__for_chars): Fix handling of layouter.
2274 * character.h (mchar__define_prop): Extern it.
2276 * database.c (update_database_list): Call mchar__define_prop if
2279 * character.c (mchar__init): Don't call mchar_define_property.
2280 Instead just initialize property keys.
2281 (mchar__fini): Free char_prop_list only if it's not NULL.
2282 (mchar__define_prop): New function.
2283 (mchar_define_property): Call mchar__define_prop.
2285 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
2288 2005-12-02 Kenichi Handa <handa@m17n.org>
2290 * language.c (mlang__init): Handle extra chars.
2292 * m17n-gui.h (mfont_check): Adjust prototype.
2294 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
2295 (xfont_check_capability): New function.
2296 (xft_driver): Specify xft_check_capability.
2297 (xft_check_capability): New function.
2299 * font-ft.c (M0_3): Delete it.
2301 (ft_get_charmaps): Refer to M0.
2302 (fc_parse_pattern): Fix previous change.
2303 (ft_list_language): Check also extra chars.
2304 (ft_check_otf): Define it even if HAVE_OTF is undef.
2305 (ft_check_lang): Check the result of FcLangSetHasLang against
2306 FcLangDifferentLang. Check also extra chars.
2307 (ft_list_capability): Delete ifdef HAVE_OTF.
2308 (ft_select): Likewise.
2309 (ft_open): Improve debug information.
2310 (ft_check_capability): New function.
2311 (mfont__ft_driver): Specify ft_check_capability.
2312 (mfont__ft_init): Initialize M0.
2314 * fontset.c (get_font_from_group): New function.
2315 (mfontset__get_font): New function.
2317 * fontset.h (mfontset__get_font): Extern it.
2319 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
2320 (mfont__fini): Delete ifdef HAVE_OTF.
2321 (free_font_capability): Likewise.
2322 (mfont__get_capability): Likewise.
2323 (mfont__check_capability): New function.
2324 (mfont_check): Change the order of arguments. Use
2327 * font.h (struct MFontDriver): New member check_capability.
2328 (MFontCapability): Delete ifdef HAVE_OTF.
2329 (mfont__check_capability): Extern it.
2331 * face.c (mface__realize): Fix handling of FONT arg.
2332 (mface__for_chars): Fix handling of explicitly specified font.
2334 2005-11-25 Kenichi Handa <handa@m17n.org>
2336 * font-flt.c (run_command): Print debug info for
2339 * draw.c (layout_glyphs): Fix handling of left/right_padding.
2341 * face.c (mface__for_chars): Check rfont before accessing the
2344 2005-11-21 Kenichi Handa <handa@m17n.org>
2346 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
2349 * fontset.c (fontset_table): New variable.
2350 (free_fontset): Call M17N_OBJECT_UNREGISTER.
2351 (mfont__fontset_init): Add fontset_table as an object array.
2352 (mfont__realize_fontset): Ref FONTSET.
2353 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2354 (mfontset): Call M17N_OBJECT_REGISTER.
2355 (mfontset_copy): Likewise.
2357 * input.c (handle_key): For debugging, print information about
2359 (filter): Add an alias for Meta and Alt modifiers.
2360 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2362 (minput__init): Initialize them.
2363 (parse_expression): New function.
2364 (resolve_expression): New function.
2365 (parse_action_list): Handle expressions by parse_expression.
2366 (take_action_list): Handle expressions by resolve_expression.
2367 (parse_nested_list_value): Fix previous change.
2368 (resolve_command): Fix handling of the return value of
2371 2005-11-18 Kenichi Handa <handa@m17n.org>
2373 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2374 HAVE_OTF is defined.
2375 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2377 (ft_select): Likewise.
2379 * font.c (mfont_list): Fix for the case that FONT is NULL.
2380 (OTF_tag): Delete it.
2381 (load_otf_script_list): Define only when HAVE_OTF is defined.
2382 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2385 * draw.c (truncate_gstring): Be sure to truncate at
2386 glapheme-cluster boundary.
2388 2005-11-11 Kenichi Handa <handa@m17n.org>
2390 * input.c (delete_surrounding_text): Clear cache if necessary.
2392 2005-11-09 Kenichi Handa <handa@m17n.org>
2394 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2395 glyph prev is also supported by the current flt.
2397 2005-11-08 Kenichi Handa <handa@m17n.org>
2399 * m17n-X.c (xft_render): Cancel previous change.
2401 2005-11-07 Kenichi Handa <handa@m17n.org>
2403 * input.c: Include <stdlib.h>.
2404 (get_surrounding_text, delete_surrounding_text)
2405 (get_preceding_char, get_following_char): New functions.
2406 (integer_value): New arg surrounding. If it is nonzero, try to
2407 get a surrounding character. Callers changed.
2408 (take_action_list): Check `value' before setting an element.
2409 (destroy_ic): Unref ic_info->preceding_text and
2410 ic_info->following_text.
2411 (minput__init): Initialize Minput_get_surrounding_text and
2412 Minput_delete_surrounding_text.
2413 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2415 (filter): Unref ic_info->preceding_text and
2416 ic_info->following_text.
2418 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2421 * input.h (MInputContextInfo): New members preceding_text and
2424 2005-11-04 Kenichi Handa <handa@m17n.org>
2426 * input.c (parse_nested_list_value): Fix handling of the global
2428 (get_nested_list): Get global definitions by load_partial_im_info.
2429 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2430 MInputCandidatesChanged.
2431 (take_action_list): Likewise.
2432 (reset_ic): Likewise.
2433 (create_ic): Don't pay special attention to
2434 Mcandidates_group_size.
2435 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2436 (minput_set_variable): Get a definition of varible by
2437 mplist_find_by_value, not mplist_get.
2439 * m17n.h (enum MInputCandidatesChanged): New enum.
2441 2005-11-01 Kenichi Handa <handa@m17n.org>
2443 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2445 (mwin__destroy_window): If xft_draw's drawable is win, change it
2446 to device->drawable before destroying win.
2448 2005-10-31 Kenichi Handa <handa@m17n.org>
2450 * input.c (load_im_info): Fix adding of state.
2452 * m17n-core.c (m17n_fini_core): Fix reporting of module
2455 * m17n.c (m17n_fini): Fix reporting of module finalization.
2457 * m17n-gui.c (m17n_init_win): Fix reporting of module
2460 2005-10-29 Kenichi Handa <handa@m17n.org>
2462 * input.c (get_candidate_list): Fix the timing of referring plist.
2464 2005-10-28 Kenichi Handa <handa@m17n.org>
2466 * input.c (load_branch): Ignore an undefined map name.
2467 (load_im_info): Set im_info->title from `name' only if it's not
2469 (shift_state): Always update ic->status.
2470 (adjust_candidates): Renamed from adjust_candidate_command.
2471 Argument changed. Caller changed.
2472 (get_candidate_list, regularize_action): New functions.
2473 (take_action_list): Use them. On handling Munhandle, don't set
2475 (handle_key): If KEY is not handled by MAP, and MAP has
2476 branch_actions, perform them.
2478 * database.c (mdatabase__fini): Free dir_info->filename;
2480 2005-10-20 Kenichi Handa <handa@m17n.org>
2482 * input.c (marker_code): Accept '@@'.
2483 (integer_value): Handle '@@'.
2484 (parse_action_list): Accept a symbol argument.
2485 (take_action_list): Resolve the symbol argument. Handle the
2488 2005-10-18 Kenichi Handa <handa@m17n.org>
2490 * input.c: Include "charset.h".
2491 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2493 (MIMState): New member (M17NObject control).
2494 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2495 (get_nested_list, resolve_variable): New functions.
2496 (integer_value): New arg (MPlist **value). Set it to the plist
2497 element containing the value.
2498 (resolve_command): New function.
2499 (load_translation): New arg (MPlist *map_actions).
2500 (load_branch): New args language and name. If `keylist' is a
2501 symbol, resolved that as a command name.
2502 (free_map): New arg top. Free map->map_actions only if top is
2504 (free_state): New function.
2505 (load_state): New arg name.
2506 (im_info_list): New variable.
2507 (free_im_info, get_im_info_by_tags): New functions.
2508 (load_im_info): Arg key changed to plist. Handle `include'.
2509 Return (MInputMethodInfo *).
2510 (preedit_commit): Ref ic->candidate_list.
2511 (get_select_charset, adjust_candidate_command): New functions.
2512 (take_action_list): Handle `include'. Adjust candidate action
2513 properly. Handle control variables `candidates-charset' and
2514 `candidates-group-size'.
2515 (open_im): Use get_im_info.
2516 (create_ic): Get global variables.
2517 (load_partial_im_info): New function.
2518 (get_im_info): New function.
2519 (check_command_keyseq, check_command_list, check_variable_list):
2521 (minput__init): Don't handle M_database_hook and Mdetail_text.
2522 Initialize M_candidates, Mcandidates_group_size,
2523 Mcandidates_charset.
2524 (parse_variable_list, get_variable_list, parse_command_list)
2525 (get_command_list): Delete them.
2526 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2527 (minput__fini): Simply unref command_list and variable_list.
2528 (minput_get_description): Adjusted for the new form of description.
2529 (minput_get_commands): Use get_nested_list.
2530 (minput_assign_command_keys): Likewise.
2531 (minput_get_variables, minput_set_variable): Likewise.
2533 * input.h (MInputMethodInfo): New members im and maps.
2535 * database.h (M_database_hook): Delete extern.
2536 (MDatabaseHookFunc): Delete extern.
2537 (mdatabase__check): Extern it.
2539 * database.c: Include <glob.h>.
2540 (MAX_TIME): New macro.
2541 (Masterisk): New variable.
2542 (get_database_stream): Argument changed to (MDatabaseInfo *).
2544 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2545 (find_database): New function.
2546 (update_database_list): New function.
2547 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2548 calling update_database_list.
2549 (mdatabase__check): New function.
2550 (mdatabase_find): Use update_database and find_database. Don't
2551 handle MDatabaseHookFunc.
2552 (mdatabase_list): Call update_database at first.
2553 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2554 (MDatabaseList): New type.
2556 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2558 * m17n.h (Mdetail_text): Delete extern.
2560 * m17n-core.h (mplist_conc): Delete extern.
2562 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2564 (mplist_conc): Renamed to mplist__conc.
2565 (mplist__pop_unref): New function.
2567 2005-10-14 Kenichi Handa <handa@m17n.org>
2569 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2571 (read_element): If keys is an empty plist, return any element
2573 (dump_plist_element): Check if plist is nested.
2574 (mplist_conc): Always ref tail.
2575 (mplist_set): If key is a managing key, ref val in advance.
2577 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2578 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2579 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2582 * fontset.c (free_fontset): Unref fontset_list if necessary.
2583 (mfont__fontset_fini): Don't free fontset_list. Unref
2585 (mfont__realize_fontset): Initialize request.
2586 (mfontset): Ref default_fontset or fontset only if necessary.
2587 (mfontset_copy): Don't ref copy.
2589 * draw.c (render_glyphs): Check gend->type before checking
2592 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2593 unrefed plists to NULL.
2595 2005-10-04 Kenichi Handa <handa@m17n.org>
2597 * textprop.c (mtext_serialize): Be sure to make mt
2598 MTEXT_FORMAT_UTF_8 and NULL terminated.
2600 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2602 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2604 2005-10-03 Kenichi Handa <handa@m17n.org>
2606 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2607 is not at the beginning of line.
2609 2005-09-22 Kenichi Handa <handa@m17n.org>
2611 * input.c: Include <sys/stat.h> and <unistd.h>.
2612 (Minclude, Mcommit, Munhandle): New variables.
2613 (minput__init): Initialize them. Push only Mstate to
2614 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2615 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2617 (load_input_method): Handle "include" directive. If no states are
2619 (shift_state): If state_name is Mt, shift back to the previous
2620 state. Call preedit_commit to commit preedit text.
2621 (preedit_commit): New function.
2622 (take_action_list): Improve debug printing. Handle commit and
2624 (handle_key): Check the return value of take_action_list. Don't
2625 take branch_actions just after changing to the root map.
2626 (reset_ic): Reset all ic_info members.
2627 (filter): When a key is not handled, just move ic_info->keys
2628 instead fo calling reset_ic.
2629 (load_im_info): If key is not Mstate, push Mmap to
2631 (MDatabaseStatList): New type.
2632 (imdir_stat_list): New variable.
2633 (input_method_hook): Don't cancel the hook. Check the
2634 modification time of directories.
2635 (minput__fini): Free imdir_stat_list;
2637 * input.h (MInputContextInfo): New member prev_state.
2639 * m17n-core.h (mplist_conc): Extern it.
2641 * plist.c (mplist_conc): New function.
2643 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2645 * font.h (MRealizedFont): New member average_width.
2647 * font-ft.c (ft_open): Set rface->average_width.
2649 * font.c (xlfd_unparse_name): Print '*' before registry name.
2651 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2652 (xfont_open): Set rfont->average_width.
2653 (xft_open): Likewise.
2654 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2656 * internal-gui.h (struct MFrame): New member average_width.
2658 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2659 (mframe_get_prop): Return the average_width of a font.
2661 * face.c (mface__realize): Set rface->average_width.
2662 (mface__update_frame_face): Set frame->average_width.
2664 * face.h (MRealizedFace): New member average_width.
2666 2005-09-19 Kenichi Handa <handa@m17n.org>
2668 * font.c (xlfd_unparse_name): New arg full_xlfd.
2669 (mfont__encode_char): Use shortcut only for X core fonts.
2670 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2671 (mfont_put_prop): Handle `language' property.
2672 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2673 Print file can capability info too.
2675 * m17n-core.c (mdebug__output): New variable.
2676 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2677 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2678 (m17n_fini_core): Close mdebug__output if it's not stderr.
2680 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2681 (xfont_open): Handle baseline_offset.
2682 (xfont_find_metric): Likewise.
2683 (xfont_render): Likewise.
2684 (xft_open): Likewise.
2685 (xft_render): Likewise.
2687 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2688 (mdebug__output): Extern it.
2689 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2690 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2691 (MDEBUG_DUMP): New macro.
2692 (MDEBUG_PRINT_TIME): Print to medebug__output.
2694 * font.h (MRealizedFont): New member baseline_offset.
2696 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2698 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2699 (ft_list_family): Check alias.
2700 (ft_list_language): If language is "en", don't try to the second
2702 (ft_default_list): New variable.
2703 (ft_list_default): New function.
2704 (ft_select): If family is not specified, try only the default
2705 fonts. Treat the weights normal and medium same.
2706 (ft_open): Fix debug message. If registry is not specified, try
2707 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2708 (ft_find_metric): Likewise.
2709 (ft_render): Likewise.
2710 (ft_list): Fix debug message. Accept the registring iso8859-1.
2711 If family is not specified, try only the default fonts.
2713 * face.c (mface__realize): Fix logic of opening a font.
2715 2005-09-16 Kenichi Handa <handa@m17n.org>
2717 * face.c (mface__realize):
2719 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2722 * input.c (shift_state): Fix the condition of taking init actions.
2723 (take_action_list): Fix handling of pushback action.
2724 (handle_key): Don't change key while checking its alias.
2725 (minput__init): Initialize new variables.
2726 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2729 2005-09-12 Kenichi Handa <handa@m17n.org>
2731 * mtext.c (mtext__uppercase): Add proper open/close parens.
2732 (mtext_titlecase): Add proper casting.
2734 * input.c (parse_action_list): Handle the case that the arg is a
2735 key sequence (MText or MPlist).
2736 (take_action_list): Likewise.
2737 (shift_state): Shorter debug message.
2738 (handle_key): Terminate a debug message by "\n".
2739 (reset_ic): Don't take initial actions here.
2740 (minput_open_im): Print a debug message.
2741 (minput_close_im): Likewise.
2742 (minput_create_ic): Likewise.
2743 (minput_destroy_ic): Likewise.
2745 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2747 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2750 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2751 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2754 * character.c: Add Japanese documentation for
2755 mchar_get_prop_table ().
2757 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2759 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2760 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2761 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2763 (init_case_conversion): New function.
2764 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2765 (uppercase_precheck, lowercase_precheck, final_sigma)
2766 (after_soft_dotted, more_above, before_dot, after_i)
2767 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2769 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2771 * plist.c (read_mtext_element): Fix previous change.
2773 2005-09-05 Kenichi Handa <handa@m17n.org>
2775 * plist.c (read_mtext_element): Handle \uXXXX notation.
2777 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2778 (MTABLE_ALLOCA): Change the name of local variable.
2780 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2781 HAVE_FREETYPE are defined.
2783 * m17n-X.c: Check HAVE_X11.
2785 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2786 directory listing libraries.
2787 (noinst_PROGRAMS): Define it only in maintainer mode.
2789 2005-09-02 Kenichi Handa <handa@m17n.org>
2791 * m17n-gui.h (mdraw_line_break_option): Extern it.
2793 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2794 end of the first glyph.
2795 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2797 (mdraw_line_break_option): New variable.
2798 (mdraw_default_line_break): Use mtext_line_break.
2800 * mtext.h (wordseg_func_table): Don't extern it.
2801 (mtext__wseg_fini): Extern it.
2803 * mtext.c: Don't include word-thai.h.
2804 (wordseg_func_table): Delete this variable.
2805 (mtext__init): Don't initialize above. Don't call
2806 mtext__word_thai_init.
2807 (mtext__fini): Don't free wordseg_func_table. Call
2808 mtext__wseg_fini instead fo mtext__word_thai_fini.
2809 (MTextWordsegFunc): Don't typedef it.
2810 (mtext__word_segment): Moved to mtext-wseg.c.
2812 * m17n-core.h (enum MTextLineBreakOption): New enum.
2813 (mtext_line_break): Extern it.
2815 * mtext-wseg.c: New file.
2817 * mtext-lbrk.c: New file.
2819 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2820 add mtext-lbrk.c and mtext-wseg.c.
2822 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2823 the case that head is NULL.
2825 2005-09-01 Kenichi Handa <handa@m17n.org>
2827 * word-thai.c (wordseg_propertize): If the property value is nil,
2828 don't make the property no-merge.
2829 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2830 attention to the case that they are NULL.
2831 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2834 * character.c (mchar_get_prop_table): New function.
2836 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2838 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2839 (mchar_get_prop_table): Extern it.
2841 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2842 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2844 * internal.h (enum MTextCoverage): New enum.
2845 (MText): New member coverage.
2847 * mtext.c (FORMAT_COVERAGE): New macro.
2848 (insert): Copy mt2->coverage.
2849 (mtext__from_data): Initialize mt->coverage.
2850 (mtext__adjust_format): Update mt->coverage.
2851 (mtext): Initialize mt->coverage.
2852 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2853 Update mt->coverage if necessary.
2854 (mtext_duplicate): Copy mt->coverage.
2855 (mtext_insert, mtext_replace): New functions.
2856 (mtext_dup): Use mtext_duplicate.
2857 (mtext__word_segment): Don't set *from and *to if a word
2858 segmentation funcion is not found.
2859 (mtext_ins_char): Fix typo.
2861 2005-08-25 Kenichi Handa <handa@m17n.org>
2863 * font.h (MFont): New member for_full_width.
2865 * font.c (compare_font_score): Prefer a font of not
2868 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2869 registry charset of a font is one of CJK charsets.
2871 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2872 supports some of CJK.
2874 2005-08-24 Kenichi Handa <handa@m17n.org>
2876 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2878 * m17n-gui.c (null_device_open): Check Mresolution param and set
2881 * m17n-gd.c (device_open): Check Mresolution param and set
2884 * m17n-X.c (MWDevice): New member resy.
2885 (xfont_open): Set ascent, descent, and max_advance members of
2887 (xft_open): Likewise.
2888 (device_open): Compare also screen_num to find a device. Set
2889 device->resy and frame->dpi.
2891 * internal-gui.h (MFrame): New member dpi.
2893 * font.h (MRealizedFont): New member max_advance.
2895 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2896 (mfont__init): Don't initialize Mascent, Mdescent.
2897 (Mascent, Mdescent): Delete these variables.
2898 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2899 Mfont_descent instead of Mascent and Mdescent.
2900 (mfont_put_prop): Allow negative size.
2901 (mfont_find): Handle the case of spec->size < 0. Fix previous
2903 (mfont_list): Handle the case of spec->size < 0.
2904 (mfont_check): Likewise.
2906 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2907 (fc_get_pattern): Handle the case of font->size < 0.
2908 (ft_open): Set ascent, descent, and max_advance members of rfont.
2909 (ft_find_metric): Improve rounding.
2910 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2913 * face.c (mface__realize): Handle the case of font->size < 0.
2915 2005-08-22 Kenichi Handa <handa@m17n.org>
2917 * coding.c (MConverterStatus): Change the member buf to union.
2918 (mconv_buffer_converter): Add const to the arg buf.
2919 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2920 (mconv_decode): Adjusted for the change of MConverterStatus.
2921 (mconv_encode_range): Likewise.
2923 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2924 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2926 2005-08-20 Kenichi Handa <handa@m17n.org>
2928 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2929 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2931 * m17n-X.c (xfont_open): Set members ascent, descent, and
2932 max_advance of rfont.
2933 (xft_open): Likewise.
2935 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2937 (mfont__ft_parse_name): Add const to the arg name.
2939 * font.c (xlfd_parse_name): Add const to the arg name. Call
2940 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2941 (xlfd_unparse_name): Handle spacing.
2942 (mfont__init): Initialize new variables.
2943 (mfont__id): Handle spacing.
2944 (mfont__merge): Likewise.
2945 (mfont__set_spec): This function deleted.
2946 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2947 condition of calling mfont__ft_parse_name.
2948 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2949 (mfont_get_prop): Handle properties spacing, ascent, descent,
2951 (mfont_find): Return a realized font.
2952 (mfont_from_name): Add const to the arg name.
2954 * font.h (enum MFontProperty): New member MFONT_SPACING.
2955 (enum MFontSpacing): New enum.
2956 (MFont): New members spacing and max_advance.
2957 (mfont__ft_parse_name): Prototype adjusted.
2958 (mfont__set_spec): Extern deleted.
2959 (mfont__parse_name_into_font): Prototype adjusted.
2961 2005-08-19 Kenichi Handa <handa@m17n.org>
2963 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2965 * font.c (mfont_list): If FONT is null, use a temporary font.
2966 (mfont_parse_name): Add const to the arg name.
2968 2005-08-18 Kenichi Handa <handa@m17n.org>
2970 * word-thai.c: Surround code by #ifdef and #endif to escape from
2973 * font-ft.c: Mostly re-written.
2975 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2976 (FontLayoutCmd): Type of the member otf changed..
2977 (load_otf_command): Adjusted for the format change of otf command.
2978 (load_command): Likewise.
2979 (free_flt_command): Unref cmd->body.otf.
2980 (run_otf): Ajusted for the type change of otf_cmd.
2981 (run_command): Ajusted for the type change of otf_cmd. On
2982 debugging, print ctx->combining_code.
2983 (mfont__flt_run): Initialize ctx's members code_offset,
2984 combining_code, and left_padding to 0.
2986 * face.h (struct MRealizedFace): New member font.
2987 (mface__realize): Prototype adjusted.
2989 * face.c (find_realized_face): New arg font.
2990 (find_realized_face): Adjusted for the change of MFont.
2991 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2992 (mface__fini): Don't call mdebug__report_object.
2993 (mface__realize): New arg font.
2994 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2995 Optimize the latin case.
2996 (mface__free_realized): Free rface->font.
2997 (mface__update_frame_face): Adjusted for the change of mface__realize.
2998 (mface_equal): New function.
3000 * draw.c (Mcommon): New variable.
3001 (visual_order): Args to mfont__encode_char changed.
3002 (compose_glyph_string): Handle Mfont text property.
3003 (layout_glyphs): Adjusted for the change of MFont.
3004 (mdraw__init): Initialize Mcommon.
3005 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
3007 * font.h (enum MFontType): Members completely changed.
3008 (enum MFontProperty): Move MFONT_SIZE to the tail.
3009 (enum MFontSource): New enum.
3010 (struct MFont): New members type, source, sizes, file, capability,
3012 (struct MRealizedFont): Type of member font changed. Members
3013 score, status, and encoding deleted.
3014 (MFontScore): New type.
3015 (MFontList): Member changed.
3016 (struct MFontDriver): New member has_char. Types of members
3018 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
3019 (Mapple_roman): Extern them.
3020 (OTF_Tag): Typedefed if not HAVE_OTF.
3021 (enum MFontOpenTypeTable): New enum.
3022 (MFontCapability): New type.
3023 (mfont__ft_drive_otf): Prototype adjusted.
3024 (mfont__score): Extern deleted.
3025 (mfont__merge): Extern it.
3026 (mfont__has_char): Extern it.
3027 (mfont__encode_char): Prototype adjusted.
3028 (mfont__open): Extern it.
3029 (mfont__set_spec): Prototype adjusted.
3030 (mfont__get_capability): Extern it.
3032 * font.c: Include "fontset.h".
3033 (M_font_capability, M_font_list, M_font_list_len): New variables.
3034 (font_score_priority): Change order of initial elements.
3035 (font_score_shift_bits): Fix array size.
3036 (common_weight): Add "thin", "semibold", and "heavy".
3037 (common_stretch): Add "ultracondensed", "extracondensed",
3038 "extraexpanded", and "utltraexpand".
3039 (font_weight_regular, font_weight_normal, font_weight_medium): New
3041 (gen_font_name): This function deleted.
3042 (find_encoding): Set font->encoding.
3043 (OTF_tag): New function.
3044 (otf_script_list): New variable.
3045 (load_otf_script_list): New function.
3046 (find_script_from_otf_tag): New function.
3047 (xlfd_parse_name): Set font->type and font->source.
3048 (mfont__free_realized): Free chains rfonts.
3049 (font_score): Renamed from mfont__score.
3050 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
3051 (Mapple_roman): New variables.
3052 (mfont__init): Initilize new variables. Initalize
3053 default_encoding.encoding_name and
3054 default_encoding.encoding_charset to Municode_full and
3055 mcharset__unicode. Use SAFE* macros for allocating filepath
3057 (mfont__fini): Free otf_script_list.
3058 (mfont__id): New function.
3059 (mfont__match_p): Check also capability member of MFont.
3060 (mfont__merge): New funciton.
3061 (mfont__set_spec_from_face): Set type and source members.
3062 (mfont__set_spec_from_plist): Set capability and type members.
3063 (mfont__select): Argument changed.
3064 (mfont__available): New function.
3065 (compare_font_score): New function.
3066 (mfont__list): New function.
3067 (mfont__open): Return a realized font.
3068 (mfont__resize): Adjusted for the change of MFont.
3069 (mfont__has_char): New function.
3070 (mfont__encode_char): Argument changed.
3071 (mfont__set_spec): Argument changed.
3072 (free_font_capability): New function.
3073 (mfont__get_capability): New function.
3074 (MFontfile): New variable.
3075 (mfont_get_prop): Adjusted for the change of MFont.
3076 (mfont_put_prop): Likewise.
3077 (mfont_set_selection_priority): Fix the way of setting
3078 font_score_priority[].
3079 (mfont_find): Use mfont__list instead of mfont__select.
3080 (mfont_resize_ratio): Adjusted for the change of MFont.
3081 (mfont_list): Use mfont__list.
3082 (mfont_check): New function.
3083 (font_score): Make it static.
3085 * fontset.h (mfont__realize_fontset): Prototype adjusted.
3086 (mfont__lookup_fontset): Likewise.
3088 * fontset.c (struct MFontset): Delete member font_spec_list.
3089 (struct MRealizedFontset): Type of member spec changed. New
3091 (load_font_group): Arg spec_list deleted.
3092 (load_fontset_contents): Adjusted for the change of fontset_def.
3093 (free_fontset): Fix the way of freeing fontset elements.
3094 (realize_fontset_elements): Argument changed.
3095 (get_per_script): New function.
3096 (free_realized_fontset_elements): Fix the way of feeing rfontset
3098 (update_fontset_elements): Fix args to realize_fontset_elements.
3099 (mfont__realize_fontset): New arg spec.
3100 (try_font_list): New function.
3101 (try_font_group): New arg request. Use try_font_list.
3102 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
3104 (mfontset): Adjusted for the change of MFontset.
3105 (mfontset_copy): Likewise. Don't share plists.
3106 (mfontset_modify_entry): Adjusted for the change of MFontset.
3107 (mfontset_lookup): Call get_per_script.
3108 (mdebug_dump_fontset): Print also the address of fonts.
3110 * input.c (shift_state): Don't reset ic_info->vars.
3111 (take_action_list): Call MDEBUG_PRINT fore calling
3114 * internal-gui.h (MFontDriver): Don't typedef it here.
3116 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
3117 (MXFont): This type deleted.
3119 (struct _MFontX): New struct.
3120 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
3121 (MDisplayInfo): Member base_font_list deleted.
3122 (DEFAULT_FONT): Definition changed.
3123 (FALLBACK_FONT): This maclr deleted.
3124 (free_display_info): Adjusted for the change of MDisplayInfo.
3125 (free_device): Argument to mfont__free_realized changed.
3126 (xfont_driver): Adjusted for the change of MFontDriver.
3127 (xfont_registry_list): Use MFontX instead of MXFont.
3128 (MRealizedFontX): Renamed from MXFontInfo.
3129 (xfont_select): Return the font found first.
3130 (close_xfont): Change MXFontInfo to MRealizedFontX.
3131 (xfont_open): Return the realized font.
3132 (xfont_find_metric): Get xfont from rfont->fontp.
3133 (xfont_has_char): New function.
3134 (xfont_encode_char): Adjusted for the argument change.
3135 (xfont_render): Get xfont from rfont->fontp.
3136 (xfont_list): Adjusted for the argument change.
3137 (MRealizedFontXft): Renamed from MXftFontInfo.
3138 (xft_driver): Ajusted for the change of MFontDriver.
3139 (close_xft): Change MXtfFontInfo to MRealizedFontXft
3140 (xft_open_font): Argument changed.
3141 (xft_open): Argument changed. Return the realized font.
3142 (xft_find_metric): Get xft_font from rfont->fontp.
3143 (xft_has_char, xft_encode_char): New functions.
3144 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
3145 font if not yet opened.
3146 (device_open): Don't set frame->font.
3148 * m17n-gd.c (gd_font_driver): Adjusted for the change of
3150 (gd_font_open): New function.
3151 (gd_render): Don't use the local variable ft_info.
3152 (device_init): Adjusted for the change of gd_font_driver.
3154 * textprop.c (mtext__prop_init): Initialize text_property_table.
3155 Call M17N_OBJECT_ADD_ARRAY.
3156 (mtext__prop_fini): Don't call mdebug__report_object.
3158 * plist.c (mplist__init): Initialize plist_table.
3159 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
3160 (mplist__fini): Don't call mdebug__report_object.
3162 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
3163 (mtext__fini): Don't call mdebug__report_object.
3164 (MTEXT_FORMAT_UTF_16): Correct type.
3165 (mtext_data): New function.
3166 (mtext_text): Fix calculation of limit and args to
3169 * language.c: Include "plist.h".
3170 (M_script_lang_list): New variable.
3171 (mlang__init): Read languages and their information from m17n
3173 (mlanguage__list): New function.
3174 (Miso639_1, Miso639_2): New variables.
3176 * language.h (mlanguage__list): Extern it.
3178 * database.c (get_database_stream): Use SAFE_* macros for
3179 allocating and freeing path.
3180 (mdatabase__init): Likewise.
3182 * symbol.c (msymbol__fini): Don't free symbols here.
3183 (msymbol__free_table): New function.
3184 (msymbol_is_managing_key): New function.
3186 * symbol.h (msymbol__free_table): Extern it.
3187 (msymbol__list): Extern it.
3189 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
3191 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
3192 (struct _M17NObjectArray): New member name and next.
3193 (mdebug__add_object_array): Extern it.
3194 (M17N_OBJECT_ADD_ARRAY): New macro.
3195 (mdebug__report_object): Don't extern it.
3197 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
3199 * m17n-gui.c (free_frame): Don't free frame->font.
3200 (null_device_fini): Fix code for freeing
3201 null_device.realized_font_list.
3202 (m17n_fini_win): Free interface.
3203 (mframe): Cast the return value of dlsym. Set frame->font here.
3204 (mframe_get_prop): Check frame->rface->rfont before accessing the
3207 * m17n-gui.h (Mfontfile): Extern it.
3208 (mfont_check): Extern it.
3209 (mface_equal): Extern it.
3211 * m17n-core.c: Include "symbol.h".
3212 (report_header_printed): This variable deleted.
3213 (object_array_root): New variable.
3214 (report_object_array): New function.
3215 (mdebug__report_object): This function deleted.
3216 (mdebug__add_object_array): New function.
3217 (m17n_init_core): Call mchartable_init () before mtext_init ().
3218 (m17n_fini_core): Call report_object_array (if necessary) and
3219 msymbol__free_atable at the end.
3221 * m17n-core.h (msymbol_is_managing_key): Extern it.
3222 (mtext_data): Extern it.
3223 (MTEXT_FORMAT_UTF_16): Correct type.
3224 (M17NLIB_MINOR_VERSION): Changed to 3.
3225 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
3227 * chartab.c (mchartable__init): Initalize chartable_table.count.
3228 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
3229 mdebug__report_object.
3231 2005-05-26 Kenichi Handa <handa@m17n.org>
3233 * m17n.h (Miso639_1, Miso639_2): Extern them.
3235 * symbol.h (msymbol__list): Extern it.
3237 * symbol.c (msymbol__list): New function.
3239 2005-05-19 Kenichi Handa <handa@m17n.org>
3241 * input-gui.c (minput__win_init): Don't change the value of
3244 2005-05-16 Kenichi Handa <handa@m17n.org>
3246 * m17n-core.c (m17n_object): Be sure to initialize all members.
3248 * font-ft.c (fc_decode_prop): Fix args to msymbol.
3250 2005-05-09 Kenichi Handa <handa@m17n.org>
3252 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
3254 2005-04-27 Kenichi Handa <handa@m17n.org>
3256 * language.c (mlang__init): Add "an" (Aragonese).
3258 * word-thai.c: Add support for libthai.
3259 (mtext__word_thai_init): Initialize wordseg library conditionaly.
3260 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
3262 * mtext.c: Include "word-thai.h" conditionaly.
3263 (mtext__init): Call mtext__word_thai_init conditionaly.
3264 (mtext__fini): Call mtext__word_thai_fini conditionaly.
3266 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
3267 not WORDCUT_LD_FLAGS.
3269 2005-04-19 Kenichi Handa <handa@m17n.org>
3271 * word-thai.c (wordseg_propertize): Always unref the attached
3273 (thai_wordseg): Don't unref the property.
3275 2005-04-18 Kenichi Handa <handa@m17n.org>
3277 * word-thai.c: Include stdlib.h.
3278 (wordseg_propertize): Add dummy function for the case that wordcut
3279 library doesn't exist.
3280 (wordseg_propertize): Fix for old wordcut library.
3282 2005-04-16 Kenichi Handa <handa@m17n.org>
3284 * word-thai.c: Include <stdio.h>.
3286 2005-04-15 Kenichi Handa <handa@m17n.org>
3288 * draw.c: Include mtext.h.
3289 (linebreak_table, M_break_at_space, M_break_at_word)
3290 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
3291 (compose_glyph_string): Check POS before getting Mface text
3293 (truncate_gstring): Give correct TO arg to line_break function.
3294 (GET_LB_TYPE): New macro.
3295 (find_break_backward, find_break_forward): New functions.
3296 (mdraw__init): Initialize the above new variables.
3297 (mdraw__fini): Free linebreak_table.
3298 (mdraw_default_line_break): Use find_break_backward and
3301 * word-thai.c: New file.
3303 * word-thai.h: New file.
3305 * mtext.c: Include word-thai.h.
3306 (wordseg_func_table): New variable.
3307 (mtext__init): Initialize wordseg_func_table and call
3308 mtext__word_thai_init.
3309 (mtext__fini): Call mtext__word_thai_fini, free
3311 (MTextWordsegFunc): New type.
3312 (mtext__word_segment): New function.
3314 * mtext.h (wordseg_func_table): Extern it.
3315 (mtext__word_segment): Extern it.
3317 * m17n.c (m17n_init): Fix typo (== -> =).
3319 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
3320 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
3322 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
3323 (MTEXTPROP_VAL): New macros.
3325 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
3327 2005-04-07 Kenichi Handa <handa@m17n.org>
3329 * database.c (load_chartable): Fix pursing of symbol name.
3331 2005-03-24 Kenichi Handa <handa@m17n.org>
3333 * m17n.c (m17n_init): Fix typo (== -> =).
3335 2005-03-11 Kenichi Handa <handa@m17n.org>
3337 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
3339 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
3341 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
3344 2005-03-09 handa <handa@m17n.org>
3346 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
3347 calling m17n_init ().
3349 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
3350 calling m17n_init_core ().
3352 2005-02-28 Kenichi Handa <handa@m17n.org>
3354 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3357 2005-02-17 Kenichi Handa <handa@m17n.org>
3359 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3360 (M_description, M_command, M_variable): New variables.
3361 (load_im_info_keys): New variables.
3362 (load_im_info, check_command_keyseq, get_description_advance)
3363 (parse_command_list, get_command_list, parse_variable_list)
3364 (get_variable_list, input_method_hook): New functions.
3365 (command_list, variable_list): New variables.
3366 (minput__init): Put input_method_hook to Minput_method.
3367 Initialize M_description, M_command, M_variable, Mdetail_text,
3368 load_im_info_keys, command_list, variable_list.
3369 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3370 (Mdetail_text): New variable.
3371 (minput_get_description, minput_get_commands)
3372 (minput_assign_command_keys, minput_get_variables)
3373 (minput_set_variable): New functions.
3375 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3376 (minput_assign_command_keys, minput_get_variables)
3377 (minput_set_variable): Extern them.
3379 * plist.c (UNGETC): Just decrement st->p.
3380 (read_mtext_element): New arg skip.
3381 (read_integer_element): Likewise.
3382 (read_symbol_element): Likewise.
3383 (read_element): New arg KEYS.
3384 (mplist__from_plist): Don't increment ref-count of NULL object.
3385 (mplist__from_file): New arg KEYS.
3386 (mplist_put): Don't increment ref-count of NULL object.
3387 (mplist_add): Likewise.
3388 (mplist_push): Likewise.
3389 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3391 * plist.h (mplist__from_file): Prototype adjusted.
3393 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3394 (get_database_stream): New function.
3395 (load_database): Use get_database_stream.
3396 (M_database_hook): New variable
3397 (mdatabase__init): Initialize M_database_hook.
3398 (mdatabase__load_for_keys): New function.
3399 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3401 (mdatabase_define): Free mdb->extra_info if necessary.
3403 * database.h (mdatabase__dir_list, M_database_hook)
3404 (mdatabase__load_for_keys): Extern them.
3405 (MDatabaseHookFunc): New type.
3407 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3409 2004-12-27 Kenichi Handa <handa@m17n.org>
3411 * Version 1.2.0 released.
3413 2004-12-27 Kenichi Handa <handa@m17n.org>
3415 * input.c (minput_filter): Don't reset ic->xxx_changed.
3417 * mtext.c (mtext_from_data): Fix documentation.
3419 2004-12-25 Kenichi Handa <handa@m17n.org>
3421 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3422 (M17NLIB_VERSION_NAME): Update to "1.2.".
3424 2004-12-24 Kenichi Handa <handa@m17n.org>
3426 * input.c (reset_ic): Set key_unhandled to 0.
3428 2004-12-21 Kenichi Handa <handa@m17n.org>
3430 * m17n-gui.h (mfont_from_spec): Delete extern.
3432 * input-gui.c (win_callback): Handle Minput_reset.
3433 (minput__win_init): Register reset_ic as a callback for
3436 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3437 changed. At first, shift to the initial state.
3438 (minput__init): Initialize Minput_reset. Register reset_ic as a
3439 callback for Minput_reset.
3440 (Minput_reset): New variable.
3441 (minput_filter): Always set ic->xxx_changed to 0.
3442 (minput_reset_ic): New function.
3443 (integer_value): Fix typo ('>' -> '<') and calculation of length
3446 * m17n-core.c (merror_code): Change type to `int'.
3448 * m17n-misc.h (merror_code): Adjust type.
3450 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3452 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3453 (mtext_change_prop): Delete extern.
3455 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3456 to `int'. Move the documents to m17n-core.h.
3458 2004-12-13 Kenichi Handa <handa@m17n.org>
3460 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3461 (MTextProperty): Document it.
3463 2004-12-09 Kenichi Handa <handa@m17n.org>
3465 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3467 2004-12-03 Kenichi Handa <handa@m17n.org>
3469 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3470 m17n__gui_initialized): New externs.
3472 * m17n-core.h (enum M17NStatus): New enum.
3473 (m17n_status): Extern it.
3475 * m17n-core.c (core_initialized): Delete this variable.
3476 (m17n__core_initialized, m17n__shell_initialized,
3477 m17n__gui_initialized): New variables.
3478 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3479 instead of core_initialized.
3480 (m17n_status): New function.
3482 * m17n.c (shell_initialized): Delete this variable.
3483 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3486 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3488 * m17n-gui.c (win_initialized): Delete this variable.
3489 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3490 instead of gui_initialized.
3492 2004-11-19 Kenichi Handa <handa@m17n.org>
3494 * input.c (reset_ic): Check if ic_info->state is NULL.
3495 (filter): If ic_info->state is NULL, return 0.
3496 (load_input_method): Don't unref `maps' it it's not created.
3498 2004-11-15 Kenichi Handa <handa@m17n.org>
3500 * input.c (find_candidates_group): If INDEX is -1, find the last
3502 (take_action_list): If the previous of the first candidate is
3503 requested, select the last candidate.
3505 2004-11-08 Kenichi Handa <handa@m17n.org>
3507 * m17n-X.c (device_open): Try at most 32 fonts to find a
3508 non-autoscaled font.
3510 * font.c (xlfd_parse_name): Fix previous change.
3512 2004-11-05 Kenichi Handa <handa@m17n.org>
3514 * font.c: (commont_style): Include dummy elements "slanted" and
3515 "rslanted" to prefer "o" to "r" if "i" is requested.
3517 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3519 2004-10-29 Kenichi Handa <handa@m17n.org>
3521 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3523 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3524 New members smallest and larger.
3525 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3526 (xfont_registry_list): Likewise.
3527 (xfont_select): Likewise.
3530 2004-10-28 Kenichi Handa <handa@m17n.org>
3532 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3533 font name comparison.
3534 (xfont_select): Fix logic for selecting a larger size font.
3536 2004-10-25 Kenichi Handa <handa@m17n.org>
3538 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3541 2004-10-22 Kenichi Handa <handa@m17n.org>
3543 * input.c (update_candidate): Renamed from udpate_candidate.
3544 (take_action_list): Show more debugging info on arithmetic commands.
3546 * m17n-X.c (device_open): Fix previous change.
3548 * draw.c (compose_glyph_string): Don't get face property at the
3551 2004-10-21 Kenichi Handa <handa@m17n.org>
3553 * draw.c (compose_glyph_string): Fix for the case of category
3556 2004-10-19 Kenichi Handa <handa@m17n.org>
3558 * input.c (mdebug_mask): New variable.
3559 (shift_state): Print debug information.
3560 (take_action_list): Likewise.
3561 (handle_key): Likewise.
3563 2004-10-14 Kenichi Handa <handa@m17n.org>
3565 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3567 2004-10-13 Kenichi Handa <handa@m17n.org>
3569 * m17n-X.c (device_open): Be sure to register at least one font
3572 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3573 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3575 2004-10-12 Kenichi Handa <handa@m17n.org>
3577 * draw.c (alloc_gstring): Fix previous change.
3579 * font-ft.c (ft_list_generic): Fix for the case of not
3582 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3584 * font.c (mfont_list): If no font is found, return NULL.
3585 (load_font_encoding_table): Put entries of nil registry first.
3586 (find_encoding): Adjust for the above change.
3588 2004-10-11 Kenichi Handa <handa@m17n.org>
3590 * m17n-gui.h (mfont_list): Adjust prototype.
3592 * m17n-X.c (xfont_list): New arg maxnum.
3594 * font.h (struct MFontDriver): Change prototype of <list>.
3596 * font-ft.c (fc_generic_family_list): Delete it.
3597 (Mserif, Msans_serif, Mmonospace): Delete them.
3598 (M_generic_family_info): New variable.
3599 (enum GenericFamilyType): New enum.
3600 (struct GenericFamilyInfo): New struct.
3601 (generic_family_table): New variable.
3602 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3604 (add_font_info): Get style here.
3605 (ft_list_family): Don't initialize fc_config here. Don't list
3607 (ft_list_generic): New function.
3608 (ft_select): Pay attention to generic familes here.
3609 (ft_open): Fix calculation of ascent and descent.
3610 (ft_list): Pay attention to generic families.
3611 (mfont__ft_init): Initialize M_generic_family_info,
3612 generic_family_table, and fc_config..
3613 (mfont__ft_fini): Finalize generic_family_table.
3615 * draw.c (compose_glyph_string): Use more constant font for
3616 glyphs. Adjust for the member change in MGlyph.
3617 (layout_glyph_string): Adjust for the member change in MGlyph.
3618 (alloc_gstring): Intilize scracth_glyph to avoid
3619 compose_glyph_string on it.
3620 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3621 (mdraw_coordinates_position): Fix previous change.
3623 * internal-gui.h (glyph_category): New enum.
3624 (MGlyph): Change type of <category> to enum glyph_category.
3626 * face.c (mface__realize): Delete args langauge and charset.
3627 (mface__for_chars): Fix for the case that glyphs have different
3629 (mface__update_frame_face): Adjust for mface__realize change.
3631 * face.h (mface__realize): Adjust prototype.
3633 2004-10-05 Kenichi Handa <handa@m17n.org>
3635 * language.c (mlang__init): Add Akan.
3637 2004-10-04 Kenichi Handa <handa@m17n.org>
3639 * font-ft.c (add_font_info): Add instead of push the element.
3640 (ft_list_family): For generic fonts, try all
3641 substituted. families.
3643 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3644 (run_rule): Don't update cluster range here.
3645 (run_command): Update cluster range on appending a glyph.
3646 (run_otf): Update cluster range for glyphs generated by OTF.
3648 2004-10-02 Kenichi Handa <handa@m17n.org>
3650 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3652 2004-09-30 Kenichi Handa <handa@m17n.org>
3654 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3656 2004-09-30 Kenichi Handa <handa@m17n.org>
3658 * font.h: Include <fontconfig/fontconfig.h>.
3659 (MFTInfo): New member langset.
3660 (mfont__encoding_list): Extern it.
3662 * font.c (mfont__encoding_list): New function.
3663 (mdebug_dump_font_list): New function.
3665 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3666 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3668 (ft_family_list): New variable.
3669 (set_font_info): New arg basep. Callers changed.
3670 (fc_list): Check the return value of FcPatternGetString.
3671 (add_font_info): New arg plist. Callers changed. Update
3673 (ft_list_family): New function (merged fc_list and ft_list_all).
3674 (ft_select): Use ft_list_family.
3675 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3677 (mfont__ft_init): Initialize above new variables.
3678 (mfont__ft_fini): Free ft_family_list.
3679 (STRDUP_LOWER): New macro.
3680 (set_font_info): Use STRDUP_LOWER.
3681 (ft_list_family): Avoid duplicate addition of font path. Use
3683 (fc_decode_prop): Fix typo.
3685 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3686 (xfont_registry_list): Change argument disp_info to frame.
3688 (xfont_list_all): New function.
3689 (xfont_list): If FONT is not NULL, check all fonts.
3691 2004-09-28 Kenichi Handa <handa@m17n.org>
3693 * m17n-X.c (MXFont, MXFontList): New types.
3694 (MDisplayInfo): Delete members font_registry_list,
3695 iso8859_1_family_list, iso10646_1_family_list, new members
3696 font_list, base_font_list.
3697 (free_display_info): Adusted for the change of MDisplayInfo.
3698 (xfont_driver): Initialize with xfont_list.
3699 (font_compare): New function.
3700 (build_font_list): Deleted.
3701 (xfont_registry_list): New function.
3702 (xfont_select): Use xfont_registry_list.
3703 (xfont_list): New function.
3704 (device_open): Adusted for the change of MDisplayInfo.
3706 * font-ft.c (add_font_info): New arg languages. Callers changed.
3707 (fc_list): Get languages from fonts..
3708 (ft_list_all): Renamed from ft_list. Callers changed.
3709 (ft_list): New function.
3710 (mfont__ft_driver): Initalize with ft_list.
3712 * font.c (mfont_list): New function.
3714 * font.h (struct MFontDriver): New member `list'.
3715 (MFTInfo): New member languages.
3717 * m17n-gui.h (mfont_list): Extern it.
3719 2004-09-27 Kenichi Handa <handa@m17n.org>
3721 * internal-gui.h (struct MGlyphString): Delete members mt,
3722 sub_width, sub_lbrearing, sub_rbearing, and region.
3724 * draw.c (MSubTextExtents): New type.
3725 (layout_glyphs): New arg extents. Set its members.
3726 (layout_glyph_string): Adjusted for the above change.
3727 (alloc_gstring): Don't set gstring->mt.
3728 (truncate_gstring): Call line_break function with mt instead of
3731 2004-09-22 Kenichi Handa <handa@m17n.org>
3733 * mtext.c (count_utf_16_chars): Count each code of invalid
3736 2004-09-19 Kenichi Handa <handa@m17n.org>
3738 * mtext.c (default_utf_16, default_utf_32): Rename them to
3739 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3742 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3745 2004-09-13 Kenichi Handa <handa@m17n.org>
3747 * draw.c (Mlatin): Don't declare it here.
3748 (visual_order): Fix reordering of combining characters.
3749 (compose_glyph_string): Fix detection of script.
3750 (layout_glyphs): Don't fix reordering of combining characters
3752 (layout_glyph_string): Pay attention to
3753 control->disable_overlapping_adjustment.
3754 (truncate_gstring): Include at least on character in a line.
3755 (get_gstring): Always scan one full line.
3756 (mdraw__init): Don't initialize Mlatin here.
3757 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3758 have a font, use ascent/descent of an ASCII font. Allow
3759 ink_array_return and logical_array_return to be NULL.
3760 (mdraw_coordinates_position): Fix iteration.
3762 * font-ft.c (MFTtoProp): Member completely changed.
3763 (ft_to_prop): Adjusted for the above change.
3764 (ft_to_prop_size): Likewise.
3765 (set_font_info): Adjusted for the change of MFTtoProp.
3766 (fc_generic_family_list): New variable.
3767 (fc_list): Add special handling of generic font names.
3768 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3769 Initialize fc_generic_family_list.
3770 (mfont__ft_fini): Don't free ft_to_prop. Free
3771 fc_generic_family_list.
3772 (FC_vs_M17N_font_prop): New type.
3773 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3774 (fc_decode_prop, fc_encode_prop): New functions.
3775 (mfont__ft_parse_name): Use fc_decode_prop.
3776 (mfont__ft_unparse_name): Use fc_encode_prop.
3778 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3779 (MWDevice): Add member realized_font_list.
3780 (free_display_info): Don't free disp_info->realized_font_list.
3781 (free_device): Free device->realized_fontset_list.
3782 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3783 (device_open): Don't initialize disp_info->realized_font_list.
3784 (device_open): Initialize device->realized_font_list and set it to
3785 frame->realized_font_list.
3787 * fontset.c (try_font_group): New function.
3788 (mfont__lookup_fontset): Use try_font_group.
3790 * font.c (common_weight): Change the order of "regular".
3792 * face.c (Mlatin): Don't make it static.
3793 (mface__realize): Be sure to set work_gstring.frame.
3794 (mface__for_chars): Likewise.
3796 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3799 * internal-gui.h (Mlatin): Extern it.
3801 * m17n-gui.h (MDrawControl): New member
3802 disable_overlapping_adjustment.
3804 2004-09-06 Kenichi Handa <handa@m17n.org>
3806 * font-flt.c (run_otf): Fix typo ('}'->']').
3808 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3809 (COMBINING_PRECOMPUTED_P): New macros.
3811 * draw.c (layout_glyphs): Handle precomputed combining code.
3813 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3814 precomupted combining code.
3816 2004-09-03 Kenichi Handa <handa@m17n.org>
3818 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3821 2004-08-27 Kenichi Handa <handa@m17n.org>
3823 * face.c (mface_put_prop): If the new value is the same as the
3824 current one, don't increment frame->tick.
3826 2004-08-25 Kenichi Handa <handa@m17n.org>
3828 * fontset.c (mfontset): Initialize font_spec_list member.
3829 (mfontset_copy): Load fontset if necessary.
3831 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3832 'metrics' to for C++.
3834 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3837 2004-08-16 Kenichi Handa <handa@m17n.org>
3839 * Version 1.1.0 released.
3841 2004-08-13 Kenichi Handa <handa@m17n.org>
3843 * language.c (mlang__init): Add Dhivehi.
3845 * m17n-gui.c (Mx, Mfreetype): Delete it.
3846 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3848 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3849 (mfont_resize_ratio): Extern it.
3850 (MDrawGlyphInfo): New member logical_width;
3851 (MDrawGlyph): New type.
3852 (mdraw_glyph_list): Prototype adjusted.
3854 * m17n-X.c (xfont_open): Set type and fontp members.
3855 (xft_open): Likewise.
3857 * internal-gui.h (Mx, Mfreetype): Delete extern.
3859 * font.h (struct MRealizedFont): New member type and fontp.
3861 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3862 (Mx, Mfreetype): Declare here.
3863 (Mxft): New variable.
3864 (mfont_resize_ratio): New function.
3866 * font-ft.c (ft_open): Set type and fontp members.
3868 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3871 2004-08-11 Kenichi Handa <handa@m17n.org>
3873 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3876 2004-08-06 Kenichi Handa <handa@m17n.org>
3878 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3881 * font-flt.c (run_otf): Print debugging information if necessary.
3883 2004-08-05 Kenichi Handa <handa@m17n.org>
3885 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3886 positioning_type 5 and 6. Switch simplified.
3888 2004-08-04 Kenichi Handa <handa@m17n.org>
3890 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3892 2004-08-02 Kenichi Handa <handa@m17n.org>
3894 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3895 set val to 1 even if it is greater than 1.
3897 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3899 2004-07-29 Kenichi Handa <handa@m17n.org>
3901 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3902 debugging information.
3904 * internal.h (MDEBUG_PRINT5): New macro.
3906 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3907 the previous one if the zero width glyph has left or right
3910 2004-07-26 Kenichi Handa <handa@m17n.org>
3912 * m17n-X.c (xft_render): Pay attention to members left_padding and
3913 right_padding of MGlyph.
3915 * draw.c (visual_order): Allocate one more elements for arrays as
3916 a workaround of fribidi bug.
3917 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3918 instead of MGlyph->bidi_sensitive.
3919 (layout_glyph_string): Pay attentinon to
3920 control->orientation_reversed when padding at the head or tail.
3921 Fix adjustment of space glyph width.
3922 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3925 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3926 instead of MGlyph->bidi_sensitive.
3928 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3930 2004-07-26 Kenichi Handa <handa@m17n.org>
3932 * draw.c (visual_order): Don't treat combined glyphs specially.
3933 (layout_glyphs): Don't get metrics glyphs that are already ready.
3934 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3935 width with the previous one.
3936 (draw_background): Fix bar cursor position on a r2l glyph.
3938 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3939 (run_rule): Fix place of updating cluster_begin_pos and
3940 cluster_end_pos here.
3941 (run_otf): Don't set left_padding.
3943 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3945 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3946 Fix handling of GPOS.
3947 (mfont__ft_drive_gpos): Delete this function.
3949 * font.h (mfont__ft_drive_otf): Renamed back from
3950 mfont__ft_drive_gsub.
3951 (mfont__ft_drive_gpos): Delete extern.
3953 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3954 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3956 2004-07-23 Kenichi Handa <handa@m17n.org>
3958 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3959 the same bidi level.
3961 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3963 2004-07-22 Kenichi Handa <handa@m17n.org>
3965 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3967 2004-07-20 Kenichi Handa <handa@m17n.org>
3969 * draw.c (render_glyphs): Fix checking of g->code validity.
3971 * face.c (mface__realize): Set g.type.
3973 2004-07-18 Kenichi Handa <handa@m17n.org>
3975 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3978 * m17n-gui.c (mframe): Print error message give by dlopen to
3981 2004-07-16 Kenichi Handa <handa@m17n.org>
3983 * draw.c (compose_glyph_string): Improve the way of deciding a
3984 script. For a character that doesn't have script property, use
3985 the last non-latin script.
3987 * font-ft.c (fc_list): Cancel previous change.
3988 (mfont__ft_init): Add more entries in ft_to_prop_name.
3990 2004-07-15 Kenichi Handa <handa@m17n.org>
3992 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3993 previous or next character glyphs.
3995 2004-07-14 Kenichi Handa <handa@m17n.org>
3997 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3998 of type GLYPH_SPACE.
4000 * fontset.c (mfont__lookup_fontset): If glyph type is
4001 GLYPH_SPACE, get codes for SPACE.
4003 * internal-gui.h (Mfont): Delete extern.
4005 * m17n-gui.h (Mfont): Delete duplicated extern.
4007 2004-07-13 Kenichi Handa <handa@m17n.org>
4009 * font-ft.c (DEVICE_DELTA): New macro.
4010 (adjust_anchor): New function.
4011 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
4013 (mfont__ft_drive_gpos): New function.
4015 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
4016 (FontLayoutContext): Delete member `rfont'.
4017 (run_otf): Set g->otf_cmd. Call
4018 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
4019 only whne HAVE_OTF is defined.
4021 * fontset.c: Include "config.h".
4023 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
4024 (MGlyph): New member otf_cmd.
4026 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
4027 (mfont__ft_drive_gpos): Extern it.
4029 * face.c: Include "config.h".
4031 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
4033 * input-gui.c: Include "config.h".
4035 * plist.c: Include "config.h".
4037 2004-07-06 Kenichi Handa <handa@m17n.org>
4039 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
4040 internal-gui.h: Cancel previous changes.
4042 * m17n-gd.h: Delete it.
4044 * Makefile.am (libm17n_core_la_LIBADD): New variable.
4045 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
4046 @XML2_LD_FLAGS@ to above.
4047 (libm17n_la_LIBADD): Add -ldl.
4048 (libm17n_la_LDFLAGS): Add -export-dynamic.
4049 (X_LD_FLAGS): Fix the order of linking.
4050 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
4051 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
4052 (libm17n_X_la_LDFLAGS): Add -module.
4053 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
4054 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
4055 (libm17n_gd_la_LDFLAGS): Add -module.
4056 (include_HEADERS): Delete m17n-gd.h.
4058 2004-06-30 Kenichi Handa <handa@m17n.org>
4060 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
4061 (MDeviceLibraryInterface): Delete it.
4062 (register_device_library): Delete it.
4063 (m17n__device_library_list): Renamed from device_library_list.
4065 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
4066 (m17n_init_win): Adjust prototype.
4068 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
4069 (m17n_init_gd): New function.
4071 * m17n-gd.h: New file.
4073 * m17n-X.h: Include <m17n-gui.h>.
4074 (m17n_init_X): Extern it.
4075 (M17N_INIT): Redefine it.
4077 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
4078 (m17n_init_X): New function.
4080 * internal-gui.h (m17n__device_library_list): Extern it.
4081 (struct MDeviceDriver): New members initialized, init, and fini.
4083 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
4085 (libm17n_X_la_LIBADD): Delete aboves.
4086 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
4087 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
4088 (libm17n_gd_la_LDFLAGS): Delete it.
4089 (include_HEADERS): Add m17n-gd.h.
4091 2004-06-25 Kenichi Handa <handa@m17n.org>
4093 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
4094 (libm17n_gd_la_LDFLAGS): Cancel previous change.
4096 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
4098 * font-ft.c (fc_list): If FcFontList finds no font, try
4101 * draw.c (compose_glyph_string): Terminate the last loop after
4102 doing default combining if necessary.
4104 2004-06-24 Kenichi Handa <handa@m17n.org>
4106 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
4108 * character.c (mchar_define_property): Add const to an arg.
4110 * charset.c (mchar_define_charset): Add const to an arg.
4112 * coding.c (MCodingSystem): Add const to an arg or decoder.
4113 (finish_decoding): Add const to an arg.
4114 (decode_coding_charset, decode_coding_utf_8)
4115 (decode_coding_utf_16, decode_coding_utf_32)
4116 (decode_coding_iso_2022, decode_coding_sjis)
4117 (mconv_define_coding): Likewise.
4119 * m17n-X.c (xft_find_metric): Delete unused variable.
4121 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
4124 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
4127 * mtext.c (count_utf_8_chars, count_utf_16_chars)
4128 (mtext__from_data, mtext_from_data): Add `const' to an arg.
4130 * mtext.h (mtext__from_data): Ajust prototype.
4132 2004-06-23 Kenichi Handa <handa@m17n.org>
4134 * draw.c (compose_glyph_string): Always get glyph codes by
4136 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
4137 (mdraw_glyph_list): New function.
4139 * font-flt.c (mfont__flt_run): Be sure to call
4140 rfont->driver->encode_char.
4142 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
4143 (ft_encode_char): Delete arg C.
4144 (ft_render): Don't call FT_Get_Char_Index.
4146 * font.c (mfont__encodable_p): Delete it.
4147 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
4149 * font.h (struct MFontDriver): Delete arg C of encode_char.
4150 (mfont__encodable_p): Delete extern.
4152 * m17n-X.c (xfont_encode_char): Delete arg C.
4153 (xft_find_metric): Don't cal FT_Get_Char_Index.
4154 (xft_render): Likewise.
4156 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
4158 (mdraw_glyph_list): Extern it.
4160 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
4162 2004-06-22 Kenichi Handa <handa@m17n.org>
4164 * m17n-gui.h (mfontset_lookup): Extern it.
4166 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
4168 * fontset.c (realize_fontset_elements)
4169 (free_realized_fontset_elements, update_fontset_elements): New
4171 (mfont__realize_fontset): Call realize_fontset_elements.
4172 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
4173 (mfont__lookup_fontset): If a fontset was modified, update
4174 the realized fontset.
4175 (mfontset_modify_entry): Increment fontset->tick.
4176 (mfontset_lookup): New function.
4178 2004-06-21 Kenichi Handa <handa@m17n.org>
4180 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
4182 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
4183 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
4184 length of source text 0.
4186 2004-06-21 Kenichi Handa <handa@m17n.org>
4188 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
4189 (compare): Pay attention to format other than utf-8.
4190 (copy): Delete this function.
4191 (count_by_utf_8, count_by_utf_16, insert): New functions.
4192 (count_utf_16_chars): Fix handling of a surrogate pair.
4193 (find_char_forward, find_char_backward): Likewise.
4194 (mtext__from_data): Delete unnecessary check. Fix number of
4196 (mtext_from_data): Don't count items.
4197 (mtext_ref_char): Optimize the code.
4198 (mtext_set_char): Pay attention to format other than utf-8.
4199 (mtext_cat_char): Likewise.
4200 (mtext_dup): Don't call copy, instead do allocation here.
4201 (mtext_cat): Call insert instead of copy.
4202 (mtext_ncat): Likewise.
4203 (mtext_cpy): Delete character at first and call insert instead of
4205 (mtext_ncpy): Likewise.
4206 (mtext_copy): Likewise.
4207 (mtext_duplicate): Call insert instead of copy.
4208 (mtext_del): Pay attention to format other than utf-8.
4209 (mtext_ins): Simply call insert.
4210 (mtext_ins_char): Pay attention to format other than utf-8.
4211 (mtext_tok): Call insert instead of copy.
4212 (mtext_text): Call UNIT_BYTES.
4214 * textprop.c (mtext__adjust_plist_for_change): New function.
4216 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
4217 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
4218 (CHAR_UNITS_AT): Fix typo.
4219 (CHAR_UNITS_BY_HEAD): Fix typo.
4220 (STRING_CHAR_AND_UNITS): Fix typo.
4222 * internal.h (MTEXT_READ_ONLY_P): New macro.
4224 * mtext.h (mtext__replace): Delete the extern.
4225 (mtext__adjust_foramt): Adjust prototype.
4227 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
4228 if possible. Otherwise make a copy of mmt.
4230 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
4233 2004-06-18 Kenichi Handa <handa@m17n.org>
4235 * character.h (CHAR_STRING_UTF16): Fix syntax.
4237 2004-06-16 Kenichi Handa <handa@m17n.org>
4239 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
4240 (libm17n_X_la_LIBADD): Delete it.
4241 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
4243 * m17n-X.c (device_open): Add parens in `if' condition.
4245 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
4246 (DEC_POSITION): Likewise.
4247 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
4249 2004-06-15 Kenichi Handa <handa@m17n.org>
4251 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
4254 * draw.c (compose_glyph_string): If langauge is specified, call
4255 mface__for_chars even if a text is all latin. Fix condition for
4256 setting non_ascii_found.
4258 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
4260 * m17n.h (minput_char_to_key): Delete extern.
4262 * m17n-gui.h (minput_event_to_key): Cancel previous change.
4264 * m17n-gui.c (null_device_open): Set several members of frame.
4266 2004-06-14 Kenichi Handa <handa@m17n.org>
4268 * m17n-gui.h (minput_event_to_key): Delete extern.
4270 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
4272 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
4274 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
4276 2004-06-08 Kenichi Handa <handa@m17n.org>
4278 * character.c (mchar_put_prop): Don't increment the ref-count of
4281 2004-06-04 Kenichi Handa <handa@m17n.org>
4283 * m17n-core.c (mdebug__register_object): New function.
4284 (mdebug__unregister_object): Likewise.
4286 * internal.h (mdebug__register_object, mdebug__unregister_object):
4288 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
4291 * charset.c (mcharset__load_from_database): Don't call
4292 mconv__register_charset_coding here.
4294 * coding.c (find_coding): Get a real name from an element of
4295 coding_definition_list.
4296 (mconv__register_charset_coding): Set the real name at the top of
4298 (mcoding__load_from_database): Likewise.
4299 (mconv_list_codings): Adjusted for the above change.
4301 2004-06-03 Kenichi Handa <handa@m17n.org>
4303 * coding.c (find_coding): Find by canonicalized name. Don't have
4304 to modify the element of coding_definition_list by
4306 (mconv__define_coding_from_charset): Delete it.
4307 (mconv__register_charset_coding): Canonicalize sym.
4308 (mcoding__load_from_database): Register plist modified by
4311 * coding.h (mconv__define_coding_from_charset): Don't extern it.
4313 * font-ft.c (ft_open): Fix setting of rfont->descent.
4315 2004-06-02 Kenichi Handa <handa@m17n.org>
4317 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
4318 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
4319 (xlfd_unparse_name): Renamed from xfont_build_name.
4320 (mfont__init): Initialized Mfontconfig.
4321 (mfont__free_realized): Unconditionally unref rfont->info.
4322 (mfont__select): Free `this' if it's not best.
4323 (mfont__open): Don't check frame->realized_font_list.
4324 (mfont__parse_name_into_font): New function.
4325 (Mfontconfig): New variable.
4326 (mfont_from_name): Call mfont_parse_name.
4327 (mfont_name): Call mfont_unparse_name.
4328 (mdebug_dump_font): Likewise.
4330 * font.h (struct MFontDriver): Delete members parse_name and
4332 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
4333 (mfont__parse_name_into_font): Extern it.
4335 * font-ft.c: Include "symbol.h".
4336 (close_ft): Unconditionally free filename and charmap_list of
4338 (ft_open): Duplicate base->filename. Increment ref-count of
4339 ft_info->charmap_list. Free ft_info->charmap_list and
4340 ft_info->filename on error.
4341 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
4343 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
4345 (enum xlfd_field_idx): Moved to font.c.
4346 (split_font_name, build_font_name): Likewise.
4347 (build_font_list): Call mfont__parse_name_info_font.
4348 (xfont_open): Call mfont__unparse_name. Free name.
4349 (xfont_parse_name, xfont_build_name): Moved to font.c
4350 (xft_select): Prototype deleted.
4351 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
4352 Call mfont_pase_name.
4354 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4355 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4358 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4361 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4363 2004-06-01 Kenichi Handa <handa@m17n.org>
4365 * fontset.c (mfontset_modify_entry): Pay attention to the case
4366 that fontset->font_spec_list is NULL.
4368 2004-05-31 Kenichi Handa <handa@m17n.org>
4370 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4372 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4374 * font.c (mfont__select): Print score the a font for debugging.
4376 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4378 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4379 kanji_sym and kana_sym.
4381 2004-05-28 Kenichi Handa <handa@m17n.org>
4383 * Makefile.am (VINFO): New variable.
4384 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4385 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4387 2004-05-27 Kenichi Handa <handa@m17n.org>
4389 The following chanages are to make device dependent functions
4390 accessible only from MDeviceDriver structure, and to add GD and
4391 null device drivers. Font drivers get also device dependent.
4393 * m17n.c (m17n_init): Increament shell_initialized.
4394 (m17n_fini): Decremented shell_initialized.
4396 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4398 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4399 (Mwidget, Mcolormap, Mx): Extern them.
4401 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4402 (free_frame): Call frame->driver->close instead of
4404 (DLOPEN_SHLIB_EXT): New macro.
4405 (MDeviceLibraryInterface): New type.
4406 (device_library_list): New variable.
4407 (register_device_library): New function.
4408 (null_device): New variable.
4409 (null_device_close, null_device_get_prop)
4410 (null_device_realize_face, null_device_free_realized_face): New
4412 (null_driver): New variable.
4413 (null_device_init, null_device_fini, null_device_open): New
4415 (null_interface): New variable.
4416 (Mfreetype, Mdevice): Declare them.
4417 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4418 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4419 Mwin__Close_Device. Register drivers for Mx and Mgd.
4420 (m17n_fini_win): Decremented win_initialized. Call "fini"
4421 function of all opened devices. Don't call mwin__fini.
4422 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4424 (mframe): Handle Mdevice key of PLIST.
4425 (mframe_get_prop): Call frame->device->get_prop instead of
4426 mwin__device_get_prop.
4428 * m17n-gd.c: New file.
4430 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4431 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4433 * m17n-core.c (m17n_init_core): Increate core_initialized.
4434 (m17n_fini_core): Decremented core_initialized.
4436 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4437 (Mcolormap): Don't extern them here.
4439 * m17n-X.c (FRAME_DEVICE): New macro.
4440 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4441 (free_display_info): Use MPLIST_DO.
4442 (free_device): Free rface->info.
4443 (xft_close): Delete it.
4444 (device_init): Renamed from mwin__init.
4445 (device_fini): Renamed from mwin__fini.
4446 (device_open): Renamed from mwin__open_device.
4447 (x_driver): New variable.
4448 (MXFontInfo): Delete member frame, add member display.
4449 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4450 Don't declare them here.
4452 * internal-gui.h (MDeviceType): New enum.
4453 (MWDefice): Delete it.
4454 (struct MFrame): Change type of device to void *. New members
4455 device_type, driver, font_driver_list.
4456 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4457 (MDeviceDriver): New type.
4458 (Mx, Mgd, Mfreetype): Extern them.
4459 (mwin__XXX): Delete all of them.
4461 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4463 (win_destroy_ic): Likewise.
4464 (adjust_window_and_draw): Likewise.
4465 (win_callback): Likewise.
4466 (Mxim): Declare it here.
4467 (minput_event_to_key): Call M_CHECK_READABLE.
4469 * fontset.c (mfont__lookup_fontset): Delete local variable
4472 * font.h (struct MFontDriver): Delete member close, add members
4473 parse_name and build_name.
4474 (mfont__driver_list): Delete extern.
4475 (mfont__close): Delete extern.
4477 * font.c (mfont__init): Don't set mfont__driver_list.
4478 (mfont__fini): Don't unref mfont__driver_list.
4479 (mfont__select): Try font drivers in frame->font_driver_list. Set
4480 driver member of a realized font.
4481 (mfont__close): Delete it.
4482 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4483 functions of the default frame.
4485 * font-ft.c (close_ft): Check ft_info->ft_face and work
4487 (add_font_info): Allocate ft_info by M17N_OBJECT.
4488 (ft_close): Delete it.
4489 (mfont__ft_driver): Don't set ft_close.
4490 (ft_select): Increment ref-count of best_font.
4491 (ft_open): Decremented ref-count of base. On error, call
4492 FT_Done_Face and free ft_info.
4493 (ft_find_metric): Always use XXX_MONO in load_flags.
4494 (ft_render): Fix setting of width. Call
4495 frame->driver->draw_points instead of mwin__draw_points.
4496 (ft_to_prop): Don't set mfont__driver_list.
4497 (mfont__ft_fini): Just unref ft_info.
4499 * face.c (mface__init): Exchange foreground and background of
4500 mface__default. Call mface_put_prop to set hline of
4502 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4503 (mface__free_realized): Don't call mwin__free_realized_face.
4505 * draw.c (Mdepth): Don't declare it here.
4506 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4507 (render_glyphs, render_glyph_string): Likewise.
4508 (mdraw__init): Don't set Mdepth.
4509 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4511 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4513 (mdraw_text_items): Check FRAME is writable.
4514 (mdraw_per_char_extents): Implement body.
4516 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4518 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4519 (GUI_SOURCES): Delete it.
4520 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4521 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4522 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4523 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4524 (linkgui_LDADD): Set to libm17n-gui.la
4525 (linkgui_LDFLAGS): New target.
4526 (SRC): Include ${libm17n_gui_la_SOURCES} and
4527 ${libm17n_gd_la_SOURCES}.
4529 2004-05-24 Kenichi Handa <handa@m17n.org>
4531 * draw.c (draw_background): Don't draw background even if
4532 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4534 2004-05-22 Kenichi Handa <handa@m17n.org>
4536 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4538 2004-05-20 Kenichi Handa <handa@m17n.org>
4540 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4542 * m17n-gui.c: Include "plist.h".
4543 (mframe): If PLIST is NULL, initialize it to emply plist.
4545 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4546 (xft_driver): New variable.
4547 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4548 (xft_find_metric, xft_render): New function.
4549 (mwin__init): Adjusted for the new mfont__driver_list.
4550 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4551 generated face to PARAM.
4552 (mwin__realize_face): Fix setting of box colors. Don't call hook
4554 (mwin__draw_hline): New function.
4555 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4556 (mwin__xft_render): Delete these function.
4558 * internal-gui.h (struct MFrame): New member tick.
4559 (struct MGlyphString): New member tick.
4560 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4561 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4562 (mwin__xft_render): Delete extern.
4564 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4565 (mfontset): Always increment the reference count of returned
4568 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4569 (MFTInfo): Moved to font.h.
4570 (ft_iso8859_1_font_list): Delete this variable.
4571 (set_font_info): Don't set font->property[MFONT_TYPE].
4572 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4573 (add_font_info): Change type to void.
4574 (fc_list): Change anme from xft_list. Caller changed. Include
4575 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4576 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4577 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4578 (close_ft): Don't call mwin__xft_close. Unref
4579 ft_info->extra_info.
4580 (ft_open): Don't setup ft_info->fontname. Don't call
4582 (ft_find_metric): Don't call mwin__xft_get_metric.
4583 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4584 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4585 (mfont__ft_init): Adjusted for new mfont__driver_list.
4586 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4588 * font.c (mfont__driver_list): Make it MPlist.
4589 (mfont__init): Adjust initialization of mfont__driver_list.
4590 (mfont__fini): Free mfont__driver_list.
4591 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4592 (mfont__select): Adjusted for the new mfont__driver_list.
4594 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4595 (mfont__drirver_list): Adjust prototype.
4596 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4598 * face.h (struct MFace): Delete member realized_face_list, add
4600 (struct MRealizedFace): Delete member need_update
4601 andnofont_rface, add member non_ascii_list.
4602 (mface__update_frame_face): Extern it.
4604 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4606 (get_hline_create, get_box_create): New functions.
4607 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4609 (free_face): Cancep previous change. Free face->frame_list.
4610 (serialize_hline): Do nothing if hline->width is zero.
4611 (serialize_box): Do nothing if box->width is zero.
4612 (mface__init): Setup all properties of mface__default.
4613 (mface__fini): Free hline_prop_list and box_prop_list.
4614 (mface__realize): Cancel previous change. Update
4615 face->frame_list. Setup rface->non_ascii_list.
4616 (mface__for_chars): Update rface->non_ascii_list.
4617 (mface__free_realized): Free rface->non_ascii_list.
4618 (mface__update_frame_face): New function.
4619 (mface): Initialize face->frame_list.
4620 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4622 (mface_merge): Likewise.
4623 (mface_put_prop): If key is Mhline or Mbox, get value by
4624 get_hline_create or get_box_create respectively.
4625 (mface_put_prop): Update frame->tick and call
4626 mface__update_frame_face if necessary.
4627 (mface_update): Do nothing if func is noop_hook.
4629 * draw.c (render_glyphs): If a font is not found, use
4630 mwin__draw_empty_boxes.
4631 (alloc_gstring): Initialize gstring->tick.
4632 (get_gstring): Check gstring->tick.
4634 2004-05-17 Kenichi Handa <handa@m17n.org>
4636 * face.c (find_realized_face): Return value changed. If RFONT is
4637 NULL, avoid unnecessary checking.
4638 (free_face): Free face->realized_face_list.
4639 (mface__realize): Adjusted for the change of find_realized_face.
4640 If it returns a realized face that needs update, free it and
4641 realize a new one. Push a new realized face to
4642 frame->realized_face_list instead of appending.
4643 (mface__for_chars): Adjusted for the change of find_realized_face.
4644 Short cut if the required font is in rface->ascii_rface.
4645 (mface_put_prop): Free old value if necessary. Set need_update
4646 member of realized faces to 1.
4648 * face.h (struct MFace): Delete member tick, add member
4650 (struct MRealizedFace): Delete member tick, add member
4653 2004-05-13 Kenichi Handa <handa@m17n.org>
4655 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4657 2004-05-12 Kenichi Handa <handa@m17n.org>
4659 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4661 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4662 parse it XftNameParse.
4664 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4665 (all_fonts_scaned): New variable.
4666 (set_font_info): FAMILY may be Mnil.
4667 (add_font_info): Argument changed.
4668 (xft_list): Call add_font_info in it.
4669 (ft_list): Likewise.
4670 (ft_select): Make it work in the case family is Mnil.
4671 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4672 (mfont__ft_fini): Set all_fonts_scaned to 0.
4674 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4675 that is failed to open.
4677 2004-05-10 Kenichi Handa <handa@m17n.org>
4679 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4680 device's depth is 1 (i.e. monochrome).
4682 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4683 to work around the problem of libtool.
4685 * font-ft.c: Include <freetype/ftbdf.h>.
4686 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4688 (mfont__ft_init): Initialize them.
4689 (ft_iso8859_1_font_list): New variable.
4690 (set_font_info): Detect a font containing iso8859-1 glyphs and
4691 register it in ft_iso8859_1_font_list. If the font is not
4692 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4693 properties of the font from its properties.
4694 (add_font_list): If the font is not scalable, check if it is BDF
4695 or PCF font. If not, ignore it.
4696 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4697 registry is not iso8859-1.
4698 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4699 ft_iso8859_1_font_list.
4700 (ft_find_metric): If the font is not scalable, assume it as BDF
4701 or PCF, and get a metric from its properties.
4702 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4704 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4706 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4707 (libm17n_la_LDFLAGS): Delete it.
4708 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4709 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4711 2004-05-06 Kenichi Handa <handa@m17n.org>
4713 * draw.c (compose_glyph_string): Fix previous change.
4715 2004-04-30 Kenichi Handa <handa@m17n.org>
4717 * font-ft.c (ft_list): Delete unused variable `result'.
4718 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4720 2004-04-27 Kenichi Handa <handa@m17n.org>
4722 * m17n-X.c: Include config.h
4723 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4724 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4725 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4726 (FRAME_CMAP, FRAME_VISUAL): New macros.
4727 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4728 (xfont_driver): Make it static.
4729 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4730 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4731 info->xft_color_back.
4732 (MXftFontInfo) [HAVE_XFT2]: New type.
4733 (mwin__xft_close) [HAVE_XFT2]: New function.
4734 (mwin__xft_open) [HAVE_XFT2]: New function.
4735 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4736 (mwin__xft_render) [HAVE_XFT2]: New function.
4738 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4739 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4740 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4743 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4745 * font-ft.c: Don't include FT_FREETYPE_H here.
4746 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4747 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4748 (MFTInfo): New member charmap_index.
4749 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4750 (check_otf_filename): Renamed from check_filename. Return value
4752 (ft_set_property): This function deleted.
4753 (set_font_info): New function.
4754 (add_font_list): Argument changed. Add multiple fonts.
4755 (xft_list) [HAVE_XFT2]: New function.
4756 (ft_list) [not HAVE_XFT2]: New function.
4757 (ft_select): Add code for Xft.
4758 (close_ft): Likewise.
4759 (ft_open): Likewise.
4760 (ft_find_metric): Likewise.
4761 (ft_encode_char): Likewise.
4762 (ft_render): Likewise.
4764 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4766 2004-04-26 Kenichi Handa <handa@m17n.org>
4768 * textprop.c (mtext_attach_property): Declare the return type as
4771 2004-04-21 Kenichi Handa <handa@m17n.org>
4773 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4775 2004-04-09 Kenichi Handa <handa@m17n.org>
4777 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4779 (load_command): Setup above members.
4781 2004-04-05 Kenichi Handa <handa@m17n.org>
4783 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4785 2004-03-30 Kenichi Handa <handa@m17n.org>
4787 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4790 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4791 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4793 2004-03-29 Kenichi Handa <handa@m17n.org>
4795 * Version 1.0 Patch Level 2 released.
4797 2004-03-29 Kenichi Handa <handa@m17n.org>
4799 * charset.c (make_charset): Set charset->fully_loaded and
4800 charset->simple correctly. Don't try to get charset->min_char and
4801 charset->max_char for a charset of method subset and superset.
4802 Don't load a mapping file here.
4803 (mcharset__init): Set unified_max.
4804 (mcharset__load_from_database): Free a working plist.
4806 * coding.c (mcoding__fini): Free all malloced data.
4808 * input-gui.c (win_create_ic): Set control.as_image for preediting
4811 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4812 `count') to initialize the array.
4814 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4817 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4819 (mwin__create_window): Fix bug of setting a background pixel of a
4821 (mwin__adjust_window): Clear the window before drawing.
4823 * m17n-core.c (mdebug__report_object): Free array->objectes if
4825 (m17n_init_core): Don't set report_header_printed to 0 here.
4826 Fix debugging information.
4827 (m17n_fini_core): Set report_header_printed to 0 here.
4829 * m17n-core.h (mplist_deserialize): Extern it.
4831 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4833 * m17n.c (m17n_fini): Fix debugging information.
4835 * mtext.c (mtext__adjust_foramt): New function.
4837 * mtext.h (mtext__adjust_foramt): Extern it.
4839 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4841 * plist.h (mplist__deserialize): Don't extern it.
4843 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4844 elements of symbol_table to NULL. Report about created and freed
4845 symbols if MDEBUG_FINI is set.
4847 2004-03-22 Kenichi Handa <handa@m17n.org>
4849 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4851 * m17n.c (m17n_init): Fix the way of checking merror_code.
4853 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4855 2004-03-22 Kenichi Handa <handa@m17n.org>
4857 * fontset.c (realize_font_group): Adjust the font size by
4858 mfont__resize before selecting a font.
4860 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4862 2004-03-19 Kenichi Handa <handa@m17n.org>
4864 * Version 1.0 Patch Level 1 released.
4866 2004-03-19 Kenichi Handa <handa@m17n.org>
4868 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4870 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4872 2004-03-19 Kenichi Handa <handa@m17n.org>
4874 Re-apply the changes forgotten in the released version.
4876 * charset.c (mcharset__load_from_database): Call
4877 mchar_define_charset.
4879 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4880 (mconv_encode_range): Put Mcoding text property.
4882 2004-03-18 Kenichi Handa <handa@m17n.org>
4884 * draw.c (Mdepth): New variable.
4885 (visual_order): Delete unused local var `pos'.
4886 (compose_glyph_string): Fix for the case that gstring->glyphs is
4887 realloced. Stop generating glyphs at TO. Fix handling of
4889 (layout_glyphs): Get metrics of all glyphs in advance. Set
4890 lbearing and rbearing of base of composition glyph correctly.
4891 Handle left-overhang glyphs correctly.
4892 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4894 (dump_combining_code): Change the defualt off_x character to ".".
4895 (mdraw__init): Initialize Mdepth.
4897 * face.c (work_gstring): New variable
4898 (mface__init): Initialize work_gstring.
4899 (mface__fini): Free work_gstring.glyphs.
4900 (mface__realize): Don't handle videomode property here. Adjusted
4901 for the change of mfont__get_metric.
4902 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4904 * face.h (enum face_gc): Moved to m17n-X.c.
4906 * font.h (struct MFontDriver): Arguments of find_metric changed.
4907 (mfont__select): Prototype adjusted.
4908 (mfont__get_metric): Likewise.
4909 (mfont__ft_drive_otf): Likewise.
4910 (mfont__flt_run): Likewise.
4912 * font.c (mfont__select): New argument layouter. If layouter is
4913 different in the registered font, make a new copy of realized
4915 (mfont__get_metric): Argument changed. Get metrics of multiple
4917 (mfont_find): Call mfont__select with layouter as Mnil.
4919 * font-flt.c (FontLayoutContext): New member rfont.
4920 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4921 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4923 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4925 (NUM_POINTS): New macro.
4926 (MPointTable): New type.
4927 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4928 (mfont__ft_drive_otf): New argument rfont.
4930 * fontset.c (realize_font_group): Adjusted for the changed of
4932 (check_fontset_element): This function deleted.
4934 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4935 off the parent window if the preedit text is zero length.
4937 * internal-gui.h (struct MFrame): New members foreground,
4938 background, videomode, font.
4939 (struct MGlyphString): New member anti_alias.
4940 (MDrawPoint): New type.
4941 (mwin__draw_bitmap): Prototype deleted.
4942 (mwin__draw_points): Prototype added.
4944 * m17n-gui.h (MDrawControl): New member anti_alias.
4946 * m17n-gui.c (free_frame): Free frame->font.
4947 (mframe): Set the fontset of frame->face to the default fontset.
4949 * m17n-X.c (RGB_GC): New type.
4950 (enum gc_index): Renamed from enum face_gc. Member names changed.
4952 (struct MWDevice): Members foreground and background deleted. New
4953 member scratch_gc, gc_list.
4954 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4955 (free_device): Free GCs in device->gc_list.
4956 (get_rgb_gc): New function.
4957 (get_gc): Renamed and argument changed from get_color.
4958 (get_gc_for_anti_alias): New function.
4959 (xfont_find_metric): Arguments changed. Get metrics of multiple
4961 (set_region): Argument changed. Caller changed.
4962 (xfont_render): Allways set a font in gc.
4963 (x_error_handler, x_io_error_handler): Define only if
4964 X_SET_ERROR_HANDLER is defined.
4965 (mwin__open_device): Create device->scratch_gc. Set members
4966 foreground, background, and videomode of frame. Call
4967 XSetErrorHandler and XSetIOErrorHandler only if
4968 X_SET_ERROR_HANDLER is defined.
4969 (struct gc_list): Deleted.
4970 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4971 (mwin__realize_face): Adjusted for the change of the format of
4972 rface->info and the charge of set_region.
4973 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4974 (mwin__draw_box): Likewise.
4975 (mwin__draw_bitmap): This function deleted.
4976 (mwin__draw_points): New function.
4977 (mwin__verify_region): Adjusted for the change of the format of
4978 rface->info and the charge of set_region.
4979 (mwin__create_window): Inherit backgound pixel from parent.
4980 (mwin__dump_gc): Adjusted for the change of the format of
4983 2004-03-16 Kenichi Handa <handa@m17n.org>
4985 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4987 * input.c (M_key_alias): New variable.
4988 (handle_key): Try M_key_alias property of a key too.
4989 (minput__init): Initialize M_key_alias. Give that property to
4990 symbols in one_char_symbol. Fix bug of initializing
4993 * draw.c (compose_glyph_string): Don't handle
4994 ignore_formatting_char here. Include formatting characters in the
4995 range processed by a FTL.
4996 (layout_glyph_string): Handle ignore_formatting_char here.
4998 2004-03-12 Kenichi Handa <handa@m17n.org>
5000 * input-gui.c (win_create_ic): Enable bidi in status control.
5002 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
5004 2004-03-09 Kenichi Handa <handa@m17n.org>
5006 * input.c (load_input_method): If title is not specified, use the
5007 input method name as title.
5009 * m17n-X.c (get_color): Make it static.
5010 (xim_create_ic, xim_destroy_ic, x_error_handler)
5011 (x_io_error_handler): Likewise.
5013 2004-03-01 Kenichi Handa <handa@m17n.org>
5015 * Version 1.0 released.
5018 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
5019 National Institute of Advanced Industrial Science and Technology (AIST)
5020 Registration Number H15PRO112
5022 This file is part of the m17n library.
5024 The m17n library is free software; you can redistribute it and/or
5025 modify it under the terms of the GNU Lesser General Public License
5026 as published by the Free Software Foundation; either version 2.1 of
5027 the License, or (at your option) any later version.
5029 The m17n library is distributed in the hope that it will be useful,
5030 but WITHOUT ANY WARRANTY; without even the implied warranty of
5031 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5032 Lesser General Public License for more details.
5034 You should have received a copy of the GNU Lesser General Public
5035 License along with the m17n library; if not, write to the Free
5036 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
5037 Boston, MA 02110-1301, USA.