1 2009-10-05 Kenichi Handa <handa@m17n.org>
3 * m17n-flt.h: (mflt_iterate_otf_feature, mflt_font_id): Extern
6 * m17n-flt.c (FontLayoutCategory): New typedef.
7 (FontLayoutStage): Type of the member `category' changed.
8 (struct _MFLT): Type of the member `coverage' changed. New member
9 need_config and font_id.
10 (apply_otf_feature): New function.
11 (load_category_table): New arg FONT. If FONT is non-NULL, call
12 apply_otf_feature. Setup category->definition.
13 (ref_category_table): New macro.
14 (unref_category_table): New function.
15 (load_flt): Adjusted for the type change of category.
16 (free_flt_stage): New arg FLT.
17 (list_flt): Adjusted for the type change of category.
18 (run_stages): Adjusted for the type change of category.
19 (configure_category, configure_flt): New function.
20 (m17n_init_flt): Initialize mflt_iterate_otf_feature and
22 (mflt_get): Skip the heading configured FLTs.
23 (mflt_find): Likewise. If necessary, configure the found flt.
24 (mflt_run): Handle mflt_iterate_otf_feature and mflt_font_id.
25 Adjusted for the type change of category.
26 (mflt_iterate_otf_feature, mflt_font_id): New variable.
28 * m17n-X.c (xfont_open): Set rfont->id.
29 (xft_driver): Set xft_iterate_otf_feature.
30 (xft_open): Set rfont->id.
31 (xft_iterate_otf_feature): New function.
33 * font.h (struct MRealizedFont): New member id.
34 (struct MFontDriver): New member iterate_otf_feature.
36 * font.c (mfont__get_glyph_id): Pay attention to. mfont->source.
38 * font-ft.c (ft_open, ft_encapsulate): Set rfont->id.
39 (get_otf): New funcition.
40 (ft_check_otf, ft_drive_otf): Use get_otf.
41 (iterate_callback, ft_iterate_otf_feature): New functions.
42 (mfont__ft_driver): Set ft_iterate_otf_feature.
44 * draw.c: Docstring updated.
45 (font_id): New function.
46 (run_flt): Set mflt_font_id and mflt_iterate_otf_feature before
49 2009-10-02 Kenichi Handa <handa@m17n.org>
51 * m17n-flt.c (load_flt): Check the return value of
54 2009-09-03 Kenichi Handa <handa@m17n.org>
56 * m17n-flt.c (run_otf): Clear combining code for glyphs whose
57 positions are adjusted by GPOS table.
59 2009-08-13 Kenichi Handa <handa@m17n.org>
61 * Version 1.5.5 released.
63 2009-08-13 Kenichi Handa <handa@m17n.org>
65 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
66 (M17NLIB_VERSION_NAME): Changed to "1.5.5".
68 2009-03-03 Kenichi Handa <handa@m17n.org>
70 * draw.c (compose_glyph_string): Check if category not Mnil.
72 2009-03-02 Kenichi Handa <handa@m17n.org>
74 * Version 1.5.4 released.
76 2009-02-25 Kenichi Handa <handa@m17n.org>
78 * m17n-core.c (report_object_array): For M-text and Plist, print
81 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
82 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
84 * input.c (get_candidate_list): Free unnecessary objects.
85 (take_action_list): Free plist.
87 2009-02-04 Kenichi Handa <handa@m17n.org>
89 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
91 2009-01-16 Kenichi Handa <handa@m17n.org>
93 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
96 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
99 2009-01-14 Kenichi Handa <handa@m17n.org>
101 * coding.c (decode_coding_iso_2022): Check invocation status
102 before updating charset0 and charset1.
104 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
106 2008-12-31 Kenichi Handa <handa@m17n.org>
108 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
111 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
113 * face.c (mface_get_prop): Fix strict aliasing bug.
114 (mface_put_prop): Likewise.
116 * m17n-gui.c (mframe): Fix strict aliasing bug.
118 2008-10-20 Kenichi Handa <handa@m17n.org>
120 * Version 1.5.3 released.
122 2008-10-06 Kenichi Handa <handa@m17n.org>
124 * draw.c (mdraw__init): Use TRUE only when
125 FRIBIDI_INTERFACE_VERSION is less than 3.
127 2008-10-03 Kenichi Handa <handa@m17n.org>
129 * database.c (mdatabase__find_file): Return a copy of filename if
130 it is absolute pathname.
132 2008-09-25 Kenichi Handa <handa@m17n.org>
134 * input.c (load_macros): Don't parse the action list here.
135 (load_im_info): Parse action lists of all macros.
137 2008-09-24 Kenichi Handa <handa@m17n.org>
139 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
141 2008-09-19 Kenichi Handa <handa@m17n.org>
143 * input.c (fully_initialize): Rename "@reload" to "-reload".
145 2008-09-17 Kenichi Handa <handa@m17n.org>
147 * m17n-flt.c (run_stages): Fix combining with a variable width
150 2008-08-04 Kenichi Handa <handa@m17n.org>
152 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
155 2008-07-22 Kenichi Handa <handa@m17n.org>
157 * input.c (fully_initialize): Fix previous change.
159 2008-07-19 Kenichi Handa <handa@m17n.org>
161 * input.c (fully_initialize): Fix previous change.
163 2008-07-14 Kenichi Handa <handa@m17n.org>
165 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
167 2008-07-14 Kenichi Handa <handa@m17n.org>
169 * input.c (fully_initialize): Handle C-M-1, etc.
171 2008-07-11 Kenichi Handa <handa@m17n.org>
173 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
175 2008-06-23 Kenichi Handa <handa@m17n.org>
177 * Version 1.5.2 released.
179 2008-06-23 Kenichi Handa <handa@m17n.org>
181 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
182 (M17NLIB_PATCH_LEVEL): Changed to 2.
183 (M17NLIB_VERSION_NAME): Changed "1.5.2".
185 2008-06-13 Kenichi Handa <handa@m17n.org>
187 * input.c (minput_config_file): Comment fixed for man-page.
189 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
191 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
193 2008-05-24 Kenichi Handa <handa@m17n.org>
195 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
197 2008-05-23 Kenichi Handa <handa@m17n.org>
199 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
200 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
202 (libm17n_gd_la_LIBADD): Likewise.
204 * input.c (take_action_list): Fix debug info.
206 2008-05-14 Kenichi Handa <handa@m17n.org>
208 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
209 (run_stages): Fix index of g_indices.
211 2008-04-03 Kenichi Handa <handa@m17n.org>
213 * draw.c (compose_glyph_string): Don't run flt striding over the
215 (get_gstring): Don't use the cached gstring if cursor position is
218 2008-04-02 Kenichi Handa <handa@m17n.org>
220 * input.c (integer_value): Delete the 3rd arg VALUE.
221 (resolve_expression): Adjust the call of integer_value.
222 (take_action_list): Likewise.
224 2008-03-06 Kenichi Handa <handa@m17n.org>
226 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
229 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
231 * Version 1.5.1 released.
233 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
235 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
236 HAVE_FREETYPE is defined.
238 * font.h (OTF_Tag): Be sure that it is defined in any cases.
240 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
242 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
245 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
247 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
249 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
251 * input.c (parse_action_list): Check M_candidates.
252 (get_im_info): If key is Mnil, be sure to set im_info->states to a
255 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
257 * input.c (integer_value): Fix interpretation of "@-N".
259 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
261 * input.c (get_following_char): Fix interpretation of POS.
262 (get_following_char): Fix interpretation of "@+N".
264 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
266 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
269 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
271 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
273 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
275 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
276 (run_command): Check if clustering now before calling
277 UPDATE_CLUSTER_RANGE.
279 2008-01-06 Kenichi Handa <handa@m17n.org>
281 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
283 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
285 * m17n-X.c (xft_find_metric): Set g->g.measured.
287 * m17n-flt.c (Mequal): New variable.
288 (m17n_init_flt): Initialize it.
289 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
290 into a new member facility.
291 (load_command): Modify parsing of Mfont_facility.
292 (run_rule): Adjuted for the change of FontLayoutCmdRule.
293 (run_otf): Adjusted metrics if a->back is nonzero.
295 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
297 * Version 1.5.0 released.
299 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
301 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
303 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
304 (run_rule): Check if a font has the specific glyph correctly.
306 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
307 MDEBUG_FONT_FLT to MDEBUG_FLT.
309 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
311 * font-flt.c: Delete it.
313 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
315 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
316 TO for the rule of SRC_HAS_GLYPH.
318 * draw.c (run_flt): Argument changed.
319 (compose_glyph_string): Adjusted for the above change.
321 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
323 * plist.c (read_mtext_element): Don't free the malloced buffer.
325 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
327 * m17n-core.h (merror_code): Extern it.
329 * m17n-misc.h (merror_code): Don't extern it.
331 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
333 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
335 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
337 * draw.c (compose_glyph_string): Check g->rface->layouter, not
338 g->rface->rfont->layouter.
340 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
342 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
343 (run_rule): Use ctx->encoded_offset.
344 (run_command): Likewise.
345 (run_stages): Set ctx->encoded_offset.
347 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
349 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
350 bit-size of MFLTGlyph->internal.
352 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
354 * draw.c (visual_order): Exclude the last anchor glyph from the
357 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
359 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
360 (run_stages): Likewise.
361 (load_flt): Unref top after checking plist.
363 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
365 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
367 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
369 * m17n-flt.c (Mcombining): New variable.
370 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
371 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
372 SRC_HAS_GLYPH and SRC_OTF_SPEC.
373 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
375 (load_command): Adjusted for the above changes.
376 (run_rule): Likewise.
377 (combining_code_from_class): Delete it.
378 (mflt_get): Check flt->name against Mcombining, not Mt.
380 * internal-flt.h (Mcombining): Extern it.
382 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
383 combining characters.
385 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
387 * face.c (mface__realize): Reset measured flag before calling
390 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
391 (setup_combining_coverage): New function.
392 (setup_combining_flt): New function.
393 (mflt_get): If flt is not found, return NULL. If name if Mt,
394 call setup_combining_flt.
395 (mflt_run): For debugging, print font family name.
397 * font-ft.c (ft_render): Fix handling of baseline_offset.
398 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
399 (ft_render): Check pixel_mode to determine anti_alias.
401 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
402 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
403 (xfont_render): Set baseline_offset in pixel.
404 (xft_render): Fix handling of baseline_offset.
406 * draw.c (run_flt): Set font.font.family.
407 (compose_glyph_string): Fix handling of combining characters.
409 * fontset.c (try_font_list): Check if the named flt is surely
412 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
414 * draw.c (analyse_bidi_level): New function.
415 (visual_order): Do reordering using the already decided
417 (compose_glyph_string): Decide bidi-level before calling flt.
419 * m17n-flt.c (mflt_run): Fix typo.
421 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
423 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
425 * draw.c (visual_order): Don't rely on the width of glyphs.
426 (run_flt): Fix culculation of g->g.to.
428 * m17n-flt.c (run_rule): Don't set error code here.
429 (run_cond): Likewise.
430 (run_otf): Fix culculation of xoff and yoff.
431 (run_command): Don't set error code here.
435 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
436 (xfont_find_metric): Set glyph's yadv to 0.
437 (xft_find_metric): Likewise.
439 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
440 (ft_find_metric): Adjust glyph's metrics.
441 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
442 (ft_drive_otf): Set mark glyph's xadv to 0.
444 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
447 2007-10-29 Kenichi Handa <handa@m17n.org>
449 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
450 (mflt_get): Adjusted for the argument change.
451 (mflt_name): Adjusted for the return value change.
453 * m17n-flt.c (Mgenerator, Mend): New variables.
454 (flt_min_coverage, flt_max_coverage): New variables.
457 (Mfont_has): Renamed from Mexist. Referrers chagned.
458 (gen_otf_tag): Handle the trailing whitespaces.
459 (otf_count_features, otf_store_features): Fix for negative features.
460 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
461 (load_otf_command): Likewise.
462 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
463 (load_flt): Argument changed. Caller changed.
464 (free_flt_list): New function.
465 (run_rule): Adjusted for the change of FontLayoutContext.
466 (mflt_run): Adjusted for the change of FontLayoutContext.
468 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
469 (m17n_fini_win): Call m17n_fini_flt.
471 * m17n-gui.h: Include m17n-flt.h.
473 * m17n-gd.c: Adusted for the change of MGlyph.
475 * m17n-X.c: Adusted for the change of MGlyph.
476 (xft_check_otf, xft_drive_otf): New functions.
478 * internal-gui.h (MGlyph): Modified for new FLT handling.
480 * fontset.c (try_font_list): Adusted for the change of MGlyph.
482 * font-ft.c: Adjusted for the change of MGlyph.
483 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
484 (get_glyph_metric): Deleted.
485 (ft_check_otf): New function.
486 (ft_drive_otf): New fucntion.
488 * font.c: Adjusted for the change of MGlyph.
489 (mfont__init): Don't call mfont__flt_init.
490 (mfont__fini): Don't call mfont__flt_fini.
491 (mfont__get_glyph_id, mfont__get_metrics): New functions.
493 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
494 (MFLTFontForRealized): New struct.
495 (struct MFontDriver): New members check_otf and drive_otf.
496 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
498 * face.c: Adjusted for the change of MGlyph.
500 * draw.c: Adjusted for the change of MGlyph.
502 * m17n.c (m17n_init): Don't call mchar_init.
504 * m17n-core.c (m17n_init_core): Call mchar_init.
506 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
508 * input.c: Include "m17n.h" instead of "m17n-gui.h".
510 * chartab.c (mchartable): Initialize table->min_char to -1.
511 (mchartable_min_char): New function.
512 (mchartable_max_char): New function.
514 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
515 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
517 2007-10-12 Kenichi Handa <handa@m17n.org>
519 * m17n-core.h (Mcharset): Extern it.
520 Move detabase related declarations from m17n.h.
522 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
523 (struct _MFLTOtfFeatures): New struct.
524 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
525 (struct _MFLTFont): Delete otf, add check_otf.
526 (MCHAR_INVALID_CODE): Define it.
528 * plist.c (read_mtext_element): Simplify the code.
530 * m17n.h: Move database related declarations to m17n-core.h
531 (Mharset): Don't extern it.
533 * m17n.c (m17n_init): Don't call mdatabase__init.
535 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
538 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
539 (Mexist): New variable.
540 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
541 (FontLayoutCmdRule): New member src.exist.
542 (parse_otf_command): Handle gsub_count and gpos_count separately.
543 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
544 (load_command): Handle the command "exist".
545 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
546 (run_rule): Handle the case SRC_EXIST.
547 (run_otf): Adjusted for the change of MFLTOtfSpec.
548 (run_command): Check the range of FROM.
549 (check_otf_spec): Delete it.
550 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
552 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
553 (mflt_find): Call font->check_otf instead of check_otf_spec.
554 (mflt_run): Keep the metrics in 26.6 fixed point.
556 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
557 (m17n_init_core): Call mdatabase__init.
559 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
561 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
564 * font-flt.c (Mexist): New variable.
565 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
566 (FontLayoutCmdRule): New member src.exist.
567 (load_category_table): Use isalnum, not isalpha.
568 (load_command): Check the command "exist".
569 (run_rule): Hande the case SRC_EXIST.
570 (run_command): Check the range of FROM.
571 (mfont__flt_init): Initialize Mexist.
573 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
575 * database.h (mdatabase__load_charset_func): Extern it.
577 * database.c: Include m17n-core.h instead of m17n.h.
578 (load_chartable): Use mtext__from_data.
579 (load_charset): Moved to charset.c
580 (load_database): Call mdatabase__load_charset_func instead of
582 (mdatabase__load_charset_func): New variable.
583 (mdatabase__init): Initialize mdatabase__load_charset_func and
584 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
585 (mdatabase__save): Use fwrite, not mconv_encode_stream.
586 (Mcharset): Declare it here.
588 * charset.c: Include "database.h.".
589 (load_charset): Moved from database.c.
590 (mcharset__init): Initialize mdatabase__load_charset_func, don't
593 * character.c (mchar_define_property): Call mdatabase_find directly.
594 (mchar_get_prop): Call mdatabase_add directly.
595 (mchar_put_prop): Call mdatabase_load directly.
596 (mchar_get_prop_table): Likewise.
598 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
599 (libm17n_la_SOURCES): Remove database.[ch].
600 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
602 2007-09-18 Kenichi Handa <handa@m17n.org>
604 * face.c (mface__realize): Try Freetype based font at first.
606 * font.c: Include <ctype.h>
608 2007-09-16 Kenichi Handa <handa@m17n.org>
610 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
612 (run_otf): Call font->get_metrics, not font->get_metric.
613 (run_stages): Likewise.
614 (CHECK_FLT_COVERAGE): New macro.
615 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
616 (check_otf_spec): New function.
617 (m17n_fini_flt): Unref flt->coverage.
618 (mflt_find): Argument changed.
619 (mflt_name): New function.
620 (mflt_coverage): Use CHECK_FLT_COVERAGE.
622 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
623 (mflt_find): Prototype adjusted.
624 (mflt_name): Extern it.
626 2007-09-14 Kenichi Handa <handa@m17n.org>
628 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
630 * font-flt.c (run_otf): Make debug info printing comaptible with
632 (run_command): Likewise.
633 (mfont__flt_run): Likewise.
635 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
636 invalid only when it's negative.
638 (run_command): Likewise.
639 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
641 2007-09-10 Kenichi Handa <handa@m17n.org>
643 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
644 (struct _MFLTFont): Prototype of get_glyph_id changed.
646 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
648 (GAPPEND): Delete this macro.
649 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
650 for the change of MFLTGlyph. Caller changed.
651 (run_otf): Simply calls font->get_glyph_id.
652 (run_command): Reset g->encoded and g->measured for direct code.
653 (positioning): Delete this function.
654 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
656 2007-09-07 Kenichi Handa <handa@m17n.org>
658 * draw.c (compose_glyph_string): Improve script detection.
660 2007-09-06 Kenichi Handa <handa@m17n.org>
662 * m17n-flt.h (mflt_get): Extern it.
664 * m17n-flt.c (run_stages): Call positioning only if
665 font->get_metric is non-NULL.
666 (CHECK_FLT_STAGES): Fix typo.
667 (mflt_get): New function.
669 * font-flt.c (mfont__flt_run): Improve debug info printing.
671 2007-09-04 Kenichi Handa <handa@m17n.org>
673 * m17n-flt.c (MFontLayoutTable): Delete this type.
674 (struct _MFLT): New member mdb and coverage.
675 (list_flt): Set flt->mdb.
676 (load_generator): Argument and return value changed. Caller
678 (get_font_layout_table): Delete this function.
679 (run_stages): Argument changed. Caller changed.
680 (CHECK_FLT_STAGES): New macro.
681 (mfont__flt_encode_char): Argument changed.
682 (mflt_find): Likewise.
683 (mflt_coverage): New function.
684 (mflt_run): Argument changed.
685 (mdebug_dump_flt): Likewise.
687 * m17n-flt.h (mflt_coverage): Extern it.
688 (mflt_find): Prototype adjusted.
690 2007-09-03 Kenichi Handa <handa@m17n.org>
692 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
694 * database.c (mdatabase__props): New function.
696 * database.h (mdatabase__props): Extern it.
698 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
700 (struct _MFLTFont): Add suitable_p.
701 (mflt_find): Extern it.
703 * m17n-flt.c: Include "database.h".
704 (struct _MFLT): New struct.
705 (list_flt): New function.
706 (load_flt): Don't update flt_list.
707 (get_font_layout_table): Use flt_list.
708 (m17n_init_flt): Don't initialize flt_list.
709 (m17n_fini_flt): Adjusted for the change of flt_list.
710 (mflt_find): New function.
711 (mflt_run): Fix debug printing.
713 2007-08-23 Kenichi Handa <handa@m17n.org>
715 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
716 (run_stages): Print separator in encoded string as "|".
718 2007-08-23 Kenichi Handa <handa@m17n.org>
720 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
721 the glyph is already handled by OTF.
723 2007-08-21 Kenichi Handa <handa@m17n.org>
725 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
727 2007-08-20 Kenichi Handa <handa@m17n.org>
729 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
732 2007-08-17 Kenichi Handa <handa@m17n.org>
734 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
736 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
737 (MFLTFont): Prototype of the member drive_otf adjusted.
739 * m17n-flt.c (run_stages): Fix handling of padding.
741 * font-ft.c (get_glyph_metric): New function.
742 (DEVICE_DELTA): Return 26.6 fixed point value.
743 (adjust_anchor): Likewise.
744 (mfont__ft_drive_otf): Use get_glyph_metric.
746 * font-flt.c (mfont__flt_run): Pay attention to padding on
749 2007-08-16 Kenichi Handa <handa@m17n.org>
751 * m17n-flt.c (run_stages): Fix typo.
753 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
755 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
756 Adjusted for the argument change of adjust_anchor. Calculte based
759 2007-08-15 Kenichi Handa <handa@m17n.org>
761 * charset.c (mcharset__load_from_database): Set mdebug_flag
762 instead of mdebug_mask.
764 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
767 * database.c (load_database): Set mdebug_flag instead of
769 (mdatabase__load_for_keys): Likewise.
771 * draw.c: Include "internal-flt.h".
772 (dump_combining_code): Don't subtract 128 from combining code
775 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
777 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
779 (run_cond): Likewise.
781 (run_command): Likewise.
782 (mfont__flt_run): Change format of debug info.
784 * font-ft.c: Include "internal-flt.h".
785 Set mdebug_flag instead of mdebug_mask.
786 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
788 * input.c: Set mdebug_flag instead of mdebug_mask.
789 (shift_state): New MDEBUG_FLAG macro.
790 (preedit_commit): Likewise.
793 * internal-flt.h: New file.
795 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
796 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
797 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
798 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
799 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
800 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
801 these macros to internal-flt.h.
803 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
805 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
806 (enum MDebugMaskBit): Delete this enum.
807 (enum MDebugFlag): New enum.
808 (mdebug__flag): Don't extern it.
809 (mdebug__flags): Extern it.
810 (MDEBUG_FLAG): New macro.
811 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
812 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
813 (MDEBUG_PRINT_TIME): Likewise.
815 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
816 (xfont_list): Likewise.
818 * m17n-core.c (mdebug__flag): Delete this variable.
819 (mdebug__flags): New variable.
820 (SET_DEBUG_FLAG): Make it a function.
821 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
822 (m17n_fini_core): Likewise.
824 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
825 (m17n_fini_win): Likewise.
827 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
829 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
830 (m17n_fini): Likewise.
832 * symbol.c (msymbol__free_table): Adjusted for the change of
835 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
836 (BASICHEADERS): Add m17n-flt.h.
837 (FLT_SOURCES): New variable.
838 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
839 (libm17n_flt_la_LDFLAGS): Likewise.
841 * m17n-flt.h: New file.
843 * m17n-flt.c: New file created by modifying font-flt.c.
845 2007-07-13 Kenichi Handa <handa@m17n.org>
847 * Version 1.4.0 released.
849 2007-07-12 Kenichi Handa <handa@m17n.org>
851 * input.c: Fix doxygen @ref commands.
853 2007-07-10 Kenichi Handa <handa@m17n.org>
855 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
857 2007-07-09 Kenichi Handa <handa@m17n.org>
859 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
861 * m17n.h: Include m17n-core.h if not yet done. Use macros
862 M17N_BEGIN_HEADER and M17N_END_HEADER.
864 * m17n-gui.h: Likewise.
866 * m17n-misc.h: Likewise.
868 2007-06-13 Kenichi Handa <handa@m17n.org>
870 * font-flt.c (load_command): Prepend "^" in the regular expression.
872 2007-06-11 Kenichi Handa <handa@m17n.org>
874 * language.c (mlanguage_name_list): Fix previous change.
876 * coding.c (mcoding__load_from_database): Add aliases in
877 coding_definition_list.
879 2007-06-10 Kenichi Handa <handa@m17n.org>
881 * language.c (mlanguage_name_list): Fix previous change.
883 2007-06-08 Kenichi Handa <handa@m17n.org>
885 * input.c (update_candidate): Copy candidate_list earlier.
886 (re_init_ic): Provide pseudo initialize state if none.
888 2007-06-05 Kenichi Handa <handa@m17n.org>
890 * input.c (preedit_insert): Print debug information.
892 * database.c (expand_wildcard_database): New function.
893 (mdatabase_list): Fix handling of wildcard database.
895 * language.c (load_lang_name): New function.
896 (mlang__fini): Cancel the last two changes.
897 (mlanguage_name_list): New arg script and territories. Use
900 * m17n.h (mlangauge_name_list): Adjusted.
902 2007-06-04 Kenichi Handa <handa@m17n.org>
904 * input.c (open_im): Check if the input method has at least one
907 2007-06-01 Kenichi Handa <handa@m17n.org>
909 * input.c (shift_state): Change the format of debug print.
910 (preedit_commit): New arg need_prefix. Caller changed.
911 (update_candidate): Copy candidate_list.
912 (take_action_list): Likewise.
913 (handle_key): Change the format of debug print.
915 * font-flt.c (load_flt): Ignore unknown directives.
917 2007-05-25 Kenichi Handa <handa@m17n.org>
919 * m17n-core.c (mdebug__unregister_object): Small optimization.
921 * database.c (find_file): Merged into get_database_file.
922 (get_database_file): New arg result. Caller changed.
923 (mdatabase__check): Fix the logic.
925 2007-05-24 Kenichi Handa <handa@m17n.org>
927 * database.c (find_database): If unprocessed wildcard database is
928 found, register database filed and recursively call find_database.
929 (free_db_info): Unref db_info->properties.
930 (register_database): New arg properties. Delete code for
931 initializing mdatabase__list.
932 (register_databases_in_files): Argument changed. Caller changed.
933 (mdatabase__update): Don't list files by glob here.
934 (mdatabase_list): If unprocessed wildcard database is found,
935 register database filed and recursively call mdatabase_list.
937 * database.h (enum MDatabaseStatus): New enum
938 MDB_STATUS_AUTO_WILDCARD.
940 * input.c (load_branch): Fix previous change.
941 (update_global_info): If the global database is not found, return -1.
943 2007-05-23 Kenichi Handa <handa@m17n.org>
945 * database.c (Mversion): New variable.
946 (mdatabase__init): Initialize it.
947 (register_database): New arg properties. Caller changed.
948 (register_databases_in_files): Don't check version here.
949 (mdatabase__update): Likewise.
951 * database.h (MDatabaseInfo): New member properties.
953 2007-05-21 Kenichi Handa <handa@m17n.org>
955 * language.c: Include <ctype.h>
956 (mlanguage__info): Use strncasecmp (not memcmp).
957 (mlanguage_name): Downcase language name for backward
960 * input.c (filter): Don't check Mlanguage property of
963 2007-05-18 Kenichi Handa <handa@m17n.org>
965 * language.c (mlanguage_name): Fix it to handle M-text English
968 * input.c (config_command): Set NAME before using it.
969 (load_branch): Try to resolve a map name by variables.
971 2007-05-17 Kenichi Handa <handa@m17n.org>
973 * language.c (mlang__fini): Fix previous change.
975 2007-05-16 Kenichi Handa <handa@m17n.org>
977 * plist.c (free_plist): Cancel the last change.
978 (write_element): Check if PLIST is nested.
979 (mplist__from_plist): Label a plist as nested if appropriate.
980 (mplist__from_alist): Label a plist as nested.
981 (mplist__conc): Check the value of PL before referring it. Label
982 a plist as nested if appropriate.
983 (mplist_copy): Label a plist as nested if appropriate.
984 (mplist_put_func): Return Mnil if KEY is a managing key.
985 (mplist_push): Label a plist as nested if appropriate.
987 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
990 * language.c (mlang__fini): Unref each element of langname_list.
992 2007-05-14 Kenichi Handa <handa@m17n.org>
994 * language.c: Include <string.h> and <locale.h>.
995 (langname_list): New variable.
996 (load_lang_script_list): Exclude invalid list elements.
997 (mlang__init): Initialize langname_list.
998 (mlang__fini): Unref langname_list.
999 (mlanguage__info): Adjusted for the change of English
1000 name (symbol->M-text).
1001 (mlanguage_name): Label it as obsolete.
1002 (mlanguage_name_list): New function.
1004 * m17n.h (mlanguage_name_list): Extern it.
1006 * locale.c (make_locale): Fix setting of members of locale.
1008 * plist.c (free_plist): Unref also nested plist.
1010 2007-05-11 Kenichi Handa <handa@m17n.org>
1012 * coding.c (mconv_reset_converter): Set internal->used to 0.
1014 2007-05-08 Kenichi Handa <handa@m17n.org>
1016 * input.c (check_description): Force copying the translated text.
1018 2007-05-02 Kenichi Handa <handa@m17n.org>
1020 * input.c (minput_save_config): Unref unnecessary plist. Use
1021 free_im_list to free im_config_list.
1023 2007-04-20 Kenichi Handa <handa@m17n.org>
1025 * input.c (config_command): Fix previous change again.
1026 (config_variable): Likewise.
1027 (minput_config_command): Fix for the case of setting back to
1029 (minput_config_variable): Likewise.
1030 (minput_save_config): Include nil as documentation of customized
1033 2007-04-05 Kenichi Handa <handa@m17n.org>
1035 * input.c (config_command): Fix previous change.
1036 (config_variable): Likewise.
1038 * plist.c (mplist_get_func): Fix for backward compatiblity.
1040 2007-04-04 Kenichi Handa <handa@m17n.org>
1042 * input.c (minput_get_command, minput_config_command): Fix example
1045 2007-03-29 Kenichi Handa <handa@m17n.org>
1047 These changes are to avoid unsafe casting of a function pointer.
1049 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
1050 (struct MFace): New member hook.
1052 * face.c (serialize_face): Adjusted for the change of MFace.
1053 (deserialize_face): Likewise.
1054 (mface__init): Likewise. Use msymbol_put_func.
1055 (mface__realize): Adjusted for the change of MFace. Avoid
1057 (mface_get_prop): Adjusted for the change of MFace.
1058 (mface_put_prop): Likewise.
1059 (mface_get_hook): New function.
1060 (mface_put_hook): New function.
1061 (mface_update): Adjusted for the change of MFace.
1063 * input-gui.c (win_callback): Use mplsit_get_func.
1064 (minput__win_init): Use mplsit_put_func.
1066 * input.c (take_action_list): Use mplist_get_func.
1067 (init_ic_info): Likewise.
1068 (fini_ic_info): Likewise.
1069 (minput_callback): Likewise.
1070 (minput__init): Use mplist_put_func.
1072 * language.c (mlang__init): Use msymbol_put_func.
1074 * m17n-core.h (M17NFunc): New function type.
1075 (M17N_FUNC): New macro.
1076 (msymbol_put_func, msymbol_get_func): Extern them.
1077 (mplist_put_func, mplist_get_func): Extern them.
1079 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1081 * m17n-gui.c (mframe): Add a proper casting.
1083 * plist.h (struct MPlist): Make the member val a union.
1084 (MPLIST_VAL): Adjusted for the above change.
1085 (MPLIST_FUNC): New macro.
1086 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1088 * plist.c (mplist_put_func, mplist_get_func): New functions.
1090 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1091 (msymbol_put_func, msymbol_get_func): New functions.
1093 * textprop.c (mtext_serialize): Use msymbol_get_func.
1094 (mtext_deserialize): Likewise.
1096 2007-03-28 Kenichi Handa <handa@m17n.org>
1098 * input.c (get_candidate_list): Avoid unnecessary unref.
1100 2007-03-23 Kenichi Handa <handa@m17n.org>
1102 * database.c (mdatabase__update): Unref plist at the tail.
1104 2007-03-21 Kenichi Handa <handa@m17n.org>
1106 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1108 (config_command): Fix for the case that configuration is
1110 (config_variable): Likewise.
1111 (minput_config_command): If keyseqlist is an empty list, cancel
1113 (minput_config_variable) If value is an empty list, cancel the
1115 (minput_save_config): Handle cancellation of config and customize
1118 2007-03-15 Kenichi Handa <handa@m17n.org>
1120 * input.c (minput_config_variable): Check custom->vars (not
1123 2007-03-01 Kenichi Handa <handa@m17n.org>
1125 * input.c (reload_im_info): Setup cmds, vars, and title of
1127 (check_variable_value): Fix the return value.
1129 * database.c (mdatabase__check): If necessary, update database and
1132 2007-02-28 Kenichi Handa <handa@m17n.org>
1134 * database.c (get_dir_info): Set dir_info->status to
1135 MDB_STATUS_OUTDATED.
1136 (check_version): New function.
1137 (register_database): Don't call find_database.
1138 (register_databases_in_files): Don't register a database of
1140 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1142 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1143 and MDB_STATUS_OUTDATED.
1145 * font.h (struct MFont): Types of members type, source, and
1146 spacing changed to unsigned.
1148 * internal-gui.h (struct): Types of members category and type
1149 changed to unsigned.
1151 * internal.h (struct MText): Types of members format and coverage
1152 changed to unsigned.
1154 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1155 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1157 2007-02-23 Kenichi Handa <handa@m17n.org>
1159 * input.c (Mpop): New variable.
1160 (fully_initialize): Initialize Mpop.
1161 (parse_action_list): Handle Mpop.
1162 (take_action_list): Likewise.
1163 (handle_key): When a key is unhandled, shift to the initial state
1164 only if the current state has no branch action.
1166 2007-02-12 Kenichi Handa <handa@m17n.org>
1168 * input.c (get_preceding_char): Unref mt if necessary.
1169 (get_following_char): Likewise.
1170 (parse_action_list): Fix handling of `insert' action as
1172 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1173 (take_action_list): Check invalid candidate list.
1175 2007-02-06 Kenichi Handa <handa@m17n.org>
1177 * input.c (integer_value): Check also ic->produced for @-N.
1179 2007-01-26 Kenichi Handa <handa@m17n.org>
1181 * database.c (mdatabase__update): Check mdatabase__dir_list from
1184 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1186 2007-01-12 Kenichi Handa <handa@m17n.org>
1188 * input.c (handle_key): Handle a branch action of the initial
1191 2007-01-10 Kenichi Handa <handa@m17n.org>
1193 * m17n-gd.c (gd_render): Delete superfluous line.
1195 2006-12-26 Kenichi Handa <handa@m17n.org>
1197 * m17n.h (minput_callback): Extern it.
1199 * input.h (minput__callback): Delte extern.
1201 * input.c (get_surrounding_text): Adjusted for the change of
1202 minput__callback to minput_callback.
1203 (delete_surrounding_text): Likewise.
1204 (minput_create_ic): Likewise.
1205 (minput_destroy_ic): Likewise.
1206 (minput_filter): Likewise.
1207 (minput_set_spot): Likewise.
1208 (minput_toggle): Likewise.
1209 (minput_reset_ic): Likewise.
1211 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1212 and ic->candidate_to to 0.
1213 (minput_callback): Renamed from minput__callback.
1215 * input-gui.c (win_callback): Adjusted for the change of
1216 minput__callback to minput_callback.
1218 2006-12-15 Kenichi Handa <handa@m17n.org>
1220 * font-ft.c (ft_add_font): Fix typo.
1222 2006-12-06 Kenichi Handa <handa@m17n.org>
1224 * Version 1.3.4 released.
1226 2006-11-16 Kenichi Handa <handa@m17n.org>
1228 * input.c (parse_action_list): Allow (undo 0).
1229 (adjust_markers): New function.
1230 (preedit_insert, preedit_delete): Call adjust_markers.
1231 (preedit_replace): New function.
1232 (update_candidate): Call preedit_replace instead of preedit_insert
1234 (filter): When ic_info->commit_key_head is nonzero, shift input
1235 event keys even if there's no committed text.
1237 2006-11-10 Kenichi Handa <handa@m17n.org>
1239 * input.h (MInputContextInfo): New member commit_key_head.
1241 * input.c (preedit_commit): Update ic_info->commit_key_head.
1242 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1243 (filter): When committed, shift keys by ic_info->commit_key_head.
1245 2006-10-30 Kenichi Handa <handa@m17n.org>
1247 * input.c (preedit_delete): Fix typo.
1248 (take_action_list): Print more debugging information. Allow
1249 variable in arg of 'select' and `pushback'.
1251 * database.c (gen_database_name): Don't put extra space.
1252 (load_database): Print debugging information.
1253 (register_databases_in_files): New arg headlen. Callers changed.
1254 (mdatabase__load_for_keys): Shorten debugging information.
1255 (mdatabase_load): Don't print debugging information here.
1257 2006-10-27 Kenichi Handa <handa@m17n.org>
1259 * input.c (marker_code): New arg surrounding. Callers changed.
1260 (surrounding_pos): Check if name[0] == '@'.
1261 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1262 (take_action_list): Likewise.
1263 (get_preceding_char): If POS is zero, always call
1264 get_surrounding_text.
1266 2006-10-19 Kenichi Handa <handa@m17n.org>
1268 * input.c (load_variables): Fix setting of `global'.
1270 2006-10-16 Kenichi Handa <handa@m17n.org>
1272 * draw.c (draw_background): Be sure to set *to_x.
1273 (render_glyph_string): If from == to, just return.
1275 2006-10-18 Kenichi Handa <handa@m17n.org>
1277 * database.c (get_dir_info): Return NULL if the directory name is
1279 (register_databases_in_files): Call register_database with
1281 (mdatabase__update): Fix logic. Call register_database with
1283 (mdatabase_define): Call register_database with
1284 MDB_STATUS_EXPLICIT.
1286 * input.c (delete_surrounding_text): Be sure to set members
1287 preceding_text and following_text to NULL.
1288 (shift_state): Save variable values in ic_info->vars_saved.
1289 (preedit_commit): Don't print debug information here. Don't
1290 change ic_info->keys here.
1291 (get_candidate_list): Don't ref plist.
1292 (take_action_list): Don't unref return value of
1293 get_candidate_list. For undo, reset ic->produced and recover
1294 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1296 (init_ic_info): Set ic_info->vars_saved.
1297 (fini_ic_info): Unref ic_info->vars_saved.
1298 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1300 (filter): Be sure to set members preceding_text and following_text
1301 to NULL. Print debug information about produced text. Delete
1302 processed keys from ic_info->keys.
1304 * input.h (MInputContextInfo): New member vars_saved.
1306 2006-10-16 Kenichi Handa <handa@m17n.org>
1308 * database.c (mdatabase__update): Fix the way to get db_info.
1310 2006-10-02 Kenichi Handa <handa@m17n.org>
1312 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1313 `size' changed to 24.
1315 * font.c (xlfd_unparse_name): Adjusted for the change of
1317 (font_score): Likewise.
1318 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1320 * m17n-X.c (MFontX, _MFontX): Deleted.
1321 (SET_SIZE, HAVE_SIZE): Deleted.
1322 (free_display_info): Adjusted for the change of
1323 disp_info->font_list format.
1324 (xfont_registry_list): Likewise.
1325 (xfont_open): Likewise.
1326 (xfont_list): Likewise.
1327 (xfont_encode_char): Ignore size to find a realized font.
1328 (MRealizedFontXft): Change the order of members to make it
1329 compatible with MRealizedFontFT.
1331 2006-09-27 Kenichi Handa <handa@m17n.org>
1333 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1334 (mfont_close): Add comments.
1336 * mtext-lbrk.c (mtext_line_break): Add comment.
1338 2006-09-26 Kenichi Handa <handa@m17n.org>
1340 * input.c (minput_get_description): Handle description about
1341 inclusion-only input methods.
1343 2006-09-21 Kenichi Handa <handa@m17n.org>
1345 * input.c (M_gettext): New variable.
1346 (fully_initialize): Initialize M_gettext.
1347 (check_description): New function.
1348 (load_commands): Call check_description.
1349 (config_all_commands): Be sure to unref pl.
1350 (load_variables): Call check_description.
1351 (config_all_variables): Be sure to unref pl.
1352 (load_im_info): Call check_description.
1354 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1356 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1357 and bind_textdomain_codeset.
1359 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1361 2006-09-15 Kenichi Handa <handa@m17n.org>
1363 * input.c (reload_im_info): Update custom and global info.
1364 (init_ic_info): Fix previous change.
1366 2006-09-14 Kenichi Handa <handa@m17n.org>
1368 * database.c: Include <libgen.h>.
1369 (mdatabase__lock): Make a directory if necessary.
1371 * input.c (resolve_command): Adjusted for the format change of
1372 configured_cmds member.
1373 (load_commands, load_variables): Fix for errornous data handling.
1374 (config_command, config_variable): New function.
1375 (config_all_commands, config_all_variables): Renamed from
1376 config_commands and config_variables. Utilize the above function.
1377 (check_variable_value): Argument changed. Callers changed.
1378 (load_im_info): Call config_all_commands and config_all_variables.
1379 (init_ic_info): Adjusted for the format change of configured_vars
1381 (minput__init): Initialize Mcustomized, Mconfigured, and
1383 (Mcustomized, Mconfigured, Minherited): New variables.
1384 (minput_get_command): Be sure to return NULL if an input method
1385 use no local command.
1386 (minput_get_variable): Be sure to return NULL if an input method
1387 use no local variable.
1388 (minput_config_command, minput_config_variable)
1389 (minput_save_config): Adjusted for the format change of
1390 configured_cmds and configured_vars members.
1392 * plist.c (write_element): Delete superfluous ':'.
1394 2006-09-13 Kenichi Handa <handa@m17n.org>
1396 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1397 (minput_config_file): Extern it.
1399 * draw.c (Minherited): Declaration moved to input.c.
1400 (mdraw__init): Don't initialize Minherited here.
1402 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1404 2006-09-07 Kenichi Handa <handa@m17n.org>
1406 * textprop.c (mtext_serialize): Call mplist__serialize with the
1409 * plist.h (mplist__serialize): Prototype adjusted.
1410 (mplist__assq): Extern it.
1412 * plist.c: Include <ctype.h>
1413 (PUTC, PUTS): New macros.
1414 (write_symbol): New function.
1415 (write_element): New arg indent.
1416 (dump_string, dump_plist_element): Delete them.
1417 (mplist__from_string): New arg pretty.
1418 (mplist__assq): New function.
1419 (mdebug_dump_plist): Use write_element.
1421 * mtext.c (mtext_cat_char): Allocate more memory.
1422 (mdebug_dump_mtext): Don't escal a newline character.
1424 * m17n.h (minput_get_command, minput_get_variable)
1425 (minput_config_command, minput_config_variable)
1426 (minput_save_config): Extern them.
1428 * m17n-core.c: Include <string.h>.
1429 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1430 use the stream stdout instead of a file of that name.
1432 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1435 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1436 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1437 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1438 (MDEBUG_DUMP): Flush the stream.
1440 * input.h (struct _MInputMethodInfo): Delete member im. New
1441 members mdb, language, name, extra, cmds, configured_cmds,
1442 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1443 (MInputContextInfo): New member tick.
1445 * input.c: Big change to improve user-side input method
1446 customization. Here, list just public API changes.
1447 (minput_get_commands, minput_get_variables)
1448 (minput_assign_command_keys, minput_set_variable): Label them
1450 (minput_get_command, minput_get_variable)
1451 (minput_config_command, minput_config_variable)
1452 (minput_save_config): New functions.
1454 * database.h (PATH_MAX): Define it if not yet defined.
1455 (PATH_SEPARATOR): Likewise.
1456 (enum MDatabaseStatus): New enum.
1457 (struct MDatabaseInfo): Moved from database.c. New members status,
1458 time, lock_file, and uniq_file.
1459 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1460 (mdatabase__unlock): Extern them.
1462 * database.c: Include <time.h>.
1463 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1464 (GEN_PATH): Args changed. Callers changed.
1465 (struct MDatabaseInfo): Moved to database.h.
1466 (struct MDatabase, mdb_list): Deleted.
1467 (mdatabase__list): New var.
1468 (get_database_filename): Deleted. Callers changed to use
1470 (find_file, get_database_file): New files.
1471 (get_dir_info): Initialize new members of MDatabaseInfo.
1472 (find_database): Arg chagnded. Callers changed.
1473 (free_db_info, register_database, register_databases_in_files):
1475 (update_database_list): Deleted.
1476 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1477 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1478 (mdatabase__update): New function.
1479 (mdatabase__check): Return value changed.
1480 (mdatabase__file, mdatabase__lock, mdatabase__save)
1481 (mdatabase__unlock): New functions.
1483 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1485 * input.c (get_surrounding_text): Return -2 when surrounding text
1487 (get_following_char): Likewise.
1488 (get_preceding_char): Likewise.
1489 (minput__callback): Return 0 if there is a callback function,
1492 2006-08-17 Kenichi Handa <handa@m17n.org>
1494 * input.c (reset_ic): Use shift_state to setup the current state.
1496 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1498 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1499 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1500 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1502 2006-08-02 Kenichi Handa <handa@m17n.org>
1504 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1506 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1508 * font-ft.c (ft_encapsulate): Add code for debugging.
1509 (mfont__ft_drive_otf): Be sure to encode character before getting
1512 2006-07-21 Kenichi Handa <handa@m17n.org>
1514 * draw.c (mdraw_text_extents): Fix previous typo.
1516 2006-07-19 Kenichi Handa <handa@m17n.org>
1518 * draw.c (gstring_width): New arg lbearing.
1519 (render_glyph_string): Adjusted for the change of gstring_width.
1520 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1522 * m17n-core.h (Mlanguage): Extern it.
1524 * m17n.h (Mlanguage): Extern deleted.
1526 * mtext.c (mtext__init): Initialize Mlanguage.
1527 (Mlanguage): Declaration moved from locale.c
1529 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1530 (Mlanguage): Declaration moved to mtext.c.
1532 * language.c (mlang__init): Don't initialize Mlanguage here.
1534 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1536 2006-07-14 Kenichi Handa <handa@m17n.org>
1538 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1539 (MRealizedFontFT): New member face_encapsulated.
1540 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1541 (ft_gen_font): New function.
1542 (ft_add_font): Use ft_gen_font.
1543 (ft_list_script): Store lists in ft_script_list.
1544 (ft_check_otf): New arg ft_face. Caller changed.
1545 (ft_check_language): Likewise.
1546 (ft_check_script): Likewise.
1547 (ft_encapsulate, ft_close): New functions.
1548 (mfont__ft_driver): Initialize members encapsulate and close.
1549 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1551 * font.h (struct MRealizedFont): New member encapsulating.
1552 (struct MFontDriver): New members encapsulate and close.
1554 * font.c (mfont__match_p): If FONT is realized, check capability
1555 by font drivers's check_capability method.
1556 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1559 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1560 declarations of foundry and fam local vars.
1561 (xft_driver): Make it static.
1563 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1564 (mfont_close): Extern them.
1566 * m17n-gd.c (device_open): Don't specify foundry and family of the
1569 2006-07-11 Kenichi Handa <handa@m17n.org>
1571 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1573 2006-07-13 Kenichi Handa <handa@m17n.org>
1575 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1577 (ft_check_script): Delete unused var.
1578 (ft_list_capability): Likewise.
1580 * font.c (mfont__get_capability): Setup cap->otf.
1581 (Motf): Make it global.
1582 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1584 * font.h (MFontCapability): New member otf.
1586 * language.c (mlang__fini): Delete unused vars.
1588 * m17n-gui.h (Motf): Extern it.
1590 * database.c (update_database_list): Delete unused vars.
1592 2006-07-07 Kenichi Handa <handa@m17n.org>
1594 * font-ft.c (DEVICE_DELTA): Fix typo.
1596 2006-07-06 Kenichi Handa <handa@m17n.org>
1598 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1601 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1603 * database.c: Update comments.
1605 2006-07-05 Kenichi Handa <handa@m17n.org>
1607 * database.c (PATH_MAX): Define it if not yet defined.
1608 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1610 (get_database_filename): Use GEN_PATH.
1611 (get_dir_info): Don't include the last '/' in directory name.
1612 (register_database): New function.
1613 (update_database_list): Use register_database. Search all
1614 directories in mdatabase__dir_list for wildcard databases.
1615 (mdatabase__init): Check "~/.m17n.d".
1617 2006-07-03 Kenichi Handa <handa@m17n.org>
1619 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1620 push reverse property.
1622 * plist.c (dump_plist_element): Fix previous change.
1624 2006-06-28 Kenichi Handa <handa@m17n.org>
1626 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1629 * draw.c (MbidiNSM): New variable.
1630 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1631 attention to bidi type NSM.
1632 (mdraw__init): Initialize MbibiNSM.
1634 * language.c (mscript__char_list): Fix finding a char-list element.
1636 * plist.c (dump_string): Return number of printed characters.
1637 (dump_plist_element): Print elements more compactly.
1639 2006-06-23 Kenichi Handa <handa@m17n.org>
1641 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1642 (include_HEADERS): Likewise.
1644 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1646 * language.c: Update documentation.
1648 2006-06-23 Kenichi Handa <handa@m17n.org>
1650 * font-ft.c (struct MFontFT): Delete member lang.
1651 (free_ft_info): Don't unref member lang. Destroy members langset
1653 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1654 changed. Set members langset and charset.
1655 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1657 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1659 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1660 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1661 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1662 characters at first. If it fails, try listing by language names.
1663 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1664 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1665 change of MFontCapability.
1666 (ft_list_capability): Likewise. Try listing by languages, then by
1667 scripts. Check OTF at last.
1668 (ft_check_script): New function.
1669 (ft_select): Adjusted for the check of MFontCapability.
1670 (ft_list_family_names): New function.
1671 (ft_check_capability): If cap->script is not Mnil, call
1673 (mfont__ft_driver): Initialize with ft_list_family_names.
1675 * font.h (struct MFontDriver): New member list_fmaily_names.
1676 (struct): Change member "MSymbol *lang" to "MSymbol language".
1678 * font.c: Include "language.h".
1679 (Motf): New variable.
1680 (otf_script_list, load_otf_script_list): Delete it.
1681 (find_script_from_otf_tag): Delete it.
1682 (merge_capability): New function.
1683 (mfont__init): Init Motf.
1684 (mfont__fini): Don't unref otf_script_list.
1685 (free_font_capability): Check cap->script_tag to determine if
1686 OTF-related capability is set.
1687 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1688 the change of type MFontCapability.
1689 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1690 and Motf properties.
1691 (mfont_list): Call merge_capability for LANGUAGE arg.
1692 (mfont_list_family_names): New function.
1694 * input-gui.c: Typo in comments fixed.
1696 * input.c: Typo in comments fixed.
1698 * language.h (mlanguage__list): Delete it.
1699 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1702 * language.c: Include "mtext.h".
1703 (M_script_lang_list): Delete it.
1704 (language_list, script_list): New variables.
1705 (load_lang_script_list, init_language_list, init_script_list): New
1707 (mlang__init): Don't load language database here.
1708 (mlang__fini): Unref language_list and script_list if not NULL.
1709 (mlanguage__list): Delete it.
1710 (mlanguage__info, mscript__info, mscript__char_list)
1711 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1712 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1713 (mscript_list, mscript_language_list): New functions.
1715 * m17n-gui.h (mfont_list_family_names): Extern it.
1717 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1718 (mlanguage_text, mscript_list, mscript_language_list): Extern
1721 2006-06-21 Kenichi Handa <handa@m17n.org>
1723 * m17n-X.c (xfont_driver): Initialize with
1724 xfont_list_family_names.
1725 (xfont_list_family_names): New function.
1726 (xft_driver): Initialize with NULL for list_family_names member.
1727 (device_init): Set list_family_names member of xft_driver to that
1728 of mfont__ft_driver.
1730 2006-06-06 Kenichi Handa <handa@m17n.org>
1732 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1734 2006-03-24 Kenichi Handa <handa@m17n.org>
1736 * font-ft.c (ft_open): Improve debug message.
1738 * fontset.c (mfontset__get_font): Fix for the case that no font in
1739 per_script list is available.
1741 2006-02-06 Kenichi Handa <handa@m17n.org>
1743 * Version 1.3.3 released.
1745 2006-02-22 Kenichi Handa <handa@m17n.org>
1747 * textprop.c: Fix some typos in documentation.
1749 * plist.c: Fix some typos in documentation.
1751 * m17n-core.h: Fix some typos in documentation.
1752 (M17NLIB_PATCH_LEVEL): Updated to 3.
1753 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1755 * symbol.c: Fix some typos in documentation.
1757 * mtext.c: Fix some typos in documentation.
1759 * input.c: Fix several typos in documentation.
1761 2006-02-06 Kenichi Handa <handa@m17n.org>
1763 * Version 1.3.2 released.
1765 2006-02-03 Kenichi Handa <handa@m17n.org>
1767 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1768 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1770 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1772 * draw.c (layout_glyphs): Fix handling left_padding of
1775 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1777 2006-02-02 Kenichi Handa <handa@m17n.org>
1779 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1780 if WITH_GUI is true.
1782 2006-01-25 Kenichi Handa <handa@m17n.org>
1784 * input.c (resolve_expression): If the value of PLIST is a plist,
1785 but the first element is not symbol, return 0.
1787 2006-01-17 Kenichi Handa <handa@m17n.org>
1789 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1790 HAVE_GD is 2 or the greater.
1792 2006-01-16 Kenichi Handa <handa@m17n.org>
1794 * Version 1.3.1 released.
1796 2006-01-16 Kenichi Handa <handa@m17n.org>
1798 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1799 simulating anti-aliasing.
1801 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1802 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1804 2006-01-12 Kenichi Handa <handa@m17n.org>
1806 * input.c (get_surrounding_text): Always pop ic->plist.
1807 (reset_ic): Don't reset ic->plist.
1809 2006-01-10 Kenichi Handa <handa@m17n.org>
1811 * input.c (preedit_commit): For debugging, print only commiting
1812 charactes. Don't set ic->candidate_show to 0.
1813 (handle_key): Don't run branch-actions just by shifting to the
1815 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1816 Reset vars and plist.
1818 2006-01-07 Kenichi Handa <handa@m17n.org>
1820 * input.c (load_branch): Confirm that maps is not NULL.
1822 2006-01-05 Kenichi Handa <handa@m17n.org>
1824 * input-gui.c (win_filter): Try to convert arg to key only when
1827 * plist.c (read_integer_element): If '#' and '-' are followed by
1828 non-integer-constituent, read them as a part of a symbol.
1829 (read_symbol_element): New arg C.
1830 (read_element): Adjust args to read_symbol_element.
1832 * input.c (load_macros): On overwriting a macro, free the old
1834 (minput__init): Store Mmap in load_im_info_keys.
1835 (minput_get_title_icon): If the input method has no title, be sure
1837 (minput_get_description): If the input method has no description,
1838 be sure to return NULL.
1839 (minput_get_variables): Fix documentation.
1840 (handle_key): Pay attention to the case that key is Mnil.
1841 (filter): Likewise. Fix handling of such symbol as S-A.
1843 2005-12-22 Kenichi Handa <handa@m17n.org>
1845 * Version 1.3.0 released.
1847 2005-12-22 Kenichi Handa <handa@m17n.org>
1849 * font-ft.c (ft_list): If the specified font has no property,
1852 2005-12-20 Kenichi Handa <handa@m17n.org>
1854 * character.c (mchar_get_prop): Check char_prop_list.
1855 (mchar_put_prop, mchar_get_prop_table): Likewise.
1857 2005-12-18 Kenichi Handa <handa@m17n.org>
1859 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1860 file name sans language.
1862 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1864 * input.c: Fix typo in comments.
1866 2005-12-14 Kenichi Handa <handa@m17n.org>
1868 * input.c (minput_get_title_icon): Check the default icon for the
1871 2005-12-13 Kenichi Handa <handa@m17n.org>
1873 * input.c (Mless_equal, Mgreater_equal): New variables.
1874 (parse_expression, resolve_expression, parse_action_list)
1875 (take_action_list): Handle the aboves.
1876 (filter): Treat key S-X as X.
1877 (minput__init): Initialize Mless_equal and Mgreater_equal.
1878 (minput_get_title_icon): New function.
1880 * m17n.h (minput_get_title_icon): Extern it.
1882 * database.c (get_database_filename): Return a filename instead of
1884 (load_database): Adjusted for the above change.
1885 (mdatabase__load_for_keys): Likewise.
1886 (mdatabase__find_file): New function.
1888 * database.h (mdatabase__find_file): Extern it.
1890 * font.h (mfont__resize): Delete extern.
1892 * font.c (mfont__list): Check resize ratio.
1893 (mfont__resize): Delete it.
1894 (mfont_resize_ratio): Include the code of mfont__resize.
1896 * font-ft.c (ft_open): Check resize ratio.
1898 * m17n-X.c (xfont_open): Check resize ratio.
1899 (xft_open): Likewise.
1901 2005-12-07 Kenichi Handa <handa@m17n.org>
1903 * input.c (take_action_list): If take_action_list return -1,
1905 (handle_key): Likewise.
1907 * face.c (mface__for_chars): When font is specified and layouter
1908 is found for it, if the layouter doesn't support one of a
1909 character, use a face sans layouter for it.
1911 2005-12-06 Kenichi Handa <handa@m17n.org>
1913 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1914 found, don't use it for more than one character.
1916 2005-12-05 Kenichi Handa <handa@m17n.org>
1918 * face.c (mface__realize): Set rfont->layouter to Mnil.
1919 (mface__for_chars): Fix handling of layouter.
1921 * character.h (mchar__define_prop): Extern it.
1923 * database.c (update_database_list): Call mchar__define_prop if
1926 * character.c (mchar__init): Don't call mchar_define_property.
1927 Instead just initialize property keys.
1928 (mchar__fini): Free char_prop_list only if it's not NULL.
1929 (mchar__define_prop): New function.
1930 (mchar_define_property): Call mchar__define_prop.
1932 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1935 2005-12-02 Kenichi Handa <handa@m17n.org>
1937 * language.c (mlang__init): Handle extra chars.
1939 * m17n-gui.h (mfont_check): Adjust prototype.
1941 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1942 (xfont_check_capability): New function.
1943 (xft_driver): Specify xft_check_capability.
1944 (xft_check_capability): New function.
1946 * font-ft.c (M0_3): Delete it.
1948 (ft_get_charmaps): Refer to M0.
1949 (fc_parse_pattern): Fix previous change.
1950 (ft_list_language): Check also extra chars.
1951 (ft_check_otf): Define it even if HAVE_OTF is undef.
1952 (ft_check_lang): Check the result of FcLangSetHasLang against
1953 FcLangDifferentLang. Check also extra chars.
1954 (ft_list_capability): Delete ifdef HAVE_OTF.
1955 (ft_select): Likewise.
1956 (ft_open): Improve debug information.
1957 (ft_check_capability): New function.
1958 (mfont__ft_driver): Specify ft_check_capability.
1959 (mfont__ft_init): Initialize M0.
1961 * fontset.c (get_font_from_group): New function.
1962 (mfontset__get_font): New function.
1964 * fontset.h (mfontset__get_font): Extern it.
1966 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1967 (mfont__fini): Delete ifdef HAVE_OTF.
1968 (free_font_capability): Likewise.
1969 (mfont__get_capability): Likewise.
1970 (mfont__check_capability): New function.
1971 (mfont_check): Change the order of arguments. Use
1974 * font.h (struct MFontDriver): New member check_capability.
1975 (MFontCapability): Delete ifdef HAVE_OTF.
1976 (mfont__check_capability): Extern it.
1978 * face.c (mface__realize): Fix handling of FONT arg.
1979 (mface__for_chars): Fix handling of explicitly specified font.
1981 2005-11-25 Kenichi Handa <handa@m17n.org>
1983 * font-flt.c (run_command): Print debug info for
1986 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1988 * face.c (mface__for_chars): Check rfont before accessing the
1991 2005-11-21 Kenichi Handa <handa@m17n.org>
1993 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1996 * fontset.c (fontset_table): New variable.
1997 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1998 (mfont__fontset_init): Add fontset_table as an object array.
1999 (mfont__realize_fontset): Ref FONTSET.
2000 (mfont__free_realized_fontset): Unref REALIZED->fontset.
2001 (mfontset): Call M17N_OBJECT_REGISTER.
2002 (mfontset_copy): Likewise.
2004 * input.c (handle_key): For debugging, print information about
2006 (filter): Add an alias for Meta and Alt modifiers.
2007 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
2009 (minput__init): Initialize them.
2010 (parse_expression): New function.
2011 (resolve_expression): New function.
2012 (parse_action_list): Handle expressions by parse_expression.
2013 (take_action_list): Handle expressions by resolve_expression.
2014 (parse_nested_list_value): Fix previous change.
2015 (resolve_command): Fix handling of the return value of
2018 2005-11-18 Kenichi Handa <handa@m17n.org>
2020 * font-ft.c (ft_check_otf, otf_script_list): Define only when
2021 HAVE_OTF is defined.
2022 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
2024 (ft_select): Likewise.
2026 * font.c (mfont_list): Fix for the case that FONT is NULL.
2027 (OTF_tag): Delete it.
2028 (load_otf_script_list): Define only when HAVE_OTF is defined.
2029 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
2032 * draw.c (truncate_gstring): Be sure to truncate at
2033 glapheme-cluster boundary.
2035 2005-11-11 Kenichi Handa <handa@m17n.org>
2037 * input.c (delete_surrounding_text): Clear cache if necessary.
2039 2005-11-09 Kenichi Handa <handa@m17n.org>
2041 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
2042 glyph prev is also supported by the current flt.
2044 2005-11-08 Kenichi Handa <handa@m17n.org>
2046 * m17n-X.c (xft_render): Cancel previous change.
2048 2005-11-07 Kenichi Handa <handa@m17n.org>
2050 * input.c: Include <stdlib.h>.
2051 (get_surrounding_text, delete_surrounding_text)
2052 (get_preceding_char, get_following_char): New functions.
2053 (integer_value): New arg surrounding. If it is nonzero, try to
2054 get a surrounding character. Callers changed.
2055 (take_action_list): Check `value' before setting an element.
2056 (destroy_ic): Unref ic_info->preceding_text and
2057 ic_info->following_text.
2058 (minput__init): Initialize Minput_get_surrounding_text and
2059 Minput_delete_surrounding_text.
2060 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
2062 (filter): Unref ic_info->preceding_text and
2063 ic_info->following_text.
2065 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2068 * input.h (MInputContextInfo): New members preceding_text and
2071 2005-11-04 Kenichi Handa <handa@m17n.org>
2073 * input.c (parse_nested_list_value): Fix handling of the global
2075 (get_nested_list): Get global definitions by load_partial_im_info.
2076 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2077 MInputCandidatesChanged.
2078 (take_action_list): Likewise.
2079 (reset_ic): Likewise.
2080 (create_ic): Don't pay special attention to
2081 Mcandidates_group_size.
2082 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2083 (minput_set_variable): Get a definition of varible by
2084 mplist_find_by_value, not mplist_get.
2086 * m17n.h (enum MInputCandidatesChanged): New enum.
2088 2005-11-01 Kenichi Handa <handa@m17n.org>
2090 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2092 (mwin__destroy_window): If xft_draw's drawable is win, change it
2093 to device->drawable before destroying win.
2095 2005-10-31 Kenichi Handa <handa@m17n.org>
2097 * input.c (load_im_info): Fix adding of state.
2099 * m17n-core.c (m17n_fini_core): Fix reporting of module
2102 * m17n.c (m17n_fini): Fix reporting of module finalization.
2104 * m17n-gui.c (m17n_init_win): Fix reporting of module
2107 2005-10-29 Kenichi Handa <handa@m17n.org>
2109 * input.c (get_candidate_list): Fix the timing of referring plist.
2111 2005-10-28 Kenichi Handa <handa@m17n.org>
2113 * input.c (load_branch): Ignore an undefined map name.
2114 (load_im_info): Set im_info->title from `name' only if it's not
2116 (shift_state): Always update ic->status.
2117 (adjust_candidates): Renamed from adjust_candidate_command.
2118 Argument changed. Caller changed.
2119 (get_candidate_list, regularize_action): New functions.
2120 (take_action_list): Use them. On handling Munhandle, don't set
2122 (handle_key): If KEY is not handled by MAP, and MAP has
2123 branch_actions, perform them.
2125 * database.c (mdatabase__fini): Free dir_info->filename;
2127 2005-10-20 Kenichi Handa <handa@m17n.org>
2129 * input.c (marker_code): Accept '@@'.
2130 (integer_value): Handle '@@'.
2131 (parse_action_list): Accept a symbol argument.
2132 (take_action_list): Resolve the symbol argument. Handle the
2135 2005-10-18 Kenichi Handa <handa@m17n.org>
2137 * input.c: Include "charset.h".
2138 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2140 (MIMState): New member (M17NObject control).
2141 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2142 (get_nested_list, resolve_variable): New functions.
2143 (integer_value): New arg (MPlist **value). Set it to the plist
2144 element containing the value.
2145 (resolve_command): New function.
2146 (load_translation): New arg (MPlist *map_actions).
2147 (load_branch): New args language and name. If `keylist' is a
2148 symbol, resolved that as a command name.
2149 (free_map): New arg top. Free map->map_actions only if top is
2151 (free_state): New function.
2152 (load_state): New arg name.
2153 (im_info_list): New variable.
2154 (free_im_info, get_im_info_by_tags): New functions.
2155 (load_im_info): Arg key changed to plist. Handle `include'.
2156 Return (MInputMethodInfo *).
2157 (preedit_commit): Ref ic->candidate_list.
2158 (get_select_charset, adjust_candidate_command): New functions.
2159 (take_action_list): Handle `include'. Adjust candidate action
2160 properly. Handle control variables `candidates-charset' and
2161 `candidates-group-size'.
2162 (open_im): Use get_im_info.
2163 (create_ic): Get global variables.
2164 (load_partial_im_info): New function.
2165 (get_im_info): New function.
2166 (check_command_keyseq, check_command_list, check_variable_list):
2168 (minput__init): Don't handle M_database_hook and Mdetail_text.
2169 Initialize M_candidates, Mcandidates_group_size,
2170 Mcandidates_charset.
2171 (parse_variable_list, get_variable_list, parse_command_list)
2172 (get_command_list): Delete them.
2173 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2174 (minput__fini): Simply unref command_list and variable_list.
2175 (minput_get_description): Adjusted for the new form of description.
2176 (minput_get_commands): Use get_nested_list.
2177 (minput_assign_command_keys): Likewise.
2178 (minput_get_variables, minput_set_variable): Likewise.
2180 * input.h (MInputMethodInfo): New members im and maps.
2182 * database.h (M_database_hook): Delete extern.
2183 (MDatabaseHookFunc): Delete extern.
2184 (mdatabase__check): Extern it.
2186 * database.c: Include <glob.h>.
2187 (MAX_TIME): New macro.
2188 (Masterisk): New variable.
2189 (get_database_stream): Argument changed to (MDatabaseInfo *).
2191 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2192 (find_database): New function.
2193 (update_database_list): New function.
2194 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2195 calling update_database_list.
2196 (mdatabase__check): New function.
2197 (mdatabase_find): Use update_database and find_database. Don't
2198 handle MDatabaseHookFunc.
2199 (mdatabase_list): Call update_database at first.
2200 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2201 (MDatabaseList): New type.
2203 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2205 * m17n.h (Mdetail_text): Delete extern.
2207 * m17n-core.h (mplist_conc): Delete extern.
2209 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2211 (mplist_conc): Renamed to mplist__conc.
2212 (mplist__pop_unref): New function.
2214 2005-10-14 Kenichi Handa <handa@m17n.org>
2216 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2218 (read_element): If keys is an empty plist, return any element
2220 (dump_plist_element): Check if plist is nested.
2221 (mplist_conc): Always ref tail.
2222 (mplist_set): If key is a managing key, ref val in advance.
2224 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2225 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2226 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2229 * fontset.c (free_fontset): Unref fontset_list if necessary.
2230 (mfont__fontset_fini): Don't free fontset_list. Unref
2232 (mfont__realize_fontset): Initialize request.
2233 (mfontset): Ref default_fontset or fontset only if necessary.
2234 (mfontset_copy): Don't ref copy.
2236 * draw.c (render_glyphs): Check gend->type before checking
2239 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2240 unrefed plists to NULL.
2242 2005-10-04 Kenichi Handa <handa@m17n.org>
2244 * textprop.c (mtext_serialize): Be sure to make mt
2245 MTEXT_FORMAT_UTF_8 and NULL terminated.
2247 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2249 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2251 2005-10-03 Kenichi Handa <handa@m17n.org>
2253 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2254 is not at the beginning of line.
2256 2005-09-22 Kenichi Handa <handa@m17n.org>
2258 * input.c: Include <sys/stat.h> and <unistd.h>.
2259 (Minclude, Mcommit, Munhandle): New variables.
2260 (minput__init): Initialize them. Push only Mstate to
2261 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2262 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2264 (load_input_method): Handle "include" directive. If no states are
2266 (shift_state): If state_name is Mt, shift back to the previous
2267 state. Call preedit_commit to commit preedit text.
2268 (preedit_commit): New function.
2269 (take_action_list): Improve debug printing. Handle commit and
2271 (handle_key): Check the return value of take_action_list. Don't
2272 take branch_actions just after changing to the root map.
2273 (reset_ic): Reset all ic_info members.
2274 (filter): When a key is not handled, just move ic_info->keys
2275 instead fo calling reset_ic.
2276 (load_im_info): If key is not Mstate, push Mmap to
2278 (MDatabaseStatList): New type.
2279 (imdir_stat_list): New variable.
2280 (input_method_hook): Don't cancel the hook. Check the
2281 modification time of directories.
2282 (minput__fini): Free imdir_stat_list;
2284 * input.h (MInputContextInfo): New member prev_state.
2286 * m17n-core.h (mplist_conc): Extern it.
2288 * plist.c (mplist_conc): New function.
2290 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2292 * font.h (MRealizedFont): New member average_width.
2294 * font-ft.c (ft_open): Set rface->average_width.
2296 * font.c (xlfd_unparse_name): Print '*' before registry name.
2298 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2299 (xfont_open): Set rfont->average_width.
2300 (xft_open): Likewise.
2301 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2303 * internal-gui.h (struct MFrame): New member average_width.
2305 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2306 (mframe_get_prop): Return the average_width of a font.
2308 * face.c (mface__realize): Set rface->average_width.
2309 (mface__update_frame_face): Set frame->average_width.
2311 * face.h (MRealizedFace): New member average_width.
2313 2005-09-19 Kenichi Handa <handa@m17n.org>
2315 * font.c (xlfd_unparse_name): New arg full_xlfd.
2316 (mfont__encode_char): Use shortcut only for X core fonts.
2317 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2318 (mfont_put_prop): Handle `language' property.
2319 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2320 Print file can capability info too.
2322 * m17n-core.c (mdebug__output): New variable.
2323 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2324 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2325 (m17n_fini_core): Close mdebug__output if it's not stderr.
2327 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2328 (xfont_open): Handle baseline_offset.
2329 (xfont_find_metric): Likewise.
2330 (xfont_render): Likewise.
2331 (xft_open): Likewise.
2332 (xft_render): Likewise.
2334 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2335 (mdebug__output): Extern it.
2336 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2337 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2338 (MDEBUG_DUMP): New macro.
2339 (MDEBUG_PRINT_TIME): Print to medebug__output.
2341 * font.h (MRealizedFont): New member baseline_offset.
2343 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2345 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2346 (ft_list_family): Check alias.
2347 (ft_list_language): If language is "en", don't try to the second
2349 (ft_default_list): New variable.
2350 (ft_list_default): New function.
2351 (ft_select): If family is not specified, try only the default
2352 fonts. Treat the weights normal and medium same.
2353 (ft_open): Fix debug message. If registry is not specified, try
2354 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2355 (ft_find_metric): Likewise.
2356 (ft_render): Likewise.
2357 (ft_list): Fix debug message. Accept the registring iso8859-1.
2358 If family is not specified, try only the default fonts.
2360 * face.c (mface__realize): Fix logic of opening a font.
2362 2005-09-16 Kenichi Handa <handa@m17n.org>
2364 * face.c (mface__realize):
2366 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2369 * input.c (shift_state): Fix the condition of taking init actions.
2370 (take_action_list): Fix handling of pushback action.
2371 (handle_key): Don't change key while checking its alias.
2372 (minput__init): Initialize new variables.
2373 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2376 2005-09-12 Kenichi Handa <handa@m17n.org>
2378 * mtext.c (mtext__uppercase): Add proper open/close parens.
2379 (mtext_titlecase): Add proper casting.
2381 * input.c (parse_action_list): Handle the case that the arg is a
2382 key sequence (MText or MPlist).
2383 (take_action_list): Likewise.
2384 (shift_state): Shorter debug message.
2385 (handle_key): Terminate a debug message by "\n".
2386 (reset_ic): Don't take initial actions here.
2387 (minput_open_im): Print a debug message.
2388 (minput_close_im): Likewise.
2389 (minput_create_ic): Likewise.
2390 (minput_destroy_ic): Likewise.
2392 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2394 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2397 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2398 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2401 * character.c: Add Japanese documentation for
2402 mchar_get_prop_table ().
2404 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2406 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2407 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2408 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2410 (init_case_conversion): New function.
2411 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2412 (uppercase_precheck, lowercase_precheck, final_sigma)
2413 (after_soft_dotted, more_above, before_dot, after_i)
2414 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2416 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2418 * plist.c (read_mtext_element): Fix previous change.
2420 2005-09-05 Kenichi Handa <handa@m17n.org>
2422 * plist.c (read_mtext_element): Handle \uXXXX notation.
2424 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2425 (MTABLE_ALLOCA): Change the name of local variable.
2427 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2428 HAVE_FREETYPE are defined.
2430 * m17n-X.c: Check HAVE_X11.
2432 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2433 directory listing libraries.
2434 (noinst_PROGRAMS): Define it only in maintainer mode.
2436 2005-09-02 Kenichi Handa <handa@m17n.org>
2438 * m17n-gui.h (mdraw_line_break_option): Extern it.
2440 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2441 end of the first glyph.
2442 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2444 (mdraw_line_break_option): New variable.
2445 (mdraw_default_line_break): Use mtext_line_break.
2447 * mtext.h (wordseg_func_table): Don't extern it.
2448 (mtext__wseg_fini): Extern it.
2450 * mtext.c: Don't include word-thai.h.
2451 (wordseg_func_table): Delete this variable.
2452 (mtext__init): Don't initialize above. Don't call
2453 mtext__word_thai_init.
2454 (mtext__fini): Don't free wordseg_func_table. Call
2455 mtext__wseg_fini instead fo mtext__word_thai_fini.
2456 (MTextWordsegFunc): Don't typedef it.
2457 (mtext__word_segment): Moved to mtext-wseg.c.
2459 * m17n-core.h (enum MTextLineBreakOption): New enum.
2460 (mtext_line_break): Extern it.
2462 * mtext-wseg.c: New file.
2464 * mtext-lbrk.c: New file.
2466 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2467 add mtext-lbrk.c and mtext-wseg.c.
2469 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2470 the case that head is NULL.
2472 2005-09-01 Kenichi Handa <handa@m17n.org>
2474 * word-thai.c (wordseg_propertize): If the property value is nil,
2475 don't make the property no-merge.
2476 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2477 attention to the case that they are NULL.
2478 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2481 * character.c (mchar_get_prop_table): New function.
2483 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2485 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2486 (mchar_get_prop_table): Extern it.
2488 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2489 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2491 * internal.h (enum MTextCoverage): New enum.
2492 (MText): New member coverage.
2494 * mtext.c (FORMAT_COVERAGE): New macro.
2495 (insert): Copy mt2->coverage.
2496 (mtext__from_data): Initialize mt->coverage.
2497 (mtext__adjust_format): Update mt->coverage.
2498 (mtext): Initialize mt->coverage.
2499 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2500 Update mt->coverage if necessary.
2501 (mtext_duplicate): Copy mt->coverage.
2502 (mtext_insert, mtext_replace): New functions.
2503 (mtext_dup): Use mtext_duplicate.
2504 (mtext__word_segment): Don't set *from and *to if a word
2505 segmentation funcion is not found.
2506 (mtext_ins_char): Fix typo.
2508 2005-08-25 Kenichi Handa <handa@m17n.org>
2510 * font.h (MFont): New member for_full_width.
2512 * font.c (compare_font_score): Prefer a font of not
2515 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2516 registry charset of a font is one of CJK charsets.
2518 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2519 supports some of CJK.
2521 2005-08-24 Kenichi Handa <handa@m17n.org>
2523 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2525 * m17n-gui.c (null_device_open): Check Mresolution param and set
2528 * m17n-gd.c (device_open): Check Mresolution param and set
2531 * m17n-X.c (MWDevice): New member resy.
2532 (xfont_open): Set ascent, descent, and max_advance members of
2534 (xft_open): Likewise.
2535 (device_open): Compare also screen_num to find a device. Set
2536 device->resy and frame->dpi.
2538 * internal-gui.h (MFrame): New member dpi.
2540 * font.h (MRealizedFont): New member max_advance.
2542 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2543 (mfont__init): Don't initialize Mascent, Mdescent.
2544 (Mascent, Mdescent): Delete these variables.
2545 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2546 Mfont_descent instead of Mascent and Mdescent.
2547 (mfont_put_prop): Allow negative size.
2548 (mfont_find): Handle the case of spec->size < 0. Fix previous
2550 (mfont_list): Handle the case of spec->size < 0.
2551 (mfont_check): Likewise.
2553 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2554 (fc_get_pattern): Handle the case of font->size < 0.
2555 (ft_open): Set ascent, descent, and max_advance members of rfont.
2556 (ft_find_metric): Improve rounding.
2557 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2560 * face.c (mface__realize): Handle the case of font->size < 0.
2562 2005-08-22 Kenichi Handa <handa@m17n.org>
2564 * coding.c (MConverterStatus): Change the member buf to union.
2565 (mconv_buffer_converter): Add const to the arg buf.
2566 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2567 (mconv_decode): Adjusted for the change of MConverterStatus.
2568 (mconv_encode_range): Likewise.
2570 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2571 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2573 2005-08-20 Kenichi Handa <handa@m17n.org>
2575 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2576 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2578 * m17n-X.c (xfont_open): Set members ascent, descent, and
2579 max_advance of rfont.
2580 (xft_open): Likewise.
2582 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2584 (mfont__ft_parse_name): Add const to the arg name.
2586 * font.c (xlfd_parse_name): Add const to the arg name. Call
2587 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2588 (xlfd_unparse_name): Handle spacing.
2589 (mfont__init): Initialize new variables.
2590 (mfont__id): Handle spacing.
2591 (mfont__merge): Likewise.
2592 (mfont__set_spec): This function deleted.
2593 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2594 condition of calling mfont__ft_parse_name.
2595 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2596 (mfont_get_prop): Handle properties spacing, ascent, descent,
2598 (mfont_find): Return a realized font.
2599 (mfont_from_name): Add const to the arg name.
2601 * font.h (enum MFontProperty): New member MFONT_SPACING.
2602 (enum MFontSpacing): New enum.
2603 (MFont): New members spacing and max_advance.
2604 (mfont__ft_parse_name): Prototype adjusted.
2605 (mfont__set_spec): Extern deleted.
2606 (mfont__parse_name_into_font): Prototype adjusted.
2608 2005-08-19 Kenichi Handa <handa@m17n.org>
2610 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2612 * font.c (mfont_list): If FONT is null, use a temporary font.
2613 (mfont_parse_name): Add const to the arg name.
2615 2005-08-18 Kenichi Handa <handa@m17n.org>
2617 * word-thai.c: Surround code by #ifdef and #endif to escape from
2620 * font-ft.c: Mostly re-written.
2622 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2623 (FontLayoutCmd): Type of the member otf changed..
2624 (load_otf_command): Adjusted for the format change of otf command.
2625 (load_command): Likewise.
2626 (free_flt_command): Unref cmd->body.otf.
2627 (run_otf): Ajusted for the type change of otf_cmd.
2628 (run_command): Ajusted for the type change of otf_cmd. On
2629 debugging, print ctx->combining_code.
2630 (mfont__flt_run): Initialize ctx's members code_offset,
2631 combining_code, and left_padding to 0.
2633 * face.h (struct MRealizedFace): New member font.
2634 (mface__realize): Prototype adjusted.
2636 * face.c (find_realized_face): New arg font.
2637 (find_realized_face): Adjusted for the change of MFont.
2638 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2639 (mface__fini): Don't call mdebug__report_object.
2640 (mface__realize): New arg font.
2641 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2642 Optimize the latin case.
2643 (mface__free_realized): Free rface->font.
2644 (mface__update_frame_face): Adjusted for the change of mface__realize.
2645 (mface_equal): New function.
2647 * draw.c (Mcommon): New variable.
2648 (visual_order): Args to mfont__encode_char changed.
2649 (compose_glyph_string): Handle Mfont text property.
2650 (layout_glyphs): Adjusted for the change of MFont.
2651 (mdraw__init): Initialize Mcommon.
2652 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2654 * font.h (enum MFontType): Members completely changed.
2655 (enum MFontProperty): Move MFONT_SIZE to the tail.
2656 (enum MFontSource): New enum.
2657 (struct MFont): New members type, source, sizes, file, capability,
2659 (struct MRealizedFont): Type of member font changed. Members
2660 score, status, and encoding deleted.
2661 (MFontScore): New type.
2662 (MFontList): Member changed.
2663 (struct MFontDriver): New member has_char. Types of members
2665 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2666 (Mapple_roman): Extern them.
2667 (OTF_Tag): Typedefed if not HAVE_OTF.
2668 (enum MFontOpenTypeTable): New enum.
2669 (MFontCapability): New type.
2670 (mfont__ft_drive_otf): Prototype adjusted.
2671 (mfont__score): Extern deleted.
2672 (mfont__merge): Extern it.
2673 (mfont__has_char): Extern it.
2674 (mfont__encode_char): Prototype adjusted.
2675 (mfont__open): Extern it.
2676 (mfont__set_spec): Prototype adjusted.
2677 (mfont__get_capability): Extern it.
2679 * font.c: Include "fontset.h".
2680 (M_font_capability, M_font_list, M_font_list_len): New variables.
2681 (font_score_priority): Change order of initial elements.
2682 (font_score_shift_bits): Fix array size.
2683 (common_weight): Add "thin", "semibold", and "heavy".
2684 (common_stretch): Add "ultracondensed", "extracondensed",
2685 "extraexpanded", and "utltraexpand".
2686 (font_weight_regular, font_weight_normal, font_weight_medium): New
2688 (gen_font_name): This function deleted.
2689 (find_encoding): Set font->encoding.
2690 (OTF_tag): New function.
2691 (otf_script_list): New variable.
2692 (load_otf_script_list): New function.
2693 (find_script_from_otf_tag): New function.
2694 (xlfd_parse_name): Set font->type and font->source.
2695 (mfont__free_realized): Free chains rfonts.
2696 (font_score): Renamed from mfont__score.
2697 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2698 (Mapple_roman): New variables.
2699 (mfont__init): Initilize new variables. Initalize
2700 default_encoding.encoding_name and
2701 default_encoding.encoding_charset to Municode_full and
2702 mcharset__unicode. Use SAFE* macros for allocating filepath
2704 (mfont__fini): Free otf_script_list.
2705 (mfont__id): New function.
2706 (mfont__match_p): Check also capability member of MFont.
2707 (mfont__merge): New funciton.
2708 (mfont__set_spec_from_face): Set type and source members.
2709 (mfont__set_spec_from_plist): Set capability and type members.
2710 (mfont__select): Argument changed.
2711 (mfont__available): New function.
2712 (compare_font_score): New function.
2713 (mfont__list): New function.
2714 (mfont__open): Return a realized font.
2715 (mfont__resize): Adjusted for the change of MFont.
2716 (mfont__has_char): New function.
2717 (mfont__encode_char): Argument changed.
2718 (mfont__set_spec): Argument changed.
2719 (free_font_capability): New function.
2720 (mfont__get_capability): New function.
2721 (MFontfile): New variable.
2722 (mfont_get_prop): Adjusted for the change of MFont.
2723 (mfont_put_prop): Likewise.
2724 (mfont_set_selection_priority): Fix the way of setting
2725 font_score_priority[].
2726 (mfont_find): Use mfont__list instead of mfont__select.
2727 (mfont_resize_ratio): Adjusted for the change of MFont.
2728 (mfont_list): Use mfont__list.
2729 (mfont_check): New function.
2730 (font_score): Make it static.
2732 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2733 (mfont__lookup_fontset): Likewise.
2735 * fontset.c (struct MFontset): Delete member font_spec_list.
2736 (struct MRealizedFontset): Type of member spec changed. New
2738 (load_font_group): Arg spec_list deleted.
2739 (load_fontset_contents): Adjusted for the change of fontset_def.
2740 (free_fontset): Fix the way of freeing fontset elements.
2741 (realize_fontset_elements): Argument changed.
2742 (get_per_script): New function.
2743 (free_realized_fontset_elements): Fix the way of feeing rfontset
2745 (update_fontset_elements): Fix args to realize_fontset_elements.
2746 (mfont__realize_fontset): New arg spec.
2747 (try_font_list): New function.
2748 (try_font_group): New arg request. Use try_font_list.
2749 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2751 (mfontset): Adjusted for the change of MFontset.
2752 (mfontset_copy): Likewise. Don't share plists.
2753 (mfontset_modify_entry): Adjusted for the change of MFontset.
2754 (mfontset_lookup): Call get_per_script.
2755 (mdebug_dump_fontset): Print also the address of fonts.
2757 * input.c (shift_state): Don't reset ic_info->vars.
2758 (take_action_list): Call MDEBUG_PRINT fore calling
2761 * internal-gui.h (MFontDriver): Don't typedef it here.
2763 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2764 (MXFont): This type deleted.
2766 (struct _MFontX): New struct.
2767 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2768 (MDisplayInfo): Member base_font_list deleted.
2769 (DEFAULT_FONT): Definition changed.
2770 (FALLBACK_FONT): This maclr deleted.
2771 (free_display_info): Adjusted for the change of MDisplayInfo.
2772 (free_device): Argument to mfont__free_realized changed.
2773 (xfont_driver): Adjusted for the change of MFontDriver.
2774 (xfont_registry_list): Use MFontX instead of MXFont.
2775 (MRealizedFontX): Renamed from MXFontInfo.
2776 (xfont_select): Return the font found first.
2777 (close_xfont): Change MXFontInfo to MRealizedFontX.
2778 (xfont_open): Return the realized font.
2779 (xfont_find_metric): Get xfont from rfont->fontp.
2780 (xfont_has_char): New function.
2781 (xfont_encode_char): Adjusted for the argument change.
2782 (xfont_render): Get xfont from rfont->fontp.
2783 (xfont_list): Adjusted for the argument change.
2784 (MRealizedFontXft): Renamed from MXftFontInfo.
2785 (xft_driver): Ajusted for the change of MFontDriver.
2786 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2787 (xft_open_font): Argument changed.
2788 (xft_open): Argument changed. Return the realized font.
2789 (xft_find_metric): Get xft_font from rfont->fontp.
2790 (xft_has_char, xft_encode_char): New functions.
2791 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2792 font if not yet opened.
2793 (device_open): Don't set frame->font.
2795 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2797 (gd_font_open): New function.
2798 (gd_render): Don't use the local variable ft_info.
2799 (device_init): Adjusted for the change of gd_font_driver.
2801 * textprop.c (mtext__prop_init): Initialize text_property_table.
2802 Call M17N_OBJECT_ADD_ARRAY.
2803 (mtext__prop_fini): Don't call mdebug__report_object.
2805 * plist.c (mplist__init): Initialize plist_table.
2806 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2807 (mplist__fini): Don't call mdebug__report_object.
2809 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2810 (mtext__fini): Don't call mdebug__report_object.
2811 (MTEXT_FORMAT_UTF_16): Correct type.
2812 (mtext_data): New function.
2813 (mtext_text): Fix calculation of limit and args to
2816 * language.c: Include "plist.h".
2817 (M_script_lang_list): New variable.
2818 (mlang__init): Read languages and their information from m17n
2820 (mlanguage__list): New function.
2821 (Miso639_1, Miso639_2): New variables.
2823 * language.h (mlanguage__list): Extern it.
2825 * database.c (get_database_stream): Use SAFE_* macros for
2826 allocating and freeing path.
2827 (mdatabase__init): Likewise.
2829 * symbol.c (msymbol__fini): Don't free symbols here.
2830 (msymbol__free_table): New function.
2831 (msymbol_is_managing_key): New function.
2833 * symbol.h (msymbol__free_table): Extern it.
2834 (msymbol__list): Extern it.
2836 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2838 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2839 (struct _M17NObjectArray): New member name and next.
2840 (mdebug__add_object_array): Extern it.
2841 (M17N_OBJECT_ADD_ARRAY): New macro.
2842 (mdebug__report_object): Don't extern it.
2844 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2846 * m17n-gui.c (free_frame): Don't free frame->font.
2847 (null_device_fini): Fix code for freeing
2848 null_device.realized_font_list.
2849 (m17n_fini_win): Free interface.
2850 (mframe): Cast the return value of dlsym. Set frame->font here.
2851 (mframe_get_prop): Check frame->rface->rfont before accessing the
2854 * m17n-gui.h (Mfontfile): Extern it.
2855 (mfont_check): Extern it.
2856 (mface_equal): Extern it.
2858 * m17n-core.c: Include "symbol.h".
2859 (report_header_printed): This variable deleted.
2860 (object_array_root): New variable.
2861 (report_object_array): New function.
2862 (mdebug__report_object): This function deleted.
2863 (mdebug__add_object_array): New function.
2864 (m17n_init_core): Call mchartable_init () before mtext_init ().
2865 (m17n_fini_core): Call report_object_array (if necessary) and
2866 msymbol__free_atable at the end.
2868 * m17n-core.h (msymbol_is_managing_key): Extern it.
2869 (mtext_data): Extern it.
2870 (MTEXT_FORMAT_UTF_16): Correct type.
2871 (M17NLIB_MINOR_VERSION): Changed to 3.
2872 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2874 * chartab.c (mchartable__init): Initalize chartable_table.count.
2875 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2876 mdebug__report_object.
2878 2005-05-26 Kenichi Handa <handa@m17n.org>
2880 * m17n.h (Miso639_1, Miso639_2): Extern them.
2882 * symbol.h (msymbol__list): Extern it.
2884 * symbol.c (msymbol__list): New function.
2886 2005-05-19 Kenichi Handa <handa@m17n.org>
2888 * input-gui.c (minput__win_init): Don't change the value of
2891 2005-05-16 Kenichi Handa <handa@m17n.org>
2893 * m17n-core.c (m17n_object): Be sure to initialize all members.
2895 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2897 2005-05-09 Kenichi Handa <handa@m17n.org>
2899 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2901 2005-04-27 Kenichi Handa <handa@m17n.org>
2903 * language.c (mlang__init): Add "an" (Aragonese).
2905 * word-thai.c: Add support for libthai.
2906 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2907 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2909 * mtext.c: Include "word-thai.h" conditionaly.
2910 (mtext__init): Call mtext__word_thai_init conditionaly.
2911 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2913 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2914 not WORDCUT_LD_FLAGS.
2916 2005-04-19 Kenichi Handa <handa@m17n.org>
2918 * word-thai.c (wordseg_propertize): Always unref the attached
2920 (thai_wordseg): Don't unref the property.
2922 2005-04-18 Kenichi Handa <handa@m17n.org>
2924 * word-thai.c: Include stdlib.h.
2925 (wordseg_propertize): Add dummy function for the case that wordcut
2926 library doesn't exist.
2927 (wordseg_propertize): Fix for old wordcut library.
2929 2005-04-16 Kenichi Handa <handa@m17n.org>
2931 * word-thai.c: Include <stdio.h>.
2933 2005-04-15 Kenichi Handa <handa@m17n.org>
2935 * draw.c: Include mtext.h.
2936 (linebreak_table, M_break_at_space, M_break_at_word)
2937 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2938 (compose_glyph_string): Check POS before getting Mface text
2940 (truncate_gstring): Give correct TO arg to line_break function.
2941 (GET_LB_TYPE): New macro.
2942 (find_break_backward, find_break_forward): New functions.
2943 (mdraw__init): Initialize the above new variables.
2944 (mdraw__fini): Free linebreak_table.
2945 (mdraw_default_line_break): Use find_break_backward and
2948 * word-thai.c: New file.
2950 * word-thai.h: New file.
2952 * mtext.c: Include word-thai.h.
2953 (wordseg_func_table): New variable.
2954 (mtext__init): Initialize wordseg_func_table and call
2955 mtext__word_thai_init.
2956 (mtext__fini): Call mtext__word_thai_fini, free
2958 (MTextWordsegFunc): New type.
2959 (mtext__word_segment): New function.
2961 * mtext.h (wordseg_func_table): Extern it.
2962 (mtext__word_segment): Extern it.
2964 * m17n.c (m17n_init): Fix typo (== -> =).
2966 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2967 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2969 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2970 (MTEXTPROP_VAL): New macros.
2972 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2974 2005-04-07 Kenichi Handa <handa@m17n.org>
2976 * database.c (load_chartable): Fix pursing of symbol name.
2978 2005-03-24 Kenichi Handa <handa@m17n.org>
2980 * m17n.c (m17n_init): Fix typo (== -> =).
2982 2005-03-11 Kenichi Handa <handa@m17n.org>
2984 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2986 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2988 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2991 2005-03-09 handa <handa@m17n.org>
2993 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2994 calling m17n_init ().
2996 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2997 calling m17n_init_core ().
2999 2005-02-28 Kenichi Handa <handa@m17n.org>
3001 * font-flt.c (mfont__flt_run): Add resulting code sequence in
3004 2005-02-17 Kenichi Handa <handa@m17n.org>
3006 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
3007 (M_description, M_command, M_variable): New variables.
3008 (load_im_info_keys): New variables.
3009 (load_im_info, check_command_keyseq, get_description_advance)
3010 (parse_command_list, get_command_list, parse_variable_list)
3011 (get_variable_list, input_method_hook): New functions.
3012 (command_list, variable_list): New variables.
3013 (minput__init): Put input_method_hook to Minput_method.
3014 Initialize M_description, M_command, M_variable, Mdetail_text,
3015 load_im_info_keys, command_list, variable_list.
3016 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
3017 (Mdetail_text): New variable.
3018 (minput_get_description, minput_get_commands)
3019 (minput_assign_command_keys, minput_get_variables)
3020 (minput_set_variable): New functions.
3022 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
3023 (minput_assign_command_keys, minput_get_variables)
3024 (minput_set_variable): Extern them.
3026 * plist.c (UNGETC): Just decrement st->p.
3027 (read_mtext_element): New arg skip.
3028 (read_integer_element): Likewise.
3029 (read_symbol_element): Likewise.
3030 (read_element): New arg KEYS.
3031 (mplist__from_plist): Don't increment ref-count of NULL object.
3032 (mplist__from_file): New arg KEYS.
3033 (mplist_put): Don't increment ref-count of NULL object.
3034 (mplist_add): Likewise.
3035 (mplist_push): Likewise.
3036 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
3038 * plist.h (mplist__from_file): Prototype adjusted.
3040 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
3041 (get_database_stream): New function.
3042 (load_database): Use get_database_stream.
3043 (M_database_hook): New variable
3044 (mdatabase__init): Initialize M_database_hook.
3045 (mdatabase__load_for_keys): New function.
3046 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
3048 (mdatabase_define): Free mdb->extra_info if necessary.
3050 * database.h (mdatabase__dir_list, M_database_hook)
3051 (mdatabase__load_for_keys): Extern them.
3052 (MDatabaseHookFunc): New type.
3054 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
3056 2004-12-27 Kenichi Handa <handa@m17n.org>
3058 * Version 1.2.0 released.
3060 2004-12-27 Kenichi Handa <handa@m17n.org>
3062 * input.c (minput_filter): Don't reset ic->xxx_changed.
3064 * mtext.c (mtext_from_data): Fix documentation.
3066 2004-12-25 Kenichi Handa <handa@m17n.org>
3068 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3069 (M17NLIB_VERSION_NAME): Update to "1.2.".
3071 2004-12-24 Kenichi Handa <handa@m17n.org>
3073 * input.c (reset_ic): Set key_unhandled to 0.
3075 2004-12-21 Kenichi Handa <handa@m17n.org>
3077 * m17n-gui.h (mfont_from_spec): Delete extern.
3079 * input-gui.c (win_callback): Handle Minput_reset.
3080 (minput__win_init): Register reset_ic as a callback for
3083 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3084 changed. At first, shift to the initial state.
3085 (minput__init): Initialize Minput_reset. Register reset_ic as a
3086 callback for Minput_reset.
3087 (Minput_reset): New variable.
3088 (minput_filter): Always set ic->xxx_changed to 0.
3089 (minput_reset_ic): New function.
3090 (integer_value): Fix typo ('>' -> '<') and calculation of length
3093 * m17n-core.c (merror_code): Change type to `int'.
3095 * m17n-misc.h (merror_code): Adjust type.
3097 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3099 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3100 (mtext_change_prop): Delete extern.
3102 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3103 to `int'. Move the documents to m17n-core.h.
3105 2004-12-13 Kenichi Handa <handa@m17n.org>
3107 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3108 (MTextProperty): Document it.
3110 2004-12-09 Kenichi Handa <handa@m17n.org>
3112 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3114 2004-12-03 Kenichi Handa <handa@m17n.org>
3116 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3117 m17n__gui_initialized): New externs.
3119 * m17n-core.h (enum M17NStatus): New enum.
3120 (m17n_status): Extern it.
3122 * m17n-core.c (core_initialized): Delete this variable.
3123 (m17n__core_initialized, m17n__shell_initialized,
3124 m17n__gui_initialized): New variables.
3125 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3126 instead of core_initialized.
3127 (m17n_status): New function.
3129 * m17n.c (shell_initialized): Delete this variable.
3130 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3133 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3135 * m17n-gui.c (win_initialized): Delete this variable.
3136 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3137 instead of gui_initialized.
3139 2004-11-19 Kenichi Handa <handa@m17n.org>
3141 * input.c (reset_ic): Check if ic_info->state is NULL.
3142 (filter): If ic_info->state is NULL, return 0.
3143 (load_input_method): Don't unref `maps' it it's not created.
3145 2004-11-15 Kenichi Handa <handa@m17n.org>
3147 * input.c (find_candidates_group): If INDEX is -1, find the last
3149 (take_action_list): If the previous of the first candidate is
3150 requested, select the last candidate.
3152 2004-11-08 Kenichi Handa <handa@m17n.org>
3154 * m17n-X.c (device_open): Try at most 32 fonts to find a
3155 non-autoscaled font.
3157 * font.c (xlfd_parse_name): Fix previous change.
3159 2004-11-05 Kenichi Handa <handa@m17n.org>
3161 * font.c: (commont_style): Include dummy elements "slanted" and
3162 "rslanted" to prefer "o" to "r" if "i" is requested.
3164 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3166 2004-10-29 Kenichi Handa <handa@m17n.org>
3168 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3170 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3171 New members smallest and larger.
3172 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3173 (xfont_registry_list): Likewise.
3174 (xfont_select): Likewise.
3177 2004-10-28 Kenichi Handa <handa@m17n.org>
3179 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3180 font name comparison.
3181 (xfont_select): Fix logic for selecting a larger size font.
3183 2004-10-25 Kenichi Handa <handa@m17n.org>
3185 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3188 2004-10-22 Kenichi Handa <handa@m17n.org>
3190 * input.c (update_candidate): Renamed from udpate_candidate.
3191 (take_action_list): Show more debugging info on arithmetic commands.
3193 * m17n-X.c (device_open): Fix previous change.
3195 * draw.c (compose_glyph_string): Don't get face property at the
3198 2004-10-21 Kenichi Handa <handa@m17n.org>
3200 * draw.c (compose_glyph_string): Fix for the case of category
3203 2004-10-19 Kenichi Handa <handa@m17n.org>
3205 * input.c (mdebug_mask): New variable.
3206 (shift_state): Print debug information.
3207 (take_action_list): Likewise.
3208 (handle_key): Likewise.
3210 2004-10-14 Kenichi Handa <handa@m17n.org>
3212 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3214 2004-10-13 Kenichi Handa <handa@m17n.org>
3216 * m17n-X.c (device_open): Be sure to register at least one font
3219 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3220 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3222 2004-10-12 Kenichi Handa <handa@m17n.org>
3224 * draw.c (alloc_gstring): Fix previous change.
3226 * font-ft.c (ft_list_generic): Fix for the case of not
3229 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3231 * font.c (mfont_list): If no font is found, return NULL.
3232 (load_font_encoding_table): Put entries of nil registry first.
3233 (find_encoding): Adjust for the above change.
3235 2004-10-11 Kenichi Handa <handa@m17n.org>
3237 * m17n-gui.h (mfont_list): Adjust prototype.
3239 * m17n-X.c (xfont_list): New arg maxnum.
3241 * font.h (struct MFontDriver): Change prototype of <list>.
3243 * font-ft.c (fc_generic_family_list): Delete it.
3244 (Mserif, Msans_serif, Mmonospace): Delete them.
3245 (M_generic_family_info): New variable.
3246 (enum GenericFamilyType): New enum.
3247 (struct GenericFamilyInfo): New struct.
3248 (generic_family_table): New variable.
3249 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3251 (add_font_info): Get style here.
3252 (ft_list_family): Don't initialize fc_config here. Don't list
3254 (ft_list_generic): New function.
3255 (ft_select): Pay attention to generic familes here.
3256 (ft_open): Fix calculation of ascent and descent.
3257 (ft_list): Pay attention to generic families.
3258 (mfont__ft_init): Initialize M_generic_family_info,
3259 generic_family_table, and fc_config..
3260 (mfont__ft_fini): Finalize generic_family_table.
3262 * draw.c (compose_glyph_string): Use more constant font for
3263 glyphs. Adjust for the member change in MGlyph.
3264 (layout_glyph_string): Adjust for the member change in MGlyph.
3265 (alloc_gstring): Intilize scracth_glyph to avoid
3266 compose_glyph_string on it.
3267 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3268 (mdraw_coordinates_position): Fix previous change.
3270 * internal-gui.h (glyph_category): New enum.
3271 (MGlyph): Change type of <category> to enum glyph_category.
3273 * face.c (mface__realize): Delete args langauge and charset.
3274 (mface__for_chars): Fix for the case that glyphs have different
3276 (mface__update_frame_face): Adjust for mface__realize change.
3278 * face.h (mface__realize): Adjust prototype.
3280 2004-10-05 Kenichi Handa <handa@m17n.org>
3282 * language.c (mlang__init): Add Akan.
3284 2004-10-04 Kenichi Handa <handa@m17n.org>
3286 * font-ft.c (add_font_info): Add instead of push the element.
3287 (ft_list_family): For generic fonts, try all
3288 substituted. families.
3290 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3291 (run_rule): Don't update cluster range here.
3292 (run_command): Update cluster range on appending a glyph.
3293 (run_otf): Update cluster range for glyphs generated by OTF.
3295 2004-10-02 Kenichi Handa <handa@m17n.org>
3297 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3299 2004-09-30 Kenichi Handa <handa@m17n.org>
3301 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3303 2004-09-30 Kenichi Handa <handa@m17n.org>
3305 * font.h: Include <fontconfig/fontconfig.h>.
3306 (MFTInfo): New member langset.
3307 (mfont__encoding_list): Extern it.
3309 * font.c (mfont__encoding_list): New function.
3310 (mdebug_dump_font_list): New function.
3312 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3313 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3315 (ft_family_list): New variable.
3316 (set_font_info): New arg basep. Callers changed.
3317 (fc_list): Check the return value of FcPatternGetString.
3318 (add_font_info): New arg plist. Callers changed. Update
3320 (ft_list_family): New function (merged fc_list and ft_list_all).
3321 (ft_select): Use ft_list_family.
3322 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3324 (mfont__ft_init): Initialize above new variables.
3325 (mfont__ft_fini): Free ft_family_list.
3326 (STRDUP_LOWER): New macro.
3327 (set_font_info): Use STRDUP_LOWER.
3328 (ft_list_family): Avoid duplicate addition of font path. Use
3330 (fc_decode_prop): Fix typo.
3332 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3333 (xfont_registry_list): Change argument disp_info to frame.
3335 (xfont_list_all): New function.
3336 (xfont_list): If FONT is not NULL, check all fonts.
3338 2004-09-28 Kenichi Handa <handa@m17n.org>
3340 * m17n-X.c (MXFont, MXFontList): New types.
3341 (MDisplayInfo): Delete members font_registry_list,
3342 iso8859_1_family_list, iso10646_1_family_list, new members
3343 font_list, base_font_list.
3344 (free_display_info): Adusted for the change of MDisplayInfo.
3345 (xfont_driver): Initialize with xfont_list.
3346 (font_compare): New function.
3347 (build_font_list): Deleted.
3348 (xfont_registry_list): New function.
3349 (xfont_select): Use xfont_registry_list.
3350 (xfont_list): New function.
3351 (device_open): Adusted for the change of MDisplayInfo.
3353 * font-ft.c (add_font_info): New arg languages. Callers changed.
3354 (fc_list): Get languages from fonts..
3355 (ft_list_all): Renamed from ft_list. Callers changed.
3356 (ft_list): New function.
3357 (mfont__ft_driver): Initalize with ft_list.
3359 * font.c (mfont_list): New function.
3361 * font.h (struct MFontDriver): New member `list'.
3362 (MFTInfo): New member languages.
3364 * m17n-gui.h (mfont_list): Extern it.
3366 2004-09-27 Kenichi Handa <handa@m17n.org>
3368 * internal-gui.h (struct MGlyphString): Delete members mt,
3369 sub_width, sub_lbrearing, sub_rbearing, and region.
3371 * draw.c (MSubTextExtents): New type.
3372 (layout_glyphs): New arg extents. Set its members.
3373 (layout_glyph_string): Adjusted for the above change.
3374 (alloc_gstring): Don't set gstring->mt.
3375 (truncate_gstring): Call line_break function with mt instead of
3378 2004-09-22 Kenichi Handa <handa@m17n.org>
3380 * mtext.c (count_utf_16_chars): Count each code of invalid
3383 2004-09-19 Kenichi Handa <handa@m17n.org>
3385 * mtext.c (default_utf_16, default_utf_32): Rename them to
3386 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3389 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3392 2004-09-13 Kenichi Handa <handa@m17n.org>
3394 * draw.c (Mlatin): Don't declare it here.
3395 (visual_order): Fix reordering of combining characters.
3396 (compose_glyph_string): Fix detection of script.
3397 (layout_glyphs): Don't fix reordering of combining characters
3399 (layout_glyph_string): Pay attention to
3400 control->disable_overlapping_adjustment.
3401 (truncate_gstring): Include at least on character in a line.
3402 (get_gstring): Always scan one full line.
3403 (mdraw__init): Don't initialize Mlatin here.
3404 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3405 have a font, use ascent/descent of an ASCII font. Allow
3406 ink_array_return and logical_array_return to be NULL.
3407 (mdraw_coordinates_position): Fix iteration.
3409 * font-ft.c (MFTtoProp): Member completely changed.
3410 (ft_to_prop): Adjusted for the above change.
3411 (ft_to_prop_size): Likewise.
3412 (set_font_info): Adjusted for the change of MFTtoProp.
3413 (fc_generic_family_list): New variable.
3414 (fc_list): Add special handling of generic font names.
3415 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3416 Initialize fc_generic_family_list.
3417 (mfont__ft_fini): Don't free ft_to_prop. Free
3418 fc_generic_family_list.
3419 (FC_vs_M17N_font_prop): New type.
3420 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3421 (fc_decode_prop, fc_encode_prop): New functions.
3422 (mfont__ft_parse_name): Use fc_decode_prop.
3423 (mfont__ft_unparse_name): Use fc_encode_prop.
3425 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3426 (MWDevice): Add member realized_font_list.
3427 (free_display_info): Don't free disp_info->realized_font_list.
3428 (free_device): Free device->realized_fontset_list.
3429 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3430 (device_open): Don't initialize disp_info->realized_font_list.
3431 (device_open): Initialize device->realized_font_list and set it to
3432 frame->realized_font_list.
3434 * fontset.c (try_font_group): New function.
3435 (mfont__lookup_fontset): Use try_font_group.
3437 * font.c (common_weight): Change the order of "regular".
3439 * face.c (Mlatin): Don't make it static.
3440 (mface__realize): Be sure to set work_gstring.frame.
3441 (mface__for_chars): Likewise.
3443 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3446 * internal-gui.h (Mlatin): Extern it.
3448 * m17n-gui.h (MDrawControl): New member
3449 disable_overlapping_adjustment.
3451 2004-09-06 Kenichi Handa <handa@m17n.org>
3453 * font-flt.c (run_otf): Fix typo ('}'->']').
3455 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3456 (COMBINING_PRECOMPUTED_P): New macros.
3458 * draw.c (layout_glyphs): Handle precomputed combining code.
3460 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3461 precomupted combining code.
3463 2004-09-03 Kenichi Handa <handa@m17n.org>
3465 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3468 2004-08-27 Kenichi Handa <handa@m17n.org>
3470 * face.c (mface_put_prop): If the new value is the same as the
3471 current one, don't increment frame->tick.
3473 2004-08-25 Kenichi Handa <handa@m17n.org>
3475 * fontset.c (mfontset): Initialize font_spec_list member.
3476 (mfontset_copy): Load fontset if necessary.
3478 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3479 'metrics' to for C++.
3481 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3484 2004-08-16 Kenichi Handa <handa@m17n.org>
3486 * Version 1.1.0 released.
3488 2004-08-13 Kenichi Handa <handa@m17n.org>
3490 * language.c (mlang__init): Add Dhivehi.
3492 * m17n-gui.c (Mx, Mfreetype): Delete it.
3493 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3495 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3496 (mfont_resize_ratio): Extern it.
3497 (MDrawGlyphInfo): New member logical_width;
3498 (MDrawGlyph): New type.
3499 (mdraw_glyph_list): Prototype adjusted.
3501 * m17n-X.c (xfont_open): Set type and fontp members.
3502 (xft_open): Likewise.
3504 * internal-gui.h (Mx, Mfreetype): Delete extern.
3506 * font.h (struct MRealizedFont): New member type and fontp.
3508 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3509 (Mx, Mfreetype): Declare here.
3510 (Mxft): New variable.
3511 (mfont_resize_ratio): New function.
3513 * font-ft.c (ft_open): Set type and fontp members.
3515 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3518 2004-08-11 Kenichi Handa <handa@m17n.org>
3520 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3523 2004-08-06 Kenichi Handa <handa@m17n.org>
3525 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3528 * font-flt.c (run_otf): Print debugging information if necessary.
3530 2004-08-05 Kenichi Handa <handa@m17n.org>
3532 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3533 positioning_type 5 and 6. Switch simplified.
3535 2004-08-04 Kenichi Handa <handa@m17n.org>
3537 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3539 2004-08-02 Kenichi Handa <handa@m17n.org>
3541 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3542 set val to 1 even if it is greater than 1.
3544 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3546 2004-07-29 Kenichi Handa <handa@m17n.org>
3548 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3549 debugging information.
3551 * internal.h (MDEBUG_PRINT5): New macro.
3553 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3554 the previous one if the zero width glyph has left or right
3557 2004-07-26 Kenichi Handa <handa@m17n.org>
3559 * m17n-X.c (xft_render): Pay attention to members left_padding and
3560 right_padding of MGlyph.
3562 * draw.c (visual_order): Allocate one more elements for arrays as
3563 a workaround of fribidi bug.
3564 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3565 instead of MGlyph->bidi_sensitive.
3566 (layout_glyph_string): Pay attentinon to
3567 control->orientation_reversed when padding at the head or tail.
3568 Fix adjustment of space glyph width.
3569 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3572 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3573 instead of MGlyph->bidi_sensitive.
3575 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3577 2004-07-26 Kenichi Handa <handa@m17n.org>
3579 * draw.c (visual_order): Don't treat combined glyphs specially.
3580 (layout_glyphs): Don't get metrics glyphs that are already ready.
3581 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3582 width with the previous one.
3583 (draw_background): Fix bar cursor position on a r2l glyph.
3585 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3586 (run_rule): Fix place of updating cluster_begin_pos and
3587 cluster_end_pos here.
3588 (run_otf): Don't set left_padding.
3590 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3592 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3593 Fix handling of GPOS.
3594 (mfont__ft_drive_gpos): Delete this function.
3596 * font.h (mfont__ft_drive_otf): Renamed back from
3597 mfont__ft_drive_gsub.
3598 (mfont__ft_drive_gpos): Delete extern.
3600 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3601 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3603 2004-07-23 Kenichi Handa <handa@m17n.org>
3605 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3606 the same bidi level.
3608 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3610 2004-07-22 Kenichi Handa <handa@m17n.org>
3612 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3614 2004-07-20 Kenichi Handa <handa@m17n.org>
3616 * draw.c (render_glyphs): Fix checking of g->code validity.
3618 * face.c (mface__realize): Set g.type.
3620 2004-07-18 Kenichi Handa <handa@m17n.org>
3622 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3625 * m17n-gui.c (mframe): Print error message give by dlopen to
3628 2004-07-16 Kenichi Handa <handa@m17n.org>
3630 * draw.c (compose_glyph_string): Improve the way of deciding a
3631 script. For a character that doesn't have script property, use
3632 the last non-latin script.
3634 * font-ft.c (fc_list): Cancel previous change.
3635 (mfont__ft_init): Add more entries in ft_to_prop_name.
3637 2004-07-15 Kenichi Handa <handa@m17n.org>
3639 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3640 previous or next character glyphs.
3642 2004-07-14 Kenichi Handa <handa@m17n.org>
3644 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3645 of type GLYPH_SPACE.
3647 * fontset.c (mfont__lookup_fontset): If glyph type is
3648 GLYPH_SPACE, get codes for SPACE.
3650 * internal-gui.h (Mfont): Delete extern.
3652 * m17n-gui.h (Mfont): Delete duplicated extern.
3654 2004-07-13 Kenichi Handa <handa@m17n.org>
3656 * font-ft.c (DEVICE_DELTA): New macro.
3657 (adjust_anchor): New function.
3658 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3660 (mfont__ft_drive_gpos): New function.
3662 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3663 (FontLayoutContext): Delete member `rfont'.
3664 (run_otf): Set g->otf_cmd. Call
3665 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3666 only whne HAVE_OTF is defined.
3668 * fontset.c: Include "config.h".
3670 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3671 (MGlyph): New member otf_cmd.
3673 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3674 (mfont__ft_drive_gpos): Extern it.
3676 * face.c: Include "config.h".
3678 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3680 * input-gui.c: Include "config.h".
3682 * plist.c: Include "config.h".
3684 2004-07-06 Kenichi Handa <handa@m17n.org>
3686 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3687 internal-gui.h: Cancel previous changes.
3689 * m17n-gd.h: Delete it.
3691 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3692 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3693 @XML2_LD_FLAGS@ to above.
3694 (libm17n_la_LIBADD): Add -ldl.
3695 (libm17n_la_LDFLAGS): Add -export-dynamic.
3696 (X_LD_FLAGS): Fix the order of linking.
3697 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3698 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3699 (libm17n_X_la_LDFLAGS): Add -module.
3700 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3701 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3702 (libm17n_gd_la_LDFLAGS): Add -module.
3703 (include_HEADERS): Delete m17n-gd.h.
3705 2004-06-30 Kenichi Handa <handa@m17n.org>
3707 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3708 (MDeviceLibraryInterface): Delete it.
3709 (register_device_library): Delete it.
3710 (m17n__device_library_list): Renamed from device_library_list.
3712 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3713 (m17n_init_win): Adjust prototype.
3715 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3716 (m17n_init_gd): New function.
3718 * m17n-gd.h: New file.
3720 * m17n-X.h: Include <m17n-gui.h>.
3721 (m17n_init_X): Extern it.
3722 (M17N_INIT): Redefine it.
3724 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3725 (m17n_init_X): New function.
3727 * internal-gui.h (m17n__device_library_list): Extern it.
3728 (struct MDeviceDriver): New members initialized, init, and fini.
3730 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3732 (libm17n_X_la_LIBADD): Delete aboves.
3733 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3734 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3735 (libm17n_gd_la_LDFLAGS): Delete it.
3736 (include_HEADERS): Add m17n-gd.h.
3738 2004-06-25 Kenichi Handa <handa@m17n.org>
3740 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3741 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3743 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3745 * font-ft.c (fc_list): If FcFontList finds no font, try
3748 * draw.c (compose_glyph_string): Terminate the last loop after
3749 doing default combining if necessary.
3751 2004-06-24 Kenichi Handa <handa@m17n.org>
3753 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3755 * character.c (mchar_define_property): Add const to an arg.
3757 * charset.c (mchar_define_charset): Add const to an arg.
3759 * coding.c (MCodingSystem): Add const to an arg or decoder.
3760 (finish_decoding): Add const to an arg.
3761 (decode_coding_charset, decode_coding_utf_8)
3762 (decode_coding_utf_16, decode_coding_utf_32)
3763 (decode_coding_iso_2022, decode_coding_sjis)
3764 (mconv_define_coding): Likewise.
3766 * m17n-X.c (xft_find_metric): Delete unused variable.
3768 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3771 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3774 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3775 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3777 * mtext.h (mtext__from_data): Ajust prototype.
3779 2004-06-23 Kenichi Handa <handa@m17n.org>
3781 * draw.c (compose_glyph_string): Always get glyph codes by
3783 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3784 (mdraw_glyph_list): New function.
3786 * font-flt.c (mfont__flt_run): Be sure to call
3787 rfont->driver->encode_char.
3789 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3790 (ft_encode_char): Delete arg C.
3791 (ft_render): Don't call FT_Get_Char_Index.
3793 * font.c (mfont__encodable_p): Delete it.
3794 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3796 * font.h (struct MFontDriver): Delete arg C of encode_char.
3797 (mfont__encodable_p): Delete extern.
3799 * m17n-X.c (xfont_encode_char): Delete arg C.
3800 (xft_find_metric): Don't cal FT_Get_Char_Index.
3801 (xft_render): Likewise.
3803 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3805 (mdraw_glyph_list): Extern it.
3807 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3809 2004-06-22 Kenichi Handa <handa@m17n.org>
3811 * m17n-gui.h (mfontset_lookup): Extern it.
3813 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3815 * fontset.c (realize_fontset_elements)
3816 (free_realized_fontset_elements, update_fontset_elements): New
3818 (mfont__realize_fontset): Call realize_fontset_elements.
3819 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3820 (mfont__lookup_fontset): If a fontset was modified, update
3821 the realized fontset.
3822 (mfontset_modify_entry): Increment fontset->tick.
3823 (mfontset_lookup): New function.
3825 2004-06-21 Kenichi Handa <handa@m17n.org>
3827 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3829 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3830 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3831 length of source text 0.
3833 2004-06-21 Kenichi Handa <handa@m17n.org>
3835 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3836 (compare): Pay attention to format other than utf-8.
3837 (copy): Delete this function.
3838 (count_by_utf_8, count_by_utf_16, insert): New functions.
3839 (count_utf_16_chars): Fix handling of a surrogate pair.
3840 (find_char_forward, find_char_backward): Likewise.
3841 (mtext__from_data): Delete unnecessary check. Fix number of
3843 (mtext_from_data): Don't count items.
3844 (mtext_ref_char): Optimize the code.
3845 (mtext_set_char): Pay attention to format other than utf-8.
3846 (mtext_cat_char): Likewise.
3847 (mtext_dup): Don't call copy, instead do allocation here.
3848 (mtext_cat): Call insert instead of copy.
3849 (mtext_ncat): Likewise.
3850 (mtext_cpy): Delete character at first and call insert instead of
3852 (mtext_ncpy): Likewise.
3853 (mtext_copy): Likewise.
3854 (mtext_duplicate): Call insert instead of copy.
3855 (mtext_del): Pay attention to format other than utf-8.
3856 (mtext_ins): Simply call insert.
3857 (mtext_ins_char): Pay attention to format other than utf-8.
3858 (mtext_tok): Call insert instead of copy.
3859 (mtext_text): Call UNIT_BYTES.
3861 * textprop.c (mtext__adjust_plist_for_change): New function.
3863 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3864 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3865 (CHAR_UNITS_AT): Fix typo.
3866 (CHAR_UNITS_BY_HEAD): Fix typo.
3867 (STRING_CHAR_AND_UNITS): Fix typo.
3869 * internal.h (MTEXT_READ_ONLY_P): New macro.
3871 * mtext.h (mtext__replace): Delete the extern.
3872 (mtext__adjust_foramt): Adjust prototype.
3874 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3875 if possible. Otherwise make a copy of mmt.
3877 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3880 2004-06-18 Kenichi Handa <handa@m17n.org>
3882 * character.h (CHAR_STRING_UTF16): Fix syntax.
3884 2004-06-16 Kenichi Handa <handa@m17n.org>
3886 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3887 (libm17n_X_la_LIBADD): Delete it.
3888 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3890 * m17n-X.c (device_open): Add parens in `if' condition.
3892 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3893 (DEC_POSITION): Likewise.
3894 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3896 2004-06-15 Kenichi Handa <handa@m17n.org>
3898 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3901 * draw.c (compose_glyph_string): If langauge is specified, call
3902 mface__for_chars even if a text is all latin. Fix condition for
3903 setting non_ascii_found.
3905 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3907 * m17n.h (minput_char_to_key): Delete extern.
3909 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3911 * m17n-gui.c (null_device_open): Set several members of frame.
3913 2004-06-14 Kenichi Handa <handa@m17n.org>
3915 * m17n-gui.h (minput_event_to_key): Delete extern.
3917 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3919 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3921 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3923 2004-06-08 Kenichi Handa <handa@m17n.org>
3925 * character.c (mchar_put_prop): Don't increment the ref-count of
3928 2004-06-04 Kenichi Handa <handa@m17n.org>
3930 * m17n-core.c (mdebug__register_object): New function.
3931 (mdebug__unregister_object): Likewise.
3933 * internal.h (mdebug__register_object, mdebug__unregister_object):
3935 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3938 * charset.c (mcharset__load_from_database): Don't call
3939 mconv__register_charset_coding here.
3941 * coding.c (find_coding): Get a real name from an element of
3942 coding_definition_list.
3943 (mconv__register_charset_coding): Set the real name at the top of
3945 (mcoding__load_from_database): Likewise.
3946 (mconv_list_codings): Adjusted for the above change.
3948 2004-06-03 Kenichi Handa <handa@m17n.org>
3950 * coding.c (find_coding): Find by canonicalized name. Don't have
3951 to modify the element of coding_definition_list by
3953 (mconv__define_coding_from_charset): Delete it.
3954 (mconv__register_charset_coding): Canonicalize sym.
3955 (mcoding__load_from_database): Register plist modified by
3958 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3960 * font-ft.c (ft_open): Fix setting of rfont->descent.
3962 2004-06-02 Kenichi Handa <handa@m17n.org>
3964 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3965 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3966 (xlfd_unparse_name): Renamed from xfont_build_name.
3967 (mfont__init): Initialized Mfontconfig.
3968 (mfont__free_realized): Unconditionally unref rfont->info.
3969 (mfont__select): Free `this' if it's not best.
3970 (mfont__open): Don't check frame->realized_font_list.
3971 (mfont__parse_name_into_font): New function.
3972 (Mfontconfig): New variable.
3973 (mfont_from_name): Call mfont_parse_name.
3974 (mfont_name): Call mfont_unparse_name.
3975 (mdebug_dump_font): Likewise.
3977 * font.h (struct MFontDriver): Delete members parse_name and
3979 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3980 (mfont__parse_name_into_font): Extern it.
3982 * font-ft.c: Include "symbol.h".
3983 (close_ft): Unconditionally free filename and charmap_list of
3985 (ft_open): Duplicate base->filename. Increment ref-count of
3986 ft_info->charmap_list. Free ft_info->charmap_list and
3987 ft_info->filename on error.
3988 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3990 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3992 (enum xlfd_field_idx): Moved to font.c.
3993 (split_font_name, build_font_name): Likewise.
3994 (build_font_list): Call mfont__parse_name_info_font.
3995 (xfont_open): Call mfont__unparse_name. Free name.
3996 (xfont_parse_name, xfont_build_name): Moved to font.c
3997 (xft_select): Prototype deleted.
3998 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3999 Call mfont_pase_name.
4001 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
4002 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
4005 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
4008 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
4010 2004-06-01 Kenichi Handa <handa@m17n.org>
4012 * fontset.c (mfontset_modify_entry): Pay attention to the case
4013 that fontset->font_spec_list is NULL.
4015 2004-05-31 Kenichi Handa <handa@m17n.org>
4017 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4019 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
4021 * font.c (mfont__select): Print score the a font for debugging.
4023 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
4025 * coding.c (reset_coding_sjis): Check kanji and kana instead of
4026 kanji_sym and kana_sym.
4028 2004-05-28 Kenichi Handa <handa@m17n.org>
4030 * Makefile.am (VINFO): New variable.
4031 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
4032 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
4034 2004-05-27 Kenichi Handa <handa@m17n.org>
4036 The following chanages are to make device dependent functions
4037 accessible only from MDeviceDriver structure, and to add GD and
4038 null device drivers. Font drivers get also device dependent.
4040 * m17n.c (m17n_init): Increament shell_initialized.
4041 (m17n_fini): Decremented shell_initialized.
4043 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
4045 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
4046 (Mwidget, Mcolormap, Mx): Extern them.
4048 * m17n-gui.c: Include <dlfcn.h> and "config.h".
4049 (free_frame): Call frame->driver->close instead of
4051 (DLOPEN_SHLIB_EXT): New macro.
4052 (MDeviceLibraryInterface): New type.
4053 (device_library_list): New variable.
4054 (register_device_library): New function.
4055 (null_device): New variable.
4056 (null_device_close, null_device_get_prop)
4057 (null_device_realize_face, null_device_free_realized_face): New
4059 (null_driver): New variable.
4060 (null_device_init, null_device_fini, null_device_open): New
4062 (null_interface): New variable.
4063 (Mfreetype, Mdevice): Declare them.
4064 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4065 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4066 Mwin__Close_Device. Register drivers for Mx and Mgd.
4067 (m17n_fini_win): Decremented win_initialized. Call "fini"
4068 function of all opened devices. Don't call mwin__fini.
4069 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4071 (mframe): Handle Mdevice key of PLIST.
4072 (mframe_get_prop): Call frame->device->get_prop instead of
4073 mwin__device_get_prop.
4075 * m17n-gd.c: New file.
4077 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4078 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4080 * m17n-core.c (m17n_init_core): Increate core_initialized.
4081 (m17n_fini_core): Decremented core_initialized.
4083 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4084 (Mcolormap): Don't extern them here.
4086 * m17n-X.c (FRAME_DEVICE): New macro.
4087 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4088 (free_display_info): Use MPLIST_DO.
4089 (free_device): Free rface->info.
4090 (xft_close): Delete it.
4091 (device_init): Renamed from mwin__init.
4092 (device_fini): Renamed from mwin__fini.
4093 (device_open): Renamed from mwin__open_device.
4094 (x_driver): New variable.
4095 (MXFontInfo): Delete member frame, add member display.
4096 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4097 Don't declare them here.
4099 * internal-gui.h (MDeviceType): New enum.
4100 (MWDefice): Delete it.
4101 (struct MFrame): Change type of device to void *. New members
4102 device_type, driver, font_driver_list.
4103 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4104 (MDeviceDriver): New type.
4105 (Mx, Mgd, Mfreetype): Extern them.
4106 (mwin__XXX): Delete all of them.
4108 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4110 (win_destroy_ic): Likewise.
4111 (adjust_window_and_draw): Likewise.
4112 (win_callback): Likewise.
4113 (Mxim): Declare it here.
4114 (minput_event_to_key): Call M_CHECK_READABLE.
4116 * fontset.c (mfont__lookup_fontset): Delete local variable
4119 * font.h (struct MFontDriver): Delete member close, add members
4120 parse_name and build_name.
4121 (mfont__driver_list): Delete extern.
4122 (mfont__close): Delete extern.
4124 * font.c (mfont__init): Don't set mfont__driver_list.
4125 (mfont__fini): Don't unref mfont__driver_list.
4126 (mfont__select): Try font drivers in frame->font_driver_list. Set
4127 driver member of a realized font.
4128 (mfont__close): Delete it.
4129 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4130 functions of the default frame.
4132 * font-ft.c (close_ft): Check ft_info->ft_face and work
4134 (add_font_info): Allocate ft_info by M17N_OBJECT.
4135 (ft_close): Delete it.
4136 (mfont__ft_driver): Don't set ft_close.
4137 (ft_select): Increment ref-count of best_font.
4138 (ft_open): Decremented ref-count of base. On error, call
4139 FT_Done_Face and free ft_info.
4140 (ft_find_metric): Always use XXX_MONO in load_flags.
4141 (ft_render): Fix setting of width. Call
4142 frame->driver->draw_points instead of mwin__draw_points.
4143 (ft_to_prop): Don't set mfont__driver_list.
4144 (mfont__ft_fini): Just unref ft_info.
4146 * face.c (mface__init): Exchange foreground and background of
4147 mface__default. Call mface_put_prop to set hline of
4149 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4150 (mface__free_realized): Don't call mwin__free_realized_face.
4152 * draw.c (Mdepth): Don't declare it here.
4153 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4154 (render_glyphs, render_glyph_string): Likewise.
4155 (mdraw__init): Don't set Mdepth.
4156 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4158 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4160 (mdraw_text_items): Check FRAME is writable.
4161 (mdraw_per_char_extents): Implement body.
4163 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4165 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4166 (GUI_SOURCES): Delete it.
4167 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4168 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4169 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4170 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4171 (linkgui_LDADD): Set to libm17n-gui.la
4172 (linkgui_LDFLAGS): New target.
4173 (SRC): Include ${libm17n_gui_la_SOURCES} and
4174 ${libm17n_gd_la_SOURCES}.
4176 2004-05-24 Kenichi Handa <handa@m17n.org>
4178 * draw.c (draw_background): Don't draw background even if
4179 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4181 2004-05-22 Kenichi Handa <handa@m17n.org>
4183 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4185 2004-05-20 Kenichi Handa <handa@m17n.org>
4187 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4189 * m17n-gui.c: Include "plist.h".
4190 (mframe): If PLIST is NULL, initialize it to emply plist.
4192 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4193 (xft_driver): New variable.
4194 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4195 (xft_find_metric, xft_render): New function.
4196 (mwin__init): Adjusted for the new mfont__driver_list.
4197 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4198 generated face to PARAM.
4199 (mwin__realize_face): Fix setting of box colors. Don't call hook
4201 (mwin__draw_hline): New function.
4202 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4203 (mwin__xft_render): Delete these function.
4205 * internal-gui.h (struct MFrame): New member tick.
4206 (struct MGlyphString): New member tick.
4207 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4208 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4209 (mwin__xft_render): Delete extern.
4211 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4212 (mfontset): Always increment the reference count of returned
4215 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4216 (MFTInfo): Moved to font.h.
4217 (ft_iso8859_1_font_list): Delete this variable.
4218 (set_font_info): Don't set font->property[MFONT_TYPE].
4219 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4220 (add_font_info): Change type to void.
4221 (fc_list): Change anme from xft_list. Caller changed. Include
4222 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4223 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4224 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4225 (close_ft): Don't call mwin__xft_close. Unref
4226 ft_info->extra_info.
4227 (ft_open): Don't setup ft_info->fontname. Don't call
4229 (ft_find_metric): Don't call mwin__xft_get_metric.
4230 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4231 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4232 (mfont__ft_init): Adjusted for new mfont__driver_list.
4233 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4235 * font.c (mfont__driver_list): Make it MPlist.
4236 (mfont__init): Adjust initialization of mfont__driver_list.
4237 (mfont__fini): Free mfont__driver_list.
4238 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4239 (mfont__select): Adjusted for the new mfont__driver_list.
4241 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4242 (mfont__drirver_list): Adjust prototype.
4243 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4245 * face.h (struct MFace): Delete member realized_face_list, add
4247 (struct MRealizedFace): Delete member need_update
4248 andnofont_rface, add member non_ascii_list.
4249 (mface__update_frame_face): Extern it.
4251 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4253 (get_hline_create, get_box_create): New functions.
4254 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4256 (free_face): Cancep previous change. Free face->frame_list.
4257 (serialize_hline): Do nothing if hline->width is zero.
4258 (serialize_box): Do nothing if box->width is zero.
4259 (mface__init): Setup all properties of mface__default.
4260 (mface__fini): Free hline_prop_list and box_prop_list.
4261 (mface__realize): Cancel previous change. Update
4262 face->frame_list. Setup rface->non_ascii_list.
4263 (mface__for_chars): Update rface->non_ascii_list.
4264 (mface__free_realized): Free rface->non_ascii_list.
4265 (mface__update_frame_face): New function.
4266 (mface): Initialize face->frame_list.
4267 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4269 (mface_merge): Likewise.
4270 (mface_put_prop): If key is Mhline or Mbox, get value by
4271 get_hline_create or get_box_create respectively.
4272 (mface_put_prop): Update frame->tick and call
4273 mface__update_frame_face if necessary.
4274 (mface_update): Do nothing if func is noop_hook.
4276 * draw.c (render_glyphs): If a font is not found, use
4277 mwin__draw_empty_boxes.
4278 (alloc_gstring): Initialize gstring->tick.
4279 (get_gstring): Check gstring->tick.
4281 2004-05-17 Kenichi Handa <handa@m17n.org>
4283 * face.c (find_realized_face): Return value changed. If RFONT is
4284 NULL, avoid unnecessary checking.
4285 (free_face): Free face->realized_face_list.
4286 (mface__realize): Adjusted for the change of find_realized_face.
4287 If it returns a realized face that needs update, free it and
4288 realize a new one. Push a new realized face to
4289 frame->realized_face_list instead of appending.
4290 (mface__for_chars): Adjusted for the change of find_realized_face.
4291 Short cut if the required font is in rface->ascii_rface.
4292 (mface_put_prop): Free old value if necessary. Set need_update
4293 member of realized faces to 1.
4295 * face.h (struct MFace): Delete member tick, add member
4297 (struct MRealizedFace): Delete member tick, add member
4300 2004-05-13 Kenichi Handa <handa@m17n.org>
4302 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4304 2004-05-12 Kenichi Handa <handa@m17n.org>
4306 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4308 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4309 parse it XftNameParse.
4311 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4312 (all_fonts_scaned): New variable.
4313 (set_font_info): FAMILY may be Mnil.
4314 (add_font_info): Argument changed.
4315 (xft_list): Call add_font_info in it.
4316 (ft_list): Likewise.
4317 (ft_select): Make it work in the case family is Mnil.
4318 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4319 (mfont__ft_fini): Set all_fonts_scaned to 0.
4321 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4322 that is failed to open.
4324 2004-05-10 Kenichi Handa <handa@m17n.org>
4326 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4327 device's depth is 1 (i.e. monochrome).
4329 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4330 to work around the problem of libtool.
4332 * font-ft.c: Include <freetype/ftbdf.h>.
4333 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4335 (mfont__ft_init): Initialize them.
4336 (ft_iso8859_1_font_list): New variable.
4337 (set_font_info): Detect a font containing iso8859-1 glyphs and
4338 register it in ft_iso8859_1_font_list. If the font is not
4339 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4340 properties of the font from its properties.
4341 (add_font_list): If the font is not scalable, check if it is BDF
4342 or PCF font. If not, ignore it.
4343 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4344 registry is not iso8859-1.
4345 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4346 ft_iso8859_1_font_list.
4347 (ft_find_metric): If the font is not scalable, assume it as BDF
4348 or PCF, and get a metric from its properties.
4349 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4351 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4353 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4354 (libm17n_la_LDFLAGS): Delete it.
4355 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4356 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4358 2004-05-06 Kenichi Handa <handa@m17n.org>
4360 * draw.c (compose_glyph_string): Fix previous change.
4362 2004-04-30 Kenichi Handa <handa@m17n.org>
4364 * font-ft.c (ft_list): Delete unused variable `result'.
4365 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4367 2004-04-27 Kenichi Handa <handa@m17n.org>
4369 * m17n-X.c: Include config.h
4370 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4371 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4372 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4373 (FRAME_CMAP, FRAME_VISUAL): New macros.
4374 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4375 (xfont_driver): Make it static.
4376 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4377 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4378 info->xft_color_back.
4379 (MXftFontInfo) [HAVE_XFT2]: New type.
4380 (mwin__xft_close) [HAVE_XFT2]: New function.
4381 (mwin__xft_open) [HAVE_XFT2]: New function.
4382 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4383 (mwin__xft_render) [HAVE_XFT2]: New function.
4385 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4386 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4387 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4390 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4392 * font-ft.c: Don't include FT_FREETYPE_H here.
4393 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4394 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4395 (MFTInfo): New member charmap_index.
4396 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4397 (check_otf_filename): Renamed from check_filename. Return value
4399 (ft_set_property): This function deleted.
4400 (set_font_info): New function.
4401 (add_font_list): Argument changed. Add multiple fonts.
4402 (xft_list) [HAVE_XFT2]: New function.
4403 (ft_list) [not HAVE_XFT2]: New function.
4404 (ft_select): Add code for Xft.
4405 (close_ft): Likewise.
4406 (ft_open): Likewise.
4407 (ft_find_metric): Likewise.
4408 (ft_encode_char): Likewise.
4409 (ft_render): Likewise.
4411 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4413 2004-04-26 Kenichi Handa <handa@m17n.org>
4415 * textprop.c (mtext_attach_property): Declare the return type as
4418 2004-04-21 Kenichi Handa <handa@m17n.org>
4420 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4422 2004-04-09 Kenichi Handa <handa@m17n.org>
4424 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4426 (load_command): Setup above members.
4428 2004-04-05 Kenichi Handa <handa@m17n.org>
4430 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4432 2004-03-30 Kenichi Handa <handa@m17n.org>
4434 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4437 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4438 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4440 2004-03-29 Kenichi Handa <handa@m17n.org>
4442 * Version 1.0 Patch Level 2 released.
4444 2004-03-29 Kenichi Handa <handa@m17n.org>
4446 * charset.c (make_charset): Set charset->fully_loaded and
4447 charset->simple correctly. Don't try to get charset->min_char and
4448 charset->max_char for a charset of method subset and superset.
4449 Don't load a mapping file here.
4450 (mcharset__init): Set unified_max.
4451 (mcharset__load_from_database): Free a working plist.
4453 * coding.c (mcoding__fini): Free all malloced data.
4455 * input-gui.c (win_create_ic): Set control.as_image for preediting
4458 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4459 `count') to initialize the array.
4461 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4464 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4466 (mwin__create_window): Fix bug of setting a background pixel of a
4468 (mwin__adjust_window): Clear the window before drawing.
4470 * m17n-core.c (mdebug__report_object): Free array->objectes if
4472 (m17n_init_core): Don't set report_header_printed to 0 here.
4473 Fix debugging information.
4474 (m17n_fini_core): Set report_header_printed to 0 here.
4476 * m17n-core.h (mplist_deserialize): Extern it.
4478 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4480 * m17n.c (m17n_fini): Fix debugging information.
4482 * mtext.c (mtext__adjust_foramt): New function.
4484 * mtext.h (mtext__adjust_foramt): Extern it.
4486 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4488 * plist.h (mplist__deserialize): Don't extern it.
4490 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4491 elements of symbol_table to NULL. Report about created and freed
4492 symbols if MDEBUG_FINI is set.
4494 2004-03-22 Kenichi Handa <handa@m17n.org>
4496 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4498 * m17n.c (m17n_init): Fix the way of checking merror_code.
4500 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4502 2004-03-22 Kenichi Handa <handa@m17n.org>
4504 * fontset.c (realize_font_group): Adjust the font size by
4505 mfont__resize before selecting a font.
4507 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4509 2004-03-19 Kenichi Handa <handa@m17n.org>
4511 * Version 1.0 Patch Level 1 released.
4513 2004-03-19 Kenichi Handa <handa@m17n.org>
4515 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4517 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4519 2004-03-19 Kenichi Handa <handa@m17n.org>
4521 Re-apply the changes forgotten in the released version.
4523 * charset.c (mcharset__load_from_database): Call
4524 mchar_define_charset.
4526 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4527 (mconv_encode_range): Put Mcoding text property.
4529 2004-03-18 Kenichi Handa <handa@m17n.org>
4531 * draw.c (Mdepth): New variable.
4532 (visual_order): Delete unused local var `pos'.
4533 (compose_glyph_string): Fix for the case that gstring->glyphs is
4534 realloced. Stop generating glyphs at TO. Fix handling of
4536 (layout_glyphs): Get metrics of all glyphs in advance. Set
4537 lbearing and rbearing of base of composition glyph correctly.
4538 Handle left-overhang glyphs correctly.
4539 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4541 (dump_combining_code): Change the defualt off_x character to ".".
4542 (mdraw__init): Initialize Mdepth.
4544 * face.c (work_gstring): New variable
4545 (mface__init): Initialize work_gstring.
4546 (mface__fini): Free work_gstring.glyphs.
4547 (mface__realize): Don't handle videomode property here. Adjusted
4548 for the change of mfont__get_metric.
4549 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4551 * face.h (enum face_gc): Moved to m17n-X.c.
4553 * font.h (struct MFontDriver): Arguments of find_metric changed.
4554 (mfont__select): Prototype adjusted.
4555 (mfont__get_metric): Likewise.
4556 (mfont__ft_drive_otf): Likewise.
4557 (mfont__flt_run): Likewise.
4559 * font.c (mfont__select): New argument layouter. If layouter is
4560 different in the registered font, make a new copy of realized
4562 (mfont__get_metric): Argument changed. Get metrics of multiple
4564 (mfont_find): Call mfont__select with layouter as Mnil.
4566 * font-flt.c (FontLayoutContext): New member rfont.
4567 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4568 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4570 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4572 (NUM_POINTS): New macro.
4573 (MPointTable): New type.
4574 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4575 (mfont__ft_drive_otf): New argument rfont.
4577 * fontset.c (realize_font_group): Adjusted for the changed of
4579 (check_fontset_element): This function deleted.
4581 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4582 off the parent window if the preedit text is zero length.
4584 * internal-gui.h (struct MFrame): New members foreground,
4585 background, videomode, font.
4586 (struct MGlyphString): New member anti_alias.
4587 (MDrawPoint): New type.
4588 (mwin__draw_bitmap): Prototype deleted.
4589 (mwin__draw_points): Prototype added.
4591 * m17n-gui.h (MDrawControl): New member anti_alias.
4593 * m17n-gui.c (free_frame): Free frame->font.
4594 (mframe): Set the fontset of frame->face to the default fontset.
4596 * m17n-X.c (RGB_GC): New type.
4597 (enum gc_index): Renamed from enum face_gc. Member names changed.
4599 (struct MWDevice): Members foreground and background deleted. New
4600 member scratch_gc, gc_list.
4601 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4602 (free_device): Free GCs in device->gc_list.
4603 (get_rgb_gc): New function.
4604 (get_gc): Renamed and argument changed from get_color.
4605 (get_gc_for_anti_alias): New function.
4606 (xfont_find_metric): Arguments changed. Get metrics of multiple
4608 (set_region): Argument changed. Caller changed.
4609 (xfont_render): Allways set a font in gc.
4610 (x_error_handler, x_io_error_handler): Define only if
4611 X_SET_ERROR_HANDLER is defined.
4612 (mwin__open_device): Create device->scratch_gc. Set members
4613 foreground, background, and videomode of frame. Call
4614 XSetErrorHandler and XSetIOErrorHandler only if
4615 X_SET_ERROR_HANDLER is defined.
4616 (struct gc_list): Deleted.
4617 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4618 (mwin__realize_face): Adjusted for the change of the format of
4619 rface->info and the charge of set_region.
4620 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4621 (mwin__draw_box): Likewise.
4622 (mwin__draw_bitmap): This function deleted.
4623 (mwin__draw_points): New function.
4624 (mwin__verify_region): Adjusted for the change of the format of
4625 rface->info and the charge of set_region.
4626 (mwin__create_window): Inherit backgound pixel from parent.
4627 (mwin__dump_gc): Adjusted for the change of the format of
4630 2004-03-16 Kenichi Handa <handa@m17n.org>
4632 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4634 * input.c (M_key_alias): New variable.
4635 (handle_key): Try M_key_alias property of a key too.
4636 (minput__init): Initialize M_key_alias. Give that property to
4637 symbols in one_char_symbol. Fix bug of initializing
4640 * draw.c (compose_glyph_string): Don't handle
4641 ignore_formatting_char here. Include formatting characters in the
4642 range processed by a FTL.
4643 (layout_glyph_string): Handle ignore_formatting_char here.
4645 2004-03-12 Kenichi Handa <handa@m17n.org>
4647 * input-gui.c (win_create_ic): Enable bidi in status control.
4649 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4651 2004-03-09 Kenichi Handa <handa@m17n.org>
4653 * input.c (load_input_method): If title is not specified, use the
4654 input method name as title.
4656 * m17n-X.c (get_color): Make it static.
4657 (xim_create_ic, xim_destroy_ic, x_error_handler)
4658 (x_io_error_handler): Likewise.
4660 2004-03-01 Kenichi Handa <handa@m17n.org>
4662 * Version 1.0 released.
4665 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
4666 National Institute of Advanced Industrial Science and Technology (AIST)
4667 Registration Number H15PRO112
4669 This file is part of the m17n library.
4671 The m17n library is free software; you can redistribute it and/or
4672 modify it under the terms of the GNU Lesser General Public License
4673 as published by the Free Software Foundation; either version 2.1 of
4674 the License, or (at your option) any later version.
4676 The m17n library is distributed in the hope that it will be useful,
4677 but WITHOUT ANY WARRANTY; without even the implied warranty of
4678 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4679 Lesser General Public License for more details.
4681 You should have received a copy of the GNU Lesser General Public
4682 License along with the m17n library; if not, write to the Free
4683 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4684 Boston, MA 02110-1301, USA.