1 2009-08-13 Kenichi Handa <handa@m17n.org>
3 * Version 1.5.5 released.
5 2009-03-03 Kenichi Handa <handa@m17n.org>
7 * draw.c (compose_glyph_string): Check if category not Mnil.
9 2009-03-02 Kenichi Handa <handa@m17n.org>
11 * Version 1.5.4 released.
13 2009-02-25 Kenichi Handa <handa@m17n.org>
15 * m17n-core.c (report_object_array): For M-text and Plist, print
18 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
19 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
21 * input.c (get_candidate_list): Free unnecessary objects.
22 (take_action_list): Free plist.
24 2009-02-04 Kenichi Handa <handa@m17n.org>
26 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
28 2009-01-16 Kenichi Handa <handa@m17n.org>
30 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
33 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
36 2009-01-14 Kenichi Handa <handa@m17n.org>
38 * coding.c (decode_coding_iso_2022): Check invocation status
39 before updating charset0 and charset1.
41 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
43 2008-12-31 Kenichi Handa <handa@m17n.org>
45 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
48 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
50 * face.c (mface_get_prop): Fix strict aliasing bug.
51 (mface_put_prop): Likewise.
53 * m17n-gui.c (mframe): Fix strict aliasing bug.
55 2008-10-20 Kenichi Handa <handa@m17n.org>
57 * Version 1.5.3 released.
59 2008-10-06 Kenichi Handa <handa@m17n.org>
61 * draw.c (mdraw__init): Use TRUE only when
62 FRIBIDI_INTERFACE_VERSION is less than 3.
64 2008-10-03 Kenichi Handa <handa@m17n.org>
66 * database.c (mdatabase__find_file): Return a copy of filename if
67 it is absolute pathname.
69 2008-09-25 Kenichi Handa <handa@m17n.org>
71 * input.c (load_macros): Don't parse the action list here.
72 (load_im_info): Parse action lists of all macros.
74 2008-09-24 Kenichi Handa <handa@m17n.org>
76 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
78 2008-09-19 Kenichi Handa <handa@m17n.org>
80 * input.c (fully_initialize): Rename "@reload" to "-reload".
82 2008-09-17 Kenichi Handa <handa@m17n.org>
84 * m17n-flt.c (run_stages): Fix combining with a variable width
87 2008-08-04 Kenichi Handa <handa@m17n.org>
89 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
92 2008-07-22 Kenichi Handa <handa@m17n.org>
94 * input.c (fully_initialize): Fix previous change.
96 2008-07-19 Kenichi Handa <handa@m17n.org>
98 * input.c (fully_initialize): Fix previous change.
100 2008-07-14 Kenichi Handa <handa@m17n.org>
102 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
104 2008-07-14 Kenichi Handa <handa@m17n.org>
106 * input.c (fully_initialize): Handle C-M-1, etc.
108 2008-07-11 Kenichi Handa <handa@m17n.org>
110 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
112 2008-06-23 Kenichi Handa <handa@m17n.org>
114 * Version 1.5.2 released.
116 2008-06-23 Kenichi Handa <handa@m17n.org>
118 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
119 (M17NLIB_PATCH_LEVEL): Changed to 2.
120 (M17NLIB_VERSION_NAME): Changed "1.5.2".
122 2008-06-13 Kenichi Handa <handa@m17n.org>
124 * input.c (minput_config_file): Comment fixed for man-page.
126 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
128 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
130 2008-05-24 Kenichi Handa <handa@m17n.org>
132 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
134 2008-05-23 Kenichi Handa <handa@m17n.org>
136 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
137 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
139 (libm17n_gd_la_LIBADD): Likewise.
141 * input.c (take_action_list): Fix debug info.
143 2008-05-14 Kenichi Handa <handa@m17n.org>
145 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
146 (run_stages): Fix index of g_indices.
148 2008-04-03 Kenichi Handa <handa@m17n.org>
150 * draw.c (compose_glyph_string): Don't run flt striding over the
152 (get_gstring): Don't use the cached gstring if cursor position is
155 2008-04-02 Kenichi Handa <handa@m17n.org>
157 * input.c (integer_value): Delete the 3rd arg VALUE.
158 (resolve_expression): Adjust the call of integer_value.
159 (take_action_list): Likewise.
161 2008-03-06 Kenichi Handa <handa@m17n.org>
163 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
166 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
168 * Version 1.5.1 released.
170 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
172 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
173 HAVE_FREETYPE is defined.
175 * font.h (OTF_Tag): Be sure that it is defined in any cases.
177 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
179 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
182 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
184 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
186 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
188 * input.c (parse_action_list): Check M_candidates.
189 (get_im_info): If key is Mnil, be sure to set im_info->states to a
192 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
194 * input.c (integer_value): Fix interpretation of "@-N".
196 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
198 * input.c (get_following_char): Fix interpretation of POS.
199 (get_following_char): Fix interpretation of "@+N".
201 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
203 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
206 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
208 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
210 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
212 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
213 (run_command): Check if clustering now before calling
214 UPDATE_CLUSTER_RANGE.
216 2008-01-06 Kenichi Handa <handa@m17n.org>
218 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
220 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
222 * m17n-X.c (xft_find_metric): Set g->g.measured.
224 * m17n-flt.c (Mequal): New variable.
225 (m17n_init_flt): Initialize it.
226 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
227 into a new member facility.
228 (load_command): Modify parsing of Mfont_facility.
229 (run_rule): Adjuted for the change of FontLayoutCmdRule.
230 (run_otf): Adjusted metrics if a->back is nonzero.
232 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
234 * Version 1.5.0 released.
236 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
238 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
240 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
241 (run_rule): Check if a font has the specific glyph correctly.
243 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
244 MDEBUG_FONT_FLT to MDEBUG_FLT.
246 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
248 * font-flt.c: Delete it.
250 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
252 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
253 TO for the rule of SRC_HAS_GLYPH.
255 * draw.c (run_flt): Argument changed.
256 (compose_glyph_string): Adjusted for the above change.
258 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
260 * plist.c (read_mtext_element): Don't free the malloced buffer.
262 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
264 * m17n-core.h (merror_code): Extern it.
266 * m17n-misc.h (merror_code): Don't extern it.
268 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
270 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
272 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
274 * draw.c (compose_glyph_string): Check g->rface->layouter, not
275 g->rface->rfont->layouter.
277 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
279 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
280 (run_rule): Use ctx->encoded_offset.
281 (run_command): Likewise.
282 (run_stages): Set ctx->encoded_offset.
284 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
286 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
287 bit-size of MFLTGlyph->internal.
289 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
291 * draw.c (visual_order): Exclude the last anchor glyph from the
294 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
296 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
297 (run_stages): Likewise.
298 (load_flt): Unref top after checking plist.
300 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
302 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
304 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
306 * m17n-flt.c (Mcombining): New variable.
307 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
308 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
309 SRC_HAS_GLYPH and SRC_OTF_SPEC.
310 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
312 (load_command): Adjusted for the above changes.
313 (run_rule): Likewise.
314 (combining_code_from_class): Delete it.
315 (mflt_get): Check flt->name against Mcombining, not Mt.
317 * internal-flt.h (Mcombining): Extern it.
319 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
320 combining characters.
322 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
324 * face.c (mface__realize): Reset measured flag before calling
327 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
328 (setup_combining_coverage): New function.
329 (setup_combining_flt): New function.
330 (mflt_get): If flt is not found, return NULL. If name if Mt,
331 call setup_combining_flt.
332 (mflt_run): For debugging, print font family name.
334 * font-ft.c (ft_render): Fix handling of baseline_offset.
335 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
336 (ft_render): Check pixel_mode to determine anti_alias.
338 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
339 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
340 (xfont_render): Set baseline_offset in pixel.
341 (xft_render): Fix handling of baseline_offset.
343 * draw.c (run_flt): Set font.font.family.
344 (compose_glyph_string): Fix handling of combining characters.
346 * fontset.c (try_font_list): Check if the named flt is surely
349 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
351 * draw.c (analyse_bidi_level): New function.
352 (visual_order): Do reordering using the already decided
354 (compose_glyph_string): Decide bidi-level before calling flt.
356 * m17n-flt.c (mflt_run): Fix typo.
358 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
360 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
362 * draw.c (visual_order): Don't rely on the width of glyphs.
363 (run_flt): Fix culculation of g->g.to.
365 * m17n-flt.c (run_rule): Don't set error code here.
366 (run_cond): Likewise.
367 (run_otf): Fix culculation of xoff and yoff.
368 (run_command): Don't set error code here.
372 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
373 (xfont_find_metric): Set glyph's yadv to 0.
374 (xft_find_metric): Likewise.
376 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
377 (ft_find_metric): Adjust glyph's metrics.
378 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
379 (ft_drive_otf): Set mark glyph's xadv to 0.
381 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
384 2007-10-29 Kenichi Handa <handa@m17n.org>
386 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
387 (mflt_get): Adjusted for the argument change.
388 (mflt_name): Adjusted for the return value change.
390 * m17n-flt.c (Mgenerator, Mend): New variables.
391 (flt_min_coverage, flt_max_coverage): New variables.
394 (Mfont_has): Renamed from Mexist. Referrers chagned.
395 (gen_otf_tag): Handle the trailing whitespaces.
396 (otf_count_features, otf_store_features): Fix for negative features.
397 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
398 (load_otf_command): Likewise.
399 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
400 (load_flt): Argument changed. Caller changed.
401 (free_flt_list): New function.
402 (run_rule): Adjusted for the change of FontLayoutContext.
403 (mflt_run): Adjusted for the change of FontLayoutContext.
405 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
406 (m17n_fini_win): Call m17n_fini_flt.
408 * m17n-gui.h: Include m17n-flt.h.
410 * m17n-gd.c: Adusted for the change of MGlyph.
412 * m17n-X.c: Adusted for the change of MGlyph.
413 (xft_check_otf, xft_drive_otf): New functions.
415 * internal-gui.h (MGlyph): Modified for new FLT handling.
417 * fontset.c (try_font_list): Adusted for the change of MGlyph.
419 * font-ft.c: Adjusted for the change of MGlyph.
420 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
421 (get_glyph_metric): Deleted.
422 (ft_check_otf): New function.
423 (ft_drive_otf): New fucntion.
425 * font.c: Adjusted for the change of MGlyph.
426 (mfont__init): Don't call mfont__flt_init.
427 (mfont__fini): Don't call mfont__flt_fini.
428 (mfont__get_glyph_id, mfont__get_metrics): New functions.
430 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
431 (MFLTFontForRealized): New struct.
432 (struct MFontDriver): New members check_otf and drive_otf.
433 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
435 * face.c: Adjusted for the change of MGlyph.
437 * draw.c: Adjusted for the change of MGlyph.
439 * m17n.c (m17n_init): Don't call mchar_init.
441 * m17n-core.c (m17n_init_core): Call mchar_init.
443 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
445 * input.c: Include "m17n.h" instead of "m17n-gui.h".
447 * chartab.c (mchartable): Initialize table->min_char to -1.
448 (mchartable_min_char): New function.
449 (mchartable_max_char): New function.
451 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
452 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
454 2007-10-12 Kenichi Handa <handa@m17n.org>
456 * m17n-core.h (Mcharset): Extern it.
457 Move detabase related declarations from m17n.h.
459 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
460 (struct _MFLTOtfFeatures): New struct.
461 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
462 (struct _MFLTFont): Delete otf, add check_otf.
463 (MCHAR_INVALID_CODE): Define it.
465 * plist.c (read_mtext_element): Simplify the code.
467 * m17n.h: Move database related declarations to m17n-core.h
468 (Mharset): Don't extern it.
470 * m17n.c (m17n_init): Don't call mdatabase__init.
472 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
475 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
476 (Mexist): New variable.
477 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
478 (FontLayoutCmdRule): New member src.exist.
479 (parse_otf_command): Handle gsub_count and gpos_count separately.
480 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
481 (load_command): Handle the command "exist".
482 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
483 (run_rule): Handle the case SRC_EXIST.
484 (run_otf): Adjusted for the change of MFLTOtfSpec.
485 (run_command): Check the range of FROM.
486 (check_otf_spec): Delete it.
487 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
489 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
490 (mflt_find): Call font->check_otf instead of check_otf_spec.
491 (mflt_run): Keep the metrics in 26.6 fixed point.
493 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
494 (m17n_init_core): Call mdatabase__init.
496 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
498 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
501 * font-flt.c (Mexist): New variable.
502 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
503 (FontLayoutCmdRule): New member src.exist.
504 (load_category_table): Use isalnum, not isalpha.
505 (load_command): Check the command "exist".
506 (run_rule): Hande the case SRC_EXIST.
507 (run_command): Check the range of FROM.
508 (mfont__flt_init): Initialize Mexist.
510 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
512 * database.h (mdatabase__load_charset_func): Extern it.
514 * database.c: Include m17n-core.h instead of m17n.h.
515 (load_chartable): Use mtext__from_data.
516 (load_charset): Moved to charset.c
517 (load_database): Call mdatabase__load_charset_func instead of
519 (mdatabase__load_charset_func): New variable.
520 (mdatabase__init): Initialize mdatabase__load_charset_func and
521 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
522 (mdatabase__save): Use fwrite, not mconv_encode_stream.
523 (Mcharset): Declare it here.
525 * charset.c: Include "database.h.".
526 (load_charset): Moved from database.c.
527 (mcharset__init): Initialize mdatabase__load_charset_func, don't
530 * character.c (mchar_define_property): Call mdatabase_find directly.
531 (mchar_get_prop): Call mdatabase_add directly.
532 (mchar_put_prop): Call mdatabase_load directly.
533 (mchar_get_prop_table): Likewise.
535 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
536 (libm17n_la_SOURCES): Remove database.[ch].
537 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
539 2007-09-18 Kenichi Handa <handa@m17n.org>
541 * face.c (mface__realize): Try Freetype based font at first.
543 * font.c: Include <ctype.h>
545 2007-09-16 Kenichi Handa <handa@m17n.org>
547 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
549 (run_otf): Call font->get_metrics, not font->get_metric.
550 (run_stages): Likewise.
551 (CHECK_FLT_COVERAGE): New macro.
552 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
553 (check_otf_spec): New function.
554 (m17n_fini_flt): Unref flt->coverage.
555 (mflt_find): Argument changed.
556 (mflt_name): New function.
557 (mflt_coverage): Use CHECK_FLT_COVERAGE.
559 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
560 (mflt_find): Prototype adjusted.
561 (mflt_name): Extern it.
563 2007-09-14 Kenichi Handa <handa@m17n.org>
565 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
567 * font-flt.c (run_otf): Make debug info printing comaptible with
569 (run_command): Likewise.
570 (mfont__flt_run): Likewise.
572 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
573 invalid only when it's negative.
575 (run_command): Likewise.
576 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
578 2007-09-10 Kenichi Handa <handa@m17n.org>
580 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
581 (struct _MFLTFont): Prototype of get_glyph_id changed.
583 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
585 (GAPPEND): Delete this macro.
586 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
587 for the change of MFLTGlyph. Caller changed.
588 (run_otf): Simply calls font->get_glyph_id.
589 (run_command): Reset g->encoded and g->measured for direct code.
590 (positioning): Delete this function.
591 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
593 2007-09-07 Kenichi Handa <handa@m17n.org>
595 * draw.c (compose_glyph_string): Improve script detection.
597 2007-09-06 Kenichi Handa <handa@m17n.org>
599 * m17n-flt.h (mflt_get): Extern it.
601 * m17n-flt.c (run_stages): Call positioning only if
602 font->get_metric is non-NULL.
603 (CHECK_FLT_STAGES): Fix typo.
604 (mflt_get): New function.
606 * font-flt.c (mfont__flt_run): Improve debug info printing.
608 2007-09-04 Kenichi Handa <handa@m17n.org>
610 * m17n-flt.c (MFontLayoutTable): Delete this type.
611 (struct _MFLT): New member mdb and coverage.
612 (list_flt): Set flt->mdb.
613 (load_generator): Argument and return value changed. Caller
615 (get_font_layout_table): Delete this function.
616 (run_stages): Argument changed. Caller changed.
617 (CHECK_FLT_STAGES): New macro.
618 (mfont__flt_encode_char): Argument changed.
619 (mflt_find): Likewise.
620 (mflt_coverage): New function.
621 (mflt_run): Argument changed.
622 (mdebug_dump_flt): Likewise.
624 * m17n-flt.h (mflt_coverage): Extern it.
625 (mflt_find): Prototype adjusted.
627 2007-09-03 Kenichi Handa <handa@m17n.org>
629 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
631 * database.c (mdatabase__props): New function.
633 * database.h (mdatabase__props): Extern it.
635 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
637 (struct _MFLTFont): Add suitable_p.
638 (mflt_find): Extern it.
640 * m17n-flt.c: Include "database.h".
641 (struct _MFLT): New struct.
642 (list_flt): New function.
643 (load_flt): Don't update flt_list.
644 (get_font_layout_table): Use flt_list.
645 (m17n_init_flt): Don't initialize flt_list.
646 (m17n_fini_flt): Adjusted for the change of flt_list.
647 (mflt_find): New function.
648 (mflt_run): Fix debug printing.
650 2007-08-23 Kenichi Handa <handa@m17n.org>
652 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
653 (run_stages): Print separator in encoded string as "|".
655 2007-08-23 Kenichi Handa <handa@m17n.org>
657 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
658 the glyph is already handled by OTF.
660 2007-08-21 Kenichi Handa <handa@m17n.org>
662 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
664 2007-08-20 Kenichi Handa <handa@m17n.org>
666 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
669 2007-08-17 Kenichi Handa <handa@m17n.org>
671 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
673 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
674 (MFLTFont): Prototype of the member drive_otf adjusted.
676 * m17n-flt.c (run_stages): Fix handling of padding.
678 * font-ft.c (get_glyph_metric): New function.
679 (DEVICE_DELTA): Return 26.6 fixed point value.
680 (adjust_anchor): Likewise.
681 (mfont__ft_drive_otf): Use get_glyph_metric.
683 * font-flt.c (mfont__flt_run): Pay attention to padding on
686 2007-08-16 Kenichi Handa <handa@m17n.org>
688 * m17n-flt.c (run_stages): Fix typo.
690 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
692 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
693 Adjusted for the argument change of adjust_anchor. Calculte based
696 2007-08-15 Kenichi Handa <handa@m17n.org>
698 * charset.c (mcharset__load_from_database): Set mdebug_flag
699 instead of mdebug_mask.
701 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
704 * database.c (load_database): Set mdebug_flag instead of
706 (mdatabase__load_for_keys): Likewise.
708 * draw.c: Include "internal-flt.h".
709 (dump_combining_code): Don't subtract 128 from combining code
712 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
714 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
716 (run_cond): Likewise.
718 (run_command): Likewise.
719 (mfont__flt_run): Change format of debug info.
721 * font-ft.c: Include "internal-flt.h".
722 Set mdebug_flag instead of mdebug_mask.
723 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
725 * input.c: Set mdebug_flag instead of mdebug_mask.
726 (shift_state): New MDEBUG_FLAG macro.
727 (preedit_commit): Likewise.
730 * internal-flt.h: New file.
732 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
733 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
734 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
735 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
736 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
737 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
738 these macros to internal-flt.h.
740 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
742 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
743 (enum MDebugMaskBit): Delete this enum.
744 (enum MDebugFlag): New enum.
745 (mdebug__flag): Don't extern it.
746 (mdebug__flags): Extern it.
747 (MDEBUG_FLAG): New macro.
748 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
749 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
750 (MDEBUG_PRINT_TIME): Likewise.
752 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
753 (xfont_list): Likewise.
755 * m17n-core.c (mdebug__flag): Delete this variable.
756 (mdebug__flags): New variable.
757 (SET_DEBUG_FLAG): Make it a function.
758 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
759 (m17n_fini_core): Likewise.
761 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
762 (m17n_fini_win): Likewise.
764 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
766 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
767 (m17n_fini): Likewise.
769 * symbol.c (msymbol__free_table): Adjusted for the change of
772 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
773 (BASICHEADERS): Add m17n-flt.h.
774 (FLT_SOURCES): New variable.
775 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
776 (libm17n_flt_la_LDFLAGS): Likewise.
778 * m17n-flt.h: New file.
780 * m17n-flt.c: New file created by modifying font-flt.c.
782 2007-07-13 Kenichi Handa <handa@m17n.org>
784 * Version 1.4.0 released.
786 2007-07-12 Kenichi Handa <handa@m17n.org>
788 * input.c: Fix doxygen @ref commands.
790 2007-07-10 Kenichi Handa <handa@m17n.org>
792 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
794 2007-07-09 Kenichi Handa <handa@m17n.org>
796 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
798 * m17n.h: Include m17n-core.h if not yet done. Use macros
799 M17N_BEGIN_HEADER and M17N_END_HEADER.
801 * m17n-gui.h: Likewise.
803 * m17n-misc.h: Likewise.
805 2007-06-13 Kenichi Handa <handa@m17n.org>
807 * font-flt.c (load_command): Prepend "^" in the regular expression.
809 2007-06-11 Kenichi Handa <handa@m17n.org>
811 * language.c (mlanguage_name_list): Fix previous change.
813 * coding.c (mcoding__load_from_database): Add aliases in
814 coding_definition_list.
816 2007-06-10 Kenichi Handa <handa@m17n.org>
818 * language.c (mlanguage_name_list): Fix previous change.
820 2007-06-08 Kenichi Handa <handa@m17n.org>
822 * input.c (update_candidate): Copy candidate_list earlier.
823 (re_init_ic): Provide pseudo initialize state if none.
825 2007-06-05 Kenichi Handa <handa@m17n.org>
827 * input.c (preedit_insert): Print debug information.
829 * database.c (expand_wildcard_database): New function.
830 (mdatabase_list): Fix handling of wildcard database.
832 * language.c (load_lang_name): New function.
833 (mlang__fini): Cancel the last two changes.
834 (mlanguage_name_list): New arg script and territories. Use
837 * m17n.h (mlangauge_name_list): Adjusted.
839 2007-06-04 Kenichi Handa <handa@m17n.org>
841 * input.c (open_im): Check if the input method has at least one
844 2007-06-01 Kenichi Handa <handa@m17n.org>
846 * input.c (shift_state): Change the format of debug print.
847 (preedit_commit): New arg need_prefix. Caller changed.
848 (update_candidate): Copy candidate_list.
849 (take_action_list): Likewise.
850 (handle_key): Change the format of debug print.
852 * font-flt.c (load_flt): Ignore unknown directives.
854 2007-05-25 Kenichi Handa <handa@m17n.org>
856 * m17n-core.c (mdebug__unregister_object): Small optimization.
858 * database.c (find_file): Merged into get_database_file.
859 (get_database_file): New arg result. Caller changed.
860 (mdatabase__check): Fix the logic.
862 2007-05-24 Kenichi Handa <handa@m17n.org>
864 * database.c (find_database): If unprocessed wildcard database is
865 found, register database filed and recursively call find_database.
866 (free_db_info): Unref db_info->properties.
867 (register_database): New arg properties. Delete code for
868 initializing mdatabase__list.
869 (register_databases_in_files): Argument changed. Caller changed.
870 (mdatabase__update): Don't list files by glob here.
871 (mdatabase_list): If unprocessed wildcard database is found,
872 register database filed and recursively call mdatabase_list.
874 * database.h (enum MDatabaseStatus): New enum
875 MDB_STATUS_AUTO_WILDCARD.
877 * input.c (load_branch): Fix previous change.
878 (update_global_info): If the global database is not found, return -1.
880 2007-05-23 Kenichi Handa <handa@m17n.org>
882 * database.c (Mversion): New variable.
883 (mdatabase__init): Initialize it.
884 (register_database): New arg properties. Caller changed.
885 (register_databases_in_files): Don't check version here.
886 (mdatabase__update): Likewise.
888 * database.h (MDatabaseInfo): New member properties.
890 2007-05-21 Kenichi Handa <handa@m17n.org>
892 * language.c: Include <ctype.h>
893 (mlanguage__info): Use strncasecmp (not memcmp).
894 (mlanguage_name): Downcase language name for backward
897 * input.c (filter): Don't check Mlanguage property of
900 2007-05-18 Kenichi Handa <handa@m17n.org>
902 * language.c (mlanguage_name): Fix it to handle M-text English
905 * input.c (config_command): Set NAME before using it.
906 (load_branch): Try to resolve a map name by variables.
908 2007-05-17 Kenichi Handa <handa@m17n.org>
910 * language.c (mlang__fini): Fix previous change.
912 2007-05-16 Kenichi Handa <handa@m17n.org>
914 * plist.c (free_plist): Cancel the last change.
915 (write_element): Check if PLIST is nested.
916 (mplist__from_plist): Label a plist as nested if appropriate.
917 (mplist__from_alist): Label a plist as nested.
918 (mplist__conc): Check the value of PL before referring it. Label
919 a plist as nested if appropriate.
920 (mplist_copy): Label a plist as nested if appropriate.
921 (mplist_put_func): Return Mnil if KEY is a managing key.
922 (mplist_push): Label a plist as nested if appropriate.
924 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
927 * language.c (mlang__fini): Unref each element of langname_list.
929 2007-05-14 Kenichi Handa <handa@m17n.org>
931 * language.c: Include <string.h> and <locale.h>.
932 (langname_list): New variable.
933 (load_lang_script_list): Exclude invalid list elements.
934 (mlang__init): Initialize langname_list.
935 (mlang__fini): Unref langname_list.
936 (mlanguage__info): Adjusted for the change of English
937 name (symbol->M-text).
938 (mlanguage_name): Label it as obsolete.
939 (mlanguage_name_list): New function.
941 * m17n.h (mlanguage_name_list): Extern it.
943 * locale.c (make_locale): Fix setting of members of locale.
945 * plist.c (free_plist): Unref also nested plist.
947 2007-05-11 Kenichi Handa <handa@m17n.org>
949 * coding.c (mconv_reset_converter): Set internal->used to 0.
951 2007-05-08 Kenichi Handa <handa@m17n.org>
953 * input.c (check_description): Force copying the translated text.
955 2007-05-02 Kenichi Handa <handa@m17n.org>
957 * input.c (minput_save_config): Unref unnecessary plist. Use
958 free_im_list to free im_config_list.
960 2007-04-20 Kenichi Handa <handa@m17n.org>
962 * input.c (config_command): Fix previous change again.
963 (config_variable): Likewise.
964 (minput_config_command): Fix for the case of setting back to
966 (minput_config_variable): Likewise.
967 (minput_save_config): Include nil as documentation of customized
970 2007-04-05 Kenichi Handa <handa@m17n.org>
972 * input.c (config_command): Fix previous change.
973 (config_variable): Likewise.
975 * plist.c (mplist_get_func): Fix for backward compatiblity.
977 2007-04-04 Kenichi Handa <handa@m17n.org>
979 * input.c (minput_get_command, minput_config_command): Fix example
982 2007-03-29 Kenichi Handa <handa@m17n.org>
984 These changes are to avoid unsafe casting of a function pointer.
986 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
987 (struct MFace): New member hook.
989 * face.c (serialize_face): Adjusted for the change of MFace.
990 (deserialize_face): Likewise.
991 (mface__init): Likewise. Use msymbol_put_func.
992 (mface__realize): Adjusted for the change of MFace. Avoid
994 (mface_get_prop): Adjusted for the change of MFace.
995 (mface_put_prop): Likewise.
996 (mface_get_hook): New function.
997 (mface_put_hook): New function.
998 (mface_update): Adjusted for the change of MFace.
1000 * input-gui.c (win_callback): Use mplsit_get_func.
1001 (minput__win_init): Use mplsit_put_func.
1003 * input.c (take_action_list): Use mplist_get_func.
1004 (init_ic_info): Likewise.
1005 (fini_ic_info): Likewise.
1006 (minput_callback): Likewise.
1007 (minput__init): Use mplist_put_func.
1009 * language.c (mlang__init): Use msymbol_put_func.
1011 * m17n-core.h (M17NFunc): New function type.
1012 (M17N_FUNC): New macro.
1013 (msymbol_put_func, msymbol_get_func): Extern them.
1014 (mplist_put_func, mplist_get_func): Extern them.
1016 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1018 * m17n-gui.c (mframe): Add a proper casting.
1020 * plist.h (struct MPlist): Make the member val a union.
1021 (MPLIST_VAL): Adjusted for the above change.
1022 (MPLIST_FUNC): New macro.
1023 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1025 * plist.c (mplist_put_func, mplist_get_func): New functions.
1027 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1028 (msymbol_put_func, msymbol_get_func): New functions.
1030 * textprop.c (mtext_serialize): Use msymbol_get_func.
1031 (mtext_deserialize): Likewise.
1033 2007-03-28 Kenichi Handa <handa@m17n.org>
1035 * input.c (get_candidate_list): Avoid unnecessary unref.
1037 2007-03-23 Kenichi Handa <handa@m17n.org>
1039 * database.c (mdatabase__update): Unref plist at the tail.
1041 2007-03-21 Kenichi Handa <handa@m17n.org>
1043 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1045 (config_command): Fix for the case that configuration is
1047 (config_variable): Likewise.
1048 (minput_config_command): If keyseqlist is an empty list, cancel
1050 (minput_config_variable) If value is an empty list, cancel the
1052 (minput_save_config): Handle cancellation of config and customize
1055 2007-03-15 Kenichi Handa <handa@m17n.org>
1057 * input.c (minput_config_variable): Check custom->vars (not
1060 2007-03-01 Kenichi Handa <handa@m17n.org>
1062 * input.c (reload_im_info): Setup cmds, vars, and title of
1064 (check_variable_value): Fix the return value.
1066 * database.c (mdatabase__check): If necessary, update database and
1069 2007-02-28 Kenichi Handa <handa@m17n.org>
1071 * database.c (get_dir_info): Set dir_info->status to
1072 MDB_STATUS_OUTDATED.
1073 (check_version): New function.
1074 (register_database): Don't call find_database.
1075 (register_databases_in_files): Don't register a database of
1077 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1079 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1080 and MDB_STATUS_OUTDATED.
1082 * font.h (struct MFont): Types of members type, source, and
1083 spacing changed to unsigned.
1085 * internal-gui.h (struct): Types of members category and type
1086 changed to unsigned.
1088 * internal.h (struct MText): Types of members format and coverage
1089 changed to unsigned.
1091 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1092 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1094 2007-02-23 Kenichi Handa <handa@m17n.org>
1096 * input.c (Mpop): New variable.
1097 (fully_initialize): Initialize Mpop.
1098 (parse_action_list): Handle Mpop.
1099 (take_action_list): Likewise.
1100 (handle_key): When a key is unhandled, shift to the initial state
1101 only if the current state has no branch action.
1103 2007-02-12 Kenichi Handa <handa@m17n.org>
1105 * input.c (get_preceding_char): Unref mt if necessary.
1106 (get_following_char): Likewise.
1107 (parse_action_list): Fix handling of `insert' action as
1109 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1110 (take_action_list): Check invalid candidate list.
1112 2007-02-06 Kenichi Handa <handa@m17n.org>
1114 * input.c (integer_value): Check also ic->produced for @-N.
1116 2007-01-26 Kenichi Handa <handa@m17n.org>
1118 * database.c (mdatabase__update): Check mdatabase__dir_list from
1121 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1123 2007-01-12 Kenichi Handa <handa@m17n.org>
1125 * input.c (handle_key): Handle a branch action of the initial
1128 2007-01-10 Kenichi Handa <handa@m17n.org>
1130 * m17n-gd.c (gd_render): Delete superfluous line.
1132 2006-12-26 Kenichi Handa <handa@m17n.org>
1134 * m17n.h (minput_callback): Extern it.
1136 * input.h (minput__callback): Delte extern.
1138 * input.c (get_surrounding_text): Adjusted for the change of
1139 minput__callback to minput_callback.
1140 (delete_surrounding_text): Likewise.
1141 (minput_create_ic): Likewise.
1142 (minput_destroy_ic): Likewise.
1143 (minput_filter): Likewise.
1144 (minput_set_spot): Likewise.
1145 (minput_toggle): Likewise.
1146 (minput_reset_ic): Likewise.
1148 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1149 and ic->candidate_to to 0.
1150 (minput_callback): Renamed from minput__callback.
1152 * input-gui.c (win_callback): Adjusted for the change of
1153 minput__callback to minput_callback.
1155 2006-12-15 Kenichi Handa <handa@m17n.org>
1157 * font-ft.c (ft_add_font): Fix typo.
1159 2006-12-06 Kenichi Handa <handa@m17n.org>
1161 * Version 1.3.4 released.
1163 2006-11-16 Kenichi Handa <handa@m17n.org>
1165 * input.c (parse_action_list): Allow (undo 0).
1166 (adjust_markers): New function.
1167 (preedit_insert, preedit_delete): Call adjust_markers.
1168 (preedit_replace): New function.
1169 (update_candidate): Call preedit_replace instead of preedit_insert
1171 (filter): When ic_info->commit_key_head is nonzero, shift input
1172 event keys even if there's no committed text.
1174 2006-11-10 Kenichi Handa <handa@m17n.org>
1176 * input.h (MInputContextInfo): New member commit_key_head.
1178 * input.c (preedit_commit): Update ic_info->commit_key_head.
1179 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1180 (filter): When committed, shift keys by ic_info->commit_key_head.
1182 2006-10-30 Kenichi Handa <handa@m17n.org>
1184 * input.c (preedit_delete): Fix typo.
1185 (take_action_list): Print more debugging information. Allow
1186 variable in arg of 'select' and `pushback'.
1188 * database.c (gen_database_name): Don't put extra space.
1189 (load_database): Print debugging information.
1190 (register_databases_in_files): New arg headlen. Callers changed.
1191 (mdatabase__load_for_keys): Shorten debugging information.
1192 (mdatabase_load): Don't print debugging information here.
1194 2006-10-27 Kenichi Handa <handa@m17n.org>
1196 * input.c (marker_code): New arg surrounding. Callers changed.
1197 (surrounding_pos): Check if name[0] == '@'.
1198 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1199 (take_action_list): Likewise.
1200 (get_preceding_char): If POS is zero, always call
1201 get_surrounding_text.
1203 2006-10-19 Kenichi Handa <handa@m17n.org>
1205 * input.c (load_variables): Fix setting of `global'.
1207 2006-10-16 Kenichi Handa <handa@m17n.org>
1209 * draw.c (draw_background): Be sure to set *to_x.
1210 (render_glyph_string): If from == to, just return.
1212 2006-10-18 Kenichi Handa <handa@m17n.org>
1214 * database.c (get_dir_info): Return NULL if the directory name is
1216 (register_databases_in_files): Call register_database with
1218 (mdatabase__update): Fix logic. Call register_database with
1220 (mdatabase_define): Call register_database with
1221 MDB_STATUS_EXPLICIT.
1223 * input.c (delete_surrounding_text): Be sure to set members
1224 preceding_text and following_text to NULL.
1225 (shift_state): Save variable values in ic_info->vars_saved.
1226 (preedit_commit): Don't print debug information here. Don't
1227 change ic_info->keys here.
1228 (get_candidate_list): Don't ref plist.
1229 (take_action_list): Don't unref return value of
1230 get_candidate_list. For undo, reset ic->produced and recover
1231 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1233 (init_ic_info): Set ic_info->vars_saved.
1234 (fini_ic_info): Unref ic_info->vars_saved.
1235 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1237 (filter): Be sure to set members preceding_text and following_text
1238 to NULL. Print debug information about produced text. Delete
1239 processed keys from ic_info->keys.
1241 * input.h (MInputContextInfo): New member vars_saved.
1243 2006-10-16 Kenichi Handa <handa@m17n.org>
1245 * database.c (mdatabase__update): Fix the way to get db_info.
1247 2006-10-02 Kenichi Handa <handa@m17n.org>
1249 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1250 `size' changed to 24.
1252 * font.c (xlfd_unparse_name): Adjusted for the change of
1254 (font_score): Likewise.
1255 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1257 * m17n-X.c (MFontX, _MFontX): Deleted.
1258 (SET_SIZE, HAVE_SIZE): Deleted.
1259 (free_display_info): Adjusted for the change of
1260 disp_info->font_list format.
1261 (xfont_registry_list): Likewise.
1262 (xfont_open): Likewise.
1263 (xfont_list): Likewise.
1264 (xfont_encode_char): Ignore size to find a realized font.
1265 (MRealizedFontXft): Change the order of members to make it
1266 compatible with MRealizedFontFT.
1268 2006-09-27 Kenichi Handa <handa@m17n.org>
1270 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1271 (mfont_close): Add comments.
1273 * mtext-lbrk.c (mtext_line_break): Add comment.
1275 2006-09-26 Kenichi Handa <handa@m17n.org>
1277 * input.c (minput_get_description): Handle description about
1278 inclusion-only input methods.
1280 2006-09-21 Kenichi Handa <handa@m17n.org>
1282 * input.c (M_gettext): New variable.
1283 (fully_initialize): Initialize M_gettext.
1284 (check_description): New function.
1285 (load_commands): Call check_description.
1286 (config_all_commands): Be sure to unref pl.
1287 (load_variables): Call check_description.
1288 (config_all_variables): Be sure to unref pl.
1289 (load_im_info): Call check_description.
1291 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1293 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1294 and bind_textdomain_codeset.
1296 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1298 2006-09-15 Kenichi Handa <handa@m17n.org>
1300 * input.c (reload_im_info): Update custom and global info.
1301 (init_ic_info): Fix previous change.
1303 2006-09-14 Kenichi Handa <handa@m17n.org>
1305 * database.c: Include <libgen.h>.
1306 (mdatabase__lock): Make a directory if necessary.
1308 * input.c (resolve_command): Adjusted for the format change of
1309 configured_cmds member.
1310 (load_commands, load_variables): Fix for errornous data handling.
1311 (config_command, config_variable): New function.
1312 (config_all_commands, config_all_variables): Renamed from
1313 config_commands and config_variables. Utilize the above function.
1314 (check_variable_value): Argument changed. Callers changed.
1315 (load_im_info): Call config_all_commands and config_all_variables.
1316 (init_ic_info): Adjusted for the format change of configured_vars
1318 (minput__init): Initialize Mcustomized, Mconfigured, and
1320 (Mcustomized, Mconfigured, Minherited): New variables.
1321 (minput_get_command): Be sure to return NULL if an input method
1322 use no local command.
1323 (minput_get_variable): Be sure to return NULL if an input method
1324 use no local variable.
1325 (minput_config_command, minput_config_variable)
1326 (minput_save_config): Adjusted for the format change of
1327 configured_cmds and configured_vars members.
1329 * plist.c (write_element): Delete superfluous ':'.
1331 2006-09-13 Kenichi Handa <handa@m17n.org>
1333 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1334 (minput_config_file): Extern it.
1336 * draw.c (Minherited): Declaration moved to input.c.
1337 (mdraw__init): Don't initialize Minherited here.
1339 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1341 2006-09-07 Kenichi Handa <handa@m17n.org>
1343 * textprop.c (mtext_serialize): Call mplist__serialize with the
1346 * plist.h (mplist__serialize): Prototype adjusted.
1347 (mplist__assq): Extern it.
1349 * plist.c: Include <ctype.h>
1350 (PUTC, PUTS): New macros.
1351 (write_symbol): New function.
1352 (write_element): New arg indent.
1353 (dump_string, dump_plist_element): Delete them.
1354 (mplist__from_string): New arg pretty.
1355 (mplist__assq): New function.
1356 (mdebug_dump_plist): Use write_element.
1358 * mtext.c (mtext_cat_char): Allocate more memory.
1359 (mdebug_dump_mtext): Don't escal a newline character.
1361 * m17n.h (minput_get_command, minput_get_variable)
1362 (minput_config_command, minput_config_variable)
1363 (minput_save_config): Extern them.
1365 * m17n-core.c: Include <string.h>.
1366 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1367 use the stream stdout instead of a file of that name.
1369 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1372 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1373 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1374 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1375 (MDEBUG_DUMP): Flush the stream.
1377 * input.h (struct _MInputMethodInfo): Delete member im. New
1378 members mdb, language, name, extra, cmds, configured_cmds,
1379 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1380 (MInputContextInfo): New member tick.
1382 * input.c: Big change to improve user-side input method
1383 customization. Here, list just public API changes.
1384 (minput_get_commands, minput_get_variables)
1385 (minput_assign_command_keys, minput_set_variable): Label them
1387 (minput_get_command, minput_get_variable)
1388 (minput_config_command, minput_config_variable)
1389 (minput_save_config): New functions.
1391 * database.h (PATH_MAX): Define it if not yet defined.
1392 (PATH_SEPARATOR): Likewise.
1393 (enum MDatabaseStatus): New enum.
1394 (struct MDatabaseInfo): Moved from database.c. New members status,
1395 time, lock_file, and uniq_file.
1396 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1397 (mdatabase__unlock): Extern them.
1399 * database.c: Include <time.h>.
1400 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1401 (GEN_PATH): Args changed. Callers changed.
1402 (struct MDatabaseInfo): Moved to database.h.
1403 (struct MDatabase, mdb_list): Deleted.
1404 (mdatabase__list): New var.
1405 (get_database_filename): Deleted. Callers changed to use
1407 (find_file, get_database_file): New files.
1408 (get_dir_info): Initialize new members of MDatabaseInfo.
1409 (find_database): Arg chagnded. Callers changed.
1410 (free_db_info, register_database, register_databases_in_files):
1412 (update_database_list): Deleted.
1413 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1414 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1415 (mdatabase__update): New function.
1416 (mdatabase__check): Return value changed.
1417 (mdatabase__file, mdatabase__lock, mdatabase__save)
1418 (mdatabase__unlock): New functions.
1420 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1422 * input.c (get_surrounding_text): Return -2 when surrounding text
1424 (get_following_char): Likewise.
1425 (get_preceding_char): Likewise.
1426 (minput__callback): Return 0 if there is a callback function,
1429 2006-08-17 Kenichi Handa <handa@m17n.org>
1431 * input.c (reset_ic): Use shift_state to setup the current state.
1433 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1435 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1436 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1437 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1439 2006-08-02 Kenichi Handa <handa@m17n.org>
1441 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1443 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1445 * font-ft.c (ft_encapsulate): Add code for debugging.
1446 (mfont__ft_drive_otf): Be sure to encode character before getting
1449 2006-07-21 Kenichi Handa <handa@m17n.org>
1451 * draw.c (mdraw_text_extents): Fix previous typo.
1453 2006-07-19 Kenichi Handa <handa@m17n.org>
1455 * draw.c (gstring_width): New arg lbearing.
1456 (render_glyph_string): Adjusted for the change of gstring_width.
1457 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1459 * m17n-core.h (Mlanguage): Extern it.
1461 * m17n.h (Mlanguage): Extern deleted.
1463 * mtext.c (mtext__init): Initialize Mlanguage.
1464 (Mlanguage): Declaration moved from locale.c
1466 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1467 (Mlanguage): Declaration moved to mtext.c.
1469 * language.c (mlang__init): Don't initialize Mlanguage here.
1471 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1473 2006-07-14 Kenichi Handa <handa@m17n.org>
1475 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1476 (MRealizedFontFT): New member face_encapsulated.
1477 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1478 (ft_gen_font): New function.
1479 (ft_add_font): Use ft_gen_font.
1480 (ft_list_script): Store lists in ft_script_list.
1481 (ft_check_otf): New arg ft_face. Caller changed.
1482 (ft_check_language): Likewise.
1483 (ft_check_script): Likewise.
1484 (ft_encapsulate, ft_close): New functions.
1485 (mfont__ft_driver): Initialize members encapsulate and close.
1486 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1488 * font.h (struct MRealizedFont): New member encapsulating.
1489 (struct MFontDriver): New members encapsulate and close.
1491 * font.c (mfont__match_p): If FONT is realized, check capability
1492 by font drivers's check_capability method.
1493 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1496 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1497 declarations of foundry and fam local vars.
1498 (xft_driver): Make it static.
1500 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1501 (mfont_close): Extern them.
1503 * m17n-gd.c (device_open): Don't specify foundry and family of the
1506 2006-07-11 Kenichi Handa <handa@m17n.org>
1508 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1510 2006-07-13 Kenichi Handa <handa@m17n.org>
1512 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1514 (ft_check_script): Delete unused var.
1515 (ft_list_capability): Likewise.
1517 * font.c (mfont__get_capability): Setup cap->otf.
1518 (Motf): Make it global.
1519 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1521 * font.h (MFontCapability): New member otf.
1523 * language.c (mlang__fini): Delete unused vars.
1525 * m17n-gui.h (Motf): Extern it.
1527 * database.c (update_database_list): Delete unused vars.
1529 2006-07-07 Kenichi Handa <handa@m17n.org>
1531 * font-ft.c (DEVICE_DELTA): Fix typo.
1533 2006-07-06 Kenichi Handa <handa@m17n.org>
1535 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1538 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1540 * database.c: Update comments.
1542 2006-07-05 Kenichi Handa <handa@m17n.org>
1544 * database.c (PATH_MAX): Define it if not yet defined.
1545 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1547 (get_database_filename): Use GEN_PATH.
1548 (get_dir_info): Don't include the last '/' in directory name.
1549 (register_database): New function.
1550 (update_database_list): Use register_database. Search all
1551 directories in mdatabase__dir_list for wildcard databases.
1552 (mdatabase__init): Check "~/.m17n.d".
1554 2006-07-03 Kenichi Handa <handa@m17n.org>
1556 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1557 push reverse property.
1559 * plist.c (dump_plist_element): Fix previous change.
1561 2006-06-28 Kenichi Handa <handa@m17n.org>
1563 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1566 * draw.c (MbidiNSM): New variable.
1567 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1568 attention to bidi type NSM.
1569 (mdraw__init): Initialize MbibiNSM.
1571 * language.c (mscript__char_list): Fix finding a char-list element.
1573 * plist.c (dump_string): Return number of printed characters.
1574 (dump_plist_element): Print elements more compactly.
1576 2006-06-23 Kenichi Handa <handa@m17n.org>
1578 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1579 (include_HEADERS): Likewise.
1581 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1583 * language.c: Update documentation.
1585 2006-06-23 Kenichi Handa <handa@m17n.org>
1587 * font-ft.c (struct MFontFT): Delete member lang.
1588 (free_ft_info): Don't unref member lang. Destroy members langset
1590 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1591 changed. Set members langset and charset.
1592 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1594 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1596 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1597 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1598 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1599 characters at first. If it fails, try listing by language names.
1600 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1601 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1602 change of MFontCapability.
1603 (ft_list_capability): Likewise. Try listing by languages, then by
1604 scripts. Check OTF at last.
1605 (ft_check_script): New function.
1606 (ft_select): Adjusted for the check of MFontCapability.
1607 (ft_list_family_names): New function.
1608 (ft_check_capability): If cap->script is not Mnil, call
1610 (mfont__ft_driver): Initialize with ft_list_family_names.
1612 * font.h (struct MFontDriver): New member list_fmaily_names.
1613 (struct): Change member "MSymbol *lang" to "MSymbol language".
1615 * font.c: Include "language.h".
1616 (Motf): New variable.
1617 (otf_script_list, load_otf_script_list): Delete it.
1618 (find_script_from_otf_tag): Delete it.
1619 (merge_capability): New function.
1620 (mfont__init): Init Motf.
1621 (mfont__fini): Don't unref otf_script_list.
1622 (free_font_capability): Check cap->script_tag to determine if
1623 OTF-related capability is set.
1624 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1625 the change of type MFontCapability.
1626 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1627 and Motf properties.
1628 (mfont_list): Call merge_capability for LANGUAGE arg.
1629 (mfont_list_family_names): New function.
1631 * input-gui.c: Typo in comments fixed.
1633 * input.c: Typo in comments fixed.
1635 * language.h (mlanguage__list): Delete it.
1636 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1639 * language.c: Include "mtext.h".
1640 (M_script_lang_list): Delete it.
1641 (language_list, script_list): New variables.
1642 (load_lang_script_list, init_language_list, init_script_list): New
1644 (mlang__init): Don't load language database here.
1645 (mlang__fini): Unref language_list and script_list if not NULL.
1646 (mlanguage__list): Delete it.
1647 (mlanguage__info, mscript__info, mscript__char_list)
1648 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1649 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1650 (mscript_list, mscript_language_list): New functions.
1652 * m17n-gui.h (mfont_list_family_names): Extern it.
1654 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1655 (mlanguage_text, mscript_list, mscript_language_list): Extern
1658 2006-06-21 Kenichi Handa <handa@m17n.org>
1660 * m17n-X.c (xfont_driver): Initialize with
1661 xfont_list_family_names.
1662 (xfont_list_family_names): New function.
1663 (xft_driver): Initialize with NULL for list_family_names member.
1664 (device_init): Set list_family_names member of xft_driver to that
1665 of mfont__ft_driver.
1667 2006-06-06 Kenichi Handa <handa@m17n.org>
1669 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1671 2006-03-24 Kenichi Handa <handa@m17n.org>
1673 * font-ft.c (ft_open): Improve debug message.
1675 * fontset.c (mfontset__get_font): Fix for the case that no font in
1676 per_script list is available.
1678 2006-02-06 Kenichi Handa <handa@m17n.org>
1680 * Version 1.3.3 released.
1682 2006-02-22 Kenichi Handa <handa@m17n.org>
1684 * textprop.c: Fix some typos in documentation.
1686 * plist.c: Fix some typos in documentation.
1688 * m17n-core.h: Fix some typos in documentation.
1689 (M17NLIB_PATCH_LEVEL): Updated to 3.
1690 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1692 * symbol.c: Fix some typos in documentation.
1694 * mtext.c: Fix some typos in documentation.
1696 * input.c: Fix several typos in documentation.
1698 2006-02-06 Kenichi Handa <handa@m17n.org>
1700 * Version 1.3.2 released.
1702 2006-02-03 Kenichi Handa <handa@m17n.org>
1704 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1705 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1707 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1709 * draw.c (layout_glyphs): Fix handling left_padding of
1712 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1714 2006-02-02 Kenichi Handa <handa@m17n.org>
1716 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1717 if WITH_GUI is true.
1719 2006-01-25 Kenichi Handa <handa@m17n.org>
1721 * input.c (resolve_expression): If the value of PLIST is a plist,
1722 but the first element is not symbol, return 0.
1724 2006-01-17 Kenichi Handa <handa@m17n.org>
1726 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1727 HAVE_GD is 2 or the greater.
1729 2006-01-16 Kenichi Handa <handa@m17n.org>
1731 * Version 1.3.1 released.
1733 2006-01-16 Kenichi Handa <handa@m17n.org>
1735 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1736 simulating anti-aliasing.
1738 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1739 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1741 2006-01-12 Kenichi Handa <handa@m17n.org>
1743 * input.c (get_surrounding_text): Always pop ic->plist.
1744 (reset_ic): Don't reset ic->plist.
1746 2006-01-10 Kenichi Handa <handa@m17n.org>
1748 * input.c (preedit_commit): For debugging, print only commiting
1749 charactes. Don't set ic->candidate_show to 0.
1750 (handle_key): Don't run branch-actions just by shifting to the
1752 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1753 Reset vars and plist.
1755 2006-01-07 Kenichi Handa <handa@m17n.org>
1757 * input.c (load_branch): Confirm that maps is not NULL.
1759 2006-01-05 Kenichi Handa <handa@m17n.org>
1761 * input-gui.c (win_filter): Try to convert arg to key only when
1764 * plist.c (read_integer_element): If '#' and '-' are followed by
1765 non-integer-constituent, read them as a part of a symbol.
1766 (read_symbol_element): New arg C.
1767 (read_element): Adjust args to read_symbol_element.
1769 * input.c (load_macros): On overwriting a macro, free the old
1771 (minput__init): Store Mmap in load_im_info_keys.
1772 (minput_get_title_icon): If the input method has no title, be sure
1774 (minput_get_description): If the input method has no description,
1775 be sure to return NULL.
1776 (minput_get_variables): Fix documentation.
1777 (handle_key): Pay attention to the case that key is Mnil.
1778 (filter): Likewise. Fix handling of such symbol as S-A.
1780 2005-12-22 Kenichi Handa <handa@m17n.org>
1782 * Version 1.3.0 released.
1784 2005-12-22 Kenichi Handa <handa@m17n.org>
1786 * font-ft.c (ft_list): If the specified font has no property,
1789 2005-12-20 Kenichi Handa <handa@m17n.org>
1791 * character.c (mchar_get_prop): Check char_prop_list.
1792 (mchar_put_prop, mchar_get_prop_table): Likewise.
1794 2005-12-18 Kenichi Handa <handa@m17n.org>
1796 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1797 file name sans language.
1799 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1801 * input.c: Fix typo in comments.
1803 2005-12-14 Kenichi Handa <handa@m17n.org>
1805 * input.c (minput_get_title_icon): Check the default icon for the
1808 2005-12-13 Kenichi Handa <handa@m17n.org>
1810 * input.c (Mless_equal, Mgreater_equal): New variables.
1811 (parse_expression, resolve_expression, parse_action_list)
1812 (take_action_list): Handle the aboves.
1813 (filter): Treat key S-X as X.
1814 (minput__init): Initialize Mless_equal and Mgreater_equal.
1815 (minput_get_title_icon): New function.
1817 * m17n.h (minput_get_title_icon): Extern it.
1819 * database.c (get_database_filename): Return a filename instead of
1821 (load_database): Adjusted for the above change.
1822 (mdatabase__load_for_keys): Likewise.
1823 (mdatabase__find_file): New function.
1825 * database.h (mdatabase__find_file): Extern it.
1827 * font.h (mfont__resize): Delete extern.
1829 * font.c (mfont__list): Check resize ratio.
1830 (mfont__resize): Delete it.
1831 (mfont_resize_ratio): Include the code of mfont__resize.
1833 * font-ft.c (ft_open): Check resize ratio.
1835 * m17n-X.c (xfont_open): Check resize ratio.
1836 (xft_open): Likewise.
1838 2005-12-07 Kenichi Handa <handa@m17n.org>
1840 * input.c (take_action_list): If take_action_list return -1,
1842 (handle_key): Likewise.
1844 * face.c (mface__for_chars): When font is specified and layouter
1845 is found for it, if the layouter doesn't support one of a
1846 character, use a face sans layouter for it.
1848 2005-12-06 Kenichi Handa <handa@m17n.org>
1850 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1851 found, don't use it for more than one character.
1853 2005-12-05 Kenichi Handa <handa@m17n.org>
1855 * face.c (mface__realize): Set rfont->layouter to Mnil.
1856 (mface__for_chars): Fix handling of layouter.
1858 * character.h (mchar__define_prop): Extern it.
1860 * database.c (update_database_list): Call mchar__define_prop if
1863 * character.c (mchar__init): Don't call mchar_define_property.
1864 Instead just initialize property keys.
1865 (mchar__fini): Free char_prop_list only if it's not NULL.
1866 (mchar__define_prop): New function.
1867 (mchar_define_property): Call mchar__define_prop.
1869 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1872 2005-12-02 Kenichi Handa <handa@m17n.org>
1874 * language.c (mlang__init): Handle extra chars.
1876 * m17n-gui.h (mfont_check): Adjust prototype.
1878 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1879 (xfont_check_capability): New function.
1880 (xft_driver): Specify xft_check_capability.
1881 (xft_check_capability): New function.
1883 * font-ft.c (M0_3): Delete it.
1885 (ft_get_charmaps): Refer to M0.
1886 (fc_parse_pattern): Fix previous change.
1887 (ft_list_language): Check also extra chars.
1888 (ft_check_otf): Define it even if HAVE_OTF is undef.
1889 (ft_check_lang): Check the result of FcLangSetHasLang against
1890 FcLangDifferentLang. Check also extra chars.
1891 (ft_list_capability): Delete ifdef HAVE_OTF.
1892 (ft_select): Likewise.
1893 (ft_open): Improve debug information.
1894 (ft_check_capability): New function.
1895 (mfont__ft_driver): Specify ft_check_capability.
1896 (mfont__ft_init): Initialize M0.
1898 * fontset.c (get_font_from_group): New function.
1899 (mfontset__get_font): New function.
1901 * fontset.h (mfontset__get_font): Extern it.
1903 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1904 (mfont__fini): Delete ifdef HAVE_OTF.
1905 (free_font_capability): Likewise.
1906 (mfont__get_capability): Likewise.
1907 (mfont__check_capability): New function.
1908 (mfont_check): Change the order of arguments. Use
1911 * font.h (struct MFontDriver): New member check_capability.
1912 (MFontCapability): Delete ifdef HAVE_OTF.
1913 (mfont__check_capability): Extern it.
1915 * face.c (mface__realize): Fix handling of FONT arg.
1916 (mface__for_chars): Fix handling of explicitly specified font.
1918 2005-11-25 Kenichi Handa <handa@m17n.org>
1920 * font-flt.c (run_command): Print debug info for
1923 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1925 * face.c (mface__for_chars): Check rfont before accessing the
1928 2005-11-21 Kenichi Handa <handa@m17n.org>
1930 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1933 * fontset.c (fontset_table): New variable.
1934 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1935 (mfont__fontset_init): Add fontset_table as an object array.
1936 (mfont__realize_fontset): Ref FONTSET.
1937 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1938 (mfontset): Call M17N_OBJECT_REGISTER.
1939 (mfontset_copy): Likewise.
1941 * input.c (handle_key): For debugging, print information about
1943 (filter): Add an alias for Meta and Alt modifiers.
1944 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1946 (minput__init): Initialize them.
1947 (parse_expression): New function.
1948 (resolve_expression): New function.
1949 (parse_action_list): Handle expressions by parse_expression.
1950 (take_action_list): Handle expressions by resolve_expression.
1951 (parse_nested_list_value): Fix previous change.
1952 (resolve_command): Fix handling of the return value of
1955 2005-11-18 Kenichi Handa <handa@m17n.org>
1957 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1958 HAVE_OTF is defined.
1959 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1961 (ft_select): Likewise.
1963 * font.c (mfont_list): Fix for the case that FONT is NULL.
1964 (OTF_tag): Delete it.
1965 (load_otf_script_list): Define only when HAVE_OTF is defined.
1966 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1969 * draw.c (truncate_gstring): Be sure to truncate at
1970 glapheme-cluster boundary.
1972 2005-11-11 Kenichi Handa <handa@m17n.org>
1974 * input.c (delete_surrounding_text): Clear cache if necessary.
1976 2005-11-09 Kenichi Handa <handa@m17n.org>
1978 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1979 glyph prev is also supported by the current flt.
1981 2005-11-08 Kenichi Handa <handa@m17n.org>
1983 * m17n-X.c (xft_render): Cancel previous change.
1985 2005-11-07 Kenichi Handa <handa@m17n.org>
1987 * input.c: Include <stdlib.h>.
1988 (get_surrounding_text, delete_surrounding_text)
1989 (get_preceding_char, get_following_char): New functions.
1990 (integer_value): New arg surrounding. If it is nonzero, try to
1991 get a surrounding character. Callers changed.
1992 (take_action_list): Check `value' before setting an element.
1993 (destroy_ic): Unref ic_info->preceding_text and
1994 ic_info->following_text.
1995 (minput__init): Initialize Minput_get_surrounding_text and
1996 Minput_delete_surrounding_text.
1997 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1999 (filter): Unref ic_info->preceding_text and
2000 ic_info->following_text.
2002 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
2005 * input.h (MInputContextInfo): New members preceding_text and
2008 2005-11-04 Kenichi Handa <handa@m17n.org>
2010 * input.c (parse_nested_list_value): Fix handling of the global
2012 (get_nested_list): Get global definitions by load_partial_im_info.
2013 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
2014 MInputCandidatesChanged.
2015 (take_action_list): Likewise.
2016 (reset_ic): Likewise.
2017 (create_ic): Don't pay special attention to
2018 Mcandidates_group_size.
2019 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2020 (minput_set_variable): Get a definition of varible by
2021 mplist_find_by_value, not mplist_get.
2023 * m17n.h (enum MInputCandidatesChanged): New enum.
2025 2005-11-01 Kenichi Handa <handa@m17n.org>
2027 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2029 (mwin__destroy_window): If xft_draw's drawable is win, change it
2030 to device->drawable before destroying win.
2032 2005-10-31 Kenichi Handa <handa@m17n.org>
2034 * input.c (load_im_info): Fix adding of state.
2036 * m17n-core.c (m17n_fini_core): Fix reporting of module
2039 * m17n.c (m17n_fini): Fix reporting of module finalization.
2041 * m17n-gui.c (m17n_init_win): Fix reporting of module
2044 2005-10-29 Kenichi Handa <handa@m17n.org>
2046 * input.c (get_candidate_list): Fix the timing of referring plist.
2048 2005-10-28 Kenichi Handa <handa@m17n.org>
2050 * input.c (load_branch): Ignore an undefined map name.
2051 (load_im_info): Set im_info->title from `name' only if it's not
2053 (shift_state): Always update ic->status.
2054 (adjust_candidates): Renamed from adjust_candidate_command.
2055 Argument changed. Caller changed.
2056 (get_candidate_list, regularize_action): New functions.
2057 (take_action_list): Use them. On handling Munhandle, don't set
2059 (handle_key): If KEY is not handled by MAP, and MAP has
2060 branch_actions, perform them.
2062 * database.c (mdatabase__fini): Free dir_info->filename;
2064 2005-10-20 Kenichi Handa <handa@m17n.org>
2066 * input.c (marker_code): Accept '@@'.
2067 (integer_value): Handle '@@'.
2068 (parse_action_list): Accept a symbol argument.
2069 (take_action_list): Resolve the symbol argument. Handle the
2072 2005-10-18 Kenichi Handa <handa@m17n.org>
2074 * input.c: Include "charset.h".
2075 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2077 (MIMState): New member (M17NObject control).
2078 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2079 (get_nested_list, resolve_variable): New functions.
2080 (integer_value): New arg (MPlist **value). Set it to the plist
2081 element containing the value.
2082 (resolve_command): New function.
2083 (load_translation): New arg (MPlist *map_actions).
2084 (load_branch): New args language and name. If `keylist' is a
2085 symbol, resolved that as a command name.
2086 (free_map): New arg top. Free map->map_actions only if top is
2088 (free_state): New function.
2089 (load_state): New arg name.
2090 (im_info_list): New variable.
2091 (free_im_info, get_im_info_by_tags): New functions.
2092 (load_im_info): Arg key changed to plist. Handle `include'.
2093 Return (MInputMethodInfo *).
2094 (preedit_commit): Ref ic->candidate_list.
2095 (get_select_charset, adjust_candidate_command): New functions.
2096 (take_action_list): Handle `include'. Adjust candidate action
2097 properly. Handle control variables `candidates-charset' and
2098 `candidates-group-size'.
2099 (open_im): Use get_im_info.
2100 (create_ic): Get global variables.
2101 (load_partial_im_info): New function.
2102 (get_im_info): New function.
2103 (check_command_keyseq, check_command_list, check_variable_list):
2105 (minput__init): Don't handle M_database_hook and Mdetail_text.
2106 Initialize M_candidates, Mcandidates_group_size,
2107 Mcandidates_charset.
2108 (parse_variable_list, get_variable_list, parse_command_list)
2109 (get_command_list): Delete them.
2110 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2111 (minput__fini): Simply unref command_list and variable_list.
2112 (minput_get_description): Adjusted for the new form of description.
2113 (minput_get_commands): Use get_nested_list.
2114 (minput_assign_command_keys): Likewise.
2115 (minput_get_variables, minput_set_variable): Likewise.
2117 * input.h (MInputMethodInfo): New members im and maps.
2119 * database.h (M_database_hook): Delete extern.
2120 (MDatabaseHookFunc): Delete extern.
2121 (mdatabase__check): Extern it.
2123 * database.c: Include <glob.h>.
2124 (MAX_TIME): New macro.
2125 (Masterisk): New variable.
2126 (get_database_stream): Argument changed to (MDatabaseInfo *).
2128 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2129 (find_database): New function.
2130 (update_database_list): New function.
2131 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2132 calling update_database_list.
2133 (mdatabase__check): New function.
2134 (mdatabase_find): Use update_database and find_database. Don't
2135 handle MDatabaseHookFunc.
2136 (mdatabase_list): Call update_database at first.
2137 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2138 (MDatabaseList): New type.
2140 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2142 * m17n.h (Mdetail_text): Delete extern.
2144 * m17n-core.h (mplist_conc): Delete extern.
2146 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2148 (mplist_conc): Renamed to mplist__conc.
2149 (mplist__pop_unref): New function.
2151 2005-10-14 Kenichi Handa <handa@m17n.org>
2153 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2155 (read_element): If keys is an empty plist, return any element
2157 (dump_plist_element): Check if plist is nested.
2158 (mplist_conc): Always ref tail.
2159 (mplist_set): If key is a managing key, ref val in advance.
2161 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2162 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2163 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2166 * fontset.c (free_fontset): Unref fontset_list if necessary.
2167 (mfont__fontset_fini): Don't free fontset_list. Unref
2169 (mfont__realize_fontset): Initialize request.
2170 (mfontset): Ref default_fontset or fontset only if necessary.
2171 (mfontset_copy): Don't ref copy.
2173 * draw.c (render_glyphs): Check gend->type before checking
2176 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2177 unrefed plists to NULL.
2179 2005-10-04 Kenichi Handa <handa@m17n.org>
2181 * textprop.c (mtext_serialize): Be sure to make mt
2182 MTEXT_FORMAT_UTF_8 and NULL terminated.
2184 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2186 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2188 2005-10-03 Kenichi Handa <handa@m17n.org>
2190 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2191 is not at the beginning of line.
2193 2005-09-22 Kenichi Handa <handa@m17n.org>
2195 * input.c: Include <sys/stat.h> and <unistd.h>.
2196 (Minclude, Mcommit, Munhandle): New variables.
2197 (minput__init): Initialize them. Push only Mstate to
2198 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2199 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2201 (load_input_method): Handle "include" directive. If no states are
2203 (shift_state): If state_name is Mt, shift back to the previous
2204 state. Call preedit_commit to commit preedit text.
2205 (preedit_commit): New function.
2206 (take_action_list): Improve debug printing. Handle commit and
2208 (handle_key): Check the return value of take_action_list. Don't
2209 take branch_actions just after changing to the root map.
2210 (reset_ic): Reset all ic_info members.
2211 (filter): When a key is not handled, just move ic_info->keys
2212 instead fo calling reset_ic.
2213 (load_im_info): If key is not Mstate, push Mmap to
2215 (MDatabaseStatList): New type.
2216 (imdir_stat_list): New variable.
2217 (input_method_hook): Don't cancel the hook. Check the
2218 modification time of directories.
2219 (minput__fini): Free imdir_stat_list;
2221 * input.h (MInputContextInfo): New member prev_state.
2223 * m17n-core.h (mplist_conc): Extern it.
2225 * plist.c (mplist_conc): New function.
2227 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2229 * font.h (MRealizedFont): New member average_width.
2231 * font-ft.c (ft_open): Set rface->average_width.
2233 * font.c (xlfd_unparse_name): Print '*' before registry name.
2235 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2236 (xfont_open): Set rfont->average_width.
2237 (xft_open): Likewise.
2238 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2240 * internal-gui.h (struct MFrame): New member average_width.
2242 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2243 (mframe_get_prop): Return the average_width of a font.
2245 * face.c (mface__realize): Set rface->average_width.
2246 (mface__update_frame_face): Set frame->average_width.
2248 * face.h (MRealizedFace): New member average_width.
2250 2005-09-19 Kenichi Handa <handa@m17n.org>
2252 * font.c (xlfd_unparse_name): New arg full_xlfd.
2253 (mfont__encode_char): Use shortcut only for X core fonts.
2254 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2255 (mfont_put_prop): Handle `language' property.
2256 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2257 Print file can capability info too.
2259 * m17n-core.c (mdebug__output): New variable.
2260 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2261 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2262 (m17n_fini_core): Close mdebug__output if it's not stderr.
2264 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2265 (xfont_open): Handle baseline_offset.
2266 (xfont_find_metric): Likewise.
2267 (xfont_render): Likewise.
2268 (xft_open): Likewise.
2269 (xft_render): Likewise.
2271 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2272 (mdebug__output): Extern it.
2273 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2274 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2275 (MDEBUG_DUMP): New macro.
2276 (MDEBUG_PRINT_TIME): Print to medebug__output.
2278 * font.h (MRealizedFont): New member baseline_offset.
2280 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2282 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2283 (ft_list_family): Check alias.
2284 (ft_list_language): If language is "en", don't try to the second
2286 (ft_default_list): New variable.
2287 (ft_list_default): New function.
2288 (ft_select): If family is not specified, try only the default
2289 fonts. Treat the weights normal and medium same.
2290 (ft_open): Fix debug message. If registry is not specified, try
2291 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2292 (ft_find_metric): Likewise.
2293 (ft_render): Likewise.
2294 (ft_list): Fix debug message. Accept the registring iso8859-1.
2295 If family is not specified, try only the default fonts.
2297 * face.c (mface__realize): Fix logic of opening a font.
2299 2005-09-16 Kenichi Handa <handa@m17n.org>
2301 * face.c (mface__realize):
2303 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2306 * input.c (shift_state): Fix the condition of taking init actions.
2307 (take_action_list): Fix handling of pushback action.
2308 (handle_key): Don't change key while checking its alias.
2309 (minput__init): Initialize new variables.
2310 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2313 2005-09-12 Kenichi Handa <handa@m17n.org>
2315 * mtext.c (mtext__uppercase): Add proper open/close parens.
2316 (mtext_titlecase): Add proper casting.
2318 * input.c (parse_action_list): Handle the case that the arg is a
2319 key sequence (MText or MPlist).
2320 (take_action_list): Likewise.
2321 (shift_state): Shorter debug message.
2322 (handle_key): Terminate a debug message by "\n".
2323 (reset_ic): Don't take initial actions here.
2324 (minput_open_im): Print a debug message.
2325 (minput_close_im): Likewise.
2326 (minput_create_ic): Likewise.
2327 (minput_destroy_ic): Likewise.
2329 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2331 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2334 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2335 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2338 * character.c: Add Japanese documentation for
2339 mchar_get_prop_table ().
2341 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2343 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2344 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2345 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2347 (init_case_conversion): New function.
2348 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2349 (uppercase_precheck, lowercase_precheck, final_sigma)
2350 (after_soft_dotted, more_above, before_dot, after_i)
2351 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2353 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2355 * plist.c (read_mtext_element): Fix previous change.
2357 2005-09-05 Kenichi Handa <handa@m17n.org>
2359 * plist.c (read_mtext_element): Handle \uXXXX notation.
2361 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2362 (MTABLE_ALLOCA): Change the name of local variable.
2364 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2365 HAVE_FREETYPE are defined.
2367 * m17n-X.c: Check HAVE_X11.
2369 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2370 directory listing libraries.
2371 (noinst_PROGRAMS): Define it only in maintainer mode.
2373 2005-09-02 Kenichi Handa <handa@m17n.org>
2375 * m17n-gui.h (mdraw_line_break_option): Extern it.
2377 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2378 end of the first glyph.
2379 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2381 (mdraw_line_break_option): New variable.
2382 (mdraw_default_line_break): Use mtext_line_break.
2384 * mtext.h (wordseg_func_table): Don't extern it.
2385 (mtext__wseg_fini): Extern it.
2387 * mtext.c: Don't include word-thai.h.
2388 (wordseg_func_table): Delete this variable.
2389 (mtext__init): Don't initialize above. Don't call
2390 mtext__word_thai_init.
2391 (mtext__fini): Don't free wordseg_func_table. Call
2392 mtext__wseg_fini instead fo mtext__word_thai_fini.
2393 (MTextWordsegFunc): Don't typedef it.
2394 (mtext__word_segment): Moved to mtext-wseg.c.
2396 * m17n-core.h (enum MTextLineBreakOption): New enum.
2397 (mtext_line_break): Extern it.
2399 * mtext-wseg.c: New file.
2401 * mtext-lbrk.c: New file.
2403 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2404 add mtext-lbrk.c and mtext-wseg.c.
2406 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2407 the case that head is NULL.
2409 2005-09-01 Kenichi Handa <handa@m17n.org>
2411 * word-thai.c (wordseg_propertize): If the property value is nil,
2412 don't make the property no-merge.
2413 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2414 attention to the case that they are NULL.
2415 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2418 * character.c (mchar_get_prop_table): New function.
2420 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2422 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2423 (mchar_get_prop_table): Extern it.
2425 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2426 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2428 * internal.h (enum MTextCoverage): New enum.
2429 (MText): New member coverage.
2431 * mtext.c (FORMAT_COVERAGE): New macro.
2432 (insert): Copy mt2->coverage.
2433 (mtext__from_data): Initialize mt->coverage.
2434 (mtext__adjust_format): Update mt->coverage.
2435 (mtext): Initialize mt->coverage.
2436 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2437 Update mt->coverage if necessary.
2438 (mtext_duplicate): Copy mt->coverage.
2439 (mtext_insert, mtext_replace): New functions.
2440 (mtext_dup): Use mtext_duplicate.
2441 (mtext__word_segment): Don't set *from and *to if a word
2442 segmentation funcion is not found.
2443 (mtext_ins_char): Fix typo.
2445 2005-08-25 Kenichi Handa <handa@m17n.org>
2447 * font.h (MFont): New member for_full_width.
2449 * font.c (compare_font_score): Prefer a font of not
2452 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2453 registry charset of a font is one of CJK charsets.
2455 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2456 supports some of CJK.
2458 2005-08-24 Kenichi Handa <handa@m17n.org>
2460 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2462 * m17n-gui.c (null_device_open): Check Mresolution param and set
2465 * m17n-gd.c (device_open): Check Mresolution param and set
2468 * m17n-X.c (MWDevice): New member resy.
2469 (xfont_open): Set ascent, descent, and max_advance members of
2471 (xft_open): Likewise.
2472 (device_open): Compare also screen_num to find a device. Set
2473 device->resy and frame->dpi.
2475 * internal-gui.h (MFrame): New member dpi.
2477 * font.h (MRealizedFont): New member max_advance.
2479 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2480 (mfont__init): Don't initialize Mascent, Mdescent.
2481 (Mascent, Mdescent): Delete these variables.
2482 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2483 Mfont_descent instead of Mascent and Mdescent.
2484 (mfont_put_prop): Allow negative size.
2485 (mfont_find): Handle the case of spec->size < 0. Fix previous
2487 (mfont_list): Handle the case of spec->size < 0.
2488 (mfont_check): Likewise.
2490 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2491 (fc_get_pattern): Handle the case of font->size < 0.
2492 (ft_open): Set ascent, descent, and max_advance members of rfont.
2493 (ft_find_metric): Improve rounding.
2494 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2497 * face.c (mface__realize): Handle the case of font->size < 0.
2499 2005-08-22 Kenichi Handa <handa@m17n.org>
2501 * coding.c (MConverterStatus): Change the member buf to union.
2502 (mconv_buffer_converter): Add const to the arg buf.
2503 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2504 (mconv_decode): Adjusted for the change of MConverterStatus.
2505 (mconv_encode_range): Likewise.
2507 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2508 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2510 2005-08-20 Kenichi Handa <handa@m17n.org>
2512 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2513 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2515 * m17n-X.c (xfont_open): Set members ascent, descent, and
2516 max_advance of rfont.
2517 (xft_open): Likewise.
2519 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2521 (mfont__ft_parse_name): Add const to the arg name.
2523 * font.c (xlfd_parse_name): Add const to the arg name. Call
2524 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2525 (xlfd_unparse_name): Handle spacing.
2526 (mfont__init): Initialize new variables.
2527 (mfont__id): Handle spacing.
2528 (mfont__merge): Likewise.
2529 (mfont__set_spec): This function deleted.
2530 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2531 condition of calling mfont__ft_parse_name.
2532 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2533 (mfont_get_prop): Handle properties spacing, ascent, descent,
2535 (mfont_find): Return a realized font.
2536 (mfont_from_name): Add const to the arg name.
2538 * font.h (enum MFontProperty): New member MFONT_SPACING.
2539 (enum MFontSpacing): New enum.
2540 (MFont): New members spacing and max_advance.
2541 (mfont__ft_parse_name): Prototype adjusted.
2542 (mfont__set_spec): Extern deleted.
2543 (mfont__parse_name_into_font): Prototype adjusted.
2545 2005-08-19 Kenichi Handa <handa@m17n.org>
2547 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2549 * font.c (mfont_list): If FONT is null, use a temporary font.
2550 (mfont_parse_name): Add const to the arg name.
2552 2005-08-18 Kenichi Handa <handa@m17n.org>
2554 * word-thai.c: Surround code by #ifdef and #endif to escape from
2557 * font-ft.c: Mostly re-written.
2559 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2560 (FontLayoutCmd): Type of the member otf changed..
2561 (load_otf_command): Adjusted for the format change of otf command.
2562 (load_command): Likewise.
2563 (free_flt_command): Unref cmd->body.otf.
2564 (run_otf): Ajusted for the type change of otf_cmd.
2565 (run_command): Ajusted for the type change of otf_cmd. On
2566 debugging, print ctx->combining_code.
2567 (mfont__flt_run): Initialize ctx's members code_offset,
2568 combining_code, and left_padding to 0.
2570 * face.h (struct MRealizedFace): New member font.
2571 (mface__realize): Prototype adjusted.
2573 * face.c (find_realized_face): New arg font.
2574 (find_realized_face): Adjusted for the change of MFont.
2575 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2576 (mface__fini): Don't call mdebug__report_object.
2577 (mface__realize): New arg font.
2578 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2579 Optimize the latin case.
2580 (mface__free_realized): Free rface->font.
2581 (mface__update_frame_face): Adjusted for the change of mface__realize.
2582 (mface_equal): New function.
2584 * draw.c (Mcommon): New variable.
2585 (visual_order): Args to mfont__encode_char changed.
2586 (compose_glyph_string): Handle Mfont text property.
2587 (layout_glyphs): Adjusted for the change of MFont.
2588 (mdraw__init): Initialize Mcommon.
2589 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2591 * font.h (enum MFontType): Members completely changed.
2592 (enum MFontProperty): Move MFONT_SIZE to the tail.
2593 (enum MFontSource): New enum.
2594 (struct MFont): New members type, source, sizes, file, capability,
2596 (struct MRealizedFont): Type of member font changed. Members
2597 score, status, and encoding deleted.
2598 (MFontScore): New type.
2599 (MFontList): Member changed.
2600 (struct MFontDriver): New member has_char. Types of members
2602 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2603 (Mapple_roman): Extern them.
2604 (OTF_Tag): Typedefed if not HAVE_OTF.
2605 (enum MFontOpenTypeTable): New enum.
2606 (MFontCapability): New type.
2607 (mfont__ft_drive_otf): Prototype adjusted.
2608 (mfont__score): Extern deleted.
2609 (mfont__merge): Extern it.
2610 (mfont__has_char): Extern it.
2611 (mfont__encode_char): Prototype adjusted.
2612 (mfont__open): Extern it.
2613 (mfont__set_spec): Prototype adjusted.
2614 (mfont__get_capability): Extern it.
2616 * font.c: Include "fontset.h".
2617 (M_font_capability, M_font_list, M_font_list_len): New variables.
2618 (font_score_priority): Change order of initial elements.
2619 (font_score_shift_bits): Fix array size.
2620 (common_weight): Add "thin", "semibold", and "heavy".
2621 (common_stretch): Add "ultracondensed", "extracondensed",
2622 "extraexpanded", and "utltraexpand".
2623 (font_weight_regular, font_weight_normal, font_weight_medium): New
2625 (gen_font_name): This function deleted.
2626 (find_encoding): Set font->encoding.
2627 (OTF_tag): New function.
2628 (otf_script_list): New variable.
2629 (load_otf_script_list): New function.
2630 (find_script_from_otf_tag): New function.
2631 (xlfd_parse_name): Set font->type and font->source.
2632 (mfont__free_realized): Free chains rfonts.
2633 (font_score): Renamed from mfont__score.
2634 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2635 (Mapple_roman): New variables.
2636 (mfont__init): Initilize new variables. Initalize
2637 default_encoding.encoding_name and
2638 default_encoding.encoding_charset to Municode_full and
2639 mcharset__unicode. Use SAFE* macros for allocating filepath
2641 (mfont__fini): Free otf_script_list.
2642 (mfont__id): New function.
2643 (mfont__match_p): Check also capability member of MFont.
2644 (mfont__merge): New funciton.
2645 (mfont__set_spec_from_face): Set type and source members.
2646 (mfont__set_spec_from_plist): Set capability and type members.
2647 (mfont__select): Argument changed.
2648 (mfont__available): New function.
2649 (compare_font_score): New function.
2650 (mfont__list): New function.
2651 (mfont__open): Return a realized font.
2652 (mfont__resize): Adjusted for the change of MFont.
2653 (mfont__has_char): New function.
2654 (mfont__encode_char): Argument changed.
2655 (mfont__set_spec): Argument changed.
2656 (free_font_capability): New function.
2657 (mfont__get_capability): New function.
2658 (MFontfile): New variable.
2659 (mfont_get_prop): Adjusted for the change of MFont.
2660 (mfont_put_prop): Likewise.
2661 (mfont_set_selection_priority): Fix the way of setting
2662 font_score_priority[].
2663 (mfont_find): Use mfont__list instead of mfont__select.
2664 (mfont_resize_ratio): Adjusted for the change of MFont.
2665 (mfont_list): Use mfont__list.
2666 (mfont_check): New function.
2667 (font_score): Make it static.
2669 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2670 (mfont__lookup_fontset): Likewise.
2672 * fontset.c (struct MFontset): Delete member font_spec_list.
2673 (struct MRealizedFontset): Type of member spec changed. New
2675 (load_font_group): Arg spec_list deleted.
2676 (load_fontset_contents): Adjusted for the change of fontset_def.
2677 (free_fontset): Fix the way of freeing fontset elements.
2678 (realize_fontset_elements): Argument changed.
2679 (get_per_script): New function.
2680 (free_realized_fontset_elements): Fix the way of feeing rfontset
2682 (update_fontset_elements): Fix args to realize_fontset_elements.
2683 (mfont__realize_fontset): New arg spec.
2684 (try_font_list): New function.
2685 (try_font_group): New arg request. Use try_font_list.
2686 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2688 (mfontset): Adjusted for the change of MFontset.
2689 (mfontset_copy): Likewise. Don't share plists.
2690 (mfontset_modify_entry): Adjusted for the change of MFontset.
2691 (mfontset_lookup): Call get_per_script.
2692 (mdebug_dump_fontset): Print also the address of fonts.
2694 * input.c (shift_state): Don't reset ic_info->vars.
2695 (take_action_list): Call MDEBUG_PRINT fore calling
2698 * internal-gui.h (MFontDriver): Don't typedef it here.
2700 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2701 (MXFont): This type deleted.
2703 (struct _MFontX): New struct.
2704 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2705 (MDisplayInfo): Member base_font_list deleted.
2706 (DEFAULT_FONT): Definition changed.
2707 (FALLBACK_FONT): This maclr deleted.
2708 (free_display_info): Adjusted for the change of MDisplayInfo.
2709 (free_device): Argument to mfont__free_realized changed.
2710 (xfont_driver): Adjusted for the change of MFontDriver.
2711 (xfont_registry_list): Use MFontX instead of MXFont.
2712 (MRealizedFontX): Renamed from MXFontInfo.
2713 (xfont_select): Return the font found first.
2714 (close_xfont): Change MXFontInfo to MRealizedFontX.
2715 (xfont_open): Return the realized font.
2716 (xfont_find_metric): Get xfont from rfont->fontp.
2717 (xfont_has_char): New function.
2718 (xfont_encode_char): Adjusted for the argument change.
2719 (xfont_render): Get xfont from rfont->fontp.
2720 (xfont_list): Adjusted for the argument change.
2721 (MRealizedFontXft): Renamed from MXftFontInfo.
2722 (xft_driver): Ajusted for the change of MFontDriver.
2723 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2724 (xft_open_font): Argument changed.
2725 (xft_open): Argument changed. Return the realized font.
2726 (xft_find_metric): Get xft_font from rfont->fontp.
2727 (xft_has_char, xft_encode_char): New functions.
2728 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2729 font if not yet opened.
2730 (device_open): Don't set frame->font.
2732 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2734 (gd_font_open): New function.
2735 (gd_render): Don't use the local variable ft_info.
2736 (device_init): Adjusted for the change of gd_font_driver.
2738 * textprop.c (mtext__prop_init): Initialize text_property_table.
2739 Call M17N_OBJECT_ADD_ARRAY.
2740 (mtext__prop_fini): Don't call mdebug__report_object.
2742 * plist.c (mplist__init): Initialize plist_table.
2743 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2744 (mplist__fini): Don't call mdebug__report_object.
2746 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2747 (mtext__fini): Don't call mdebug__report_object.
2748 (MTEXT_FORMAT_UTF_16): Correct type.
2749 (mtext_data): New function.
2750 (mtext_text): Fix calculation of limit and args to
2753 * language.c: Include "plist.h".
2754 (M_script_lang_list): New variable.
2755 (mlang__init): Read languages and their information from m17n
2757 (mlanguage__list): New function.
2758 (Miso639_1, Miso639_2): New variables.
2760 * language.h (mlanguage__list): Extern it.
2762 * database.c (get_database_stream): Use SAFE_* macros for
2763 allocating and freeing path.
2764 (mdatabase__init): Likewise.
2766 * symbol.c (msymbol__fini): Don't free symbols here.
2767 (msymbol__free_table): New function.
2768 (msymbol_is_managing_key): New function.
2770 * symbol.h (msymbol__free_table): Extern it.
2771 (msymbol__list): Extern it.
2773 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2775 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2776 (struct _M17NObjectArray): New member name and next.
2777 (mdebug__add_object_array): Extern it.
2778 (M17N_OBJECT_ADD_ARRAY): New macro.
2779 (mdebug__report_object): Don't extern it.
2781 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2783 * m17n-gui.c (free_frame): Don't free frame->font.
2784 (null_device_fini): Fix code for freeing
2785 null_device.realized_font_list.
2786 (m17n_fini_win): Free interface.
2787 (mframe): Cast the return value of dlsym. Set frame->font here.
2788 (mframe_get_prop): Check frame->rface->rfont before accessing the
2791 * m17n-gui.h (Mfontfile): Extern it.
2792 (mfont_check): Extern it.
2793 (mface_equal): Extern it.
2795 * m17n-core.c: Include "symbol.h".
2796 (report_header_printed): This variable deleted.
2797 (object_array_root): New variable.
2798 (report_object_array): New function.
2799 (mdebug__report_object): This function deleted.
2800 (mdebug__add_object_array): New function.
2801 (m17n_init_core): Call mchartable_init () before mtext_init ().
2802 (m17n_fini_core): Call report_object_array (if necessary) and
2803 msymbol__free_atable at the end.
2805 * m17n-core.h (msymbol_is_managing_key): Extern it.
2806 (mtext_data): Extern it.
2807 (MTEXT_FORMAT_UTF_16): Correct type.
2808 (M17NLIB_MINOR_VERSION): Changed to 3.
2809 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2811 * chartab.c (mchartable__init): Initalize chartable_table.count.
2812 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2813 mdebug__report_object.
2815 2005-05-26 Kenichi Handa <handa@m17n.org>
2817 * m17n.h (Miso639_1, Miso639_2): Extern them.
2819 * symbol.h (msymbol__list): Extern it.
2821 * symbol.c (msymbol__list): New function.
2823 2005-05-19 Kenichi Handa <handa@m17n.org>
2825 * input-gui.c (minput__win_init): Don't change the value of
2828 2005-05-16 Kenichi Handa <handa@m17n.org>
2830 * m17n-core.c (m17n_object): Be sure to initialize all members.
2832 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2834 2005-05-09 Kenichi Handa <handa@m17n.org>
2836 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2838 2005-04-27 Kenichi Handa <handa@m17n.org>
2840 * language.c (mlang__init): Add "an" (Aragonese).
2842 * word-thai.c: Add support for libthai.
2843 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2844 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2846 * mtext.c: Include "word-thai.h" conditionaly.
2847 (mtext__init): Call mtext__word_thai_init conditionaly.
2848 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2850 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2851 not WORDCUT_LD_FLAGS.
2853 2005-04-19 Kenichi Handa <handa@m17n.org>
2855 * word-thai.c (wordseg_propertize): Always unref the attached
2857 (thai_wordseg): Don't unref the property.
2859 2005-04-18 Kenichi Handa <handa@m17n.org>
2861 * word-thai.c: Include stdlib.h.
2862 (wordseg_propertize): Add dummy function for the case that wordcut
2863 library doesn't exist.
2864 (wordseg_propertize): Fix for old wordcut library.
2866 2005-04-16 Kenichi Handa <handa@m17n.org>
2868 * word-thai.c: Include <stdio.h>.
2870 2005-04-15 Kenichi Handa <handa@m17n.org>
2872 * draw.c: Include mtext.h.
2873 (linebreak_table, M_break_at_space, M_break_at_word)
2874 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2875 (compose_glyph_string): Check POS before getting Mface text
2877 (truncate_gstring): Give correct TO arg to line_break function.
2878 (GET_LB_TYPE): New macro.
2879 (find_break_backward, find_break_forward): New functions.
2880 (mdraw__init): Initialize the above new variables.
2881 (mdraw__fini): Free linebreak_table.
2882 (mdraw_default_line_break): Use find_break_backward and
2885 * word-thai.c: New file.
2887 * word-thai.h: New file.
2889 * mtext.c: Include word-thai.h.
2890 (wordseg_func_table): New variable.
2891 (mtext__init): Initialize wordseg_func_table and call
2892 mtext__word_thai_init.
2893 (mtext__fini): Call mtext__word_thai_fini, free
2895 (MTextWordsegFunc): New type.
2896 (mtext__word_segment): New function.
2898 * mtext.h (wordseg_func_table): Extern it.
2899 (mtext__word_segment): Extern it.
2901 * m17n.c (m17n_init): Fix typo (== -> =).
2903 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2904 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2906 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2907 (MTEXTPROP_VAL): New macros.
2909 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2911 2005-04-07 Kenichi Handa <handa@m17n.org>
2913 * database.c (load_chartable): Fix pursing of symbol name.
2915 2005-03-24 Kenichi Handa <handa@m17n.org>
2917 * m17n.c (m17n_init): Fix typo (== -> =).
2919 2005-03-11 Kenichi Handa <handa@m17n.org>
2921 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2923 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2925 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2928 2005-03-09 handa <handa@m17n.org>
2930 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2931 calling m17n_init ().
2933 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2934 calling m17n_init_core ().
2936 2005-02-28 Kenichi Handa <handa@m17n.org>
2938 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2941 2005-02-17 Kenichi Handa <handa@m17n.org>
2943 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2944 (M_description, M_command, M_variable): New variables.
2945 (load_im_info_keys): New variables.
2946 (load_im_info, check_command_keyseq, get_description_advance)
2947 (parse_command_list, get_command_list, parse_variable_list)
2948 (get_variable_list, input_method_hook): New functions.
2949 (command_list, variable_list): New variables.
2950 (minput__init): Put input_method_hook to Minput_method.
2951 Initialize M_description, M_command, M_variable, Mdetail_text,
2952 load_im_info_keys, command_list, variable_list.
2953 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2954 (Mdetail_text): New variable.
2955 (minput_get_description, minput_get_commands)
2956 (minput_assign_command_keys, minput_get_variables)
2957 (minput_set_variable): New functions.
2959 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2960 (minput_assign_command_keys, minput_get_variables)
2961 (minput_set_variable): Extern them.
2963 * plist.c (UNGETC): Just decrement st->p.
2964 (read_mtext_element): New arg skip.
2965 (read_integer_element): Likewise.
2966 (read_symbol_element): Likewise.
2967 (read_element): New arg KEYS.
2968 (mplist__from_plist): Don't increment ref-count of NULL object.
2969 (mplist__from_file): New arg KEYS.
2970 (mplist_put): Don't increment ref-count of NULL object.
2971 (mplist_add): Likewise.
2972 (mplist_push): Likewise.
2973 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2975 * plist.h (mplist__from_file): Prototype adjusted.
2977 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2978 (get_database_stream): New function.
2979 (load_database): Use get_database_stream.
2980 (M_database_hook): New variable
2981 (mdatabase__init): Initialize M_database_hook.
2982 (mdatabase__load_for_keys): New function.
2983 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2985 (mdatabase_define): Free mdb->extra_info if necessary.
2987 * database.h (mdatabase__dir_list, M_database_hook)
2988 (mdatabase__load_for_keys): Extern them.
2989 (MDatabaseHookFunc): New type.
2991 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2993 2004-12-27 Kenichi Handa <handa@m17n.org>
2995 * Version 1.2.0 released.
2997 2004-12-27 Kenichi Handa <handa@m17n.org>
2999 * input.c (minput_filter): Don't reset ic->xxx_changed.
3001 * mtext.c (mtext_from_data): Fix documentation.
3003 2004-12-25 Kenichi Handa <handa@m17n.org>
3005 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
3006 (M17NLIB_VERSION_NAME): Update to "1.2.".
3008 2004-12-24 Kenichi Handa <handa@m17n.org>
3010 * input.c (reset_ic): Set key_unhandled to 0.
3012 2004-12-21 Kenichi Handa <handa@m17n.org>
3014 * m17n-gui.h (mfont_from_spec): Delete extern.
3016 * input-gui.c (win_callback): Handle Minput_reset.
3017 (minput__win_init): Register reset_ic as a callback for
3020 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3021 changed. At first, shift to the initial state.
3022 (minput__init): Initialize Minput_reset. Register reset_ic as a
3023 callback for Minput_reset.
3024 (Minput_reset): New variable.
3025 (minput_filter): Always set ic->xxx_changed to 0.
3026 (minput_reset_ic): New function.
3027 (integer_value): Fix typo ('>' -> '<') and calculation of length
3030 * m17n-core.c (merror_code): Change type to `int'.
3032 * m17n-misc.h (merror_code): Adjust type.
3034 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3036 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3037 (mtext_change_prop): Delete extern.
3039 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3040 to `int'. Move the documents to m17n-core.h.
3042 2004-12-13 Kenichi Handa <handa@m17n.org>
3044 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3045 (MTextProperty): Document it.
3047 2004-12-09 Kenichi Handa <handa@m17n.org>
3049 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3051 2004-12-03 Kenichi Handa <handa@m17n.org>
3053 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3054 m17n__gui_initialized): New externs.
3056 * m17n-core.h (enum M17NStatus): New enum.
3057 (m17n_status): Extern it.
3059 * m17n-core.c (core_initialized): Delete this variable.
3060 (m17n__core_initialized, m17n__shell_initialized,
3061 m17n__gui_initialized): New variables.
3062 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3063 instead of core_initialized.
3064 (m17n_status): New function.
3066 * m17n.c (shell_initialized): Delete this variable.
3067 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3070 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3072 * m17n-gui.c (win_initialized): Delete this variable.
3073 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3074 instead of gui_initialized.
3076 2004-11-19 Kenichi Handa <handa@m17n.org>
3078 * input.c (reset_ic): Check if ic_info->state is NULL.
3079 (filter): If ic_info->state is NULL, return 0.
3080 (load_input_method): Don't unref `maps' it it's not created.
3082 2004-11-15 Kenichi Handa <handa@m17n.org>
3084 * input.c (find_candidates_group): If INDEX is -1, find the last
3086 (take_action_list): If the previous of the first candidate is
3087 requested, select the last candidate.
3089 2004-11-08 Kenichi Handa <handa@m17n.org>
3091 * m17n-X.c (device_open): Try at most 32 fonts to find a
3092 non-autoscaled font.
3094 * font.c (xlfd_parse_name): Fix previous change.
3096 2004-11-05 Kenichi Handa <handa@m17n.org>
3098 * font.c: (commont_style): Include dummy elements "slanted" and
3099 "rslanted" to prefer "o" to "r" if "i" is requested.
3101 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3103 2004-10-29 Kenichi Handa <handa@m17n.org>
3105 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3107 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3108 New members smallest and larger.
3109 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3110 (xfont_registry_list): Likewise.
3111 (xfont_select): Likewise.
3114 2004-10-28 Kenichi Handa <handa@m17n.org>
3116 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3117 font name comparison.
3118 (xfont_select): Fix logic for selecting a larger size font.
3120 2004-10-25 Kenichi Handa <handa@m17n.org>
3122 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3125 2004-10-22 Kenichi Handa <handa@m17n.org>
3127 * input.c (update_candidate): Renamed from udpate_candidate.
3128 (take_action_list): Show more debugging info on arithmetic commands.
3130 * m17n-X.c (device_open): Fix previous change.
3132 * draw.c (compose_glyph_string): Don't get face property at the
3135 2004-10-21 Kenichi Handa <handa@m17n.org>
3137 * draw.c (compose_glyph_string): Fix for the case of category
3140 2004-10-19 Kenichi Handa <handa@m17n.org>
3142 * input.c (mdebug_mask): New variable.
3143 (shift_state): Print debug information.
3144 (take_action_list): Likewise.
3145 (handle_key): Likewise.
3147 2004-10-14 Kenichi Handa <handa@m17n.org>
3149 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3151 2004-10-13 Kenichi Handa <handa@m17n.org>
3153 * m17n-X.c (device_open): Be sure to register at least one font
3156 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3157 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3159 2004-10-12 Kenichi Handa <handa@m17n.org>
3161 * draw.c (alloc_gstring): Fix previous change.
3163 * font-ft.c (ft_list_generic): Fix for the case of not
3166 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3168 * font.c (mfont_list): If no font is found, return NULL.
3169 (load_font_encoding_table): Put entries of nil registry first.
3170 (find_encoding): Adjust for the above change.
3172 2004-10-11 Kenichi Handa <handa@m17n.org>
3174 * m17n-gui.h (mfont_list): Adjust prototype.
3176 * m17n-X.c (xfont_list): New arg maxnum.
3178 * font.h (struct MFontDriver): Change prototype of <list>.
3180 * font-ft.c (fc_generic_family_list): Delete it.
3181 (Mserif, Msans_serif, Mmonospace): Delete them.
3182 (M_generic_family_info): New variable.
3183 (enum GenericFamilyType): New enum.
3184 (struct GenericFamilyInfo): New struct.
3185 (generic_family_table): New variable.
3186 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3188 (add_font_info): Get style here.
3189 (ft_list_family): Don't initialize fc_config here. Don't list
3191 (ft_list_generic): New function.
3192 (ft_select): Pay attention to generic familes here.
3193 (ft_open): Fix calculation of ascent and descent.
3194 (ft_list): Pay attention to generic families.
3195 (mfont__ft_init): Initialize M_generic_family_info,
3196 generic_family_table, and fc_config..
3197 (mfont__ft_fini): Finalize generic_family_table.
3199 * draw.c (compose_glyph_string): Use more constant font for
3200 glyphs. Adjust for the member change in MGlyph.
3201 (layout_glyph_string): Adjust for the member change in MGlyph.
3202 (alloc_gstring): Intilize scracth_glyph to avoid
3203 compose_glyph_string on it.
3204 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3205 (mdraw_coordinates_position): Fix previous change.
3207 * internal-gui.h (glyph_category): New enum.
3208 (MGlyph): Change type of <category> to enum glyph_category.
3210 * face.c (mface__realize): Delete args langauge and charset.
3211 (mface__for_chars): Fix for the case that glyphs have different
3213 (mface__update_frame_face): Adjust for mface__realize change.
3215 * face.h (mface__realize): Adjust prototype.
3217 2004-10-05 Kenichi Handa <handa@m17n.org>
3219 * language.c (mlang__init): Add Akan.
3221 2004-10-04 Kenichi Handa <handa@m17n.org>
3223 * font-ft.c (add_font_info): Add instead of push the element.
3224 (ft_list_family): For generic fonts, try all
3225 substituted. families.
3227 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3228 (run_rule): Don't update cluster range here.
3229 (run_command): Update cluster range on appending a glyph.
3230 (run_otf): Update cluster range for glyphs generated by OTF.
3232 2004-10-02 Kenichi Handa <handa@m17n.org>
3234 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3236 2004-09-30 Kenichi Handa <handa@m17n.org>
3238 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3240 2004-09-30 Kenichi Handa <handa@m17n.org>
3242 * font.h: Include <fontconfig/fontconfig.h>.
3243 (MFTInfo): New member langset.
3244 (mfont__encoding_list): Extern it.
3246 * font.c (mfont__encoding_list): New function.
3247 (mdebug_dump_font_list): New function.
3249 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3250 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3252 (ft_family_list): New variable.
3253 (set_font_info): New arg basep. Callers changed.
3254 (fc_list): Check the return value of FcPatternGetString.
3255 (add_font_info): New arg plist. Callers changed. Update
3257 (ft_list_family): New function (merged fc_list and ft_list_all).
3258 (ft_select): Use ft_list_family.
3259 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3261 (mfont__ft_init): Initialize above new variables.
3262 (mfont__ft_fini): Free ft_family_list.
3263 (STRDUP_LOWER): New macro.
3264 (set_font_info): Use STRDUP_LOWER.
3265 (ft_list_family): Avoid duplicate addition of font path. Use
3267 (fc_decode_prop): Fix typo.
3269 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3270 (xfont_registry_list): Change argument disp_info to frame.
3272 (xfont_list_all): New function.
3273 (xfont_list): If FONT is not NULL, check all fonts.
3275 2004-09-28 Kenichi Handa <handa@m17n.org>
3277 * m17n-X.c (MXFont, MXFontList): New types.
3278 (MDisplayInfo): Delete members font_registry_list,
3279 iso8859_1_family_list, iso10646_1_family_list, new members
3280 font_list, base_font_list.
3281 (free_display_info): Adusted for the change of MDisplayInfo.
3282 (xfont_driver): Initialize with xfont_list.
3283 (font_compare): New function.
3284 (build_font_list): Deleted.
3285 (xfont_registry_list): New function.
3286 (xfont_select): Use xfont_registry_list.
3287 (xfont_list): New function.
3288 (device_open): Adusted for the change of MDisplayInfo.
3290 * font-ft.c (add_font_info): New arg languages. Callers changed.
3291 (fc_list): Get languages from fonts..
3292 (ft_list_all): Renamed from ft_list. Callers changed.
3293 (ft_list): New function.
3294 (mfont__ft_driver): Initalize with ft_list.
3296 * font.c (mfont_list): New function.
3298 * font.h (struct MFontDriver): New member `list'.
3299 (MFTInfo): New member languages.
3301 * m17n-gui.h (mfont_list): Extern it.
3303 2004-09-27 Kenichi Handa <handa@m17n.org>
3305 * internal-gui.h (struct MGlyphString): Delete members mt,
3306 sub_width, sub_lbrearing, sub_rbearing, and region.
3308 * draw.c (MSubTextExtents): New type.
3309 (layout_glyphs): New arg extents. Set its members.
3310 (layout_glyph_string): Adjusted for the above change.
3311 (alloc_gstring): Don't set gstring->mt.
3312 (truncate_gstring): Call line_break function with mt instead of
3315 2004-09-22 Kenichi Handa <handa@m17n.org>
3317 * mtext.c (count_utf_16_chars): Count each code of invalid
3320 2004-09-19 Kenichi Handa <handa@m17n.org>
3322 * mtext.c (default_utf_16, default_utf_32): Rename them to
3323 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3326 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3329 2004-09-13 Kenichi Handa <handa@m17n.org>
3331 * draw.c (Mlatin): Don't declare it here.
3332 (visual_order): Fix reordering of combining characters.
3333 (compose_glyph_string): Fix detection of script.
3334 (layout_glyphs): Don't fix reordering of combining characters
3336 (layout_glyph_string): Pay attention to
3337 control->disable_overlapping_adjustment.
3338 (truncate_gstring): Include at least on character in a line.
3339 (get_gstring): Always scan one full line.
3340 (mdraw__init): Don't initialize Mlatin here.
3341 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3342 have a font, use ascent/descent of an ASCII font. Allow
3343 ink_array_return and logical_array_return to be NULL.
3344 (mdraw_coordinates_position): Fix iteration.
3346 * font-ft.c (MFTtoProp): Member completely changed.
3347 (ft_to_prop): Adjusted for the above change.
3348 (ft_to_prop_size): Likewise.
3349 (set_font_info): Adjusted for the change of MFTtoProp.
3350 (fc_generic_family_list): New variable.
3351 (fc_list): Add special handling of generic font names.
3352 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3353 Initialize fc_generic_family_list.
3354 (mfont__ft_fini): Don't free ft_to_prop. Free
3355 fc_generic_family_list.
3356 (FC_vs_M17N_font_prop): New type.
3357 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3358 (fc_decode_prop, fc_encode_prop): New functions.
3359 (mfont__ft_parse_name): Use fc_decode_prop.
3360 (mfont__ft_unparse_name): Use fc_encode_prop.
3362 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3363 (MWDevice): Add member realized_font_list.
3364 (free_display_info): Don't free disp_info->realized_font_list.
3365 (free_device): Free device->realized_fontset_list.
3366 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3367 (device_open): Don't initialize disp_info->realized_font_list.
3368 (device_open): Initialize device->realized_font_list and set it to
3369 frame->realized_font_list.
3371 * fontset.c (try_font_group): New function.
3372 (mfont__lookup_fontset): Use try_font_group.
3374 * font.c (common_weight): Change the order of "regular".
3376 * face.c (Mlatin): Don't make it static.
3377 (mface__realize): Be sure to set work_gstring.frame.
3378 (mface__for_chars): Likewise.
3380 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3383 * internal-gui.h (Mlatin): Extern it.
3385 * m17n-gui.h (MDrawControl): New member
3386 disable_overlapping_adjustment.
3388 2004-09-06 Kenichi Handa <handa@m17n.org>
3390 * font-flt.c (run_otf): Fix typo ('}'->']').
3392 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3393 (COMBINING_PRECOMPUTED_P): New macros.
3395 * draw.c (layout_glyphs): Handle precomputed combining code.
3397 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3398 precomupted combining code.
3400 2004-09-03 Kenichi Handa <handa@m17n.org>
3402 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3405 2004-08-27 Kenichi Handa <handa@m17n.org>
3407 * face.c (mface_put_prop): If the new value is the same as the
3408 current one, don't increment frame->tick.
3410 2004-08-25 Kenichi Handa <handa@m17n.org>
3412 * fontset.c (mfontset): Initialize font_spec_list member.
3413 (mfontset_copy): Load fontset if necessary.
3415 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3416 'metrics' to for C++.
3418 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3421 2004-08-16 Kenichi Handa <handa@m17n.org>
3423 * Version 1.1.0 released.
3425 2004-08-13 Kenichi Handa <handa@m17n.org>
3427 * language.c (mlang__init): Add Dhivehi.
3429 * m17n-gui.c (Mx, Mfreetype): Delete it.
3430 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3432 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3433 (mfont_resize_ratio): Extern it.
3434 (MDrawGlyphInfo): New member logical_width;
3435 (MDrawGlyph): New type.
3436 (mdraw_glyph_list): Prototype adjusted.
3438 * m17n-X.c (xfont_open): Set type and fontp members.
3439 (xft_open): Likewise.
3441 * internal-gui.h (Mx, Mfreetype): Delete extern.
3443 * font.h (struct MRealizedFont): New member type and fontp.
3445 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3446 (Mx, Mfreetype): Declare here.
3447 (Mxft): New variable.
3448 (mfont_resize_ratio): New function.
3450 * font-ft.c (ft_open): Set type and fontp members.
3452 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3455 2004-08-11 Kenichi Handa <handa@m17n.org>
3457 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3460 2004-08-06 Kenichi Handa <handa@m17n.org>
3462 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3465 * font-flt.c (run_otf): Print debugging information if necessary.
3467 2004-08-05 Kenichi Handa <handa@m17n.org>
3469 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3470 positioning_type 5 and 6. Switch simplified.
3472 2004-08-04 Kenichi Handa <handa@m17n.org>
3474 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3476 2004-08-02 Kenichi Handa <handa@m17n.org>
3478 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3479 set val to 1 even if it is greater than 1.
3481 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3483 2004-07-29 Kenichi Handa <handa@m17n.org>
3485 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3486 debugging information.
3488 * internal.h (MDEBUG_PRINT5): New macro.
3490 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3491 the previous one if the zero width glyph has left or right
3494 2004-07-26 Kenichi Handa <handa@m17n.org>
3496 * m17n-X.c (xft_render): Pay attention to members left_padding and
3497 right_padding of MGlyph.
3499 * draw.c (visual_order): Allocate one more elements for arrays as
3500 a workaround of fribidi bug.
3501 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3502 instead of MGlyph->bidi_sensitive.
3503 (layout_glyph_string): Pay attentinon to
3504 control->orientation_reversed when padding at the head or tail.
3505 Fix adjustment of space glyph width.
3506 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3509 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3510 instead of MGlyph->bidi_sensitive.
3512 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3514 2004-07-26 Kenichi Handa <handa@m17n.org>
3516 * draw.c (visual_order): Don't treat combined glyphs specially.
3517 (layout_glyphs): Don't get metrics glyphs that are already ready.
3518 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3519 width with the previous one.
3520 (draw_background): Fix bar cursor position on a r2l glyph.
3522 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3523 (run_rule): Fix place of updating cluster_begin_pos and
3524 cluster_end_pos here.
3525 (run_otf): Don't set left_padding.
3527 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3529 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3530 Fix handling of GPOS.
3531 (mfont__ft_drive_gpos): Delete this function.
3533 * font.h (mfont__ft_drive_otf): Renamed back from
3534 mfont__ft_drive_gsub.
3535 (mfont__ft_drive_gpos): Delete extern.
3537 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3538 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3540 2004-07-23 Kenichi Handa <handa@m17n.org>
3542 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3543 the same bidi level.
3545 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3547 2004-07-22 Kenichi Handa <handa@m17n.org>
3549 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3551 2004-07-20 Kenichi Handa <handa@m17n.org>
3553 * draw.c (render_glyphs): Fix checking of g->code validity.
3555 * face.c (mface__realize): Set g.type.
3557 2004-07-18 Kenichi Handa <handa@m17n.org>
3559 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3562 * m17n-gui.c (mframe): Print error message give by dlopen to
3565 2004-07-16 Kenichi Handa <handa@m17n.org>
3567 * draw.c (compose_glyph_string): Improve the way of deciding a
3568 script. For a character that doesn't have script property, use
3569 the last non-latin script.
3571 * font-ft.c (fc_list): Cancel previous change.
3572 (mfont__ft_init): Add more entries in ft_to_prop_name.
3574 2004-07-15 Kenichi Handa <handa@m17n.org>
3576 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3577 previous or next character glyphs.
3579 2004-07-14 Kenichi Handa <handa@m17n.org>
3581 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3582 of type GLYPH_SPACE.
3584 * fontset.c (mfont__lookup_fontset): If glyph type is
3585 GLYPH_SPACE, get codes for SPACE.
3587 * internal-gui.h (Mfont): Delete extern.
3589 * m17n-gui.h (Mfont): Delete duplicated extern.
3591 2004-07-13 Kenichi Handa <handa@m17n.org>
3593 * font-ft.c (DEVICE_DELTA): New macro.
3594 (adjust_anchor): New function.
3595 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3597 (mfont__ft_drive_gpos): New function.
3599 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3600 (FontLayoutContext): Delete member `rfont'.
3601 (run_otf): Set g->otf_cmd. Call
3602 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3603 only whne HAVE_OTF is defined.
3605 * fontset.c: Include "config.h".
3607 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3608 (MGlyph): New member otf_cmd.
3610 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3611 (mfont__ft_drive_gpos): Extern it.
3613 * face.c: Include "config.h".
3615 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3617 * input-gui.c: Include "config.h".
3619 * plist.c: Include "config.h".
3621 2004-07-06 Kenichi Handa <handa@m17n.org>
3623 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3624 internal-gui.h: Cancel previous changes.
3626 * m17n-gd.h: Delete it.
3628 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3629 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3630 @XML2_LD_FLAGS@ to above.
3631 (libm17n_la_LIBADD): Add -ldl.
3632 (libm17n_la_LDFLAGS): Add -export-dynamic.
3633 (X_LD_FLAGS): Fix the order of linking.
3634 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3635 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3636 (libm17n_X_la_LDFLAGS): Add -module.
3637 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3638 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3639 (libm17n_gd_la_LDFLAGS): Add -module.
3640 (include_HEADERS): Delete m17n-gd.h.
3642 2004-06-30 Kenichi Handa <handa@m17n.org>
3644 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3645 (MDeviceLibraryInterface): Delete it.
3646 (register_device_library): Delete it.
3647 (m17n__device_library_list): Renamed from device_library_list.
3649 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3650 (m17n_init_win): Adjust prototype.
3652 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3653 (m17n_init_gd): New function.
3655 * m17n-gd.h: New file.
3657 * m17n-X.h: Include <m17n-gui.h>.
3658 (m17n_init_X): Extern it.
3659 (M17N_INIT): Redefine it.
3661 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3662 (m17n_init_X): New function.
3664 * internal-gui.h (m17n__device_library_list): Extern it.
3665 (struct MDeviceDriver): New members initialized, init, and fini.
3667 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3669 (libm17n_X_la_LIBADD): Delete aboves.
3670 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3671 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3672 (libm17n_gd_la_LDFLAGS): Delete it.
3673 (include_HEADERS): Add m17n-gd.h.
3675 2004-06-25 Kenichi Handa <handa@m17n.org>
3677 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3678 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3680 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3682 * font-ft.c (fc_list): If FcFontList finds no font, try
3685 * draw.c (compose_glyph_string): Terminate the last loop after
3686 doing default combining if necessary.
3688 2004-06-24 Kenichi Handa <handa@m17n.org>
3690 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3692 * character.c (mchar_define_property): Add const to an arg.
3694 * charset.c (mchar_define_charset): Add const to an arg.
3696 * coding.c (MCodingSystem): Add const to an arg or decoder.
3697 (finish_decoding): Add const to an arg.
3698 (decode_coding_charset, decode_coding_utf_8)
3699 (decode_coding_utf_16, decode_coding_utf_32)
3700 (decode_coding_iso_2022, decode_coding_sjis)
3701 (mconv_define_coding): Likewise.
3703 * m17n-X.c (xft_find_metric): Delete unused variable.
3705 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3708 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3711 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3712 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3714 * mtext.h (mtext__from_data): Ajust prototype.
3716 2004-06-23 Kenichi Handa <handa@m17n.org>
3718 * draw.c (compose_glyph_string): Always get glyph codes by
3720 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3721 (mdraw_glyph_list): New function.
3723 * font-flt.c (mfont__flt_run): Be sure to call
3724 rfont->driver->encode_char.
3726 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3727 (ft_encode_char): Delete arg C.
3728 (ft_render): Don't call FT_Get_Char_Index.
3730 * font.c (mfont__encodable_p): Delete it.
3731 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3733 * font.h (struct MFontDriver): Delete arg C of encode_char.
3734 (mfont__encodable_p): Delete extern.
3736 * m17n-X.c (xfont_encode_char): Delete arg C.
3737 (xft_find_metric): Don't cal FT_Get_Char_Index.
3738 (xft_render): Likewise.
3740 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3742 (mdraw_glyph_list): Extern it.
3744 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3746 2004-06-22 Kenichi Handa <handa@m17n.org>
3748 * m17n-gui.h (mfontset_lookup): Extern it.
3750 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3752 * fontset.c (realize_fontset_elements)
3753 (free_realized_fontset_elements, update_fontset_elements): New
3755 (mfont__realize_fontset): Call realize_fontset_elements.
3756 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3757 (mfont__lookup_fontset): If a fontset was modified, update
3758 the realized fontset.
3759 (mfontset_modify_entry): Increment fontset->tick.
3760 (mfontset_lookup): New function.
3762 2004-06-21 Kenichi Handa <handa@m17n.org>
3764 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3766 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3767 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3768 length of source text 0.
3770 2004-06-21 Kenichi Handa <handa@m17n.org>
3772 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3773 (compare): Pay attention to format other than utf-8.
3774 (copy): Delete this function.
3775 (count_by_utf_8, count_by_utf_16, insert): New functions.
3776 (count_utf_16_chars): Fix handling of a surrogate pair.
3777 (find_char_forward, find_char_backward): Likewise.
3778 (mtext__from_data): Delete unnecessary check. Fix number of
3780 (mtext_from_data): Don't count items.
3781 (mtext_ref_char): Optimize the code.
3782 (mtext_set_char): Pay attention to format other than utf-8.
3783 (mtext_cat_char): Likewise.
3784 (mtext_dup): Don't call copy, instead do allocation here.
3785 (mtext_cat): Call insert instead of copy.
3786 (mtext_ncat): Likewise.
3787 (mtext_cpy): Delete character at first and call insert instead of
3789 (mtext_ncpy): Likewise.
3790 (mtext_copy): Likewise.
3791 (mtext_duplicate): Call insert instead of copy.
3792 (mtext_del): Pay attention to format other than utf-8.
3793 (mtext_ins): Simply call insert.
3794 (mtext_ins_char): Pay attention to format other than utf-8.
3795 (mtext_tok): Call insert instead of copy.
3796 (mtext_text): Call UNIT_BYTES.
3798 * textprop.c (mtext__adjust_plist_for_change): New function.
3800 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3801 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3802 (CHAR_UNITS_AT): Fix typo.
3803 (CHAR_UNITS_BY_HEAD): Fix typo.
3804 (STRING_CHAR_AND_UNITS): Fix typo.
3806 * internal.h (MTEXT_READ_ONLY_P): New macro.
3808 * mtext.h (mtext__replace): Delete the extern.
3809 (mtext__adjust_foramt): Adjust prototype.
3811 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3812 if possible. Otherwise make a copy of mmt.
3814 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3817 2004-06-18 Kenichi Handa <handa@m17n.org>
3819 * character.h (CHAR_STRING_UTF16): Fix syntax.
3821 2004-06-16 Kenichi Handa <handa@m17n.org>
3823 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3824 (libm17n_X_la_LIBADD): Delete it.
3825 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3827 * m17n-X.c (device_open): Add parens in `if' condition.
3829 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3830 (DEC_POSITION): Likewise.
3831 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3833 2004-06-15 Kenichi Handa <handa@m17n.org>
3835 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3838 * draw.c (compose_glyph_string): If langauge is specified, call
3839 mface__for_chars even if a text is all latin. Fix condition for
3840 setting non_ascii_found.
3842 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3844 * m17n.h (minput_char_to_key): Delete extern.
3846 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3848 * m17n-gui.c (null_device_open): Set several members of frame.
3850 2004-06-14 Kenichi Handa <handa@m17n.org>
3852 * m17n-gui.h (minput_event_to_key): Delete extern.
3854 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3856 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3858 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3860 2004-06-08 Kenichi Handa <handa@m17n.org>
3862 * character.c (mchar_put_prop): Don't increment the ref-count of
3865 2004-06-04 Kenichi Handa <handa@m17n.org>
3867 * m17n-core.c (mdebug__register_object): New function.
3868 (mdebug__unregister_object): Likewise.
3870 * internal.h (mdebug__register_object, mdebug__unregister_object):
3872 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3875 * charset.c (mcharset__load_from_database): Don't call
3876 mconv__register_charset_coding here.
3878 * coding.c (find_coding): Get a real name from an element of
3879 coding_definition_list.
3880 (mconv__register_charset_coding): Set the real name at the top of
3882 (mcoding__load_from_database): Likewise.
3883 (mconv_list_codings): Adjusted for the above change.
3885 2004-06-03 Kenichi Handa <handa@m17n.org>
3887 * coding.c (find_coding): Find by canonicalized name. Don't have
3888 to modify the element of coding_definition_list by
3890 (mconv__define_coding_from_charset): Delete it.
3891 (mconv__register_charset_coding): Canonicalize sym.
3892 (mcoding__load_from_database): Register plist modified by
3895 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3897 * font-ft.c (ft_open): Fix setting of rfont->descent.
3899 2004-06-02 Kenichi Handa <handa@m17n.org>
3901 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3902 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3903 (xlfd_unparse_name): Renamed from xfont_build_name.
3904 (mfont__init): Initialized Mfontconfig.
3905 (mfont__free_realized): Unconditionally unref rfont->info.
3906 (mfont__select): Free `this' if it's not best.
3907 (mfont__open): Don't check frame->realized_font_list.
3908 (mfont__parse_name_into_font): New function.
3909 (Mfontconfig): New variable.
3910 (mfont_from_name): Call mfont_parse_name.
3911 (mfont_name): Call mfont_unparse_name.
3912 (mdebug_dump_font): Likewise.
3914 * font.h (struct MFontDriver): Delete members parse_name and
3916 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3917 (mfont__parse_name_into_font): Extern it.
3919 * font-ft.c: Include "symbol.h".
3920 (close_ft): Unconditionally free filename and charmap_list of
3922 (ft_open): Duplicate base->filename. Increment ref-count of
3923 ft_info->charmap_list. Free ft_info->charmap_list and
3924 ft_info->filename on error.
3925 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3927 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3929 (enum xlfd_field_idx): Moved to font.c.
3930 (split_font_name, build_font_name): Likewise.
3931 (build_font_list): Call mfont__parse_name_info_font.
3932 (xfont_open): Call mfont__unparse_name. Free name.
3933 (xfont_parse_name, xfont_build_name): Moved to font.c
3934 (xft_select): Prototype deleted.
3935 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3936 Call mfont_pase_name.
3938 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3939 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3942 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3945 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3947 2004-06-01 Kenichi Handa <handa@m17n.org>
3949 * fontset.c (mfontset_modify_entry): Pay attention to the case
3950 that fontset->font_spec_list is NULL.
3952 2004-05-31 Kenichi Handa <handa@m17n.org>
3954 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3956 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3958 * font.c (mfont__select): Print score the a font for debugging.
3960 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3962 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3963 kanji_sym and kana_sym.
3965 2004-05-28 Kenichi Handa <handa@m17n.org>
3967 * Makefile.am (VINFO): New variable.
3968 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3969 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3971 2004-05-27 Kenichi Handa <handa@m17n.org>
3973 The following chanages are to make device dependent functions
3974 accessible only from MDeviceDriver structure, and to add GD and
3975 null device drivers. Font drivers get also device dependent.
3977 * m17n.c (m17n_init): Increament shell_initialized.
3978 (m17n_fini): Decremented shell_initialized.
3980 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3982 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3983 (Mwidget, Mcolormap, Mx): Extern them.
3985 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3986 (free_frame): Call frame->driver->close instead of
3988 (DLOPEN_SHLIB_EXT): New macro.
3989 (MDeviceLibraryInterface): New type.
3990 (device_library_list): New variable.
3991 (register_device_library): New function.
3992 (null_device): New variable.
3993 (null_device_close, null_device_get_prop)
3994 (null_device_realize_face, null_device_free_realized_face): New
3996 (null_driver): New variable.
3997 (null_device_init, null_device_fini, null_device_open): New
3999 (null_interface): New variable.
4000 (Mfreetype, Mdevice): Declare them.
4001 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
4002 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
4003 Mwin__Close_Device. Register drivers for Mx and Mgd.
4004 (m17n_fini_win): Decremented win_initialized. Call "fini"
4005 function of all opened devices. Don't call mwin__fini.
4006 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
4008 (mframe): Handle Mdevice key of PLIST.
4009 (mframe_get_prop): Call frame->device->get_prop instead of
4010 mwin__device_get_prop.
4012 * m17n-gd.c: New file.
4014 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4015 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4017 * m17n-core.c (m17n_init_core): Increate core_initialized.
4018 (m17n_fini_core): Decremented core_initialized.
4020 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4021 (Mcolormap): Don't extern them here.
4023 * m17n-X.c (FRAME_DEVICE): New macro.
4024 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4025 (free_display_info): Use MPLIST_DO.
4026 (free_device): Free rface->info.
4027 (xft_close): Delete it.
4028 (device_init): Renamed from mwin__init.
4029 (device_fini): Renamed from mwin__fini.
4030 (device_open): Renamed from mwin__open_device.
4031 (x_driver): New variable.
4032 (MXFontInfo): Delete member frame, add member display.
4033 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4034 Don't declare them here.
4036 * internal-gui.h (MDeviceType): New enum.
4037 (MWDefice): Delete it.
4038 (struct MFrame): Change type of device to void *. New members
4039 device_type, driver, font_driver_list.
4040 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4041 (MDeviceDriver): New type.
4042 (Mx, Mgd, Mfreetype): Extern them.
4043 (mwin__XXX): Delete all of them.
4045 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4047 (win_destroy_ic): Likewise.
4048 (adjust_window_and_draw): Likewise.
4049 (win_callback): Likewise.
4050 (Mxim): Declare it here.
4051 (minput_event_to_key): Call M_CHECK_READABLE.
4053 * fontset.c (mfont__lookup_fontset): Delete local variable
4056 * font.h (struct MFontDriver): Delete member close, add members
4057 parse_name and build_name.
4058 (mfont__driver_list): Delete extern.
4059 (mfont__close): Delete extern.
4061 * font.c (mfont__init): Don't set mfont__driver_list.
4062 (mfont__fini): Don't unref mfont__driver_list.
4063 (mfont__select): Try font drivers in frame->font_driver_list. Set
4064 driver member of a realized font.
4065 (mfont__close): Delete it.
4066 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4067 functions of the default frame.
4069 * font-ft.c (close_ft): Check ft_info->ft_face and work
4071 (add_font_info): Allocate ft_info by M17N_OBJECT.
4072 (ft_close): Delete it.
4073 (mfont__ft_driver): Don't set ft_close.
4074 (ft_select): Increment ref-count of best_font.
4075 (ft_open): Decremented ref-count of base. On error, call
4076 FT_Done_Face and free ft_info.
4077 (ft_find_metric): Always use XXX_MONO in load_flags.
4078 (ft_render): Fix setting of width. Call
4079 frame->driver->draw_points instead of mwin__draw_points.
4080 (ft_to_prop): Don't set mfont__driver_list.
4081 (mfont__ft_fini): Just unref ft_info.
4083 * face.c (mface__init): Exchange foreground and background of
4084 mface__default. Call mface_put_prop to set hline of
4086 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4087 (mface__free_realized): Don't call mwin__free_realized_face.
4089 * draw.c (Mdepth): Don't declare it here.
4090 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4091 (render_glyphs, render_glyph_string): Likewise.
4092 (mdraw__init): Don't set Mdepth.
4093 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4095 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4097 (mdraw_text_items): Check FRAME is writable.
4098 (mdraw_per_char_extents): Implement body.
4100 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4102 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4103 (GUI_SOURCES): Delete it.
4104 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4105 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4106 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4107 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4108 (linkgui_LDADD): Set to libm17n-gui.la
4109 (linkgui_LDFLAGS): New target.
4110 (SRC): Include ${libm17n_gui_la_SOURCES} and
4111 ${libm17n_gd_la_SOURCES}.
4113 2004-05-24 Kenichi Handa <handa@m17n.org>
4115 * draw.c (draw_background): Don't draw background even if
4116 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4118 2004-05-22 Kenichi Handa <handa@m17n.org>
4120 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4122 2004-05-20 Kenichi Handa <handa@m17n.org>
4124 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4126 * m17n-gui.c: Include "plist.h".
4127 (mframe): If PLIST is NULL, initialize it to emply plist.
4129 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4130 (xft_driver): New variable.
4131 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4132 (xft_find_metric, xft_render): New function.
4133 (mwin__init): Adjusted for the new mfont__driver_list.
4134 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4135 generated face to PARAM.
4136 (mwin__realize_face): Fix setting of box colors. Don't call hook
4138 (mwin__draw_hline): New function.
4139 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4140 (mwin__xft_render): Delete these function.
4142 * internal-gui.h (struct MFrame): New member tick.
4143 (struct MGlyphString): New member tick.
4144 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4145 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4146 (mwin__xft_render): Delete extern.
4148 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4149 (mfontset): Always increment the reference count of returned
4152 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4153 (MFTInfo): Moved to font.h.
4154 (ft_iso8859_1_font_list): Delete this variable.
4155 (set_font_info): Don't set font->property[MFONT_TYPE].
4156 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4157 (add_font_info): Change type to void.
4158 (fc_list): Change anme from xft_list. Caller changed. Include
4159 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4160 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4161 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4162 (close_ft): Don't call mwin__xft_close. Unref
4163 ft_info->extra_info.
4164 (ft_open): Don't setup ft_info->fontname. Don't call
4166 (ft_find_metric): Don't call mwin__xft_get_metric.
4167 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4168 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4169 (mfont__ft_init): Adjusted for new mfont__driver_list.
4170 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4172 * font.c (mfont__driver_list): Make it MPlist.
4173 (mfont__init): Adjust initialization of mfont__driver_list.
4174 (mfont__fini): Free mfont__driver_list.
4175 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4176 (mfont__select): Adjusted for the new mfont__driver_list.
4178 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4179 (mfont__drirver_list): Adjust prototype.
4180 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4182 * face.h (struct MFace): Delete member realized_face_list, add
4184 (struct MRealizedFace): Delete member need_update
4185 andnofont_rface, add member non_ascii_list.
4186 (mface__update_frame_face): Extern it.
4188 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4190 (get_hline_create, get_box_create): New functions.
4191 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4193 (free_face): Cancep previous change. Free face->frame_list.
4194 (serialize_hline): Do nothing if hline->width is zero.
4195 (serialize_box): Do nothing if box->width is zero.
4196 (mface__init): Setup all properties of mface__default.
4197 (mface__fini): Free hline_prop_list and box_prop_list.
4198 (mface__realize): Cancel previous change. Update
4199 face->frame_list. Setup rface->non_ascii_list.
4200 (mface__for_chars): Update rface->non_ascii_list.
4201 (mface__free_realized): Free rface->non_ascii_list.
4202 (mface__update_frame_face): New function.
4203 (mface): Initialize face->frame_list.
4204 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4206 (mface_merge): Likewise.
4207 (mface_put_prop): If key is Mhline or Mbox, get value by
4208 get_hline_create or get_box_create respectively.
4209 (mface_put_prop): Update frame->tick and call
4210 mface__update_frame_face if necessary.
4211 (mface_update): Do nothing if func is noop_hook.
4213 * draw.c (render_glyphs): If a font is not found, use
4214 mwin__draw_empty_boxes.
4215 (alloc_gstring): Initialize gstring->tick.
4216 (get_gstring): Check gstring->tick.
4218 2004-05-17 Kenichi Handa <handa@m17n.org>
4220 * face.c (find_realized_face): Return value changed. If RFONT is
4221 NULL, avoid unnecessary checking.
4222 (free_face): Free face->realized_face_list.
4223 (mface__realize): Adjusted for the change of find_realized_face.
4224 If it returns a realized face that needs update, free it and
4225 realize a new one. Push a new realized face to
4226 frame->realized_face_list instead of appending.
4227 (mface__for_chars): Adjusted for the change of find_realized_face.
4228 Short cut if the required font is in rface->ascii_rface.
4229 (mface_put_prop): Free old value if necessary. Set need_update
4230 member of realized faces to 1.
4232 * face.h (struct MFace): Delete member tick, add member
4234 (struct MRealizedFace): Delete member tick, add member
4237 2004-05-13 Kenichi Handa <handa@m17n.org>
4239 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4241 2004-05-12 Kenichi Handa <handa@m17n.org>
4243 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4245 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4246 parse it XftNameParse.
4248 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4249 (all_fonts_scaned): New variable.
4250 (set_font_info): FAMILY may be Mnil.
4251 (add_font_info): Argument changed.
4252 (xft_list): Call add_font_info in it.
4253 (ft_list): Likewise.
4254 (ft_select): Make it work in the case family is Mnil.
4255 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4256 (mfont__ft_fini): Set all_fonts_scaned to 0.
4258 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4259 that is failed to open.
4261 2004-05-10 Kenichi Handa <handa@m17n.org>
4263 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4264 device's depth is 1 (i.e. monochrome).
4266 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4267 to work around the problem of libtool.
4269 * font-ft.c: Include <freetype/ftbdf.h>.
4270 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4272 (mfont__ft_init): Initialize them.
4273 (ft_iso8859_1_font_list): New variable.
4274 (set_font_info): Detect a font containing iso8859-1 glyphs and
4275 register it in ft_iso8859_1_font_list. If the font is not
4276 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4277 properties of the font from its properties.
4278 (add_font_list): If the font is not scalable, check if it is BDF
4279 or PCF font. If not, ignore it.
4280 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4281 registry is not iso8859-1.
4282 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4283 ft_iso8859_1_font_list.
4284 (ft_find_metric): If the font is not scalable, assume it as BDF
4285 or PCF, and get a metric from its properties.
4286 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4288 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4290 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4291 (libm17n_la_LDFLAGS): Delete it.
4292 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4293 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4295 2004-05-06 Kenichi Handa <handa@m17n.org>
4297 * draw.c (compose_glyph_string): Fix previous change.
4299 2004-04-30 Kenichi Handa <handa@m17n.org>
4301 * font-ft.c (ft_list): Delete unused variable `result'.
4302 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4304 2004-04-27 Kenichi Handa <handa@m17n.org>
4306 * m17n-X.c: Include config.h
4307 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4308 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4309 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4310 (FRAME_CMAP, FRAME_VISUAL): New macros.
4311 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4312 (xfont_driver): Make it static.
4313 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4314 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4315 info->xft_color_back.
4316 (MXftFontInfo) [HAVE_XFT2]: New type.
4317 (mwin__xft_close) [HAVE_XFT2]: New function.
4318 (mwin__xft_open) [HAVE_XFT2]: New function.
4319 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4320 (mwin__xft_render) [HAVE_XFT2]: New function.
4322 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4323 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4324 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4327 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4329 * font-ft.c: Don't include FT_FREETYPE_H here.
4330 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4331 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4332 (MFTInfo): New member charmap_index.
4333 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4334 (check_otf_filename): Renamed from check_filename. Return value
4336 (ft_set_property): This function deleted.
4337 (set_font_info): New function.
4338 (add_font_list): Argument changed. Add multiple fonts.
4339 (xft_list) [HAVE_XFT2]: New function.
4340 (ft_list) [not HAVE_XFT2]: New function.
4341 (ft_select): Add code for Xft.
4342 (close_ft): Likewise.
4343 (ft_open): Likewise.
4344 (ft_find_metric): Likewise.
4345 (ft_encode_char): Likewise.
4346 (ft_render): Likewise.
4348 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4350 2004-04-26 Kenichi Handa <handa@m17n.org>
4352 * textprop.c (mtext_attach_property): Declare the return type as
4355 2004-04-21 Kenichi Handa <handa@m17n.org>
4357 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4359 2004-04-09 Kenichi Handa <handa@m17n.org>
4361 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4363 (load_command): Setup above members.
4365 2004-04-05 Kenichi Handa <handa@m17n.org>
4367 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4369 2004-03-30 Kenichi Handa <handa@m17n.org>
4371 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4374 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4375 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4377 2004-03-29 Kenichi Handa <handa@m17n.org>
4379 * Version 1.0 Patch Level 2 released.
4381 2004-03-29 Kenichi Handa <handa@m17n.org>
4383 * charset.c (make_charset): Set charset->fully_loaded and
4384 charset->simple correctly. Don't try to get charset->min_char and
4385 charset->max_char for a charset of method subset and superset.
4386 Don't load a mapping file here.
4387 (mcharset__init): Set unified_max.
4388 (mcharset__load_from_database): Free a working plist.
4390 * coding.c (mcoding__fini): Free all malloced data.
4392 * input-gui.c (win_create_ic): Set control.as_image for preediting
4395 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4396 `count') to initialize the array.
4398 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4401 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4403 (mwin__create_window): Fix bug of setting a background pixel of a
4405 (mwin__adjust_window): Clear the window before drawing.
4407 * m17n-core.c (mdebug__report_object): Free array->objectes if
4409 (m17n_init_core): Don't set report_header_printed to 0 here.
4410 Fix debugging information.
4411 (m17n_fini_core): Set report_header_printed to 0 here.
4413 * m17n-core.h (mplist_deserialize): Extern it.
4415 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4417 * m17n.c (m17n_fini): Fix debugging information.
4419 * mtext.c (mtext__adjust_foramt): New function.
4421 * mtext.h (mtext__adjust_foramt): Extern it.
4423 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4425 * plist.h (mplist__deserialize): Don't extern it.
4427 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4428 elements of symbol_table to NULL. Report about created and freed
4429 symbols if MDEBUG_FINI is set.
4431 2004-03-22 Kenichi Handa <handa@m17n.org>
4433 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4435 * m17n.c (m17n_init): Fix the way of checking merror_code.
4437 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4439 2004-03-22 Kenichi Handa <handa@m17n.org>
4441 * fontset.c (realize_font_group): Adjust the font size by
4442 mfont__resize before selecting a font.
4444 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4446 2004-03-19 Kenichi Handa <handa@m17n.org>
4448 * Version 1.0 Patch Level 1 released.
4450 2004-03-19 Kenichi Handa <handa@m17n.org>
4452 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4454 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4456 2004-03-19 Kenichi Handa <handa@m17n.org>
4458 Re-apply the changes forgotten in the released version.
4460 * charset.c (mcharset__load_from_database): Call
4461 mchar_define_charset.
4463 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4464 (mconv_encode_range): Put Mcoding text property.
4466 2004-03-18 Kenichi Handa <handa@m17n.org>
4468 * draw.c (Mdepth): New variable.
4469 (visual_order): Delete unused local var `pos'.
4470 (compose_glyph_string): Fix for the case that gstring->glyphs is
4471 realloced. Stop generating glyphs at TO. Fix handling of
4473 (layout_glyphs): Get metrics of all glyphs in advance. Set
4474 lbearing and rbearing of base of composition glyph correctly.
4475 Handle left-overhang glyphs correctly.
4476 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4478 (dump_combining_code): Change the defualt off_x character to ".".
4479 (mdraw__init): Initialize Mdepth.
4481 * face.c (work_gstring): New variable
4482 (mface__init): Initialize work_gstring.
4483 (mface__fini): Free work_gstring.glyphs.
4484 (mface__realize): Don't handle videomode property here. Adjusted
4485 for the change of mfont__get_metric.
4486 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4488 * face.h (enum face_gc): Moved to m17n-X.c.
4490 * font.h (struct MFontDriver): Arguments of find_metric changed.
4491 (mfont__select): Prototype adjusted.
4492 (mfont__get_metric): Likewise.
4493 (mfont__ft_drive_otf): Likewise.
4494 (mfont__flt_run): Likewise.
4496 * font.c (mfont__select): New argument layouter. If layouter is
4497 different in the registered font, make a new copy of realized
4499 (mfont__get_metric): Argument changed. Get metrics of multiple
4501 (mfont_find): Call mfont__select with layouter as Mnil.
4503 * font-flt.c (FontLayoutContext): New member rfont.
4504 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4505 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4507 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4509 (NUM_POINTS): New macro.
4510 (MPointTable): New type.
4511 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4512 (mfont__ft_drive_otf): New argument rfont.
4514 * fontset.c (realize_font_group): Adjusted for the changed of
4516 (check_fontset_element): This function deleted.
4518 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4519 off the parent window if the preedit text is zero length.
4521 * internal-gui.h (struct MFrame): New members foreground,
4522 background, videomode, font.
4523 (struct MGlyphString): New member anti_alias.
4524 (MDrawPoint): New type.
4525 (mwin__draw_bitmap): Prototype deleted.
4526 (mwin__draw_points): Prototype added.
4528 * m17n-gui.h (MDrawControl): New member anti_alias.
4530 * m17n-gui.c (free_frame): Free frame->font.
4531 (mframe): Set the fontset of frame->face to the default fontset.
4533 * m17n-X.c (RGB_GC): New type.
4534 (enum gc_index): Renamed from enum face_gc. Member names changed.
4536 (struct MWDevice): Members foreground and background deleted. New
4537 member scratch_gc, gc_list.
4538 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4539 (free_device): Free GCs in device->gc_list.
4540 (get_rgb_gc): New function.
4541 (get_gc): Renamed and argument changed from get_color.
4542 (get_gc_for_anti_alias): New function.
4543 (xfont_find_metric): Arguments changed. Get metrics of multiple
4545 (set_region): Argument changed. Caller changed.
4546 (xfont_render): Allways set a font in gc.
4547 (x_error_handler, x_io_error_handler): Define only if
4548 X_SET_ERROR_HANDLER is defined.
4549 (mwin__open_device): Create device->scratch_gc. Set members
4550 foreground, background, and videomode of frame. Call
4551 XSetErrorHandler and XSetIOErrorHandler only if
4552 X_SET_ERROR_HANDLER is defined.
4553 (struct gc_list): Deleted.
4554 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4555 (mwin__realize_face): Adjusted for the change of the format of
4556 rface->info and the charge of set_region.
4557 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4558 (mwin__draw_box): Likewise.
4559 (mwin__draw_bitmap): This function deleted.
4560 (mwin__draw_points): New function.
4561 (mwin__verify_region): Adjusted for the change of the format of
4562 rface->info and the charge of set_region.
4563 (mwin__create_window): Inherit backgound pixel from parent.
4564 (mwin__dump_gc): Adjusted for the change of the format of
4567 2004-03-16 Kenichi Handa <handa@m17n.org>
4569 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4571 * input.c (M_key_alias): New variable.
4572 (handle_key): Try M_key_alias property of a key too.
4573 (minput__init): Initialize M_key_alias. Give that property to
4574 symbols in one_char_symbol. Fix bug of initializing
4577 * draw.c (compose_glyph_string): Don't handle
4578 ignore_formatting_char here. Include formatting characters in the
4579 range processed by a FTL.
4580 (layout_glyph_string): Handle ignore_formatting_char here.
4582 2004-03-12 Kenichi Handa <handa@m17n.org>
4584 * input-gui.c (win_create_ic): Enable bidi in status control.
4586 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4588 2004-03-09 Kenichi Handa <handa@m17n.org>
4590 * input.c (load_input_method): If title is not specified, use the
4591 input method name as title.
4593 * m17n-X.c (get_color): Make it static.
4594 (xim_create_ic, xim_destroy_ic, x_error_handler)
4595 (x_io_error_handler): Likewise.
4597 2004-03-01 Kenichi Handa <handa@m17n.org>
4599 * Version 1.0 released.
4602 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
4603 National Institute of Advanced Industrial Science and Technology (AIST)
4604 Registration Number H15PRO112
4606 This file is part of the m17n library.
4608 The m17n library is free software; you can redistribute it and/or
4609 modify it under the terms of the GNU Lesser General Public License
4610 as published by the Free Software Foundation; either version 2.1 of
4611 the License, or (at your option) any later version.
4613 The m17n library is distributed in the hope that it will be useful,
4614 but WITHOUT ANY WARRANTY; without even the implied warranty of
4615 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4616 Lesser General Public License for more details.
4618 You should have received a copy of the GNU Lesser General Public
4619 License along with the m17n library; if not, write to the Free
4620 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4621 Boston, MA 02110-1301, USA.