1 2009-03-03 Kenichi Handa <handa@m17n.org>
3 * draw.c (compose_glyph_string): Check if category not Mnil.
5 2009-03-02 Kenichi Handa <handa@m17n.org>
7 * Version 1.5.4 released.
9 2009-02-25 Kenichi Handa <handa@m17n.org>
11 * m17n-core.c (report_object_array): For M-text and Plist, print
14 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
15 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
17 * input.c (get_candidate_list): Free unnecessary objects.
18 (take_action_list): Free plist.
20 2009-02-04 Kenichi Handa <handa@m17n.org>
22 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
24 2009-01-16 Kenichi Handa <handa@m17n.org>
26 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
29 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
32 2009-01-14 Kenichi Handa <handa@m17n.org>
34 * coding.c (decode_coding_iso_2022): Check invocation status
35 before updating charset0 and charset1.
37 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
39 2008-12-31 Kenichi Handa <handa@m17n.org>
41 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
44 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
46 * face.c (mface_get_prop): Fix strict aliasing bug.
47 (mface_put_prop): Likewise.
49 * m17n-gui.c (mframe): Fix strict aliasing bug.
51 2008-10-20 Kenichi Handa <handa@m17n.org>
53 * Version 1.5.3 released.
55 2008-10-06 Kenichi Handa <handa@m17n.org>
57 * draw.c (mdraw__init): Use TRUE only when
58 FRIBIDI_INTERFACE_VERSION is less than 3.
60 2008-10-03 Kenichi Handa <handa@m17n.org>
62 * database.c (mdatabase__find_file): Return a copy of filename if
63 it is absolute pathname.
65 2008-09-25 Kenichi Handa <handa@m17n.org>
67 * input.c (load_macros): Don't parse the action list here.
68 (load_im_info): Parse action lists of all macros.
70 2008-09-24 Kenichi Handa <handa@m17n.org>
72 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
74 2008-09-19 Kenichi Handa <handa@m17n.org>
76 * input.c (fully_initialize): Rename "@reload" to "-reload".
78 2008-09-17 Kenichi Handa <handa@m17n.org>
80 * m17n-flt.c (run_stages): Fix combining with a variable width
83 2008-08-04 Kenichi Handa <handa@m17n.org>
85 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
88 2008-07-22 Kenichi Handa <handa@m17n.org>
90 * input.c (fully_initialize): Fix previous change.
92 2008-07-19 Kenichi Handa <handa@m17n.org>
94 * input.c (fully_initialize): Fix previous change.
96 2008-07-14 Kenichi Handa <handa@m17n.org>
98 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
100 2008-07-14 Kenichi Handa <handa@m17n.org>
102 * input.c (fully_initialize): Handle C-M-1, etc.
104 2008-07-11 Kenichi Handa <handa@m17n.org>
106 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
108 2008-06-23 Kenichi Handa <handa@m17n.org>
110 * Version 1.5.2 released.
112 2008-06-23 Kenichi Handa <handa@m17n.org>
114 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
115 (M17NLIB_PATCH_LEVEL): Changed to 2.
116 (M17NLIB_VERSION_NAME): Changed "1.5.2".
118 2008-06-13 Kenichi Handa <handa@m17n.org>
120 * input.c (minput_config_file): Comment fixed for man-page.
122 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
124 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
126 2008-05-24 Kenichi Handa <handa@m17n.org>
128 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
130 2008-05-23 Kenichi Handa <handa@m17n.org>
132 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
133 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
135 (libm17n_gd_la_LIBADD): Likewise.
137 * input.c (take_action_list): Fix debug info.
139 2008-05-14 Kenichi Handa <handa@m17n.org>
141 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
142 (run_stages): Fix index of g_indices.
144 2008-04-03 Kenichi Handa <handa@m17n.org>
146 * draw.c (compose_glyph_string): Don't run flt striding over the
148 (get_gstring): Don't use the cached gstring if cursor position is
151 2008-04-02 Kenichi Handa <handa@m17n.org>
153 * input.c (integer_value): Delete the 3rd arg VALUE.
154 (resolve_expression): Adjust the call of integer_value.
155 (take_action_list): Likewise.
157 2008-03-06 Kenichi Handa <handa@m17n.org>
159 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
162 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
164 * Version 1.5.1 released.
166 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
168 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
169 HAVE_FREETYPE is defined.
171 * font.h (OTF_Tag): Be sure that it is defined in any cases.
173 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
175 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
178 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
180 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
182 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
184 * input.c (parse_action_list): Check M_candidates.
185 (get_im_info): If key is Mnil, be sure to set im_info->states to a
188 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
190 * input.c (integer_value): Fix interpretation of "@-N".
192 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
194 * input.c (get_following_char): Fix interpretation of POS.
195 (get_following_char): Fix interpretation of "@+N".
197 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
199 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
202 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
204 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
206 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
208 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
209 (run_command): Check if clustering now before calling
210 UPDATE_CLUSTER_RANGE.
212 2008-01-06 Kenichi Handa <handa@m17n.org>
214 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
216 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
218 * m17n-X.c (xft_find_metric): Set g->g.measured.
220 * m17n-flt.c (Mequal): New variable.
221 (m17n_init_flt): Initialize it.
222 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
223 into a new member facility.
224 (load_command): Modify parsing of Mfont_facility.
225 (run_rule): Adjuted for the change of FontLayoutCmdRule.
226 (run_otf): Adjusted metrics if a->back is nonzero.
228 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
230 * Version 1.5.0 released.
232 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
234 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
236 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
237 (run_rule): Check if a font has the specific glyph correctly.
239 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
240 MDEBUG_FONT_FLT to MDEBUG_FLT.
242 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
244 * font-flt.c: Delete it.
246 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
248 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
249 TO for the rule of SRC_HAS_GLYPH.
251 * draw.c (run_flt): Argument changed.
252 (compose_glyph_string): Adjusted for the above change.
254 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
256 * plist.c (read_mtext_element): Don't free the malloced buffer.
258 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
260 * m17n-core.h (merror_code): Extern it.
262 * m17n-misc.h (merror_code): Don't extern it.
264 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
266 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
268 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
270 * draw.c (compose_glyph_string): Check g->rface->layouter, not
271 g->rface->rfont->layouter.
273 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
275 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
276 (run_rule): Use ctx->encoded_offset.
277 (run_command): Likewise.
278 (run_stages): Set ctx->encoded_offset.
280 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
282 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
283 bit-size of MFLTGlyph->internal.
285 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
287 * draw.c (visual_order): Exclude the last anchor glyph from the
290 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
292 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
293 (run_stages): Likewise.
294 (load_flt): Unref top after checking plist.
296 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
298 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
300 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
302 * m17n-flt.c (Mcombining): New variable.
303 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
304 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
305 SRC_HAS_GLYPH and SRC_OTF_SPEC.
306 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
308 (load_command): Adjusted for the above changes.
309 (run_rule): Likewise.
310 (combining_code_from_class): Delete it.
311 (mflt_get): Check flt->name against Mcombining, not Mt.
313 * internal-flt.h (Mcombining): Extern it.
315 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
316 combining characters.
318 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
320 * face.c (mface__realize): Reset measured flag before calling
323 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
324 (setup_combining_coverage): New function.
325 (setup_combining_flt): New function.
326 (mflt_get): If flt is not found, return NULL. If name if Mt,
327 call setup_combining_flt.
328 (mflt_run): For debugging, print font family name.
330 * font-ft.c (ft_render): Fix handling of baseline_offset.
331 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
332 (ft_render): Check pixel_mode to determine anti_alias.
334 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
335 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
336 (xfont_render): Set baseline_offset in pixel.
337 (xft_render): Fix handling of baseline_offset.
339 * draw.c (run_flt): Set font.font.family.
340 (compose_glyph_string): Fix handling of combining characters.
342 * fontset.c (try_font_list): Check if the named flt is surely
345 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
347 * draw.c (analyse_bidi_level): New function.
348 (visual_order): Do reordering using the already decided
350 (compose_glyph_string): Decide bidi-level before calling flt.
352 * m17n-flt.c (mflt_run): Fix typo.
354 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
356 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
358 * draw.c (visual_order): Don't rely on the width of glyphs.
359 (run_flt): Fix culculation of g->g.to.
361 * m17n-flt.c (run_rule): Don't set error code here.
362 (run_cond): Likewise.
363 (run_otf): Fix culculation of xoff and yoff.
364 (run_command): Don't set error code here.
368 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
369 (xfont_find_metric): Set glyph's yadv to 0.
370 (xft_find_metric): Likewise.
372 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
373 (ft_find_metric): Adjust glyph's metrics.
374 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
375 (ft_drive_otf): Set mark glyph's xadv to 0.
377 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
380 2007-10-29 Kenichi Handa <handa@m17n.org>
382 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
383 (mflt_get): Adjusted for the argument change.
384 (mflt_name): Adjusted for the return value change.
386 * m17n-flt.c (Mgenerator, Mend): New variables.
387 (flt_min_coverage, flt_max_coverage): New variables.
390 (Mfont_has): Renamed from Mexist. Referrers chagned.
391 (gen_otf_tag): Handle the trailing whitespaces.
392 (otf_count_features, otf_store_features): Fix for negative features.
393 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
394 (load_otf_command): Likewise.
395 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
396 (load_flt): Argument changed. Caller changed.
397 (free_flt_list): New function.
398 (run_rule): Adjusted for the change of FontLayoutContext.
399 (mflt_run): Adjusted for the change of FontLayoutContext.
401 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
402 (m17n_fini_win): Call m17n_fini_flt.
404 * m17n-gui.h: Include m17n-flt.h.
406 * m17n-gd.c: Adusted for the change of MGlyph.
408 * m17n-X.c: Adusted for the change of MGlyph.
409 (xft_check_otf, xft_drive_otf): New functions.
411 * internal-gui.h (MGlyph): Modified for new FLT handling.
413 * fontset.c (try_font_list): Adusted for the change of MGlyph.
415 * font-ft.c: Adjusted for the change of MGlyph.
416 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
417 (get_glyph_metric): Deleted.
418 (ft_check_otf): New function.
419 (ft_drive_otf): New fucntion.
421 * font.c: Adjusted for the change of MGlyph.
422 (mfont__init): Don't call mfont__flt_init.
423 (mfont__fini): Don't call mfont__flt_fini.
424 (mfont__get_glyph_id, mfont__get_metrics): New functions.
426 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
427 (MFLTFontForRealized): New struct.
428 (struct MFontDriver): New members check_otf and drive_otf.
429 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
431 * face.c: Adjusted for the change of MGlyph.
433 * draw.c: Adjusted for the change of MGlyph.
435 * m17n.c (m17n_init): Don't call mchar_init.
437 * m17n-core.c (m17n_init_core): Call mchar_init.
439 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
441 * input.c: Include "m17n.h" instead of "m17n-gui.h".
443 * chartab.c (mchartable): Initialize table->min_char to -1.
444 (mchartable_min_char): New function.
445 (mchartable_max_char): New function.
447 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
448 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
450 2007-10-12 Kenichi Handa <handa@m17n.org>
452 * m17n-core.h (Mcharset): Extern it.
453 Move detabase related declarations from m17n.h.
455 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
456 (struct _MFLTOtfFeatures): New struct.
457 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
458 (struct _MFLTFont): Delete otf, add check_otf.
459 (MCHAR_INVALID_CODE): Define it.
461 * plist.c (read_mtext_element): Simplify the code.
463 * m17n.h: Move database related declarations to m17n-core.h
464 (Mharset): Don't extern it.
466 * m17n.c (m17n_init): Don't call mdatabase__init.
468 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
471 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
472 (Mexist): New variable.
473 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
474 (FontLayoutCmdRule): New member src.exist.
475 (parse_otf_command): Handle gsub_count and gpos_count separately.
476 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
477 (load_command): Handle the command "exist".
478 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
479 (run_rule): Handle the case SRC_EXIST.
480 (run_otf): Adjusted for the change of MFLTOtfSpec.
481 (run_command): Check the range of FROM.
482 (check_otf_spec): Delete it.
483 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
485 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
486 (mflt_find): Call font->check_otf instead of check_otf_spec.
487 (mflt_run): Keep the metrics in 26.6 fixed point.
489 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
490 (m17n_init_core): Call mdatabase__init.
492 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
494 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
497 * font-flt.c (Mexist): New variable.
498 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
499 (FontLayoutCmdRule): New member src.exist.
500 (load_category_table): Use isalnum, not isalpha.
501 (load_command): Check the command "exist".
502 (run_rule): Hande the case SRC_EXIST.
503 (run_command): Check the range of FROM.
504 (mfont__flt_init): Initialize Mexist.
506 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
508 * database.h (mdatabase__load_charset_func): Extern it.
510 * database.c: Include m17n-core.h instead of m17n.h.
511 (load_chartable): Use mtext__from_data.
512 (load_charset): Moved to charset.c
513 (load_database): Call mdatabase__load_charset_func instead of
515 (mdatabase__load_charset_func): New variable.
516 (mdatabase__init): Initialize mdatabase__load_charset_func and
517 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
518 (mdatabase__save): Use fwrite, not mconv_encode_stream.
519 (Mcharset): Declare it here.
521 * charset.c: Include "database.h.".
522 (load_charset): Moved from database.c.
523 (mcharset__init): Initialize mdatabase__load_charset_func, don't
526 * character.c (mchar_define_property): Call mdatabase_find directly.
527 (mchar_get_prop): Call mdatabase_add directly.
528 (mchar_put_prop): Call mdatabase_load directly.
529 (mchar_get_prop_table): Likewise.
531 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
532 (libm17n_la_SOURCES): Remove database.[ch].
533 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
535 2007-09-18 Kenichi Handa <handa@m17n.org>
537 * face.c (mface__realize): Try Freetype based font at first.
539 * font.c: Include <ctype.h>
541 2007-09-16 Kenichi Handa <handa@m17n.org>
543 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
545 (run_otf): Call font->get_metrics, not font->get_metric.
546 (run_stages): Likewise.
547 (CHECK_FLT_COVERAGE): New macro.
548 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
549 (check_otf_spec): New function.
550 (m17n_fini_flt): Unref flt->coverage.
551 (mflt_find): Argument changed.
552 (mflt_name): New function.
553 (mflt_coverage): Use CHECK_FLT_COVERAGE.
555 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
556 (mflt_find): Prototype adjusted.
557 (mflt_name): Extern it.
559 2007-09-14 Kenichi Handa <handa@m17n.org>
561 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
563 * font-flt.c (run_otf): Make debug info printing comaptible with
565 (run_command): Likewise.
566 (mfont__flt_run): Likewise.
568 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
569 invalid only when it's negative.
571 (run_command): Likewise.
572 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
574 2007-09-10 Kenichi Handa <handa@m17n.org>
576 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
577 (struct _MFLTFont): Prototype of get_glyph_id changed.
579 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
581 (GAPPEND): Delete this macro.
582 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
583 for the change of MFLTGlyph. Caller changed.
584 (run_otf): Simply calls font->get_glyph_id.
585 (run_command): Reset g->encoded and g->measured for direct code.
586 (positioning): Delete this function.
587 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
589 2007-09-07 Kenichi Handa <handa@m17n.org>
591 * draw.c (compose_glyph_string): Improve script detection.
593 2007-09-06 Kenichi Handa <handa@m17n.org>
595 * m17n-flt.h (mflt_get): Extern it.
597 * m17n-flt.c (run_stages): Call positioning only if
598 font->get_metric is non-NULL.
599 (CHECK_FLT_STAGES): Fix typo.
600 (mflt_get): New function.
602 * font-flt.c (mfont__flt_run): Improve debug info printing.
604 2007-09-04 Kenichi Handa <handa@m17n.org>
606 * m17n-flt.c (MFontLayoutTable): Delete this type.
607 (struct _MFLT): New member mdb and coverage.
608 (list_flt): Set flt->mdb.
609 (load_generator): Argument and return value changed. Caller
611 (get_font_layout_table): Delete this function.
612 (run_stages): Argument changed. Caller changed.
613 (CHECK_FLT_STAGES): New macro.
614 (mfont__flt_encode_char): Argument changed.
615 (mflt_find): Likewise.
616 (mflt_coverage): New function.
617 (mflt_run): Argument changed.
618 (mdebug_dump_flt): Likewise.
620 * m17n-flt.h (mflt_coverage): Extern it.
621 (mflt_find): Prototype adjusted.
623 2007-09-03 Kenichi Handa <handa@m17n.org>
625 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
627 * database.c (mdatabase__props): New function.
629 * database.h (mdatabase__props): Extern it.
631 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
633 (struct _MFLTFont): Add suitable_p.
634 (mflt_find): Extern it.
636 * m17n-flt.c: Include "database.h".
637 (struct _MFLT): New struct.
638 (list_flt): New function.
639 (load_flt): Don't update flt_list.
640 (get_font_layout_table): Use flt_list.
641 (m17n_init_flt): Don't initialize flt_list.
642 (m17n_fini_flt): Adjusted for the change of flt_list.
643 (mflt_find): New function.
644 (mflt_run): Fix debug printing.
646 2007-08-23 Kenichi Handa <handa@m17n.org>
648 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
649 (run_stages): Print separator in encoded string as "|".
651 2007-08-23 Kenichi Handa <handa@m17n.org>
653 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
654 the glyph is already handled by OTF.
656 2007-08-21 Kenichi Handa <handa@m17n.org>
658 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
660 2007-08-20 Kenichi Handa <handa@m17n.org>
662 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
665 2007-08-17 Kenichi Handa <handa@m17n.org>
667 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
669 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
670 (MFLTFont): Prototype of the member drive_otf adjusted.
672 * m17n-flt.c (run_stages): Fix handling of padding.
674 * font-ft.c (get_glyph_metric): New function.
675 (DEVICE_DELTA): Return 26.6 fixed point value.
676 (adjust_anchor): Likewise.
677 (mfont__ft_drive_otf): Use get_glyph_metric.
679 * font-flt.c (mfont__flt_run): Pay attention to padding on
682 2007-08-16 Kenichi Handa <handa@m17n.org>
684 * m17n-flt.c (run_stages): Fix typo.
686 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
688 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
689 Adjusted for the argument change of adjust_anchor. Calculte based
692 2007-08-15 Kenichi Handa <handa@m17n.org>
694 * charset.c (mcharset__load_from_database): Set mdebug_flag
695 instead of mdebug_mask.
697 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
700 * database.c (load_database): Set mdebug_flag instead of
702 (mdatabase__load_for_keys): Likewise.
704 * draw.c: Include "internal-flt.h".
705 (dump_combining_code): Don't subtract 128 from combining code
708 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
710 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
712 (run_cond): Likewise.
714 (run_command): Likewise.
715 (mfont__flt_run): Change format of debug info.
717 * font-ft.c: Include "internal-flt.h".
718 Set mdebug_flag instead of mdebug_mask.
719 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
721 * input.c: Set mdebug_flag instead of mdebug_mask.
722 (shift_state): New MDEBUG_FLAG macro.
723 (preedit_commit): Likewise.
726 * internal-flt.h: New file.
728 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
729 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
730 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
731 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
732 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
733 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
734 these macros to internal-flt.h.
736 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
738 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
739 (enum MDebugMaskBit): Delete this enum.
740 (enum MDebugFlag): New enum.
741 (mdebug__flag): Don't extern it.
742 (mdebug__flags): Extern it.
743 (MDEBUG_FLAG): New macro.
744 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
745 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
746 (MDEBUG_PRINT_TIME): Likewise.
748 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
749 (xfont_list): Likewise.
751 * m17n-core.c (mdebug__flag): Delete this variable.
752 (mdebug__flags): New variable.
753 (SET_DEBUG_FLAG): Make it a function.
754 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
755 (m17n_fini_core): Likewise.
757 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
758 (m17n_fini_win): Likewise.
760 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
762 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
763 (m17n_fini): Likewise.
765 * symbol.c (msymbol__free_table): Adjusted for the change of
768 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
769 (BASICHEADERS): Add m17n-flt.h.
770 (FLT_SOURCES): New variable.
771 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
772 (libm17n_flt_la_LDFLAGS): Likewise.
774 * m17n-flt.h: New file.
776 * m17n-flt.c: New file created by modifying font-flt.c.
778 2007-07-13 Kenichi Handa <handa@m17n.org>
780 * Version 1.4.0 released.
782 2007-07-12 Kenichi Handa <handa@m17n.org>
784 * input.c: Fix doxygen @ref commands.
786 2007-07-10 Kenichi Handa <handa@m17n.org>
788 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
790 2007-07-09 Kenichi Handa <handa@m17n.org>
792 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
794 * m17n.h: Include m17n-core.h if not yet done. Use macros
795 M17N_BEGIN_HEADER and M17N_END_HEADER.
797 * m17n-gui.h: Likewise.
799 * m17n-misc.h: Likewise.
801 2007-06-13 Kenichi Handa <handa@m17n.org>
803 * font-flt.c (load_command): Prepend "^" in the regular expression.
805 2007-06-11 Kenichi Handa <handa@m17n.org>
807 * language.c (mlanguage_name_list): Fix previous change.
809 * coding.c (mcoding__load_from_database): Add aliases in
810 coding_definition_list.
812 2007-06-10 Kenichi Handa <handa@m17n.org>
814 * language.c (mlanguage_name_list): Fix previous change.
816 2007-06-08 Kenichi Handa <handa@m17n.org>
818 * input.c (update_candidate): Copy candidate_list earlier.
819 (re_init_ic): Provide pseudo initialize state if none.
821 2007-06-05 Kenichi Handa <handa@m17n.org>
823 * input.c (preedit_insert): Print debug information.
825 * database.c (expand_wildcard_database): New function.
826 (mdatabase_list): Fix handling of wildcard database.
828 * language.c (load_lang_name): New function.
829 (mlang__fini): Cancel the last two changes.
830 (mlanguage_name_list): New arg script and territories. Use
833 * m17n.h (mlangauge_name_list): Adjusted.
835 2007-06-04 Kenichi Handa <handa@m17n.org>
837 * input.c (open_im): Check if the input method has at least one
840 2007-06-01 Kenichi Handa <handa@m17n.org>
842 * input.c (shift_state): Change the format of debug print.
843 (preedit_commit): New arg need_prefix. Caller changed.
844 (update_candidate): Copy candidate_list.
845 (take_action_list): Likewise.
846 (handle_key): Change the format of debug print.
848 * font-flt.c (load_flt): Ignore unknown directives.
850 2007-05-25 Kenichi Handa <handa@m17n.org>
852 * m17n-core.c (mdebug__unregister_object): Small optimization.
854 * database.c (find_file): Merged into get_database_file.
855 (get_database_file): New arg result. Caller changed.
856 (mdatabase__check): Fix the logic.
858 2007-05-24 Kenichi Handa <handa@m17n.org>
860 * database.c (find_database): If unprocessed wildcard database is
861 found, register database filed and recursively call find_database.
862 (free_db_info): Unref db_info->properties.
863 (register_database): New arg properties. Delete code for
864 initializing mdatabase__list.
865 (register_databases_in_files): Argument changed. Caller changed.
866 (mdatabase__update): Don't list files by glob here.
867 (mdatabase_list): If unprocessed wildcard database is found,
868 register database filed and recursively call mdatabase_list.
870 * database.h (enum MDatabaseStatus): New enum
871 MDB_STATUS_AUTO_WILDCARD.
873 * input.c (load_branch): Fix previous change.
874 (update_global_info): If the global database is not found, return -1.
876 2007-05-23 Kenichi Handa <handa@m17n.org>
878 * database.c (Mversion): New variable.
879 (mdatabase__init): Initialize it.
880 (register_database): New arg properties. Caller changed.
881 (register_databases_in_files): Don't check version here.
882 (mdatabase__update): Likewise.
884 * database.h (MDatabaseInfo): New member properties.
886 2007-05-21 Kenichi Handa <handa@m17n.org>
888 * language.c: Include <ctype.h>
889 (mlanguage__info): Use strncasecmp (not memcmp).
890 (mlanguage_name): Downcase language name for backward
893 * input.c (filter): Don't check Mlanguage property of
896 2007-05-18 Kenichi Handa <handa@m17n.org>
898 * language.c (mlanguage_name): Fix it to handle M-text English
901 * input.c (config_command): Set NAME before using it.
902 (load_branch): Try to resolve a map name by variables.
904 2007-05-17 Kenichi Handa <handa@m17n.org>
906 * language.c (mlang__fini): Fix previous change.
908 2007-05-16 Kenichi Handa <handa@m17n.org>
910 * plist.c (free_plist): Cancel the last change.
911 (write_element): Check if PLIST is nested.
912 (mplist__from_plist): Label a plist as nested if appropriate.
913 (mplist__from_alist): Label a plist as nested.
914 (mplist__conc): Check the value of PL before referring it. Label
915 a plist as nested if appropriate.
916 (mplist_copy): Label a plist as nested if appropriate.
917 (mplist_put_func): Return Mnil if KEY is a managing key.
918 (mplist_push): Label a plist as nested if appropriate.
920 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
923 * language.c (mlang__fini): Unref each element of langname_list.
925 2007-05-14 Kenichi Handa <handa@m17n.org>
927 * language.c: Include <string.h> and <locale.h>.
928 (langname_list): New variable.
929 (load_lang_script_list): Exclude invalid list elements.
930 (mlang__init): Initialize langname_list.
931 (mlang__fini): Unref langname_list.
932 (mlanguage__info): Adjusted for the change of English
933 name (symbol->M-text).
934 (mlanguage_name): Label it as obsolete.
935 (mlanguage_name_list): New function.
937 * m17n.h (mlanguage_name_list): Extern it.
939 * locale.c (make_locale): Fix setting of members of locale.
941 * plist.c (free_plist): Unref also nested plist.
943 2007-05-11 Kenichi Handa <handa@m17n.org>
945 * coding.c (mconv_reset_converter): Set internal->used to 0.
947 2007-05-08 Kenichi Handa <handa@m17n.org>
949 * input.c (check_description): Force copying the translated text.
951 2007-05-02 Kenichi Handa <handa@m17n.org>
953 * input.c (minput_save_config): Unref unnecessary plist. Use
954 free_im_list to free im_config_list.
956 2007-04-20 Kenichi Handa <handa@m17n.org>
958 * input.c (config_command): Fix previous change again.
959 (config_variable): Likewise.
960 (minput_config_command): Fix for the case of setting back to
962 (minput_config_variable): Likewise.
963 (minput_save_config): Include nil as documentation of customized
966 2007-04-05 Kenichi Handa <handa@m17n.org>
968 * input.c (config_command): Fix previous change.
969 (config_variable): Likewise.
971 * plist.c (mplist_get_func): Fix for backward compatiblity.
973 2007-04-04 Kenichi Handa <handa@m17n.org>
975 * input.c (minput_get_command, minput_config_command): Fix example
978 2007-03-29 Kenichi Handa <handa@m17n.org>
980 These changes are to avoid unsafe casting of a function pointer.
982 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
983 (struct MFace): New member hook.
985 * face.c (serialize_face): Adjusted for the change of MFace.
986 (deserialize_face): Likewise.
987 (mface__init): Likewise. Use msymbol_put_func.
988 (mface__realize): Adjusted for the change of MFace. Avoid
990 (mface_get_prop): Adjusted for the change of MFace.
991 (mface_put_prop): Likewise.
992 (mface_get_hook): New function.
993 (mface_put_hook): New function.
994 (mface_update): Adjusted for the change of MFace.
996 * input-gui.c (win_callback): Use mplsit_get_func.
997 (minput__win_init): Use mplsit_put_func.
999 * input.c (take_action_list): Use mplist_get_func.
1000 (init_ic_info): Likewise.
1001 (fini_ic_info): Likewise.
1002 (minput_callback): Likewise.
1003 (minput__init): Use mplist_put_func.
1005 * language.c (mlang__init): Use msymbol_put_func.
1007 * m17n-core.h (M17NFunc): New function type.
1008 (M17N_FUNC): New macro.
1009 (msymbol_put_func, msymbol_get_func): Extern them.
1010 (mplist_put_func, mplist_get_func): Extern them.
1012 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1014 * m17n-gui.c (mframe): Add a proper casting.
1016 * plist.h (struct MPlist): Make the member val a union.
1017 (MPLIST_VAL): Adjusted for the above change.
1018 (MPLIST_FUNC): New macro.
1019 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1021 * plist.c (mplist_put_func, mplist_get_func): New functions.
1023 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1024 (msymbol_put_func, msymbol_get_func): New functions.
1026 * textprop.c (mtext_serialize): Use msymbol_get_func.
1027 (mtext_deserialize): Likewise.
1029 2007-03-28 Kenichi Handa <handa@m17n.org>
1031 * input.c (get_candidate_list): Avoid unnecessary unref.
1033 2007-03-23 Kenichi Handa <handa@m17n.org>
1035 * database.c (mdatabase__update): Unref plist at the tail.
1037 2007-03-21 Kenichi Handa <handa@m17n.org>
1039 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1041 (config_command): Fix for the case that configuration is
1043 (config_variable): Likewise.
1044 (minput_config_command): If keyseqlist is an empty list, cancel
1046 (minput_config_variable) If value is an empty list, cancel the
1048 (minput_save_config): Handle cancellation of config and customize
1051 2007-03-15 Kenichi Handa <handa@m17n.org>
1053 * input.c (minput_config_variable): Check custom->vars (not
1056 2007-03-01 Kenichi Handa <handa@m17n.org>
1058 * input.c (reload_im_info): Setup cmds, vars, and title of
1060 (check_variable_value): Fix the return value.
1062 * database.c (mdatabase__check): If necessary, update database and
1065 2007-02-28 Kenichi Handa <handa@m17n.org>
1067 * database.c (get_dir_info): Set dir_info->status to
1068 MDB_STATUS_OUTDATED.
1069 (check_version): New function.
1070 (register_database): Don't call find_database.
1071 (register_databases_in_files): Don't register a database of
1073 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1075 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1076 and MDB_STATUS_OUTDATED.
1078 * font.h (struct MFont): Types of members type, source, and
1079 spacing changed to unsigned.
1081 * internal-gui.h (struct): Types of members category and type
1082 changed to unsigned.
1084 * internal.h (struct MText): Types of members format and coverage
1085 changed to unsigned.
1087 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1088 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1090 2007-02-23 Kenichi Handa <handa@m17n.org>
1092 * input.c (Mpop): New variable.
1093 (fully_initialize): Initialize Mpop.
1094 (parse_action_list): Handle Mpop.
1095 (take_action_list): Likewise.
1096 (handle_key): When a key is unhandled, shift to the initial state
1097 only if the current state has no branch action.
1099 2007-02-12 Kenichi Handa <handa@m17n.org>
1101 * input.c (get_preceding_char): Unref mt if necessary.
1102 (get_following_char): Likewise.
1103 (parse_action_list): Fix handling of `insert' action as
1105 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1106 (take_action_list): Check invalid candidate list.
1108 2007-02-06 Kenichi Handa <handa@m17n.org>
1110 * input.c (integer_value): Check also ic->produced for @-N.
1112 2007-01-26 Kenichi Handa <handa@m17n.org>
1114 * database.c (mdatabase__update): Check mdatabase__dir_list from
1117 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1119 2007-01-12 Kenichi Handa <handa@m17n.org>
1121 * input.c (handle_key): Handle a branch action of the initial
1124 2007-01-10 Kenichi Handa <handa@m17n.org>
1126 * m17n-gd.c (gd_render): Delete superfluous line.
1128 2006-12-26 Kenichi Handa <handa@m17n.org>
1130 * m17n.h (minput_callback): Extern it.
1132 * input.h (minput__callback): Delte extern.
1134 * input.c (get_surrounding_text): Adjusted for the change of
1135 minput__callback to minput_callback.
1136 (delete_surrounding_text): Likewise.
1137 (minput_create_ic): Likewise.
1138 (minput_destroy_ic): Likewise.
1139 (minput_filter): Likewise.
1140 (minput_set_spot): Likewise.
1141 (minput_toggle): Likewise.
1142 (minput_reset_ic): Likewise.
1144 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1145 and ic->candidate_to to 0.
1146 (minput_callback): Renamed from minput__callback.
1148 * input-gui.c (win_callback): Adjusted for the change of
1149 minput__callback to minput_callback.
1151 2006-12-15 Kenichi Handa <handa@m17n.org>
1153 * font-ft.c (ft_add_font): Fix typo.
1155 2006-12-06 Kenichi Handa <handa@m17n.org>
1157 * Version 1.3.4 released.
1159 2006-11-16 Kenichi Handa <handa@m17n.org>
1161 * input.c (parse_action_list): Allow (undo 0).
1162 (adjust_markers): New function.
1163 (preedit_insert, preedit_delete): Call adjust_markers.
1164 (preedit_replace): New function.
1165 (update_candidate): Call preedit_replace instead of preedit_insert
1167 (filter): When ic_info->commit_key_head is nonzero, shift input
1168 event keys even if there's no committed text.
1170 2006-11-10 Kenichi Handa <handa@m17n.org>
1172 * input.h (MInputContextInfo): New member commit_key_head.
1174 * input.c (preedit_commit): Update ic_info->commit_key_head.
1175 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1176 (filter): When committed, shift keys by ic_info->commit_key_head.
1178 2006-10-30 Kenichi Handa <handa@m17n.org>
1180 * input.c (preedit_delete): Fix typo.
1181 (take_action_list): Print more debugging information. Allow
1182 variable in arg of 'select' and `pushback'.
1184 * database.c (gen_database_name): Don't put extra space.
1185 (load_database): Print debugging information.
1186 (register_databases_in_files): New arg headlen. Callers changed.
1187 (mdatabase__load_for_keys): Shorten debugging information.
1188 (mdatabase_load): Don't print debugging information here.
1190 2006-10-27 Kenichi Handa <handa@m17n.org>
1192 * input.c (marker_code): New arg surrounding. Callers changed.
1193 (surrounding_pos): Check if name[0] == '@'.
1194 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1195 (take_action_list): Likewise.
1196 (get_preceding_char): If POS is zero, always call
1197 get_surrounding_text.
1199 2006-10-19 Kenichi Handa <handa@m17n.org>
1201 * input.c (load_variables): Fix setting of `global'.
1203 2006-10-16 Kenichi Handa <handa@m17n.org>
1205 * draw.c (draw_background): Be sure to set *to_x.
1206 (render_glyph_string): If from == to, just return.
1208 2006-10-18 Kenichi Handa <handa@m17n.org>
1210 * database.c (get_dir_info): Return NULL if the directory name is
1212 (register_databases_in_files): Call register_database with
1214 (mdatabase__update): Fix logic. Call register_database with
1216 (mdatabase_define): Call register_database with
1217 MDB_STATUS_EXPLICIT.
1219 * input.c (delete_surrounding_text): Be sure to set members
1220 preceding_text and following_text to NULL.
1221 (shift_state): Save variable values in ic_info->vars_saved.
1222 (preedit_commit): Don't print debug information here. Don't
1223 change ic_info->keys here.
1224 (get_candidate_list): Don't ref plist.
1225 (take_action_list): Don't unref return value of
1226 get_candidate_list. For undo, reset ic->produced and recover
1227 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1229 (init_ic_info): Set ic_info->vars_saved.
1230 (fini_ic_info): Unref ic_info->vars_saved.
1231 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1233 (filter): Be sure to set members preceding_text and following_text
1234 to NULL. Print debug information about produced text. Delete
1235 processed keys from ic_info->keys.
1237 * input.h (MInputContextInfo): New member vars_saved.
1239 2006-10-16 Kenichi Handa <handa@m17n.org>
1241 * database.c (mdatabase__update): Fix the way to get db_info.
1243 2006-10-02 Kenichi Handa <handa@m17n.org>
1245 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1246 `size' changed to 24.
1248 * font.c (xlfd_unparse_name): Adjusted for the change of
1250 (font_score): Likewise.
1251 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1253 * m17n-X.c (MFontX, _MFontX): Deleted.
1254 (SET_SIZE, HAVE_SIZE): Deleted.
1255 (free_display_info): Adjusted for the change of
1256 disp_info->font_list format.
1257 (xfont_registry_list): Likewise.
1258 (xfont_open): Likewise.
1259 (xfont_list): Likewise.
1260 (xfont_encode_char): Ignore size to find a realized font.
1261 (MRealizedFontXft): Change the order of members to make it
1262 compatible with MRealizedFontFT.
1264 2006-09-27 Kenichi Handa <handa@m17n.org>
1266 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1267 (mfont_close): Add comments.
1269 * mtext-lbrk.c (mtext_line_break): Add comment.
1271 2006-09-26 Kenichi Handa <handa@m17n.org>
1273 * input.c (minput_get_description): Handle description about
1274 inclusion-only input methods.
1276 2006-09-21 Kenichi Handa <handa@m17n.org>
1278 * input.c (M_gettext): New variable.
1279 (fully_initialize): Initialize M_gettext.
1280 (check_description): New function.
1281 (load_commands): Call check_description.
1282 (config_all_commands): Be sure to unref pl.
1283 (load_variables): Call check_description.
1284 (config_all_variables): Be sure to unref pl.
1285 (load_im_info): Call check_description.
1287 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1289 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1290 and bind_textdomain_codeset.
1292 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1294 2006-09-15 Kenichi Handa <handa@m17n.org>
1296 * input.c (reload_im_info): Update custom and global info.
1297 (init_ic_info): Fix previous change.
1299 2006-09-14 Kenichi Handa <handa@m17n.org>
1301 * database.c: Include <libgen.h>.
1302 (mdatabase__lock): Make a directory if necessary.
1304 * input.c (resolve_command): Adjusted for the format change of
1305 configured_cmds member.
1306 (load_commands, load_variables): Fix for errornous data handling.
1307 (config_command, config_variable): New function.
1308 (config_all_commands, config_all_variables): Renamed from
1309 config_commands and config_variables. Utilize the above function.
1310 (check_variable_value): Argument changed. Callers changed.
1311 (load_im_info): Call config_all_commands and config_all_variables.
1312 (init_ic_info): Adjusted for the format change of configured_vars
1314 (minput__init): Initialize Mcustomized, Mconfigured, and
1316 (Mcustomized, Mconfigured, Minherited): New variables.
1317 (minput_get_command): Be sure to return NULL if an input method
1318 use no local command.
1319 (minput_get_variable): Be sure to return NULL if an input method
1320 use no local variable.
1321 (minput_config_command, minput_config_variable)
1322 (minput_save_config): Adjusted for the format change of
1323 configured_cmds and configured_vars members.
1325 * plist.c (write_element): Delete superfluous ':'.
1327 2006-09-13 Kenichi Handa <handa@m17n.org>
1329 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1330 (minput_config_file): Extern it.
1332 * draw.c (Minherited): Declaration moved to input.c.
1333 (mdraw__init): Don't initialize Minherited here.
1335 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1337 2006-09-07 Kenichi Handa <handa@m17n.org>
1339 * textprop.c (mtext_serialize): Call mplist__serialize with the
1342 * plist.h (mplist__serialize): Prototype adjusted.
1343 (mplist__assq): Extern it.
1345 * plist.c: Include <ctype.h>
1346 (PUTC, PUTS): New macros.
1347 (write_symbol): New function.
1348 (write_element): New arg indent.
1349 (dump_string, dump_plist_element): Delete them.
1350 (mplist__from_string): New arg pretty.
1351 (mplist__assq): New function.
1352 (mdebug_dump_plist): Use write_element.
1354 * mtext.c (mtext_cat_char): Allocate more memory.
1355 (mdebug_dump_mtext): Don't escal a newline character.
1357 * m17n.h (minput_get_command, minput_get_variable)
1358 (minput_config_command, minput_config_variable)
1359 (minput_save_config): Extern them.
1361 * m17n-core.c: Include <string.h>.
1362 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1363 use the stream stdout instead of a file of that name.
1365 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1368 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1369 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1370 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1371 (MDEBUG_DUMP): Flush the stream.
1373 * input.h (struct _MInputMethodInfo): Delete member im. New
1374 members mdb, language, name, extra, cmds, configured_cmds,
1375 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1376 (MInputContextInfo): New member tick.
1378 * input.c: Big change to improve user-side input method
1379 customization. Here, list just public API changes.
1380 (minput_get_commands, minput_get_variables)
1381 (minput_assign_command_keys, minput_set_variable): Label them
1383 (minput_get_command, minput_get_variable)
1384 (minput_config_command, minput_config_variable)
1385 (minput_save_config): New functions.
1387 * database.h (PATH_MAX): Define it if not yet defined.
1388 (PATH_SEPARATOR): Likewise.
1389 (enum MDatabaseStatus): New enum.
1390 (struct MDatabaseInfo): Moved from database.c. New members status,
1391 time, lock_file, and uniq_file.
1392 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1393 (mdatabase__unlock): Extern them.
1395 * database.c: Include <time.h>.
1396 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1397 (GEN_PATH): Args changed. Callers changed.
1398 (struct MDatabaseInfo): Moved to database.h.
1399 (struct MDatabase, mdb_list): Deleted.
1400 (mdatabase__list): New var.
1401 (get_database_filename): Deleted. Callers changed to use
1403 (find_file, get_database_file): New files.
1404 (get_dir_info): Initialize new members of MDatabaseInfo.
1405 (find_database): Arg chagnded. Callers changed.
1406 (free_db_info, register_database, register_databases_in_files):
1408 (update_database_list): Deleted.
1409 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1410 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1411 (mdatabase__update): New function.
1412 (mdatabase__check): Return value changed.
1413 (mdatabase__file, mdatabase__lock, mdatabase__save)
1414 (mdatabase__unlock): New functions.
1416 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1418 * input.c (get_surrounding_text): Return -2 when surrounding text
1420 (get_following_char): Likewise.
1421 (get_preceding_char): Likewise.
1422 (minput__callback): Return 0 if there is a callback function,
1425 2006-08-17 Kenichi Handa <handa@m17n.org>
1427 * input.c (reset_ic): Use shift_state to setup the current state.
1429 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1431 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1432 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1433 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1435 2006-08-02 Kenichi Handa <handa@m17n.org>
1437 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1439 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1441 * font-ft.c (ft_encapsulate): Add code for debugging.
1442 (mfont__ft_drive_otf): Be sure to encode character before getting
1445 2006-07-21 Kenichi Handa <handa@m17n.org>
1447 * draw.c (mdraw_text_extents): Fix previous typo.
1449 2006-07-19 Kenichi Handa <handa@m17n.org>
1451 * draw.c (gstring_width): New arg lbearing.
1452 (render_glyph_string): Adjusted for the change of gstring_width.
1453 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1455 * m17n-core.h (Mlanguage): Extern it.
1457 * m17n.h (Mlanguage): Extern deleted.
1459 * mtext.c (mtext__init): Initialize Mlanguage.
1460 (Mlanguage): Declaration moved from locale.c
1462 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1463 (Mlanguage): Declaration moved to mtext.c.
1465 * language.c (mlang__init): Don't initialize Mlanguage here.
1467 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1469 2006-07-14 Kenichi Handa <handa@m17n.org>
1471 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1472 (MRealizedFontFT): New member face_encapsulated.
1473 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1474 (ft_gen_font): New function.
1475 (ft_add_font): Use ft_gen_font.
1476 (ft_list_script): Store lists in ft_script_list.
1477 (ft_check_otf): New arg ft_face. Caller changed.
1478 (ft_check_language): Likewise.
1479 (ft_check_script): Likewise.
1480 (ft_encapsulate, ft_close): New functions.
1481 (mfont__ft_driver): Initialize members encapsulate and close.
1482 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1484 * font.h (struct MRealizedFont): New member encapsulating.
1485 (struct MFontDriver): New members encapsulate and close.
1487 * font.c (mfont__match_p): If FONT is realized, check capability
1488 by font drivers's check_capability method.
1489 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1492 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1493 declarations of foundry and fam local vars.
1494 (xft_driver): Make it static.
1496 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1497 (mfont_close): Extern them.
1499 * m17n-gd.c (device_open): Don't specify foundry and family of the
1502 2006-07-11 Kenichi Handa <handa@m17n.org>
1504 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1506 2006-07-13 Kenichi Handa <handa@m17n.org>
1508 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1510 (ft_check_script): Delete unused var.
1511 (ft_list_capability): Likewise.
1513 * font.c (mfont__get_capability): Setup cap->otf.
1514 (Motf): Make it global.
1515 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1517 * font.h (MFontCapability): New member otf.
1519 * language.c (mlang__fini): Delete unused vars.
1521 * m17n-gui.h (Motf): Extern it.
1523 * database.c (update_database_list): Delete unused vars.
1525 2006-07-07 Kenichi Handa <handa@m17n.org>
1527 * font-ft.c (DEVICE_DELTA): Fix typo.
1529 2006-07-06 Kenichi Handa <handa@m17n.org>
1531 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1534 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1536 * database.c: Update comments.
1538 2006-07-05 Kenichi Handa <handa@m17n.org>
1540 * database.c (PATH_MAX): Define it if not yet defined.
1541 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1543 (get_database_filename): Use GEN_PATH.
1544 (get_dir_info): Don't include the last '/' in directory name.
1545 (register_database): New function.
1546 (update_database_list): Use register_database. Search all
1547 directories in mdatabase__dir_list for wildcard databases.
1548 (mdatabase__init): Check "~/.m17n.d".
1550 2006-07-03 Kenichi Handa <handa@m17n.org>
1552 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1553 push reverse property.
1555 * plist.c (dump_plist_element): Fix previous change.
1557 2006-06-28 Kenichi Handa <handa@m17n.org>
1559 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1562 * draw.c (MbidiNSM): New variable.
1563 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1564 attention to bidi type NSM.
1565 (mdraw__init): Initialize MbibiNSM.
1567 * language.c (mscript__char_list): Fix finding a char-list element.
1569 * plist.c (dump_string): Return number of printed characters.
1570 (dump_plist_element): Print elements more compactly.
1572 2006-06-23 Kenichi Handa <handa@m17n.org>
1574 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1575 (include_HEADERS): Likewise.
1577 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1579 * language.c: Update documentation.
1581 2006-06-23 Kenichi Handa <handa@m17n.org>
1583 * font-ft.c (struct MFontFT): Delete member lang.
1584 (free_ft_info): Don't unref member lang. Destroy members langset
1586 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1587 changed. Set members langset and charset.
1588 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1590 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1592 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1593 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1594 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1595 characters at first. If it fails, try listing by language names.
1596 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1597 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1598 change of MFontCapability.
1599 (ft_list_capability): Likewise. Try listing by languages, then by
1600 scripts. Check OTF at last.
1601 (ft_check_script): New function.
1602 (ft_select): Adjusted for the check of MFontCapability.
1603 (ft_list_family_names): New function.
1604 (ft_check_capability): If cap->script is not Mnil, call
1606 (mfont__ft_driver): Initialize with ft_list_family_names.
1608 * font.h (struct MFontDriver): New member list_fmaily_names.
1609 (struct): Change member "MSymbol *lang" to "MSymbol language".
1611 * font.c: Include "language.h".
1612 (Motf): New variable.
1613 (otf_script_list, load_otf_script_list): Delete it.
1614 (find_script_from_otf_tag): Delete it.
1615 (merge_capability): New function.
1616 (mfont__init): Init Motf.
1617 (mfont__fini): Don't unref otf_script_list.
1618 (free_font_capability): Check cap->script_tag to determine if
1619 OTF-related capability is set.
1620 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1621 the change of type MFontCapability.
1622 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1623 and Motf properties.
1624 (mfont_list): Call merge_capability for LANGUAGE arg.
1625 (mfont_list_family_names): New function.
1627 * input-gui.c: Typo in comments fixed.
1629 * input.c: Typo in comments fixed.
1631 * language.h (mlanguage__list): Delete it.
1632 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1635 * language.c: Include "mtext.h".
1636 (M_script_lang_list): Delete it.
1637 (language_list, script_list): New variables.
1638 (load_lang_script_list, init_language_list, init_script_list): New
1640 (mlang__init): Don't load language database here.
1641 (mlang__fini): Unref language_list and script_list if not NULL.
1642 (mlanguage__list): Delete it.
1643 (mlanguage__info, mscript__info, mscript__char_list)
1644 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1645 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1646 (mscript_list, mscript_language_list): New functions.
1648 * m17n-gui.h (mfont_list_family_names): Extern it.
1650 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1651 (mlanguage_text, mscript_list, mscript_language_list): Extern
1654 2006-06-21 Kenichi Handa <handa@m17n.org>
1656 * m17n-X.c (xfont_driver): Initialize with
1657 xfont_list_family_names.
1658 (xfont_list_family_names): New function.
1659 (xft_driver): Initialize with NULL for list_family_names member.
1660 (device_init): Set list_family_names member of xft_driver to that
1661 of mfont__ft_driver.
1663 2006-06-06 Kenichi Handa <handa@m17n.org>
1665 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1667 2006-03-24 Kenichi Handa <handa@m17n.org>
1669 * font-ft.c (ft_open): Improve debug message.
1671 * fontset.c (mfontset__get_font): Fix for the case that no font in
1672 per_script list is available.
1674 2006-02-06 Kenichi Handa <handa@m17n.org>
1676 * Version 1.3.3 released.
1678 2006-02-22 Kenichi Handa <handa@m17n.org>
1680 * textprop.c: Fix some typos in documentation.
1682 * plist.c: Fix some typos in documentation.
1684 * m17n-core.h: Fix some typos in documentation.
1685 (M17NLIB_PATCH_LEVEL): Updated to 3.
1686 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1688 * symbol.c: Fix some typos in documentation.
1690 * mtext.c: Fix some typos in documentation.
1692 * input.c: Fix several typos in documentation.
1694 2006-02-06 Kenichi Handa <handa@m17n.org>
1696 * Version 1.3.2 released.
1698 2006-02-03 Kenichi Handa <handa@m17n.org>
1700 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1701 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1703 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1705 * draw.c (layout_glyphs): Fix handling left_padding of
1708 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1710 2006-02-02 Kenichi Handa <handa@m17n.org>
1712 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1713 if WITH_GUI is true.
1715 2006-01-25 Kenichi Handa <handa@m17n.org>
1717 * input.c (resolve_expression): If the value of PLIST is a plist,
1718 but the first element is not symbol, return 0.
1720 2006-01-17 Kenichi Handa <handa@m17n.org>
1722 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1723 HAVE_GD is 2 or the greater.
1725 2006-01-16 Kenichi Handa <handa@m17n.org>
1727 * Version 1.3.1 released.
1729 2006-01-16 Kenichi Handa <handa@m17n.org>
1731 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1732 simulating anti-aliasing.
1734 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1735 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1737 2006-01-12 Kenichi Handa <handa@m17n.org>
1739 * input.c (get_surrounding_text): Always pop ic->plist.
1740 (reset_ic): Don't reset ic->plist.
1742 2006-01-10 Kenichi Handa <handa@m17n.org>
1744 * input.c (preedit_commit): For debugging, print only commiting
1745 charactes. Don't set ic->candidate_show to 0.
1746 (handle_key): Don't run branch-actions just by shifting to the
1748 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1749 Reset vars and plist.
1751 2006-01-07 Kenichi Handa <handa@m17n.org>
1753 * input.c (load_branch): Confirm that maps is not NULL.
1755 2006-01-05 Kenichi Handa <handa@m17n.org>
1757 * input-gui.c (win_filter): Try to convert arg to key only when
1760 * plist.c (read_integer_element): If '#' and '-' are followed by
1761 non-integer-constituent, read them as a part of a symbol.
1762 (read_symbol_element): New arg C.
1763 (read_element): Adjust args to read_symbol_element.
1765 * input.c (load_macros): On overwriting a macro, free the old
1767 (minput__init): Store Mmap in load_im_info_keys.
1768 (minput_get_title_icon): If the input method has no title, be sure
1770 (minput_get_description): If the input method has no description,
1771 be sure to return NULL.
1772 (minput_get_variables): Fix documentation.
1773 (handle_key): Pay attention to the case that key is Mnil.
1774 (filter): Likewise. Fix handling of such symbol as S-A.
1776 2005-12-22 Kenichi Handa <handa@m17n.org>
1778 * Version 1.3.0 released.
1780 2005-12-22 Kenichi Handa <handa@m17n.org>
1782 * font-ft.c (ft_list): If the specified font has no property,
1785 2005-12-20 Kenichi Handa <handa@m17n.org>
1787 * character.c (mchar_get_prop): Check char_prop_list.
1788 (mchar_put_prop, mchar_get_prop_table): Likewise.
1790 2005-12-18 Kenichi Handa <handa@m17n.org>
1792 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1793 file name sans language.
1795 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1797 * input.c: Fix typo in comments.
1799 2005-12-14 Kenichi Handa <handa@m17n.org>
1801 * input.c (minput_get_title_icon): Check the default icon for the
1804 2005-12-13 Kenichi Handa <handa@m17n.org>
1806 * input.c (Mless_equal, Mgreater_equal): New variables.
1807 (parse_expression, resolve_expression, parse_action_list)
1808 (take_action_list): Handle the aboves.
1809 (filter): Treat key S-X as X.
1810 (minput__init): Initialize Mless_equal and Mgreater_equal.
1811 (minput_get_title_icon): New function.
1813 * m17n.h (minput_get_title_icon): Extern it.
1815 * database.c (get_database_filename): Return a filename instead of
1817 (load_database): Adjusted for the above change.
1818 (mdatabase__load_for_keys): Likewise.
1819 (mdatabase__find_file): New function.
1821 * database.h (mdatabase__find_file): Extern it.
1823 * font.h (mfont__resize): Delete extern.
1825 * font.c (mfont__list): Check resize ratio.
1826 (mfont__resize): Delete it.
1827 (mfont_resize_ratio): Include the code of mfont__resize.
1829 * font-ft.c (ft_open): Check resize ratio.
1831 * m17n-X.c (xfont_open): Check resize ratio.
1832 (xft_open): Likewise.
1834 2005-12-07 Kenichi Handa <handa@m17n.org>
1836 * input.c (take_action_list): If take_action_list return -1,
1838 (handle_key): Likewise.
1840 * face.c (mface__for_chars): When font is specified and layouter
1841 is found for it, if the layouter doesn't support one of a
1842 character, use a face sans layouter for it.
1844 2005-12-06 Kenichi Handa <handa@m17n.org>
1846 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1847 found, don't use it for more than one character.
1849 2005-12-05 Kenichi Handa <handa@m17n.org>
1851 * face.c (mface__realize): Set rfont->layouter to Mnil.
1852 (mface__for_chars): Fix handling of layouter.
1854 * character.h (mchar__define_prop): Extern it.
1856 * database.c (update_database_list): Call mchar__define_prop if
1859 * character.c (mchar__init): Don't call mchar_define_property.
1860 Instead just initialize property keys.
1861 (mchar__fini): Free char_prop_list only if it's not NULL.
1862 (mchar__define_prop): New function.
1863 (mchar_define_property): Call mchar__define_prop.
1865 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1868 2005-12-02 Kenichi Handa <handa@m17n.org>
1870 * language.c (mlang__init): Handle extra chars.
1872 * m17n-gui.h (mfont_check): Adjust prototype.
1874 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1875 (xfont_check_capability): New function.
1876 (xft_driver): Specify xft_check_capability.
1877 (xft_check_capability): New function.
1879 * font-ft.c (M0_3): Delete it.
1881 (ft_get_charmaps): Refer to M0.
1882 (fc_parse_pattern): Fix previous change.
1883 (ft_list_language): Check also extra chars.
1884 (ft_check_otf): Define it even if HAVE_OTF is undef.
1885 (ft_check_lang): Check the result of FcLangSetHasLang against
1886 FcLangDifferentLang. Check also extra chars.
1887 (ft_list_capability): Delete ifdef HAVE_OTF.
1888 (ft_select): Likewise.
1889 (ft_open): Improve debug information.
1890 (ft_check_capability): New function.
1891 (mfont__ft_driver): Specify ft_check_capability.
1892 (mfont__ft_init): Initialize M0.
1894 * fontset.c (get_font_from_group): New function.
1895 (mfontset__get_font): New function.
1897 * fontset.h (mfontset__get_font): Extern it.
1899 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1900 (mfont__fini): Delete ifdef HAVE_OTF.
1901 (free_font_capability): Likewise.
1902 (mfont__get_capability): Likewise.
1903 (mfont__check_capability): New function.
1904 (mfont_check): Change the order of arguments. Use
1907 * font.h (struct MFontDriver): New member check_capability.
1908 (MFontCapability): Delete ifdef HAVE_OTF.
1909 (mfont__check_capability): Extern it.
1911 * face.c (mface__realize): Fix handling of FONT arg.
1912 (mface__for_chars): Fix handling of explicitly specified font.
1914 2005-11-25 Kenichi Handa <handa@m17n.org>
1916 * font-flt.c (run_command): Print debug info for
1919 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1921 * face.c (mface__for_chars): Check rfont before accessing the
1924 2005-11-21 Kenichi Handa <handa@m17n.org>
1926 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1929 * fontset.c (fontset_table): New variable.
1930 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1931 (mfont__fontset_init): Add fontset_table as an object array.
1932 (mfont__realize_fontset): Ref FONTSET.
1933 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1934 (mfontset): Call M17N_OBJECT_REGISTER.
1935 (mfontset_copy): Likewise.
1937 * input.c (handle_key): For debugging, print information about
1939 (filter): Add an alias for Meta and Alt modifiers.
1940 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1942 (minput__init): Initialize them.
1943 (parse_expression): New function.
1944 (resolve_expression): New function.
1945 (parse_action_list): Handle expressions by parse_expression.
1946 (take_action_list): Handle expressions by resolve_expression.
1947 (parse_nested_list_value): Fix previous change.
1948 (resolve_command): Fix handling of the return value of
1951 2005-11-18 Kenichi Handa <handa@m17n.org>
1953 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1954 HAVE_OTF is defined.
1955 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1957 (ft_select): Likewise.
1959 * font.c (mfont_list): Fix for the case that FONT is NULL.
1960 (OTF_tag): Delete it.
1961 (load_otf_script_list): Define only when HAVE_OTF is defined.
1962 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1965 * draw.c (truncate_gstring): Be sure to truncate at
1966 glapheme-cluster boundary.
1968 2005-11-11 Kenichi Handa <handa@m17n.org>
1970 * input.c (delete_surrounding_text): Clear cache if necessary.
1972 2005-11-09 Kenichi Handa <handa@m17n.org>
1974 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1975 glyph prev is also supported by the current flt.
1977 2005-11-08 Kenichi Handa <handa@m17n.org>
1979 * m17n-X.c (xft_render): Cancel previous change.
1981 2005-11-07 Kenichi Handa <handa@m17n.org>
1983 * input.c: Include <stdlib.h>.
1984 (get_surrounding_text, delete_surrounding_text)
1985 (get_preceding_char, get_following_char): New functions.
1986 (integer_value): New arg surrounding. If it is nonzero, try to
1987 get a surrounding character. Callers changed.
1988 (take_action_list): Check `value' before setting an element.
1989 (destroy_ic): Unref ic_info->preceding_text and
1990 ic_info->following_text.
1991 (minput__init): Initialize Minput_get_surrounding_text and
1992 Minput_delete_surrounding_text.
1993 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1995 (filter): Unref ic_info->preceding_text and
1996 ic_info->following_text.
1998 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2001 * input.h (MInputContextInfo): New members preceding_text and
2004 2005-11-04 Kenichi Handa <handa@m17n.org>
2006 * input.c (parse_nested_list_value): Fix handling of the global
2008 (get_nested_list): Get global definitions by load_partial_im_info.
2009 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2010 MInputCandidatesChanged.
2011 (take_action_list): Likewise.
2012 (reset_ic): Likewise.
2013 (create_ic): Don't pay special attention to
2014 Mcandidates_group_size.
2015 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2016 (minput_set_variable): Get a definition of varible by
2017 mplist_find_by_value, not mplist_get.
2019 * m17n.h (enum MInputCandidatesChanged): New enum.
2021 2005-11-01 Kenichi Handa <handa@m17n.org>
2023 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2025 (mwin__destroy_window): If xft_draw's drawable is win, change it
2026 to device->drawable before destroying win.
2028 2005-10-31 Kenichi Handa <handa@m17n.org>
2030 * input.c (load_im_info): Fix adding of state.
2032 * m17n-core.c (m17n_fini_core): Fix reporting of module
2035 * m17n.c (m17n_fini): Fix reporting of module finalization.
2037 * m17n-gui.c (m17n_init_win): Fix reporting of module
2040 2005-10-29 Kenichi Handa <handa@m17n.org>
2042 * input.c (get_candidate_list): Fix the timing of referring plist.
2044 2005-10-28 Kenichi Handa <handa@m17n.org>
2046 * input.c (load_branch): Ignore an undefined map name.
2047 (load_im_info): Set im_info->title from `name' only if it's not
2049 (shift_state): Always update ic->status.
2050 (adjust_candidates): Renamed from adjust_candidate_command.
2051 Argument changed. Caller changed.
2052 (get_candidate_list, regularize_action): New functions.
2053 (take_action_list): Use them. On handling Munhandle, don't set
2055 (handle_key): If KEY is not handled by MAP, and MAP has
2056 branch_actions, perform them.
2058 * database.c (mdatabase__fini): Free dir_info->filename;
2060 2005-10-20 Kenichi Handa <handa@m17n.org>
2062 * input.c (marker_code): Accept '@@'.
2063 (integer_value): Handle '@@'.
2064 (parse_action_list): Accept a symbol argument.
2065 (take_action_list): Resolve the symbol argument. Handle the
2068 2005-10-18 Kenichi Handa <handa@m17n.org>
2070 * input.c: Include "charset.h".
2071 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2073 (MIMState): New member (M17NObject control).
2074 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2075 (get_nested_list, resolve_variable): New functions.
2076 (integer_value): New arg (MPlist **value). Set it to the plist
2077 element containing the value.
2078 (resolve_command): New function.
2079 (load_translation): New arg (MPlist *map_actions).
2080 (load_branch): New args language and name. If `keylist' is a
2081 symbol, resolved that as a command name.
2082 (free_map): New arg top. Free map->map_actions only if top is
2084 (free_state): New function.
2085 (load_state): New arg name.
2086 (im_info_list): New variable.
2087 (free_im_info, get_im_info_by_tags): New functions.
2088 (load_im_info): Arg key changed to plist. Handle `include'.
2089 Return (MInputMethodInfo *).
2090 (preedit_commit): Ref ic->candidate_list.
2091 (get_select_charset, adjust_candidate_command): New functions.
2092 (take_action_list): Handle `include'. Adjust candidate action
2093 properly. Handle control variables `candidates-charset' and
2094 `candidates-group-size'.
2095 (open_im): Use get_im_info.
2096 (create_ic): Get global variables.
2097 (load_partial_im_info): New function.
2098 (get_im_info): New function.
2099 (check_command_keyseq, check_command_list, check_variable_list):
2101 (minput__init): Don't handle M_database_hook and Mdetail_text.
2102 Initialize M_candidates, Mcandidates_group_size,
2103 Mcandidates_charset.
2104 (parse_variable_list, get_variable_list, parse_command_list)
2105 (get_command_list): Delete them.
2106 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2107 (minput__fini): Simply unref command_list and variable_list.
2108 (minput_get_description): Adjusted for the new form of description.
2109 (minput_get_commands): Use get_nested_list.
2110 (minput_assign_command_keys): Likewise.
2111 (minput_get_variables, minput_set_variable): Likewise.
2113 * input.h (MInputMethodInfo): New members im and maps.
2115 * database.h (M_database_hook): Delete extern.
2116 (MDatabaseHookFunc): Delete extern.
2117 (mdatabase__check): Extern it.
2119 * database.c: Include <glob.h>.
2120 (MAX_TIME): New macro.
2121 (Masterisk): New variable.
2122 (get_database_stream): Argument changed to (MDatabaseInfo *).
2124 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2125 (find_database): New function.
2126 (update_database_list): New function.
2127 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2128 calling update_database_list.
2129 (mdatabase__check): New function.
2130 (mdatabase_find): Use update_database and find_database. Don't
2131 handle MDatabaseHookFunc.
2132 (mdatabase_list): Call update_database at first.
2133 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2134 (MDatabaseList): New type.
2136 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2138 * m17n.h (Mdetail_text): Delete extern.
2140 * m17n-core.h (mplist_conc): Delete extern.
2142 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2144 (mplist_conc): Renamed to mplist__conc.
2145 (mplist__pop_unref): New function.
2147 2005-10-14 Kenichi Handa <handa@m17n.org>
2149 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2151 (read_element): If keys is an empty plist, return any element
2153 (dump_plist_element): Check if plist is nested.
2154 (mplist_conc): Always ref tail.
2155 (mplist_set): If key is a managing key, ref val in advance.
2157 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2158 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2159 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2162 * fontset.c (free_fontset): Unref fontset_list if necessary.
2163 (mfont__fontset_fini): Don't free fontset_list. Unref
2165 (mfont__realize_fontset): Initialize request.
2166 (mfontset): Ref default_fontset or fontset only if necessary.
2167 (mfontset_copy): Don't ref copy.
2169 * draw.c (render_glyphs): Check gend->type before checking
2172 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2173 unrefed plists to NULL.
2175 2005-10-04 Kenichi Handa <handa@m17n.org>
2177 * textprop.c (mtext_serialize): Be sure to make mt
2178 MTEXT_FORMAT_UTF_8 and NULL terminated.
2180 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2182 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2184 2005-10-03 Kenichi Handa <handa@m17n.org>
2186 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2187 is not at the beginning of line.
2189 2005-09-22 Kenichi Handa <handa@m17n.org>
2191 * input.c: Include <sys/stat.h> and <unistd.h>.
2192 (Minclude, Mcommit, Munhandle): New variables.
2193 (minput__init): Initialize them. Push only Mstate to
2194 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2195 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2197 (load_input_method): Handle "include" directive. If no states are
2199 (shift_state): If state_name is Mt, shift back to the previous
2200 state. Call preedit_commit to commit preedit text.
2201 (preedit_commit): New function.
2202 (take_action_list): Improve debug printing. Handle commit and
2204 (handle_key): Check the return value of take_action_list. Don't
2205 take branch_actions just after changing to the root map.
2206 (reset_ic): Reset all ic_info members.
2207 (filter): When a key is not handled, just move ic_info->keys
2208 instead fo calling reset_ic.
2209 (load_im_info): If key is not Mstate, push Mmap to
2211 (MDatabaseStatList): New type.
2212 (imdir_stat_list): New variable.
2213 (input_method_hook): Don't cancel the hook. Check the
2214 modification time of directories.
2215 (minput__fini): Free imdir_stat_list;
2217 * input.h (MInputContextInfo): New member prev_state.
2219 * m17n-core.h (mplist_conc): Extern it.
2221 * plist.c (mplist_conc): New function.
2223 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2225 * font.h (MRealizedFont): New member average_width.
2227 * font-ft.c (ft_open): Set rface->average_width.
2229 * font.c (xlfd_unparse_name): Print '*' before registry name.
2231 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2232 (xfont_open): Set rfont->average_width.
2233 (xft_open): Likewise.
2234 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2236 * internal-gui.h (struct MFrame): New member average_width.
2238 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2239 (mframe_get_prop): Return the average_width of a font.
2241 * face.c (mface__realize): Set rface->average_width.
2242 (mface__update_frame_face): Set frame->average_width.
2244 * face.h (MRealizedFace): New member average_width.
2246 2005-09-19 Kenichi Handa <handa@m17n.org>
2248 * font.c (xlfd_unparse_name): New arg full_xlfd.
2249 (mfont__encode_char): Use shortcut only for X core fonts.
2250 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2251 (mfont_put_prop): Handle `language' property.
2252 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2253 Print file can capability info too.
2255 * m17n-core.c (mdebug__output): New variable.
2256 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2257 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2258 (m17n_fini_core): Close mdebug__output if it's not stderr.
2260 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2261 (xfont_open): Handle baseline_offset.
2262 (xfont_find_metric): Likewise.
2263 (xfont_render): Likewise.
2264 (xft_open): Likewise.
2265 (xft_render): Likewise.
2267 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2268 (mdebug__output): Extern it.
2269 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2270 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2271 (MDEBUG_DUMP): New macro.
2272 (MDEBUG_PRINT_TIME): Print to medebug__output.
2274 * font.h (MRealizedFont): New member baseline_offset.
2276 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2278 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2279 (ft_list_family): Check alias.
2280 (ft_list_language): If language is "en", don't try to the second
2282 (ft_default_list): New variable.
2283 (ft_list_default): New function.
2284 (ft_select): If family is not specified, try only the default
2285 fonts. Treat the weights normal and medium same.
2286 (ft_open): Fix debug message. If registry is not specified, try
2287 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2288 (ft_find_metric): Likewise.
2289 (ft_render): Likewise.
2290 (ft_list): Fix debug message. Accept the registring iso8859-1.
2291 If family is not specified, try only the default fonts.
2293 * face.c (mface__realize): Fix logic of opening a font.
2295 2005-09-16 Kenichi Handa <handa@m17n.org>
2297 * face.c (mface__realize):
2299 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2302 * input.c (shift_state): Fix the condition of taking init actions.
2303 (take_action_list): Fix handling of pushback action.
2304 (handle_key): Don't change key while checking its alias.
2305 (minput__init): Initialize new variables.
2306 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2309 2005-09-12 Kenichi Handa <handa@m17n.org>
2311 * mtext.c (mtext__uppercase): Add proper open/close parens.
2312 (mtext_titlecase): Add proper casting.
2314 * input.c (parse_action_list): Handle the case that the arg is a
2315 key sequence (MText or MPlist).
2316 (take_action_list): Likewise.
2317 (shift_state): Shorter debug message.
2318 (handle_key): Terminate a debug message by "\n".
2319 (reset_ic): Don't take initial actions here.
2320 (minput_open_im): Print a debug message.
2321 (minput_close_im): Likewise.
2322 (minput_create_ic): Likewise.
2323 (minput_destroy_ic): Likewise.
2325 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2327 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2330 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2331 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2334 * character.c: Add Japanese documentation for
2335 mchar_get_prop_table ().
2337 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2339 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2340 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2341 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2343 (init_case_conversion): New function.
2344 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2345 (uppercase_precheck, lowercase_precheck, final_sigma)
2346 (after_soft_dotted, more_above, before_dot, after_i)
2347 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2349 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2351 * plist.c (read_mtext_element): Fix previous change.
2353 2005-09-05 Kenichi Handa <handa@m17n.org>
2355 * plist.c (read_mtext_element): Handle \uXXXX notation.
2357 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2358 (MTABLE_ALLOCA): Change the name of local variable.
2360 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2361 HAVE_FREETYPE are defined.
2363 * m17n-X.c: Check HAVE_X11.
2365 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2366 directory listing libraries.
2367 (noinst_PROGRAMS): Define it only in maintainer mode.
2369 2005-09-02 Kenichi Handa <handa@m17n.org>
2371 * m17n-gui.h (mdraw_line_break_option): Extern it.
2373 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2374 end of the first glyph.
2375 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2377 (mdraw_line_break_option): New variable.
2378 (mdraw_default_line_break): Use mtext_line_break.
2380 * mtext.h (wordseg_func_table): Don't extern it.
2381 (mtext__wseg_fini): Extern it.
2383 * mtext.c: Don't include word-thai.h.
2384 (wordseg_func_table): Delete this variable.
2385 (mtext__init): Don't initialize above. Don't call
2386 mtext__word_thai_init.
2387 (mtext__fini): Don't free wordseg_func_table. Call
2388 mtext__wseg_fini instead fo mtext__word_thai_fini.
2389 (MTextWordsegFunc): Don't typedef it.
2390 (mtext__word_segment): Moved to mtext-wseg.c.
2392 * m17n-core.h (enum MTextLineBreakOption): New enum.
2393 (mtext_line_break): Extern it.
2395 * mtext-wseg.c: New file.
2397 * mtext-lbrk.c: New file.
2399 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2400 add mtext-lbrk.c and mtext-wseg.c.
2402 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2403 the case that head is NULL.
2405 2005-09-01 Kenichi Handa <handa@m17n.org>
2407 * word-thai.c (wordseg_propertize): If the property value is nil,
2408 don't make the property no-merge.
2409 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2410 attention to the case that they are NULL.
2411 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2414 * character.c (mchar_get_prop_table): New function.
2416 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2418 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2419 (mchar_get_prop_table): Extern it.
2421 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2422 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2424 * internal.h (enum MTextCoverage): New enum.
2425 (MText): New member coverage.
2427 * mtext.c (FORMAT_COVERAGE): New macro.
2428 (insert): Copy mt2->coverage.
2429 (mtext__from_data): Initialize mt->coverage.
2430 (mtext__adjust_format): Update mt->coverage.
2431 (mtext): Initialize mt->coverage.
2432 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2433 Update mt->coverage if necessary.
2434 (mtext_duplicate): Copy mt->coverage.
2435 (mtext_insert, mtext_replace): New functions.
2436 (mtext_dup): Use mtext_duplicate.
2437 (mtext__word_segment): Don't set *from and *to if a word
2438 segmentation funcion is not found.
2439 (mtext_ins_char): Fix typo.
2441 2005-08-25 Kenichi Handa <handa@m17n.org>
2443 * font.h (MFont): New member for_full_width.
2445 * font.c (compare_font_score): Prefer a font of not
2448 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2449 registry charset of a font is one of CJK charsets.
2451 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2452 supports some of CJK.
2454 2005-08-24 Kenichi Handa <handa@m17n.org>
2456 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2458 * m17n-gui.c (null_device_open): Check Mresolution param and set
2461 * m17n-gd.c (device_open): Check Mresolution param and set
2464 * m17n-X.c (MWDevice): New member resy.
2465 (xfont_open): Set ascent, descent, and max_advance members of
2467 (xft_open): Likewise.
2468 (device_open): Compare also screen_num to find a device. Set
2469 device->resy and frame->dpi.
2471 * internal-gui.h (MFrame): New member dpi.
2473 * font.h (MRealizedFont): New member max_advance.
2475 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2476 (mfont__init): Don't initialize Mascent, Mdescent.
2477 (Mascent, Mdescent): Delete these variables.
2478 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2479 Mfont_descent instead of Mascent and Mdescent.
2480 (mfont_put_prop): Allow negative size.
2481 (mfont_find): Handle the case of spec->size < 0. Fix previous
2483 (mfont_list): Handle the case of spec->size < 0.
2484 (mfont_check): Likewise.
2486 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2487 (fc_get_pattern): Handle the case of font->size < 0.
2488 (ft_open): Set ascent, descent, and max_advance members of rfont.
2489 (ft_find_metric): Improve rounding.
2490 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2493 * face.c (mface__realize): Handle the case of font->size < 0.
2495 2005-08-22 Kenichi Handa <handa@m17n.org>
2497 * coding.c (MConverterStatus): Change the member buf to union.
2498 (mconv_buffer_converter): Add const to the arg buf.
2499 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2500 (mconv_decode): Adjusted for the change of MConverterStatus.
2501 (mconv_encode_range): Likewise.
2503 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2504 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2506 2005-08-20 Kenichi Handa <handa@m17n.org>
2508 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2509 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2511 * m17n-X.c (xfont_open): Set members ascent, descent, and
2512 max_advance of rfont.
2513 (xft_open): Likewise.
2515 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2517 (mfont__ft_parse_name): Add const to the arg name.
2519 * font.c (xlfd_parse_name): Add const to the arg name. Call
2520 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2521 (xlfd_unparse_name): Handle spacing.
2522 (mfont__init): Initialize new variables.
2523 (mfont__id): Handle spacing.
2524 (mfont__merge): Likewise.
2525 (mfont__set_spec): This function deleted.
2526 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2527 condition of calling mfont__ft_parse_name.
2528 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2529 (mfont_get_prop): Handle properties spacing, ascent, descent,
2531 (mfont_find): Return a realized font.
2532 (mfont_from_name): Add const to the arg name.
2534 * font.h (enum MFontProperty): New member MFONT_SPACING.
2535 (enum MFontSpacing): New enum.
2536 (MFont): New members spacing and max_advance.
2537 (mfont__ft_parse_name): Prototype adjusted.
2538 (mfont__set_spec): Extern deleted.
2539 (mfont__parse_name_into_font): Prototype adjusted.
2541 2005-08-19 Kenichi Handa <handa@m17n.org>
2543 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2545 * font.c (mfont_list): If FONT is null, use a temporary font.
2546 (mfont_parse_name): Add const to the arg name.
2548 2005-08-18 Kenichi Handa <handa@m17n.org>
2550 * word-thai.c: Surround code by #ifdef and #endif to escape from
2553 * font-ft.c: Mostly re-written.
2555 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2556 (FontLayoutCmd): Type of the member otf changed..
2557 (load_otf_command): Adjusted for the format change of otf command.
2558 (load_command): Likewise.
2559 (free_flt_command): Unref cmd->body.otf.
2560 (run_otf): Ajusted for the type change of otf_cmd.
2561 (run_command): Ajusted for the type change of otf_cmd. On
2562 debugging, print ctx->combining_code.
2563 (mfont__flt_run): Initialize ctx's members code_offset,
2564 combining_code, and left_padding to 0.
2566 * face.h (struct MRealizedFace): New member font.
2567 (mface__realize): Prototype adjusted.
2569 * face.c (find_realized_face): New arg font.
2570 (find_realized_face): Adjusted for the change of MFont.
2571 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2572 (mface__fini): Don't call mdebug__report_object.
2573 (mface__realize): New arg font.
2574 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2575 Optimize the latin case.
2576 (mface__free_realized): Free rface->font.
2577 (mface__update_frame_face): Adjusted for the change of mface__realize.
2578 (mface_equal): New function.
2580 * draw.c (Mcommon): New variable.
2581 (visual_order): Args to mfont__encode_char changed.
2582 (compose_glyph_string): Handle Mfont text property.
2583 (layout_glyphs): Adjusted for the change of MFont.
2584 (mdraw__init): Initialize Mcommon.
2585 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2587 * font.h (enum MFontType): Members completely changed.
2588 (enum MFontProperty): Move MFONT_SIZE to the tail.
2589 (enum MFontSource): New enum.
2590 (struct MFont): New members type, source, sizes, file, capability,
2592 (struct MRealizedFont): Type of member font changed. Members
2593 score, status, and encoding deleted.
2594 (MFontScore): New type.
2595 (MFontList): Member changed.
2596 (struct MFontDriver): New member has_char. Types of members
2598 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2599 (Mapple_roman): Extern them.
2600 (OTF_Tag): Typedefed if not HAVE_OTF.
2601 (enum MFontOpenTypeTable): New enum.
2602 (MFontCapability): New type.
2603 (mfont__ft_drive_otf): Prototype adjusted.
2604 (mfont__score): Extern deleted.
2605 (mfont__merge): Extern it.
2606 (mfont__has_char): Extern it.
2607 (mfont__encode_char): Prototype adjusted.
2608 (mfont__open): Extern it.
2609 (mfont__set_spec): Prototype adjusted.
2610 (mfont__get_capability): Extern it.
2612 * font.c: Include "fontset.h".
2613 (M_font_capability, M_font_list, M_font_list_len): New variables.
2614 (font_score_priority): Change order of initial elements.
2615 (font_score_shift_bits): Fix array size.
2616 (common_weight): Add "thin", "semibold", and "heavy".
2617 (common_stretch): Add "ultracondensed", "extracondensed",
2618 "extraexpanded", and "utltraexpand".
2619 (font_weight_regular, font_weight_normal, font_weight_medium): New
2621 (gen_font_name): This function deleted.
2622 (find_encoding): Set font->encoding.
2623 (OTF_tag): New function.
2624 (otf_script_list): New variable.
2625 (load_otf_script_list): New function.
2626 (find_script_from_otf_tag): New function.
2627 (xlfd_parse_name): Set font->type and font->source.
2628 (mfont__free_realized): Free chains rfonts.
2629 (font_score): Renamed from mfont__score.
2630 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2631 (Mapple_roman): New variables.
2632 (mfont__init): Initilize new variables. Initalize
2633 default_encoding.encoding_name and
2634 default_encoding.encoding_charset to Municode_full and
2635 mcharset__unicode. Use SAFE* macros for allocating filepath
2637 (mfont__fini): Free otf_script_list.
2638 (mfont__id): New function.
2639 (mfont__match_p): Check also capability member of MFont.
2640 (mfont__merge): New funciton.
2641 (mfont__set_spec_from_face): Set type and source members.
2642 (mfont__set_spec_from_plist): Set capability and type members.
2643 (mfont__select): Argument changed.
2644 (mfont__available): New function.
2645 (compare_font_score): New function.
2646 (mfont__list): New function.
2647 (mfont__open): Return a realized font.
2648 (mfont__resize): Adjusted for the change of MFont.
2649 (mfont__has_char): New function.
2650 (mfont__encode_char): Argument changed.
2651 (mfont__set_spec): Argument changed.
2652 (free_font_capability): New function.
2653 (mfont__get_capability): New function.
2654 (MFontfile): New variable.
2655 (mfont_get_prop): Adjusted for the change of MFont.
2656 (mfont_put_prop): Likewise.
2657 (mfont_set_selection_priority): Fix the way of setting
2658 font_score_priority[].
2659 (mfont_find): Use mfont__list instead of mfont__select.
2660 (mfont_resize_ratio): Adjusted for the change of MFont.
2661 (mfont_list): Use mfont__list.
2662 (mfont_check): New function.
2663 (font_score): Make it static.
2665 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2666 (mfont__lookup_fontset): Likewise.
2668 * fontset.c (struct MFontset): Delete member font_spec_list.
2669 (struct MRealizedFontset): Type of member spec changed. New
2671 (load_font_group): Arg spec_list deleted.
2672 (load_fontset_contents): Adjusted for the change of fontset_def.
2673 (free_fontset): Fix the way of freeing fontset elements.
2674 (realize_fontset_elements): Argument changed.
2675 (get_per_script): New function.
2676 (free_realized_fontset_elements): Fix the way of feeing rfontset
2678 (update_fontset_elements): Fix args to realize_fontset_elements.
2679 (mfont__realize_fontset): New arg spec.
2680 (try_font_list): New function.
2681 (try_font_group): New arg request. Use try_font_list.
2682 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2684 (mfontset): Adjusted for the change of MFontset.
2685 (mfontset_copy): Likewise. Don't share plists.
2686 (mfontset_modify_entry): Adjusted for the change of MFontset.
2687 (mfontset_lookup): Call get_per_script.
2688 (mdebug_dump_fontset): Print also the address of fonts.
2690 * input.c (shift_state): Don't reset ic_info->vars.
2691 (take_action_list): Call MDEBUG_PRINT fore calling
2694 * internal-gui.h (MFontDriver): Don't typedef it here.
2696 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2697 (MXFont): This type deleted.
2699 (struct _MFontX): New struct.
2700 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2701 (MDisplayInfo): Member base_font_list deleted.
2702 (DEFAULT_FONT): Definition changed.
2703 (FALLBACK_FONT): This maclr deleted.
2704 (free_display_info): Adjusted for the change of MDisplayInfo.
2705 (free_device): Argument to mfont__free_realized changed.
2706 (xfont_driver): Adjusted for the change of MFontDriver.
2707 (xfont_registry_list): Use MFontX instead of MXFont.
2708 (MRealizedFontX): Renamed from MXFontInfo.
2709 (xfont_select): Return the font found first.
2710 (close_xfont): Change MXFontInfo to MRealizedFontX.
2711 (xfont_open): Return the realized font.
2712 (xfont_find_metric): Get xfont from rfont->fontp.
2713 (xfont_has_char): New function.
2714 (xfont_encode_char): Adjusted for the argument change.
2715 (xfont_render): Get xfont from rfont->fontp.
2716 (xfont_list): Adjusted for the argument change.
2717 (MRealizedFontXft): Renamed from MXftFontInfo.
2718 (xft_driver): Ajusted for the change of MFontDriver.
2719 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2720 (xft_open_font): Argument changed.
2721 (xft_open): Argument changed. Return the realized font.
2722 (xft_find_metric): Get xft_font from rfont->fontp.
2723 (xft_has_char, xft_encode_char): New functions.
2724 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2725 font if not yet opened.
2726 (device_open): Don't set frame->font.
2728 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2730 (gd_font_open): New function.
2731 (gd_render): Don't use the local variable ft_info.
2732 (device_init): Adjusted for the change of gd_font_driver.
2734 * textprop.c (mtext__prop_init): Initialize text_property_table.
2735 Call M17N_OBJECT_ADD_ARRAY.
2736 (mtext__prop_fini): Don't call mdebug__report_object.
2738 * plist.c (mplist__init): Initialize plist_table.
2739 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2740 (mplist__fini): Don't call mdebug__report_object.
2742 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2743 (mtext__fini): Don't call mdebug__report_object.
2744 (MTEXT_FORMAT_UTF_16): Correct type.
2745 (mtext_data): New function.
2746 (mtext_text): Fix calculation of limit and args to
2749 * language.c: Include "plist.h".
2750 (M_script_lang_list): New variable.
2751 (mlang__init): Read languages and their information from m17n
2753 (mlanguage__list): New function.
2754 (Miso639_1, Miso639_2): New variables.
2756 * language.h (mlanguage__list): Extern it.
2758 * database.c (get_database_stream): Use SAFE_* macros for
2759 allocating and freeing path.
2760 (mdatabase__init): Likewise.
2762 * symbol.c (msymbol__fini): Don't free symbols here.
2763 (msymbol__free_table): New function.
2764 (msymbol_is_managing_key): New function.
2766 * symbol.h (msymbol__free_table): Extern it.
2767 (msymbol__list): Extern it.
2769 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2771 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2772 (struct _M17NObjectArray): New member name and next.
2773 (mdebug__add_object_array): Extern it.
2774 (M17N_OBJECT_ADD_ARRAY): New macro.
2775 (mdebug__report_object): Don't extern it.
2777 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2779 * m17n-gui.c (free_frame): Don't free frame->font.
2780 (null_device_fini): Fix code for freeing
2781 null_device.realized_font_list.
2782 (m17n_fini_win): Free interface.
2783 (mframe): Cast the return value of dlsym. Set frame->font here.
2784 (mframe_get_prop): Check frame->rface->rfont before accessing the
2787 * m17n-gui.h (Mfontfile): Extern it.
2788 (mfont_check): Extern it.
2789 (mface_equal): Extern it.
2791 * m17n-core.c: Include "symbol.h".
2792 (report_header_printed): This variable deleted.
2793 (object_array_root): New variable.
2794 (report_object_array): New function.
2795 (mdebug__report_object): This function deleted.
2796 (mdebug__add_object_array): New function.
2797 (m17n_init_core): Call mchartable_init () before mtext_init ().
2798 (m17n_fini_core): Call report_object_array (if necessary) and
2799 msymbol__free_atable at the end.
2801 * m17n-core.h (msymbol_is_managing_key): Extern it.
2802 (mtext_data): Extern it.
2803 (MTEXT_FORMAT_UTF_16): Correct type.
2804 (M17NLIB_MINOR_VERSION): Changed to 3.
2805 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2807 * chartab.c (mchartable__init): Initalize chartable_table.count.
2808 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2809 mdebug__report_object.
2811 2005-05-26 Kenichi Handa <handa@m17n.org>
2813 * m17n.h (Miso639_1, Miso639_2): Extern them.
2815 * symbol.h (msymbol__list): Extern it.
2817 * symbol.c (msymbol__list): New function.
2819 2005-05-19 Kenichi Handa <handa@m17n.org>
2821 * input-gui.c (minput__win_init): Don't change the value of
2824 2005-05-16 Kenichi Handa <handa@m17n.org>
2826 * m17n-core.c (m17n_object): Be sure to initialize all members.
2828 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2830 2005-05-09 Kenichi Handa <handa@m17n.org>
2832 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2834 2005-04-27 Kenichi Handa <handa@m17n.org>
2836 * language.c (mlang__init): Add "an" (Aragonese).
2838 * word-thai.c: Add support for libthai.
2839 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2840 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2842 * mtext.c: Include "word-thai.h" conditionaly.
2843 (mtext__init): Call mtext__word_thai_init conditionaly.
2844 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2846 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2847 not WORDCUT_LD_FLAGS.
2849 2005-04-19 Kenichi Handa <handa@m17n.org>
2851 * word-thai.c (wordseg_propertize): Always unref the attached
2853 (thai_wordseg): Don't unref the property.
2855 2005-04-18 Kenichi Handa <handa@m17n.org>
2857 * word-thai.c: Include stdlib.h.
2858 (wordseg_propertize): Add dummy function for the case that wordcut
2859 library doesn't exist.
2860 (wordseg_propertize): Fix for old wordcut library.
2862 2005-04-16 Kenichi Handa <handa@m17n.org>
2864 * word-thai.c: Include <stdio.h>.
2866 2005-04-15 Kenichi Handa <handa@m17n.org>
2868 * draw.c: Include mtext.h.
2869 (linebreak_table, M_break_at_space, M_break_at_word)
2870 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2871 (compose_glyph_string): Check POS before getting Mface text
2873 (truncate_gstring): Give correct TO arg to line_break function.
2874 (GET_LB_TYPE): New macro.
2875 (find_break_backward, find_break_forward): New functions.
2876 (mdraw__init): Initialize the above new variables.
2877 (mdraw__fini): Free linebreak_table.
2878 (mdraw_default_line_break): Use find_break_backward and
2881 * word-thai.c: New file.
2883 * word-thai.h: New file.
2885 * mtext.c: Include word-thai.h.
2886 (wordseg_func_table): New variable.
2887 (mtext__init): Initialize wordseg_func_table and call
2888 mtext__word_thai_init.
2889 (mtext__fini): Call mtext__word_thai_fini, free
2891 (MTextWordsegFunc): New type.
2892 (mtext__word_segment): New function.
2894 * mtext.h (wordseg_func_table): Extern it.
2895 (mtext__word_segment): Extern it.
2897 * m17n.c (m17n_init): Fix typo (== -> =).
2899 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2900 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2902 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2903 (MTEXTPROP_VAL): New macros.
2905 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2907 2005-04-07 Kenichi Handa <handa@m17n.org>
2909 * database.c (load_chartable): Fix pursing of symbol name.
2911 2005-03-24 Kenichi Handa <handa@m17n.org>
2913 * m17n.c (m17n_init): Fix typo (== -> =).
2915 2005-03-11 Kenichi Handa <handa@m17n.org>
2917 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2919 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2921 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2924 2005-03-09 handa <handa@m17n.org>
2926 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2927 calling m17n_init ().
2929 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2930 calling m17n_init_core ().
2932 2005-02-28 Kenichi Handa <handa@m17n.org>
2934 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2937 2005-02-17 Kenichi Handa <handa@m17n.org>
2939 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2940 (M_description, M_command, M_variable): New variables.
2941 (load_im_info_keys): New variables.
2942 (load_im_info, check_command_keyseq, get_description_advance)
2943 (parse_command_list, get_command_list, parse_variable_list)
2944 (get_variable_list, input_method_hook): New functions.
2945 (command_list, variable_list): New variables.
2946 (minput__init): Put input_method_hook to Minput_method.
2947 Initialize M_description, M_command, M_variable, Mdetail_text,
2948 load_im_info_keys, command_list, variable_list.
2949 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2950 (Mdetail_text): New variable.
2951 (minput_get_description, minput_get_commands)
2952 (minput_assign_command_keys, minput_get_variables)
2953 (minput_set_variable): New functions.
2955 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2956 (minput_assign_command_keys, minput_get_variables)
2957 (minput_set_variable): Extern them.
2959 * plist.c (UNGETC): Just decrement st->p.
2960 (read_mtext_element): New arg skip.
2961 (read_integer_element): Likewise.
2962 (read_symbol_element): Likewise.
2963 (read_element): New arg KEYS.
2964 (mplist__from_plist): Don't increment ref-count of NULL object.
2965 (mplist__from_file): New arg KEYS.
2966 (mplist_put): Don't increment ref-count of NULL object.
2967 (mplist_add): Likewise.
2968 (mplist_push): Likewise.
2969 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2971 * plist.h (mplist__from_file): Prototype adjusted.
2973 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2974 (get_database_stream): New function.
2975 (load_database): Use get_database_stream.
2976 (M_database_hook): New variable
2977 (mdatabase__init): Initialize M_database_hook.
2978 (mdatabase__load_for_keys): New function.
2979 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2981 (mdatabase_define): Free mdb->extra_info if necessary.
2983 * database.h (mdatabase__dir_list, M_database_hook)
2984 (mdatabase__load_for_keys): Extern them.
2985 (MDatabaseHookFunc): New type.
2987 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2989 2004-12-27 Kenichi Handa <handa@m17n.org>
2991 * Version 1.2.0 released.
2993 2004-12-27 Kenichi Handa <handa@m17n.org>
2995 * input.c (minput_filter): Don't reset ic->xxx_changed.
2997 * mtext.c (mtext_from_data): Fix documentation.
2999 2004-12-25 Kenichi Handa <handa@m17n.org>
3001 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3002 (M17NLIB_VERSION_NAME): Update to "1.2.".
3004 2004-12-24 Kenichi Handa <handa@m17n.org>
3006 * input.c (reset_ic): Set key_unhandled to 0.
3008 2004-12-21 Kenichi Handa <handa@m17n.org>
3010 * m17n-gui.h (mfont_from_spec): Delete extern.
3012 * input-gui.c (win_callback): Handle Minput_reset.
3013 (minput__win_init): Register reset_ic as a callback for
3016 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3017 changed. At first, shift to the initial state.
3018 (minput__init): Initialize Minput_reset. Register reset_ic as a
3019 callback for Minput_reset.
3020 (Minput_reset): New variable.
3021 (minput_filter): Always set ic->xxx_changed to 0.
3022 (minput_reset_ic): New function.
3023 (integer_value): Fix typo ('>' -> '<') and calculation of length
3026 * m17n-core.c (merror_code): Change type to `int'.
3028 * m17n-misc.h (merror_code): Adjust type.
3030 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3032 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3033 (mtext_change_prop): Delete extern.
3035 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3036 to `int'. Move the documents to m17n-core.h.
3038 2004-12-13 Kenichi Handa <handa@m17n.org>
3040 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3041 (MTextProperty): Document it.
3043 2004-12-09 Kenichi Handa <handa@m17n.org>
3045 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3047 2004-12-03 Kenichi Handa <handa@m17n.org>
3049 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3050 m17n__gui_initialized): New externs.
3052 * m17n-core.h (enum M17NStatus): New enum.
3053 (m17n_status): Extern it.
3055 * m17n-core.c (core_initialized): Delete this variable.
3056 (m17n__core_initialized, m17n__shell_initialized,
3057 m17n__gui_initialized): New variables.
3058 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3059 instead of core_initialized.
3060 (m17n_status): New function.
3062 * m17n.c (shell_initialized): Delete this variable.
3063 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3066 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3068 * m17n-gui.c (win_initialized): Delete this variable.
3069 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3070 instead of gui_initialized.
3072 2004-11-19 Kenichi Handa <handa@m17n.org>
3074 * input.c (reset_ic): Check if ic_info->state is NULL.
3075 (filter): If ic_info->state is NULL, return 0.
3076 (load_input_method): Don't unref `maps' it it's not created.
3078 2004-11-15 Kenichi Handa <handa@m17n.org>
3080 * input.c (find_candidates_group): If INDEX is -1, find the last
3082 (take_action_list): If the previous of the first candidate is
3083 requested, select the last candidate.
3085 2004-11-08 Kenichi Handa <handa@m17n.org>
3087 * m17n-X.c (device_open): Try at most 32 fonts to find a
3088 non-autoscaled font.
3090 * font.c (xlfd_parse_name): Fix previous change.
3092 2004-11-05 Kenichi Handa <handa@m17n.org>
3094 * font.c: (commont_style): Include dummy elements "slanted" and
3095 "rslanted" to prefer "o" to "r" if "i" is requested.
3097 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3099 2004-10-29 Kenichi Handa <handa@m17n.org>
3101 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3103 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3104 New members smallest and larger.
3105 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3106 (xfont_registry_list): Likewise.
3107 (xfont_select): Likewise.
3110 2004-10-28 Kenichi Handa <handa@m17n.org>
3112 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3113 font name comparison.
3114 (xfont_select): Fix logic for selecting a larger size font.
3116 2004-10-25 Kenichi Handa <handa@m17n.org>
3118 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3121 2004-10-22 Kenichi Handa <handa@m17n.org>
3123 * input.c (update_candidate): Renamed from udpate_candidate.
3124 (take_action_list): Show more debugging info on arithmetic commands.
3126 * m17n-X.c (device_open): Fix previous change.
3128 * draw.c (compose_glyph_string): Don't get face property at the
3131 2004-10-21 Kenichi Handa <handa@m17n.org>
3133 * draw.c (compose_glyph_string): Fix for the case of category
3136 2004-10-19 Kenichi Handa <handa@m17n.org>
3138 * input.c (mdebug_mask): New variable.
3139 (shift_state): Print debug information.
3140 (take_action_list): Likewise.
3141 (handle_key): Likewise.
3143 2004-10-14 Kenichi Handa <handa@m17n.org>
3145 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3147 2004-10-13 Kenichi Handa <handa@m17n.org>
3149 * m17n-X.c (device_open): Be sure to register at least one font
3152 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3153 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3155 2004-10-12 Kenichi Handa <handa@m17n.org>
3157 * draw.c (alloc_gstring): Fix previous change.
3159 * font-ft.c (ft_list_generic): Fix for the case of not
3162 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3164 * font.c (mfont_list): If no font is found, return NULL.
3165 (load_font_encoding_table): Put entries of nil registry first.
3166 (find_encoding): Adjust for the above change.
3168 2004-10-11 Kenichi Handa <handa@m17n.org>
3170 * m17n-gui.h (mfont_list): Adjust prototype.
3172 * m17n-X.c (xfont_list): New arg maxnum.
3174 * font.h (struct MFontDriver): Change prototype of <list>.
3176 * font-ft.c (fc_generic_family_list): Delete it.
3177 (Mserif, Msans_serif, Mmonospace): Delete them.
3178 (M_generic_family_info): New variable.
3179 (enum GenericFamilyType): New enum.
3180 (struct GenericFamilyInfo): New struct.
3181 (generic_family_table): New variable.
3182 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3184 (add_font_info): Get style here.
3185 (ft_list_family): Don't initialize fc_config here. Don't list
3187 (ft_list_generic): New function.
3188 (ft_select): Pay attention to generic familes here.
3189 (ft_open): Fix calculation of ascent and descent.
3190 (ft_list): Pay attention to generic families.
3191 (mfont__ft_init): Initialize M_generic_family_info,
3192 generic_family_table, and fc_config..
3193 (mfont__ft_fini): Finalize generic_family_table.
3195 * draw.c (compose_glyph_string): Use more constant font for
3196 glyphs. Adjust for the member change in MGlyph.
3197 (layout_glyph_string): Adjust for the member change in MGlyph.
3198 (alloc_gstring): Intilize scracth_glyph to avoid
3199 compose_glyph_string on it.
3200 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3201 (mdraw_coordinates_position): Fix previous change.
3203 * internal-gui.h (glyph_category): New enum.
3204 (MGlyph): Change type of <category> to enum glyph_category.
3206 * face.c (mface__realize): Delete args langauge and charset.
3207 (mface__for_chars): Fix for the case that glyphs have different
3209 (mface__update_frame_face): Adjust for mface__realize change.
3211 * face.h (mface__realize): Adjust prototype.
3213 2004-10-05 Kenichi Handa <handa@m17n.org>
3215 * language.c (mlang__init): Add Akan.
3217 2004-10-04 Kenichi Handa <handa@m17n.org>
3219 * font-ft.c (add_font_info): Add instead of push the element.
3220 (ft_list_family): For generic fonts, try all
3221 substituted. families.
3223 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3224 (run_rule): Don't update cluster range here.
3225 (run_command): Update cluster range on appending a glyph.
3226 (run_otf): Update cluster range for glyphs generated by OTF.
3228 2004-10-02 Kenichi Handa <handa@m17n.org>
3230 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3232 2004-09-30 Kenichi Handa <handa@m17n.org>
3234 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3236 2004-09-30 Kenichi Handa <handa@m17n.org>
3238 * font.h: Include <fontconfig/fontconfig.h>.
3239 (MFTInfo): New member langset.
3240 (mfont__encoding_list): Extern it.
3242 * font.c (mfont__encoding_list): New function.
3243 (mdebug_dump_font_list): New function.
3245 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3246 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3248 (ft_family_list): New variable.
3249 (set_font_info): New arg basep. Callers changed.
3250 (fc_list): Check the return value of FcPatternGetString.
3251 (add_font_info): New arg plist. Callers changed. Update
3253 (ft_list_family): New function (merged fc_list and ft_list_all).
3254 (ft_select): Use ft_list_family.
3255 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3257 (mfont__ft_init): Initialize above new variables.
3258 (mfont__ft_fini): Free ft_family_list.
3259 (STRDUP_LOWER): New macro.
3260 (set_font_info): Use STRDUP_LOWER.
3261 (ft_list_family): Avoid duplicate addition of font path. Use
3263 (fc_decode_prop): Fix typo.
3265 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3266 (xfont_registry_list): Change argument disp_info to frame.
3268 (xfont_list_all): New function.
3269 (xfont_list): If FONT is not NULL, check all fonts.
3271 2004-09-28 Kenichi Handa <handa@m17n.org>
3273 * m17n-X.c (MXFont, MXFontList): New types.
3274 (MDisplayInfo): Delete members font_registry_list,
3275 iso8859_1_family_list, iso10646_1_family_list, new members
3276 font_list, base_font_list.
3277 (free_display_info): Adusted for the change of MDisplayInfo.
3278 (xfont_driver): Initialize with xfont_list.
3279 (font_compare): New function.
3280 (build_font_list): Deleted.
3281 (xfont_registry_list): New function.
3282 (xfont_select): Use xfont_registry_list.
3283 (xfont_list): New function.
3284 (device_open): Adusted for the change of MDisplayInfo.
3286 * font-ft.c (add_font_info): New arg languages. Callers changed.
3287 (fc_list): Get languages from fonts..
3288 (ft_list_all): Renamed from ft_list. Callers changed.
3289 (ft_list): New function.
3290 (mfont__ft_driver): Initalize with ft_list.
3292 * font.c (mfont_list): New function.
3294 * font.h (struct MFontDriver): New member `list'.
3295 (MFTInfo): New member languages.
3297 * m17n-gui.h (mfont_list): Extern it.
3299 2004-09-27 Kenichi Handa <handa@m17n.org>
3301 * internal-gui.h (struct MGlyphString): Delete members mt,
3302 sub_width, sub_lbrearing, sub_rbearing, and region.
3304 * draw.c (MSubTextExtents): New type.
3305 (layout_glyphs): New arg extents. Set its members.
3306 (layout_glyph_string): Adjusted for the above change.
3307 (alloc_gstring): Don't set gstring->mt.
3308 (truncate_gstring): Call line_break function with mt instead of
3311 2004-09-22 Kenichi Handa <handa@m17n.org>
3313 * mtext.c (count_utf_16_chars): Count each code of invalid
3316 2004-09-19 Kenichi Handa <handa@m17n.org>
3318 * mtext.c (default_utf_16, default_utf_32): Rename them to
3319 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3322 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3325 2004-09-13 Kenichi Handa <handa@m17n.org>
3327 * draw.c (Mlatin): Don't declare it here.
3328 (visual_order): Fix reordering of combining characters.
3329 (compose_glyph_string): Fix detection of script.
3330 (layout_glyphs): Don't fix reordering of combining characters
3332 (layout_glyph_string): Pay attention to
3333 control->disable_overlapping_adjustment.
3334 (truncate_gstring): Include at least on character in a line.
3335 (get_gstring): Always scan one full line.
3336 (mdraw__init): Don't initialize Mlatin here.
3337 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3338 have a font, use ascent/descent of an ASCII font. Allow
3339 ink_array_return and logical_array_return to be NULL.
3340 (mdraw_coordinates_position): Fix iteration.
3342 * font-ft.c (MFTtoProp): Member completely changed.
3343 (ft_to_prop): Adjusted for the above change.
3344 (ft_to_prop_size): Likewise.
3345 (set_font_info): Adjusted for the change of MFTtoProp.
3346 (fc_generic_family_list): New variable.
3347 (fc_list): Add special handling of generic font names.
3348 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3349 Initialize fc_generic_family_list.
3350 (mfont__ft_fini): Don't free ft_to_prop. Free
3351 fc_generic_family_list.
3352 (FC_vs_M17N_font_prop): New type.
3353 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3354 (fc_decode_prop, fc_encode_prop): New functions.
3355 (mfont__ft_parse_name): Use fc_decode_prop.
3356 (mfont__ft_unparse_name): Use fc_encode_prop.
3358 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3359 (MWDevice): Add member realized_font_list.
3360 (free_display_info): Don't free disp_info->realized_font_list.
3361 (free_device): Free device->realized_fontset_list.
3362 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3363 (device_open): Don't initialize disp_info->realized_font_list.
3364 (device_open): Initialize device->realized_font_list and set it to
3365 frame->realized_font_list.
3367 * fontset.c (try_font_group): New function.
3368 (mfont__lookup_fontset): Use try_font_group.
3370 * font.c (common_weight): Change the order of "regular".
3372 * face.c (Mlatin): Don't make it static.
3373 (mface__realize): Be sure to set work_gstring.frame.
3374 (mface__for_chars): Likewise.
3376 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3379 * internal-gui.h (Mlatin): Extern it.
3381 * m17n-gui.h (MDrawControl): New member
3382 disable_overlapping_adjustment.
3384 2004-09-06 Kenichi Handa <handa@m17n.org>
3386 * font-flt.c (run_otf): Fix typo ('}'->']').
3388 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3389 (COMBINING_PRECOMPUTED_P): New macros.
3391 * draw.c (layout_glyphs): Handle precomputed combining code.
3393 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3394 precomupted combining code.
3396 2004-09-03 Kenichi Handa <handa@m17n.org>
3398 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3401 2004-08-27 Kenichi Handa <handa@m17n.org>
3403 * face.c (mface_put_prop): If the new value is the same as the
3404 current one, don't increment frame->tick.
3406 2004-08-25 Kenichi Handa <handa@m17n.org>
3408 * fontset.c (mfontset): Initialize font_spec_list member.
3409 (mfontset_copy): Load fontset if necessary.
3411 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3412 'metrics' to for C++.
3414 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3417 2004-08-16 Kenichi Handa <handa@m17n.org>
3419 * Version 1.1.0 released.
3421 2004-08-13 Kenichi Handa <handa@m17n.org>
3423 * language.c (mlang__init): Add Dhivehi.
3425 * m17n-gui.c (Mx, Mfreetype): Delete it.
3426 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3428 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3429 (mfont_resize_ratio): Extern it.
3430 (MDrawGlyphInfo): New member logical_width;
3431 (MDrawGlyph): New type.
3432 (mdraw_glyph_list): Prototype adjusted.
3434 * m17n-X.c (xfont_open): Set type and fontp members.
3435 (xft_open): Likewise.
3437 * internal-gui.h (Mx, Mfreetype): Delete extern.
3439 * font.h (struct MRealizedFont): New member type and fontp.
3441 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3442 (Mx, Mfreetype): Declare here.
3443 (Mxft): New variable.
3444 (mfont_resize_ratio): New function.
3446 * font-ft.c (ft_open): Set type and fontp members.
3448 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3451 2004-08-11 Kenichi Handa <handa@m17n.org>
3453 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3456 2004-08-06 Kenichi Handa <handa@m17n.org>
3458 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3461 * font-flt.c (run_otf): Print debugging information if necessary.
3463 2004-08-05 Kenichi Handa <handa@m17n.org>
3465 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3466 positioning_type 5 and 6. Switch simplified.
3468 2004-08-04 Kenichi Handa <handa@m17n.org>
3470 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3472 2004-08-02 Kenichi Handa <handa@m17n.org>
3474 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3475 set val to 1 even if it is greater than 1.
3477 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3479 2004-07-29 Kenichi Handa <handa@m17n.org>
3481 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3482 debugging information.
3484 * internal.h (MDEBUG_PRINT5): New macro.
3486 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3487 the previous one if the zero width glyph has left or right
3490 2004-07-26 Kenichi Handa <handa@m17n.org>
3492 * m17n-X.c (xft_render): Pay attention to members left_padding and
3493 right_padding of MGlyph.
3495 * draw.c (visual_order): Allocate one more elements for arrays as
3496 a workaround of fribidi bug.
3497 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3498 instead of MGlyph->bidi_sensitive.
3499 (layout_glyph_string): Pay attentinon to
3500 control->orientation_reversed when padding at the head or tail.
3501 Fix adjustment of space glyph width.
3502 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3505 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3506 instead of MGlyph->bidi_sensitive.
3508 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3510 2004-07-26 Kenichi Handa <handa@m17n.org>
3512 * draw.c (visual_order): Don't treat combined glyphs specially.
3513 (layout_glyphs): Don't get metrics glyphs that are already ready.
3514 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3515 width with the previous one.
3516 (draw_background): Fix bar cursor position on a r2l glyph.
3518 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3519 (run_rule): Fix place of updating cluster_begin_pos and
3520 cluster_end_pos here.
3521 (run_otf): Don't set left_padding.
3523 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3525 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3526 Fix handling of GPOS.
3527 (mfont__ft_drive_gpos): Delete this function.
3529 * font.h (mfont__ft_drive_otf): Renamed back from
3530 mfont__ft_drive_gsub.
3531 (mfont__ft_drive_gpos): Delete extern.
3533 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3534 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3536 2004-07-23 Kenichi Handa <handa@m17n.org>
3538 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3539 the same bidi level.
3541 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3543 2004-07-22 Kenichi Handa <handa@m17n.org>
3545 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3547 2004-07-20 Kenichi Handa <handa@m17n.org>
3549 * draw.c (render_glyphs): Fix checking of g->code validity.
3551 * face.c (mface__realize): Set g.type.
3553 2004-07-18 Kenichi Handa <handa@m17n.org>
3555 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3558 * m17n-gui.c (mframe): Print error message give by dlopen to
3561 2004-07-16 Kenichi Handa <handa@m17n.org>
3563 * draw.c (compose_glyph_string): Improve the way of deciding a
3564 script. For a character that doesn't have script property, use
3565 the last non-latin script.
3567 * font-ft.c (fc_list): Cancel previous change.
3568 (mfont__ft_init): Add more entries in ft_to_prop_name.
3570 2004-07-15 Kenichi Handa <handa@m17n.org>
3572 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3573 previous or next character glyphs.
3575 2004-07-14 Kenichi Handa <handa@m17n.org>
3577 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3578 of type GLYPH_SPACE.
3580 * fontset.c (mfont__lookup_fontset): If glyph type is
3581 GLYPH_SPACE, get codes for SPACE.
3583 * internal-gui.h (Mfont): Delete extern.
3585 * m17n-gui.h (Mfont): Delete duplicated extern.
3587 2004-07-13 Kenichi Handa <handa@m17n.org>
3589 * font-ft.c (DEVICE_DELTA): New macro.
3590 (adjust_anchor): New function.
3591 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3593 (mfont__ft_drive_gpos): New function.
3595 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3596 (FontLayoutContext): Delete member `rfont'.
3597 (run_otf): Set g->otf_cmd. Call
3598 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3599 only whne HAVE_OTF is defined.
3601 * fontset.c: Include "config.h".
3603 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3604 (MGlyph): New member otf_cmd.
3606 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3607 (mfont__ft_drive_gpos): Extern it.
3609 * face.c: Include "config.h".
3611 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3613 * input-gui.c: Include "config.h".
3615 * plist.c: Include "config.h".
3617 2004-07-06 Kenichi Handa <handa@m17n.org>
3619 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3620 internal-gui.h: Cancel previous changes.
3622 * m17n-gd.h: Delete it.
3624 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3625 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3626 @XML2_LD_FLAGS@ to above.
3627 (libm17n_la_LIBADD): Add -ldl.
3628 (libm17n_la_LDFLAGS): Add -export-dynamic.
3629 (X_LD_FLAGS): Fix the order of linking.
3630 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3631 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3632 (libm17n_X_la_LDFLAGS): Add -module.
3633 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3634 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3635 (libm17n_gd_la_LDFLAGS): Add -module.
3636 (include_HEADERS): Delete m17n-gd.h.
3638 2004-06-30 Kenichi Handa <handa@m17n.org>
3640 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3641 (MDeviceLibraryInterface): Delete it.
3642 (register_device_library): Delete it.
3643 (m17n__device_library_list): Renamed from device_library_list.
3645 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3646 (m17n_init_win): Adjust prototype.
3648 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3649 (m17n_init_gd): New function.
3651 * m17n-gd.h: New file.
3653 * m17n-X.h: Include <m17n-gui.h>.
3654 (m17n_init_X): Extern it.
3655 (M17N_INIT): Redefine it.
3657 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3658 (m17n_init_X): New function.
3660 * internal-gui.h (m17n__device_library_list): Extern it.
3661 (struct MDeviceDriver): New members initialized, init, and fini.
3663 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3665 (libm17n_X_la_LIBADD): Delete aboves.
3666 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3667 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3668 (libm17n_gd_la_LDFLAGS): Delete it.
3669 (include_HEADERS): Add m17n-gd.h.
3671 2004-06-25 Kenichi Handa <handa@m17n.org>
3673 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3674 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3676 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3678 * font-ft.c (fc_list): If FcFontList finds no font, try
3681 * draw.c (compose_glyph_string): Terminate the last loop after
3682 doing default combining if necessary.
3684 2004-06-24 Kenichi Handa <handa@m17n.org>
3686 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3688 * character.c (mchar_define_property): Add const to an arg.
3690 * charset.c (mchar_define_charset): Add const to an arg.
3692 * coding.c (MCodingSystem): Add const to an arg or decoder.
3693 (finish_decoding): Add const to an arg.
3694 (decode_coding_charset, decode_coding_utf_8)
3695 (decode_coding_utf_16, decode_coding_utf_32)
3696 (decode_coding_iso_2022, decode_coding_sjis)
3697 (mconv_define_coding): Likewise.
3699 * m17n-X.c (xft_find_metric): Delete unused variable.
3701 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3704 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3707 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3708 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3710 * mtext.h (mtext__from_data): Ajust prototype.
3712 2004-06-23 Kenichi Handa <handa@m17n.org>
3714 * draw.c (compose_glyph_string): Always get glyph codes by
3716 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3717 (mdraw_glyph_list): New function.
3719 * font-flt.c (mfont__flt_run): Be sure to call
3720 rfont->driver->encode_char.
3722 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3723 (ft_encode_char): Delete arg C.
3724 (ft_render): Don't call FT_Get_Char_Index.
3726 * font.c (mfont__encodable_p): Delete it.
3727 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3729 * font.h (struct MFontDriver): Delete arg C of encode_char.
3730 (mfont__encodable_p): Delete extern.
3732 * m17n-X.c (xfont_encode_char): Delete arg C.
3733 (xft_find_metric): Don't cal FT_Get_Char_Index.
3734 (xft_render): Likewise.
3736 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3738 (mdraw_glyph_list): Extern it.
3740 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3742 2004-06-22 Kenichi Handa <handa@m17n.org>
3744 * m17n-gui.h (mfontset_lookup): Extern it.
3746 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3748 * fontset.c (realize_fontset_elements)
3749 (free_realized_fontset_elements, update_fontset_elements): New
3751 (mfont__realize_fontset): Call realize_fontset_elements.
3752 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3753 (mfont__lookup_fontset): If a fontset was modified, update
3754 the realized fontset.
3755 (mfontset_modify_entry): Increment fontset->tick.
3756 (mfontset_lookup): New function.
3758 2004-06-21 Kenichi Handa <handa@m17n.org>
3760 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3762 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3763 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3764 length of source text 0.
3766 2004-06-21 Kenichi Handa <handa@m17n.org>
3768 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3769 (compare): Pay attention to format other than utf-8.
3770 (copy): Delete this function.
3771 (count_by_utf_8, count_by_utf_16, insert): New functions.
3772 (count_utf_16_chars): Fix handling of a surrogate pair.
3773 (find_char_forward, find_char_backward): Likewise.
3774 (mtext__from_data): Delete unnecessary check. Fix number of
3776 (mtext_from_data): Don't count items.
3777 (mtext_ref_char): Optimize the code.
3778 (mtext_set_char): Pay attention to format other than utf-8.
3779 (mtext_cat_char): Likewise.
3780 (mtext_dup): Don't call copy, instead do allocation here.
3781 (mtext_cat): Call insert instead of copy.
3782 (mtext_ncat): Likewise.
3783 (mtext_cpy): Delete character at first and call insert instead of
3785 (mtext_ncpy): Likewise.
3786 (mtext_copy): Likewise.
3787 (mtext_duplicate): Call insert instead of copy.
3788 (mtext_del): Pay attention to format other than utf-8.
3789 (mtext_ins): Simply call insert.
3790 (mtext_ins_char): Pay attention to format other than utf-8.
3791 (mtext_tok): Call insert instead of copy.
3792 (mtext_text): Call UNIT_BYTES.
3794 * textprop.c (mtext__adjust_plist_for_change): New function.
3796 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3797 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3798 (CHAR_UNITS_AT): Fix typo.
3799 (CHAR_UNITS_BY_HEAD): Fix typo.
3800 (STRING_CHAR_AND_UNITS): Fix typo.
3802 * internal.h (MTEXT_READ_ONLY_P): New macro.
3804 * mtext.h (mtext__replace): Delete the extern.
3805 (mtext__adjust_foramt): Adjust prototype.
3807 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3808 if possible. Otherwise make a copy of mmt.
3810 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3813 2004-06-18 Kenichi Handa <handa@m17n.org>
3815 * character.h (CHAR_STRING_UTF16): Fix syntax.
3817 2004-06-16 Kenichi Handa <handa@m17n.org>
3819 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3820 (libm17n_X_la_LIBADD): Delete it.
3821 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3823 * m17n-X.c (device_open): Add parens in `if' condition.
3825 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3826 (DEC_POSITION): Likewise.
3827 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3829 2004-06-15 Kenichi Handa <handa@m17n.org>
3831 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3834 * draw.c (compose_glyph_string): If langauge is specified, call
3835 mface__for_chars even if a text is all latin. Fix condition for
3836 setting non_ascii_found.
3838 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3840 * m17n.h (minput_char_to_key): Delete extern.
3842 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3844 * m17n-gui.c (null_device_open): Set several members of frame.
3846 2004-06-14 Kenichi Handa <handa@m17n.org>
3848 * m17n-gui.h (minput_event_to_key): Delete extern.
3850 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3852 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3854 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3856 2004-06-08 Kenichi Handa <handa@m17n.org>
3858 * character.c (mchar_put_prop): Don't increment the ref-count of
3861 2004-06-04 Kenichi Handa <handa@m17n.org>
3863 * m17n-core.c (mdebug__register_object): New function.
3864 (mdebug__unregister_object): Likewise.
3866 * internal.h (mdebug__register_object, mdebug__unregister_object):
3868 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3871 * charset.c (mcharset__load_from_database): Don't call
3872 mconv__register_charset_coding here.
3874 * coding.c (find_coding): Get a real name from an element of
3875 coding_definition_list.
3876 (mconv__register_charset_coding): Set the real name at the top of
3878 (mcoding__load_from_database): Likewise.
3879 (mconv_list_codings): Adjusted for the above change.
3881 2004-06-03 Kenichi Handa <handa@m17n.org>
3883 * coding.c (find_coding): Find by canonicalized name. Don't have
3884 to modify the element of coding_definition_list by
3886 (mconv__define_coding_from_charset): Delete it.
3887 (mconv__register_charset_coding): Canonicalize sym.
3888 (mcoding__load_from_database): Register plist modified by
3891 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3893 * font-ft.c (ft_open): Fix setting of rfont->descent.
3895 2004-06-02 Kenichi Handa <handa@m17n.org>
3897 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3898 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3899 (xlfd_unparse_name): Renamed from xfont_build_name.
3900 (mfont__init): Initialized Mfontconfig.
3901 (mfont__free_realized): Unconditionally unref rfont->info.
3902 (mfont__select): Free `this' if it's not best.
3903 (mfont__open): Don't check frame->realized_font_list.
3904 (mfont__parse_name_into_font): New function.
3905 (Mfontconfig): New variable.
3906 (mfont_from_name): Call mfont_parse_name.
3907 (mfont_name): Call mfont_unparse_name.
3908 (mdebug_dump_font): Likewise.
3910 * font.h (struct MFontDriver): Delete members parse_name and
3912 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3913 (mfont__parse_name_into_font): Extern it.
3915 * font-ft.c: Include "symbol.h".
3916 (close_ft): Unconditionally free filename and charmap_list of
3918 (ft_open): Duplicate base->filename. Increment ref-count of
3919 ft_info->charmap_list. Free ft_info->charmap_list and
3920 ft_info->filename on error.
3921 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3923 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3925 (enum xlfd_field_idx): Moved to font.c.
3926 (split_font_name, build_font_name): Likewise.
3927 (build_font_list): Call mfont__parse_name_info_font.
3928 (xfont_open): Call mfont__unparse_name. Free name.
3929 (xfont_parse_name, xfont_build_name): Moved to font.c
3930 (xft_select): Prototype deleted.
3931 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3932 Call mfont_pase_name.
3934 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3935 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3938 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3941 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3943 2004-06-01 Kenichi Handa <handa@m17n.org>
3945 * fontset.c (mfontset_modify_entry): Pay attention to the case
3946 that fontset->font_spec_list is NULL.
3948 2004-05-31 Kenichi Handa <handa@m17n.org>
3950 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3952 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3954 * font.c (mfont__select): Print score the a font for debugging.
3956 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3958 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3959 kanji_sym and kana_sym.
3961 2004-05-28 Kenichi Handa <handa@m17n.org>
3963 * Makefile.am (VINFO): New variable.
3964 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3965 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3967 2004-05-27 Kenichi Handa <handa@m17n.org>
3969 The following chanages are to make device dependent functions
3970 accessible only from MDeviceDriver structure, and to add GD and
3971 null device drivers. Font drivers get also device dependent.
3973 * m17n.c (m17n_init): Increament shell_initialized.
3974 (m17n_fini): Decremented shell_initialized.
3976 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3978 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3979 (Mwidget, Mcolormap, Mx): Extern them.
3981 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3982 (free_frame): Call frame->driver->close instead of
3984 (DLOPEN_SHLIB_EXT): New macro.
3985 (MDeviceLibraryInterface): New type.
3986 (device_library_list): New variable.
3987 (register_device_library): New function.
3988 (null_device): New variable.
3989 (null_device_close, null_device_get_prop)
3990 (null_device_realize_face, null_device_free_realized_face): New
3992 (null_driver): New variable.
3993 (null_device_init, null_device_fini, null_device_open): New
3995 (null_interface): New variable.
3996 (Mfreetype, Mdevice): Declare them.
3997 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3998 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3999 Mwin__Close_Device. Register drivers for Mx and Mgd.
4000 (m17n_fini_win): Decremented win_initialized. Call "fini"
4001 function of all opened devices. Don't call mwin__fini.
4002 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4004 (mframe): Handle Mdevice key of PLIST.
4005 (mframe_get_prop): Call frame->device->get_prop instead of
4006 mwin__device_get_prop.
4008 * m17n-gd.c: New file.
4010 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4011 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4013 * m17n-core.c (m17n_init_core): Increate core_initialized.
4014 (m17n_fini_core): Decremented core_initialized.
4016 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4017 (Mcolormap): Don't extern them here.
4019 * m17n-X.c (FRAME_DEVICE): New macro.
4020 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4021 (free_display_info): Use MPLIST_DO.
4022 (free_device): Free rface->info.
4023 (xft_close): Delete it.
4024 (device_init): Renamed from mwin__init.
4025 (device_fini): Renamed from mwin__fini.
4026 (device_open): Renamed from mwin__open_device.
4027 (x_driver): New variable.
4028 (MXFontInfo): Delete member frame, add member display.
4029 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4030 Don't declare them here.
4032 * internal-gui.h (MDeviceType): New enum.
4033 (MWDefice): Delete it.
4034 (struct MFrame): Change type of device to void *. New members
4035 device_type, driver, font_driver_list.
4036 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4037 (MDeviceDriver): New type.
4038 (Mx, Mgd, Mfreetype): Extern them.
4039 (mwin__XXX): Delete all of them.
4041 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4043 (win_destroy_ic): Likewise.
4044 (adjust_window_and_draw): Likewise.
4045 (win_callback): Likewise.
4046 (Mxim): Declare it here.
4047 (minput_event_to_key): Call M_CHECK_READABLE.
4049 * fontset.c (mfont__lookup_fontset): Delete local variable
4052 * font.h (struct MFontDriver): Delete member close, add members
4053 parse_name and build_name.
4054 (mfont__driver_list): Delete extern.
4055 (mfont__close): Delete extern.
4057 * font.c (mfont__init): Don't set mfont__driver_list.
4058 (mfont__fini): Don't unref mfont__driver_list.
4059 (mfont__select): Try font drivers in frame->font_driver_list. Set
4060 driver member of a realized font.
4061 (mfont__close): Delete it.
4062 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4063 functions of the default frame.
4065 * font-ft.c (close_ft): Check ft_info->ft_face and work
4067 (add_font_info): Allocate ft_info by M17N_OBJECT.
4068 (ft_close): Delete it.
4069 (mfont__ft_driver): Don't set ft_close.
4070 (ft_select): Increment ref-count of best_font.
4071 (ft_open): Decremented ref-count of base. On error, call
4072 FT_Done_Face and free ft_info.
4073 (ft_find_metric): Always use XXX_MONO in load_flags.
4074 (ft_render): Fix setting of width. Call
4075 frame->driver->draw_points instead of mwin__draw_points.
4076 (ft_to_prop): Don't set mfont__driver_list.
4077 (mfont__ft_fini): Just unref ft_info.
4079 * face.c (mface__init): Exchange foreground and background of
4080 mface__default. Call mface_put_prop to set hline of
4082 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4083 (mface__free_realized): Don't call mwin__free_realized_face.
4085 * draw.c (Mdepth): Don't declare it here.
4086 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4087 (render_glyphs, render_glyph_string): Likewise.
4088 (mdraw__init): Don't set Mdepth.
4089 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4091 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4093 (mdraw_text_items): Check FRAME is writable.
4094 (mdraw_per_char_extents): Implement body.
4096 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4098 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4099 (GUI_SOURCES): Delete it.
4100 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4101 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4102 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4103 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4104 (linkgui_LDADD): Set to libm17n-gui.la
4105 (linkgui_LDFLAGS): New target.
4106 (SRC): Include ${libm17n_gui_la_SOURCES} and
4107 ${libm17n_gd_la_SOURCES}.
4109 2004-05-24 Kenichi Handa <handa@m17n.org>
4111 * draw.c (draw_background): Don't draw background even if
4112 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4114 2004-05-22 Kenichi Handa <handa@m17n.org>
4116 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4118 2004-05-20 Kenichi Handa <handa@m17n.org>
4120 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4122 * m17n-gui.c: Include "plist.h".
4123 (mframe): If PLIST is NULL, initialize it to emply plist.
4125 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4126 (xft_driver): New variable.
4127 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4128 (xft_find_metric, xft_render): New function.
4129 (mwin__init): Adjusted for the new mfont__driver_list.
4130 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4131 generated face to PARAM.
4132 (mwin__realize_face): Fix setting of box colors. Don't call hook
4134 (mwin__draw_hline): New function.
4135 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4136 (mwin__xft_render): Delete these function.
4138 * internal-gui.h (struct MFrame): New member tick.
4139 (struct MGlyphString): New member tick.
4140 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4141 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4142 (mwin__xft_render): Delete extern.
4144 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4145 (mfontset): Always increment the reference count of returned
4148 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4149 (MFTInfo): Moved to font.h.
4150 (ft_iso8859_1_font_list): Delete this variable.
4151 (set_font_info): Don't set font->property[MFONT_TYPE].
4152 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4153 (add_font_info): Change type to void.
4154 (fc_list): Change anme from xft_list. Caller changed. Include
4155 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4156 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4157 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4158 (close_ft): Don't call mwin__xft_close. Unref
4159 ft_info->extra_info.
4160 (ft_open): Don't setup ft_info->fontname. Don't call
4162 (ft_find_metric): Don't call mwin__xft_get_metric.
4163 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4164 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4165 (mfont__ft_init): Adjusted for new mfont__driver_list.
4166 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4168 * font.c (mfont__driver_list): Make it MPlist.
4169 (mfont__init): Adjust initialization of mfont__driver_list.
4170 (mfont__fini): Free mfont__driver_list.
4171 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4172 (mfont__select): Adjusted for the new mfont__driver_list.
4174 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4175 (mfont__drirver_list): Adjust prototype.
4176 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4178 * face.h (struct MFace): Delete member realized_face_list, add
4180 (struct MRealizedFace): Delete member need_update
4181 andnofont_rface, add member non_ascii_list.
4182 (mface__update_frame_face): Extern it.
4184 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4186 (get_hline_create, get_box_create): New functions.
4187 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4189 (free_face): Cancep previous change. Free face->frame_list.
4190 (serialize_hline): Do nothing if hline->width is zero.
4191 (serialize_box): Do nothing if box->width is zero.
4192 (mface__init): Setup all properties of mface__default.
4193 (mface__fini): Free hline_prop_list and box_prop_list.
4194 (mface__realize): Cancel previous change. Update
4195 face->frame_list. Setup rface->non_ascii_list.
4196 (mface__for_chars): Update rface->non_ascii_list.
4197 (mface__free_realized): Free rface->non_ascii_list.
4198 (mface__update_frame_face): New function.
4199 (mface): Initialize face->frame_list.
4200 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4202 (mface_merge): Likewise.
4203 (mface_put_prop): If key is Mhline or Mbox, get value by
4204 get_hline_create or get_box_create respectively.
4205 (mface_put_prop): Update frame->tick and call
4206 mface__update_frame_face if necessary.
4207 (mface_update): Do nothing if func is noop_hook.
4209 * draw.c (render_glyphs): If a font is not found, use
4210 mwin__draw_empty_boxes.
4211 (alloc_gstring): Initialize gstring->tick.
4212 (get_gstring): Check gstring->tick.
4214 2004-05-17 Kenichi Handa <handa@m17n.org>
4216 * face.c (find_realized_face): Return value changed. If RFONT is
4217 NULL, avoid unnecessary checking.
4218 (free_face): Free face->realized_face_list.
4219 (mface__realize): Adjusted for the change of find_realized_face.
4220 If it returns a realized face that needs update, free it and
4221 realize a new one. Push a new realized face to
4222 frame->realized_face_list instead of appending.
4223 (mface__for_chars): Adjusted for the change of find_realized_face.
4224 Short cut if the required font is in rface->ascii_rface.
4225 (mface_put_prop): Free old value if necessary. Set need_update
4226 member of realized faces to 1.
4228 * face.h (struct MFace): Delete member tick, add member
4230 (struct MRealizedFace): Delete member tick, add member
4233 2004-05-13 Kenichi Handa <handa@m17n.org>
4235 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4237 2004-05-12 Kenichi Handa <handa@m17n.org>
4239 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4241 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4242 parse it XftNameParse.
4244 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4245 (all_fonts_scaned): New variable.
4246 (set_font_info): FAMILY may be Mnil.
4247 (add_font_info): Argument changed.
4248 (xft_list): Call add_font_info in it.
4249 (ft_list): Likewise.
4250 (ft_select): Make it work in the case family is Mnil.
4251 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4252 (mfont__ft_fini): Set all_fonts_scaned to 0.
4254 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4255 that is failed to open.
4257 2004-05-10 Kenichi Handa <handa@m17n.org>
4259 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4260 device's depth is 1 (i.e. monochrome).
4262 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4263 to work around the problem of libtool.
4265 * font-ft.c: Include <freetype/ftbdf.h>.
4266 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4268 (mfont__ft_init): Initialize them.
4269 (ft_iso8859_1_font_list): New variable.
4270 (set_font_info): Detect a font containing iso8859-1 glyphs and
4271 register it in ft_iso8859_1_font_list. If the font is not
4272 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4273 properties of the font from its properties.
4274 (add_font_list): If the font is not scalable, check if it is BDF
4275 or PCF font. If not, ignore it.
4276 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4277 registry is not iso8859-1.
4278 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4279 ft_iso8859_1_font_list.
4280 (ft_find_metric): If the font is not scalable, assume it as BDF
4281 or PCF, and get a metric from its properties.
4282 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4284 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4286 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4287 (libm17n_la_LDFLAGS): Delete it.
4288 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4289 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4291 2004-05-06 Kenichi Handa <handa@m17n.org>
4293 * draw.c (compose_glyph_string): Fix previous change.
4295 2004-04-30 Kenichi Handa <handa@m17n.org>
4297 * font-ft.c (ft_list): Delete unused variable `result'.
4298 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4300 2004-04-27 Kenichi Handa <handa@m17n.org>
4302 * m17n-X.c: Include config.h
4303 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4304 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4305 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4306 (FRAME_CMAP, FRAME_VISUAL): New macros.
4307 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4308 (xfont_driver): Make it static.
4309 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4310 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4311 info->xft_color_back.
4312 (MXftFontInfo) [HAVE_XFT2]: New type.
4313 (mwin__xft_close) [HAVE_XFT2]: New function.
4314 (mwin__xft_open) [HAVE_XFT2]: New function.
4315 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4316 (mwin__xft_render) [HAVE_XFT2]: New function.
4318 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4319 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4320 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4323 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4325 * font-ft.c: Don't include FT_FREETYPE_H here.
4326 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4327 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4328 (MFTInfo): New member charmap_index.
4329 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4330 (check_otf_filename): Renamed from check_filename. Return value
4332 (ft_set_property): This function deleted.
4333 (set_font_info): New function.
4334 (add_font_list): Argument changed. Add multiple fonts.
4335 (xft_list) [HAVE_XFT2]: New function.
4336 (ft_list) [not HAVE_XFT2]: New function.
4337 (ft_select): Add code for Xft.
4338 (close_ft): Likewise.
4339 (ft_open): Likewise.
4340 (ft_find_metric): Likewise.
4341 (ft_encode_char): Likewise.
4342 (ft_render): Likewise.
4344 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4346 2004-04-26 Kenichi Handa <handa@m17n.org>
4348 * textprop.c (mtext_attach_property): Declare the return type as
4351 2004-04-21 Kenichi Handa <handa@m17n.org>
4353 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4355 2004-04-09 Kenichi Handa <handa@m17n.org>
4357 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4359 (load_command): Setup above members.
4361 2004-04-05 Kenichi Handa <handa@m17n.org>
4363 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4365 2004-03-30 Kenichi Handa <handa@m17n.org>
4367 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4370 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4371 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4373 2004-03-29 Kenichi Handa <handa@m17n.org>
4375 * Version 1.0 Patch Level 2 released.
4377 2004-03-29 Kenichi Handa <handa@m17n.org>
4379 * charset.c (make_charset): Set charset->fully_loaded and
4380 charset->simple correctly. Don't try to get charset->min_char and
4381 charset->max_char for a charset of method subset and superset.
4382 Don't load a mapping file here.
4383 (mcharset__init): Set unified_max.
4384 (mcharset__load_from_database): Free a working plist.
4386 * coding.c (mcoding__fini): Free all malloced data.
4388 * input-gui.c (win_create_ic): Set control.as_image for preediting
4391 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4392 `count') to initialize the array.
4394 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4397 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4399 (mwin__create_window): Fix bug of setting a background pixel of a
4401 (mwin__adjust_window): Clear the window before drawing.
4403 * m17n-core.c (mdebug__report_object): Free array->objectes if
4405 (m17n_init_core): Don't set report_header_printed to 0 here.
4406 Fix debugging information.
4407 (m17n_fini_core): Set report_header_printed to 0 here.
4409 * m17n-core.h (mplist_deserialize): Extern it.
4411 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4413 * m17n.c (m17n_fini): Fix debugging information.
4415 * mtext.c (mtext__adjust_foramt): New function.
4417 * mtext.h (mtext__adjust_foramt): Extern it.
4419 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4421 * plist.h (mplist__deserialize): Don't extern it.
4423 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4424 elements of symbol_table to NULL. Report about created and freed
4425 symbols if MDEBUG_FINI is set.
4427 2004-03-22 Kenichi Handa <handa@m17n.org>
4429 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4431 * m17n.c (m17n_init): Fix the way of checking merror_code.
4433 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4435 2004-03-22 Kenichi Handa <handa@m17n.org>
4437 * fontset.c (realize_font_group): Adjust the font size by
4438 mfont__resize before selecting a font.
4440 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4442 2004-03-19 Kenichi Handa <handa@m17n.org>
4444 * Version 1.0 Patch Level 1 released.
4446 2004-03-19 Kenichi Handa <handa@m17n.org>
4448 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4450 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4452 2004-03-19 Kenichi Handa <handa@m17n.org>
4454 Re-apply the changes forgotten in the released version.
4456 * charset.c (mcharset__load_from_database): Call
4457 mchar_define_charset.
4459 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4460 (mconv_encode_range): Put Mcoding text property.
4462 2004-03-18 Kenichi Handa <handa@m17n.org>
4464 * draw.c (Mdepth): New variable.
4465 (visual_order): Delete unused local var `pos'.
4466 (compose_glyph_string): Fix for the case that gstring->glyphs is
4467 realloced. Stop generating glyphs at TO. Fix handling of
4469 (layout_glyphs): Get metrics of all glyphs in advance. Set
4470 lbearing and rbearing of base of composition glyph correctly.
4471 Handle left-overhang glyphs correctly.
4472 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4474 (dump_combining_code): Change the defualt off_x character to ".".
4475 (mdraw__init): Initialize Mdepth.
4477 * face.c (work_gstring): New variable
4478 (mface__init): Initialize work_gstring.
4479 (mface__fini): Free work_gstring.glyphs.
4480 (mface__realize): Don't handle videomode property here. Adjusted
4481 for the change of mfont__get_metric.
4482 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4484 * face.h (enum face_gc): Moved to m17n-X.c.
4486 * font.h (struct MFontDriver): Arguments of find_metric changed.
4487 (mfont__select): Prototype adjusted.
4488 (mfont__get_metric): Likewise.
4489 (mfont__ft_drive_otf): Likewise.
4490 (mfont__flt_run): Likewise.
4492 * font.c (mfont__select): New argument layouter. If layouter is
4493 different in the registered font, make a new copy of realized
4495 (mfont__get_metric): Argument changed. Get metrics of multiple
4497 (mfont_find): Call mfont__select with layouter as Mnil.
4499 * font-flt.c (FontLayoutContext): New member rfont.
4500 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4501 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4503 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4505 (NUM_POINTS): New macro.
4506 (MPointTable): New type.
4507 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4508 (mfont__ft_drive_otf): New argument rfont.
4510 * fontset.c (realize_font_group): Adjusted for the changed of
4512 (check_fontset_element): This function deleted.
4514 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4515 off the parent window if the preedit text is zero length.
4517 * internal-gui.h (struct MFrame): New members foreground,
4518 background, videomode, font.
4519 (struct MGlyphString): New member anti_alias.
4520 (MDrawPoint): New type.
4521 (mwin__draw_bitmap): Prototype deleted.
4522 (mwin__draw_points): Prototype added.
4524 * m17n-gui.h (MDrawControl): New member anti_alias.
4526 * m17n-gui.c (free_frame): Free frame->font.
4527 (mframe): Set the fontset of frame->face to the default fontset.
4529 * m17n-X.c (RGB_GC): New type.
4530 (enum gc_index): Renamed from enum face_gc. Member names changed.
4532 (struct MWDevice): Members foreground and background deleted. New
4533 member scratch_gc, gc_list.
4534 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4535 (free_device): Free GCs in device->gc_list.
4536 (get_rgb_gc): New function.
4537 (get_gc): Renamed and argument changed from get_color.
4538 (get_gc_for_anti_alias): New function.
4539 (xfont_find_metric): Arguments changed. Get metrics of multiple
4541 (set_region): Argument changed. Caller changed.
4542 (xfont_render): Allways set a font in gc.
4543 (x_error_handler, x_io_error_handler): Define only if
4544 X_SET_ERROR_HANDLER is defined.
4545 (mwin__open_device): Create device->scratch_gc. Set members
4546 foreground, background, and videomode of frame. Call
4547 XSetErrorHandler and XSetIOErrorHandler only if
4548 X_SET_ERROR_HANDLER is defined.
4549 (struct gc_list): Deleted.
4550 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4551 (mwin__realize_face): Adjusted for the change of the format of
4552 rface->info and the charge of set_region.
4553 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4554 (mwin__draw_box): Likewise.
4555 (mwin__draw_bitmap): This function deleted.
4556 (mwin__draw_points): New function.
4557 (mwin__verify_region): Adjusted for the change of the format of
4558 rface->info and the charge of set_region.
4559 (mwin__create_window): Inherit backgound pixel from parent.
4560 (mwin__dump_gc): Adjusted for the change of the format of
4563 2004-03-16 Kenichi Handa <handa@m17n.org>
4565 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4567 * input.c (M_key_alias): New variable.
4568 (handle_key): Try M_key_alias property of a key too.
4569 (minput__init): Initialize M_key_alias. Give that property to
4570 symbols in one_char_symbol. Fix bug of initializing
4573 * draw.c (compose_glyph_string): Don't handle
4574 ignore_formatting_char here. Include formatting characters in the
4575 range processed by a FTL.
4576 (layout_glyph_string): Handle ignore_formatting_char here.
4578 2004-03-12 Kenichi Handa <handa@m17n.org>
4580 * input-gui.c (win_create_ic): Enable bidi in status control.
4582 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4584 2004-03-09 Kenichi Handa <handa@m17n.org>
4586 * input.c (load_input_method): If title is not specified, use the
4587 input method name as title.
4589 * m17n-X.c (get_color): Make it static.
4590 (xim_create_ic, xim_destroy_ic, x_error_handler)
4591 (x_io_error_handler): Likewise.
4593 2004-03-01 Kenichi Handa <handa@m17n.org>
4595 * Version 1.0 released.
4598 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
4599 National Institute of Advanced Industrial Science and Technology (AIST)
4600 Registration Number H15PRO112
4602 This file is part of the m17n library.
4604 The m17n library is free software; you can redistribute it and/or
4605 modify it under the terms of the GNU Lesser General Public License
4606 as published by the Free Software Foundation; either version 2.1 of
4607 the License, or (at your option) any later version.
4609 The m17n library is distributed in the hope that it will be useful,
4610 but WITHOUT ANY WARRANTY; without even the implied warranty of
4611 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4612 Lesser General Public License for more details.
4614 You should have received a copy of the GNU Lesser General Public
4615 License along with the m17n library; if not, write to the Free
4616 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4617 Boston, MA 02110-1301, USA.