1 2012-04-23 Kenichi Handa <handa@m17n.org>
3 * Version 1.6.4 released.
5 2012-04-23 Kenichi Handa <handa@m17n.org>
7 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
8 (M17NLIB_VERSION_NAME): Changed to "1.6.4"
10 2012-03-21 Kenichi Handa <handa@m17n.org>
12 * font-ft.c (fc_decode_prop): Fix for the case of too large VAL.
14 2012-02-28 Kenichi Handa <handa@m17n.org>
16 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 3.
17 (M17NLIB_VERSION_NAME): Changed to "1.6.3".
19 2011-10-11 Kenichi Handa <handa@m17n.org>
21 * Version 1.6.3 released.
23 2011-09-12 Kenichi Handa <handa@m17n.org>
25 * draw.c (analyse_bidi_level): Adjust a type (FriBidiParType).
27 2011-06-19 Kenichi Handa <handa@m17n.org>
29 * Makefile.am (libm17n_X_la_LIBADD): Add @FONTCONFIG_LD_FLAGS@.
31 2011-03-09 Kenichi Handa <handa@m17n.org>
33 * input.c (take_action_list): Move the handling of candidate-list
34 change to the function filter.
35 (filter): Adjusted as above.
37 2011-02-14 Kenichi Handa <handa@m17n.org>
39 * input.c (minput_list): Change the format of returning plist.
41 2011-02-14 Kenichi Handa <handa@m17n.org>
43 * m17n.h (minput_list): Extern it.
45 * input.c (MIMExternalModule): New member 'name'.
46 (load_external_module): Return value changed.
47 (unload_external_module): New function.
48 (fini_im_info): Use unload_external_module.
49 (load_im_info): Adjuted for the change of load_external_module.
50 (minput_list): New function.
52 2011-01-06 Kenichi Handa <handa@m17n.org>
54 * coding.c: Fix comment syntax for doxygen.
56 2010-12-13 Kenichi Handa <handa@m17n.org>
58 * m17n-flt.c (mflt_enable_new_feature): Document it.
60 * m17n-flt.h: Exclude extern variables from Doxygen's scope.
62 2010-12-10 Kenichi Handa <handa@m17n.org>
64 * m17n-flt.c (mflt_dump_gstring): Document it.
66 2010-11-05 Kenichi Handa <handa@m17n.org>
68 * locale.c (make_locale): Don't call setlocale. Just parse the
71 2010-10-04 Kenichi Handa <handa@m17n.org>
73 * Version 1.6.2 released.
75 2010-09-30 Kenichi Handa <handa@m17n.org>
77 * input.c (open_im): Return -1 if the input method has no state.
79 2010-09-17 Kenichi Handa <handa@m17n.org>
81 * font-ft.c (ft_check_otf): Fix previous change.
83 2010-09-16 Kenichi Handa <handa@m17n.org>
85 * m17n-flt.c (parse_otf_command): Fix previous change.
87 2010-09-14 Kenichi Handa <handa@m17n.org>
89 * font-ft.c (ft_check_otf): Fix handling of negative features.
91 * m17n-flt.c (parse_otf_command): Fix handling of negative
93 (decode_packed_otf_tag): Fix updating category code.
94 (run_command): Fix `encoded' property of separator glyph.
95 (mflt_run): Improve debug info printing.
97 2010-09-11 Kenichi Handa <handa@m17n.org>
99 * src/charset.c, src/chartab.c, src/coding.c, src/face.c,
100 src/font.c, src/fontset.c, src/input.c, src/m17n-X.c,
101 src/m17n-core.c, src/m17n-flt.c, src/m17n-gd.c, src/m17n-gui.c,
102 src/m17n.c, src/mtext.c, src/plist.c, src/symbol.c,
103 src/textprop.c: Print debug information to mdebug__output instead
106 2010-09-02 Kenichi Handa <handa@m17n.org>
108 * draw.c (visual_order): Reorder only RTL composed-sequence.
110 2010-09-01 Kenichi Handa <handa@m17n.org>
112 * draw.c (compose_glyph_string): When the script `inherited' and
113 `common' can't be resolved, use "block" property of the character.
115 2010-08-31 Kenichi Handa <handa@m17n.org>
117 * draw.c (compose_glyph_string): Allow running flt striding over
120 2010-08-19 Kenichi Handa <handa@m17n.org>
122 * m17n-X.c (MDisplayInfo): New member altgr_mask.
123 (find_modifier_bits): Set disp_info->altgr_mask.
125 * input.c (fully_initialize): Make it static.
127 * input.h (MINPUT_KEY_ALTGR_MODIFIER): New macro.
129 * input-gui.c (minput_event_to_key): Handle
130 MINPUT_KEY_ALTGR_MODIFIER.
132 2010-08-12 Kenichi Handa <handa@m17n.org>
134 * character.h (STRING_CHAR_ADVANCE_UTF8): Sanitize the code.
135 (STRING_CHAR_ADVANCE_UTF16): Likewise.
137 * font.c (mfont__init): Initialize buf to NULL.
138 (mfont__id): Likewise.
140 * font-ft.c (ft_encapsulate): Use MDEBUG_PRINT1 instead of
142 (ft_check_otf): Move the label not_otf: within #ifdef HAVE_OTF.
143 (get_otf): Move the code within #ifdef HAVE_OTF.
144 (ft_drive_otf): Move declarations of some local variables within
147 2010-08-11 Kenichi Handa <handa@m17n.org>
149 * input.h (MInputContextInfo): New member state_hook.
151 * input.c (shift_state): Just set ic_info->state_hook, instead of
152 taking state-hook actions.
153 (handle_key): Check ic_info->state_hook. If KEY is unhandled,
154 init ic_info->state_hook.
156 2010-08-09 Kenichi Handa <handa@m17n.org>
158 * m17n-flt.c (try_otf): Remove unused local vars.
160 * input.c (fully_initialize): Avoid compiler warning by casting.
162 * m17n-core.c (m17n_init_core): Fix handling of env_value.
164 * fontset.c (realize_fontset_elements): Fix typo (pl->plist).
166 * coding.c (decode_coding_iso_2022): Sanitize "if" condition.
168 2010-04-23 Kenichi Handa <handa@m17n.org>
170 * Version 1.6.1 released.
172 2010-04-23 Kenichi Handa <handa@m17n.org>
174 * m17n-flt.c (enum GlyphInfoMask): Shift upper masks 1-bit left.
175 (decode_packed_otf_tag): If a glyph has combining information,
178 2010-04-23 Kenichi Handa <handa@m17n.org>
180 * font-ft.c (ft_drive_otf): Reset 28th bit of g->g.internal for
181 storing OTF feature tag.
183 2010-04-19 Kenichi Handa <handa@m17n.org>
185 * m17n-flt.c (run_stages): Update category code of glyphs if
186 category table is changed.
188 2010-04-05 Kenichi Handa <handa@m17n.org>
190 * font-ft.c (ft_check_cap_otf): Fix conditions to call
193 * database.c (check_version): Fix previous change.
195 2010-04-02 Kenichi Handa <handa@m17n.org>
197 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 6.
198 (M17NLIB_PATCH_LEVEL): Changed to 1.
199 (M17NLIB_VERSION_NAME): Changed "1.6.1".
201 2010-03-30 Kenichi Handa <handa@m17n.org>
203 * Version 1.6.0 released.
205 2010-03-01 Kenichi Handa <handa@m17n.org>
207 * m17n-flt.c (run_rule): Fix checking of glyph availability.
209 2010-02-18 Kenichi Handa <handa@m17n.org>
211 * m17n-gui.c (register_device_library): Preprend M17N_MODULE_DIR
212 to the module file name.
214 * input.c (load_external_module): Preprend M17N_MODULE_DIR to the
217 * charset.c (load_charset): Check the return value of fgets.
219 * Makefile.am: Build modules dynamically loaded with
220 -avoid-version and no -version-info.
222 2010-01-15 Kenichi Handa <handa@m17n.org>
224 * draw.c (run_flt): Set mflt_try_otf to rfont->driver->try_otf.
225 (mdraw__init): Set mflt_enable_new_feature to 1.
227 * font-ft.c (ft_try_otf): New function.
228 (mfont__ft_driver): Set ft_try_otf.
230 * font.h (struct MFontDriver): New member try_otf.
232 * m17n-X.c (xft_driver): Set xft_try_otf.
233 (xft_try_otf): New function.
235 * m17n-flt.h: (mflt_enable_new_feature): Extern it.
236 (mflt_try_otf): Extern it.
238 * m17n-flt.c (load_category_table): If mflt_enable_new_feature is
239 zero, return NULL for such categories that require the new
241 (parse_otf_command): If mflt_enable_new_feature is zero, return
243 (load_otf_command): Fix previous change.
244 (load_flt): Check the return value of load_category_table.
245 (try_otf): Renamed from run_otf_category. Call mflt_try_otf
246 instead of font->drive_otf.
247 (run_command): Call try_otf instead of run_otf_category.
248 (m17n_init_flt): Initialize mflt_enable_new_feature to 0,
249 mflt_try_otf to NULL.
250 (mflt_enable_new_feature): New variable.
251 (mflt_try_otf): New variable.
253 2009-12-10 Kenichi Handa <handa@m17n.org>
255 * m17n-flt.c (parse_otf_command): Handle ":otf?".
256 (run_otf_category): If not features are specified, reset category
258 (run_command): On copy, don't re-calculate a category code.
260 2009-12-03 Kenichi Handa <handa@m17n.org>
262 * m17n-flt.c (run_stages): Reset category code if category-table
264 (mflt_run): Don't set category code here.
265 (decode_packed_otf_tag): If no feature is applied, re-calculate
268 2009-12-02 Kenichi Handa <handa@m17n.org>
270 * m17n-flt.c (mflt_find): If FONT is specified but no flt is
272 (run_command): Don't set ENCODED and MEASURED of separator.
274 2009-11-30 Kenichi Handa <handa@m17n.org>
276 * m17n-flt.c (load_otf_command): Check 4th char against '?'.
277 (load_command): Likewise.
278 (decode_packed_otf_tag): New arg CTX. If CTX->in == gstring,
279 update CTX->encoded. Caller changed.
281 2009-11-30 Kenichi Handa <handa@m17n.org>
283 * font-ft.c (ft_drive_otf): Check if OUT is null or not.
284 (ft_drive_otf): Call OTF_drive_gsub_with_log and
285 OTF_drive_gpos_with_log. Record the applied feature in
288 * font.c (mfont__get_glyph_id): Encode g->c instead of g->code.
290 * internal-flt.h (MAKE_COMBINING_CODE_BY_CLASS)
291 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
292 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P):
294 (PACK_OTF_TAG): Extern it.
296 * draw.c (reorder_combining_chars): Delete it.
298 * m17n-flt.h (mflt_font_id): Use type MFLFont.
299 (mflt_iterate_otf_feature): Likewise.
301 * m17n-flt.c (enum GlyphInfoMask): New member CategoryCodeMask and
303 (GET_CATEGORY_CODE, SET_CATEGORY_CODE, GET_COMBINED): New macros.
304 (SET_COMBINING_CODE): Set also CombinedMask.
305 (FontLayoutFeatureTable): Delete it.
306 (FeatureCodeTable): New type.
307 (FontLayoutCategory): Type of feature_table changed.
308 (load_category_table): Adjusted for the change of
310 (unref_category_table): Likewise.
311 (gen_otf_tag): New member shift. Caller changed.
312 (FontLayoutContext): New member category.
313 (run_rule): Compare g->c instead of g->code.
314 (decode_packed_otf_tag): New function.
315 (run_otf): Call decode_packed_otf_tag. Don't reset combining-code
317 (run_otf_category): New function.
318 (run_command): Set category-code if necessary. Call
319 run_otf_category for FontLayoutCmdTypeOTFCategory.
320 (run_stages): Set ctx->category. Get category from glyph if
322 (mflt_dump_gstring): New function.
324 2009-11-26 Kenichi Handa <handa@m17n.org>
326 * m17n-flt.c (enum FontLayoutCmdType): New member
327 FontLayoutCmdTypeOTFCategory.
328 (FontLayoutFeatureTable): New type.
329 (FontLayoutCategory): New members feature_table_size and
331 (load_category_table): Handle feature_table.
332 (unref_category_table): Likewise.
333 (load_otf_command): Handle FontLayoutCmdTypeOTFCategory.
334 (load_command): Likewise.
335 (free_flt_command): Likewise.
337 2009-11-10 Kenichi Handa <handa@m17n.org>
339 * draw.c (run_flt): Update category code of each glyph.
341 2009-11-07 Kenichi Handa <handa@m17n.org>
343 * font-ft.c (ft_drive_otf): Don't accumulate anchor adjustments.
345 2009-11-05 Kenichi Handa <handa@m17n.org>
347 * m17n-flt.c (run_otf): Fix updating of g->lbearing, etc.
349 * font-ft.c (ft_drive_otf): Use OTF_drive_gpos2 if possible.
351 2009-10-28 Kenichi Handa <handa@m17n.org>
353 * fontset.c (mdebug_flag): New variable.
354 (mfont__lookup_fontset): Print debug info.
356 * m17n-core.c (m17n_init_core): Call SET_DEBUG_FLAG for
359 * internal.h (enum MDebugFlag): Add MDEBUG_FONTSET.
361 * language.c (mscript__from_otf_tag): Adjusted for the new format
362 of the database <standard script unicode>.
364 2009-10-22 Kenichi Handa <handa@m17n.org>
366 * database.c (check_version): Fix the check.
368 * input.c (surrounding_pos): New arg *pos.
369 (integer_value): Fix handling of "@+0".
370 (take_action_list): Adjusted for the change of surrounding_pos.
372 2009-10-05 Kenichi Handa <handa@m17n.org>
374 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
377 * m17n-flt.c (FontLayoutCategory): New typedef.
378 (FontLayoutStage): Type of the member `category' changed.
379 (struct _MFLT): Type of the member `coverage' changed. New member
380 need_config and font_id.
381 (apply_otf_feature): New function.
382 (load_category_table): New arg FONT. If FONT is non-NULL, call
383 apply_otf_feature. Setup category->definition.
384 (ref_category_table): New macro.
385 (unref_category_table): New function.
386 (load_flt): Adjusted for the type change of category.
387 (free_flt_stage): New arg FLT.
388 (list_flt): Adjusted for the type change of category.
389 (run_stages): Adjusted for the type change of category.
390 (configure_category, configure_flt): New function.
391 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
392 mflt_font_id to NULL.
393 (mflt_get): Skip the heading configured FLTs.
394 (mflt_find): Likewise. If necessary, configure the found flt.
395 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
396 Adjusted for the type change of category.
397 (mflt_iterate_otf_feature, mflt_font_id): New variable.
399 * m17n-X.c (xfont_open): Set rfont->id.
400 (xft_driver): Set xft_iterate_otf_feature.
401 (xft_open): Set rfont->id.
402 (xft_iterate_otf_feature): New function.
404 * font.h (struct MRealizedFont): New member id.
405 (struct MFontDriver): New member iterate_otf_feature.
407 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
409 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
410 (get_otf): New funcition.
411 (ft_check_otf, ft_drive_otf): Use get_otf.
412 (iterate_callback, ft_iterate_otf_feature): New functions.
413 (mfont__ft_driver): Set ft_iterate_otf_feature.
415 * draw.c: Docstring updated.
416 (font_id): New function.
417 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
420 2009-10-02 Kenichi Handa <handa@m17n.org>
422 * m17n-flt.c (load_flt): Check the return value of
425 2009-09-03 Kenichi Handa <handa@m17n.org>
427 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
428 positions are adjusted by GPOS table.
430 2009-08-13 Kenichi Handa <handa@m17n.org>
432 * Version 1.5.5 released.
434 2009-08-13 Kenichi Handa <handa@m17n.org>
436 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
437 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
439 2009-03-03 Kenichi Handa <handa@m17n.org>
441 * draw.c (compose_glyph_string): Check if category not Mnil.
443 2009-03-02 Kenichi Handa <handa@m17n.org>
445 * Version 1.5.4 released.
447 2009-02-25 Kenichi Handa <handa@m17n.org>
449 * m17n-core.c (report_object_array): For M-text and Plist, print
452 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
453 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
455 * input.c (get_candidate_list): Free unnecessary objects.
456 (take_action_list): Free plist.
458 2009-02-04 Kenichi Handa <handa@m17n.org>
460 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
462 2009-01-16 Kenichi Handa <handa@m17n.org>
464 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
467 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
470 2009-01-14 Kenichi Handa <handa@m17n.org>
472 * coding.c (decode_coding_iso_2022): Check invocation status
473 before updating charset0 and charset1.
475 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
477 2008-12-31 Kenichi Handa <handa@m17n.org>
479 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
482 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
484 * face.c (mface_get_prop): Fix strict aliasing bug.
485 (mface_put_prop): Likewise.
487 * m17n-gui.c (mframe): Fix strict aliasing bug.
489 2008-10-20 Kenichi Handa <handa@m17n.org>
491 * Version 1.5.3 released.
493 2008-10-06 Kenichi Handa <handa@m17n.org>
495 * draw.c (mdraw__init): Use TRUE only when
496 FRIBIDI_INTERFACE_VERSION is less than 3.
498 2008-10-03 Kenichi Handa <handa@m17n.org>
500 * database.c (mdatabase__find_file): Return a copy of filename if
501 it is absolute pathname.
503 2008-09-25 Kenichi Handa <handa@m17n.org>
505 * input.c (load_macros): Don't parse the action list here.
506 (load_im_info): Parse action lists of all macros.
508 2008-09-24 Kenichi Handa <handa@m17n.org>
510 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
512 2008-09-19 Kenichi Handa <handa@m17n.org>
514 * input.c (fully_initialize): Rename "@reload" to "-reload".
516 2008-09-17 Kenichi Handa <handa@m17n.org>
518 * m17n-flt.c (run_stages): Fix combining with a variable width
521 2008-08-04 Kenichi Handa <handa@m17n.org>
523 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
526 2008-07-22 Kenichi Handa <handa@m17n.org>
528 * input.c (fully_initialize): Fix previous change.
530 2008-07-19 Kenichi Handa <handa@m17n.org>
532 * input.c (fully_initialize): Fix previous change.
534 2008-07-14 Kenichi Handa <handa@m17n.org>
536 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
538 2008-07-14 Kenichi Handa <handa@m17n.org>
540 * input.c (fully_initialize): Handle C-M-1, etc.
542 2008-07-11 Kenichi Handa <handa@m17n.org>
544 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
546 2008-06-23 Kenichi Handa <handa@m17n.org>
548 * Version 1.5.2 released.
550 2008-06-23 Kenichi Handa <handa@m17n.org>
552 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
553 (M17NLIB_PATCH_LEVEL): Changed to 2.
554 (M17NLIB_VERSION_NAME): Changed "1.5.2".
556 2008-06-13 Kenichi Handa <handa@m17n.org>
558 * input.c (minput_config_file): Comment fixed for man-page.
560 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
562 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
564 2008-05-24 Kenichi Handa <handa@m17n.org>
566 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
568 2008-05-23 Kenichi Handa <handa@m17n.org>
570 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
571 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
573 (libm17n_gd_la_LIBADD): Likewise.
575 * input.c (take_action_list): Fix debug info.
577 2008-05-14 Kenichi Handa <handa@m17n.org>
579 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
580 (run_stages): Fix index of g_indices.
582 2008-04-03 Kenichi Handa <handa@m17n.org>
584 * draw.c (compose_glyph_string): Don't run flt striding over the
586 (get_gstring): Don't use the cached gstring if cursor position is
589 2008-04-02 Kenichi Handa <handa@m17n.org>
591 * input.c (integer_value): Delete the 3rd arg VALUE.
592 (resolve_expression): Adjust the call of integer_value.
593 (take_action_list): Likewise.
595 2008-03-06 Kenichi Handa <handa@m17n.org>
597 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
600 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
602 * Version 1.5.1 released.
604 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
606 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
607 HAVE_FREETYPE is defined.
609 * font.h (OTF_Tag): Be sure that it is defined in any cases.
611 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
613 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
616 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
618 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
620 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
622 * input.c (parse_action_list): Check M_candidates.
623 (get_im_info): If key is Mnil, be sure to set im_info->states to a
626 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
628 * input.c (integer_value): Fix interpretation of "@-N".
630 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
632 * input.c (get_following_char): Fix interpretation of POS.
633 (get_following_char): Fix interpretation of "@+N".
635 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
637 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
640 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
642 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
644 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
646 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
647 (run_command): Check if clustering now before calling
648 UPDATE_CLUSTER_RANGE.
650 2008-01-06 Kenichi Handa <handa@m17n.org>
652 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
654 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
656 * m17n-X.c (xft_find_metric): Set g->g.measured.
658 * m17n-flt.c (Mequal): New variable.
659 (m17n_init_flt): Initialize it.
660 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
661 into a new member facility.
662 (load_command): Modify parsing of Mfont_facility.
663 (run_rule): Adjuted for the change of FontLayoutCmdRule.
664 (run_otf): Adjusted metrics if a->back is nonzero.
666 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
668 * Version 1.5.0 released.
670 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
672 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
674 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
675 (run_rule): Check if a font has the specific glyph correctly.
677 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
678 MDEBUG_FONT_FLT to MDEBUG_FLT.
680 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
682 * font-flt.c: Delete it.
684 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
686 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
687 TO for the rule of SRC_HAS_GLYPH.
689 * draw.c (run_flt): Argument changed.
690 (compose_glyph_string): Adjusted for the above change.
692 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
694 * plist.c (read_mtext_element): Don't free the malloced buffer.
696 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
698 * m17n-core.h (merror_code): Extern it.
700 * m17n-misc.h (merror_code): Don't extern it.
702 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
704 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
706 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
708 * draw.c (compose_glyph_string): Check g->rface->layouter, not
709 g->rface->rfont->layouter.
711 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
713 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
714 (run_rule): Use ctx->encoded_offset.
715 (run_command): Likewise.
716 (run_stages): Set ctx->encoded_offset.
718 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
720 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
721 bit-size of MFLTGlyph->internal.
723 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
725 * draw.c (visual_order): Exclude the last anchor glyph from the
728 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
730 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
731 (run_stages): Likewise.
732 (load_flt): Unref top after checking plist.
734 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
736 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
738 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
740 * m17n-flt.c (Mcombining): New variable.
741 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
742 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
743 SRC_HAS_GLYPH and SRC_OTF_SPEC.
744 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
746 (load_command): Adjusted for the above changes.
747 (run_rule): Likewise.
748 (combining_code_from_class): Delete it.
749 (mflt_get): Check flt->name against Mcombining, not Mt.
751 * internal-flt.h (Mcombining): Extern it.
753 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
754 combining characters.
756 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
758 * face.c (mface__realize): Reset measured flag before calling
761 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
762 (setup_combining_coverage): New function.
763 (setup_combining_flt): New function.
764 (mflt_get): If flt is not found, return NULL. If name if Mt,
765 call setup_combining_flt.
766 (mflt_run): For debugging, print font family name.
768 * font-ft.c (ft_render): Fix handling of baseline_offset.
769 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
770 (ft_render): Check pixel_mode to determine anti_alias.
772 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
773 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
774 (xfont_render): Set baseline_offset in pixel.
775 (xft_render): Fix handling of baseline_offset.
777 * draw.c (run_flt): Set font.font.family.
778 (compose_glyph_string): Fix handling of combining characters.
780 * fontset.c (try_font_list): Check if the named flt is surely
783 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
785 * draw.c (analyse_bidi_level): New function.
786 (visual_order): Do reordering using the already decided
788 (compose_glyph_string): Decide bidi-level before calling flt.
790 * m17n-flt.c (mflt_run): Fix typo.
792 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
794 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
796 * draw.c (visual_order): Don't rely on the width of glyphs.
797 (run_flt): Fix culculation of g->g.to.
799 * m17n-flt.c (run_rule): Don't set error code here.
800 (run_cond): Likewise.
801 (run_otf): Fix culculation of xoff and yoff.
802 (run_command): Don't set error code here.
806 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
807 (xfont_find_metric): Set glyph's yadv to 0.
808 (xft_find_metric): Likewise.
810 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
811 (ft_find_metric): Adjust glyph's metrics.
812 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
813 (ft_drive_otf): Set mark glyph's xadv to 0.
815 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
818 2007-10-29 Kenichi Handa <handa@m17n.org>
820 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
821 (mflt_get): Adjusted for the argument change.
822 (mflt_name): Adjusted for the return value change.
824 * m17n-flt.c (Mgenerator, Mend): New variables.
825 (flt_min_coverage, flt_max_coverage): New variables.
828 (Mfont_has): Renamed from Mexist. Referrers chagned.
829 (gen_otf_tag): Handle the trailing whitespaces.
830 (otf_count_features, otf_store_features): Fix for negative features.
831 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
832 (load_otf_command): Likewise.
833 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
834 (load_flt): Argument changed. Caller changed.
835 (free_flt_list): New function.
836 (run_rule): Adjusted for the change of FontLayoutContext.
837 (mflt_run): Adjusted for the change of FontLayoutContext.
839 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
840 (m17n_fini_win): Call m17n_fini_flt.
842 * m17n-gui.h: Include m17n-flt.h.
844 * m17n-gd.c: Adusted for the change of MGlyph.
846 * m17n-X.c: Adusted for the change of MGlyph.
847 (xft_check_otf, xft_drive_otf): New functions.
849 * internal-gui.h (MGlyph): Modified for new FLT handling.
851 * fontset.c (try_font_list): Adusted for the change of MGlyph.
853 * font-ft.c: Adjusted for the change of MGlyph.
854 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
855 (get_glyph_metric): Deleted.
856 (ft_check_otf): New function.
857 (ft_drive_otf): New fucntion.
859 * font.c: Adjusted for the change of MGlyph.
860 (mfont__init): Don't call mfont__flt_init.
861 (mfont__fini): Don't call mfont__flt_fini.
862 (mfont__get_glyph_id, mfont__get_metrics): New functions.
864 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
865 (MFLTFontForRealized): New struct.
866 (struct MFontDriver): New members check_otf and drive_otf.
867 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
869 * face.c: Adjusted for the change of MGlyph.
871 * draw.c: Adjusted for the change of MGlyph.
873 * m17n.c (m17n_init): Don't call mchar_init.
875 * m17n-core.c (m17n_init_core): Call mchar_init.
877 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
879 * input.c: Include "m17n.h" instead of "m17n-gui.h".
881 * chartab.c (mchartable): Initialize table->min_char to -1.
882 (mchartable_min_char): New function.
883 (mchartable_max_char): New function.
885 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
886 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
888 2007-10-12 Kenichi Handa <handa@m17n.org>
890 * m17n-core.h (Mcharset): Extern it.
891 Move detabase related declarations from m17n.h.
893 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
894 (struct _MFLTOtfFeatures): New struct.
895 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
896 (struct _MFLTFont): Delete otf, add check_otf.
897 (MCHAR_INVALID_CODE): Define it.
899 * plist.c (read_mtext_element): Simplify the code.
901 * m17n.h: Move database related declarations to m17n-core.h
902 (Mharset): Don't extern it.
904 * m17n.c (m17n_init): Don't call mdatabase__init.
906 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
909 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
910 (Mexist): New variable.
911 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
912 (FontLayoutCmdRule): New member src.exist.
913 (parse_otf_command): Handle gsub_count and gpos_count separately.
914 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
915 (load_command): Handle the command "exist".
916 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
917 (run_rule): Handle the case SRC_EXIST.
918 (run_otf): Adjusted for the change of MFLTOtfSpec.
919 (run_command): Check the range of FROM.
920 (check_otf_spec): Delete it.
921 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
923 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
924 (mflt_find): Call font->check_otf instead of check_otf_spec.
925 (mflt_run): Keep the metrics in 26.6 fixed point.
927 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
928 (m17n_init_core): Call mdatabase__init.
930 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
932 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
935 * font-flt.c (Mexist): New variable.
936 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
937 (FontLayoutCmdRule): New member src.exist.
938 (load_category_table): Use isalnum, not isalpha.
939 (load_command): Check the command "exist".
940 (run_rule): Hande the case SRC_EXIST.
941 (run_command): Check the range of FROM.
942 (mfont__flt_init): Initialize Mexist.
944 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
946 * database.h (mdatabase__load_charset_func): Extern it.
948 * database.c: Include m17n-core.h instead of m17n.h.
949 (load_chartable): Use mtext__from_data.
950 (load_charset): Moved to charset.c
951 (load_database): Call mdatabase__load_charset_func instead of
953 (mdatabase__load_charset_func): New variable.
954 (mdatabase__init): Initialize mdatabase__load_charset_func and
955 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
956 (mdatabase__save): Use fwrite, not mconv_encode_stream.
957 (Mcharset): Declare it here.
959 * charset.c: Include "database.h.".
960 (load_charset): Moved from database.c.
961 (mcharset__init): Initialize mdatabase__load_charset_func, don't
964 * character.c (mchar_define_property): Call mdatabase_find directly.
965 (mchar_get_prop): Call mdatabase_add directly.
966 (mchar_put_prop): Call mdatabase_load directly.
967 (mchar_get_prop_table): Likewise.
969 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
970 (libm17n_la_SOURCES): Remove database.[ch].
971 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
973 2007-09-18 Kenichi Handa <handa@m17n.org>
975 * face.c (mface__realize): Try Freetype based font at first.
977 * font.c: Include <ctype.h>
979 2007-09-16 Kenichi Handa <handa@m17n.org>
981 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
983 (run_otf): Call font->get_metrics, not font->get_metric.
984 (run_stages): Likewise.
985 (CHECK_FLT_COVERAGE): New macro.
986 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
987 (check_otf_spec): New function.
988 (m17n_fini_flt): Unref flt->coverage.
989 (mflt_find): Argument changed.
990 (mflt_name): New function.
991 (mflt_coverage): Use CHECK_FLT_COVERAGE.
993 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
994 (mflt_find): Prototype adjusted.
995 (mflt_name): Extern it.
997 2007-09-14 Kenichi Handa <handa@m17n.org>
999 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
1001 * font-flt.c (run_otf): Make debug info printing comaptible with
1003 (run_command): Likewise.
1004 (mfont__flt_run): Likewise.
1006 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
1007 invalid only when it's negative.
1008 (run_otf): Likewise.
1009 (run_command): Likewise.
1010 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
1012 2007-09-10 Kenichi Handa <handa@m17n.org>
1014 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
1015 (struct _MFLTFont): Prototype of get_glyph_id changed.
1017 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
1019 (GAPPEND): Delete this macro.
1020 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
1021 for the change of MFLTGlyph. Caller changed.
1022 (run_otf): Simply calls font->get_glyph_id.
1023 (run_command): Reset g->encoded and g->measured for direct code.
1024 (positioning): Delete this function.
1025 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
1027 2007-09-07 Kenichi Handa <handa@m17n.org>
1029 * draw.c (compose_glyph_string): Improve script detection.
1031 2007-09-06 Kenichi Handa <handa@m17n.org>
1033 * m17n-flt.h (mflt_get): Extern it.
1035 * m17n-flt.c (run_stages): Call positioning only if
1036 font->get_metric is non-NULL.
1037 (CHECK_FLT_STAGES): Fix typo.
1038 (mflt_get): New function.
1040 * font-flt.c (mfont__flt_run): Improve debug info printing.
1042 2007-09-04 Kenichi Handa <handa@m17n.org>
1044 * m17n-flt.c (MFontLayoutTable): Delete this type.
1045 (struct _MFLT): New member mdb and coverage.
1046 (list_flt): Set flt->mdb.
1047 (load_generator): Argument and return value changed. Caller
1049 (get_font_layout_table): Delete this function.
1050 (run_stages): Argument changed. Caller changed.
1051 (CHECK_FLT_STAGES): New macro.
1052 (mfont__flt_encode_char): Argument changed.
1053 (mflt_find): Likewise.
1054 (mflt_coverage): New function.
1055 (mflt_run): Argument changed.
1056 (mdebug_dump_flt): Likewise.
1058 * m17n-flt.h (mflt_coverage): Extern it.
1059 (mflt_find): Prototype adjusted.
1061 2007-09-03 Kenichi Handa <handa@m17n.org>
1063 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
1065 * database.c (mdatabase__props): New function.
1067 * database.h (mdatabase__props): Extern it.
1069 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
1071 (struct _MFLTFont): Add suitable_p.
1072 (mflt_find): Extern it.
1074 * m17n-flt.c: Include "database.h".
1075 (struct _MFLT): New struct.
1076 (list_flt): New function.
1077 (load_flt): Don't update flt_list.
1078 (get_font_layout_table): Use flt_list.
1079 (m17n_init_flt): Don't initialize flt_list.
1080 (m17n_fini_flt): Adjusted for the change of flt_list.
1081 (mflt_find): New function.
1082 (mflt_run): Fix debug printing.
1084 2007-08-23 Kenichi Handa <handa@m17n.org>
1086 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
1087 (run_stages): Print separator in encoded string as "|".
1089 2007-08-23 Kenichi Handa <handa@m17n.org>
1091 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
1092 the glyph is already handled by OTF.
1094 2007-08-21 Kenichi Handa <handa@m17n.org>
1096 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
1098 2007-08-20 Kenichi Handa <handa@m17n.org>
1100 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
1103 2007-08-17 Kenichi Handa <handa@m17n.org>
1105 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
1107 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
1108 (MFLTFont): Prototype of the member drive_otf adjusted.
1110 * m17n-flt.c (run_stages): Fix handling of padding.
1112 * font-ft.c (get_glyph_metric): New function.
1113 (DEVICE_DELTA): Return 26.6 fixed point value.
1114 (adjust_anchor): Likewise.
1115 (mfont__ft_drive_otf): Use get_glyph_metric.
1117 * font-flt.c (mfont__flt_run): Pay attention to padding on
1118 printing debug info.
1120 2007-08-16 Kenichi Handa <handa@m17n.org>
1122 * m17n-flt.c (run_stages): Fix typo.
1124 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
1126 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
1127 Adjusted for the argument change of adjust_anchor. Calculte based
1128 on 26.6 fixed point.
1130 2007-08-15 Kenichi Handa <handa@m17n.org>
1132 * charset.c (mcharset__load_from_database): Set mdebug_flag
1133 instead of mdebug_mask.
1135 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
1138 * database.c (load_database): Set mdebug_flag instead of
1140 (mdatabase__load_for_keys): Likewise.
1142 * draw.c: Include "internal-flt.h".
1143 (dump_combining_code): Don't subtract 128 from combining code
1146 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
1148 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
1150 (run_cond): Likewise.
1151 (run_otf): Likewise.
1152 (run_command): Likewise.
1153 (mfont__flt_run): Change format of debug info.
1155 * font-ft.c: Include "internal-flt.h".
1156 Set mdebug_flag instead of mdebug_mask.
1157 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
1159 * input.c: Set mdebug_flag instead of mdebug_mask.
1160 (shift_state): New MDEBUG_FLAG macro.
1161 (preedit_commit): Likewise.
1164 * internal-flt.h: New file.
1166 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
1167 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
1168 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
1169 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
1170 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
1171 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
1172 these macros to internal-flt.h.
1174 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
1176 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
1177 (enum MDebugMaskBit): Delete this enum.
1178 (enum MDebugFlag): New enum.
1179 (mdebug__flag): Don't extern it.
1180 (mdebug__flags): Extern it.
1181 (MDEBUG_FLAG): New macro.
1182 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
1183 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
1184 (MDEBUG_PRINT_TIME): Likewise.
1186 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
1187 (xfont_list): Likewise.
1189 * m17n-core.c (mdebug__flag): Delete this variable.
1190 (mdebug__flags): New variable.
1191 (SET_DEBUG_FLAG): Make it a function.
1192 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
1193 (m17n_fini_core): Likewise.
1195 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
1196 (m17n_fini_win): Likewise.
1198 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
1200 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
1201 (m17n_fini): Likewise.
1203 * symbol.c (msymbol__free_table): Adjusted for the change of
1206 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
1207 (BASICHEADERS): Add m17n-flt.h.
1208 (FLT_SOURCES): New variable.
1209 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
1210 (libm17n_flt_la_LDFLAGS): Likewise.
1212 * m17n-flt.h: New file.
1214 * m17n-flt.c: New file created by modifying font-flt.c.
1216 2007-07-13 Kenichi Handa <handa@m17n.org>
1218 * Version 1.4.0 released.
1220 2007-07-12 Kenichi Handa <handa@m17n.org>
1222 * input.c: Fix doxygen @ref commands.
1224 2007-07-10 Kenichi Handa <handa@m17n.org>
1226 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
1228 2007-07-09 Kenichi Handa <handa@m17n.org>
1230 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
1232 * m17n.h: Include m17n-core.h if not yet done. Use macros
1233 M17N_BEGIN_HEADER and M17N_END_HEADER.
1235 * m17n-gui.h: Likewise.
1237 * m17n-misc.h: Likewise.
1239 2007-06-13 Kenichi Handa <handa@m17n.org>
1241 * font-flt.c (load_command): Prepend "^" in the regular expression.
1243 2007-06-11 Kenichi Handa <handa@m17n.org>
1245 * language.c (mlanguage_name_list): Fix previous change.
1247 * coding.c (mcoding__load_from_database): Add aliases in
1248 coding_definition_list.
1250 2007-06-10 Kenichi Handa <handa@m17n.org>
1252 * language.c (mlanguage_name_list): Fix previous change.
1254 2007-06-08 Kenichi Handa <handa@m17n.org>
1256 * input.c (update_candidate): Copy candidate_list earlier.
1257 (re_init_ic): Provide pseudo initialize state if none.
1259 2007-06-05 Kenichi Handa <handa@m17n.org>
1261 * input.c (preedit_insert): Print debug information.
1263 * database.c (expand_wildcard_database): New function.
1264 (mdatabase_list): Fix handling of wildcard database.
1266 * language.c (load_lang_name): New function.
1267 (mlang__fini): Cancel the last two changes.
1268 (mlanguage_name_list): New arg script and territories. Use
1271 * m17n.h (mlangauge_name_list): Adjusted.
1273 2007-06-04 Kenichi Handa <handa@m17n.org>
1275 * input.c (open_im): Check if the input method has at least one
1278 2007-06-01 Kenichi Handa <handa@m17n.org>
1280 * input.c (shift_state): Change the format of debug print.
1281 (preedit_commit): New arg need_prefix. Caller changed.
1282 (update_candidate): Copy candidate_list.
1283 (take_action_list): Likewise.
1284 (handle_key): Change the format of debug print.
1286 * font-flt.c (load_flt): Ignore unknown directives.
1288 2007-05-25 Kenichi Handa <handa@m17n.org>
1290 * m17n-core.c (mdebug__unregister_object): Small optimization.
1292 * database.c (find_file): Merged into get_database_file.
1293 (get_database_file): New arg result. Caller changed.
1294 (mdatabase__check): Fix the logic.
1296 2007-05-24 Kenichi Handa <handa@m17n.org>
1298 * database.c (find_database): If unprocessed wildcard database is
1299 found, register database filed and recursively call find_database.
1300 (free_db_info): Unref db_info->properties.
1301 (register_database): New arg properties. Delete code for
1302 initializing mdatabase__list.
1303 (register_databases_in_files): Argument changed. Caller changed.
1304 (mdatabase__update): Don't list files by glob here.
1305 (mdatabase_list): If unprocessed wildcard database is found,
1306 register database filed and recursively call mdatabase_list.
1308 * database.h (enum MDatabaseStatus): New enum
1309 MDB_STATUS_AUTO_WILDCARD.
1311 * input.c (load_branch): Fix previous change.
1312 (update_global_info): If the global database is not found, return -1.
1314 2007-05-23 Kenichi Handa <handa@m17n.org>
1316 * database.c (Mversion): New variable.
1317 (mdatabase__init): Initialize it.
1318 (register_database): New arg properties. Caller changed.
1319 (register_databases_in_files): Don't check version here.
1320 (mdatabase__update): Likewise.
1322 * database.h (MDatabaseInfo): New member properties.
1324 2007-05-21 Kenichi Handa <handa@m17n.org>
1326 * language.c: Include <ctype.h>
1327 (mlanguage__info): Use strncasecmp (not memcmp).
1328 (mlanguage_name): Downcase language name for backward
1331 * input.c (filter): Don't check Mlanguage property of
1334 2007-05-18 Kenichi Handa <handa@m17n.org>
1336 * language.c (mlanguage_name): Fix it to handle M-text English
1339 * input.c (config_command): Set NAME before using it.
1340 (load_branch): Try to resolve a map name by variables.
1342 2007-05-17 Kenichi Handa <handa@m17n.org>
1344 * language.c (mlang__fini): Fix previous change.
1346 2007-05-16 Kenichi Handa <handa@m17n.org>
1348 * plist.c (free_plist): Cancel the last change.
1349 (write_element): Check if PLIST is nested.
1350 (mplist__from_plist): Label a plist as nested if appropriate.
1351 (mplist__from_alist): Label a plist as nested.
1352 (mplist__conc): Check the value of PL before referring it. Label
1353 a plist as nested if appropriate.
1354 (mplist_copy): Label a plist as nested if appropriate.
1355 (mplist_put_func): Return Mnil if KEY is a managing key.
1356 (mplist_push): Label a plist as nested if appropriate.
1358 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
1361 * language.c (mlang__fini): Unref each element of langname_list.
1363 2007-05-14 Kenichi Handa <handa@m17n.org>
1365 * language.c: Include <string.h> and <locale.h>.
1366 (langname_list): New variable.
1367 (load_lang_script_list): Exclude invalid list elements.
1368 (mlang__init): Initialize langname_list.
1369 (mlang__fini): Unref langname_list.
1370 (mlanguage__info): Adjusted for the change of English
1371 name (symbol->M-text).
1372 (mlanguage_name): Label it as obsolete.
1373 (mlanguage_name_list): New function.
1375 * m17n.h (mlanguage_name_list): Extern it.
1377 * locale.c (make_locale): Fix setting of members of locale.
1379 * plist.c (free_plist): Unref also nested plist.
1381 2007-05-11 Kenichi Handa <handa@m17n.org>
1383 * coding.c (mconv_reset_converter): Set internal->used to 0.
1385 2007-05-08 Kenichi Handa <handa@m17n.org>
1387 * input.c (check_description): Force copying the translated text.
1389 2007-05-02 Kenichi Handa <handa@m17n.org>
1391 * input.c (minput_save_config): Unref unnecessary plist. Use
1392 free_im_list to free im_config_list.
1394 2007-04-20 Kenichi Handa <handa@m17n.org>
1396 * input.c (config_command): Fix previous change again.
1397 (config_variable): Likewise.
1398 (minput_config_command): Fix for the case of setting back to
1400 (minput_config_variable): Likewise.
1401 (minput_save_config): Include nil as documentation of customized
1404 2007-04-05 Kenichi Handa <handa@m17n.org>
1406 * input.c (config_command): Fix previous change.
1407 (config_variable): Likewise.
1409 * plist.c (mplist_get_func): Fix for backward compatiblity.
1411 2007-04-04 Kenichi Handa <handa@m17n.org>
1413 * input.c (minput_get_command, minput_config_command): Fix example
1416 2007-03-29 Kenichi Handa <handa@m17n.org>
1418 These changes are to avoid unsafe casting of a function pointer.
1420 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1421 (struct MFace): New member hook.
1423 * face.c (serialize_face): Adjusted for the change of MFace.
1424 (deserialize_face): Likewise.
1425 (mface__init): Likewise. Use msymbol_put_func.
1426 (mface__realize): Adjusted for the change of MFace. Avoid
1428 (mface_get_prop): Adjusted for the change of MFace.
1429 (mface_put_prop): Likewise.
1430 (mface_get_hook): New function.
1431 (mface_put_hook): New function.
1432 (mface_update): Adjusted for the change of MFace.
1434 * input-gui.c (win_callback): Use mplsit_get_func.
1435 (minput__win_init): Use mplsit_put_func.
1437 * input.c (take_action_list): Use mplist_get_func.
1438 (init_ic_info): Likewise.
1439 (fini_ic_info): Likewise.
1440 (minput_callback): Likewise.
1441 (minput__init): Use mplist_put_func.
1443 * language.c (mlang__init): Use msymbol_put_func.
1445 * m17n-core.h (M17NFunc): New function type.
1446 (M17N_FUNC): New macro.
1447 (msymbol_put_func, msymbol_get_func): Extern them.
1448 (mplist_put_func, mplist_get_func): Extern them.
1450 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1452 * m17n-gui.c (mframe): Add a proper casting.
1454 * plist.h (struct MPlist): Make the member val a union.
1455 (MPLIST_VAL): Adjusted for the above change.
1456 (MPLIST_FUNC): New macro.
1457 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1459 * plist.c (mplist_put_func, mplist_get_func): New functions.
1461 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1462 (msymbol_put_func, msymbol_get_func): New functions.
1464 * textprop.c (mtext_serialize): Use msymbol_get_func.
1465 (mtext_deserialize): Likewise.
1467 2007-03-28 Kenichi Handa <handa@m17n.org>
1469 * input.c (get_candidate_list): Avoid unnecessary unref.
1471 2007-03-23 Kenichi Handa <handa@m17n.org>
1473 * database.c (mdatabase__update): Unref plist at the tail.
1475 2007-03-21 Kenichi Handa <handa@m17n.org>
1477 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1479 (config_command): Fix for the case that configuration is
1481 (config_variable): Likewise.
1482 (minput_config_command): If keyseqlist is an empty list, cancel
1484 (minput_config_variable) If value is an empty list, cancel the
1486 (minput_save_config): Handle cancellation of config and customize
1489 2007-03-15 Kenichi Handa <handa@m17n.org>
1491 * input.c (minput_config_variable): Check custom->vars (not
1494 2007-03-01 Kenichi Handa <handa@m17n.org>
1496 * input.c (reload_im_info): Setup cmds, vars, and title of
1498 (check_variable_value): Fix the return value.
1500 * database.c (mdatabase__check): If necessary, update database and
1503 2007-02-28 Kenichi Handa <handa@m17n.org>
1505 * database.c (get_dir_info): Set dir_info->status to
1506 MDB_STATUS_OUTDATED.
1507 (check_version): New function.
1508 (register_database): Don't call find_database.
1509 (register_databases_in_files): Don't register a database of
1511 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1513 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1514 and MDB_STATUS_OUTDATED.
1516 * font.h (struct MFont): Types of members type, source, and
1517 spacing changed to unsigned.
1519 * internal-gui.h (struct): Types of members category and type
1520 changed to unsigned.
1522 * internal.h (struct MText): Types of members format and coverage
1523 changed to unsigned.
1525 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1526 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1528 2007-02-23 Kenichi Handa <handa@m17n.org>
1530 * input.c (Mpop): New variable.
1531 (fully_initialize): Initialize Mpop.
1532 (parse_action_list): Handle Mpop.
1533 (take_action_list): Likewise.
1534 (handle_key): When a key is unhandled, shift to the initial state
1535 only if the current state has no branch action.
1537 2007-02-12 Kenichi Handa <handa@m17n.org>
1539 * input.c (get_preceding_char): Unref mt if necessary.
1540 (get_following_char): Likewise.
1541 (parse_action_list): Fix handling of `insert' action as
1543 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1544 (take_action_list): Check invalid candidate list.
1546 2007-02-06 Kenichi Handa <handa@m17n.org>
1548 * input.c (integer_value): Check also ic->produced for @-N.
1550 2007-01-26 Kenichi Handa <handa@m17n.org>
1552 * database.c (mdatabase__update): Check mdatabase__dir_list from
1555 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1557 2007-01-12 Kenichi Handa <handa@m17n.org>
1559 * input.c (handle_key): Handle a branch action of the initial
1562 2007-01-10 Kenichi Handa <handa@m17n.org>
1564 * m17n-gd.c (gd_render): Delete superfluous line.
1566 2006-12-26 Kenichi Handa <handa@m17n.org>
1568 * m17n.h (minput_callback): Extern it.
1570 * input.h (minput__callback): Delte extern.
1572 * input.c (get_surrounding_text): Adjusted for the change of
1573 minput__callback to minput_callback.
1574 (delete_surrounding_text): Likewise.
1575 (minput_create_ic): Likewise.
1576 (minput_destroy_ic): Likewise.
1577 (minput_filter): Likewise.
1578 (minput_set_spot): Likewise.
1579 (minput_toggle): Likewise.
1580 (minput_reset_ic): Likewise.
1582 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1583 and ic->candidate_to to 0.
1584 (minput_callback): Renamed from minput__callback.
1586 * input-gui.c (win_callback): Adjusted for the change of
1587 minput__callback to minput_callback.
1589 2006-12-15 Kenichi Handa <handa@m17n.org>
1591 * font-ft.c (ft_add_font): Fix typo.
1593 2006-12-06 Kenichi Handa <handa@m17n.org>
1595 * Version 1.3.4 released.
1597 2006-11-16 Kenichi Handa <handa@m17n.org>
1599 * input.c (parse_action_list): Allow (undo 0).
1600 (adjust_markers): New function.
1601 (preedit_insert, preedit_delete): Call adjust_markers.
1602 (preedit_replace): New function.
1603 (update_candidate): Call preedit_replace instead of preedit_insert
1605 (filter): When ic_info->commit_key_head is nonzero, shift input
1606 event keys even if there's no committed text.
1608 2006-11-10 Kenichi Handa <handa@m17n.org>
1610 * input.h (MInputContextInfo): New member commit_key_head.
1612 * input.c (preedit_commit): Update ic_info->commit_key_head.
1613 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1614 (filter): When committed, shift keys by ic_info->commit_key_head.
1616 2006-10-30 Kenichi Handa <handa@m17n.org>
1618 * input.c (preedit_delete): Fix typo.
1619 (take_action_list): Print more debugging information. Allow
1620 variable in arg of 'select' and `pushback'.
1622 * database.c (gen_database_name): Don't put extra space.
1623 (load_database): Print debugging information.
1624 (register_databases_in_files): New arg headlen. Callers changed.
1625 (mdatabase__load_for_keys): Shorten debugging information.
1626 (mdatabase_load): Don't print debugging information here.
1628 2006-10-27 Kenichi Handa <handa@m17n.org>
1630 * input.c (marker_code): New arg surrounding. Callers changed.
1631 (surrounding_pos): Check if name[0] == '@'.
1632 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1633 (take_action_list): Likewise.
1634 (get_preceding_char): If POS is zero, always call
1635 get_surrounding_text.
1637 2006-10-19 Kenichi Handa <handa@m17n.org>
1639 * input.c (load_variables): Fix setting of `global'.
1641 2006-10-16 Kenichi Handa <handa@m17n.org>
1643 * draw.c (draw_background): Be sure to set *to_x.
1644 (render_glyph_string): If from == to, just return.
1646 2006-10-18 Kenichi Handa <handa@m17n.org>
1648 * database.c (get_dir_info): Return NULL if the directory name is
1650 (register_databases_in_files): Call register_database with
1652 (mdatabase__update): Fix logic. Call register_database with
1654 (mdatabase_define): Call register_database with
1655 MDB_STATUS_EXPLICIT.
1657 * input.c (delete_surrounding_text): Be sure to set members
1658 preceding_text and following_text to NULL.
1659 (shift_state): Save variable values in ic_info->vars_saved.
1660 (preedit_commit): Don't print debug information here. Don't
1661 change ic_info->keys here.
1662 (get_candidate_list): Don't ref plist.
1663 (take_action_list): Don't unref return value of
1664 get_candidate_list. For undo, reset ic->produced and recover
1665 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1667 (init_ic_info): Set ic_info->vars_saved.
1668 (fini_ic_info): Unref ic_info->vars_saved.
1669 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1671 (filter): Be sure to set members preceding_text and following_text
1672 to NULL. Print debug information about produced text. Delete
1673 processed keys from ic_info->keys.
1675 * input.h (MInputContextInfo): New member vars_saved.
1677 2006-10-16 Kenichi Handa <handa@m17n.org>
1679 * database.c (mdatabase__update): Fix the way to get db_info.
1681 2006-10-02 Kenichi Handa <handa@m17n.org>
1683 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1684 `size' changed to 24.
1686 * font.c (xlfd_unparse_name): Adjusted for the change of
1688 (font_score): Likewise.
1689 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1691 * m17n-X.c (MFontX, _MFontX): Deleted.
1692 (SET_SIZE, HAVE_SIZE): Deleted.
1693 (free_display_info): Adjusted for the change of
1694 disp_info->font_list format.
1695 (xfont_registry_list): Likewise.
1696 (xfont_open): Likewise.
1697 (xfont_list): Likewise.
1698 (xfont_encode_char): Ignore size to find a realized font.
1699 (MRealizedFontXft): Change the order of members to make it
1700 compatible with MRealizedFontFT.
1702 2006-09-27 Kenichi Handa <handa@m17n.org>
1704 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1705 (mfont_close): Add comments.
1707 * mtext-lbrk.c (mtext_line_break): Add comment.
1709 2006-09-26 Kenichi Handa <handa@m17n.org>
1711 * input.c (minput_get_description): Handle description about
1712 inclusion-only input methods.
1714 2006-09-21 Kenichi Handa <handa@m17n.org>
1716 * input.c (M_gettext): New variable.
1717 (fully_initialize): Initialize M_gettext.
1718 (check_description): New function.
1719 (load_commands): Call check_description.
1720 (config_all_commands): Be sure to unref pl.
1721 (load_variables): Call check_description.
1722 (config_all_variables): Be sure to unref pl.
1723 (load_im_info): Call check_description.
1725 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1727 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1728 and bind_textdomain_codeset.
1730 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1732 2006-09-15 Kenichi Handa <handa@m17n.org>
1734 * input.c (reload_im_info): Update custom and global info.
1735 (init_ic_info): Fix previous change.
1737 2006-09-14 Kenichi Handa <handa@m17n.org>
1739 * database.c: Include <libgen.h>.
1740 (mdatabase__lock): Make a directory if necessary.
1742 * input.c (resolve_command): Adjusted for the format change of
1743 configured_cmds member.
1744 (load_commands, load_variables): Fix for errornous data handling.
1745 (config_command, config_variable): New function.
1746 (config_all_commands, config_all_variables): Renamed from
1747 config_commands and config_variables. Utilize the above function.
1748 (check_variable_value): Argument changed. Callers changed.
1749 (load_im_info): Call config_all_commands and config_all_variables.
1750 (init_ic_info): Adjusted for the format change of configured_vars
1752 (minput__init): Initialize Mcustomized, Mconfigured, and
1754 (Mcustomized, Mconfigured, Minherited): New variables.
1755 (minput_get_command): Be sure to return NULL if an input method
1756 use no local command.
1757 (minput_get_variable): Be sure to return NULL if an input method
1758 use no local variable.
1759 (minput_config_command, minput_config_variable)
1760 (minput_save_config): Adjusted for the format change of
1761 configured_cmds and configured_vars members.
1763 * plist.c (write_element): Delete superfluous ':'.
1765 2006-09-13 Kenichi Handa <handa@m17n.org>
1767 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1768 (minput_config_file): Extern it.
1770 * draw.c (Minherited): Declaration moved to input.c.
1771 (mdraw__init): Don't initialize Minherited here.
1773 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1775 2006-09-07 Kenichi Handa <handa@m17n.org>
1777 * textprop.c (mtext_serialize): Call mplist__serialize with the
1780 * plist.h (mplist__serialize): Prototype adjusted.
1781 (mplist__assq): Extern it.
1783 * plist.c: Include <ctype.h>
1784 (PUTC, PUTS): New macros.
1785 (write_symbol): New function.
1786 (write_element): New arg indent.
1787 (dump_string, dump_plist_element): Delete them.
1788 (mplist__from_string): New arg pretty.
1789 (mplist__assq): New function.
1790 (mdebug_dump_plist): Use write_element.
1792 * mtext.c (mtext_cat_char): Allocate more memory.
1793 (mdebug_dump_mtext): Don't escal a newline character.
1795 * m17n.h (minput_get_command, minput_get_variable)
1796 (minput_config_command, minput_config_variable)
1797 (minput_save_config): Extern them.
1799 * m17n-core.c: Include <string.h>.
1800 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1801 use the stream stdout instead of a file of that name.
1803 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1806 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1807 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1808 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1809 (MDEBUG_DUMP): Flush the stream.
1811 * input.h (struct _MInputMethodInfo): Delete member im. New
1812 members mdb, language, name, extra, cmds, configured_cmds,
1813 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1814 (MInputContextInfo): New member tick.
1816 * input.c: Big change to improve user-side input method
1817 customization. Here, list just public API changes.
1818 (minput_get_commands, minput_get_variables)
1819 (minput_assign_command_keys, minput_set_variable): Label them
1821 (minput_get_command, minput_get_variable)
1822 (minput_config_command, minput_config_variable)
1823 (minput_save_config): New functions.
1825 * database.h (PATH_MAX): Define it if not yet defined.
1826 (PATH_SEPARATOR): Likewise.
1827 (enum MDatabaseStatus): New enum.
1828 (struct MDatabaseInfo): Moved from database.c. New members status,
1829 time, lock_file, and uniq_file.
1830 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1831 (mdatabase__unlock): Extern them.
1833 * database.c: Include <time.h>.
1834 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1835 (GEN_PATH): Args changed. Callers changed.
1836 (struct MDatabaseInfo): Moved to database.h.
1837 (struct MDatabase, mdb_list): Deleted.
1838 (mdatabase__list): New var.
1839 (get_database_filename): Deleted. Callers changed to use
1841 (find_file, get_database_file): New files.
1842 (get_dir_info): Initialize new members of MDatabaseInfo.
1843 (find_database): Arg chagnded. Callers changed.
1844 (free_db_info, register_database, register_databases_in_files):
1846 (update_database_list): Deleted.
1847 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1848 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1849 (mdatabase__update): New function.
1850 (mdatabase__check): Return value changed.
1851 (mdatabase__file, mdatabase__lock, mdatabase__save)
1852 (mdatabase__unlock): New functions.
1854 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1856 * input.c (get_surrounding_text): Return -2 when surrounding text
1858 (get_following_char): Likewise.
1859 (get_preceding_char): Likewise.
1860 (minput__callback): Return 0 if there is a callback function,
1863 2006-08-17 Kenichi Handa <handa@m17n.org>
1865 * input.c (reset_ic): Use shift_state to setup the current state.
1867 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1869 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1870 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1871 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1873 2006-08-02 Kenichi Handa <handa@m17n.org>
1875 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1877 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1879 * font-ft.c (ft_encapsulate): Add code for debugging.
1880 (mfont__ft_drive_otf): Be sure to encode character before getting
1883 2006-07-21 Kenichi Handa <handa@m17n.org>
1885 * draw.c (mdraw_text_extents): Fix previous typo.
1887 2006-07-19 Kenichi Handa <handa@m17n.org>
1889 * draw.c (gstring_width): New arg lbearing.
1890 (render_glyph_string): Adjusted for the change of gstring_width.
1891 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1893 * m17n-core.h (Mlanguage): Extern it.
1895 * m17n.h (Mlanguage): Extern deleted.
1897 * mtext.c (mtext__init): Initialize Mlanguage.
1898 (Mlanguage): Declaration moved from locale.c
1900 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1901 (Mlanguage): Declaration moved to mtext.c.
1903 * language.c (mlang__init): Don't initialize Mlanguage here.
1905 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1907 2006-07-14 Kenichi Handa <handa@m17n.org>
1909 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1910 (MRealizedFontFT): New member face_encapsulated.
1911 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1912 (ft_gen_font): New function.
1913 (ft_add_font): Use ft_gen_font.
1914 (ft_list_script): Store lists in ft_script_list.
1915 (ft_check_otf): New arg ft_face. Caller changed.
1916 (ft_check_language): Likewise.
1917 (ft_check_script): Likewise.
1918 (ft_encapsulate, ft_close): New functions.
1919 (mfont__ft_driver): Initialize members encapsulate and close.
1920 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1922 * font.h (struct MRealizedFont): New member encapsulating.
1923 (struct MFontDriver): New members encapsulate and close.
1925 * font.c (mfont__match_p): If FONT is realized, check capability
1926 by font drivers's check_capability method.
1927 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1930 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1931 declarations of foundry and fam local vars.
1932 (xft_driver): Make it static.
1934 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1935 (mfont_close): Extern them.
1937 * m17n-gd.c (device_open): Don't specify foundry and family of the
1940 2006-07-11 Kenichi Handa <handa@m17n.org>
1942 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1944 2006-07-13 Kenichi Handa <handa@m17n.org>
1946 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1948 (ft_check_script): Delete unused var.
1949 (ft_list_capability): Likewise.
1951 * font.c (mfont__get_capability): Setup cap->otf.
1952 (Motf): Make it global.
1953 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1955 * font.h (MFontCapability): New member otf.
1957 * language.c (mlang__fini): Delete unused vars.
1959 * m17n-gui.h (Motf): Extern it.
1961 * database.c (update_database_list): Delete unused vars.
1963 2006-07-07 Kenichi Handa <handa@m17n.org>
1965 * font-ft.c (DEVICE_DELTA): Fix typo.
1967 2006-07-06 Kenichi Handa <handa@m17n.org>
1969 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1972 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1974 * database.c: Update comments.
1976 2006-07-05 Kenichi Handa <handa@m17n.org>
1978 * database.c (PATH_MAX): Define it if not yet defined.
1979 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1981 (get_database_filename): Use GEN_PATH.
1982 (get_dir_info): Don't include the last '/' in directory name.
1983 (register_database): New function.
1984 (update_database_list): Use register_database. Search all
1985 directories in mdatabase__dir_list for wildcard databases.
1986 (mdatabase__init): Check "~/.m17n.d".
1988 2006-07-03 Kenichi Handa <handa@m17n.org>
1990 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1991 push reverse property.
1993 * plist.c (dump_plist_element): Fix previous change.
1995 2006-06-28 Kenichi Handa <handa@m17n.org>
1997 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
2000 * draw.c (MbidiNSM): New variable.
2001 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
2002 attention to bidi type NSM.
2003 (mdraw__init): Initialize MbibiNSM.
2005 * language.c (mscript__char_list): Fix finding a char-list element.
2007 * plist.c (dump_string): Return number of printed characters.
2008 (dump_plist_element): Print elements more compactly.
2010 2006-06-23 Kenichi Handa <handa@m17n.org>
2012 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
2013 (include_HEADERS): Likewise.
2015 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
2017 * language.c: Update documentation.
2019 2006-06-23 Kenichi Handa <handa@m17n.org>
2021 * font-ft.c (struct MFontFT): Delete member lang.
2022 (free_ft_info): Don't unref member lang. Destroy members langset
2024 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
2025 changed. Set members langset and charset.
2026 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
2028 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
2030 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
2031 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
2032 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
2033 characters at first. If it fails, try listing by language names.
2034 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
2035 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
2036 change of MFontCapability.
2037 (ft_list_capability): Likewise. Try listing by languages, then by
2038 scripts. Check OTF at last.
2039 (ft_check_script): New function.
2040 (ft_select): Adjusted for the check of MFontCapability.
2041 (ft_list_family_names): New function.
2042 (ft_check_capability): If cap->script is not Mnil, call
2044 (mfont__ft_driver): Initialize with ft_list_family_names.
2046 * font.h (struct MFontDriver): New member list_fmaily_names.
2047 (struct): Change member "MSymbol *lang" to "MSymbol language".
2049 * font.c: Include "language.h".
2050 (Motf): New variable.
2051 (otf_script_list, load_otf_script_list): Delete it.
2052 (find_script_from_otf_tag): Delete it.
2053 (merge_capability): New function.
2054 (mfont__init): Init Motf.
2055 (mfont__fini): Don't unref otf_script_list.
2056 (free_font_capability): Check cap->script_tag to determine if
2057 OTF-related capability is set.
2058 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
2059 the change of type MFontCapability.
2060 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
2061 and Motf properties.
2062 (mfont_list): Call merge_capability for LANGUAGE arg.
2063 (mfont_list_family_names): New function.
2065 * input-gui.c: Typo in comments fixed.
2067 * input.c: Typo in comments fixed.
2069 * language.h (mlanguage__list): Delete it.
2070 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
2073 * language.c: Include "mtext.h".
2074 (M_script_lang_list): Delete it.
2075 (language_list, script_list): New variables.
2076 (load_lang_script_list, init_language_list, init_script_list): New
2078 (mlang__init): Don't load language database here.
2079 (mlang__fini): Unref language_list and script_list if not NULL.
2080 (mlanguage__list): Delete it.
2081 (mlanguage__info, mscript__info, mscript__char_list)
2082 (mscript__otf_tag, mscript__from_otf_tag): New functions.
2083 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
2084 (mscript_list, mscript_language_list): New functions.
2086 * m17n-gui.h (mfont_list_family_names): Extern it.
2088 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
2089 (mlanguage_text, mscript_list, mscript_language_list): Extern
2092 2006-06-21 Kenichi Handa <handa@m17n.org>
2094 * m17n-X.c (xfont_driver): Initialize with
2095 xfont_list_family_names.
2096 (xfont_list_family_names): New function.
2097 (xft_driver): Initialize with NULL for list_family_names member.
2098 (device_init): Set list_family_names member of xft_driver to that
2099 of mfont__ft_driver.
2101 2006-06-06 Kenichi Handa <handa@m17n.org>
2103 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
2105 2006-03-24 Kenichi Handa <handa@m17n.org>
2107 * font-ft.c (ft_open): Improve debug message.
2109 * fontset.c (mfontset__get_font): Fix for the case that no font in
2110 per_script list is available.
2112 2006-02-06 Kenichi Handa <handa@m17n.org>
2114 * Version 1.3.3 released.
2116 2006-02-22 Kenichi Handa <handa@m17n.org>
2118 * textprop.c: Fix some typos in documentation.
2120 * plist.c: Fix some typos in documentation.
2122 * m17n-core.h: Fix some typos in documentation.
2123 (M17NLIB_PATCH_LEVEL): Updated to 3.
2124 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
2126 * symbol.c: Fix some typos in documentation.
2128 * mtext.c: Fix some typos in documentation.
2130 * input.c: Fix several typos in documentation.
2132 2006-02-06 Kenichi Handa <handa@m17n.org>
2134 * Version 1.3.2 released.
2136 2006-02-03 Kenichi Handa <handa@m17n.org>
2138 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
2139 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
2141 * font.c (xlfd_parse_name): Fix handling of the name "nil".
2143 * draw.c (layout_glyphs): Fix handling left_padding of
2146 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
2148 2006-02-02 Kenichi Handa <handa@m17n.org>
2150 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
2151 if WITH_GUI is true.
2153 2006-01-25 Kenichi Handa <handa@m17n.org>
2155 * input.c (resolve_expression): If the value of PLIST is a plist,
2156 but the first element is not symbol, return 0.
2158 2006-01-17 Kenichi Handa <handa@m17n.org>
2160 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
2161 HAVE_GD is 2 or the greater.
2163 2006-01-16 Kenichi Handa <handa@m17n.org>
2165 * Version 1.3.1 released.
2167 2006-01-16 Kenichi Handa <handa@m17n.org>
2169 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
2170 simulating anti-aliasing.
2172 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
2173 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
2175 2006-01-12 Kenichi Handa <handa@m17n.org>
2177 * input.c (get_surrounding_text): Always pop ic->plist.
2178 (reset_ic): Don't reset ic->plist.
2180 2006-01-10 Kenichi Handa <handa@m17n.org>
2182 * input.c (preedit_commit): For debugging, print only commiting
2183 charactes. Don't set ic->candidate_show to 0.
2184 (handle_key): Don't run branch-actions just by shifting to the
2186 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
2187 Reset vars and plist.
2189 2006-01-07 Kenichi Handa <handa@m17n.org>
2191 * input.c (load_branch): Confirm that maps is not NULL.
2193 2006-01-05 Kenichi Handa <handa@m17n.org>
2195 * input-gui.c (win_filter): Try to convert arg to key only when
2198 * plist.c (read_integer_element): If '#' and '-' are followed by
2199 non-integer-constituent, read them as a part of a symbol.
2200 (read_symbol_element): New arg C.
2201 (read_element): Adjust args to read_symbol_element.
2203 * input.c (load_macros): On overwriting a macro, free the old
2205 (minput__init): Store Mmap in load_im_info_keys.
2206 (minput_get_title_icon): If the input method has no title, be sure
2208 (minput_get_description): If the input method has no description,
2209 be sure to return NULL.
2210 (minput_get_variables): Fix documentation.
2211 (handle_key): Pay attention to the case that key is Mnil.
2212 (filter): Likewise. Fix handling of such symbol as S-A.
2214 2005-12-22 Kenichi Handa <handa@m17n.org>
2216 * Version 1.3.0 released.
2218 2005-12-22 Kenichi Handa <handa@m17n.org>
2220 * font-ft.c (ft_list): If the specified font has no property,
2223 2005-12-20 Kenichi Handa <handa@m17n.org>
2225 * character.c (mchar_get_prop): Check char_prop_list.
2226 (mchar_put_prop, mchar_get_prop_table): Likewise.
2228 2005-12-18 Kenichi Handa <handa@m17n.org>
2230 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
2231 file name sans language.
2233 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
2235 * input.c: Fix typo in comments.
2237 2005-12-14 Kenichi Handa <handa@m17n.org>
2239 * input.c (minput_get_title_icon): Check the default icon for the
2242 2005-12-13 Kenichi Handa <handa@m17n.org>
2244 * input.c (Mless_equal, Mgreater_equal): New variables.
2245 (parse_expression, resolve_expression, parse_action_list)
2246 (take_action_list): Handle the aboves.
2247 (filter): Treat key S-X as X.
2248 (minput__init): Initialize Mless_equal and Mgreater_equal.
2249 (minput_get_title_icon): New function.
2251 * m17n.h (minput_get_title_icon): Extern it.
2253 * database.c (get_database_filename): Return a filename instead of
2255 (load_database): Adjusted for the above change.
2256 (mdatabase__load_for_keys): Likewise.
2257 (mdatabase__find_file): New function.
2259 * database.h (mdatabase__find_file): Extern it.
2261 * font.h (mfont__resize): Delete extern.
2263 * font.c (mfont__list): Check resize ratio.
2264 (mfont__resize): Delete it.
2265 (mfont_resize_ratio): Include the code of mfont__resize.
2267 * font-ft.c (ft_open): Check resize ratio.
2269 * m17n-X.c (xfont_open): Check resize ratio.
2270 (xft_open): Likewise.
2272 2005-12-07 Kenichi Handa <handa@m17n.org>
2274 * input.c (take_action_list): If take_action_list return -1,
2276 (handle_key): Likewise.
2278 * face.c (mface__for_chars): When font is specified and layouter
2279 is found for it, if the layouter doesn't support one of a
2280 character, use a face sans layouter for it.
2282 2005-12-06 Kenichi Handa <handa@m17n.org>
2284 * fontset.c (mfont__lookup_fontset): If only a fallback font is
2285 found, don't use it for more than one character.
2287 2005-12-05 Kenichi Handa <handa@m17n.org>
2289 * face.c (mface__realize): Set rfont->layouter to Mnil.
2290 (mface__for_chars): Fix handling of layouter.
2292 * character.h (mchar__define_prop): Extern it.
2294 * database.c (update_database_list): Call mchar__define_prop if
2297 * character.c (mchar__init): Don't call mchar_define_property.
2298 Instead just initialize property keys.
2299 (mchar__fini): Free char_prop_list only if it's not NULL.
2300 (mchar__define_prop): New function.
2301 (mchar_define_property): Call mchar__define_prop.
2303 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
2306 2005-12-02 Kenichi Handa <handa@m17n.org>
2308 * language.c (mlang__init): Handle extra chars.
2310 * m17n-gui.h (mfont_check): Adjust prototype.
2312 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
2313 (xfont_check_capability): New function.
2314 (xft_driver): Specify xft_check_capability.
2315 (xft_check_capability): New function.
2317 * font-ft.c (M0_3): Delete it.
2319 (ft_get_charmaps): Refer to M0.
2320 (fc_parse_pattern): Fix previous change.
2321 (ft_list_language): Check also extra chars.
2322 (ft_check_otf): Define it even if HAVE_OTF is undef.
2323 (ft_check_lang): Check the result of FcLangSetHasLang against
2324 FcLangDifferentLang. Check also extra chars.
2325 (ft_list_capability): Delete ifdef HAVE_OTF.
2326 (ft_select): Likewise.
2327 (ft_open): Improve debug information.
2328 (ft_check_capability): New function.
2329 (mfont__ft_driver): Specify ft_check_capability.
2330 (mfont__ft_init): Initialize M0.
2332 * fontset.c (get_font_from_group): New function.
2333 (mfontset__get_font): New function.
2335 * fontset.h (mfontset__get_font): Extern it.
2337 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
2338 (mfont__fini): Delete ifdef HAVE_OTF.
2339 (free_font_capability): Likewise.
2340 (mfont__get_capability): Likewise.
2341 (mfont__check_capability): New function.
2342 (mfont_check): Change the order of arguments. Use
2345 * font.h (struct MFontDriver): New member check_capability.
2346 (MFontCapability): Delete ifdef HAVE_OTF.
2347 (mfont__check_capability): Extern it.
2349 * face.c (mface__realize): Fix handling of FONT arg.
2350 (mface__for_chars): Fix handling of explicitly specified font.
2352 2005-11-25 Kenichi Handa <handa@m17n.org>
2354 * font-flt.c (run_command): Print debug info for
2357 * draw.c (layout_glyphs): Fix handling of left/right_padding.
2359 * face.c (mface__for_chars): Check rfont before accessing the
2362 2005-11-21 Kenichi Handa <handa@m17n.org>
2364 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
2367 * fontset.c (fontset_table): New variable.
2368 (free_fontset): Call M17N_OBJECT_UNREGISTER.
2369 (mfont__fontset_init): Add fontset_table as an object array.
2370 (mfont__realize_fontset): Ref FONTSET.
2371 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2372 (mfontset): Call M17N_OBJECT_REGISTER.
2373 (mfontset_copy): Likewise.
2375 * input.c (handle_key): For debugging, print information about
2377 (filter): Add an alias for Meta and Alt modifiers.
2378 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2380 (minput__init): Initialize them.
2381 (parse_expression): New function.
2382 (resolve_expression): New function.
2383 (parse_action_list): Handle expressions by parse_expression.
2384 (take_action_list): Handle expressions by resolve_expression.
2385 (parse_nested_list_value): Fix previous change.
2386 (resolve_command): Fix handling of the return value of
2389 2005-11-18 Kenichi Handa <handa@m17n.org>
2391 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2392 HAVE_OTF is defined.
2393 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2395 (ft_select): Likewise.
2397 * font.c (mfont_list): Fix for the case that FONT is NULL.
2398 (OTF_tag): Delete it.
2399 (load_otf_script_list): Define only when HAVE_OTF is defined.
2400 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2403 * draw.c (truncate_gstring): Be sure to truncate at
2404 glapheme-cluster boundary.
2406 2005-11-11 Kenichi Handa <handa@m17n.org>
2408 * input.c (delete_surrounding_text): Clear cache if necessary.
2410 2005-11-09 Kenichi Handa <handa@m17n.org>
2412 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2413 glyph prev is also supported by the current flt.
2415 2005-11-08 Kenichi Handa <handa@m17n.org>
2417 * m17n-X.c (xft_render): Cancel previous change.
2419 2005-11-07 Kenichi Handa <handa@m17n.org>
2421 * input.c: Include <stdlib.h>.
2422 (get_surrounding_text, delete_surrounding_text)
2423 (get_preceding_char, get_following_char): New functions.
2424 (integer_value): New arg surrounding. If it is nonzero, try to
2425 get a surrounding character. Callers changed.
2426 (take_action_list): Check `value' before setting an element.
2427 (destroy_ic): Unref ic_info->preceding_text and
2428 ic_info->following_text.
2429 (minput__init): Initialize Minput_get_surrounding_text and
2430 Minput_delete_surrounding_text.
2431 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2433 (filter): Unref ic_info->preceding_text and
2434 ic_info->following_text.
2436 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2439 * input.h (MInputContextInfo): New members preceding_text and
2442 2005-11-04 Kenichi Handa <handa@m17n.org>
2444 * input.c (parse_nested_list_value): Fix handling of the global
2446 (get_nested_list): Get global definitions by load_partial_im_info.
2447 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2448 MInputCandidatesChanged.
2449 (take_action_list): Likewise.
2450 (reset_ic): Likewise.
2451 (create_ic): Don't pay special attention to
2452 Mcandidates_group_size.
2453 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2454 (minput_set_variable): Get a definition of varible by
2455 mplist_find_by_value, not mplist_get.
2457 * m17n.h (enum MInputCandidatesChanged): New enum.
2459 2005-11-01 Kenichi Handa <handa@m17n.org>
2461 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2463 (mwin__destroy_window): If xft_draw's drawable is win, change it
2464 to device->drawable before destroying win.
2466 2005-10-31 Kenichi Handa <handa@m17n.org>
2468 * input.c (load_im_info): Fix adding of state.
2470 * m17n-core.c (m17n_fini_core): Fix reporting of module
2473 * m17n.c (m17n_fini): Fix reporting of module finalization.
2475 * m17n-gui.c (m17n_init_win): Fix reporting of module
2478 2005-10-29 Kenichi Handa <handa@m17n.org>
2480 * input.c (get_candidate_list): Fix the timing of referring plist.
2482 2005-10-28 Kenichi Handa <handa@m17n.org>
2484 * input.c (load_branch): Ignore an undefined map name.
2485 (load_im_info): Set im_info->title from `name' only if it's not
2487 (shift_state): Always update ic->status.
2488 (adjust_candidates): Renamed from adjust_candidate_command.
2489 Argument changed. Caller changed.
2490 (get_candidate_list, regularize_action): New functions.
2491 (take_action_list): Use them. On handling Munhandle, don't set
2493 (handle_key): If KEY is not handled by MAP, and MAP has
2494 branch_actions, perform them.
2496 * database.c (mdatabase__fini): Free dir_info->filename;
2498 2005-10-20 Kenichi Handa <handa@m17n.org>
2500 * input.c (marker_code): Accept '@@'.
2501 (integer_value): Handle '@@'.
2502 (parse_action_list): Accept a symbol argument.
2503 (take_action_list): Resolve the symbol argument. Handle the
2506 2005-10-18 Kenichi Handa <handa@m17n.org>
2508 * input.c: Include "charset.h".
2509 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2511 (MIMState): New member (M17NObject control).
2512 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2513 (get_nested_list, resolve_variable): New functions.
2514 (integer_value): New arg (MPlist **value). Set it to the plist
2515 element containing the value.
2516 (resolve_command): New function.
2517 (load_translation): New arg (MPlist *map_actions).
2518 (load_branch): New args language and name. If `keylist' is a
2519 symbol, resolved that as a command name.
2520 (free_map): New arg top. Free map->map_actions only if top is
2522 (free_state): New function.
2523 (load_state): New arg name.
2524 (im_info_list): New variable.
2525 (free_im_info, get_im_info_by_tags): New functions.
2526 (load_im_info): Arg key changed to plist. Handle `include'.
2527 Return (MInputMethodInfo *).
2528 (preedit_commit): Ref ic->candidate_list.
2529 (get_select_charset, adjust_candidate_command): New functions.
2530 (take_action_list): Handle `include'. Adjust candidate action
2531 properly. Handle control variables `candidates-charset' and
2532 `candidates-group-size'.
2533 (open_im): Use get_im_info.
2534 (create_ic): Get global variables.
2535 (load_partial_im_info): New function.
2536 (get_im_info): New function.
2537 (check_command_keyseq, check_command_list, check_variable_list):
2539 (minput__init): Don't handle M_database_hook and Mdetail_text.
2540 Initialize M_candidates, Mcandidates_group_size,
2541 Mcandidates_charset.
2542 (parse_variable_list, get_variable_list, parse_command_list)
2543 (get_command_list): Delete them.
2544 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2545 (minput__fini): Simply unref command_list and variable_list.
2546 (minput_get_description): Adjusted for the new form of description.
2547 (minput_get_commands): Use get_nested_list.
2548 (minput_assign_command_keys): Likewise.
2549 (minput_get_variables, minput_set_variable): Likewise.
2551 * input.h (MInputMethodInfo): New members im and maps.
2553 * database.h (M_database_hook): Delete extern.
2554 (MDatabaseHookFunc): Delete extern.
2555 (mdatabase__check): Extern it.
2557 * database.c: Include <glob.h>.
2558 (MAX_TIME): New macro.
2559 (Masterisk): New variable.
2560 (get_database_stream): Argument changed to (MDatabaseInfo *).
2562 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2563 (find_database): New function.
2564 (update_database_list): New function.
2565 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2566 calling update_database_list.
2567 (mdatabase__check): New function.
2568 (mdatabase_find): Use update_database and find_database. Don't
2569 handle MDatabaseHookFunc.
2570 (mdatabase_list): Call update_database at first.
2571 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2572 (MDatabaseList): New type.
2574 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2576 * m17n.h (Mdetail_text): Delete extern.
2578 * m17n-core.h (mplist_conc): Delete extern.
2580 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2582 (mplist_conc): Renamed to mplist__conc.
2583 (mplist__pop_unref): New function.
2585 2005-10-14 Kenichi Handa <handa@m17n.org>
2587 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2589 (read_element): If keys is an empty plist, return any element
2591 (dump_plist_element): Check if plist is nested.
2592 (mplist_conc): Always ref tail.
2593 (mplist_set): If key is a managing key, ref val in advance.
2595 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2596 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2597 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2600 * fontset.c (free_fontset): Unref fontset_list if necessary.
2601 (mfont__fontset_fini): Don't free fontset_list. Unref
2603 (mfont__realize_fontset): Initialize request.
2604 (mfontset): Ref default_fontset or fontset only if necessary.
2605 (mfontset_copy): Don't ref copy.
2607 * draw.c (render_glyphs): Check gend->type before checking
2610 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2611 unrefed plists to NULL.
2613 2005-10-04 Kenichi Handa <handa@m17n.org>
2615 * textprop.c (mtext_serialize): Be sure to make mt
2616 MTEXT_FORMAT_UTF_8 and NULL terminated.
2618 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2620 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2622 2005-10-03 Kenichi Handa <handa@m17n.org>
2624 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2625 is not at the beginning of line.
2627 2005-09-22 Kenichi Handa <handa@m17n.org>
2629 * input.c: Include <sys/stat.h> and <unistd.h>.
2630 (Minclude, Mcommit, Munhandle): New variables.
2631 (minput__init): Initialize them. Push only Mstate to
2632 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2633 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2635 (load_input_method): Handle "include" directive. If no states are
2637 (shift_state): If state_name is Mt, shift back to the previous
2638 state. Call preedit_commit to commit preedit text.
2639 (preedit_commit): New function.
2640 (take_action_list): Improve debug printing. Handle commit and
2642 (handle_key): Check the return value of take_action_list. Don't
2643 take branch_actions just after changing to the root map.
2644 (reset_ic): Reset all ic_info members.
2645 (filter): When a key is not handled, just move ic_info->keys
2646 instead fo calling reset_ic.
2647 (load_im_info): If key is not Mstate, push Mmap to
2649 (MDatabaseStatList): New type.
2650 (imdir_stat_list): New variable.
2651 (input_method_hook): Don't cancel the hook. Check the
2652 modification time of directories.
2653 (minput__fini): Free imdir_stat_list;
2655 * input.h (MInputContextInfo): New member prev_state.
2657 * m17n-core.h (mplist_conc): Extern it.
2659 * plist.c (mplist_conc): New function.
2661 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2663 * font.h (MRealizedFont): New member average_width.
2665 * font-ft.c (ft_open): Set rface->average_width.
2667 * font.c (xlfd_unparse_name): Print '*' before registry name.
2669 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2670 (xfont_open): Set rfont->average_width.
2671 (xft_open): Likewise.
2672 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2674 * internal-gui.h (struct MFrame): New member average_width.
2676 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2677 (mframe_get_prop): Return the average_width of a font.
2679 * face.c (mface__realize): Set rface->average_width.
2680 (mface__update_frame_face): Set frame->average_width.
2682 * face.h (MRealizedFace): New member average_width.
2684 2005-09-19 Kenichi Handa <handa@m17n.org>
2686 * font.c (xlfd_unparse_name): New arg full_xlfd.
2687 (mfont__encode_char): Use shortcut only for X core fonts.
2688 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2689 (mfont_put_prop): Handle `language' property.
2690 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2691 Print file can capability info too.
2693 * m17n-core.c (mdebug__output): New variable.
2694 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2695 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2696 (m17n_fini_core): Close mdebug__output if it's not stderr.
2698 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2699 (xfont_open): Handle baseline_offset.
2700 (xfont_find_metric): Likewise.
2701 (xfont_render): Likewise.
2702 (xft_open): Likewise.
2703 (xft_render): Likewise.
2705 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2706 (mdebug__output): Extern it.
2707 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2708 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2709 (MDEBUG_DUMP): New macro.
2710 (MDEBUG_PRINT_TIME): Print to medebug__output.
2712 * font.h (MRealizedFont): New member baseline_offset.
2714 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2716 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2717 (ft_list_family): Check alias.
2718 (ft_list_language): If language is "en", don't try to the second
2720 (ft_default_list): New variable.
2721 (ft_list_default): New function.
2722 (ft_select): If family is not specified, try only the default
2723 fonts. Treat the weights normal and medium same.
2724 (ft_open): Fix debug message. If registry is not specified, try
2725 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2726 (ft_find_metric): Likewise.
2727 (ft_render): Likewise.
2728 (ft_list): Fix debug message. Accept the registring iso8859-1.
2729 If family is not specified, try only the default fonts.
2731 * face.c (mface__realize): Fix logic of opening a font.
2733 2005-09-16 Kenichi Handa <handa@m17n.org>
2735 * face.c (mface__realize):
2737 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2740 * input.c (shift_state): Fix the condition of taking init actions.
2741 (take_action_list): Fix handling of pushback action.
2742 (handle_key): Don't change key while checking its alias.
2743 (minput__init): Initialize new variables.
2744 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2747 2005-09-12 Kenichi Handa <handa@m17n.org>
2749 * mtext.c (mtext__uppercase): Add proper open/close parens.
2750 (mtext_titlecase): Add proper casting.
2752 * input.c (parse_action_list): Handle the case that the arg is a
2753 key sequence (MText or MPlist).
2754 (take_action_list): Likewise.
2755 (shift_state): Shorter debug message.
2756 (handle_key): Terminate a debug message by "\n".
2757 (reset_ic): Don't take initial actions here.
2758 (minput_open_im): Print a debug message.
2759 (minput_close_im): Likewise.
2760 (minput_create_ic): Likewise.
2761 (minput_destroy_ic): Likewise.
2763 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2765 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2768 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2769 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2772 * character.c: Add Japanese documentation for
2773 mchar_get_prop_table ().
2775 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2777 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2778 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2779 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2781 (init_case_conversion): New function.
2782 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2783 (uppercase_precheck, lowercase_precheck, final_sigma)
2784 (after_soft_dotted, more_above, before_dot, after_i)
2785 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2787 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2789 * plist.c (read_mtext_element): Fix previous change.
2791 2005-09-05 Kenichi Handa <handa@m17n.org>
2793 * plist.c (read_mtext_element): Handle \uXXXX notation.
2795 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2796 (MTABLE_ALLOCA): Change the name of local variable.
2798 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2799 HAVE_FREETYPE are defined.
2801 * m17n-X.c: Check HAVE_X11.
2803 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2804 directory listing libraries.
2805 (noinst_PROGRAMS): Define it only in maintainer mode.
2807 2005-09-02 Kenichi Handa <handa@m17n.org>
2809 * m17n-gui.h (mdraw_line_break_option): Extern it.
2811 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2812 end of the first glyph.
2813 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2815 (mdraw_line_break_option): New variable.
2816 (mdraw_default_line_break): Use mtext_line_break.
2818 * mtext.h (wordseg_func_table): Don't extern it.
2819 (mtext__wseg_fini): Extern it.
2821 * mtext.c: Don't include word-thai.h.
2822 (wordseg_func_table): Delete this variable.
2823 (mtext__init): Don't initialize above. Don't call
2824 mtext__word_thai_init.
2825 (mtext__fini): Don't free wordseg_func_table. Call
2826 mtext__wseg_fini instead fo mtext__word_thai_fini.
2827 (MTextWordsegFunc): Don't typedef it.
2828 (mtext__word_segment): Moved to mtext-wseg.c.
2830 * m17n-core.h (enum MTextLineBreakOption): New enum.
2831 (mtext_line_break): Extern it.
2833 * mtext-wseg.c: New file.
2835 * mtext-lbrk.c: New file.
2837 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2838 add mtext-lbrk.c and mtext-wseg.c.
2840 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2841 the case that head is NULL.
2843 2005-09-01 Kenichi Handa <handa@m17n.org>
2845 * word-thai.c (wordseg_propertize): If the property value is nil,
2846 don't make the property no-merge.
2847 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2848 attention to the case that they are NULL.
2849 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2852 * character.c (mchar_get_prop_table): New function.
2854 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2856 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2857 (mchar_get_prop_table): Extern it.
2859 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2860 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2862 * internal.h (enum MTextCoverage): New enum.
2863 (MText): New member coverage.
2865 * mtext.c (FORMAT_COVERAGE): New macro.
2866 (insert): Copy mt2->coverage.
2867 (mtext__from_data): Initialize mt->coverage.
2868 (mtext__adjust_format): Update mt->coverage.
2869 (mtext): Initialize mt->coverage.
2870 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2871 Update mt->coverage if necessary.
2872 (mtext_duplicate): Copy mt->coverage.
2873 (mtext_insert, mtext_replace): New functions.
2874 (mtext_dup): Use mtext_duplicate.
2875 (mtext__word_segment): Don't set *from and *to if a word
2876 segmentation funcion is not found.
2877 (mtext_ins_char): Fix typo.
2879 2005-08-25 Kenichi Handa <handa@m17n.org>
2881 * font.h (MFont): New member for_full_width.
2883 * font.c (compare_font_score): Prefer a font of not
2886 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2887 registry charset of a font is one of CJK charsets.
2889 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2890 supports some of CJK.
2892 2005-08-24 Kenichi Handa <handa@m17n.org>
2894 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2896 * m17n-gui.c (null_device_open): Check Mresolution param and set
2899 * m17n-gd.c (device_open): Check Mresolution param and set
2902 * m17n-X.c (MWDevice): New member resy.
2903 (xfont_open): Set ascent, descent, and max_advance members of
2905 (xft_open): Likewise.
2906 (device_open): Compare also screen_num to find a device. Set
2907 device->resy and frame->dpi.
2909 * internal-gui.h (MFrame): New member dpi.
2911 * font.h (MRealizedFont): New member max_advance.
2913 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2914 (mfont__init): Don't initialize Mascent, Mdescent.
2915 (Mascent, Mdescent): Delete these variables.
2916 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2917 Mfont_descent instead of Mascent and Mdescent.
2918 (mfont_put_prop): Allow negative size.
2919 (mfont_find): Handle the case of spec->size < 0. Fix previous
2921 (mfont_list): Handle the case of spec->size < 0.
2922 (mfont_check): Likewise.
2924 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2925 (fc_get_pattern): Handle the case of font->size < 0.
2926 (ft_open): Set ascent, descent, and max_advance members of rfont.
2927 (ft_find_metric): Improve rounding.
2928 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2931 * face.c (mface__realize): Handle the case of font->size < 0.
2933 2005-08-22 Kenichi Handa <handa@m17n.org>
2935 * coding.c (MConverterStatus): Change the member buf to union.
2936 (mconv_buffer_converter): Add const to the arg buf.
2937 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2938 (mconv_decode): Adjusted for the change of MConverterStatus.
2939 (mconv_encode_range): Likewise.
2941 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2942 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2944 2005-08-20 Kenichi Handa <handa@m17n.org>
2946 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2947 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2949 * m17n-X.c (xfont_open): Set members ascent, descent, and
2950 max_advance of rfont.
2951 (xft_open): Likewise.
2953 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2955 (mfont__ft_parse_name): Add const to the arg name.
2957 * font.c (xlfd_parse_name): Add const to the arg name. Call
2958 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2959 (xlfd_unparse_name): Handle spacing.
2960 (mfont__init): Initialize new variables.
2961 (mfont__id): Handle spacing.
2962 (mfont__merge): Likewise.
2963 (mfont__set_spec): This function deleted.
2964 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2965 condition of calling mfont__ft_parse_name.
2966 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2967 (mfont_get_prop): Handle properties spacing, ascent, descent,
2969 (mfont_find): Return a realized font.
2970 (mfont_from_name): Add const to the arg name.
2972 * font.h (enum MFontProperty): New member MFONT_SPACING.
2973 (enum MFontSpacing): New enum.
2974 (MFont): New members spacing and max_advance.
2975 (mfont__ft_parse_name): Prototype adjusted.
2976 (mfont__set_spec): Extern deleted.
2977 (mfont__parse_name_into_font): Prototype adjusted.
2979 2005-08-19 Kenichi Handa <handa@m17n.org>
2981 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2983 * font.c (mfont_list): If FONT is null, use a temporary font.
2984 (mfont_parse_name): Add const to the arg name.
2986 2005-08-18 Kenichi Handa <handa@m17n.org>
2988 * word-thai.c: Surround code by #ifdef and #endif to escape from
2991 * font-ft.c: Mostly re-written.
2993 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2994 (FontLayoutCmd): Type of the member otf changed..
2995 (load_otf_command): Adjusted for the format change of otf command.
2996 (load_command): Likewise.
2997 (free_flt_command): Unref cmd->body.otf.
2998 (run_otf): Ajusted for the type change of otf_cmd.
2999 (run_command): Ajusted for the type change of otf_cmd. On
3000 debugging, print ctx->combining_code.
3001 (mfont__flt_run): Initialize ctx's members code_offset,
3002 combining_code, and left_padding to 0.
3004 * face.h (struct MRealizedFace): New member font.
3005 (mface__realize): Prototype adjusted.
3007 * face.c (find_realized_face): New arg font.
3008 (find_realized_face): Adjusted for the change of MFont.
3009 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
3010 (mface__fini): Don't call mdebug__report_object.
3011 (mface__realize): New arg font.
3012 (mface__for_chars): Adjusted for the change of mfont__encode_char.
3013 Optimize the latin case.
3014 (mface__free_realized): Free rface->font.
3015 (mface__update_frame_face): Adjusted for the change of mface__realize.
3016 (mface_equal): New function.
3018 * draw.c (Mcommon): New variable.
3019 (visual_order): Args to mfont__encode_char changed.
3020 (compose_glyph_string): Handle Mfont text property.
3021 (layout_glyphs): Adjusted for the change of MFont.
3022 (mdraw__init): Initialize Mcommon.
3023 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
3025 * font.h (enum MFontType): Members completely changed.
3026 (enum MFontProperty): Move MFONT_SIZE to the tail.
3027 (enum MFontSource): New enum.
3028 (struct MFont): New members type, source, sizes, file, capability,
3030 (struct MRealizedFont): Type of member font changed. Members
3031 score, status, and encoding deleted.
3032 (MFontScore): New type.
3033 (MFontList): Member changed.
3034 (struct MFontDriver): New member has_char. Types of members
3036 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
3037 (Mapple_roman): Extern them.
3038 (OTF_Tag): Typedefed if not HAVE_OTF.
3039 (enum MFontOpenTypeTable): New enum.
3040 (MFontCapability): New type.
3041 (mfont__ft_drive_otf): Prototype adjusted.
3042 (mfont__score): Extern deleted.
3043 (mfont__merge): Extern it.
3044 (mfont__has_char): Extern it.
3045 (mfont__encode_char): Prototype adjusted.
3046 (mfont__open): Extern it.
3047 (mfont__set_spec): Prototype adjusted.
3048 (mfont__get_capability): Extern it.
3050 * font.c: Include "fontset.h".
3051 (M_font_capability, M_font_list, M_font_list_len): New variables.
3052 (font_score_priority): Change order of initial elements.
3053 (font_score_shift_bits): Fix array size.
3054 (common_weight): Add "thin", "semibold", and "heavy".
3055 (common_stretch): Add "ultracondensed", "extracondensed",
3056 "extraexpanded", and "utltraexpand".
3057 (font_weight_regular, font_weight_normal, font_weight_medium): New
3059 (gen_font_name): This function deleted.
3060 (find_encoding): Set font->encoding.
3061 (OTF_tag): New function.
3062 (otf_script_list): New variable.
3063 (load_otf_script_list): New function.
3064 (find_script_from_otf_tag): New function.
3065 (xlfd_parse_name): Set font->type and font->source.
3066 (mfont__free_realized): Free chains rfonts.
3067 (font_score): Renamed from mfont__score.
3068 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
3069 (Mapple_roman): New variables.
3070 (mfont__init): Initilize new variables. Initalize
3071 default_encoding.encoding_name and
3072 default_encoding.encoding_charset to Municode_full and
3073 mcharset__unicode. Use SAFE* macros for allocating filepath
3075 (mfont__fini): Free otf_script_list.
3076 (mfont__id): New function.
3077 (mfont__match_p): Check also capability member of MFont.
3078 (mfont__merge): New funciton.
3079 (mfont__set_spec_from_face): Set type and source members.
3080 (mfont__set_spec_from_plist): Set capability and type members.
3081 (mfont__select): Argument changed.
3082 (mfont__available): New function.
3083 (compare_font_score): New function.
3084 (mfont__list): New function.
3085 (mfont__open): Return a realized font.
3086 (mfont__resize): Adjusted for the change of MFont.
3087 (mfont__has_char): New function.
3088 (mfont__encode_char): Argument changed.
3089 (mfont__set_spec): Argument changed.
3090 (free_font_capability): New function.
3091 (mfont__get_capability): New function.
3092 (MFontfile): New variable.
3093 (mfont_get_prop): Adjusted for the change of MFont.
3094 (mfont_put_prop): Likewise.
3095 (mfont_set_selection_priority): Fix the way of setting
3096 font_score_priority[].
3097 (mfont_find): Use mfont__list instead of mfont__select.
3098 (mfont_resize_ratio): Adjusted for the change of MFont.
3099 (mfont_list): Use mfont__list.
3100 (mfont_check): New function.
3101 (font_score): Make it static.
3103 * fontset.h (mfont__realize_fontset): Prototype adjusted.
3104 (mfont__lookup_fontset): Likewise.
3106 * fontset.c (struct MFontset): Delete member font_spec_list.
3107 (struct MRealizedFontset): Type of member spec changed. New
3109 (load_font_group): Arg spec_list deleted.
3110 (load_fontset_contents): Adjusted for the change of fontset_def.
3111 (free_fontset): Fix the way of freeing fontset elements.
3112 (realize_fontset_elements): Argument changed.
3113 (get_per_script): New function.
3114 (free_realized_fontset_elements): Fix the way of feeing rfontset
3116 (update_fontset_elements): Fix args to realize_fontset_elements.
3117 (mfont__realize_fontset): New arg spec.
3118 (try_font_list): New function.
3119 (try_font_group): New arg request. Use try_font_list.
3120 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
3122 (mfontset): Adjusted for the change of MFontset.
3123 (mfontset_copy): Likewise. Don't share plists.
3124 (mfontset_modify_entry): Adjusted for the change of MFontset.
3125 (mfontset_lookup): Call get_per_script.
3126 (mdebug_dump_fontset): Print also the address of fonts.
3128 * input.c (shift_state): Don't reset ic_info->vars.
3129 (take_action_list): Call MDEBUG_PRINT fore calling
3132 * internal-gui.h (MFontDriver): Don't typedef it here.
3134 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
3135 (MXFont): This type deleted.
3137 (struct _MFontX): New struct.
3138 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
3139 (MDisplayInfo): Member base_font_list deleted.
3140 (DEFAULT_FONT): Definition changed.
3141 (FALLBACK_FONT): This maclr deleted.
3142 (free_display_info): Adjusted for the change of MDisplayInfo.
3143 (free_device): Argument to mfont__free_realized changed.
3144 (xfont_driver): Adjusted for the change of MFontDriver.
3145 (xfont_registry_list): Use MFontX instead of MXFont.
3146 (MRealizedFontX): Renamed from MXFontInfo.
3147 (xfont_select): Return the font found first.
3148 (close_xfont): Change MXFontInfo to MRealizedFontX.
3149 (xfont_open): Return the realized font.
3150 (xfont_find_metric): Get xfont from rfont->fontp.
3151 (xfont_has_char): New function.
3152 (xfont_encode_char): Adjusted for the argument change.
3153 (xfont_render): Get xfont from rfont->fontp.
3154 (xfont_list): Adjusted for the argument change.
3155 (MRealizedFontXft): Renamed from MXftFontInfo.
3156 (xft_driver): Ajusted for the change of MFontDriver.
3157 (close_xft): Change MXtfFontInfo to MRealizedFontXft
3158 (xft_open_font): Argument changed.
3159 (xft_open): Argument changed. Return the realized font.
3160 (xft_find_metric): Get xft_font from rfont->fontp.
3161 (xft_has_char, xft_encode_char): New functions.
3162 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
3163 font if not yet opened.
3164 (device_open): Don't set frame->font.
3166 * m17n-gd.c (gd_font_driver): Adjusted for the change of
3168 (gd_font_open): New function.
3169 (gd_render): Don't use the local variable ft_info.
3170 (device_init): Adjusted for the change of gd_font_driver.
3172 * textprop.c (mtext__prop_init): Initialize text_property_table.
3173 Call M17N_OBJECT_ADD_ARRAY.
3174 (mtext__prop_fini): Don't call mdebug__report_object.
3176 * plist.c (mplist__init): Initialize plist_table.
3177 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
3178 (mplist__fini): Don't call mdebug__report_object.
3180 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
3181 (mtext__fini): Don't call mdebug__report_object.
3182 (MTEXT_FORMAT_UTF_16): Correct type.
3183 (mtext_data): New function.
3184 (mtext_text): Fix calculation of limit and args to
3187 * language.c: Include "plist.h".
3188 (M_script_lang_list): New variable.
3189 (mlang__init): Read languages and their information from m17n
3191 (mlanguage__list): New function.
3192 (Miso639_1, Miso639_2): New variables.
3194 * language.h (mlanguage__list): Extern it.
3196 * database.c (get_database_stream): Use SAFE_* macros for
3197 allocating and freeing path.
3198 (mdatabase__init): Likewise.
3200 * symbol.c (msymbol__fini): Don't free symbols here.
3201 (msymbol__free_table): New function.
3202 (msymbol_is_managing_key): New function.
3204 * symbol.h (msymbol__free_table): Extern it.
3205 (msymbol__list): Extern it.
3207 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
3209 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
3210 (struct _M17NObjectArray): New member name and next.
3211 (mdebug__add_object_array): Extern it.
3212 (M17N_OBJECT_ADD_ARRAY): New macro.
3213 (mdebug__report_object): Don't extern it.
3215 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
3217 * m17n-gui.c (free_frame): Don't free frame->font.
3218 (null_device_fini): Fix code for freeing
3219 null_device.realized_font_list.
3220 (m17n_fini_win): Free interface.
3221 (mframe): Cast the return value of dlsym. Set frame->font here.
3222 (mframe_get_prop): Check frame->rface->rfont before accessing the
3225 * m17n-gui.h (Mfontfile): Extern it.
3226 (mfont_check): Extern it.
3227 (mface_equal): Extern it.
3229 * m17n-core.c: Include "symbol.h".
3230 (report_header_printed): This variable deleted.
3231 (object_array_root): New variable.
3232 (report_object_array): New function.
3233 (mdebug__report_object): This function deleted.
3234 (mdebug__add_object_array): New function.
3235 (m17n_init_core): Call mchartable_init () before mtext_init ().
3236 (m17n_fini_core): Call report_object_array (if necessary) and
3237 msymbol__free_atable at the end.
3239 * m17n-core.h (msymbol_is_managing_key): Extern it.
3240 (mtext_data): Extern it.
3241 (MTEXT_FORMAT_UTF_16): Correct type.
3242 (M17NLIB_MINOR_VERSION): Changed to 3.
3243 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
3245 * chartab.c (mchartable__init): Initalize chartable_table.count.
3246 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
3247 mdebug__report_object.
3249 2005-05-26 Kenichi Handa <handa@m17n.org>
3251 * m17n.h (Miso639_1, Miso639_2): Extern them.
3253 * symbol.h (msymbol__list): Extern it.
3255 * symbol.c (msymbol__list): New function.
3257 2005-05-19 Kenichi Handa <handa@m17n.org>
3259 * input-gui.c (minput__win_init): Don't change the value of
3262 2005-05-16 Kenichi Handa <handa@m17n.org>
3264 * m17n-core.c (m17n_object): Be sure to initialize all members.
3266 * font-ft.c (fc_decode_prop): Fix args to msymbol.
3268 2005-05-09 Kenichi Handa <handa@m17n.org>
3270 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
3272 2005-04-27 Kenichi Handa <handa@m17n.org>
3274 * language.c (mlang__init): Add "an" (Aragonese).
3276 * word-thai.c: Add support for libthai.
3277 (mtext__word_thai_init): Initialize wordseg library conditionaly.
3278 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
3280 * mtext.c: Include "word-thai.h" conditionaly.
3281 (mtext__init): Call mtext__word_thai_init conditionaly.
3282 (mtext__fini): Call mtext__word_thai_fini conditionaly.
3284 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
3285 not WORDCUT_LD_FLAGS.
3287 2005-04-19 Kenichi Handa <handa@m17n.org>
3289 * word-thai.c (wordseg_propertize): Always unref the attached
3291 (thai_wordseg): Don't unref the property.
3293 2005-04-18 Kenichi Handa <handa@m17n.org>
3295 * word-thai.c: Include stdlib.h.
3296 (wordseg_propertize): Add dummy function for the case that wordcut
3297 library doesn't exist.
3298 (wordseg_propertize): Fix for old wordcut library.
3300 2005-04-16 Kenichi Handa <handa@m17n.org>
3302 * word-thai.c: Include <stdio.h>.
3304 2005-04-15 Kenichi Handa <handa@m17n.org>
3306 * draw.c: Include mtext.h.
3307 (linebreak_table, M_break_at_space, M_break_at_word)
3308 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
3309 (compose_glyph_string): Check POS before getting Mface text
3311 (truncate_gstring): Give correct TO arg to line_break function.
3312 (GET_LB_TYPE): New macro.
3313 (find_break_backward, find_break_forward): New functions.
3314 (mdraw__init): Initialize the above new variables.
3315 (mdraw__fini): Free linebreak_table.
3316 (mdraw_default_line_break): Use find_break_backward and
3319 * word-thai.c: New file.
3321 * word-thai.h: New file.
3323 * mtext.c: Include word-thai.h.
3324 (wordseg_func_table): New variable.
3325 (mtext__init): Initialize wordseg_func_table and call
3326 mtext__word_thai_init.
3327 (mtext__fini): Call mtext__word_thai_fini, free
3329 (MTextWordsegFunc): New type.
3330 (mtext__word_segment): New function.
3332 * mtext.h (wordseg_func_table): Extern it.
3333 (mtext__word_segment): Extern it.
3335 * m17n.c (m17n_init): Fix typo (== -> =).
3337 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
3338 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
3340 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
3341 (MTEXTPROP_VAL): New macros.
3343 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
3345 2005-04-07 Kenichi Handa <handa@m17n.org>
3347 * database.c (load_chartable): Fix pursing of symbol name.
3349 2005-03-24 Kenichi Handa <handa@m17n.org>
3351 * m17n.c (m17n_init): Fix typo (== -> =).
3353 2005-03-11 Kenichi Handa <handa@m17n.org>
3355 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
3357 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
3359 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
3362 2005-03-09 handa <handa@m17n.org>
3364 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
3365 calling m17n_init ().
3367 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
3368 calling m17n_init_core ().
3370 2005-02-28 Kenichi Handa <handa@m17n.org>
3372 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3375 2005-02-17 Kenichi Handa <handa@m17n.org>
3377 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3378 (M_description, M_command, M_variable): New variables.
3379 (load_im_info_keys): New variables.
3380 (load_im_info, check_command_keyseq, get_description_advance)
3381 (parse_command_list, get_command_list, parse_variable_list)
3382 (get_variable_list, input_method_hook): New functions.
3383 (command_list, variable_list): New variables.
3384 (minput__init): Put input_method_hook to Minput_method.
3385 Initialize M_description, M_command, M_variable, Mdetail_text,
3386 load_im_info_keys, command_list, variable_list.
3387 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3388 (Mdetail_text): New variable.
3389 (minput_get_description, minput_get_commands)
3390 (minput_assign_command_keys, minput_get_variables)
3391 (minput_set_variable): New functions.
3393 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3394 (minput_assign_command_keys, minput_get_variables)
3395 (minput_set_variable): Extern them.
3397 * plist.c (UNGETC): Just decrement st->p.
3398 (read_mtext_element): New arg skip.
3399 (read_integer_element): Likewise.
3400 (read_symbol_element): Likewise.
3401 (read_element): New arg KEYS.
3402 (mplist__from_plist): Don't increment ref-count of NULL object.
3403 (mplist__from_file): New arg KEYS.
3404 (mplist_put): Don't increment ref-count of NULL object.
3405 (mplist_add): Likewise.
3406 (mplist_push): Likewise.
3407 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3409 * plist.h (mplist__from_file): Prototype adjusted.
3411 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3412 (get_database_stream): New function.
3413 (load_database): Use get_database_stream.
3414 (M_database_hook): New variable
3415 (mdatabase__init): Initialize M_database_hook.
3416 (mdatabase__load_for_keys): New function.
3417 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3419 (mdatabase_define): Free mdb->extra_info if necessary.
3421 * database.h (mdatabase__dir_list, M_database_hook)
3422 (mdatabase__load_for_keys): Extern them.
3423 (MDatabaseHookFunc): New type.
3425 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3427 2004-12-27 Kenichi Handa <handa@m17n.org>
3429 * Version 1.2.0 released.
3431 2004-12-27 Kenichi Handa <handa@m17n.org>
3433 * input.c (minput_filter): Don't reset ic->xxx_changed.
3435 * mtext.c (mtext_from_data): Fix documentation.
3437 2004-12-25 Kenichi Handa <handa@m17n.org>
3439 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3440 (M17NLIB_VERSION_NAME): Update to "1.2.".
3442 2004-12-24 Kenichi Handa <handa@m17n.org>
3444 * input.c (reset_ic): Set key_unhandled to 0.
3446 2004-12-21 Kenichi Handa <handa@m17n.org>
3448 * m17n-gui.h (mfont_from_spec): Delete extern.
3450 * input-gui.c (win_callback): Handle Minput_reset.
3451 (minput__win_init): Register reset_ic as a callback for
3454 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3455 changed. At first, shift to the initial state.
3456 (minput__init): Initialize Minput_reset. Register reset_ic as a
3457 callback for Minput_reset.
3458 (Minput_reset): New variable.
3459 (minput_filter): Always set ic->xxx_changed to 0.
3460 (minput_reset_ic): New function.
3461 (integer_value): Fix typo ('>' -> '<') and calculation of length
3464 * m17n-core.c (merror_code): Change type to `int'.
3466 * m17n-misc.h (merror_code): Adjust type.
3468 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3470 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3471 (mtext_change_prop): Delete extern.
3473 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3474 to `int'. Move the documents to m17n-core.h.
3476 2004-12-13 Kenichi Handa <handa@m17n.org>
3478 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3479 (MTextProperty): Document it.
3481 2004-12-09 Kenichi Handa <handa@m17n.org>
3483 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3485 2004-12-03 Kenichi Handa <handa@m17n.org>
3487 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3488 m17n__gui_initialized): New externs.
3490 * m17n-core.h (enum M17NStatus): New enum.
3491 (m17n_status): Extern it.
3493 * m17n-core.c (core_initialized): Delete this variable.
3494 (m17n__core_initialized, m17n__shell_initialized,
3495 m17n__gui_initialized): New variables.
3496 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3497 instead of core_initialized.
3498 (m17n_status): New function.
3500 * m17n.c (shell_initialized): Delete this variable.
3501 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3504 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3506 * m17n-gui.c (win_initialized): Delete this variable.
3507 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3508 instead of gui_initialized.
3510 2004-11-19 Kenichi Handa <handa@m17n.org>
3512 * input.c (reset_ic): Check if ic_info->state is NULL.
3513 (filter): If ic_info->state is NULL, return 0.
3514 (load_input_method): Don't unref `maps' it it's not created.
3516 2004-11-15 Kenichi Handa <handa@m17n.org>
3518 * input.c (find_candidates_group): If INDEX is -1, find the last
3520 (take_action_list): If the previous of the first candidate is
3521 requested, select the last candidate.
3523 2004-11-08 Kenichi Handa <handa@m17n.org>
3525 * m17n-X.c (device_open): Try at most 32 fonts to find a
3526 non-autoscaled font.
3528 * font.c (xlfd_parse_name): Fix previous change.
3530 2004-11-05 Kenichi Handa <handa@m17n.org>
3532 * font.c: (commont_style): Include dummy elements "slanted" and
3533 "rslanted" to prefer "o" to "r" if "i" is requested.
3535 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3537 2004-10-29 Kenichi Handa <handa@m17n.org>
3539 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3541 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3542 New members smallest and larger.
3543 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3544 (xfont_registry_list): Likewise.
3545 (xfont_select): Likewise.
3548 2004-10-28 Kenichi Handa <handa@m17n.org>
3550 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3551 font name comparison.
3552 (xfont_select): Fix logic for selecting a larger size font.
3554 2004-10-25 Kenichi Handa <handa@m17n.org>
3556 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3559 2004-10-22 Kenichi Handa <handa@m17n.org>
3561 * input.c (update_candidate): Renamed from udpate_candidate.
3562 (take_action_list): Show more debugging info on arithmetic commands.
3564 * m17n-X.c (device_open): Fix previous change.
3566 * draw.c (compose_glyph_string): Don't get face property at the
3569 2004-10-21 Kenichi Handa <handa@m17n.org>
3571 * draw.c (compose_glyph_string): Fix for the case of category
3574 2004-10-19 Kenichi Handa <handa@m17n.org>
3576 * input.c (mdebug_mask): New variable.
3577 (shift_state): Print debug information.
3578 (take_action_list): Likewise.
3579 (handle_key): Likewise.
3581 2004-10-14 Kenichi Handa <handa@m17n.org>
3583 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3585 2004-10-13 Kenichi Handa <handa@m17n.org>
3587 * m17n-X.c (device_open): Be sure to register at least one font
3590 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3591 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3593 2004-10-12 Kenichi Handa <handa@m17n.org>
3595 * draw.c (alloc_gstring): Fix previous change.
3597 * font-ft.c (ft_list_generic): Fix for the case of not
3600 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3602 * font.c (mfont_list): If no font is found, return NULL.
3603 (load_font_encoding_table): Put entries of nil registry first.
3604 (find_encoding): Adjust for the above change.
3606 2004-10-11 Kenichi Handa <handa@m17n.org>
3608 * m17n-gui.h (mfont_list): Adjust prototype.
3610 * m17n-X.c (xfont_list): New arg maxnum.
3612 * font.h (struct MFontDriver): Change prototype of <list>.
3614 * font-ft.c (fc_generic_family_list): Delete it.
3615 (Mserif, Msans_serif, Mmonospace): Delete them.
3616 (M_generic_family_info): New variable.
3617 (enum GenericFamilyType): New enum.
3618 (struct GenericFamilyInfo): New struct.
3619 (generic_family_table): New variable.
3620 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3622 (add_font_info): Get style here.
3623 (ft_list_family): Don't initialize fc_config here. Don't list
3625 (ft_list_generic): New function.
3626 (ft_select): Pay attention to generic familes here.
3627 (ft_open): Fix calculation of ascent and descent.
3628 (ft_list): Pay attention to generic families.
3629 (mfont__ft_init): Initialize M_generic_family_info,
3630 generic_family_table, and fc_config..
3631 (mfont__ft_fini): Finalize generic_family_table.
3633 * draw.c (compose_glyph_string): Use more constant font for
3634 glyphs. Adjust for the member change in MGlyph.
3635 (layout_glyph_string): Adjust for the member change in MGlyph.
3636 (alloc_gstring): Intilize scracth_glyph to avoid
3637 compose_glyph_string on it.
3638 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3639 (mdraw_coordinates_position): Fix previous change.
3641 * internal-gui.h (glyph_category): New enum.
3642 (MGlyph): Change type of <category> to enum glyph_category.
3644 * face.c (mface__realize): Delete args langauge and charset.
3645 (mface__for_chars): Fix for the case that glyphs have different
3647 (mface__update_frame_face): Adjust for mface__realize change.
3649 * face.h (mface__realize): Adjust prototype.
3651 2004-10-05 Kenichi Handa <handa@m17n.org>
3653 * language.c (mlang__init): Add Akan.
3655 2004-10-04 Kenichi Handa <handa@m17n.org>
3657 * font-ft.c (add_font_info): Add instead of push the element.
3658 (ft_list_family): For generic fonts, try all
3659 substituted. families.
3661 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3662 (run_rule): Don't update cluster range here.
3663 (run_command): Update cluster range on appending a glyph.
3664 (run_otf): Update cluster range for glyphs generated by OTF.
3666 2004-10-02 Kenichi Handa <handa@m17n.org>
3668 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3670 2004-09-30 Kenichi Handa <handa@m17n.org>
3672 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3674 2004-09-30 Kenichi Handa <handa@m17n.org>
3676 * font.h: Include <fontconfig/fontconfig.h>.
3677 (MFTInfo): New member langset.
3678 (mfont__encoding_list): Extern it.
3680 * font.c (mfont__encoding_list): New function.
3681 (mdebug_dump_font_list): New function.
3683 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3684 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3686 (ft_family_list): New variable.
3687 (set_font_info): New arg basep. Callers changed.
3688 (fc_list): Check the return value of FcPatternGetString.
3689 (add_font_info): New arg plist. Callers changed. Update
3691 (ft_list_family): New function (merged fc_list and ft_list_all).
3692 (ft_select): Use ft_list_family.
3693 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3695 (mfont__ft_init): Initialize above new variables.
3696 (mfont__ft_fini): Free ft_family_list.
3697 (STRDUP_LOWER): New macro.
3698 (set_font_info): Use STRDUP_LOWER.
3699 (ft_list_family): Avoid duplicate addition of font path. Use
3701 (fc_decode_prop): Fix typo.
3703 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3704 (xfont_registry_list): Change argument disp_info to frame.
3706 (xfont_list_all): New function.
3707 (xfont_list): If FONT is not NULL, check all fonts.
3709 2004-09-28 Kenichi Handa <handa@m17n.org>
3711 * m17n-X.c (MXFont, MXFontList): New types.
3712 (MDisplayInfo): Delete members font_registry_list,
3713 iso8859_1_family_list, iso10646_1_family_list, new members
3714 font_list, base_font_list.
3715 (free_display_info): Adusted for the change of MDisplayInfo.
3716 (xfont_driver): Initialize with xfont_list.
3717 (font_compare): New function.
3718 (build_font_list): Deleted.
3719 (xfont_registry_list): New function.
3720 (xfont_select): Use xfont_registry_list.
3721 (xfont_list): New function.
3722 (device_open): Adusted for the change of MDisplayInfo.
3724 * font-ft.c (add_font_info): New arg languages. Callers changed.
3725 (fc_list): Get languages from fonts..
3726 (ft_list_all): Renamed from ft_list. Callers changed.
3727 (ft_list): New function.
3728 (mfont__ft_driver): Initalize with ft_list.
3730 * font.c (mfont_list): New function.
3732 * font.h (struct MFontDriver): New member `list'.
3733 (MFTInfo): New member languages.
3735 * m17n-gui.h (mfont_list): Extern it.
3737 2004-09-27 Kenichi Handa <handa@m17n.org>
3739 * internal-gui.h (struct MGlyphString): Delete members mt,
3740 sub_width, sub_lbrearing, sub_rbearing, and region.
3742 * draw.c (MSubTextExtents): New type.
3743 (layout_glyphs): New arg extents. Set its members.
3744 (layout_glyph_string): Adjusted for the above change.
3745 (alloc_gstring): Don't set gstring->mt.
3746 (truncate_gstring): Call line_break function with mt instead of
3749 2004-09-22 Kenichi Handa <handa@m17n.org>
3751 * mtext.c (count_utf_16_chars): Count each code of invalid
3754 2004-09-19 Kenichi Handa <handa@m17n.org>
3756 * mtext.c (default_utf_16, default_utf_32): Rename them to
3757 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3760 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3763 2004-09-13 Kenichi Handa <handa@m17n.org>
3765 * draw.c (Mlatin): Don't declare it here.
3766 (visual_order): Fix reordering of combining characters.
3767 (compose_glyph_string): Fix detection of script.
3768 (layout_glyphs): Don't fix reordering of combining characters
3770 (layout_glyph_string): Pay attention to
3771 control->disable_overlapping_adjustment.
3772 (truncate_gstring): Include at least on character in a line.
3773 (get_gstring): Always scan one full line.
3774 (mdraw__init): Don't initialize Mlatin here.
3775 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3776 have a font, use ascent/descent of an ASCII font. Allow
3777 ink_array_return and logical_array_return to be NULL.
3778 (mdraw_coordinates_position): Fix iteration.
3780 * font-ft.c (MFTtoProp): Member completely changed.
3781 (ft_to_prop): Adjusted for the above change.
3782 (ft_to_prop_size): Likewise.
3783 (set_font_info): Adjusted for the change of MFTtoProp.
3784 (fc_generic_family_list): New variable.
3785 (fc_list): Add special handling of generic font names.
3786 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3787 Initialize fc_generic_family_list.
3788 (mfont__ft_fini): Don't free ft_to_prop. Free
3789 fc_generic_family_list.
3790 (FC_vs_M17N_font_prop): New type.
3791 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3792 (fc_decode_prop, fc_encode_prop): New functions.
3793 (mfont__ft_parse_name): Use fc_decode_prop.
3794 (mfont__ft_unparse_name): Use fc_encode_prop.
3796 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3797 (MWDevice): Add member realized_font_list.
3798 (free_display_info): Don't free disp_info->realized_font_list.
3799 (free_device): Free device->realized_fontset_list.
3800 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3801 (device_open): Don't initialize disp_info->realized_font_list.
3802 (device_open): Initialize device->realized_font_list and set it to
3803 frame->realized_font_list.
3805 * fontset.c (try_font_group): New function.
3806 (mfont__lookup_fontset): Use try_font_group.
3808 * font.c (common_weight): Change the order of "regular".
3810 * face.c (Mlatin): Don't make it static.
3811 (mface__realize): Be sure to set work_gstring.frame.
3812 (mface__for_chars): Likewise.
3814 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3817 * internal-gui.h (Mlatin): Extern it.
3819 * m17n-gui.h (MDrawControl): New member
3820 disable_overlapping_adjustment.
3822 2004-09-06 Kenichi Handa <handa@m17n.org>
3824 * font-flt.c (run_otf): Fix typo ('}'->']').
3826 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3827 (COMBINING_PRECOMPUTED_P): New macros.
3829 * draw.c (layout_glyphs): Handle precomputed combining code.
3831 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3832 precomupted combining code.
3834 2004-09-03 Kenichi Handa <handa@m17n.org>
3836 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3839 2004-08-27 Kenichi Handa <handa@m17n.org>
3841 * face.c (mface_put_prop): If the new value is the same as the
3842 current one, don't increment frame->tick.
3844 2004-08-25 Kenichi Handa <handa@m17n.org>
3846 * fontset.c (mfontset): Initialize font_spec_list member.
3847 (mfontset_copy): Load fontset if necessary.
3849 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3850 'metrics' to for C++.
3852 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3855 2004-08-16 Kenichi Handa <handa@m17n.org>
3857 * Version 1.1.0 released.
3859 2004-08-13 Kenichi Handa <handa@m17n.org>
3861 * language.c (mlang__init): Add Dhivehi.
3863 * m17n-gui.c (Mx, Mfreetype): Delete it.
3864 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3866 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3867 (mfont_resize_ratio): Extern it.
3868 (MDrawGlyphInfo): New member logical_width;
3869 (MDrawGlyph): New type.
3870 (mdraw_glyph_list): Prototype adjusted.
3872 * m17n-X.c (xfont_open): Set type and fontp members.
3873 (xft_open): Likewise.
3875 * internal-gui.h (Mx, Mfreetype): Delete extern.
3877 * font.h (struct MRealizedFont): New member type and fontp.
3879 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3880 (Mx, Mfreetype): Declare here.
3881 (Mxft): New variable.
3882 (mfont_resize_ratio): New function.
3884 * font-ft.c (ft_open): Set type and fontp members.
3886 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3889 2004-08-11 Kenichi Handa <handa@m17n.org>
3891 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3894 2004-08-06 Kenichi Handa <handa@m17n.org>
3896 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3899 * font-flt.c (run_otf): Print debugging information if necessary.
3901 2004-08-05 Kenichi Handa <handa@m17n.org>
3903 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3904 positioning_type 5 and 6. Switch simplified.
3906 2004-08-04 Kenichi Handa <handa@m17n.org>
3908 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3910 2004-08-02 Kenichi Handa <handa@m17n.org>
3912 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3913 set val to 1 even if it is greater than 1.
3915 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3917 2004-07-29 Kenichi Handa <handa@m17n.org>
3919 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3920 debugging information.
3922 * internal.h (MDEBUG_PRINT5): New macro.
3924 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3925 the previous one if the zero width glyph has left or right
3928 2004-07-26 Kenichi Handa <handa@m17n.org>
3930 * m17n-X.c (xft_render): Pay attention to members left_padding and
3931 right_padding of MGlyph.
3933 * draw.c (visual_order): Allocate one more elements for arrays as
3934 a workaround of fribidi bug.
3935 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3936 instead of MGlyph->bidi_sensitive.
3937 (layout_glyph_string): Pay attentinon to
3938 control->orientation_reversed when padding at the head or tail.
3939 Fix adjustment of space glyph width.
3940 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3943 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3944 instead of MGlyph->bidi_sensitive.
3946 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3948 2004-07-26 Kenichi Handa <handa@m17n.org>
3950 * draw.c (visual_order): Don't treat combined glyphs specially.
3951 (layout_glyphs): Don't get metrics glyphs that are already ready.
3952 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3953 width with the previous one.
3954 (draw_background): Fix bar cursor position on a r2l glyph.
3956 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3957 (run_rule): Fix place of updating cluster_begin_pos and
3958 cluster_end_pos here.
3959 (run_otf): Don't set left_padding.
3961 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3963 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3964 Fix handling of GPOS.
3965 (mfont__ft_drive_gpos): Delete this function.
3967 * font.h (mfont__ft_drive_otf): Renamed back from
3968 mfont__ft_drive_gsub.
3969 (mfont__ft_drive_gpos): Delete extern.
3971 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3972 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3974 2004-07-23 Kenichi Handa <handa@m17n.org>
3976 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3977 the same bidi level.
3979 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3981 2004-07-22 Kenichi Handa <handa@m17n.org>
3983 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3985 2004-07-20 Kenichi Handa <handa@m17n.org>
3987 * draw.c (render_glyphs): Fix checking of g->code validity.
3989 * face.c (mface__realize): Set g.type.
3991 2004-07-18 Kenichi Handa <handa@m17n.org>
3993 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3996 * m17n-gui.c (mframe): Print error message give by dlopen to
3999 2004-07-16 Kenichi Handa <handa@m17n.org>
4001 * draw.c (compose_glyph_string): Improve the way of deciding a
4002 script. For a character that doesn't have script property, use
4003 the last non-latin script.
4005 * font-ft.c (fc_list): Cancel previous change.
4006 (mfont__ft_init): Add more entries in ft_to_prop_name.
4008 2004-07-15 Kenichi Handa <handa@m17n.org>
4010 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
4011 previous or next character glyphs.
4013 2004-07-14 Kenichi Handa <handa@m17n.org>
4015 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
4016 of type GLYPH_SPACE.
4018 * fontset.c (mfont__lookup_fontset): If glyph type is
4019 GLYPH_SPACE, get codes for SPACE.
4021 * internal-gui.h (Mfont): Delete extern.
4023 * m17n-gui.h (Mfont): Delete duplicated extern.
4025 2004-07-13 Kenichi Handa <handa@m17n.org>
4027 * font-ft.c (DEVICE_DELTA): New macro.
4028 (adjust_anchor): New function.
4029 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
4031 (mfont__ft_drive_gpos): New function.
4033 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
4034 (FontLayoutContext): Delete member `rfont'.
4035 (run_otf): Set g->otf_cmd. Call
4036 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
4037 only whne HAVE_OTF is defined.
4039 * fontset.c: Include "config.h".
4041 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
4042 (MGlyph): New member otf_cmd.
4044 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
4045 (mfont__ft_drive_gpos): Extern it.
4047 * face.c: Include "config.h".
4049 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
4051 * input-gui.c: Include "config.h".
4053 * plist.c: Include "config.h".
4055 2004-07-06 Kenichi Handa <handa@m17n.org>
4057 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
4058 internal-gui.h: Cancel previous changes.
4060 * m17n-gd.h: Delete it.
4062 * Makefile.am (libm17n_core_la_LIBADD): New variable.
4063 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
4064 @XML2_LD_FLAGS@ to above.
4065 (libm17n_la_LIBADD): Add -ldl.
4066 (libm17n_la_LDFLAGS): Add -export-dynamic.
4067 (X_LD_FLAGS): Fix the order of linking.
4068 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
4069 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
4070 (libm17n_X_la_LDFLAGS): Add -module.
4071 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
4072 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
4073 (libm17n_gd_la_LDFLAGS): Add -module.
4074 (include_HEADERS): Delete m17n-gd.h.
4076 2004-06-30 Kenichi Handa <handa@m17n.org>
4078 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
4079 (MDeviceLibraryInterface): Delete it.
4080 (register_device_library): Delete it.
4081 (m17n__device_library_list): Renamed from device_library_list.
4083 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
4084 (m17n_init_win): Adjust prototype.
4086 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
4087 (m17n_init_gd): New function.
4089 * m17n-gd.h: New file.
4091 * m17n-X.h: Include <m17n-gui.h>.
4092 (m17n_init_X): Extern it.
4093 (M17N_INIT): Redefine it.
4095 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
4096 (m17n_init_X): New function.
4098 * internal-gui.h (m17n__device_library_list): Extern it.
4099 (struct MDeviceDriver): New members initialized, init, and fini.
4101 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
4103 (libm17n_X_la_LIBADD): Delete aboves.
4104 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
4105 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
4106 (libm17n_gd_la_LDFLAGS): Delete it.
4107 (include_HEADERS): Add m17n-gd.h.
4109 2004-06-25 Kenichi Handa <handa@m17n.org>
4111 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
4112 (libm17n_gd_la_LDFLAGS): Cancel previous change.
4114 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
4116 * font-ft.c (fc_list): If FcFontList finds no font, try
4119 * draw.c (compose_glyph_string): Terminate the last loop after
4120 doing default combining if necessary.
4122 2004-06-24 Kenichi Handa <handa@m17n.org>
4124 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
4126 * character.c (mchar_define_property): Add const to an arg.
4128 * charset.c (mchar_define_charset): Add const to an arg.
4130 * coding.c (MCodingSystem): Add const to an arg or decoder.
4131 (finish_decoding): Add const to an arg.
4132 (decode_coding_charset, decode_coding_utf_8)
4133 (decode_coding_utf_16, decode_coding_utf_32)
4134 (decode_coding_iso_2022, decode_coding_sjis)
4135 (mconv_define_coding): Likewise.
4137 * m17n-X.c (xft_find_metric): Delete unused variable.
4139 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
4142 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
4145 * mtext.c (count_utf_8_chars, count_utf_16_chars)
4146 (mtext__from_data, mtext_from_data): Add `const' to an arg.
4148 * mtext.h (mtext__from_data): Ajust prototype.
4150 2004-06-23 Kenichi Handa <handa@m17n.org>
4152 * draw.c (compose_glyph_string): Always get glyph codes by
4154 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
4155 (mdraw_glyph_list): New function.
4157 * font-flt.c (mfont__flt_run): Be sure to call
4158 rfont->driver->encode_char.
4160 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
4161 (ft_encode_char): Delete arg C.
4162 (ft_render): Don't call FT_Get_Char_Index.
4164 * font.c (mfont__encodable_p): Delete it.
4165 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
4167 * font.h (struct MFontDriver): Delete arg C of encode_char.
4168 (mfont__encodable_p): Delete extern.
4170 * m17n-X.c (xfont_encode_char): Delete arg C.
4171 (xft_find_metric): Don't cal FT_Get_Char_Index.
4172 (xft_render): Likewise.
4174 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
4176 (mdraw_glyph_list): Extern it.
4178 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
4180 2004-06-22 Kenichi Handa <handa@m17n.org>
4182 * m17n-gui.h (mfontset_lookup): Extern it.
4184 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
4186 * fontset.c (realize_fontset_elements)
4187 (free_realized_fontset_elements, update_fontset_elements): New
4189 (mfont__realize_fontset): Call realize_fontset_elements.
4190 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
4191 (mfont__lookup_fontset): If a fontset was modified, update
4192 the realized fontset.
4193 (mfontset_modify_entry): Increment fontset->tick.
4194 (mfontset_lookup): New function.
4196 2004-06-21 Kenichi Handa <handa@m17n.org>
4198 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
4200 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
4201 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
4202 length of source text 0.
4204 2004-06-21 Kenichi Handa <handa@m17n.org>
4206 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
4207 (compare): Pay attention to format other than utf-8.
4208 (copy): Delete this function.
4209 (count_by_utf_8, count_by_utf_16, insert): New functions.
4210 (count_utf_16_chars): Fix handling of a surrogate pair.
4211 (find_char_forward, find_char_backward): Likewise.
4212 (mtext__from_data): Delete unnecessary check. Fix number of
4214 (mtext_from_data): Don't count items.
4215 (mtext_ref_char): Optimize the code.
4216 (mtext_set_char): Pay attention to format other than utf-8.
4217 (mtext_cat_char): Likewise.
4218 (mtext_dup): Don't call copy, instead do allocation here.
4219 (mtext_cat): Call insert instead of copy.
4220 (mtext_ncat): Likewise.
4221 (mtext_cpy): Delete character at first and call insert instead of
4223 (mtext_ncpy): Likewise.
4224 (mtext_copy): Likewise.
4225 (mtext_duplicate): Call insert instead of copy.
4226 (mtext_del): Pay attention to format other than utf-8.
4227 (mtext_ins): Simply call insert.
4228 (mtext_ins_char): Pay attention to format other than utf-8.
4229 (mtext_tok): Call insert instead of copy.
4230 (mtext_text): Call UNIT_BYTES.
4232 * textprop.c (mtext__adjust_plist_for_change): New function.
4234 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
4235 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
4236 (CHAR_UNITS_AT): Fix typo.
4237 (CHAR_UNITS_BY_HEAD): Fix typo.
4238 (STRING_CHAR_AND_UNITS): Fix typo.
4240 * internal.h (MTEXT_READ_ONLY_P): New macro.
4242 * mtext.h (mtext__replace): Delete the extern.
4243 (mtext__adjust_foramt): Adjust prototype.
4245 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
4246 if possible. Otherwise make a copy of mmt.
4248 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
4251 2004-06-18 Kenichi Handa <handa@m17n.org>
4253 * character.h (CHAR_STRING_UTF16): Fix syntax.
4255 2004-06-16 Kenichi Handa <handa@m17n.org>
4257 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
4258 (libm17n_X_la_LIBADD): Delete it.
4259 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
4261 * m17n-X.c (device_open): Add parens in `if' condition.
4263 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
4264 (DEC_POSITION): Likewise.
4265 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
4267 2004-06-15 Kenichi Handa <handa@m17n.org>
4269 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
4272 * draw.c (compose_glyph_string): If langauge is specified, call
4273 mface__for_chars even if a text is all latin. Fix condition for
4274 setting non_ascii_found.
4276 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
4278 * m17n.h (minput_char_to_key): Delete extern.
4280 * m17n-gui.h (minput_event_to_key): Cancel previous change.
4282 * m17n-gui.c (null_device_open): Set several members of frame.
4284 2004-06-14 Kenichi Handa <handa@m17n.org>
4286 * m17n-gui.h (minput_event_to_key): Delete extern.
4288 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
4290 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
4292 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
4294 2004-06-08 Kenichi Handa <handa@m17n.org>
4296 * character.c (mchar_put_prop): Don't increment the ref-count of
4299 2004-06-04 Kenichi Handa <handa@m17n.org>
4301 * m17n-core.c (mdebug__register_object): New function.
4302 (mdebug__unregister_object): Likewise.
4304 * internal.h (mdebug__register_object, mdebug__unregister_object):
4306 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
4309 * charset.c (mcharset__load_from_database): Don't call
4310 mconv__register_charset_coding here.
4312 * coding.c (find_coding): Get a real name from an element of
4313 coding_definition_list.
4314 (mconv__register_charset_coding): Set the real name at the top of
4316 (mcoding__load_from_database): Likewise.
4317 (mconv_list_codings): Adjusted for the above change.
4319 2004-06-03 Kenichi Handa <handa@m17n.org>
4321 * coding.c (find_coding): Find by canonicalized name. Don't have
4322 to modify the element of coding_definition_list by
4324 (mconv__define_coding_from_charset): Delete it.
4325 (mconv__register_charset_coding): Canonicalize sym.
4326 (mcoding__load_from_database): Register plist modified by
4329 * coding.h (mconv__define_coding_from_charset): Don't extern it.
4331 * font-ft.c (ft_open): Fix setting of rfont->descent.
4333 2004-06-02 Kenichi Handa <handa@m17n.org>
4335 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
4336 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
4337 (xlfd_unparse_name): Renamed from xfont_build_name.
4338 (mfont__init): Initialized Mfontconfig.
4339 (mfont__free_realized): Unconditionally unref rfont->info.
4340 (mfont__select): Free `this' if it's not best.
4341 (mfont__open): Don't check frame->realized_font_list.
4342 (mfont__parse_name_into_font): New function.
4343 (Mfontconfig): New variable.
4344 (mfont_from_name): Call mfont_parse_name.
4345 (mfont_name): Call mfont_unparse_name.
4346 (mdebug_dump_font): Likewise.
4348 * font.h (struct MFontDriver): Delete members parse_name and
4350 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
4351 (mfont__parse_name_into_font): Extern it.
4353 * font-ft.c: Include "symbol.h".
4354 (close_ft): Unconditionally free filename and charmap_list of
4356 (ft_open): Duplicate base->filename. Increment ref-count of
4357 ft_info->charmap_list. Free ft_info->charmap_list and
4358 ft_info->filename on error.
4359 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
4361 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
4363 (enum xlfd_field_idx): Moved to font.c.
4364 (split_font_name, build_font_name): Likewise.
4365 (build_font_list): Call mfont__parse_name_info_font.
4366 (xfont_open): Call mfont__unparse_name. Free name.
4367 (xfont_parse_name, xfont_build_name): Moved to font.c
4368 (xft_select): Prototype deleted.
4369 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
4370 Call mfont_pase_name.
4372 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4373 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4376 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4379 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4381 2004-06-01 Kenichi Handa <handa@m17n.org>
4383 * fontset.c (mfontset_modify_entry): Pay attention to the case
4384 that fontset->font_spec_list is NULL.
4386 2004-05-31 Kenichi Handa <handa@m17n.org>
4388 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4390 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4392 * font.c (mfont__select): Print score the a font for debugging.
4394 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4396 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4397 kanji_sym and kana_sym.
4399 2004-05-28 Kenichi Handa <handa@m17n.org>
4401 * Makefile.am (VINFO): New variable.
4402 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4403 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4405 2004-05-27 Kenichi Handa <handa@m17n.org>
4407 The following chanages are to make device dependent functions
4408 accessible only from MDeviceDriver structure, and to add GD and
4409 null device drivers. Font drivers get also device dependent.
4411 * m17n.c (m17n_init): Increament shell_initialized.
4412 (m17n_fini): Decremented shell_initialized.
4414 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4416 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4417 (Mwidget, Mcolormap, Mx): Extern them.
4419 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4420 (free_frame): Call frame->driver->close instead of
4422 (DLOPEN_SHLIB_EXT): New macro.
4423 (MDeviceLibraryInterface): New type.
4424 (device_library_list): New variable.
4425 (register_device_library): New function.
4426 (null_device): New variable.
4427 (null_device_close, null_device_get_prop)
4428 (null_device_realize_face, null_device_free_realized_face): New
4430 (null_driver): New variable.
4431 (null_device_init, null_device_fini, null_device_open): New
4433 (null_interface): New variable.
4434 (Mfreetype, Mdevice): Declare them.
4435 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4436 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4437 Mwin__Close_Device. Register drivers for Mx and Mgd.
4438 (m17n_fini_win): Decremented win_initialized. Call "fini"
4439 function of all opened devices. Don't call mwin__fini.
4440 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4442 (mframe): Handle Mdevice key of PLIST.
4443 (mframe_get_prop): Call frame->device->get_prop instead of
4444 mwin__device_get_prop.
4446 * m17n-gd.c: New file.
4448 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4449 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4451 * m17n-core.c (m17n_init_core): Increate core_initialized.
4452 (m17n_fini_core): Decremented core_initialized.
4454 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4455 (Mcolormap): Don't extern them here.
4457 * m17n-X.c (FRAME_DEVICE): New macro.
4458 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4459 (free_display_info): Use MPLIST_DO.
4460 (free_device): Free rface->info.
4461 (xft_close): Delete it.
4462 (device_init): Renamed from mwin__init.
4463 (device_fini): Renamed from mwin__fini.
4464 (device_open): Renamed from mwin__open_device.
4465 (x_driver): New variable.
4466 (MXFontInfo): Delete member frame, add member display.
4467 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4468 Don't declare them here.
4470 * internal-gui.h (MDeviceType): New enum.
4471 (MWDefice): Delete it.
4472 (struct MFrame): Change type of device to void *. New members
4473 device_type, driver, font_driver_list.
4474 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4475 (MDeviceDriver): New type.
4476 (Mx, Mgd, Mfreetype): Extern them.
4477 (mwin__XXX): Delete all of them.
4479 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4481 (win_destroy_ic): Likewise.
4482 (adjust_window_and_draw): Likewise.
4483 (win_callback): Likewise.
4484 (Mxim): Declare it here.
4485 (minput_event_to_key): Call M_CHECK_READABLE.
4487 * fontset.c (mfont__lookup_fontset): Delete local variable
4490 * font.h (struct MFontDriver): Delete member close, add members
4491 parse_name and build_name.
4492 (mfont__driver_list): Delete extern.
4493 (mfont__close): Delete extern.
4495 * font.c (mfont__init): Don't set mfont__driver_list.
4496 (mfont__fini): Don't unref mfont__driver_list.
4497 (mfont__select): Try font drivers in frame->font_driver_list. Set
4498 driver member of a realized font.
4499 (mfont__close): Delete it.
4500 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4501 functions of the default frame.
4503 * font-ft.c (close_ft): Check ft_info->ft_face and work
4505 (add_font_info): Allocate ft_info by M17N_OBJECT.
4506 (ft_close): Delete it.
4507 (mfont__ft_driver): Don't set ft_close.
4508 (ft_select): Increment ref-count of best_font.
4509 (ft_open): Decremented ref-count of base. On error, call
4510 FT_Done_Face and free ft_info.
4511 (ft_find_metric): Always use XXX_MONO in load_flags.
4512 (ft_render): Fix setting of width. Call
4513 frame->driver->draw_points instead of mwin__draw_points.
4514 (ft_to_prop): Don't set mfont__driver_list.
4515 (mfont__ft_fini): Just unref ft_info.
4517 * face.c (mface__init): Exchange foreground and background of
4518 mface__default. Call mface_put_prop to set hline of
4520 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4521 (mface__free_realized): Don't call mwin__free_realized_face.
4523 * draw.c (Mdepth): Don't declare it here.
4524 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4525 (render_glyphs, render_glyph_string): Likewise.
4526 (mdraw__init): Don't set Mdepth.
4527 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4529 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4531 (mdraw_text_items): Check FRAME is writable.
4532 (mdraw_per_char_extents): Implement body.
4534 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4536 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4537 (GUI_SOURCES): Delete it.
4538 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4539 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4540 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4541 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4542 (linkgui_LDADD): Set to libm17n-gui.la
4543 (linkgui_LDFLAGS): New target.
4544 (SRC): Include ${libm17n_gui_la_SOURCES} and
4545 ${libm17n_gd_la_SOURCES}.
4547 2004-05-24 Kenichi Handa <handa@m17n.org>
4549 * draw.c (draw_background): Don't draw background even if
4550 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4552 2004-05-22 Kenichi Handa <handa@m17n.org>
4554 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4556 2004-05-20 Kenichi Handa <handa@m17n.org>
4558 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4560 * m17n-gui.c: Include "plist.h".
4561 (mframe): If PLIST is NULL, initialize it to emply plist.
4563 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4564 (xft_driver): New variable.
4565 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4566 (xft_find_metric, xft_render): New function.
4567 (mwin__init): Adjusted for the new mfont__driver_list.
4568 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4569 generated face to PARAM.
4570 (mwin__realize_face): Fix setting of box colors. Don't call hook
4572 (mwin__draw_hline): New function.
4573 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4574 (mwin__xft_render): Delete these function.
4576 * internal-gui.h (struct MFrame): New member tick.
4577 (struct MGlyphString): New member tick.
4578 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4579 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4580 (mwin__xft_render): Delete extern.
4582 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4583 (mfontset): Always increment the reference count of returned
4586 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4587 (MFTInfo): Moved to font.h.
4588 (ft_iso8859_1_font_list): Delete this variable.
4589 (set_font_info): Don't set font->property[MFONT_TYPE].
4590 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4591 (add_font_info): Change type to void.
4592 (fc_list): Change anme from xft_list. Caller changed. Include
4593 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4594 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4595 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4596 (close_ft): Don't call mwin__xft_close. Unref
4597 ft_info->extra_info.
4598 (ft_open): Don't setup ft_info->fontname. Don't call
4600 (ft_find_metric): Don't call mwin__xft_get_metric.
4601 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4602 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4603 (mfont__ft_init): Adjusted for new mfont__driver_list.
4604 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4606 * font.c (mfont__driver_list): Make it MPlist.
4607 (mfont__init): Adjust initialization of mfont__driver_list.
4608 (mfont__fini): Free mfont__driver_list.
4609 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4610 (mfont__select): Adjusted for the new mfont__driver_list.
4612 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4613 (mfont__drirver_list): Adjust prototype.
4614 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4616 * face.h (struct MFace): Delete member realized_face_list, add
4618 (struct MRealizedFace): Delete member need_update
4619 andnofont_rface, add member non_ascii_list.
4620 (mface__update_frame_face): Extern it.
4622 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4624 (get_hline_create, get_box_create): New functions.
4625 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4627 (free_face): Cancep previous change. Free face->frame_list.
4628 (serialize_hline): Do nothing if hline->width is zero.
4629 (serialize_box): Do nothing if box->width is zero.
4630 (mface__init): Setup all properties of mface__default.
4631 (mface__fini): Free hline_prop_list and box_prop_list.
4632 (mface__realize): Cancel previous change. Update
4633 face->frame_list. Setup rface->non_ascii_list.
4634 (mface__for_chars): Update rface->non_ascii_list.
4635 (mface__free_realized): Free rface->non_ascii_list.
4636 (mface__update_frame_face): New function.
4637 (mface): Initialize face->frame_list.
4638 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4640 (mface_merge): Likewise.
4641 (mface_put_prop): If key is Mhline or Mbox, get value by
4642 get_hline_create or get_box_create respectively.
4643 (mface_put_prop): Update frame->tick and call
4644 mface__update_frame_face if necessary.
4645 (mface_update): Do nothing if func is noop_hook.
4647 * draw.c (render_glyphs): If a font is not found, use
4648 mwin__draw_empty_boxes.
4649 (alloc_gstring): Initialize gstring->tick.
4650 (get_gstring): Check gstring->tick.
4652 2004-05-17 Kenichi Handa <handa@m17n.org>
4654 * face.c (find_realized_face): Return value changed. If RFONT is
4655 NULL, avoid unnecessary checking.
4656 (free_face): Free face->realized_face_list.
4657 (mface__realize): Adjusted for the change of find_realized_face.
4658 If it returns a realized face that needs update, free it and
4659 realize a new one. Push a new realized face to
4660 frame->realized_face_list instead of appending.
4661 (mface__for_chars): Adjusted for the change of find_realized_face.
4662 Short cut if the required font is in rface->ascii_rface.
4663 (mface_put_prop): Free old value if necessary. Set need_update
4664 member of realized faces to 1.
4666 * face.h (struct MFace): Delete member tick, add member
4668 (struct MRealizedFace): Delete member tick, add member
4671 2004-05-13 Kenichi Handa <handa@m17n.org>
4673 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4675 2004-05-12 Kenichi Handa <handa@m17n.org>
4677 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4679 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4680 parse it XftNameParse.
4682 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4683 (all_fonts_scaned): New variable.
4684 (set_font_info): FAMILY may be Mnil.
4685 (add_font_info): Argument changed.
4686 (xft_list): Call add_font_info in it.
4687 (ft_list): Likewise.
4688 (ft_select): Make it work in the case family is Mnil.
4689 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4690 (mfont__ft_fini): Set all_fonts_scaned to 0.
4692 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4693 that is failed to open.
4695 2004-05-10 Kenichi Handa <handa@m17n.org>
4697 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4698 device's depth is 1 (i.e. monochrome).
4700 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4701 to work around the problem of libtool.
4703 * font-ft.c: Include <freetype/ftbdf.h>.
4704 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4706 (mfont__ft_init): Initialize them.
4707 (ft_iso8859_1_font_list): New variable.
4708 (set_font_info): Detect a font containing iso8859-1 glyphs and
4709 register it in ft_iso8859_1_font_list. If the font is not
4710 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4711 properties of the font from its properties.
4712 (add_font_list): If the font is not scalable, check if it is BDF
4713 or PCF font. If not, ignore it.
4714 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4715 registry is not iso8859-1.
4716 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4717 ft_iso8859_1_font_list.
4718 (ft_find_metric): If the font is not scalable, assume it as BDF
4719 or PCF, and get a metric from its properties.
4720 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4722 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4724 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4725 (libm17n_la_LDFLAGS): Delete it.
4726 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4727 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4729 2004-05-06 Kenichi Handa <handa@m17n.org>
4731 * draw.c (compose_glyph_string): Fix previous change.
4733 2004-04-30 Kenichi Handa <handa@m17n.org>
4735 * font-ft.c (ft_list): Delete unused variable `result'.
4736 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4738 2004-04-27 Kenichi Handa <handa@m17n.org>
4740 * m17n-X.c: Include config.h
4741 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4742 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4743 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4744 (FRAME_CMAP, FRAME_VISUAL): New macros.
4745 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4746 (xfont_driver): Make it static.
4747 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4748 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4749 info->xft_color_back.
4750 (MXftFontInfo) [HAVE_XFT2]: New type.
4751 (mwin__xft_close) [HAVE_XFT2]: New function.
4752 (mwin__xft_open) [HAVE_XFT2]: New function.
4753 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4754 (mwin__xft_render) [HAVE_XFT2]: New function.
4756 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4757 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4758 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4761 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4763 * font-ft.c: Don't include FT_FREETYPE_H here.
4764 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4765 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4766 (MFTInfo): New member charmap_index.
4767 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4768 (check_otf_filename): Renamed from check_filename. Return value
4770 (ft_set_property): This function deleted.
4771 (set_font_info): New function.
4772 (add_font_list): Argument changed. Add multiple fonts.
4773 (xft_list) [HAVE_XFT2]: New function.
4774 (ft_list) [not HAVE_XFT2]: New function.
4775 (ft_select): Add code for Xft.
4776 (close_ft): Likewise.
4777 (ft_open): Likewise.
4778 (ft_find_metric): Likewise.
4779 (ft_encode_char): Likewise.
4780 (ft_render): Likewise.
4782 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4784 2004-04-26 Kenichi Handa <handa@m17n.org>
4786 * textprop.c (mtext_attach_property): Declare the return type as
4789 2004-04-21 Kenichi Handa <handa@m17n.org>
4791 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4793 2004-04-09 Kenichi Handa <handa@m17n.org>
4795 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4797 (load_command): Setup above members.
4799 2004-04-05 Kenichi Handa <handa@m17n.org>
4801 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4803 2004-03-30 Kenichi Handa <handa@m17n.org>
4805 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4808 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4809 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4811 2004-03-29 Kenichi Handa <handa@m17n.org>
4813 * Version 1.0 Patch Level 2 released.
4815 2004-03-29 Kenichi Handa <handa@m17n.org>
4817 * charset.c (make_charset): Set charset->fully_loaded and
4818 charset->simple correctly. Don't try to get charset->min_char and
4819 charset->max_char for a charset of method subset and superset.
4820 Don't load a mapping file here.
4821 (mcharset__init): Set unified_max.
4822 (mcharset__load_from_database): Free a working plist.
4824 * coding.c (mcoding__fini): Free all malloced data.
4826 * input-gui.c (win_create_ic): Set control.as_image for preediting
4829 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4830 `count') to initialize the array.
4832 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4835 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4837 (mwin__create_window): Fix bug of setting a background pixel of a
4839 (mwin__adjust_window): Clear the window before drawing.
4841 * m17n-core.c (mdebug__report_object): Free array->objectes if
4843 (m17n_init_core): Don't set report_header_printed to 0 here.
4844 Fix debugging information.
4845 (m17n_fini_core): Set report_header_printed to 0 here.
4847 * m17n-core.h (mplist_deserialize): Extern it.
4849 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4851 * m17n.c (m17n_fini): Fix debugging information.
4853 * mtext.c (mtext__adjust_foramt): New function.
4855 * mtext.h (mtext__adjust_foramt): Extern it.
4857 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4859 * plist.h (mplist__deserialize): Don't extern it.
4861 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4862 elements of symbol_table to NULL. Report about created and freed
4863 symbols if MDEBUG_FINI is set.
4865 2004-03-22 Kenichi Handa <handa@m17n.org>
4867 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4869 * m17n.c (m17n_init): Fix the way of checking merror_code.
4871 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4873 2004-03-22 Kenichi Handa <handa@m17n.org>
4875 * fontset.c (realize_font_group): Adjust the font size by
4876 mfont__resize before selecting a font.
4878 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4880 2004-03-19 Kenichi Handa <handa@m17n.org>
4882 * Version 1.0 Patch Level 1 released.
4884 2004-03-19 Kenichi Handa <handa@m17n.org>
4886 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4888 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4890 2004-03-19 Kenichi Handa <handa@m17n.org>
4892 Re-apply the changes forgotten in the released version.
4894 * charset.c (mcharset__load_from_database): Call
4895 mchar_define_charset.
4897 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4898 (mconv_encode_range): Put Mcoding text property.
4900 2004-03-18 Kenichi Handa <handa@m17n.org>
4902 * draw.c (Mdepth): New variable.
4903 (visual_order): Delete unused local var `pos'.
4904 (compose_glyph_string): Fix for the case that gstring->glyphs is
4905 realloced. Stop generating glyphs at TO. Fix handling of
4907 (layout_glyphs): Get metrics of all glyphs in advance. Set
4908 lbearing and rbearing of base of composition glyph correctly.
4909 Handle left-overhang glyphs correctly.
4910 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4912 (dump_combining_code): Change the defualt off_x character to ".".
4913 (mdraw__init): Initialize Mdepth.
4915 * face.c (work_gstring): New variable
4916 (mface__init): Initialize work_gstring.
4917 (mface__fini): Free work_gstring.glyphs.
4918 (mface__realize): Don't handle videomode property here. Adjusted
4919 for the change of mfont__get_metric.
4920 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4922 * face.h (enum face_gc): Moved to m17n-X.c.
4924 * font.h (struct MFontDriver): Arguments of find_metric changed.
4925 (mfont__select): Prototype adjusted.
4926 (mfont__get_metric): Likewise.
4927 (mfont__ft_drive_otf): Likewise.
4928 (mfont__flt_run): Likewise.
4930 * font.c (mfont__select): New argument layouter. If layouter is
4931 different in the registered font, make a new copy of realized
4933 (mfont__get_metric): Argument changed. Get metrics of multiple
4935 (mfont_find): Call mfont__select with layouter as Mnil.
4937 * font-flt.c (FontLayoutContext): New member rfont.
4938 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4939 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4941 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4943 (NUM_POINTS): New macro.
4944 (MPointTable): New type.
4945 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4946 (mfont__ft_drive_otf): New argument rfont.
4948 * fontset.c (realize_font_group): Adjusted for the changed of
4950 (check_fontset_element): This function deleted.
4952 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4953 off the parent window if the preedit text is zero length.
4955 * internal-gui.h (struct MFrame): New members foreground,
4956 background, videomode, font.
4957 (struct MGlyphString): New member anti_alias.
4958 (MDrawPoint): New type.
4959 (mwin__draw_bitmap): Prototype deleted.
4960 (mwin__draw_points): Prototype added.
4962 * m17n-gui.h (MDrawControl): New member anti_alias.
4964 * m17n-gui.c (free_frame): Free frame->font.
4965 (mframe): Set the fontset of frame->face to the default fontset.
4967 * m17n-X.c (RGB_GC): New type.
4968 (enum gc_index): Renamed from enum face_gc. Member names changed.
4970 (struct MWDevice): Members foreground and background deleted. New
4971 member scratch_gc, gc_list.
4972 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4973 (free_device): Free GCs in device->gc_list.
4974 (get_rgb_gc): New function.
4975 (get_gc): Renamed and argument changed from get_color.
4976 (get_gc_for_anti_alias): New function.
4977 (xfont_find_metric): Arguments changed. Get metrics of multiple
4979 (set_region): Argument changed. Caller changed.
4980 (xfont_render): Allways set a font in gc.
4981 (x_error_handler, x_io_error_handler): Define only if
4982 X_SET_ERROR_HANDLER is defined.
4983 (mwin__open_device): Create device->scratch_gc. Set members
4984 foreground, background, and videomode of frame. Call
4985 XSetErrorHandler and XSetIOErrorHandler only if
4986 X_SET_ERROR_HANDLER is defined.
4987 (struct gc_list): Deleted.
4988 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4989 (mwin__realize_face): Adjusted for the change of the format of
4990 rface->info and the charge of set_region.
4991 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4992 (mwin__draw_box): Likewise.
4993 (mwin__draw_bitmap): This function deleted.
4994 (mwin__draw_points): New function.
4995 (mwin__verify_region): Adjusted for the change of the format of
4996 rface->info and the charge of set_region.
4997 (mwin__create_window): Inherit backgound pixel from parent.
4998 (mwin__dump_gc): Adjusted for the change of the format of
5001 2004-03-16 Kenichi Handa <handa@m17n.org>
5003 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
5005 * input.c (M_key_alias): New variable.
5006 (handle_key): Try M_key_alias property of a key too.
5007 (minput__init): Initialize M_key_alias. Give that property to
5008 symbols in one_char_symbol. Fix bug of initializing
5011 * draw.c (compose_glyph_string): Don't handle
5012 ignore_formatting_char here. Include formatting characters in the
5013 range processed by a FTL.
5014 (layout_glyph_string): Handle ignore_formatting_char here.
5016 2004-03-12 Kenichi Handa <handa@m17n.org>
5018 * input-gui.c (win_create_ic): Enable bidi in status control.
5020 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
5022 2004-03-09 Kenichi Handa <handa@m17n.org>
5024 * input.c (load_input_method): If title is not specified, use the
5025 input method name as title.
5027 * m17n-X.c (get_color): Make it static.
5028 (xim_create_ic, xim_destroy_ic, x_error_handler)
5029 (x_io_error_handler): Likewise.
5031 2004-03-01 Kenichi Handa <handa@m17n.org>
5033 * Version 1.0 released.
5036 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
5037 National Institute of Advanced Industrial Science and Technology (AIST)
5038 Registration Number H15PRO112
5040 This file is part of the m17n library.
5042 The m17n library is free software; you can redistribute it and/or
5043 modify it under the terms of the GNU Lesser General Public License
5044 as published by the Free Software Foundation; either version 2.1 of
5045 the License, or (at your option) any later version.
5047 The m17n library is distributed in the hope that it will be useful,
5048 but WITHOUT ANY WARRANTY; without even the implied warranty of
5049 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5050 Lesser General Public License for more details.
5052 You should have received a copy of the GNU Lesser General Public
5053 License along with the m17n library; if not, write to the Free
5054 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
5055 Boston, MA 02110-1301, USA.